Load prediction method and device, electronic equipment and storage medium
By constructing a hybrid architecture that allows two models to work together, and by using temporal neural networks and autoregressive language models to fuse structured and unstructured data, the problems of low load forecasting accuracy and poor interpretability are solved, thereby improving accuracy and quantifying risk, and supporting grid dispatching and electricity market transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUODIAN SCI & TECH RES INST
- Filing Date
- 2026-03-23
- Publication Date
- 2026-07-14
Smart Images

Figure CN122393901A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system load forecasting technology, and in particular to a load forecasting method, apparatus, electronic device and storage medium. Background Technology
[0002] With the accelerated global energy structure transformation and the in-depth advancement of my country's "dual carbon" goals, renewable energy sources, represented by wind power and photovoltaics, are being connected to the grid on a large scale. New elements such as electric vehicles, distributed power sources, virtual power plants, flexible loads, and energy storage devices are constantly being integrated into the power system, resulting in significant randomness, volatility, interactivity, and spatiotemporal coupling in grid load characteristics. Load forecasting, as a core upstream link in smart grid dispatching and electricity market transactions, directly affects the safe and stable operation of the grid, the efficiency of renewable energy absorption, the economics of electricity market transactions, and the control of grid operating costs.
[0003] In related technologies, existing solutions employ deep learning models for load forecasting. For example, time-series neural network models such as LSTM (Long Short-Term Memory) and Transformer (a deep neural network model based on self-attention mechanism) are trained using structured data such as historical load data and meteorological data to achieve numerical prediction of future loads.
[0004] However, this method can only process structured numerical data and is difficult to effectively integrate unstructured information such as power market policy texts and emergency notifications, resulting in limited prediction accuracy in complex scenarios. At the same time, the single model lacks causal reasoning ability and cannot perform attribution analysis on prediction deviations, resulting in poor interpretability of prediction results. In addition, this method cannot quantify the uncertainty of prediction results, making it difficult to support the risk management needs of power grid dispatching decisions, which urgently needs to be addressed. Summary of the Invention
[0005] This application provides a load forecasting method, apparatus, electronic device, and storage medium to solve the problems of low load forecasting accuracy, poor interpretability, and inability to quantify forecasting risks in related technologies, thereby achieving the technical effects of improved load forecasting accuracy, interpretable forecasting results, and quantifiable forecasting risks.
[0006] To achieve the above objectives, a first aspect of this application proposes a load forecasting method, comprising the following steps: Acquire the current multi-source heterogeneous data of the power system, and preprocess the current multi-source heterogeneous data to obtain a structured dataset and an unstructured text dataset; Based on the structured dataset, a first prediction result set is generated using a first preset prediction model, wherein the first preset prediction model is a time-series neural network model trained with historical multi-source heterogeneous data, used to capture the time-series dependencies of the load data. Based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using a second preset prediction model. The second preset prediction model is an autoregressive language model trained on a corpus specifically for the power industry, used for semantic understanding and causal reasoning of unstructured text data. Based on the first prediction result set and the second prediction result set, the final load prediction result is generated.
[0007] According to one embodiment of this application, generating the final load forecast result based on the first forecast result set and the second forecast result set includes: Based on the attention mechanism, the load prediction values in the first prediction result set are used as the query vector, and the weights of the influencing factors in the second prediction result set are used as the key vector to calculate the dynamic attention weight of each influencing factor at the current prediction time. Based on the dynamic attention weights and the preset factor-influence function, the prediction correction amount is calculated; Based on the predicted correction amount and the confidence prediction results in the first prediction result set, the load prediction value is weighted and corrected to generate the final load prediction result.
[0008] According to one embodiment of this application, when generating the final load prediction result based on the first prediction result set and the second prediction result set, the method further includes: Obtain the quality indicators of the current multi-source heterogeneous data, wherein the quality indicators include data missing rate and data latency; The prediction variance of the load prediction value is determined from the first prediction result set, and the entropy value of the dynamic attention weight is calculated. Based on the entropy value of the dynamic attention weight, the data missing rate, and the data delay time, determine the amplification factor for the prediction variance; Based on the prediction variance, the amplification factor, and the preset confidence level coefficient, a multi-confidence level confidence interval corresponding to the final load prediction result is generated.
[0009] According to one embodiment of this application, after generating the final load prediction result based on the first prediction result set and the second prediction result set, the method further includes: Based on the final load forecast result and the actual load data in the current multi-source heterogeneous data, at least one forecast deviation index is calculated. If at least one prediction deviation index is greater than the corresponding preset threshold, a deviation source analysis result is generated based on the attribution analysis results in the second prediction result set and the preset power field knowledge graph. Based on the analysis results of the deviation sources, incremental learning or hyperparameter adjustment is performed on the first preset prediction model, and / or prompt word optimization or model fine-tuning is performed on the second preset prediction model.
[0010] According to one embodiment of this application, before generating the deviation source analysis results based on the attribution analysis results in the second prediction result set and the preset power sector knowledge graph, the method further includes: The entity type is determined, and the entity type includes at least one of policy entity, meteorological entity, market entity, equipment entity, regional entity, and time entity; Determine the semantic relationships between entity types, and construct a set of triples based on the entity types and the semantic relationships; The set of triples is vectorized to generate a vectorized representation between the entity and the semantic relationship; The vectorized representation is stored in a graph database to obtain the preset knowledge graph of the power field.
[0011] The load forecasting method proposed in this application involves acquiring and preprocessing current multi-source heterogeneous data of the power system to obtain a structured dataset and an unstructured text dataset. Based on the structured dataset, a first prediction result set is generated using a time-series neural network model trained on historical multi-source heterogeneous data. Based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using an autoregressive language model trained on a power industry-specific corpus. Finally, the final load forecasting result is generated based on the first and second prediction result sets. Thus, by constructing a hybrid architecture with two models working collaboratively and fusing the outputs of the two models, the method solves the problems of low load forecasting accuracy, poor interpretability, and inability to quantify forecasting risks in related technologies, achieving the technical effects of improved load forecasting accuracy, interpretable forecasting results, and quantifiable forecasting risks.
[0012] To achieve the above objectives, a second aspect of this application provides a load forecasting device, comprising: The acquisition module is used to acquire the current multi-source heterogeneous data of the power system and preprocess the current multi-source heterogeneous data to obtain a structured dataset and an unstructured text dataset. The first generation module is used to generate a first prediction result set based on the structured dataset using a first preset prediction model, wherein the first preset prediction model is a time-series neural network model trained with historical multi-source heterogeneous data, used to capture the time-series dependencies of the load data. The second generation module is used to generate a second prediction result set based on the unstructured text dataset and the first prediction result set using a second preset prediction model. The second preset prediction model is an autoregressive language model trained on a corpus specifically for the power industry, used for semantic understanding and causal reasoning of unstructured text data. The third generation module is used to generate the final load forecast result based on the first forecast result set and the second forecast result set.
[0013] According to one embodiment of this application, the third generation module is specifically used for: Based on the attention mechanism, the load prediction values in the first prediction result set are used as the query vector, and the weights of the influencing factors in the second prediction result set are used as the key vector to calculate the dynamic attention weight of each influencing factor at the current prediction time. Based on the dynamic attention weights and the preset factor-influence function, the prediction correction amount is calculated; Based on the predicted correction amount and the confidence prediction results in the first prediction result set, the load prediction value is weighted and corrected to generate the final load prediction result.
[0014] According to one embodiment of this application, when generating the final load prediction result based on the first prediction result set and the second prediction result set, the third generation module is further configured to: Obtain the quality indicators of the current multi-source heterogeneous data, wherein the quality indicators include data missing rate and data latency; The prediction variance of the load prediction value is determined from the first prediction result set, and the entropy value of the dynamic attention weight is calculated. Based on the entropy value of the dynamic attention weight, the data missing rate, and the data delay time, determine the amplification factor for the prediction variance; Based on the prediction variance, the amplification factor, and the preset confidence level coefficient, a multi-confidence level confidence interval corresponding to the final load prediction result is generated.
[0015] According to one embodiment of this application, after generating the final load prediction result based on the first prediction result set and the second prediction result set, the third generation module further includes: The calculation unit is used to calculate at least one prediction deviation index based on the final load prediction result and the actual load data in the current multi-source heterogeneous data; The generation unit is used to generate deviation source analysis results based on the attribution analysis results in the second prediction result set and the preset power field knowledge graph when the at least one prediction deviation index is greater than the corresponding preset threshold. The processing unit is used to perform incremental learning or hyperparameter adjustment on the first preset prediction model based on the analysis results of the deviation sources, and / or to optimize the prompt words or fine-tune the model on the second preset prediction model.
[0016] According to one embodiment of this application, before generating the deviation source analysis results based on the attribution analysis results in the second prediction result set and the preset power field knowledge graph, the generation unit is further configured to: The entity type is determined, and the entity type includes at least one of policy entity, meteorological entity, market entity, equipment entity, regional entity, and time entity; Determine the semantic relationships between entity types, and construct a set of triples based on the entity types and the semantic relationships; The set of triples is vectorized to generate a vectorized representation between the entity and the semantic relationship; The vectorized representation is stored in a graph database to obtain the preset knowledge graph of the power field.
[0017] The load forecasting device proposed in this application acquires and preprocesses current multi-source heterogeneous data of the power system to obtain a structured dataset and an unstructured text dataset. Based on the structured dataset, a first prediction result set is generated using a time-series neural network model trained on historical multi-source heterogeneous data. Based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using an autoregressive language model trained on a power industry-specific corpus. Finally, a final load forecasting result is generated based on the first and second prediction result sets. Thus, by constructing a hybrid architecture with dual models working collaboratively and fusing the outputs of the two models, the device solves the problems of low load forecasting accuracy, poor interpretability, and inability to quantify forecasting risks in related technologies, achieving the technical effects of improved load forecasting accuracy, interpretable forecasting results, and quantifiable forecasting risks.
[0018] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the load forecasting method as described in the above embodiments.
[0019] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the load forecasting method as described in the above embodiments.
[0020] To achieve the above objectives, a fifth aspect of this application provides a computer program product comprising a computer program that, when executed by a processor, is used to implement the load forecasting method as described in the above embodiments.
[0021] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0022] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a load forecasting method provided according to an embodiment of this application; Figure 2 This is a flowchart illustrating a multimodal data fusion process according to an embodiment of this application; Figure 3 A flowchart illustrating the automated iterative optimization closed-loop process according to an embodiment of this application; Figure 4 This is a schematic diagram illustrating the construction and application of a pre-defined knowledge graph in the power sector according to an embodiment of this application; Figure 5 This is a block diagram of a load forecasting system according to an embodiment of this application; Figure 6 This is a schematic diagram of the collaborative mechanism between a first preset prediction model and a second preset prediction model according to an embodiment of this application; Figure 7 This is a schematic diagram of an edge-cloud collaborative deployment architecture according to an embodiment of this application; Figure 8 This is a block diagram of a load forecasting device provided according to an embodiment of this application; Figure 9 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0023] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0024] The load forecasting method, apparatus, electronic device, and storage medium according to embodiments of this application will now be described with reference to the accompanying drawings. First, the load forecasting method according to embodiments of this application will be described with reference to the accompanying drawings.
[0025] Figure 1 This is a flowchart of a load forecasting method according to an embodiment of this application.
[0026] For example, such as Figure 1 As shown, the load forecasting method includes the following steps: In step S101, the current multi-source heterogeneous data of the power system is obtained, and the current multi-source heterogeneous data is preprocessed to obtain a structured dataset and an unstructured text dataset.
[0027] It is understandable that the current multi-source heterogeneous data refers to power system data collected in real time through multiple channels, with diverse sources and different structural types. This can include historical load data of the power system, real-time actual load data, meteorological data (including real-time meteorological monitoring data and short-term meteorological forecast data for the next 7 days), power market data (including real-time electricity prices (updated every 5 minutes), daily transaction volume, market policy text data (such as national and local power policies, industry analysis reports, emergency notifications, power grid operation procedures, etc., which are updated through a combination of real-time crawling and manual uploading), energy price data (such as coal, natural gas, and crude oil) (updated daily)), equipment operation-related data (various monitoring data directly related to the operating status of power system equipment, reflecting the real-time working status and operating parameters of the equipment, such as generator output data, transformer load rate, line power flow, electric vehicle charging load data, and energy storage equipment charging and discharging data, collected at a frequency of 15 minutes), and load characteristic data (i.e., data describing the inherent laws, distribution characteristics, and change patterns of the power load itself). Historical load data can come from the power system's SCADA (Supervisory Control and Data Acquisition) and EMS (Energy Management System) systems, with a time resolution of 15 minutes, covering regional load, line load, and user-side load data for the past 5 years, with a data volume of no less than 10 million records. Meteorological data can include real-time temperature, humidity, wind speed, precipitation, sunshine duration (from meteorological sensors deployed at key nodes of the power grid, with a collection frequency of 5 minutes / time) and short-term weather forecast data for the next 7 days (from the meteorological department's API (Application Programming Interface), updated every hour / time).
[0028] Structured data sets refer to numerical data sets formed after preprocessing that can be represented by two-dimensional tables, which may include load data, meteorological data, equipment operation data, etc.; unstructured text data sets refer to data sets formed after preprocessing that exist in the form of natural language texts, which may include policy documents, market reports, emergency notifications, etc.
[0029] Specifically, as Figure 2 shown, the current multi-source heterogeneous data of the power system can be synchronously collected through multiple channels, which may include historical load data and real-time actual load data from the SCADA system, real-time meteorological monitoring data collected by meteorological sensors deployed at key nodes of the power grid and short-term meteorological forecast data released by the meteorological department, real-time electricity prices and transaction volume data obtained from the power market trading platform, as well as equipment operation data and load characteristic data. At the same time, text data such as power market policy texts, industry analysis reports, and emergency notifications are obtained through web crawlers or manual uploads. After data collection, these current multi-source heterogeneous data can be preprocessed. That is, for numerical data such as load, meteorology, electricity price, and equipment operation, first, the 3σ criterion (a statistical method based on the normal distribution, used to identify and eliminate outliers (gross errors)) is used to eliminate outliers, and the missing values are filled by combining linear interpolation and LSTM prediction, and then Min-Max normalization is performed to the [0,1] interval to eliminate the influence of dimension, obtaining a structured data set. For text data such as policy texts, market reports, and emergency notifications, the jieba (a Chinese word segmentation tool based on Python) word segmentation tool can be used for word segmentation, and stop words are filtered (based on a custom stop word list in the power field, including general stop words such as "de", "le", etc. and industry-specific stop words such as "irrelevant policies", "non-power field terms", etc., with a total of more than 800 entries) to obtain an unstructured text data set.
[0030] Furthermore, after obtaining the structured dataset and the unstructured text dataset, feature extraction can be performed on the structured dataset and the unstructured text dataset respectively. For the structured dataset, a sliding window method (e.g., a window size of 24 hours and a step size of 1 hour) can be used to extract time-series features from the structured dataset, including mean, variance, peak value, valley value, trend slope, periodicity, etc. within the window, resulting in a 48-dimensional time-series feature vector; then, a CNN (Convolutional Neural Network) network (e.g., a convolutional kernel size of 3×3 and a pooling window size of 2×2) is used to extract spatial features (correlation of loads in different regions, spatial distribution characteristics of meteorological factors), resulting in a 64-dimensional spatial feature vector; concatenating the time-series feature vector and the spatial feature vector yields a preliminary 112-dimensional numerical feature vector, which is then batch normalized to output a 512-dimensional standardized numerical feature vector. For unstructured text datasets, part-of-speech tagging and named entity recognition can be performed using a BERT (Bidirectional Encoder Representations from Transformers) pre-trained model (a version of the classic pre-trained model trained on Chinese corpus, fine-tuned and optimized with power industry corpus). This accurately extracts core entities such as policy names, energy types, meteorological disasters, and equipment models, as well as key semantic words such as "increase," "decrease," "restrict," and "encourage." The average pooling strategy is used to aggregate the text token vectors to generate an initial 768-dimensional semantic feature vector. After layer normalization, the influence of differences in text length and semantic strength is eliminated, resulting in a standardized semantic feature vector.
[0031] Subsequently, a dual-branch cross-attention mechanism module was constructed, using standardized numerical feature vectors and standardized semantic feature vectors as the query end and key end, respectively, to calculate the association weight matrix between the two types of features. The numerical feature vector branch focuses on the correspondence between "temporal-spatial features" and semantic features in the time dimension, while the semantic feature vector branch focuses on the influence correlation between "core entities-key actions" and numerical features. The weight matrix was normalized to the [0,1] interval using the softmax function to ensure the rationality of weight allocation. The normalized association weights were applied to the two types of feature vectors (i.e., numerical feature vectors and semantic feature vectors) to achieve mutual enhancement of features: the numerical feature vectors, incorporating semantic association information, can strengthen the temporal impact mapping of textual factors such as extreme weather and policy adjustments on load fluctuations; the semantic feature vectors, incorporating numerical association information, can improve the quantitative expression of the impact of core entities on load and electricity prices. Subsequently, the enhanced feature vectors were input into a Transformer encoder (e.g., containing 4 encoding layers and an 8-head multi-head attention mechanism) to further explore the deep associations of cross-modal features, ultimately outputting a preliminary 1024-dimensional comprehensive feature matrix.
[0032] To address the redundancy and noise interference in the preliminary integrated feature matrix, a channel attention mechanism can be introduced for feature selection and enhancement. Specifically, global average pooling can compress the 1024-dimensional features into single-channel feature vectors, which are then passed through a fully connected layer (e.g., a hidden layer with a dimension of 512) and a sigmoid activation function to generate importance weights for each channel. These weights are then multiplied channel-by-channel with the preliminary integrated feature matrix to enhance the signals of key feature channels (e.g., policy impact channels, meteorological correlation channels, and electricity price linkage channels) while suppressing interference from redundant channels. Furthermore, L2 regularization (e.g., a regularization coefficient set to 0.001) can be used to prevent feature overfitting, ultimately outputting an optimized 1024-dimensional integrated feature matrix.
[0033] In step S102, a first prediction result set is generated based on the structured dataset using a first preset prediction model. The first preset prediction model is a time-series neural network model trained with historical multi-source heterogeneous data, used to capture the time-series dependencies of the load data.
[0034] Understandably, historical multi-source heterogeneous data refers to various types of power system data collected in the past and used for model training, including historical load, historical weather, and historical equipment operation data, which correspond to the current multi-source heterogeneous data. The time-series neural network model is a neural network specifically designed to process time-series data, capable of capturing the patterns of data changes over time, long-term and short-term dependencies, and periodic characteristics. Time-series dependencies refer to the inherent correlation patterns between load data at different points in time, including trends (such as load varying with the seasons), periodicity (such as the peak-valley shape of the daily load curve), and autocorrelation (the correlation between the current load and the load at historical times).
[0035] Specifically, based on the structured dataset obtained after preprocessing in step S101 and the numerical features in the optimized 1024-dimensional comprehensive feature matrix, the first preset prediction model can be invoked for inference calculation to generate the first prediction result set. This first preset prediction model is a pre-built and trained dedicated small model. Its training data can come from historical multi-source heterogeneous data, covering massive historical samples under different seasons, weather conditions, and load levels. The model adopts a hybrid temporal neural network architecture, integrating LSTM, GRU (Gated Recurrent Unit), Transformer, and other temporal network modules. Through a multi-layered network structure, it extracts high-order features in the time dimension layer by layer, aiming to accurately capture the temporal dependencies of load data from structured data, including the trend of load changes over time, daily / weekly / monthly periodic features, and the influence weight of historical load on the current load. At the output level, the model generates short-term (1-24 hours, 15-minute intervals), medium-term (1-7 days, 1-hour intervals), and long-term (1-30 days, 24-hour intervals) load prediction values, respectively. Meanwhile, during the inference process, the model will also output the model running state parameters and the preliminary evaluation results of prediction credibility, which will be used for the fusion weight calculation and uncertainty quantification in subsequent steps.
[0036] For example, in the embodiments of this application, the first preset prediction model can adopt a Mixture of Experts (MoE) architecture, which includes four specialized sub-models, such as a short-term load prediction sub-model, a medium- and long-term load prediction sub-model, a short-term electricity price prediction sub-model, and a deviation correction sub-model. At the model implementation level, these four sub-models can all be built based on a hybrid architecture of temporal neural networks (such as LSTM, CNN, Transformer, etc.) and optimized for different prediction tasks.The short-term load forecasting sub-model can employ a hybrid LSTM and CNN architecture. Inputs include load data, meteorological data, and load characteristic data from the past 24 hours. Outputs are load forecasts for the next 24 hours (96 discrete time points at 15-minute intervals). Model parameters are set to 2 layers of LSTM (256 units per layer), 1 layer of CNN (3×3 kernel size, 64 output channels), a dropout rate (the probability of each neuron being randomly dropped during training) of 0.2, and an optimizer of Adam (Adaptive Moment Estimation, initial learning rate of 0.001, step decay), with a loss function of MAE (Mean Absolute Error). The training iterations are 500 rounds, and the validation set error is controlled within 1.5%. The medium-to-long-term load forecasting sub-model can adopt a Transformer and GRU structure. Inputs include load data, meteorological data, and energy price data for the past 30 days, and output load forecasts for 1-7 days and 1-30 days. An 8-head multi-head attention mechanism is used to capture long-term time-series dependencies. The GRU has 2 layers (128 units per layer), the optimizer is AdamW (Adam with Weight Decay, an adaptive moment estimation optimizer with decoupled weight decay), and the loss function is MAPE (Mean Absolute Percentage Error), adapting to the needs of medium-to-long-term load trend forecasting. The short-term electricity price forecasting sub-model can adopt a lightweight LSTM structure. Inputs include electricity price data for the past 7 days, market transaction data, and energy price correlation data, and the output is the electricity price forecast for the next 24 hours. Model parameters can be simplified to ensure fast inference; no specific limitations are specified here. The bias correction sub-model can be based on XGBoost (eXtreme Gradient Optimizer). The algorithm utilizes Boosting (Extreme Gradient Boosting) to construct a model. Inputs can include initial load forecasts from other sub-models, actual intake load data, meteorological deviation data (the difference between forecasts and real-time observations; historical deviation statistics are used if real-time observations are not yet available), and market fluctuation data. The output is a deviation correction. This sub-model dynamically optimizes the final forecast, further reducing the MAPE of short-term load forecasts by 0.3-0.5 percentage points. The sub-models are integrated through a gating network. This network dynamically adjusts the weights of each sub-model based on historical forecast accuracy and scenario adaptability, with a weight update cycle of 24 hours. For example, in extreme weather scenarios, the weight of the short-term load forecast sub-model can be increased to 0.6; in holiday scenarios, the weight of the deviation correction sub-model can be increased to 0.3. This adaptive weight allocation mechanism ensures that the model maintains optimal forecast performance across different scenarios.
[0037] In step S103, based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using a second preset prediction model. The second preset prediction model is an autoregressive language model trained on a corpus specifically for the power industry, used for semantic understanding and causal reasoning of unstructured text data.
[0038] Understandably, a power industry-specific corpus refers to a text dataset specifically built for training / fine-tuning large language models. It includes load forecasting cases, electricity price fluctuation analysis reports, power policy documents, academic literature in the energy field, and power grid operation procedures, totaling no less than 500,000 entries. Autoregressive language models are deep learning-based large language models that generate and understand text by predicting the probability distribution of the next word in a sequence. These models can include the GPT (Generative Pre-trained Transformer) series and DeepSeek-R1 (DeepSeek Reasoning Model 1), and are adept at handling complex semantic understanding and generation tasks. Semantic understanding refers to the model's ability to understand the true meaning of text, contextual relationships, technical terms, and implicit information. Causal reasoning refers to the model's ability to analyze causal relationships between events, identify deep-seated factors affecting load changes, and explain "why" changes occur.
[0039] Specifically, based on the first prediction result set generated in step S102, the unstructured text dataset obtained after preprocessing in step S101, and the semantic features in the optimized 1024-dimensional comprehensive feature matrix, a second pre-set prediction model can be invoked for inference calculations to generate a second prediction result set. This second pre-set prediction model is a pre-built, lightweight, and fine-tuned general-purpose large language model using a dedicated corpus for the power industry. Its core design goal is to achieve deep semantic understanding and causal inference capabilities for unstructured text data. Ultimately, the second prediction result set output by the model can include: in-depth analysis of power market trends, multi-factor attribution results of electricity price fluctuations (outputting the influence weights of each factor), quantitative assessment of sudden factors, and a standardized semantic analysis report and a list of key influencing factors (the model quantifies the impact of each input factor on the prediction result (load / electricity price) through attribution analysis). This result set will serve as an important input for subsequent steps, collaboratively integrating with the first prediction result set to jointly support the generation of the final load prediction result.
[0040] For example, in this embodiment, the second preset prediction model can use DeepSeek-R1-13B-Q5 (5-bit quantization), which reduces memory usage by 60% and improves inference speed by 2.3 times compared to the native model. This model can be adapted to the power sector using lightweight fine-tuning techniques. The specific process is as follows: Based on a dedicated corpus for the power sector, a hybrid fine-tuning method combining LoRA (Low-Rank Adaptation) and PTuning-II (Prompt Tuning version 2) is used. During fine-tuning, the core parameters of the model (approximately 12 billion parameters) are frozen, and only the adapter parameters (approximately 50 million parameters) are trained. The fine-tuning batch size is set to 16, the learning rate is 0.0001, and the training period is 72 hours. After fine-tuning, the model's accuracy in understanding power sector terminology can reach over 95%, and its accuracy in attributing electricity price fluctuations can reach over 90%. The fine-tuned large model (i.e., the second preset prediction model) has the following core functions: First, market text semantic understanding, which can extract key influencing factors from policy documents and news reports; second, multi-factor attribution of electricity price fluctuations, which can output the quantitative weight of each influencing factor (for example, policy adjustment accounts for 30%, energy price increase accounts for 25%, which is used to characterize the relative impact of each factor on load changes); third, market trend prediction, which can judge the short-term and medium-term market trends and give the trend probability; and fourth, semantic analysis report generation, which can output the analysis results in a standardized format and support direct export and use.
[0041] In step S104, the final load forecast result is generated based on the first forecast result set and the second forecast result set.
[0042] Specifically, after obtaining the first and second prediction result sets, the final load prediction result is generated through a fusion mechanism. This step is the core collaborative link of the entire load prediction method, aiming to achieve the complementary advantages of the accurate numerical prediction capability of the small model (i.e., the first preset prediction model) and the semantic reasoning capability of the large model (i.e., the second preset prediction model).
[0043] The collaboration mechanism between the first and second preset prediction models utilizes a RabbitMQ message queue for asynchronous communication, ensuring efficient and stable data interaction. Specifically, the first preset prediction model sends its prediction results, deviation data, and operational status parameters (i.e., the first prediction result set) to the message queue every 15 minutes. The second preset prediction model retrieves data from the queue, processes 10 messages per second to perform attribution analysis, and returns a list of influencing factors, trend judgments, and influence weights (i.e., the second prediction result set). The first and second preset prediction models combine their outputs and dynamically adjust prediction parameters using an attention weight fusion algorithm to achieve result fusion optimization. To ensure the reliability of the collaboration process, the message timeout is set to 500 milliseconds. After the timeout, the system automatically switches to a backup large model (such as LLaMA (Large Language Model Meta AI) - 7B fine-tuned version).
[0044] As one possible implementation, in some embodiments, generating a final load forecast result based on a first forecast result set and a second forecast result set includes: calculating the dynamic attention weight of each influencing factor at the current forecast time using the load forecast values in the first forecast result set as the query vector and the influencing factor weights in the second forecast result set as the key vector, based on an attention mechanism; calculating the forecast correction amount based on the dynamic attention weight and a preset factor-influence function; and weighting the load forecast values based on the forecast correction amount and the reliability forecast results in the first forecast result set to generate the final load forecast result.
[0045] Understandably, the query vector refers to the vector representation of the "questioner" in the attention mechanism, here representing the load forecast value in the first prediction result set, indicating the "baseline value that needs to be corrected." The key vector refers to the vector representation of the "queried party" in the attention mechanism, here representing the weights of influencing factors in the second prediction result set, indicating "various factors that may affect the load." Dynamic attention weights refer to the weight coefficients calculated by the attention mechanism, reflecting the importance of each influencing factor to the current prediction time; the weight of the same factor may differ at different time points. The preset factor-influence function refers to a mapping relationship, which can be predefined or learned, used to convert the weights of influencing factors into specific prediction correction amounts, such as a quantitative rule like "for every 0.1 increase in the weight of policy factors, the load forecast value is adjusted upward by 0.5%." The prediction correction amount refers to the magnitude by which the original load forecast value needs to be adjusted. The credibility prediction result is the evaluation value reflecting the reliability of this prediction, simultaneously output by the first preset prediction model when outputting the load forecast value, usually expressed as a probability between 0 and 1.
[0046] Specifically, in the process of generating the final load forecast result based on the first and second forecast result sets, firstly, the load forecast values in the first forecast result set are used as the query vector, and the weights of influencing factors in the second forecast result set are used as the key vectors. These are then input into the attention mechanism module (a specially designed cross-modal attention network, which can employ a single-head or multi-head dot product attention structure). By calculating the correlation score between the query vector and each key vector, and then normalizing it using the softmax function, the dynamic attention weight of each influencing factor at the current forecast time is obtained. Given that the degree of influence of the same influencing factor (such as policy adjustments) on the load may differ at different points in time, the dynamic attention weight can capture this time-varying nature.
[0047] It should be noted that since the load forecast value (a scalar or low-dimensional vector) and the influencing factor weight vector (a high-dimensional vector) reside in different feature spaces, they can be projected onto the same dimensional space for similarity calculation. For example, if the current load forecast value is Q = 28500 (scalar) and the influencing factor weight vector is K = [0.32, 0.28, 0.18, 0.15, 0.07] (5-dimensional vector), Q can be mapped to a vector of the same dimension as K through a linear transformation, i.e., Q' = W. q ×Q, where W q Let W be a learnable projection matrix with dimensions 5×1. Assume that after training, W... q =[0.5,0.3,0.1,0.05,0.02] T Then Q' = [0.5×28500, 0.3×28500, 0.1×28500, 0.05×28500, 0.02×28500] = [14250, 8550, 2850, 1425, 570]. Furthermore, the scaling dot product formula can be used to calculate the query vector Q' and each key vector K. i (Here, K itself is the key vector, and no additional projection is needed.) The relevance score is given by Q'=[q1,q2,q3,q4,q5] and K=[k1,k2,k3,k4,k5]:
[0048] in, The vector dimension is 5 in this case. Used for scaling.
[0049] Therefore, we can calculate the policy factor s1=(14250×0.32) / 2.236≈2039.4, the meteorological factor s2≈1070.7, the market factor s3≈229.4, the time factor s4≈95.6, the equipment factor s5≈17.8, and the correlation score vector S=[2039.4,1070.7,229.4,95.6,17.8].
[0050] The relevance score vector is normalized using the softmax function to obtain the dynamic attention weight for each factor (temperature scaling can be applied to the scores due to the large differences in scores):
[0051] Where T is the temperature parameter, controlling the smoothness of the weights. Assuming T = 1000, then: The final dynamic attention weights for each factor are: political factor = 7.69 / 13.99 ≈ 0.55, weather factor = 0.21, market factor = 0.09, time factor = 0.08, equipment factor = 0.07, and the dynamic attention weight vector a = [0.55, 0.21, 0.09, 0.08, 0.07].
[0052] Secondly, the dynamic attention weights are substituted into the corresponding preset factor-influence function (e.g., "for every 0.1 increase in the weight of meteorological factors, the load forecast value is adjusted by ±1%)" to obtain the contribution value of each factor to the load forecast. The sum of these values is the total forecast correction. Finally, the original load forecast value is weighted and corrected by combining the confidence prediction results from the first forecast result set. The correction formula can be expressed as: Final forecast value = Original forecast value × (1 + Forecast correction) × Confidence + Original forecast value × (1 - Confidence). When the confidence is high, the final forecast value depends more on the combination of the original forecast value and the correction; when the confidence is low, the original forecast value is more likely to be retained to avoid introducing larger errors due to unreliable corrections.
[0053] Thus, through the above-mentioned fusion mechanism, the final load forecast result retains the accuracy of the small model (i.e., the first preset forecast model) in numerical prediction, while incorporating the analysis and judgment of macroeconomic factors by the large model (i.e., the second preset forecast model), achieving an organic combination of micro-level numerical data and macro-level reasoning, and providing a more reliable decision-making basis for subsequent power grid dispatching and electricity market transactions.
[0054] Optionally, in some embodiments, when generating the final load forecast result based on the first and second forecast result sets, the method further includes: obtaining quality indicators of the current multi-source heterogeneous data, wherein the quality indicators include data missing rate and data latency; determining the prediction variance of the load forecast value from the first forecast result set and calculating the entropy value of the dynamic attention weight; determining the amplification factor of the prediction variance based on the entropy value of the dynamic attention weight, the data missing rate, and the data latency; and generating a multi-confidence level confidence interval corresponding to the final load forecast result based on the prediction variance, the amplification factor, and a preset confidence level coefficient.
[0055] Understandably, quality metrics refer to quantitative parameters used to assess the reliability and timeliness of current multi-source heterogeneous data, reflecting the "health" of the data itself. Quality metrics can include data missing rate and data latency. The data missing rate is the proportion of missing values in the current multi-source heterogeneous data; a higher missing rate indicates less complete data available and greater prediction uncertainty. Data latency is the time difference between the actual occurrence of real-time data and its reception by the system; a longer latency indicates "older" data and poorer representativeness of the current moment. Prediction variance refers to the variance of the load prediction values output by the first preset prediction model, reflecting the model's own uncertainty about the prediction result; a larger variance indicates greater model uncertainty. Entropy is an indicator of uncertainty in information theory, specifically the entropy of the dynamic attention weight distribution. A higher entropy value indicates more dispersed weights among factors and greater uncertainty in the attribution result; a lower entropy value indicates more concentrated weights and a clearer attribution result. The amplification factor is a coefficient calculated based on entropy, missing data rate, and data latency. It is used to amplify and adjust the prediction variance; the worse the data quality and the more uncertain the attribution, the larger the amplification factor. The preset confidence level coefficient is a statistical constant corresponding to a preset confidence level (e.g., 90%, 95%, 99%). It is used to convert the standard deviation into the half-width of the confidence interval; for example, the coefficient for a 95% confidence level is 1.96. The multi-confidence level confidence interval is the range of predicted value fluctuations calculated at different confidence levels. It is used to quantify the uncertainty of the prediction results and is usually expressed as "predicted value ± half-width of the interval".
[0056] Specifically, firstly, a Bayesian neural network can be used to reconstruct the first preset prediction model, introducing a Gaussian prior distribution into the model weight parameters and approximating the posterior distribution through variational inference, effectively reducing computational complexity while ensuring prediction accuracy. The reconstructed model outputs the predicted load value along with the corresponding prediction variance, which characterizes the model's confidence level in the prediction result. Secondly, during the generation of the final load prediction result, quality indicators of the current multi-source heterogeneous data are obtained. These indicators include two core dimensions: one is the data missing rate, reflecting the completeness of the current input data (for example, if a weather station malfunctions, resulting in missing temperature data, or communication interruptions cause some load data to fail to arrive in time, these will lead to an increased data missing rate); the other is the data latency, reflecting the timeliness of real-time data (for example, if load data that should be collected every 5 minutes arrives at the system after a 30-second delay due to network congestion, the data latency is 30 seconds). These two indicators together characterize the "health" of the current multi-source heterogeneous data. Simultaneously, the entropy value of the dynamic attention weights obtained in step S104 is calculated. Entropy can be calculated based on information theory principles: if the weights of each factor are evenly distributed (e.g., [0.25, 0.25, 0.25, 0.25]), the entropy is high, indicating that the attribution results of the large model are relatively ambiguous, and it is unclear which factor is dominant; if the weights are concentrated (e.g., [0.8, 0.1, 0.05, 0.05]), the entropy is low, indicating that the attribution results are clear and reliable. Therefore, entropy can be used as a quantitative indicator of attribution uncertainty. Then, based on the entropy of the dynamic attention weights, the data missing rate, and the data latency, the amplification factor for the prediction variance is determined comprehensively. The design logic of this amplification factor is: the higher the entropy (the more uncertain the attribution), the higher the data missing rate (the more incomplete the input), and the longer the data latency (the less fresh the data), the larger the amplification factor. The amplification factor can be expressed as a function combining the three factors, such as by weighted summation or product.
[0057] Furthermore, by incorporating scenario-adaptive normalization technology, the calculation parameters of the confidence interval are dynamically adjusted according to different scenario types (such as extreme weather, holidays, policy adjustment periods, and periods of energy price fluctuations). When the system identifies a specific scenario through attribution analysis results output by a knowledge graph or a second preset prediction model, it automatically calls the preset parameters corresponding to that scenario to perform a secondary adjustment of the amplification factor, thereby optimizing the accuracy of uncertainty assessment and making it more closely aligned with the risk characteristics of the actual scenario. Finally, based on the original prediction variance, the amplification factor, and the preset confidence level coefficients, a multi-confidence level confidence interval corresponding to the final load forecast result is generated.
[0058] Specifically, first calculate the corrected standard deviation of the overall uncertainty:
[0059] Then, based on the coefficients corresponding to different confidence levels (e.g., 1.645 for 90%, 1.96 for 95%, and 2.576 for 99%), calculate the half-width of the interval at each confidence level: Half-width of interval = coefficient × The final output format is: final load forecast value ± half width of the interval, for example, "28500±350MW (95% confidence level)".
[0060] Therefore, through this uncertainty quantification process, the final load forecast result not only provides a definite forecast value, but also provides the possible fluctuation range of the value under different confidence levels. At the same time, combined with scenario adaptive technology, it ensures the rationality of the assessment results under different risk scenarios, enabling dispatchers to clearly understand the risk level of this forecast and thus make more robust decisions.
[0061] Furthermore, in some embodiments, after generating the final load forecast result based on the first and second forecast result sets, the method further includes: calculating at least one forecast deviation index based on the final load forecast result and the actual load data in the current multi-source heterogeneous data; if the at least one forecast deviation index is greater than a corresponding preset threshold, generating a deviation source analysis result based on the attribution analysis result in the second forecast result set and a preset power sector knowledge graph; and performing incremental learning or hyperparameter adjustment on the first preset forecast model based on the deviation source analysis result, and / or optimizing prompt words or fine-tuning the model on the second preset forecast model.
[0062] Understandably, actual load data refers to the real-time load monitoring values from the current multi-source heterogeneous data, representing the actual load values occurring in the power system, used for comparison and verification with the forecast results. Forecast deviation indicators refer to quantitative metrics used to measure the difference between forecast results and actual values, including metrics such as Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Mean Absolute Error (MAE). The corresponding preset thresholds are trigger thresholds set for different forecast deviation indicators; for example, the MAPE threshold could be set to 2.5%, and the RMSE threshold to 30MW. When an indicator exceeds its corresponding threshold, the optimization process is triggered. Attribution analysis results refer to the analytical conclusions output by the second preset forecast model, including influencing factor weight vectors and semantic analysis reports, used to explain the possible causes of forecast deviations. The pre-defined power sector knowledge graph refers to a knowledge base built around factors influencing electricity price fluctuations and drivers of load changes. It aims to transform professional knowledge in the power sector into a computer-understandable structured form, providing knowledge support for subsequent attribution reasoning and bias analysis. Simultaneously, it integrates structured knowledge into the large-scale model reasoning process, enhancing causal analysis capabilities and the interpretability of results. Bias source analysis results are conclusions drawn from combining attribution analysis results and knowledge graph reasoning, pinpointing the specific causes of prediction bias, such as "a weather station malfunction leading to missing temperature data" or "newly released power rationing policies not being considered by the model." Incremental learning refers to a machine learning model update method that uses new data to continue training an existing model without retraining from scratch, suitable for continuous optimization of the first pre-defined prediction model. Hyperparameter tuning refers to optimizing and adjusting the model's hyperparameters (such as learning rate, number of network layers, number of neurons, etc.) to improve model performance. Prompt word optimization refers to improving input prompts for the large language model by adjusting the expression of prompt words and adding contextual information to guide the model to output more accurate attribution results. Model fine-tuning refers to the process of training the model parameters with new data based on an existing pre-trained model, so that the model can adapt to new data distributions or task requirements, and is suitable for the optimization of a second preset prediction model.
[0063] Specifically, after generating the final load forecast result in step S104, this embodiment of the application can also introduce an automated iterative optimization closed loop, enabling the entire forecasting system to continuously learn and improve itself. This closed-loop system is based on a fully automated design of "real-time monitoring - intelligent analysis - precise tuning - verification feedback," and relies on an edge-cloud collaborative architecture to achieve efficient operation. Its core consists of three modules: triggering mechanism, tuning execution, and verification update.
[0064] like Figure 3As shown, for the triggering mechanism, the system can monitor the difference between the final load forecast result and the actual load data in real time. Edge nodes calculate the prediction deviation index and 95% confidence interval coverage every 15 minutes. These indicators can characterize the magnitude and distribution of prediction errors from different dimensions. The calculated deviation indices are compared with corresponding preset thresholds. For example, the MAPE threshold can be set to 2.5%, the RMSE threshold to 30MW, and the MAE threshold to 20MW. Based on the severity of the prediction deviation index, different levels of optimization processes are triggered through preset thresholds: Level 1 trigger (MAPE > 2.0% or RMSE > 25MW or coverage < 90%): only parameter fine-tuning is initiated; Level 2 trigger (MAPE > 2.5% or RMSE > 30MW or coverage < 88%): parameter fine-tuning and feature engineering optimization are initiated; Level 3 trigger (MAPE > 3.0% or RMSE > 35MW or coverage < 85%): full-process optimization (parameter fine-tuning, feature engineering, and model structure optimization) is initiated. Meanwhile, the system also supports manual triggering of optimizations, meeting the targeted optimization needs of operations and maintenance personnel in specific scenarios. This multi-level triggering mechanism ensures that the system can promptly detect and predict performance degradation and take optimization measures of appropriate intensity according to the severity of the problem.
[0065] For optimization execution, the system can automatically trigger the attribution analysis process when any prediction deviation index exceeds its corresponding preset threshold. By combining the attribution analysis results from the second prediction result set with a preset power domain knowledge graph, the source of the deviation can be jointly located. The attribution analysis results provide a qualitative and quantitative analysis of the current influencing factors by the second preset prediction model, while the preset power domain knowledge graph provides the structured relationships between the factors. For example, if the attribution analysis results show that "the weight of meteorological factors has increased abnormally", the system can query the entities associated with "meteorological factors" (such as specific weather stations, data types, etc.) through the preset power domain knowledge graph, and combine it with data quality indicators to ultimately locate the root cause as "a malfunction at a certain weather station has led to missing temperature data". Based on the deviation source analysis results, the system can adopt a combination of cloud-based centralized optimization and edge-based local optimization to take targeted optimization measures for different models: when triggered at level one and level two, edge nodes autonomously complete local optimization; when triggered at level three, data is uploaded to the cloud for full-process optimization.
[0066] For example, for the first preset prediction model (temporal neural network model), hyperparameter tuning can be achieved through a joint optimization approach using grid search and Bayesian optimization algorithms. The parameter range for grid search can include: a learning rate of 0.0001-0.01, 300-800 iterations, and kernel size of 3×3-7×7, etc. Differential tuning is then applied to different sub-models: for the short-term load prediction sub-model, the focus is on tuning the number of LSTM units and the CNN kernel size; for the medium- to long-term sub-model, the focus is on tuning the number of Transformer attention heads and the number of GRU layers; and for the bias correction sub-model, the focus is on tuning the XGBoost tree depth and the learning rate. Simultaneously, an online learning mechanism can be employed to continuously update the model based on real-time incremental data, eliminating the need to retrain the entire model and keeping the update cycle within one hour.
[0067] For the second preset prediction model (large language model), on the one hand, the prompt words are optimized, and the expression of input prompts is improved based on the deviation analysis results. For example, new instructions such as "analyze the causes by combining {specific deviation type}" and "quantify the influence weight of {influencing factors} on the load" are added to guide the model to output more accurate attribution results. On the other hand, incremental fine-tuning technology is adopted to continue training the model parameters with new data. The amount of fine-tuning data is set to 10%-15% of the full corpus, and the fine-tuning cycle is controlled within 24 hours.
[0068] For the pre-defined knowledge graph in the power sector, the system can automatically capture new entities and relationships associated with the causes of deviations, such as new policy documents and unknown extreme weather impact patterns. After manual verification, these are added to the knowledge graph, and the triple set and vector representation are updated to ensure the timeliness and completeness of the knowledge graph.
[0069] The entire tuning process is guided by multi-objective optimization. The optimization function is set to maximize prediction accuracy, minimize inference time, and optimize resource consumption, thereby achieving dynamic adjustment of the training strategy.
[0070] For validation updates, after optimization, the system can construct a validation set using historical data from the past 7 days and real-time incremental data to comprehensively validate the model optimization effect. Validation criteria include: a reduction of more than 10% in prediction bias after optimization, and satisfactory confidence interval coverage. If validation passes, the system synchronizes the optimized model parameters, feature engineering rules, and knowledge graph data to edge nodes and the cloud model library, updating the model version to ensure the entire prediction system immediately benefits from the optimization results. If validation fails, the system automatically reverts to the parameter state before optimization and readjusts the optimization strategy, such as expanding the parameter search range or increasing the amount of fine-tuning data, and executes the optimization process again. Simultaneously, the system records detailed parameter configurations and effect data for each optimization, forming an optimization log to provide a reference for subsequent optimizations in similar scenarios, continuously improving the efficiency of closed-loop optimization.
[0071] Through this complete automated iterative optimization closed loop, the entire prediction system can continuously improve itself based on actual operational feedback, dynamically adapt to changes in load characteristics, and maintain high-precision prediction performance.
[0072] Optionally, in some embodiments, before generating the deviation source analysis results based on the attribution analysis results in the second prediction result set and the preset power domain knowledge graph, the method further includes: determining entity types, including at least one of policy entities, meteorological entities, market entities, equipment entities, regional entities, and time entities; determining the semantic relationships between each entity type, and constructing a set of triples based on the entity types and semantic relationships; vectorizing the set of triples to generate a vectorized representation between entities and semantic relationships; and storing the vectorized representation in a graph database to obtain the preset power domain knowledge graph.
[0073] It is understandable that entity type refers to the node category in a knowledge graph, representing an abstraction of things with the same attributes. In the embodiments of this application, entity type can include policy entities (such as electricity price adjustment policies, power rationing notices, subsidy policies, etc.), meteorological entities (such as extreme weather events such as high temperatures, rainstorms, typhoons, and cold waves), market entities (such as electricity price fluctuations and changes in transaction volume), equipment entities (such as generators, transformers, transmission lines, energy storage equipment, etc.), regional entities (such as provincial power grids, industrial parks, urban areas, etc.), and time entities (such as holidays, peak electricity consumption periods, seasonal periods, etc.). Semantic relations refer to the directed associations between entities, used to describe the logical connections between entities. For example, "policy adjustments affect electricity price fluctuations," "high temperatures lead to increased load," "equipment failures reduce power supply capacity," etc. The set of triples is the basic representation unit of the knowledge graph, storing knowledge in the form of (head entity, relation, tail entity). For example, ("electricity price marketization reform policy," "impact," "electricity price fluctuations") is a triple. Vectorization refers to the process of mapping entities and relations to a low-dimensional continuous vector space, enabling elements in a knowledge graph to be operated on and reasoned using mathematical vectors. Vectorized representations are the vector forms of entities and relations obtained after vectorization, which can be generated using knowledge graph embedding models (such as TransE (Translating Embeddings)) for subsequent similarity calculations and reasoning tasks. Graph databases are database systems specifically designed for storing and querying graph-structured data, storing knowledge in the form of nodes (entities) and edges (relationships), supporting efficient graph traversal and association queries. In this embodiment, Neo4j can be used as the graph database. Specifically, such as Figure 4As shown, in constructing a pre-defined knowledge graph for the power sector, the first step is to determine the entity types contained within the knowledge graph. Entity types are node categories in the knowledge graph, representing various core concepts in the power system. Taking factors influencing electricity price fluctuations and drivers of load changes as core entities, entity types include at least the following categories: policy entities, energy price entities (such as coal prices, natural gas prices, crude oil prices, etc.), meteorological entities, equipment entities, regional entities, emergency event entities (such as grid failures, natural disasters, social events, etc.), and time entities. These entity types cover the main dimensions of factors affecting load changes. Secondly, the semantic relationships between each entity type are determined, and a set of triples is constructed based on the entity types and semantic relationships. Semantic relationships describe the logical connections between entities, such as "policy adjustments affect electricity price fluctuations," "high temperatures lead to increased load," "energy price increases are associated with electricity price increases," and "equipment failures reduce power supply capacity." Each semantic relationship corresponds to a set of triples, and each triple represents a specific piece of knowledge in the form of (head entity, relationship, tail entity). For example, ("electricity price marketization reform policy", "impact", "electricity price fluctuation") represents the policy's impact on electricity prices; ("typhoon", "leads to", "load decline") represents the impact of extreme weather on load. By collecting and organizing various types of knowledge in the power sector, a comprehensive set of triples is formed. Then, the triple set is vectorized to generate vectorized representations between entities and semantic relationships. The core of this step is the use of a knowledge graph embedding model to convert discrete symbolic knowledge into continuous numerical vectors, enabling seamless integration of the knowledge graph with deep learning models. This application preferably uses the TransE model for vectorization, whose core idea is to make the head entity vector plus the relationship vector as close as possible to the tail entity vector, completing model training by maximizing the positive example triple score and minimizing the negative example triple score. After vectorization, each entity and each relationship is mapped to a specific location in a low-dimensional vector space. The similarity between entities can be calculated using vector distance, and relationship reasoning can be achieved through vector operations. This vectorization process allows structured knowledge to be effectively integrated into the reasoning process of large models, significantly enhancing the model's causal analysis capabilities and the interpretability of results. Finally, the vectorized representation is stored in a graph database to obtain the preset knowledge graph for the power industry. This embodiment preferably uses Neo4j as the graph database, which can efficiently store entities and relationships in the form of nodes and edges, and supports complex graph query and reasoning operations. After storage, the knowledge graph retains the original triplet structure information while possessing vectorized numerical representation capabilities, providing dual support for subsequent deviation source analysis: on the one hand, entities and relationships related to deviations can be quickly located through graph queries; on the other hand, similarity and association strength between entities can be calculated through vector operations.This knowledge graph will serve as an important knowledge engine, combining with attribution analysis results in the iterative optimization process to jointly pinpoint the root cause of prediction bias.
[0074] To further enhance the accuracy and interpretability of uncertainty quantification, this application deeply integrates a pre-defined power sector knowledge graph with a Bayesian neural network. This integration process spans the entire model training and prediction inference process, achieving a balance between quantification accuracy and interpretability through three core steps: knowledge graph-enabled uncertainty factor modeling, embedding correlation constraints into model training, and dynamic optimization of confidence intervals. This integration mechanism aims to transform structured domain knowledge in the power sector into prior guidance for uncertainty quantification, ensuring that prediction results not only possess numerical accuracy but also an interpretable risk representation.
[0075] For the knowledge graph-enabled modeling of uncertainty factors, various uncertainty factors can be imported into the power load fluctuation knowledge graph. These factors can include extreme weather events (such as typhoons, rainstorms, and cold waves), policy changes (such as electricity price reforms and power rationing policies), energy price fluctuations (such as changes in coal and natural gas prices), and equipment failures (such as generator tripping and transmission line interruptions). Based on the existing power sector knowledge graph (i.e., the pre-defined power sector knowledge graph), the uncertainty factor subgraph is further expanded, adding attribute nodes such as "extreme weather level," "policy impact intensity," "energy price fluctuation range," and "equipment failure probability" to characterize the feature dimensions of each factor. At the same time, refined relationship types such as "impact degree," "lag time," and "association probability" are defined to make the description of the association between factors more accurate. For example, refined triplets such as "rainstorm (extreme weather) - impact degree (strong) - load increase (load change)" and "electricity price adjustment policy - lag time (2 hours) - regional load (load entity)" are constructed to integrate the quantitative characteristics and association patterns of uncertainty factors into the knowledge graph in a structured form. Graph query algorithms can extract the correlation information between these uncertainties and the rate of change in electricity load from the knowledge graph, including the degree of correlation (the intensity of the factor's impact on the load), the influence path (the intermediate links through which the factor is transmitted to the load), and the lag time (the time delay required for the factor to affect the load change). The expanded knowledge graph is retrained using the TransE model, mapping entities and relationships to a 128-dimensional vector space and updating the vector representation. Through this process, the knowledge graph not only retains the original semantic relationships but also accurately characterizes the quantitative impact features of each factor on load changes. Simultaneously, a graph query interface is developed to support dynamically retrieving the complete correlation path of uncertainties based on the prediction scenario. For example, in extreme weather scenarios, the system can automatically query the complete correlation chain of "extreme weather - meteorological station data - regional load - electricity price fluctuation" and obtain the influence parameters of each link, providing structured knowledge support for subsequent uncertainty quantification.
[0076] For the training stage of the correlation constraint embedding model, the acquired correlation data and impact lag time can be imported into the trend rate expression model. This model can predict the changing trend and fluctuation range of power load in the next cycle based on historical data and real-time information. The trend rate expression model can transform the structured correlation information provided by the knowledge graph into a quantitative prediction basis, so that load trend prediction not only relies on historical statistical regularities, but also can perceive the dynamic impact of current uncertainties. On this basis, the reconstructed Bayesian neural network is improved, and the correlation information provided by the knowledge graph is embedded as a constraint condition into the model training process. The specific implementation can include two aspects: First, embedding knowledge graph correlation constraints into the Gaussian prior distribution of weight parameters. For example, when the knowledge graph shows that "the correlation between high temperature weather and regional load increase is ≥0.8", the mean of the prior distribution of the corresponding neuron weights is shifted positively by 0.2. Second, constraining time-series dependencies. For example, when the knowledge graph shows that "there is a 2-hour lag correlation between policy adjustments and electricity price fluctuations", the time step dependency coefficient of the time-series layer weights is constrained to enhance the model's ability to capture features in the lag period. During training, variational inference is used to approximate the posterior distribution, and a knowledge graph constraint loss term is introduced simultaneously, accounting for 20% of the total loss. Through this design, the model training can both fit the actual data distribution and follow the objective correlation laws in the power industry. This allows the model to learn the data distribution while adhering to the objective correlation laws in the power industry, avoiding deviations in prediction results from the actual scenario and significantly improving the model's generalization ability and prediction reliability.
[0077] For the dynamic optimization of confidence intervals, the system adaptively selects the corresponding load forecasting network based on the predicted trend. Different network architectures are adopted for different forecast periods and scenario characteristics: short-term forecasts (e.g., 1-24 hours ahead) use a hybrid network of LSTM and CNN to capture high temporal resolution local features and spatial correlations; medium- and long-term forecasts (e.g., 1-30 days ahead) use a hybrid network of Transformer and GRU to better model long-term temporal dependencies and periodic patterns. This adaptive selection mechanism ensures that different forecasting tasks can be matched with the most suitable model structure. Based on scenario adaptive normalization technology and combined with the scenario classification capabilities of the knowledge graph, a scenario-parameter mapping table is constructed. For four typical scenarios—extreme weather, holidays, policy adjustments, and energy price fluctuations—initial parameters for confidence interval calculation are pre-set, including mean offset coefficients and variance adjustment coefficients, laying the foundation for uncertainty quantification under different scenarios. In the prediction inference stage, the knowledge graph matching algorithm determines the type of the current forecast scenario and identifies the core influencing factors. The system dynamically calls the corresponding initial parameters from the scenario-parameter mapping table and fine-tunes the parameters based on the attribution analysis results output by the large model. For example, when policy adjustments are identified as a core influencing factor with an impact weight ≥ 30%, the variance adjustment coefficient of the 95% confidence interval is increased by 0.15 to appropriately expand the confidence interval to cover potential risks; when the influencing factor is routine weather changes with an impact weight ≤ 10%, the variance adjustment coefficient is decreased by 0.08 to compress the confidence interval to improve prediction accuracy. The optimized confidence interval needs to pass coverage verification, requiring an actual coverage rate of no less than 92% at the 95% confidence level. If the verification fails, the system automatically triggers a reverse update mechanism to iteratively optimize the association parameters in the knowledge graph and the confidence interval calculation parameters, forming a closed-loop feedback. Through this mechanism, the rationality and coverage of the confidence interval are continuously improved; that is, in scenarios where the knowledge graph clearly indicates strong associations, the confidence interval is appropriately narrowed to improve accuracy; in scenarios with complex and intertwined uncertainties, the confidence interval is correspondingly widened to reflect the true risks. Through this deep integration, the interpretability and reliability of uncertainty quantification results are comprehensively improved, providing a more reliable basis for risk quantification in power grid dispatching decisions.
[0078] Furthermore, to enhance the model's generalization ability in new regions or scenarios and reduce its dependence on target domain data, this application also introduces a transfer learning mechanism. This mechanism enables rapid deployment and application of the model through the transfer and adaptation of knowledge from the source domain to the target domain. Specifically, firstly, a source domain load prediction dataset is constructed, forming a source domain model library. The source domain dataset can cover multiple different regional types, including urban power grids, rural power grids, industrial parks, etc.; it also covers multiple typical scenarios, such as peak load periods, off-peak load periods, extreme weather periods, and holidays. Each region and scenario contains validated load data and its corresponding prediction model, which are systematically organized to form a large-scale source domain model library, providing a rich source of knowledge for subsequent transfer. Secondly, a joint metric method can be used to select the basic transfer model that best fits the target domain. That is, by combining two metrics—SHAP (SHapley Additive exPlanations) value distribution similarity and maximum mean difference—the similarity between the source domain and the target domain is calculated from the feature distribution level. SHAP value distribution similarity measures the closeness of feature importance distributions, while maximum mean difference assesses the differences between overall feature distributions. Using joint metrics, the 3-5 models with the highest similarity from the source domain model library are selected as the base transfer models. Then, domain adaptation techniques are used to align the feature distributions of the source and target domains. Specifically, Domain-Adversarial Neural Networks (DANNs) are employed, introducing an adversarial training mechanism during feature extraction. This allows the model to learn general feature representations that are both predictive and insensitive to domain changes, effectively reducing the distribution differences between the source and target domains and improving the model's adaptability in the target domain. Finally, a weighted ensemble algorithm is used to achieve rapid adaptation of the base model to the target scene. Based on the similarity scores between each source domain model and the target domain, the optimal combination weight for each model in the ensemble is calculated; higher similarity results in higher weights. By fusing knowledge from multiple source domain models through weighted ensemble, a high-performance prediction model can be built even when target domain data is scarce, significantly reducing model training costs and shortening the training cycle.
[0079] To facilitate a better understanding of the load forecasting method proposed in the embodiments of this application by those skilled in the art, the following is combined with... Figure 5-7 Further details are provided.
[0080] like Figure 5As shown, the load forecasting system involved in this load forecasting method adopts a four-layer architecture design, covering the data layer, model layer, application layer, and security layer, possessing high reliability, real-time performance, scalability, and security. The application layer provides full-featured visual interaction and business support for different types of users, including grid dispatchers, electricity market traders, and system maintenance personnel. This layer is developed using the Vue framework and the ECharts (an open-source JavaScript data visualization library) visualization library, supporting responsive layout design and adapting to PCs, dispatch screens, and mobile terminals. The interface is simple and intuitive, meeting the needs of multiple usage scenarios. The core functions of the application layer include: visual display of forecast results, such as displaying the 96-point load forecast curve and electricity price forecast results through a line chart; displaying regional load distribution characteristics through a heat map; and displaying load trend changes through a bar chart. Users can filter and query by time period (hour, day, week, month), region (province, city, county, line), and load type (residential load, industrial load, commercial load), and can accurately view the forecast values for a single time point. The user-interactive interface supports user-defined forecast parameters, including forecast period (selectable from 1 to 96 hours), confidence level (selectable from 90% / 95% / 99%), and warning threshold settings. It provides an entry point for manual intervention in model parameters, meeting the fine-tuning needs of advanced users. It also supports retrospective querying and comparative analysis of historical forecast results, facilitating user evaluation of model performance changes. Uncertainty is displayed visually on the load forecast curve using a shaded overlay method, showing the uncertainty range at the 95% confidence level. Users can switch between viewing ranges at different confidence levels, such as 90% and 99%. The interface synchronously displays the forecast uncertainty coefficient and labels the risk level (low, medium, high) based on the uncertainty coefficient and the risk assessment results associated with the knowledge graph, enabling dispatchers to clearly grasp the reliability of the forecast results. Deviation analysis automatically generates daily, weekly, and monthly deviation analysis reports, displaying the values and trends of core indicators such as MAPE, RMSE, and MAE. Through knowledge graph visualization technology, it intuitively presents the causes of deviations, impact paths, and the weight distribution of influencing factors, making the sources of deviations readily apparent. Reports can be exported in batches in PDF and Excel formats for easy archiving and sharing. The system management section provides comprehensive system management functions for operations and maintenance personnel, including model parameter configuration, data source management, user permission allocation (RBAC (Role-Based Access Control)), log querying, and system status monitoring. Operations and maintenance personnel can view the real-time operating status of each module through a visual interface, quickly locate and handle faults, and ensure stable system operation.
[0081] The model layer, serving as the core intelligent engine of the system, deploys a first preset prediction model (a small temporal neural network model), a second preset prediction model (a large autoregressive language model), a knowledge graph engine, and an uncertainty quantification module. This layer is deployed on a GPU (Graphics Processing Unit) server cluster (16 compute nodes, each equipped with an NVIDIA A100 GPU, with 40GB of dedicated memory per card), supporting parallel inference, dynamic load balancing, and collaborative work among multiple models. A message queue mechanism enables asynchronous communication between large and small models, ensuring efficient and stable data interaction; it also supports model fault self-checking and automatic switching to backup models, guaranteeing the continuity of prediction services.
[0082] The data layer is responsible for the full lifecycle management of multi-source heterogeneous data, including data acquisition, storage, preprocessing, and cache management. This layer can adopt a Lambda architecture to achieve integrated batch and stream processing. Specifically, the speed layer handles real-time data stream processing, using the Apache Flink (an open-source distributed stream processing framework and computing engine) real-time computing engine to process second-level data streams, ensuring efficient real-time data processing. This layer can perform real-time data cleaning, automatic outlier identification and removal based on the 3σ criterion, and time-series alignment of multi-source data. The end-to-end latency of window aggregation operations is controlled within 5 seconds, ensuring high efficiency in real-time data processing and providing up-to-date data support for real-time prediction. The batch processing layer is built on Spark (an open-source distributed in-memory computing framework) with a cluster size of 16 nodes, performing incremental processing on the previous day's data from 2 AM to 4 AM daily. Batch processing tasks include: imputing missing values using a combination of linear interpolation and LSTM prediction, achieving an accuracy rate of over 97%; performing Min-Max normalization on numerical data, uniformly mapping it to the [0,1] interval; and extracting time-series features using a sliding window method (window size 24 hours), including mean, variance, peak, valley, and trend features within the window. Through these processes, a data compression ratio of 1:10 is achieved, significantly improving storage efficiency while maintaining data quality. The service layer caches hot data through Redis (Remote Dictionary Server), including load data for the past 7 days, real-time weather data, recent forecast results, and core knowledge graph data. The cache hit rate remains stable above 90%, and the data query response time does not exceed 50 milliseconds, providing high-speed data access services for upper-layer applications. The data storage employs a distributed architecture, selecting the optimal storage solution based on different data types: structured data is stored in a MySQL (an open-source relational database management system) cluster, using a master-slave replication model to ensure high availability; unstructured text data is stored in Elasticsearch (an open-source, distributed, real-time search and analytics engine), supporting full-text search and fast querying; knowledge graph data is stored in the Neo4j graph database, forming a distributed storage system that supports efficient graph querying and relational reasoning; and log data is stored in the ELK log analysis platform, facilitating system maintenance and problem tracing. Through this distributed storage system, the system can support efficient storage, fast retrieval, and historical backtracking of massive amounts of data, providing a solid data foundation for predictive analytics.
[0083] The security layer employs a comprehensive, multi-layered security protection strategy, covering all dimensions of data, models, and systems. Regarding data security, data transmission utilizes the national standard SM4 encryption algorithm to prevent data theft or tampering; data storage is encrypted, and user-side load data and sensitive market data undergo anonymization and desensitization; Role-Based Access Control (RBAC) enables fine-grained permission management, categorizing users into roles such as administrators, schedulers, and observers, with different roles corresponding to different data access permissions. Only authorized users can access sensitive data, and all operations are fully traceable. For model security, model parameters are transmitted through encrypted channels, employing digital signatures to prevent model tampering, and unauthorized downloads are prohibited after model deployment; federated learning technology ensures that raw data does not leave the local machine, avoiding data privacy leaks; a model version management mechanism is established to support model rollback and prevent model failure due to optimization failures. For system security, an intrusion detection system and a next-generation firewall are deployed to monitor abnormal access and network attack behavior in real time, conduct regular vulnerability scans and security audits, and promptly remediate security vulnerabilities; the principle of least privilege is implemented, ensuring each component only has the necessary operational permissions to reduce attack risks. In terms of operational security, the system is set up with redundant backups. Three copies of critical modules (data storage and model inference) are deployed to support automatic failover with a failover time of no more than 1 second. A disaster recovery center is established to regularly back up data and model parameters to ensure that data is not lost and services are recoverable under extreme failures.
[0084] like Figure 7As shown, to further enhance the system's real-time response capability and operational reliability, this embodiment also adopts an architecture mode of collaborative deployment of edge computing nodes and a cloud platform. Edge computing nodes are deployed near data sources, such as power grid dispatch terminals and control centers of 220kV and above substations, undertaking real-time data processing, lightweight model inference, and local prediction tasks in emergency scenarios. Each edge node is equipped with an industrial-grade server (CPU: Intel Xeon Gold6348, GPU: NVIDIA T4, 64GB memory, 1TB storage), deploying a data preprocessing module, a lightweight version of a small model, a local caching unit, and basic prediction services. During normal operation, the edge computing nodes are responsible for local preprocessing of the collected real-time data and calling the lightweight version of the small model for rapid inference, significantly reducing data transmission latency and ensuring that the inference response time is controlled within 500 milliseconds, meeting the real-time requirements of power grid dispatch. The cloud platform is deployed in the provincial power grid dispatch center data center, adopting a distributed cluster architecture, deploying complete data processing, model training, predictive analysis, and management services, responsible for global prediction, model optimization and upgrades, knowledge graph updates, and big data storage and analysis. Edge computing nodes and the cloud platform employ a dual-link communication mode of 5G and fiber optics, with automatic switching between primary and backup links to ensure the stability and reliability of data transmission. In emergency scenarios, such as network outages or cloud platform failures, edge computing nodes possess independent operating capabilities. Each node is equipped with a local cache unit to store core model parameters and basic data, enabling continuous prediction services even in network outages, maintaining prediction continuity for 48 hours, and ensuring critical decision support for power grid dispatching under extreme conditions. Through this edge-cloud collaborative deployment architecture, this invention significantly improves the system's real-time response capabilities, fault tolerance, and service reliability while maintaining prediction accuracy, providing strong support for the safe and stable operation of the power grid.
[0085] This application embodiment is also equipped with a visual interactive interface to provide a direct and convenient human-computer interaction experience for power grid dispatchers, power market traders and system maintenance personnel. The visual interactive interface has the following core functions: (1) Visual display function: supports the visualization of multi-dimensional prediction and analysis results. Including the dynamic display of load prediction curves (which can be switched by hourly, daily, weekly and monthly granularity); the time series distribution of electricity price prediction results; the uncertainty interval of multiple confidence levels is superimposed on the prediction curve in the form of shaded areas to intuitively reflect the prediction risk; the deviation analysis report is presented in the form of structured charts to show the changing trends of core indicators such as MAPE, RMSE and MAE; the knowledge graph relationship is visualized in the form of network diagram to clearly show the relationship path between each influencing factor; the weight distribution of influencing factors is presented in the form of pie chart or bar chart to intuitively reflect the relative importance of each factor to the prediction result. (2) User-defined query function: Supports users to filter prediction results by multiple dimensions, including regional dimension (province, city, county, line), time period (hour, day, week, month), load type (residential load, industrial load, commercial load), and scenario type (extreme weather, holidays, policy adjustment period, energy price fluctuation period). Users can flexibly customize query conditions according to actual needs and quickly obtain target data. (3) Anomaly warning function: The system monitors prediction deviation indicators and uncertainty risk levels in real time. When the prediction deviation exceeds the preset threshold or the uncertainty risk level is too high, a multi-level warning mechanism is automatically triggered. Warning methods include interface audio and visual prompts, SMS push and system pop-up notifications to ensure that relevant personnel can obtain warning information in a timely manner. The warning level is divided into three levels: general, important and urgent. Different levels correspond to different notification strategies and processing procedures. Users can customize the configuration of warning rules according to actual needs, including the threshold setting of each deviation indicator, the triggering conditions of each risk level, and the selection of warning methods, so that the warning mechanism can flexibly adapt to the management requirements of different application scenarios.
[0086] like Figure 6As shown, this application's embodiment adopts a collaborative intelligent agent architecture of "large model (second preset prediction model) + small model (first preset prediction model)". Through clear functional division and efficient collaborative mechanism, it achieves complementary advantages between the two types of models, forming a collaborative prediction capability of micro-level accurate prediction and macro-level inference and attribution, balancing prediction accuracy and interpretability. The small model focuses on structured data processing, built on a hybrid temporal neural network architecture, integrating temporal network modules such as LSTM, CNN, and Transformer, and using a hybrid expert architecture to organize multiple specialized sub-models. Each sub-model is responsible for short-term load forecasting (1-24 hours), medium-term load forecasting (1-7 days), long-term load forecasting (1-30 days), and short-term electricity price forecasting tasks, achieving accurate numerical prediction output. Simultaneously, the small model performs deviation analysis during inference, identifies prediction error characteristics, and generates targeted model optimization suggestions, providing a basis for subsequent iteration and upgrades. The large model focuses on unstructured data processing and deep inference, based on a general large language model that has been lightweighted and fine-tuned for the power field. A high-efficiency parameter fine-tuning technique combining LoRA and PTuning-II is employed to quickly adapt the model to power sector tasks while freezing core parameters. The fine-tuned large model possesses core capabilities such as in-depth market trend analysis, multi-factor attribution interpretation of electricity price fluctuations, impact assessment of emergencies, and semantic report generation. It can extract key information from unstructured data such as policy texts, market reports, and emergency notifications, and output interpretable inference results. The small and large models communicate asynchronously via a RabbitMQ message queue, ensuring efficient and stable data exchange. The small model sends prediction results, deviation data, and operating status parameters to the message queue every 15 minutes; the large model retrieves data from the queue, completes attribution analysis, and returns a list of influencing factors, trend judgments, and influence weights. Finally, an attention-weight fusion strategy is used to dynamically fuse the numerical prediction results of the small model and the inference analysis results of the large model. This ensures that the final output retains the accuracy of the small model's numerical predictions while incorporating the large model's deep understanding of macroeconomic factors, achieving an organic unity of prediction accuracy and interpretability.
[0087] The operation process of this load forecasting system can be divided into three stages: initialization, real-time forecasting, and iterative optimization. The entire process is automated and requires no manual intervention.
[0088] System initialization is performed on the first run after deployment or after a version update. It aims to complete the configuration and joint debugging of each module and lay the foundation for subsequent real-time operation. During the system initialization phase, (1) Data layer initialization: Connect the interfaces of each data source, including SCADA system, meteorological API, power market database, equipment operation and maintenance system, etc., and complete data source verification and permission authentication. Import the historical load, electricity price, meteorology, policy text and other data of the past 5 years in batches, perform the first full data preprocessing, and build the initial dataset and knowledge graph base library. (2) Model layer initialization: Load the fine-tuned large model, the trained and optimized small model and knowledge graph engine, and configure the model running parameters (such as inference batch size, initial value of attention weight, confidence interval calculation parameters, etc.). Deploy the edge-cloud collaborative communication link, complete the model fault self-check and backup model switching test, and ensure that each component of the model layer is ready. (3) Application layer and security layer initialization: Configure user permissions, early warning thresholds, visualization display rules, and start the security protection modules such as data encryption and intrusion detection. Complete the joint debugging of the entire system link, verify that each module works normally, and prepare for real-time operation.
[0089] After initialization, the system enters the real-time prediction phase of continuous operation, and performs data collection, prediction inference, result output and real-time monitoring according to a fixed cycle. In the real-time prediction phase, (1) Data collection and preprocessing: Edge nodes collect real-time load, meteorological and equipment operation data every 5 minutes, and synchronize electricity market data and policy text data every 1 hour. The collected data is cleaned, denoised and time-series aligned in real time, and missing values are filled in in real time by combining linear interpolation and LSTM prediction. Structured data and unstructured data are extracted separately, and a comprehensive feature matrix is generated through the multimodal data fusion module. (2) Collaborative prediction inference: The small model of the edge node outputs short-term, medium-term and long-term load prediction values and short-term electricity price prediction values based on the comprehensive feature matrix, and uploads the prediction results and operating status parameters to the cloud big model at the same time. The cloud big model combines unstructured text data and knowledge graph to complete market trend analysis, electricity price fluctuation attribution and influence weight calculation, and generate semantic analysis report. (3) Result fusion and output: The result fusion module integrates the predicted values of the small model and the analysis results of the large model based on the attention weight strategy, and outputs the final prediction results, confidence intervals of multiple confidence levels and risk levels. The prediction results are displayed in real time through a visualization interface and are simultaneously pushed to external systems such as the power grid dispatch system and the power market trading platform. (4) Real-time monitoring: The edge nodes compare the prediction results with the actual load data in real time, calculate deviation indicators such as MAPE, RMSE, and MAE and confidence interval coverage, continuously monitor the system operation status and data transmission stability, and provide triggering basis for iterative optimization.
[0090] When the real-time monitoring indicators trigger the optimization conditions, the system automatically enters the iterative optimization stage, forming a closed-loop feedback through deviation analysis, model tuning, and verification updates. In the iterative optimization stage, (1) Deviation analysis: When the monitoring indicators exceed the preset threshold and trigger the tuning process, the deviation analysis module combines the attribution results of the large model with the knowledge graph to locate the core causes of the deviation, such as model parameter drift, insufficient feature extraction, and failure to include new influencing factors, and generates targeted tuning suggestions. (2) Model tuning: The cloud or edge nodes perform corresponding optimization operations based on the tuning suggestions. For small models, parameter optimization or incremental learning is performed; for large models, prompt word optimization and incremental fine-tuning are performed; at the same time, the entities, relations and vector representations in the knowledge graph are updated to complete the model iteration. (3) Model update and verification: The tuned model parameters are synchronized to the entire system, and a verification set is constructed using recent historical data and real-time incremental data to verify the optimization effect. If the deviation indicators meet the standards and the confidence interval coverage meets the requirements, the running model is updated; if the standards are not met, the system is backtracked to the state before tuning, the tuning strategy is readjusted, and the system is executed again. (4) Log recording: Record the triggering conditions, optimization strategies and effect data of this iteration to form a structured operation log, which provides a reference for subsequent backtracking analysis and strategy optimization, and continuously improves the efficiency of closed-loop optimization.
[0091] Through the above three-stage process, the load forecasting system achieves automated management of the entire lifecycle, from initial deployment to real-time operation and continuous optimization, ensuring that forecasting performance can dynamically adapt to changes in load characteristics.
[0092] To verify the effectiveness and superiority of the load forecasting method in this application, a test environment was built based on nearly three years of actual operating data from a provincial power grid (including load, electricity price, meteorological, and policy text data, totaling approximately 1.2TB). The test environment maintained the same architecture as the actual deployment, including a 16-node GPU cluster, edge computing nodes, and a distributed database. A single LSTM model, a conventional deep learning hybrid model, and a large-scale collaborative model without a knowledge graph were selected as comparison objects. Comparative tests were conducted from four dimensions: prediction accuracy, interpretability, real-time performance, and generalization ability. The specific results are as follows: (1) The method of this application achieves an accuracy of 98.7% in short-term load forecasting of 96 points, with an average absolute percentage error of 1.62%; the root mean square error of short-term electricity price forecasting is 0.58 yuan / MWh. Compared with the single LSTM model in related technologies (MAPE=4.8%, RMSE=1.75 yuan / MWh), the load forecasting accuracy is improved by 66.2%, and the electricity price forecasting accuracy is improved by 66.9%; compared with the large-scale model collaborative model without knowledge graph (MAPE=2.3%, RMSE=0.81 yuan / MWh), the load forecasting accuracy is improved by 29.6%, and the electricity price forecasting accuracy is improved by 28.4%. In extreme rainstorm weather scenarios, the MAPE of the solution of this invention is controlled within 2.1%, which is significantly better than the comparative model (the MAPE of the comparative model in extreme scenarios is ≥3.5%).
[0093] (2) The method in this application embodiment achieves an accuracy of 91.3% in explaining the causes of prediction deviations and electricity price fluctuations, and an actual coverage rate of 93.2% for the 95% confidence interval, reducing prediction risk by 32.7% in extreme scenarios. In contrast, the models in related technologies and collaborative models without knowledge graphs cannot achieve accurate attribution analysis, have a confidence interval coverage rate of less than 85%, and have significantly weak risk management capabilities.
[0094] (3) In the method of this application embodiment, the inference response time of a single short-term prediction by the edge node is 420 milliseconds, and the entire process (data acquisition-prediction-output) takes no more than 2 seconds, which fully meets the real-time requirements of power grid dispatch. Comparative tests show that the collaborative model without edge deployment takes more than 5 seconds for the entire process, and the model of related technologies takes more than 3 seconds. The real-time advantage of the method of this application embodiment is significant.
[0095] (4) In scenarios where new regional data is scarce (only 3 months of historical data are provided), the prediction accuracy of the method in this embodiment can still reach 91.5%, and the model adaptation period is 48 hours. The prediction accuracy of the comparative model in the same scenario is all below 82%, and the adaptation period exceeds 120 hours. The test results show that the transfer learning and domain adaptation mechanism introduced by the method in this embodiment effectively improves the generalization ability and adaptation efficiency of the model.
[0096] In summary, the load forecasting method proposed in this application has at least the following beneficial effects: (1) Through the collaboration of large and small models, multimodal data fusion and deviation correction mechanism, the accuracy of short-term load forecasting of 96 points reached more than 98.5%, MAPE was controlled within 1.8%, and the short-term electricity price forecast RMSE dropped to less than 0.62 yuan / MWh. Compared with the single model, the accuracy was improved by more than 35%. It can accurately capture the load fluctuation characteristics brought about by new energy grid connection and new load access, and effectively cope with complex scenarios such as extreme weather and policy adjustments.
[0097] (2) The combination of knowledge graph and large model attribution analysis enables the visualization of prediction results, causes of deviations and factors of electricity price fluctuations, thus solving the "black box" problem of traditional models. The multi-confidence level confidence intervals output by the uncertainty quantification module, combined with knowledge graph optimization, achieve a 95% confidence interval coverage rate of over 92%, providing clear risk assessment basis for power grid dispatch, reducing the prediction risk of extreme scenarios by more than 30%, and significantly improving the scientific nature and safety of decision-making.
[0098] (3) Transfer learning and domain adaptation mechanism enable the model to quickly adapt to new regions and new scenarios. When data is scarce, the prediction accuracy can still be maintained above 90%, and the model adaptation cycle is shortened by more than 60%. The automated iterative closed loop gives the model continuous learning ability, which can dynamically adapt to changes in load characteristics and achieve performance optimization without manual intervention, greatly reducing maintenance costs.
[0099] (4) Edge-cloud collaborative deployment architecture, edge node inference response time is controlled within 500ms, which fully meets the real-time requirements of power grid dispatch; hybrid expert architecture, lightweight fine-tuning technology and containerized deployment scheme balance prediction accuracy and resource consumption, support elastic scaling, adapt to the hardware conditions of different levels of power grid dispatch centers, and are easy to promote and apply on a large scale.
[0100] (5) High-precision forecasting can effectively improve the efficiency of new energy consumption, reduce the peak-shaving cost and reserve capacity configuration of the power grid, and is expected to improve the economic efficiency of power grid operation by 5%-8%; provide accurate data support for power market transactions, promote the efficient operation of the power market, and reduce transaction risks; help the construction of new power systems and the implementation of the "dual carbon" target, and has significant market promotion prospects and social and economic benefits.
[0101] (6) The security layer in the four-layer architecture adopts a comprehensive protection strategy. Through data encryption, access control, model signing, intrusion detection and other technologies, it ensures the security of data, models and systems. The edge-cloud dual-link communication and redundant backup mechanism ensure that the prediction service is not interrupted in extreme failure and network outage scenarios, and improves the reliability of system operation.
[0102] The load forecasting method proposed in this application involves acquiring and preprocessing current multi-source heterogeneous data of the power system to obtain a structured dataset and an unstructured text dataset. Based on the structured dataset, a first prediction result set is generated using a time-series neural network model trained on historical multi-source heterogeneous data. Based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using an autoregressive language model trained on a power industry-specific corpus. Finally, the final load forecasting result is generated based on the first and second prediction result sets. Thus, by constructing a hybrid architecture with two models working collaboratively and fusing the outputs of the two models, the method solves the problems of low load forecasting accuracy, poor interpretability, and inability to quantify forecasting risks in related technologies, achieving the technical effects of improved load forecasting accuracy, interpretable forecasting results, and quantifiable forecasting risks.
[0103] Next, the load prediction device proposed according to the embodiments of this application is described with reference to the accompanying drawings.
[0104] Figure 8 This is a block diagram of a load forecasting device according to an embodiment of this application.
[0105] like Figure 8 As shown, the load prediction device 10 includes: an acquisition module 100, a first generation module 200, a second generation module 300, and a third generation module 400.
[0106] Among them, the acquisition module 100 is used to acquire the current multi-source heterogeneous data of the power system and preprocess the current multi-source heterogeneous data to obtain a structured dataset and an unstructured text dataset. The first generation module 200 is used to generate a first prediction result set based on a structured dataset and using a first preset prediction model. The first preset prediction model is a time-series neural network model trained with historical multi-source heterogeneous data, which is used to capture the time-series dependencies of the load data. The second generation module 300 is used to generate a second prediction result set based on the unstructured text dataset and the first prediction result set using a second preset prediction model. The second preset prediction model is an autoregressive language model trained on a corpus specifically for the power industry, used for semantic understanding and causal reasoning of unstructured text data. The third generation module 400 is used to generate the final load forecast result based on the first forecast result set and the second forecast result set.
[0107] Optionally, in some embodiments, the third generation module 400 is specifically used for: Based on the attention mechanism, the load prediction values in the first prediction result set are used as the query vector, and the weights of the influencing factors in the second prediction result set are used as the key vector to calculate the dynamic attention weight of each influencing factor at the current prediction time. The prediction correction is calculated based on dynamic attention weights and a preset factor-influence function. Based on the predicted correction amount and the confidence prediction results in the first prediction result set, the load prediction values are weighted and corrected to generate the final load prediction result.
[0108] Optionally, in some embodiments, when generating the final load forecast result based on the first forecast result set and the second forecast result set, the third generation module 400 is further configured to: Obtain the quality metrics of the current multi-source heterogeneous data, including the data missing rate and data latency. Determine the prediction variance of the load forecast values from the first set of forecast results, and calculate the entropy value of the dynamic attention weights; Based on the entropy value of dynamic attention weights, data missing rate, and data latency, the amplification factor for prediction variance is determined. Based on the prediction variance, amplification factor, and preset confidence level coefficients, a multi-confidence level confidence interval corresponding to the final load prediction result is generated.
[0109] Optionally, in some embodiments, after generating the final load forecast result based on the first forecast result set and the second forecast result set, the third generation module 400 further includes: The calculation unit is used to calculate at least one prediction deviation index based on the final load forecast result and the actual load data in the current multi-source heterogeneous data. The generation unit is used to generate deviation source analysis results based on the attribution analysis results in the second prediction result set and the preset power field knowledge graph when at least one prediction deviation index is greater than the corresponding preset threshold. The processing unit is used to perform incremental learning or hyperparameter adjustment on the first preset prediction model based on the analysis results of the deviation sources, and / or to optimize the prompt words or fine-tune the model on the second preset prediction model.
[0110] Optionally, in some embodiments, before generating the deviation source analysis results based on the attribution analysis results in the second prediction result set and a preset power domain knowledge graph, the generation unit is further configured to: Identify the entity type, which includes at least one of the following: policy entity, meteorological entity, market entity, equipment entity, regional entity, and time entity; Determine the semantic relationships between entity types and construct a set of triples based on entity types and semantic relationships; Vectorize the set of triples to generate a vectorized representation of the relationship between entities and semantic relations; The vectorized representations are stored in a graph database to obtain a pre-defined knowledge graph for the power sector.
[0111] It should be noted that the foregoing explanation of the load forecasting method embodiment also applies to the load forecasting device of this embodiment, and will not be repeated here.
[0112] The load forecasting device proposed in this application acquires and preprocesses current multi-source heterogeneous data of the power system to obtain a structured dataset and an unstructured text dataset. Based on the structured dataset, a first prediction result set is generated using a time-series neural network model trained on historical multi-source heterogeneous data. Based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using an autoregressive language model trained on a power industry-specific corpus. Finally, a final load forecasting result is generated based on the first and second prediction result sets. Thus, by constructing a hybrid architecture with dual models working collaboratively and fusing the outputs of the two models, the device solves the problems of low load forecasting accuracy, poor interpretability, and inability to quantify forecasting risks in related technologies, achieving the technical effects of improved load forecasting accuracy, interpretable forecasting results, and quantifiable forecasting risks.
[0113] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 901, the processor 902, and the computer program stored on the memory 901 and capable of running on the processor 902.
[0114] When processor 902 executes the program, it implements the load prediction method provided in the above embodiments.
[0115] Furthermore, electronic devices also include: Communication interface 903 is used for communication between memory 901 and processor 902.
[0116] The memory 901 is used to store computer programs that can run on the processor 902.
[0117] The memory 901 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0118] If the memory 901, processor 902, and communication interface 903 are implemented independently, then the communication interface 903, memory 901, and processor 902 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0119] Optionally, in a specific implementation, if the memory 901, processor 902, and communication interface 903 are integrated on a single chip, then the memory 901, processor 902, and communication interface 903 can communicate with each other through an internal interface.
[0120] The processor 902 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0121] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the load forecasting method described above.
[0122] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the load forecasting method described above.
[0123] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0124] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0125] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A load forecasting method, characterized in that, Includes the following steps: Acquire the current multi-source heterogeneous data of the power system, and preprocess the current multi-source heterogeneous data to obtain a structured dataset and an unstructured text dataset; Based on the structured dataset, a first prediction result set is generated using a first preset prediction model, wherein the first preset prediction model is a time-series neural network model trained with historical multi-source heterogeneous data, used to capture the time-series dependencies of the load data. Based on the unstructured text dataset and the first prediction result set, a second prediction result set is generated using a second preset prediction model. The second preset prediction model is an autoregressive language model trained on a corpus specifically for the power industry, used for semantic understanding and causal reasoning of unstructured text data. Based on the first prediction result set and the second prediction result set, the final load prediction result is generated.
2. The method according to claim 1, characterized in that, The step of generating the final load forecast result based on the first forecast result set and the second forecast result set includes: Based on the attention mechanism, the load prediction values in the first prediction result set are used as the query vector, and the weights of the influencing factors in the second prediction result set are used as the key vector to calculate the dynamic attention weight of each influencing factor at the current prediction time. Based on the dynamic attention weights and the preset factor-influence function, the prediction correction amount is calculated; Based on the predicted correction amount and the confidence prediction results in the first prediction result set, the load prediction value is weighted and corrected to generate the final load prediction result.
3. The method according to claim 2, characterized in that, When generating the final load forecast result based on the first forecast result set and the second forecast result set, the method further includes: Obtain the quality indicators of the current multi-source heterogeneous data, wherein the quality indicators include data missing rate and data latency; The prediction variance of the load prediction value is determined from the first prediction result set, and the entropy value of the dynamic attention weight is calculated. Based on the entropy value of the dynamic attention weight, the data missing rate, and the data delay time, determine the amplification factor for the prediction variance; Based on the prediction variance, the amplification factor, and the preset confidence level coefficient, a multi-confidence level confidence interval corresponding to the final load prediction result is generated.
4. The method according to claim 1, characterized in that, After generating the final load forecast result based on the first forecast result set and the second forecast result set, the method further includes: Based on the final load forecast result and the actual load data in the current multi-source heterogeneous data, at least one forecast deviation index is calculated. If at least one prediction deviation index is greater than the corresponding preset threshold, a deviation source analysis result is generated based on the attribution analysis results in the second prediction result set and the preset power field knowledge graph. Based on the analysis results of the deviation sources, incremental learning or hyperparameter adjustment is performed on the first preset prediction model, and / or prompt word optimization or model fine-tuning is performed on the second preset prediction model.
5. The method according to claim 4, characterized in that, Before generating the deviation source analysis results based on the attribution analysis results in the second prediction result set and the preset power sector knowledge graph, the method further includes: The entity type is determined, and the entity type includes at least one of policy entity, meteorological entity, market entity, equipment entity, regional entity, and time entity; Determine the semantic relationships between entity types, and construct a set of triples based on the entity types and the semantic relationships; The set of triples is vectorized to generate a vectorized representation between the entity and the semantic relationship; The vectorized representation is stored in a graph database to obtain the preset knowledge graph of the power field.
6. A load forecasting device, characterized in that, include: The acquisition module is used to acquire the current multi-source heterogeneous data of the power system and preprocess the current multi-source heterogeneous data to obtain a structured dataset and an unstructured text dataset. The first generation module is used to generate a first prediction result set based on the structured dataset using a first preset prediction model, wherein the first preset prediction model is a time-series neural network model trained with historical multi-source heterogeneous data, used to capture the time-series dependencies of the load data. The second generation module is used to generate a second prediction result set based on the unstructured text dataset and the first prediction result set using a second preset prediction model. The second preset prediction model is an autoregressive language model trained on a corpus specifically for the power industry, used for semantic understanding and causal reasoning of unstructured text data. The third generation module is used to generate the final load forecast result based on the first forecast result set and the second forecast result set.
7. The apparatus according to claim 6, characterized in that, The third generation module is specifically used for: Based on the attention mechanism, the load prediction values in the first prediction result set are used as the query vector, and the weights of the influencing factors in the second prediction result set are used as the key vector to calculate the dynamic attention weight of each influencing factor at the current prediction time. Based on the dynamic attention weights and the preset factor-influence function, the prediction correction amount is calculated; Based on the predicted correction amount and the confidence prediction results in the first prediction result set, the load prediction value is weighted and corrected to generate the final load prediction result.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, the processor executing the program to implement the load forecasting method as described in any one of claims 1-5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the load forecasting method as described in any one of claims 1-5.
10. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to implement the load forecasting method according to any one of claims 1-5.