CN-122022060-A - Method and device for predicting power system by multi-view retrieval enhancement large language model
Abstract
The invention discloses a method and a device for predicting a power system by using a multi-view retrieval enhancement language model, which are characterized in that multi-view structured feature vectors are used as keys, corresponding future time segments are used as values, a trend feature library, a seasonal feature library and an autocorrelation feature library are respectively established, a vector index structure is constructed, a sample to be predicted is received as a query object, multi-view structured feature vectors of the sample to be predicted are extracted, cosine similarity is respectively calculated in the libraries, top-K similar samples in each library are respectively selected based on the cosine similarity for weighting and aggregation, independent feature representation of each view is obtained, the independent feature representations of each view are spliced and fused to obtain a unified structure priori feature vector, and the structure priori feature vector and semantic information are embedded according to a predefined natural language template to construct the large language model prediction of an input sequence containing structure perception. The method realizes high-precision prediction of the long-sequence load and the equipment temperature of the power system, and effectively improves the scheduling accuracy and the risk identification capability under complex working conditions.
Inventors
- SUN MEIJUN
- Hui Yihang
- WANG ZHENG
Assignees
- 天津大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260210
Claims (7)
- 1. A method of multi-perspective search enhancement for a language model predictive power system, the method comprising: The multi-view feature extraction comprises the steps of obtaining sequence data of an electric power system, decomposing the sequence data into three types of features of trend, seasonality and autocorrelation from structural dimension, and obtaining multi-view structured feature vectors corresponding to the sequence data; Constructing a multi-view knowledge base, namely respectively constructing a trend feature base, a seasonal feature base and an autocorrelation feature base by using the multi-view structured feature vector as a key and a corresponding future time segment as a value, and constructing a vector index structure; The method comprises the steps of receiving a sample to be predicted as a query object, extracting multi-view structured feature vectors of the sample to be predicted, and independently calculating cosine similarity in a trend feature library, a seasonal feature library and an autocorrelation feature library respectively; prompt injection, namely embedding the structure priori feature vector and semantic information according to a predefined natural language template to construct an input sequence containing structure perception; and (3) large language model prediction, namely accessing a pre-training large language model with frozen parameters, inputting the input sequence into the pre-training large language model to perform reasoning generation, and outputting a future sequence prediction result of the power system.
- 2. The method for predicting a power system by using a multi-view search enhancement language model according to claim 1, wherein the decomposing the sequence data from the structural dimension into three types of features of trend, seasonal and autocorrelation is as follows: the trend feature extraction module is used for fitting the global change trend of the input fragment by using a least square method: , Wherein, the The rate of increase is indicated as being indicative of, Representing the intercept term, extracting and obtaining a trend feature vector: , Seasonal feature extraction module-the periodic structure of the sequence is decomposed by Discrete Fourier Transform (DFT): , taking the first P main frequency harmonic amplitudes to form seasonal features An autocorrelation characteristic extraction module for calculating fixed hysteresis set Is a function of the autocorrelation coefficient of (a): , the autocorrelation characteristics are obtained: , Finally, the characteristics are standardized and spliced: 。
- 3. The method for predicting a power system by using a multi-view search enhancement language model according to claim 1, wherein the multi-view knowledge base is: establishing an independent knowledge base for each structural view: each knowledge base takes the feature vector as an index (Key), and the corresponding future fragment as a storage value; the Key (Key) of the trend library is a linear fitting parameter, the value is a future power segment, and the index mode is a graph structure approximate nearest neighbor index; the Key (Key) of the seasonal library is a DFT spectrum vector, the value is a future period segment, and the index mode is a reverse displacement approximate nearest neighbor index; The Key (Key) of the autocorrelation library is a lag correlation coefficient, the value is a future autocorrelation fragment, and the indexing mode is a vector index structure.
- 4. The method for predicting a power system by using a multi-view search enhancement language model according to claim 1, wherein the unified structure prior feature vector is: in the prediction phase, query samples are input And calculates three types of features: and respectively calculating cosine similarity in the corresponding knowledge base: , Take the Top-K most similar samples before and perform Softmax weighted aggregation: , polymerization to obtain fusion characteristics: , finally, the three viewing angles are spliced to form a unified representation: 。
- 5. The method for predicting a power system by using a multi-view search enhancement language model according to claim 1, wherein the embedding the structure prior feature vector and semantic information according to a predefined natural language template constructs an input sequence including structure perception as follows: the fused structure vector And obtaining a structure priori Token through feedforward neural network and normalization layer projection: , Combining with a natural language prompt template: , Wherein: semantic prompting; Fusion structure Token; The historical sequence embeds the representation. The final input frozen large language model performs structure-aware predictive generation: 。
- 6. An apparatus for multi-view search enhancement of a language model predictive power system, the apparatus comprising a processor and a memory, the memory having program instructions stored therein, the processor invoking the program instructions stored therein to cause the apparatus to perform the method of any of claims 1-5.
- 7. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-5.
Description
Method and device for predicting power system by multi-view retrieval enhancement large language model Technical Field The invention relates to the field of power system data processing, in particular to a method and a device for predicting a power system based on a large language model enhanced by multi-view retrieval, and particularly relates to a method and a device for predicting a large language model (Large Language Model, LLM) generation mechanism by combining multi-view structural feature retrieval. The method is suitable for multivariable power data prediction tasks such as new energy power prediction, transformer state monitoring, power load scheduling and the like in the novel power system. Background The prediction of the power load and the new energy power is a core link in the scheduling of a modern energy management system and a smart grid. Along with the promotion of the 'double carbon' target, renewable energy sources such as wind energy, solar energy and the like are connected in a high proportion, and meanwhile, extremely strong fluctuation and intermittence are introduced. The power grid dispatching center needs to accurately infer future power supply and demand trends according to historical load data and meteorological observation data so as to make a reasonable power generation plan, optimize spare capacity configuration and ensure safe and stable operation of a power grid. However, in a practical new power system scenario, achieving high-precision, interpretable, and stable long-time-series predictions faces serious challenges. The power data is influenced by coupling of multiple factors such as extreme weather, holiday effect, economic activity fluctuation and the like, and the power data shows remarkable non-stationarity and multi-scale periodicity. Once the prediction deviation is too large, the wind and light abandoning phenomenon is directly caused to be aggravated, and even local power supply shortage or grid frequency instability is caused. The existing multivariable prediction method of the electric power system is mainly divided into two types, namely a statistical modeling method and a deep learning method. In terms of statistical modeling, common representatives include ARIMA (autoregressive integrated moving average model) and State Space Model (SSM), among others. Such methods are typically based on linear assumptions and sequence stationarity assumptions with good interpretability in a traditional grid scenario with steady loads. However, when the method is faced with nonlinear mutation caused by high-proportion new energy access (for example, photovoltaic dip caused by cloud cover), the method is difficult to capture a complex meteorological-power coupling relation, has poor generalization capability and is difficult to meet the real-time scheduling requirement. As smart grid data is accumulated, deep learning-based methods are becoming mainstream. Typical models include LSTM (long and short term memory network), GRU (gated loop unit), and attention-based transducer structures (e.g., informer, autoformer, etc.). These methods can automatically extract the timing characteristics of the power data. However, when oriented to long-period power scheduling (e.g., 720 hours of future monthly power generation plans), these models still have the problems of (1) long-term prediction failure, significant distribution drift of power load data with season and macroscopic economic changes (Distribution Shift), gradient disappearance of existing models, gradual deviation of prediction results from real power utilization trends over time, and (2) lack of physical interpretability, namely that deep learning models are usually "black boxes", and that a dispatcher has difficulty in understanding on which rule (e.g., trend growth or period fluctuation) the prediction results are generated, resulting in lack of confidence in making high-risk scheduling decisions. In recent years, the use of Large Language Models (LLM) has provided new ideas for power prediction, for example by modeling by converting power values into symbolic segments. However, existing LLM-based methods generally rely on only a single feature dimension context, and it is difficult to distinguish the essential distinction of long-term growth trend (e.g., economic development drives load increase) from short-term period fluctuation (e.g., air conditioning load change due to diurnal temperature difference) in power data, limiting the stability of long-term prediction. To alleviate this problem, a retrieval enhancement generation (RAG) mechanism was introduced. The idea is to retrieve similar historical loads or take meteorological scenes as references. However, the existing retrieval method mostly adopts a single similarity measure (such as Euclidean distance), and has the limitations under complex energy data that 1) the feature matching dimension is single, simple numerical similarity cannot describe the Trend (Trend) and