Power short-term load forecasting method based on scene semantic enhancement and related device

CN123018806APending Publication Date: 2026-10-30CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611508032.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0012]本发明的目的在于提供一种基于场景语义增强的电力短期负荷预测方法及相关装置,以解决现有电力短期负荷预测方法由于非结构化场景信息,导致预测误差较大的技术问题

Benefits of technology

本发明一种基于场景语义增强的电力短期负荷预测方法,通过获取历史负荷功率序列、历史及未来气象协变量,并进一步引入用于表征待预测时段所处场景的场景描述文本,将原本单一数值域的时序预测扩展为数值信息与场景语义信息协同参与的预测;利用冻结参数的预训练大语言模型提取场景描述文本中的语义信息,并与负荷及气象数值特征进行跨模态融合,使预测过程能够感知节假日调休、气象灾害预警、重大社会活动等非结构化场景对负荷变化的影响;同时,通过门控系数矩阵自适应调节场景语义信息对数值特征的影响程度,能够在场景扰动较显著时增强语义信息的修正作用,并在场景语义信息增量有限时抑制冗余语义信息的注入,从而提高特殊场景下电力短期负荷预测的稳定性和预测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123018806A_ABST
    Figure CN123018806A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of power load prediction, and discloses a power short-term load prediction method based on scene semantic enhancement and related devices; the method comprises: obtaining a historical load power sequence, historical and future meteorological covariants, and a scene description text of a to-be-predicted period; using a pre-training large language model with frozen parameters to perform semantic coding on the scene description text to obtain a global semantic vector, and performing time series coding and numerical feature fusion on the load and meteorological data; performing feature alignment and cross-attention processing on the global semantic vector and the numerical fusion representation to obtain a semantic-enhanced attention output; generating a gating coefficient matrix according to the numerical fusion representation and the semantic-enhanced attention output and performing fusion to obtain a final numerical fusion representation, and generating a load power prediction sequence according to the final numerical fusion representation. The present application can adaptively fuse unstructured scene semantic information, and improve the stability and precision of power short-term load prediction under special scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power load forecasting, and specifically relates to a method and related apparatus for short-term power load forecasting based on scene semantic enhancement. Background Technology

[0002] Short-term power load forecasting is a core foundation for power grid dispatching plans, electricity spot trading, and the safe and stable operation of the system. Power load is not only directly related to physical environmental factors such as meteorological elements, but is also affected by unphysical and unstructured scenario information such as meteorological disaster warnings, major social events, and policy adjustments. This unstructured scenario information can alter users' habitual electricity consumption behavior, causing load curves to shift during specific periods, thus increasing forecast errors.

[0003] Current research on short-term power load forecasting can be categorized into three types: pure numerical forecasting methods based on deep learning, scene information processing methods based on manual coding, and methods that introduce Large Language Models (LLMs) into time series forecasting. Existing methods have low prediction accuracy in special scenarios, and there is currently a lack of effective solutions for semantically encoding external unstructured scene text using LLMs and achieving cross-modal adaptive fusion with time series numerical features.

[0004] Considering the advantages of deep learning in modeling high-dimensional nonlinear relationships, deep learning methods, such as convolutional neural networks (CNN), long short-term memory networks (LSTM), Transformers, or patch-based time-series forecasting models, are used to achieve short-term power load forecasting.

[0005] The technical solution of existing technology 1: First, historical load data and meteorological covariates (temperature, humidity, wind speed, etc.) are collected, and the input variables are normalized. Then, modeling is performed using architectures such as CNN, LSTM, Transformer, or patch-based time-series forecasting models, and corresponding network structures are designed. Next, historical load sequences and meteorological features are input into the network, and supervised learning is performed using historical load labels. Loss functions such as mean squared error are used to adjust network parameters, gradually improving the network's ability to fit the nonlinear mapping relationship of time-series data. Finally, using the trained network, historical load, historical meteorological data, and meteorological forecast data for the future forecast period are input to achieve the next day's load forecast.

[0006] The inputs of existing technologies are mostly limited to numerical signals of load and weather, lacking the perception and modeling of unstructured scenario information such as holiday work schedule adjustments, meteorological disaster warnings, and major social events. The prediction performance drops significantly under special scenarios such as holidays and extreme weather, and cannot effectively cope with the load shift problem caused by scenario disturbances.

[0007] Technical solution of existing technology 2: To address the issue of load forecasting accuracy being affected by special scenarios such as holidays and social events, manually numerically encoded scenario features are introduced as auxiliary input into the deep learning forecasting framework, specifically in the following form: First, historical load data, meteorological data, and scenario information such as holiday types and social activities are collected, and the input variables are preprocessed. Then, the scenario information is manually quantified: for example, binary encoding is used to distinguish between holidays and workdays; or numerical features are applied to holiday types and the time distance between the current day and holidays; or the holiday process is subdivided into three stages—preparation, duration, and recovery—and assigned different numerical codes; or scenario events are transformed into high-temporal-resolution numerical features by constructing quantitative indicators reflecting population travel patterns. Next, the manually coded features are concatenated with historical load and meteorological numerical features and fed into a deep learning model for training and prediction. Finally, the trained model is used to predict the load for the following day.

[0008] The second existing technology essentially maps discrete scene categories to manually defined encoded values. Its representational ability is limited by the granularity of the predefined categories, and category expansion can easily lead to an expansion of the input dimension. Manual encoding loses the deep semantics carried by natural language, has limited perception of complex scenarios such as holiday adjustments, weather disaster warnings, and social activities, and lacks the ability to generalize to new social events outside the training set. In addition, the simple splicing fusion method has the problem of information dilution, and cannot adaptively adjust the amount of semantic information injected according to the intensity of scene disturbance, resulting in limited improvement in prediction accuracy in special scenarios.

[0009] The technical solution of existing technology three: Research on the application of LLM in time series forecasting mainly presents two paradigms: The first uses LLM as the forecasting entity, such as Time-LLM. This involves mapping time-series numerical sequences to the input distribution space of a language model through reprogramming or other methods, directly utilizing the autoregressive generation capability of LLM to output time-series forecast results. The second paradigm uses LLM to semantically reconstruct time-series numerical information, such as TimeCMA. This uses templates or statistical methods to transform the features of time-series numerical sequences (such as trend, mean, and variance) into natural language descriptions, then uses LLM to achieve modal alignment with the original numerical information in the semantic space to improve the expressive power of time-series features. Finally, it combines with traditional time-series models to complete load forecasting.

[0010] In the three existing technologies, the first type of method uses LLM as a time series regression tool. However, LLM is an autoregressive model pre-trained on discrete text, while time series data is a continuous signal. The inductive bias of the two is fundamentally different, which has a natural disadvantage compared to a specially designed time series prediction model. Although it has certain advantages in zero-shot cross-task transfer capability, the numerical regression accuracy is usually not as good as traditional time series models. The second type of method uses input and numerical sequence as essentially the same source information. In this case, LLM only acts as an alignment tool for the embedding space and does not introduce new information from external scene text. It fails to fully explore the semantic understanding ability of LLM for natural language descriptions such as social events and holidays.

[0011] Therefore, how to effectively utilize scenario information to improve the accuracy of load forecasting in special scenarios is an important problem that urgently needs to be solved. Summary of the Invention

[0012] The purpose of this invention is to provide a method and related apparatus for short-term power load forecasting based on scene semantic enhancement, so as to solve the technical problem that existing short-term power load forecasting methods have large prediction errors due to unstructured scene information.

[0013] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a short-term power load forecasting method based on scene semantic enhancement, comprising: Obtain the historical load power sequence before the period to be predicted, historical meteorological covariates, future meteorological covariates for the period to be predicted, and scene description text used to characterize the scene in which the period to be predicted is located; The scene description text is semantically encoded using a pre-trained large language model with frozen parameters to obtain a global semantic vector; The historical load power sequence, historical meteorological covariates, and future meteorological covariates are subjected to time-series feature encoding and numerical feature fusion to obtain a numerical fusion representation. The global semantic vector is mapped to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation. Cross-attention processing is performed using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output. A gating coefficient matrix is ​​generated based on the numerical fusion representation and the semantically enhanced attention output. The semantically enhanced attention output is then fused to the numerical fusion representation based on the gating coefficient matrix to obtain the final numerical fusion representation. The load power prediction sequence for the period to be predicted is generated based on the final numerical fusion representation.

[0014] A further improvement of the present invention is that the scene description text includes natural language description text organized from at least one dimension, namely, holidays and work schedule adjustments, social activities, and meteorological disaster warnings.

[0015] A further improvement of this invention is that the step of semantically encoding the scene description text using a pre-trained large language model with frozen parameters to obtain a global semantic vector specifically includes: Input the scene description text into the pre-trained large language model and extract the last hidden state of the token sequence corresponding to the scene description text. The last hidden layer state is subjected to mean pooling, and the mean pooling result is then normalized by Z-score and normalized by L2 norm to obtain the global semantic vector.

[0016] A further improvement of the present invention is that when the scene description text of the scene in the time period to be predicted is missing, the all-zero vector is used as the global semantic vector.

[0017] A further improvement of this invention is that, before performing time-series feature encoding on the historical load power sequence, historical meteorological covariates, and future meteorological covariates, it further includes: The historical load power sequence, historical meteorological covariates, and future meteorological covariates are standardized, and periodic time features and lag features are extracted. The periodic time features and lag features are combined with the standardized historical load power sequence, historical meteorological covariates and future meteorological covariates, and the historical observation window before the period to be predicted is spliced ​​with the future interval corresponding to the period to be predicted, using the period to be predicted as the anchor point, to obtain the numerical feature tensor.

[0018] A further improvement of this invention lies in: performing time-series feature encoding on the historical load power sequence, historical meteorological covariates, and future meteorological covariates, including: Reversible instance normalization is used to normalize each feature channel of the numerical feature tensor. After normalization, each feature channel is divided into multiple temporal segments according to a preset window. Linear projection and position encoding are performed on each temporal segment, and the encoded temporal segments are input into the Transformer encoder. A channel-independent strategy is used to extract self-attention features from each feature channel to obtain the temporal feature representation corresponding to each feature channel.

[0019] A further improvement of the present invention is that the numerical feature fusion includes: Based on the time-series feature representations corresponding to each feature channel, load time-series feature representations and meteorological time-series feature representations are obtained. The meteorological time-series feature representations are then subjected to mean pooling to obtain the meteorological fusion feature representation. The load time series feature representation is used as the query and the meteorological fusion feature representation is used as the key and value. Cross-attention processing is performed, and the cross-attention processing result is combined with the load time series feature representation by residual fusion and layer normalization to obtain the numerical fusion representation.

[0020] A further improvement of this invention lies in: mapping the global semantic vector to a feature space of the same dimension as the numerical fusion representation, including: The global semantic vector is projected onto a latent space with the same feature dimension as the numerical fusion representation using a two-layer multilayer perceptron to obtain an aligned semantic representation. The cross-attention processing includes: using each temporal segment representation in the numerical fusion representation as a query, and using the aligned semantic representation as a key and value to perform cross-attention calculation, so as to obtain a semantically enhanced attention output corresponding to each temporal segment representation.

[0021] A further improvement of this invention lies in: generating a gating coefficient matrix based on the numerical fusion representation and the semantically enhanced attention output, including: The numerical fusion representation is concatenated with the semantically enhanced attention output, and the concatenation result is subjected to linear transformation and Sigmoid processing to obtain the gating coefficient matrix; The gating coefficient matrix is ​​multiplied element-wise with the semantically enhanced attention output to obtain the gating semantic representation. The gating semantic representation is then residually fused with the numerical fusion representation, and the residual fusion result is layer-normalized to obtain the final numerical fusion representation.

[0022] A further improvement of this invention is that: generating the load power prediction sequence for the period to be predicted based on the final numerical fusion representation includes: The final numerical fusion representation is flattened, and the flattened final numerical fusion representation is mapped to the prediction output corresponding to the time period to be predicted through a linear prediction layer; The predicted output is subjected to inverse normalization processing corresponding to the reversible instance normalization, and the predicted output is restored to the original power level to obtain the load power prediction sequence.

[0023] A further improvement of this invention is that the short-term power load forecasting method is executed based on a pre-trained semantic-temporal forecasting model, the training of which includes: Obtain historical load power sequences, historical meteorological covariates, future meteorological covariates, scene description text, and actual load power sequences for multiple sample time periods; Keeping the parameters of the pre-trained large language model frozen, the global semantic vector, numerical fusion representation, semantically enhanced attention output, gating coefficient matrix and final numerical fusion representation are generated sequentially based on the data corresponding to each sample time period, and the sample load power prediction sequence is obtained according to the final numerical fusion representation. The model parameters, excluding the pre-trained large language model, are updated based on the difference between the sample load power prediction sequence and the actual load power sequence until the preset training termination condition is met, thus obtaining the semantic-temporal prediction model.

[0024] Secondly, the present invention proposes a short-term power load forecasting device based on scene semantic enhancement, comprising: The data acquisition module is used to acquire historical load power sequences, historical meteorological covariates, future meteorological covariates for the period to be predicted, and scene description text for characterizing the scene in which the period to be predicted is located before the predicted period. The semantic encoding module is used to perform semantic encoding on the scene description text using a pre-trained large language model with frozen parameters to obtain a global semantic vector; The numerical encoding module is used to perform time-series feature encoding and numerical feature fusion on the historical load power sequence, historical meteorological covariates and future meteorological covariates to obtain a numerical fusion representation. A cross-modal fusion output module is used to map the global semantic vector to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation; perform cross-attention processing using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output; generate a gating coefficient matrix based on the numerical fusion representation and the semantically enhanced attention output; fuse the semantically enhanced attention output into the numerical fusion representation based on the gating coefficient matrix to obtain a final numerical fusion representation; and generate a load power prediction sequence for the period to be predicted based on the final numerical fusion representation.

[0025] Thirdly, the present invention proposes an electronic device including a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the aforementioned short-term power load forecasting method based on scene semantic enhancement.

[0026] Fourthly, the present invention proposes a computer-readable storage medium, characterized in that the computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the aforementioned short-term power load forecasting method based on scene semantic enhancement.

[0027] Compared with the prior art, the present invention has the following beneficial effects: This invention presents a short-term power load forecasting method based on scene semantic enhancement. By acquiring historical load power sequences, historical and future meteorological covariates, and further introducing scene description text to characterize the scene in which the forecast period is located, the original time series forecasting based on a single numerical domain is expanded into a forecasting method that collaboratively participates in numerical information and scene semantic information. A pre-trained large language model with frozen parameters is used to extract semantic information from the scene description text and fuse it with load and meteorological numerical features across modalities. This enables the forecasting process to perceive the impact of unstructured scenarios such as holiday work schedule adjustments, meteorological disaster warnings, and major social events on load changes. Simultaneously, by adaptively adjusting the influence of scene semantic information on numerical features through a gating coefficient matrix, the method can enhance the correction effect of semantic information when scene disturbances are significant and suppress the injection of redundant semantic information when the increment of scene semantic information is limited. This improves the stability and accuracy of short-term power load forecasting under special scenarios.

[0028] Furthermore, by setting the scene description text as natural language description text organized from at least one dimension of holidays and work schedules, social activities, and meteorological disaster warnings, this invention can use natural language to represent different types of external scene information, avoiding the semantic information loss caused by simply quantifying scene categories using manual discrete coding. This enhances the prediction method's ability to perceive and represent different special scenes, providing a semantic information basis for subsequently correcting load prediction results based on scene changes.

[0029] Furthermore, by extracting the last hidden state of the token sequence corresponding to the scene description text and performing mean pooling, Z-score standardization, and L2 normalization in sequence, the present invention can compress the semantic information contained in the scene description text into a unified global semantic vector, enabling the natural language information of complex scenes to participate in subsequent cross-modal fusion in the form of high-dimensional semantic features. At the same time, through standardization and normalization processing, the semantic representations obtained from different scene texts have a relatively uniform numerical scale, providing a foundation for the subsequent fusion of semantic features and numerical temporal features.

[0030] Furthermore, this invention uses an all-zero vector as the global semantic vector when the scene description text corresponding to the time period to be predicted is missing. This allows the attention output and gating effect of subsequent semantic enhancement to shrink accordingly when semantic information is missing, thereby suppressing the interference of missing or invalid semantic information on the load prediction process. This enables the prediction to be mainly completed by the numerical branch, achieving a smooth degradation from numerical-semantic co-prediction to pure numerical prediction, and improving the engineering robustness of the prediction framework in the case of missing scene text.

[0031] Furthermore, by standardizing load and meteorological numerical data and introducing periodic time features and lag features, this invention can supplement the original load and meteorological information with the periodic patterns and historical correlation information of load changes. By using the period to be predicted as the anchor point, the invention organizes the historical observation window and the future interval corresponding to the period to be predicted into a numerical feature tensor, so that the historical load and meteorological observation information and the future available meteorological forecast information are input into the prediction model according to a unified time structure, providing complete numerical input for subsequent time series feature extraction and load prediction.

[0032] Furthermore, this invention normalizes each feature channel separately through reversible instance normalization, which can reduce the distribution differences between different input samples on a sample-by-sample basis; by dividing each feature channel into multiple time segments according to a preset window and processing them through linear projection, position encoding and Transformer encoder, it can extract features from time-series information over a longer time range; at the same time, by adopting a channel-independent strategy to perform self-attention modeling on different feature channels, it is beneficial to extract the time-series variation features of each numerical variable separately, providing an effective time-series representation for the subsequent fusion of load and meteorological features.

[0033] Furthermore, this invention obtains load time-series feature representations and meteorological time-series feature representations separately, and performs mean pooling on the meteorological time-series feature representations to form fused features for characterizing meteorological conditions. It further performs cross-attention processing using the load time-series feature representation as the query and the meteorological fused feature representation as the key and value, enabling the association and fusion of meteorological information with the load time-series state. Numerical fusion representations are obtained through residual fusion and layer normalization, thereby comprehensively utilizing the load's own variation patterns and the influence of meteorological conditions on the load, providing a more complete numerical feature foundation for subsequent scene semantic enhancement.

[0034] Furthermore, this invention projects the global semantic vector onto a latent space with the same feature dimension as the numerical fusion representation using a two-layer multilayer perceptron, thereby aligning semantic features and numerical temporal features in the feature space. It further performs cross-attention calculation using the temporal segment representation in the numerical fusion representation as the query and the aligned semantic representation as the key and value, enabling the scene semantic information to establish a connection with the corresponding temporal state, resulting in semantically enhanced attention output. This provides a foundation for using external scene semantic information to correct numerical temporal features.

[0035] Furthermore, this invention concatenates the numerical fusion representation with the semantically enhanced attention output, and generates a gating coefficient matrix through linear transformation and sigmoid processing. This allows the degree of semantic information injection to be determined jointly based on numerical temporal features and scene semantic features. By multiplying the gating coefficient matrix element-wise with the semantically enhanced attention output, the degree of semantic influence at different feature locations can be controlled. This enhances the role of semantic information when scene disturbances are significant, and adaptively reduces the injection of semantic information in ordinary scenes or when the increment of semantic information is limited. Furthermore, by combining residual fusion and layer normalization, it is beneficial to introduce effective scene semantic information while retaining the original numerical temporal information, thereby reducing the impact of redundant semantic noise on load prediction.

[0036] Furthermore, by flattening the final numerical fusion representation and mapping it to the prediction output corresponding to the time period to be predicted using a linear prediction layer, this invention can convert the hidden layer representation after the fusion of numerical features and scene semantic features into load prediction results. Furthermore, by employing inverse normalization processing corresponding to the aforementioned reversible instance normalization, the prediction results are restored to the original load power level, so that the model output can directly correspond to the actual power load power, thereby completing the prediction mapping from the normalized feature space to the actual load power sequence. Attached Figure Description

[0037] The accompanying drawings, which form part of this specification, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the overall framework of the semantic-temporal-aware network ST-SentNet model of the present invention; Figure 2 The following is a comparison of the prediction curves of each model under typical special disturbance scenarios; (a) is the Spring Festival scenario; (b) is the Qingming Festival scenario; (c) is the Labor Day scenario; (d) is the overlapping scenario of Dragon Boat Festival / Children's Day / International Animation Festival; (e) is the work-off scenario on a day off; (f) is the typhoon scenario; (g) is the high temperature warning scenario; (h) is the Lantern Festival scenario; (i) is the Global Cross-border E-commerce Trade Fair scenario. Figure 3 Distribution of semantic injection intensity under different scene types; Figure 4 This is a flowchart illustrating a short-term power load forecasting method based on scene semantic enhancement, according to an embodiment of the present invention. Figure 5 This is a schematic diagram of the structure of a short-term power load forecasting device based on scene semantic enhancement according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0038] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0039] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this invention is for describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.

[0040] Definitions of abbreviations and key terms: Semantic-Temporal Sentience Network (ST-SentNet) is a two-branch deep learning network that integrates scene semantic encoding and temporal numerical prediction.

[0041] Scene description text: This invention refers to natural language description text organized from three dimensions: holidays and work schedule adjustments, social activities, and meteorological disaster warnings, used to characterize the social scene information of the predicted day.

[0042] Special scenarios: This invention refers to scenarios such as holiday work schedule adjustments, meteorological disaster warnings, and major social events that cause the load curve to deviate from the normal pattern, in contrast to ordinary working days.

[0043] To address the shortcomings of the first technique, this invention designs a dual-branch architecture with semantic and numerical branches. The scene description text Γ is introduced into the prediction framework as an independent exogenous modality. Through semantic encoding and cross-modal gating fusion mechanism, the model is endowed with the ability to perceive and model unstructured scene information such as holiday work schedule adjustments, meteorological disaster warnings, and major social events, thus making up for the lack of perception of special scenes by pure numerical models.

[0044] To address the shortcomings of technique two, this invention replaces manual coding with a pre-trained LLM with frozen parameters, compressing the natural language description of complex social events into a high-dimensional global semantic vector with a metric structure. This overcomes the limitations of manual coding in terms of representation capabilities and the inability to capture deep semantics, achieving effective implicit representation of complex social scenarios while ensuring generalization ability for scenarios not seen outside the training set.

[0045] To address the shortcomings of existing technology three, this invention positions the frozen parameter LLM as a semantic encoding tool for external scene text rather than a prediction subject, introducing new information truly from the external scene text; through a gated cross-attention fusion mechanism, it adaptively adjusts the amount of semantic injection based on the intensity of scene disturbance, suppressing redundant noise on ordinary days and increasing semantic correction in special scenarios; when text is missing, the model smoothly degenerates into pure numerical prediction, ensuring engineering reliability.

[0046] Assume the load power sequence of the power system on the discrete time axis with a sampling interval of 15 minutes is as follows: A total of 96 sampling points are used daily. The core task of short-term load forecasting is to quantitatively estimate the power system load demand for a future forecast period based on historical observation information and available future forecast information. Historical observation information includes historical load power sequences. and historical meteorological covariate matrix Future forecast information includes the future weather covariate matrix corresponding to the forecast period. The invention incorporates the scenario description text Γ for the prediction period into the prediction framework to represent scenario information such as holiday work schedule adjustments, meteorological disaster warnings, and social activities. This expands the prediction problem from a single numerical domain time-series regression to a numerical-semantic cross-modal collaborative prediction problem. Essentially, it remains a time-series regression problem mapping historical multi-dimensional input information to future load power sequences, falling under the category of supervised learning. The object of this invention is day-ahead short-term power load forecasting, specifically predicting the load power sequence for 96 15-minute time steps the following day.

[0047] This invention proposes a short-term power load forecasting method based on scene semantic enhancement, specifically a scene semantic enhancement power load forecasting method based on the semantic-temporal-aware network ST-SentNet, which includes: A dual-branch architecture is constructed to process scene description text and time-series numerical information respectively. Specifically, the dual-branch architecture includes a semantic encoding branch and a numerical encoding branch. The semantic encoding branch takes the predicted daily scene description text Γ as input and extracts the last hidden state of the token sequence using a pre-trained LLM with frozen parameters (an open-source LLM from Huggingface, which can be downloaded directly without self-training). Then, through mean pooling, Z-score normalization, and L2 normalization, the global semantic vector is obtained. The calculation process is shown in equation (1): (1) In the formula: This indicates Z-score standardization; Indicates L2 normalization; The number of token sequences; h t s is the hidden state vector of the last layer of the t-th token sequence. When the predicted daily scene description text Γ is missing, s is replaced with an all-zero vector to ensure the engineering robustness of the framework.

[0048] Numerical coding branches use numerical feature tensors The input consists of a reversible instance normalization (RevIN) layer, a patch-transformer encoder, and a numerical fusion layer, concatenated together. First, RevIN eliminates distribution differences sample-by-sample, performing normalization independently for each feature channel. Second, each feature channel is segmented into a patch sequence according to a fixed window, and after linear projection and sinusoidal position encoding, it is fed into the Transformer encoder. A channel-independent (CI) strategy is used for multi-layer self-attention modeling. Finally, the vector is represented by the load patch. For query, meteorological mean pooling representation vector Using key-value pairs, load and meteorological characteristics are fused through cross-attention. The resulting numerical fusion representation is then processed via residual connections and layer normalization (LN). The calculation process is shown in equations (2)-(3): (2) (3) In the formula: , , There are three sets of learnable linear projection weight matrices; The vector is represented by the load patch. through The mapped load query features are used to characterize the retrieval needs of each load patch for relevant meteorological information; This represents a vector obtained by pooling the meteorological mean. through The obtained meteorological key features are used to map and... Calculate the correlation weights between load characteristics and meteorological characteristics; This represents a vector obtained by pooling the meteorological mean. through The mapped meteorological value features are used to provide corresponding meteorological feature information to the load representation according to the correlation weights; For layer normalization; It is the softmax activation function; This is a scaling factor used to suppress softmax gradient saturation caused by excessively large dot product values ​​in high-dimensional space, thus ensuring numerical stability during training.

[0049] The cross-modal fusion output module uses global semantic vectors Numerical Fusion Representation As input, first, the global semantic vector is... Projected onto the numerical fusion representation via two layers of multilayer perceptron (MLP) A consistent D-dimensional latent space yields aligned semantic representations. Secondly, numerical fusion representation. Each Patch in the table represents a query, with... For keys and values, cross-attention computation is performed, enabling each patch location to adaptively retrieve relevant information from the scene semantics of the day based on its own temporal state, resulting in semantically enhanced attention output. The calculation process is shown in equations (4)-(5): (4) (5) In the formula: This indicates a two-layer MLP computation; It is the softmax activation function; , , There are three sets of learnable linear projection weight matrices; The scaling factor is used. However, the degree of scene perturbation varies significantly across different dates: in special scenarios such as holidays and extreme weather, semantic information has a greater corrective effect on the load curve; while on ordinary workdays, the information increment of the scene text is limited, and directly superimposing the attention output onto the temporal representation risks introducing redundant semantic noise. Therefore, numerical fusion representation is used. Attention output with semantic enhancement The concatenation of the input gating coefficient matrix is ​​used as the input design gating coefficient matrix. The influence of semantic information on the representation of each patch is controlled element by element. Semantic injection is increased when scene perturbations are significant, and adaptively shrunk during normal days. Finally, the representation is fused with numerical values ​​in the form of residuals. The resulting numerical fusion representation is obtained by fusing and normalizing the layers. The specific calculation process is shown in equations (6)-(7): (6) (7) In the formula: For the Sigmoid function; The weight matrix is ​​a linear transformation matrix; For bias terms; Representation layer normalization. When the predicted Japanese text is missing and the semantic vector degenerates to all zeros, the aligned semantic representation... Attention output that approaches a zero vector and enhances semantics. and gating coefficient matrix Synchronous contraction suppresses the injection of semantic information, and the model's prediction performance is primarily guaranteed by the numerical branches. Finally, the final numerical representation is fused. After flattening, it is mapped to a linear prediction head. Dimensional output. Among them, This represents the prediction step size corresponding to the period to be predicted, i.e., the number of load power sampling points that need to be output within the period to be predicted. It is determined by the duration of the period to be predicted and the sampling interval of the load data. Subsequently, the prediction output is subjected to inverse normalization processing corresponding to Reversible Instance Normalization RevIN, restoring the prediction output to the original power level to obtain the short-term load prediction result. The calculation process is shown in Equation (8): (8) In the formula: For flattening operation; It is a linear mapping layer; and These are the scaling factor matrix and bias term matrix learned during the RevIN process; and It is a matrix of mean and standard deviation calculated from the historical observation window; This is the numerically stable term. In summary, the overall model framework is as follows: Figure 1 As shown.

[0050] Taking the actual load data of a region in the Yangtze River Delta of my country from January 2024 to July 2025 as the research object, the Qwen2.5-1.5B model was selected as the pre-trained LLM with frozen parameters for scene semantic encoding. An ST-SentNet prediction network was constructed, consisting of semantic encoding branches, numerical encoding branches, a load-meteorological cross-attention numerical fusion layer, a semantic-numerical gated cross-attention fusion layer, and a linear prediction head, to model short-term power load forecasting. The overall training process is as follows: 1) Input the daily scene description text into the LLM with frozen parameters, extract the hidden state, and then perform mean pooling, Z-score normalization, and L2 normalization to obtain the daily global semantic vector. s Build a local offline semantic feature library.

[0051] 2) Read the raw load and meteorological data, and perform Z-score standardization on all numerical features according to the training set statistics; extract 4-dimensional periodic time features and 2-dimensional lag features, and concatenate them with the standardized raw features; using the prediction date as the anchor point, backtrack 7 days to construct a historical observation window of 672 time steps, and then concatenate it with a future interval of 96 time steps to form a complete numerical input tensor. X Historical load power sequences, historical meteorological covariates, and future meteorological covariates corresponding to the forecast period are read and Z-score standardized according to the training set statistics. Using the forecast date as the anchor point, 672 15-minute time steps corresponding to the 7 days prior to the forecast date are selected as the historical observation window, and 96 15-minute time steps corresponding to the forecast date are selected as the future interval. The historical observation window and the future interval are concatenated in chronological order to obtain the complete numerical input tensor. X In this process, the load characteristics in the future interval are masked, retaining only the future meteorological covariates that can be obtained during forecasting, in order to avoid leakage of future load information.

[0052] 3) Input numerical values ​​into a tensor X After being fed into RevIN for normalization, the timing representation of each channel is extracted using the Patch-Transformer encoder. The load and meteorological characteristics are then fused using equations (2)-(3) to obtain the numerical fusion representation. .

[0053] 4) For global semantic vectors s Numerical Fusion Representation By fusing equations (4) and (5), we obtain semantically enhanced attention output. The gating coefficient and normalized prediction output are further calculated using equations (6)-(7). Finally, the short-term load prediction result is obtained using equation (8).

[0054] 5) The training set was divided into two periods: January 2024 to December 2024, and the test set was divided into two periods: January 2025 to July 2025. Hyperparticipant training epochs were set, and the Adam optimization algorithm was used to update the network weights and parameters of each module of ST-SentNet. The pre-trained LLM, used as the scene semantic feature extractor for the semantic coding branch, uses open-source parameter weights and does not require independent training. The parameters that need to be trained according to the load prediction task include the model parameters of the Patch-Transformer numerical encoder, the load-meteorological numerical fusion layer, the semantic-numerical cross-modal fusion layer, the gating layer, and the linear prediction head.

[0055] 6) When the loss function gradually converges and no longer optimizes after several consecutive rounds, save the network weights and parameters mentioned in step 5 to obtain the trained ST-SentNet prediction model. During the testing phase, input the test set samples into the trained ST-SentNet model to obtain the load prediction results.

[0056] To comprehensively evaluate the prediction performance of the proposed ST-SentNet model, four benchmark models—CNN-LSTM, Temporal Convolutional Network (TCN), Transformer, and PatchTST—were selected for comparative experiments. The overall prediction performance of each model on the test set is shown in Table 1.

[0057] Table 1 Comparison of overall prediction performance of each model

[0058] As shown in Table 1, ST-SentNet achieves the best results across all four evaluation metrics: Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Coefficient of Determination (R-squared, R²). Since ordinary daily samples constitute the majority of the test set, the overall evaluation metrics shown in Table 1 may, to some extent, mask the true differences between the models in specific scenarios. Therefore, we separately analyze the evaluation metrics for each model in specific scenarios within the test set samples, as shown in Table 2.

[0059] Table 2 Comparison of overall prediction performance of each model in special scenarios

[0060] As shown in Table 2, the evaluation metrics of each benchmark model on the subset of special scenarios all showed varying degrees of improvement compared to the overall prediction results shown in Table 1, quantitatively demonstrating the predictive advantage of ST-SentNet in special scenarios. To further analyze the prediction performance of each model under different types of special scenarios, this invention selected several representative days from three typical scenarios: holiday work adjustments, meteorological disaster warnings, and major social events. The hourly prediction curves of each model were compared with the actual load curves, covering a total of nine typical operating scenarios. The comparison results of the prediction curves are shown below. Figure 2 As shown, ST-SentNet outperforms the comparison models in curve matching under various typical scenarios such as holidays, extreme weather, and major social events.

[0061] To further reveal the adaptability of the gating fusion mechanism, the mean distribution of actual semantic injection intensity under different scene types in the test set was statistically analyzed. The results are as follows: Figure 3 As shown.

[0062] Depend on Figure 3 It can be seen that the average semantic injection intensity is highest in holiday scenarios, followed by social activities and weekends, and close to zero on weekdays. The intensity is slightly lower than the average on weekdays in meteorological disaster warning scenarios. This distribution pattern indicates that the gating mechanism can adaptively adjust the amount of semantic information injected based on the intensity of scenario disturbances. It provides greater semantic correction in holiday and social activity scenarios where the load curve shape deviates significantly from the norm, while automatically contracting on ordinary weekdays when historical numerical signals already have sufficient predictive power, effectively avoiding the introduction of redundant semantic noise. The average semantic injection intensity of the meteorological disaster warning subset is close to zero. The reason for this is that the meteorological dimension is recorded in the form of short labels such as high-temperature warnings and cold wave warnings. The textual content overlaps to some extent with the meteorological covariates input to the numerical branch, thus limiting the overall marginal contribution of the semantic branch. However, from... Figure 3 The scatter distribution shows that a small number of samples in the meteorological disaster early warning subset still have injection intensities significantly deviating from zero, indicating that semantic information still has some incremental value in some early warning scenarios and is not completely redundant. The overall contraction of semantic injection intensity in this subset demonstrates that the adaptive gating mechanism in the proposed architecture can automatically suppress the injection of redundant information without manual intervention, indirectly verifying the robustness of the proposed gating mechanism to the information overlap problem. In summary, both the semantic branch and the gating mechanism play a crucial role in improving the prediction accuracy of the model in this invention.

[0063] This invention proposes a short-term power load forecasting method based on scene semantic enhancement. It constructs a semantic-numerical dual-branch collaborative forecasting architecture to achieve adaptive perception and modeling of complex scenarios such as holiday work schedule adjustments, meteorological disaster warnings, and major social events. Unlike traditional forecasting methods that rely solely on historical load and meteorological numerical features, this invention, for the first time, uses a large language model with frozen parameters as a scene semantic encoder, introducing natural language scene text as an independent exogenous modality. A gated cross-attention mechanism is used to dynamically fuse semantic information and temporal features, automatically adjusting the semantic injection amount according to the intensity of scene disturbances. It suppresses redundant noise on ordinary workdays and enhances semantic correction capabilities in special scenarios. Experimental results show that this invention outperforms mainstream models such as CNN-LSTM, Transformer, and PatchTST in terms of RMSE, MAE, and MAPE, especially showing significant improvement in prediction accuracy in special scenarios such as holidays and extreme weather, demonstrating strong generalization ability and engineering application value.

[0064] This invention can be widely applied to scenarios such as power grid dispatching and operation, electricity spot market trading, virtual power plant collaborative control, and renewable energy consumption optimization, providing high-precision day-ahead load forecasting support for the operation of new power systems. With the increasing proportion of renewable energy integration and the growing complexity of user-side load behavior, the impact of unstructured scenarios such as holidays, extreme weather, and social activities on load fluctuations continues to strengthen, making it difficult for traditional forecasting methods to meet high-precision requirements. This invention, by introducing scenario semantic modeling capabilities, can significantly improve the forecasting stability and reliability under special scenarios, and is suitable for deployment and promotion in provincial power grids, regional power grids, and city-level load forecasting platforms. Simultaneously, this method is compatible with existing time-series forecasting systems and can be quickly integrated with dispatching cloud platforms, load management systems, and virtual power plant platforms. In the future, it can be further expanded to renewable energy power forecasting, electricity market price forecasting, and source-load collaborative optimization, possessing broad application potential and industrialization prospects.

[0065] This invention is based on a dual-branch architecture. The semantic branch uses a pre-trained LLM with frozen parameters as a semantic encoder to map the descriptive text of scenarios such as holiday work adjustments, meteorological disaster warnings, and major social events into a high-dimensional global semantic vector, which is then introduced into the load forecasting framework as an independent exogenous modality. The numerical branch combines RevIN, Patch-Transformer encoding, and load-meteorological cross-attention to extract temporal features. Through a gated cross-attention mechanism, the scene semantics and temporal features are dynamically fused. When the text is missing, it degenerates into pure numerical prediction, ultimately achieving day-ahead short-term power load forecasting, and further improving the prediction accuracy in special scenarios such as holiday work adjustments and meteorological disaster warnings.

[0066] Please see Figure 4 As shown, this invention provides a short-term power load forecasting method based on scene semantic enhancement, comprising: S1. Obtain the historical load power sequence before the period to be predicted, historical meteorological covariates, future meteorological covariates of the period to be predicted, and scene description text used to characterize the scene in which the period to be predicted is located; S2. Use a pre-trained large language model with frozen parameters to perform semantic encoding on the scene description text to obtain a global semantic vector; S3. Perform time-series feature encoding and numerical feature fusion on the historical load power sequence, historical meteorological covariates and future meteorological covariates to obtain a numerical fusion representation; S4. Map the global semantic vector to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation; perform cross-attention processing using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output; generate a gating coefficient matrix based on the numerical fusion representation and the semantically enhanced attention output; fuse the semantically enhanced attention output into the numerical fusion representation based on the gating coefficient matrix to obtain the final numerical fusion representation; generate the load power prediction sequence for the period to be predicted based on the final numerical fusion representation.

[0067] In one specific implementation, the scenario description text includes natural language description text organized from at least one dimension, such as holidays and work schedule adjustments, social activities, and meteorological disaster warnings.

[0068] In one specific implementation, the step of semantically encoding the scene description text using a pre-trained large language model with frozen parameters to obtain a global semantic vector specifically includes: Input the scene description text into the pre-trained large language model and extract the last hidden state of the token sequence corresponding to the scene description text. The last hidden layer state is subjected to mean pooling, and the mean pooling result is then normalized by Z-score and normalized by L2 norm to obtain the global semantic vector.

[0069] In one specific implementation, when the scene description text of the scene in the period to be predicted is missing, an all-zero vector is used as the global semantic vector.

[0070] In one specific implementation, before performing time-series feature encoding on the historical load power sequence, historical meteorological covariates, and future meteorological covariates, the method further includes: The historical load power sequence, historical meteorological covariates, and future meteorological covariates are standardized, and periodic time features and lag features are extracted. The periodic time features and lag features are combined with the standardized historical load power sequence, historical meteorological covariates and future meteorological covariates, and the historical observation window before the period to be predicted is spliced ​​with the future interval corresponding to the period to be predicted, using the period to be predicted as the anchor point, to obtain the numerical feature tensor.

[0071] In one specific implementation, time-series feature encoding is performed on the historical load power sequence, historical meteorological covariates, and future meteorological covariates, including: Reversible instance normalization is used to normalize each feature channel of the numerical feature tensor. After normalization, each feature channel is divided into multiple temporal segments according to a preset window. Linear projection and position encoding are performed on each temporal segment, and the encoded temporal segments are input into the Transformer encoder. A channel-independent strategy is used to extract self-attention features from each feature channel to obtain the temporal feature representation corresponding to each feature channel.

[0072] In one specific embodiment, the numerical feature fusion includes: Based on the time-series feature representations corresponding to each feature channel, load time-series feature representations and meteorological time-series feature representations are obtained. The meteorological time-series feature representations are then subjected to mean pooling to obtain the meteorological fusion feature representation. The load time series feature representation is used as the query and the meteorological fusion feature representation is used as the key and value. Cross-attention processing is performed, and the cross-attention processing result is combined with the load time series feature representation by residual fusion and layer normalization to obtain the numerical fusion representation.

[0073] In one specific implementation, mapping the global semantic vector to a feature space of the same dimension as the numerical fusion representation includes: The global semantic vector is projected onto a latent space with the same feature dimension as the numerical fusion representation using a two-layer multilayer perceptron to obtain an aligned semantic representation. The cross-attention processing includes: using each temporal segment representation in the numerical fusion representation as a query, and using the aligned semantic representation as a key and value to perform cross-attention calculation, so as to obtain a semantically enhanced attention output corresponding to each temporal segment representation.

[0074] In one specific implementation, generating a gating coefficient matrix based on the numerical fusion representation and the semantically enhanced attention output includes: The numerical fusion representation is concatenated with the semantically enhanced attention output, and the concatenation result is subjected to linear transformation and Sigmoid processing to obtain the gating coefficient matrix; The gating coefficient matrix is ​​multiplied element-wise with the semantically enhanced attention output to obtain the gating semantic representation. The gating semantic representation is then residually fused with the numerical fusion representation, and the residual fusion result is layer-normalized to obtain the final numerical fusion representation.

[0075] In one specific implementation, generating the load power prediction sequence for the period to be predicted based on the final numerical fusion representation includes: The final numerical fusion representation is flattened, and the flattened final numerical fusion representation is mapped to the prediction output corresponding to the time period to be predicted through a linear prediction layer; The predicted output is subjected to inverse normalization processing corresponding to the reversible instance normalization, and the predicted output is restored to the original power level to obtain the load power prediction sequence.

[0076] Please see Figure 5 As shown, this embodiment of the invention provides a short-term power load forecasting device based on scene semantic enhancement, comprising: The data acquisition module is used to acquire historical load power sequences, historical meteorological covariates, future meteorological covariates for the period to be predicted, and scene description text for characterizing the scene in which the period to be predicted is located before the predicted period. The semantic encoding module is used to perform semantic encoding on the scene description text using a pre-trained large language model with frozen parameters to obtain a global semantic vector; The numerical encoding module is used to perform time-series feature encoding and numerical feature fusion on the historical load power sequence, historical meteorological covariates and future meteorological covariates to obtain a numerical fusion representation. A cross-modal fusion output module is used to map the global semantic vector to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation; perform cross-attention processing using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output; generate a gating coefficient matrix based on the numerical fusion representation and the semantically enhanced attention output; fuse the semantically enhanced attention output into the numerical fusion representation based on the gating coefficient matrix to obtain a final numerical fusion representation; and generate a load power prediction sequence for the period to be predicted based on the final numerical fusion representation.

[0077] Please see Figure 6 As shown, this embodiment of the invention provides an electronic device 100 for implementing a short-term power load forecasting method based on scene semantic enhancement; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0078] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the short-term power load forecasting method based on scene semantic enhancement described in the embodiment by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0079] The at least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.

[0080] The memory 101 in the electronic device 100 stores multiple instructions to implement a short-term power load forecasting method based on scene semantic enhancement, and the processor 102 can execute the multiple instructions to achieve the following: Obtain the historical load power sequence before the period to be predicted, historical meteorological covariates, future meteorological covariates for the period to be predicted, and scene description text used to characterize the scene in which the period to be predicted is located; The scene description text is semantically encoded using a pre-trained large language model with frozen parameters to obtain a global semantic vector; The historical load power sequence, historical meteorological covariates, and future meteorological covariates are subjected to time-series feature encoding and numerical feature fusion to obtain a numerical fusion representation. The global semantic vector is mapped to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation. Cross-attention processing is performed using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output. A gating coefficient matrix is ​​generated based on the numerical fusion representation and the semantically enhanced attention output. The semantically enhanced attention output is then fused to the numerical fusion representation based on the gating coefficient matrix to obtain the final numerical fusion representation. The load power prediction sequence for the period to be predicted is generated based on the final numerical fusion representation.

[0081] If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0082] Those skilled in the art will understand that 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. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0083] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0084] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0085] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0086] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A short-term power load forecasting method based on scene semantic enhancement, characterized in that, include: Obtain the historical load power sequence before the period to be predicted, historical meteorological covariates, future meteorological covariates for the period to be predicted, and scene description text used to characterize the scene in which the period to be predicted is located; The scene description text is semantically encoded using a pre-trained large language model with frozen parameters to obtain a global semantic vector; The historical load power sequence, historical meteorological covariates, and future meteorological covariates are subjected to time-series feature encoding and numerical feature fusion to obtain a numerical fusion representation. The global semantic vector is mapped to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation; cross-attention processing is performed using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output; A gating coefficient matrix is ​​generated based on the numerical fusion representation and the semantically enhanced attention output. The semantically enhanced attention output is then fused into the numerical fusion representation based on the gating coefficient matrix to obtain the final numerical fusion representation. The load power prediction sequence for the period to be predicted is generated based on the final numerical fusion representation.

2. The short-term power load forecasting method based on scene semantic enhancement according to claim 1, characterized in that, The scenario description text includes natural language description text organized from at least one dimension, such as holidays and work schedule adjustments, social activities, and meteorological disaster early warning.

3. The short-term power load forecasting method based on scene semantic enhancement according to claim 1, characterized in that, The step of semantically encoding the scene description text using a pre-trained large language model with frozen parameters to obtain a global semantic vector specifically includes: Input the scene description text into the pre-trained large language model and extract the last hidden state of the token sequence corresponding to the scene description text. The last hidden layer state is subjected to mean pooling, and the mean pooling result is then normalized by Z-score and normalized by L2 norm to obtain the global semantic vector.

4. The short-term power load forecasting method based on scene semantic enhancement according to claim 3, characterized in that, When the scene description text of the scene in the period to be predicted is missing, the all-zero vector is used as the global semantic vector.

5. The short-term power load forecasting method based on scene semantic enhancement according to claim 1, characterized in that, Before performing time-series feature encoding on the historical load power series, historical meteorological covariates, and future meteorological covariates, the following steps are also included: The historical load power sequence, historical meteorological covariates, and future meteorological covariates are standardized, and periodic time features and lag features are extracted. The periodic time features and lag features are combined with the standardized historical load power sequence, historical meteorological covariates and future meteorological covariates, and the historical observation window before the period to be predicted is spliced ​​with the future interval corresponding to the period to be predicted, using the period to be predicted as the anchor point, to obtain the numerical feature tensor.

6. The short-term power load forecasting method based on scene semantic enhancement according to claim 5, characterized in that, The historical load power sequence, historical meteorological covariates, and future meteorological covariates are encoded using time-series features, including: Reversible instance normalization is used to normalize each feature channel of the numerical feature tensor. After normalization, each feature channel is divided into multiple temporal segments according to a preset window. Linear projection and position encoding are performed on each temporal segment, and the encoded temporal segments are input into the Transformer encoder. A channel-independent strategy is used to extract self-attention features from each feature channel to obtain the temporal feature representation corresponding to each feature channel.

7. The short-term power load forecasting method based on scene semantic enhancement according to claim 6, characterized in that, The numerical feature fusion includes: Based on the time-series feature representations corresponding to each feature channel, load time-series feature representations and meteorological time-series feature representations are obtained. The meteorological time-series feature representations are then subjected to mean pooling to obtain the meteorological fusion feature representation. The load time series feature representation is used as the query and the meteorological fusion feature representation is used as the key and value. Cross-attention processing is performed, and the cross-attention processing result is combined with the load time series feature representation by residual fusion and layer normalization to obtain the numerical fusion representation.

8. The short-term power load forecasting method based on scene semantic enhancement according to claim 1, characterized in that, Mapping the global semantic vector to a feature space of the same dimension as the numerical fusion representation includes: The global semantic vector is projected onto a latent space with the same feature dimension as the numerical fusion representation using a two-layer multilayer perceptron to obtain an aligned semantic representation. The cross-attention processing includes: using each temporal segment representation in the numerical fusion representation as a query, and using the aligned semantic representation as a key and value to perform cross-attention calculation, so as to obtain a semantically enhanced attention output corresponding to each temporal segment representation.

9. The short-term power load forecasting method based on scene semantic enhancement according to claim 8, characterized in that, A gating coefficient matrix is ​​generated based on the numerical fusion representation and the semantically enhanced attention output, including: The numerical fusion representation is concatenated with the semantically enhanced attention output, and the concatenation result is subjected to linear transformation and Sigmoid processing to obtain the gating coefficient matrix; The gating coefficient matrix is ​​multiplied element-wise with the semantically enhanced attention output to obtain the gating semantic representation. The gating semantic representation is then residually fused with the numerical fusion representation, and the residual fusion result is layer-normalized to obtain the final numerical fusion representation.

10. The short-term power load forecasting method based on scene semantic enhancement according to claim 6, characterized in that, The load power prediction sequence for the period to be predicted is generated based on the final numerical fusion representation, including: The final numerical fusion representation is flattened, and the flattened final numerical fusion representation is mapped to the prediction output corresponding to the time period to be predicted through a linear prediction layer; The predicted output is subjected to inverse normalization processing corresponding to the reversible instance normalization, and the predicted output is restored to the original power level to obtain the load power prediction sequence.

11. A short-term power load forecasting device based on scene semantic enhancement, characterized in that, include: The data acquisition module is used to acquire historical load power sequences, historical meteorological covariates, future meteorological covariates for the period to be predicted, and scene description text for characterizing the scene in which the period to be predicted is located before the predicted period. The semantic encoding module is used to perform semantic encoding on the scene description text using a pre-trained large language model with frozen parameters to obtain a global semantic vector; The numerical encoding module is used to perform time-series feature encoding and numerical feature fusion on the historical load power sequence, historical meteorological covariates and future meteorological covariates to obtain a numerical fusion representation. The cross-modal fusion output module is used to map the global semantic vector to a feature space of the same dimension as the numerical fusion representation to obtain an aligned semantic representation; and to perform cross-attention processing using the numerical fusion representation as the query and the aligned semantic representation as the key and value to obtain a semantically enhanced attention output. A gating coefficient matrix is ​​generated based on the numerical fusion representation and the semantically enhanced attention output. The semantically enhanced attention output is then fused into the numerical fusion representation based on the gating coefficient matrix to obtain the final numerical fusion representation. The load power prediction sequence for the period to be predicted is generated based on the final numerical fusion representation.

12. An electronic device, characterized in that, It includes a processor and a memory, the processor being used to execute a computer program stored in the memory to implement the short-term power load forecasting method based on scenario semantic enhancement as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the short-term power load forecasting method based on scenario semantic enhancement as described in any one of claims 1 to 10.