Large language model wind power prediction method fusing decomposition and prompt
By combining CEEMDAN decomposition and a large language model reprogramming module with LoRA fine-tuning, the problems of multimodal modeling and transfer generalization in wind power forecasting are solved, achieving efficient and interpretable wind power forecasting, improving grid stability and reducing operating costs.
Patent Information
- Application Number
- CN202511607834.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2025-12-05
AI Technical Summary
Existing wind power forecasting methods struggle to simultaneously achieve multimodal modeling, multi-scale sensing, and transfer generalization capabilities, leading to higher grid stability and operating costs.
We employ CEEMDAN to decompose wind power and meteorological variables, combine a large language model reprogramming module and LoRA lightweight fine-tuning, and use a cross-attention mechanism for modal alignment and prompt construction to achieve multi-scale signal decomposition and semantic understanding.
It improves the accuracy of identifying and modeling multi-frequency components of wind power data, enhances the model's cross-wind field transferability and generalization performance, reduces training costs, and improves the interpretability and stability of predictions.
Smart Images

Figure CN121072784A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wind power prediction, and in particular to a large language model wind power prediction method fusing decomposition and prompt. BACKGROUND
[0002] With the large-scale access of renewable energy, wind power has become an important part of the clean and low-carbon energy system. Wind power prediction refers to predicting the power output of a wind turbine or wind farm in a future time period based on historical wind speed, meteorological variables and power generation records. This task is a key link to achieve high proportion of wind power grid connection, safe dispatch of power systems and optimization of new energy consumption, and is of great significance to ensure the stability of the power grid and reduce operating costs.
[0003] However, the existing wind power prediction technology still has the following problems in practical application: (1) the existing method mainly relies on structured numerical sequences, and lacks a mechanism for effectively introducing non-structured semantic information such as task description and domain prior into the prediction model, limiting the model from using external information for more accurate prediction, resulting in insufficient modal fusion capability; (2) wind power data has significant trend, seasonality and disturbance characteristics, and existing models have weak multi-scale time series modeling capability, making it difficult to model such complex time series structures, affecting prediction accuracy and stability; (3) there are obvious geographical and climatic differences between different wind farms, making it difficult for the trained model to be reused in new scenarios, with poor cross-wind farm generalization performance and high retraining cost.
[0004] Current wind power prediction methods cannot simultaneously consider multi-modal modeling, multi-scale perception and transfer generalization ability, affecting the stability of the power grid, and the operating cost is high, and it is urgent to build a wind power prediction method that fuses structured time series data and semantic information, and has high adaptability and high scalability. SUMMARY
[0005] The present application relates to the technical field of wind power prediction, and in particular to a large language model wind power prediction method fusing decomposition and prompt. BACKGROUND
[0002] With the large-scale access of renewable energy, wind power has become an important part of the clean and low-carbon energy system. Wind power prediction refers to predicting the power output of a wind turbine or wind farm in a future time period based on historical wind speed, meteorological variables and power generation records. This task is a key link to achieve high proportion of wind power grid connection, safe dispatch of power systems and optimization of new energy consumption, and is of great significance to ensure the stability of the power grid and reduce operating costs.
[0003] However, the existing wind power prediction technology still has the following problems in practical application: (1) the existing method mainly relies on structured numerical sequences, and lacks a mechanism for effectively introducing non-structured semantic information such as task description and domain prior into the prediction model, limiting the model from using external information for more accurate prediction, resulting in insufficient modal fusion capability; (2) wind power data has significant trend, seasonality and disturbance characteristics, and existing models have weak multi-scale time series modeling capability, making it difficult to model such complex time series structures, affecting prediction accuracy and stability; (3) there are obvious geographical and climatic differences between different wind farms, making it difficult for the trained model to be reused in new scenarios, with poor cross-wind farm generalization performance and high retraining cost.
[0004] Current wind power prediction methods cannot simultaneously consider multi-modal modeling, multi-scale perception and transfer generalization ability, affecting the stability of the power grid, and the operating cost is high, and it is urgent to build a wind power prediction method that fuses structured time series data and semantic information, and has high adaptability and high scalability. SUMMARY
[0005] The present application relates to the technical field of wind power prediction, and in particular to a large language model wind power prediction method fusing decomposition and prompt. BACKGROUND
[0002] With the large-scale access of renewable energy, wind power has become an important part of the clean and low-carbon energy system. Wind power prediction refers to predicting the power output of a wind turbine or wind farm in a future time period based on historical wind speed, meteorological variables and power generation records. This task is a key link to achieve high proportion of wind power grid connection, safe dispatch of power systems and optimization of new energy consumption, and is of great significance to ensure the stability of the power grid and reduce operating costs.
[0003] However, the existing wind power prediction technology still has the following problems in practical application: (1) the existing method mainly relies on structured numerical sequences, and lacks a mechanism for effectively introducing non-structured semantic information such as task description and domain prior into the prediction model, limiting the model from using external information for more accurate prediction, resulting in insufficient modal fusion capability; (2) wind power data has significant trend, seasonality and disturbance characteristics, and existing models have weak multi-scale time series modeling capability, making it difficult to model such complex time series structures, affecting prediction accuracy and stability; (3) there are obvious geographical and climatic differences between different wind farms, making it difficult for the trained model to be reused in new scenarios, with poor cross-wind farm generalization performance and high retraining cost.
[0004] Current wind power prediction methods cannot simultaneously consider multi-modal modeling, multi-scale perception and transfer generalization ability, affecting the stability of the power grid, and the operating cost is high, and it is urgent to build a wind power prediction method that fuses structured time series data and semantic information, and has high adaptability and high scalability. SUMMARY
[0005] The present application relates to the technical field of wind power prediction, and in particular to a large language model wind power prediction method fusing decomposition and prompt.
[0006] To achieve the above-mentioned purpose, the present application provides the following technical solutions: The application provides a large language model wind power prediction method combining decomposition and prompt, comprising the following steps: S100: performing CEEMDAN decomposition on input wind power and related meteorological variables according to feature channels, and extracting a plurality of intrinsic mode function components with different frequency characteristics and residual terms; S200: performing standardization processing on each intrinsic mode function component to obtain an embedding sequence, and dividing the embedding sequence into fixed-length patches, and encoding each patch into an embedding vector through a one-dimensional convolution network; S300: inputting the embedding vector into a reprogramming module, and performing representation alignment between numerical modalities and language modalities based on a cross-attention mechanism, and converting the embedding vector into a reprogrammed embedding with a text semantic style; S400: constructing a natural language prompt for each intrinsic mode function component and residual sequence, and forming a unified input sequence after splicing the natural language prompt and the reprogrammed embedding of the corresponding component; S500: performing lightweight fine-tuning on the Query projection matrix and the Key projection matrix of the self-attention module in the pre-trained language model through the LoRA method, and keeping the remaining parameters frozen to obtain a large language model; S600: inputting the unified input sequence into the large language model to perform wind power prediction at a future time, and performing weighted reconstruction after the prediction result is restored through inverse standardization to finally obtain a wind power prediction value.
[0007] Preferably, in the S100 step, the input wind power and related meteorological variables are represented as a multivariate time series , wherein represents the number of feature channels, represents the length of the input time window; for each input variable , the CEEMDAN decomposition process is represented as: ; wherein, represents the channel th intrinsic mode function component, represents the residual component of the channel, represents the total number of intrinsic mode function components decomposed by CEEMDAN.
[0008] Preferably, in the S100 step, the input wind power and related meteorological variables are converted from a two-dimensional matrix to a three-dimensional matrix : , wherein the second dimension represents intrinsic mode function components and one residual component obtained by decomposing each channel.
[0009] Preferably, the S200 specifically comprises: S210: performing standardization processing on each intrinsic mode function component Normalization is performed using the RevIN method; S220: The normalized eigenmode function component sequence is patched to obtain the patch representation matrix. Number of patch segments The calculation formula is: ,in, This indicates the number of time steps contained in each patch. S230: Defines the stride between two adjacent patches; Map each patch to a dimension of The vector is used to obtain the embedding vector. .
[0010] Preferably, in step S210, the intrinsic mode function components The normalization process is as follows: , , , in, and These are trainable affine parameters used to enhance the flexibility of normalization processing. A tiny constant introduced to prevent division by zero errors. This represents the normalized sequence of intrinsic mode function components.
[0011] Preferably, step S300 specifically includes: S310: Let the word embedding matrix of the original large language model be... ,in Indicates vocabulary size, Represent the embedding dimension and select a subset. ,in Indicates the size of the selected vocabulary. S320: As a trainable text prototype; (This likely refers to a specific method or technology, but the context is unclear without further information.) As input to the reprogramming module, it forms a cross-attention mechanism with the trainable text prototype as the key and value, respectively. : ,in, , , They represent the first The query matrix, key matrix, and value matrix of each attention head. This represents the output of the attention head. S330: The dimensions of the key matrix; S330: After concatenating the outputs of all attention heads, pass them through a linear transformation layer to obtain the reprogrammed embedding. .
[0012] Preferably, the step S400 specifically comprises: S410, designing a prompt structure based on the task instruction, the component identification information and the statistical context information to obtain a text prompt; S420, encoding the text prompt through a pre-training tokenizer of the large language model to convert it into a discrete token sequence to form a prompt embedding ; S430, concatenating each prompt embedding with the corresponding reprogramming embedding to obtain a prompt input sequence pair ; S440, concatenating all prompt input sequence pairs in sequence to obtain a unified input sequence.
[0013] Preferably, in the step S410, the task instruction is used to express the prediction target, the component identification information is used to specify the component type corresponding to the sequence, and the statistical context information is used to provide the key statistical features of the component.
[0014] Preferably, in the step S500, the lightweight fine-tuning process of the Query projection matrix and the Key projection matrix comprises: S510, introducing a low-rank matrix and a low-rank matrix , wherein , represents the low-rank dimension; S520, updating the original weight matrix to , wherein is a trainable fine-tuning part; S530, only updating the low-rank matrix and the low-rank matrix during training to simplify the forward propagation process to , , wherein
[0015] Preferably, the step S600 specifically comprises: S610, for each eigenmodal function component , setting the output of the large language model as , flattening it into , and sending it into a linear projection layer to generate a numerical prediction sequence : , wherein represents the numerical prediction sequence of the component within the prediction time window, represents the prediction step; S620, using the mean, the variance and the affine parameter in RevIN corresponding to each numerical prediction sequence to perform inverse standardization reduction: ; S630, setting the wind power feature after inverse standardization reduction as The intrinsic modal function component prediction is , the residual error is , and the final wind power prediction value is: .
[0016] Implementing one of the technical solutions in the above-mentioned technical solutions of the present application has the following advantages or beneficial effects: The present application introduces multi-scale signal decomposition, modal reprogramming, task-driven prompt construction, and LoRA-based lightweight fine-tuning strategies to construct an efficient and generalizable large language model wind power prediction method. This method fully utilizes the capabilities of large language models in semantic understanding and time series modeling, effectively improving the recognition and modeling accuracy of multiple frequency components in wind power data. Through the deep integration of structured data and language models, a new approach is provided for cross-modal time series prediction, which can be widely used in smart energy management, green dispatch optimization, and other fields, helping to improve the intelligence and efficiency of new energy systems. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor. In the drawings: Figure 1 is a flowchart of a large language model wind power prediction method of the present application; Figure 2 is a structural schematic diagram of a large language model wind power prediction method of the present application; Figure 3 is a flowchart of the S200 step of a large language model wind power prediction method of the present application; Figure 4 is a flowchart of the S300 step of a large language model wind power prediction method of the present application; Figure 5 is a flowchart of the S400 step of a large language model wind power prediction method of the present application; Figure 6 is a flowchart of the lightweight fine-tuning process of the Query projection matrix and the Key projection matrix in a large language model wind power prediction method of the present application; Figure 7is a S600 step flow chart of a wind power prediction method of a large language model fusing decomposition and prompt according to an embodiment of the application. DETAILED DESCRIPTION
[0018] In order to make the objects, technical solutions and advantages of the present application clearer, the various exemplary embodiments to be described below will be described with reference to the corresponding drawings, which constitute a part of the exemplary embodiments, and various exemplary embodiments that can be used to implement the present application are described. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. It should be understood that they are only examples of processes, methods and devices, etc. consistent with some aspects of the present disclosure as described in the appended claims, and other embodiments can be used, or modifications can be made to the embodiments listed herein in structure and function, without departing from the scope and spirit of the present application.
[0019] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the elements referred to must have a particular orientation, be constructed and operated in a particular orientation. The terms "first", "second" and the like are only for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "a plurality of" means two or more. The terms "connected", "connected" should be broadly understood, for example, it can be fixed connection, detachable connection, integral connection, mechanical connection, electrical connection, communication connection, direct connection, indirect connection through intermediate medium, internal communication of two elements or interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more related listed items. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0020] In order to illustrate the technical solutions described in the present application, the following will be described by specific embodiments, only showing the parts related to the embodiments of the present application.
[0021] Embodiment: As Figure 1 , Figure 2As shown, the present application provides a large language model wind power prediction method that fuses decomposition and prompt, including the following steps. S100: The input wind power and related meteorological variables (such as wind speed, wind direction) are respectively decomposed by CEEMDAN according to the feature channel, and a plurality of intrinsic mode function (Intrinsic Mode Function, IMF) components and residual terms with different frequency characteristics are extracted, that is, a set of structured unary sequences are formed. Because the time series of wind power and related meteorological variables usually have complex non-stationarity and multi-frequency mixing characteristics, directly modeling the original signal will make it difficult for the model to capture effective patterns, affecting the prediction performance. Therefore, the present application introduces the CEEMDAN method to independently decompose the time series data of each channel before modeling, with the purpose of disassembling the original signal into multiple components with higher modelability and frequency localization. CEEMDAN is an improved method of traditional empirical mode decomposition (Empirical Mode Decomposition, EMD, a data-driven adaptive signal decomposition method that can disassemble any nonlinear, non-stationary time series into intrinsic mode functions and a residual without pre-setting the base function) and ensemble empirical mode decomposition (Ensemble Empirical Mode Decomposition, EEMD, which repeatedly adds a small amount of noise to the EMD of the signal, and then averages the noise). CEEMDAN has better robustness and reconfigurability. CEEMDAN can effectively alleviate the mode mixing problem of EMD by adaptively injecting white noise in multiple instances and integrating the decomposition results, while avoiding the reconstruction error of EEMD. S200: In order to adapt to the input structure of the large language model, each intrinsic mode function component is standardized to obtain an embedded sequence to alleviate the distribution drift problem of time series data, and the embedded sequence is divided into fixed length patches, each patch is encoded into an embedded vector by a one-dimensional convolutional network to adapt to the subsequent large language model processing structure, and each stage is performed independently on the channel. S300: The embedded vector is input into the reprogramming module, and the representation alignment between the numerical mode and the language mode is performed based on the cross-attention mechanism, and the embedded vector is converted into a reprogrammed embedding with a text semantic style; thereby without modifying the ontology structure of the large language model, the modal alignment and reprogramming can be realized to enable it to receive non-language mode input, which is an efficient and universal modal bridging method. In the wind power prediction framework of the present application, the input data is essentially continuous multivariate time series, and these data structures and the natural language sequences originally processed by the pre-trained large language model have significant differences in modalities, and directly inputting the large language model for reasoning modeling will result in poor performance.Therefore, in order to realize modal alignment and make full use of the powerful modeling capability of the large language model, the present application introduces a reprogramming module, which aims to map the time series patch into a representation close to natural language token, so as to be consistent with the internal embedding space of the large language model. S400: A natural language prompt is constructed for each intrinsic modal function component and residual sequence, and after the natural language prompt is spliced with the reprogramming embedding of the corresponding component, a unified input sequence is formed; in order to fully exert the ability of the large language model in semantic modeling and causal reasoning, the present application introduces a prompt construction mechanism based on task semantics, which is used to enhance the understanding and generalization ability of the model to the meaning of the input data. S500: The Query projection matrix (a weight matrix used to map an input vector into a query vector for effective interaction with a Key vector or other vectors) and the Key projection matrix (used to map an input vector into a Key vector) of the self-attention module (which allows each position in the sequence to look at all other positions in the sequence, thereby dynamically introducing context information for its own representation) of the pre-trained language model are fine-tuned by the LoRA method, and the remaining parameters are kept frozen, obtaining a large language model, the LoRA method makes the large language model adapt to the modeling task of wind power time series data, while avoiding the high cost and overfitting risk brought by full parameter fine-tuning. S600: The unified input sequence is input into the large language model to predict the future wind power, and the prediction result is restored after inverse standardization and weighted reconstruction, and finally the wind power prediction value is obtained. In the present application, the CEEMDAN decomposition mechanism is combined with the structure of the large language model, the multi-scale decomposition and language understanding ability are fused, the explicit modeling of different frequency dynamics in the wind power time series data is realized, and the modeling stability and frequency domain resolution capability of the model for non-stationary signals are significantly improved; the prompt-based semantic guided prediction fuses the task description, component type identification and statistical feature prompt in the form of natural language, guides the model to understand the input structure and prediction target, and enhances the explainability and semantic generalization ability of the prediction; the LoRA fine-tuning part of the large language model is also introduced, the parameter efficient fine-tuning strategy is adopted to significantly reduce the training cost and enhance the transferability across wind farms; and relying on the prompt guidance and modal alignment mechanism, the model has the ability of zero-shot prediction across wind farms, and can adapt to the input characteristics of different regions without retraining for new wind farms, and has good generalization ability and transfer performance. The present application introduces multi-scale signal decomposition, modal reprogramming, task-driven prompt construction and LoRA-based lightweight fine-tuning strategy, and constructs an efficient and generalizable large language model wind power prediction method. The method makes full use of the ability of the large language model in semantic understanding and time series modeling, and effectively improves the recognition and modeling accuracy of the model for the multi-frequency components in the wind power data.And through the deep integration of structured data and language models, a new method is provided for cross-modal time series prediction, which can be widely used in smart energy management, green dispatch optimization and other fields, facilitating the intelligentization and efficient operation of new energy systems.
[0022] As an optional implementation, in the S100 step, the input wind power and related meteorological variables are represented as a multivariate time series , where represents the number of feature channels, represents the length of the input time window; for each input variable , the CEEMDAN decomposition process is represented as: ; where, represents the jth intrinsic mode function component on the channel , represents the residual component of the channel, represents the total number of intrinsic mode function components decomposed by CEEMDAN. Each intrinsic mode function component in the decomposition result represents the local oscillation mode of the original signal in a certain frequency range, and the residual represents the long-term trend of the signal.
[0023] As an optional implementation, in the S100 step, by performing CEEMDAN decomposition on each channel, the input wind power and related meteorological variables are converted from a two-dimensional matrix to a three-dimensional matrix : , where the 2nd dimension represents the intrinsic mode function components and 1 residual component obtained by decomposing each channel. CEEMDAN decomposition has the following advantages: 1) noise reduction and smoothing: CEEMDAN can effectively reduce high-frequency noise and abnormal fluctuations in the original data, making it easier for the model to capture the main trend; 2) frequency domain separation modeling: each intrinsic mode function component has a clear frequency positioning, allowing subsequent models to independently model short-term, medium-term, and long-term dynamics by frequency dimension; 3) improve interpretability: each intrinsic mode function can be intuitively associated with a specific time series pattern, such as rapid fluctuations, periodic trends, etc., which helps to analyze and predict logic; 4) alleviate language model illusion phenomenon: convert non-stationary original data into stable, structured components, which helps large language models to learn and reason stably, reducing the risk of false output.
[0024] As an optional implementation, as shown in Figure 3 , the S200 specifically includes: S210: for each intrinsic mode function component The RevIN (Reversible Instance Normalization) method is used for normalization (wind power and related meteorological variables exhibit significant non-stationarity; their statistical distribution changes with time, climate, and wind turbine operating status, affecting model training stability and generalization ability. Normalization can overcome this problem. The RevIN method is a reversible normalization technique specifically designed to address distribution drift issues in non-stationary time series. It treats each sequence sample as an independent instance, first normalizing it according to its own statistics, then allowing the model to predict, and finally restoring the results to the original scale without loss, thus eliminating distribution differences while preserving interpretability). Intrinsic mode function components... The normalization process is as follows: , , , in, and These are trainable affine parameters used to enhance the flexibility of normalization processing. A tiny constant introduced to prevent division by zero errors. This represents the normalized intrinsic mode function (IMF) component sequence. This normalization process standardizes the sample-level distribution, effectively mitigating statistical bias between different input sequences, and allows for inverse normalization reconstruction during output prediction. S220: The normalized IMF component sequence is patched. Patch segmentation compresses the input length, enhances local modeling capabilities, and adapts to the token input structure of large language models. This mechanism borrows from the design idea of the patchTST model (which segments each univariate sequence into overlapping subsequence blocks called patches, where a patch is approximately one word in natural language, thus converting long-term sequences into long sentences), dividing the sequence into multiple continuous time segments to obtain the patch representation matrix. Number of patch segments The calculation formula is: ,in, This indicates the number of time steps contained in each patch. This represents the stride between two adjacent patches; this patch enables the model to focus on local semantic patterns while reducing the number of input tokens, which helps improve computational efficiency and enhance the ability to model long sequences. S230: Define a one-dimensional convolutional layer. Map each patch to a dimension of The vector is used to obtain the embedding vector. , the embedding vector is a token-like embedding, i.e., a discrete symbol token is mapped to a fixed-dimensional vector. After the patch is converted into a token-like embedding that can be processed by a language model, the embedding process preserves the temporal structure information within the patch and formats it into a token representation that meets the input requirements of a large language model.
[0025] As an optional implementation, as shown in Figure 4 , the S300 step specifically includes: S310: setting the word embedding matrix of the original large language model as , wherein represents the size of the vocabulary, represents the embedding dimension, and a subset is selected, wherein represents the selected size of the vocabulary, , as a trainable text prototype, these text prototypes represent general language semantic anchors to help the model interpret the semantic features (such as wind speed variation, power surge, periodicity, etc.) contained in the numerical sequence. S320: inputting the embedding vector into the reprogramming module (specifically, the Query input, i.e., a natural language request input into the model), and the trainable text prototype as the key and value, respectively, to form a cross-attention mechanism : , wherein , , , respectively, represent the query matrix, key matrix, and value matrix of the i-th attention head, , the output of the attention head is represented by , and the dimension of the key matrix is represented by . S330: concatenating the outputs of all attention heads and passing them through a linear transformation layer to obtain the reprogrammed embedding . The output sequence not only preserves the original dynamic structure of the time series, but also converts it into a semantic representation that can be recognized and reasoned by a large language model, which is equivalent to a numerical prompt for subsequent natural language model input. This alignment mechanism has the following advantages: 1) structural non-invasiveness: no need to modify the structure of the pre-trained language model, maintaining the universality of the model; 2) strong information guidance: learnable text prototypes are used to build alignment anchors to guide the model to understand the time series semantics; 3) good modality uniformity: the output embedding is consistent with the natural language token representation, which can seamlessly splice the prompt input. Finally, all patch embeddings corresponding to the intrinsic modal functions and residual components are reprogrammed to form a unified language modal input, laying the foundation for subsequent prompt splicing and large language model processing.
[0026] As an optional implementation, as shown inFigure 5 As shown, the S400 step specifically comprises: S410: designing a prompt structure based on a task instruction (expressing a prediction target in simple language, such as “please predict the wind power in the next six hours”), component identification information (explicitly specifying the component type corresponding to the sequence, such as IMF_1 representing the first modal function, or Residual representing the residual trend item), and statistical context information (providing key statistical features of the component, including mean, standard deviation, maximum value, minimum value, and other indicators, to help the model understand the scale and volatility of the sequence), the prompt structure guides the input of the large model behavior through modular design, and a text prompt is obtained, the semantic enhancement mechanism of the text prompt can guide the language model to distinguish the action range of different frequency components, such as rapid changes and long-term trends, which helps to improve the semantic modeling ability of the language model in the wind power prediction task. S420: The text prompt is encoded by the pre-training tokenizer of the large language model (used to convert a string into an integer sequence), converted into a discrete token sequence, and formed into a prompt embedding ; in order to ensure the consistency of the input length, for the prompt sequence that is too short, a special padding token (a special symbol used to pad the unequal length sequence to the same length, which does not participate in actual semantic calculation, but ensures that batch processing and matrix operation can be efficiently performed) is used for padding, and for the prompt that is too long, it is appropriately truncated. S430: Each prompt embedding is concatenated with the corresponding reprogramming embedding to obtain a prompt input sequence pair ; this structure not only contains high-level semantic guidance information, but also retains the original component time sequence pattern, so that the model can simultaneously focus on both language and time structure in a unified attention space. S440: All prompt input sequence pairs are concatenated in order to obtain a unified input sequence. Since each input feature channel can generate n IMF components and 1 residual component through CEEMDAN decomposition, the present application constructs n+1 prompt input sequence pairs for each channel, and the unified input sequence is input to the large language model as a continuous token sequence, so that the large language model can simultaneously model all components in a single forward propagation process, thereby realizing joint reasoning of short-term fluctuations and long-term trends and improving the accuracy and robustness of the prediction effect.
[0027] As an optional implementation, as shown in Figure 6 , the lightweight fine-tuning process of the Query projection matrix and the Key projection matrix in the S500 step comprises: S510: LoRA introduces a low-rank matrix , a low-rank matrix , wherein , represents the low-rank dimension; S520: the original weight matrix is updated to , where is the trainable fine-tuning part; S530: only the low-rank matrix is updated during training , the forward propagation process is simplified to , , where represents the input vector of the self-attention module. Thus, the model only needs to update a small part of the parameters to adapt to the wind power prediction task, effectively reducing the fine-tuning cost, and the remaining large language model parameters (including word embedding, feedforward layer, etc.) are kept frozen to ensure that the original ability of the model is not destroyed during the fine-tuning process. LoRA is a parameter-efficient fine-tuning mechanism designed specifically for large pre-trained models. The core idea is to introduce a trainable low-rank matrix in a specific module while keeping the original weights frozen, which is used to simulate fine-tuning behavior. In this invention, LoRA is only applied to the Query projection matrix and the Key projection matrix of the Self-Attention module in the language model, because these two matrices determine the attention allocation of different position information in the input sequence, and are the key components for adjusting the time series modeling behavior.
[0028] As an optional implementation, as shown in Figure 7 , the S600 step specifically includes: S610: for each eigenmode function component , set the output of the large language model as , flatten it to , and send it to a linear projection layer to generate the numerical prediction sequence : , where represents the numerical prediction sequence of the component within the prediction time window, represents the prediction step; S620: for each numerical prediction sequence , use its corresponding mean, variance, and affine parameters in RevIN to reverse the standardization and restore: ; thus, the original scale and physical meaning are restored. S630: set the wind power features after reverse standardization and restoration corresponding to individual eigenmode function components to , and the residual error is , and the final wind power prediction value is: This reconstruction method fuses the prediction results in different frequency dimensions, realizes multi-scale modeling and restoration of the original wind power sequence, and preserves the information of short-term disturbances and long-term trends.
[0029] The embodiment is only one specific example and does not indicate that the present application is limited to this implementation.
[0030] The above description is only the preferred embodiment of the present application, and those skilled in the art know that various changes or equivalent replacements can be made to the features and embodiments without departing from the spirit and scope of the present application. In addition, the features and embodiments can be modified to adapt to specific conditions and materials under the guidance of the present application without departing from the spirit and scope of the present application. Therefore, the present application is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of the present application are within the protection scope of the present application.
Claims
1. A method for wind power prediction using a large language model that combines decomposition and prompt, characterized in that, The method comprises the following steps: S100: CEEMDAN decomposition is performed on input wind power and related meteorological variables according to characteristic channels to extract multiple intrinsic mode function components with different frequency characteristics and residual terms; S200: Each intrinsic mode function component is standardized to obtain an embedded sequence, and the embedded sequence is divided into a fixed-length patch, and each patch is encoded into an embedded vector through a one-dimensional convolution network; S300: The embedded vector is input into a reprogramming module, and representation alignment between numerical modalities and language modalities is performed based on a cross-attention mechanism to convert the embedded vector into a reprogrammed embedded vector with a text semantic style; S400: A natural language prompt is constructed for each intrinsic mode function component and residual sequence, and the natural language prompt is spliced with the reprogrammed embedded vector of the corresponding component to form a unified input sequence; S500: The Query projection matrix and the Key projection matrix of the self-attention module in the pre-trained language model are fine-tuned through the LoRA method, and the remaining parameters are kept frozen to obtain a large language model; S600: The unified input sequence is input into the large language model to predict the wind power at the future time, and the prediction result is restored through inverse standardization and weighted reconstruction to obtain the wind power prediction value.
2. The method of claim 1, wherein the method is a method of wind power prediction using a large language model that combines decomposition and prompt, and the method comprises: In step S100, the input wind power and related meteorological variables are represented as a multivariate time series wherein denotes the number of feature channels, denotes the length of the input time window; for each input variable The CEEMDAN decomposition process is represented as: ; wherein, represents a channel the jth upper intrinsic mode function component, represents a residual component of the channel, represents the total number of intrinsic mode function components decomposed by CEEMDAN.
3. The method of claim 2, wherein the method is a large language model wind power prediction method that fuses decomposition and prompt. In the S100 step, by performing CEEMDAN decomposition on each channel, the input wind power and related meteorological variables are converted from a two-dimensional matrix to a three-dimensional matrix : , where the 2nd dimension represents the decomposition of each channel into one residual component.
4. The method of claim 1, wherein the method is a wind power prediction method of a large language model that fuses decomposition and prompt. S200 specifically comprises: S210: for each eigenmode function component Normalization is performed using the RevIN method; S220: The normalized intrinsic mode function component sequence is patch cut to obtain a patch representation matrix , the number of patch cuts The calculation formula is: , wherein, represents the number of time steps contained in each patch, represents the step length between two adjacent patches; S230: define a one-dimensional convolution layer Each patch is mapped to a vector of dimension , resulting in an embedding vector .
5. The method of claim 4, wherein the method is a large language model wind power prediction method that fuses decomposition and prompt. In step S210, the normalized process of the EMD component is: , , , where, denotes the mean of the eigenmodal component, denotes the variance of the eigenmodal component, and are trainable affine parameters to enhance the flexibility of the normalization process, is a tiny constant introduced to prevent division by zero errors, denotes the normalized eigenmodal function component sequence.
6. The method of claim 1, wherein the method is a large language model wind power prediction method that fuses decomposition and prompt. S300 specifically comprises: S310: Let the word embedding matrix of the original large language model be where denotes the vocabulary size, denotes the embedding dimension, and a subset where denotes the selected vocabulary size, , as the trainable text prototype; S320: embedding the vector As input to the reprogramming module, the trainable text prototypes form a cross-attention mechanism with the respective keys and values : , in, , , They represent the first The query matrix, key matrix, and value matrix of each attention head. This represents the output of the attention head. Let be the dimension of the key matrix; S330: concatenate the outputs of all attention heads and pass through a linear transformation layer to get the reprogrammed embedding .
7. The method of claim 6, wherein the method further comprises: S400 specifically comprises: S410: A prompt structure is designed based on a task instruction, component identification information and statistical context information to obtain a text prompt; S420: The text prompt is encoded by the pre-training tokenizer of the large language model, converted into a discrete token sequence, and formed into a prompt embedding ; S430: embed each prompt with the corresponding reprogramming embedding perform stitching to obtain a prompt-input sequence pair ; S440: All prompt input sequences are concatenated in sequence to obtain a unified input sequence.
8. The method of claim 7, wherein the method is a large language model wind power prediction method that fuses decomposition and prompt. In the S410 step, the task instruction is used to describe the prediction target, the component identification information is used to specify the component type corresponding to the sequence, and the statistical context information is used to provide the key statistical characteristics of the component.
9. The method of claim 1, wherein the method is a large language model wind power prediction method that fuses decomposition and prompt. In the S500 step, the lightweight fine-tuning process of the Query projection matrix and the Key projection matrix comprises: S510: LoRA introduces a low-rank matrix , a low-rank matrix where , denotes the low-rank dimension; S520: updating the original weight matrix to wherein is a trainable fine-tuning part; S530: update low-rank matrix only during training , low-rank matrix , simplifying the forward propagation process to , denotes the input vector of the self-attention module.
10. The method of claim 1, wherein the method is a large language model wind power prediction method that fuses decomposition and prompt. S600 specifically comprises: S610: For each eigenmodal function component , let the output of the large language model be , flatten it to , and feed it into a linear projection layer to generate the numerical prediction sequence : , wherein, represents a numerical prediction sequence of the component over a prediction time window, represents a prediction step; S620: For each numerical prediction sequence using its corresponding mean, variance and affine parameters in RevIN for inverse normalization back: ; S630: Set the wind power feature after inverse normalization reduction Corresponding The individual modal function component is predicted as The residual error is The final wind power prediction value is: 。
Citation Information
Patent Citations
Virtual power plant operation parameter prediction method and device, storage medium and computer program product
CN120611137A
Photovoltaic power prediction method based on pre-trained large language model
CN120781168A
Cited By
Wind power plant wind speed prediction method, system and equipment and storage medium
CN119514745A
A wind farm wind speed prediction method, system, device and storage medium
CN119514745B
Wind power prediction method and system based on multi-channel multi-scale decomposition
CN121413882A
A wind power multi-step prediction model construction method, device and medium
CN122347082A