Power supply and demand factor prediction method and system

By combining a large language model with power system expertise to predict power supply and demand factors, this method solves the problems of insufficient utilization of unstructured text and rigid feature fusion, and achieves accurate prediction and intelligent decision support for power supply and demand factors.

CN121998695APending Publication Date: 2026-05-08ANHUI ELECTRIC POWER TRADING CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI ELECTRIC POWER TRADING CENT CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient utilization of unstructured text, inaccurate quantification of event impact, rigid feature fusion mechanisms, and limited prediction targets in power supply and demand factor forecasting, leading to increased difficulty in intelligent decision-making in the power market and threats to the security and stability of the power grid.

Method used

We employ a semantic understanding engine based on Large Language Model (LLM) and combine it with power system expertise to construct a text parsing model and a dynamic gating fusion model. This enables the structured transformation and feature fusion of unstructured text, and allows for the prediction of power supply and demand factors through a composite loss function.

Benefits of technology

It has improved the accuracy and scenario adaptability of power supply and demand factor forecasting, supported market clearing price prediction, thermal power unit bidding assistance and peak-shaving resource pre-allocation, and filled the technological gap in intelligent decision-making in the power market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998695A_ABST
    Figure CN121998695A_ABST
Patent Text Reader

Abstract

The invention provides a power supply and demand factor prediction method and system. The method comprises the following steps: acquiring an unstructured text of a power supply and demand factor influence event; constructing a text analysis model based on an LLM semantic understanding engine, and converting an unstructured text into structural standardized event description; analyzing the influence intensity of the power supply and demand factors according to the structure standardization event description through an influence intensity mapping mechanism based on context awareness; constructing a dynamic gating fusion model based on the real-time power supply and demand situation, and inputting parameters for feature fusion to obtain a power supply and demand factor feature vector; and performing power supply and demand factor prediction according to the power supply and demand factor feature vector by adopting a power supply and demand factor prediction model based on a composite loss function to obtain a prediction result. Through the method, qualitative leap of text analysis capability is realized, event influence quantification is more accurate and scientific, a feature fusion mechanism is more intelligent and flexible, and a prediction target better meets actual demands of an electricity market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and power systems, specifically to a method and system for predicting power supply and demand factors. Background Technology

[0002] The Power Supply-Demand Gap (PSDG), a core indicator for electricity market operation, is defined as the difference between total system electricity demand and non-thermal power unit electricity supply, i.e., bidding space = total electricity demand - total non-thermal power unit electricity supply. This indicator directly reflects the market bidding space in the power system that needs to be filled by thermal power units or other adjustable power sources, and is a key basis for determining day-ahead / real-time market clearing prices, unit start-up and shutdown plans, and ancillary service dispatch.

[0003] In recent years, the power system has been undergoing profound changes. By the end of 2024, the installed capacity of renewable energy in China had exceeded 1.4 billion kilowatts, accounting for more than 50% of the total installed capacity, of which wind power and photovoltaic power generation reached 440 million kilowatts and 610 million kilowatts, respectively. The large-scale and high-proportion integration of new energy sources has fundamentally changed the power system's supply and demand balance mechanism: on the one hand, the output of new energy sources is highly random and volatile due to meteorological conditions; on the other hand, the characteristics of traditional loads have become more complex due to new loads such as distributed energy and electric vehicles. These changes have led to increased fluctuations in power supply and demand factors, exhibiting strong uncertainty and event-driven characteristics.

[0004] Against this backdrop, the operation of the electricity market faces unprecedented challenges. Taking a provincial power grid in East China as an example, during a typical summer day in 2024, due to a sharp drop in photovoltaic output coupled with a surge in high-temperature loads, the electricity supply and demand factor changed drastically from -2000MW (oversupply) to +5000MW (undersupply) within two hours, causing real-time market prices to fluctuate by more than 500 yuan / MWh. This drastic fluctuation not only increases the decision-making difficulty for market participants but also poses a threat to the safe and stable operation of the power grid. Therefore, accurately predicting the changing trends of electricity supply and demand factors and identifying the risk of supply and demand imbalances in advance has become an urgent need for modern intelligent decision-making systems in the electricity market.

[0005] However, forecasting electricity supply and demand factors faces multiple technical challenges. Besides conventional time series patterns, numerous external events disrupt the existing balance by altering both supply and demand: weather warnings affect load curve shapes, holiday work schedule adjustments change electricity consumption patterns, announcements of limited renewable energy output directly compress non-thermal power supply capacity, and grid maintenance plans affect transmission capacity. This event information mostly exists in unstructured text form in dispatch logs, weather services, government announcements, and other channels, making it difficult to effectively extract and utilize using traditional methods. Although artificial intelligence technology has made significant progress in power system analysis in recent years, especially deep learning models which have performed excellently in load forecasting, a systematic method for representing the core variables of electricity supply and demand factors—reflecting market bidding space—still lacks a robust approach.

[0006] Breakthroughs in Large Language Models (LLMs) have provided new insights into this problem. LLMs demonstrate powerful capabilities in semantic understanding, text generation, and knowledge reasoning, extracting key information from unstructured text and performing context-aware semantic analysis. However, general-purpose large models lack power system expertise, and directly applying them to power market scenarios can lead to inaccurate information extraction and misunderstandings of technical terms. Therefore, effectively combining the powerful language understanding capabilities of large models with power system expertise to construct specialized feature representation methods for predicting power supply and demand factors has become a cutting-edge research direction. Summary of the Invention

[0007] Therefore, this invention provides a method and system for predicting power supply and demand factors, aiming to solve the technical problems of insufficient utilization of unstructured text, inaccurate quantification of event impact, rigid feature fusion mechanism, and limited prediction objects in the existing technology for predicting power supply and demand factors.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] According to a first aspect of the present invention, the present invention provides a method for predicting electricity supply and demand factors, the method comprising: Obtain unstructured text of events affecting electricity supply and demand factors; Construct a text parsing model based on an LLM semantic understanding engine, and use the text parsing model to convert the unstructured text into a structured standardized event description; By using a context-aware impact intensity mapping mechanism, the impact intensity of power supply and demand factors is analyzed based on the structurally standardized event description. A dynamic gating fusion model based on real-time power supply and demand situation is constructed. The standardized event description and the influence intensity of the power supply and demand factors are used as input parameters for feature fusion to obtain the power supply and demand factor feature vector. A power supply and demand factor prediction model based on a composite loss function is adopted to predict the power supply and demand factors according to the power supply and demand factor feature vector, and the prediction results are obtained.

[0010] Furthermore, the construction of the text parsing model based on the LLM semantic understanding engine includes: Construct a knowledge constraint base for the power system domain that includes various power professional rules; Design structured output templates and domain knowledge enhancement prompts, encode the power industry rules into the domain knowledge enhancement prompts; and / or embed typical sample examples into the domain knowledge enhancement prompts; The LLM semantic understanding engine is augmented with the structured output template and the domain knowledge enhancement prompts to obtain a text parsing model that passes format validation and / or range checks.

[0011] Furthermore, the knowledge constraint base in the power system domain includes at least one of the following: power system operation rules, event classification system, event impact logic rules, early warning level mapping rules, unit normalization specifications, and regional name standardization rules.

[0012] Furthermore, the step of using the text parsing model to convert the unstructured text into a structured, standardized event description includes: The unstructured text is input into the text parsing model, and the output is a structured, standardized event description containing information on multiple key events. The multiple key event information includes at least one of the following: event type, direction of influence, area of ​​effect, duration, and intensity level.

[0013] Furthermore, the construction of a context-aware impact intensity mapping mechanism, which analyzes the impact intensity of power supply and demand factors based on structurally standardized event descriptions, includes: Fine-grained semantic analysis of the standardized event descriptions of the structure is performed using a large language model, transforming discrete intensity levels into continuous impact values ​​that reflect the actual degree of impact. The continuous influence values ​​are normalized by combining the power system operating status to obtain the influence intensity of the power supply and demand factor influence events on the power supply and demand factors.

[0014] Furthermore, the construction of a dynamic gated fusion model based on real-time power supply and demand dynamics involves fusing the standardized event description and the influence intensity of power supply and demand factors as input parameters to obtain a power supply and demand factor feature vector, including: Construct an influence intensity gating model that integrates an input layer, a fully connected layer, a batch normalization layer, an activation function layer, and an output layer; Using the influence intensity gating model, and taking the real-time power supply and demand situation as the basis for regulation, the dynamic weights of the input parameters are calculated. The event features corresponding to the structured standardized event description are weighted according to the dynamic weights, and the continuous variable features corresponding to the influence intensity of the power supply and demand factors are concatenated to obtain a low-dimensional fusion vector, which is used as the feature vector of the power supply and demand factors.

[0015] Furthermore, the input layer is used to receive the input parameters; the fully connected layer is used to map the input parameters to the hidden space to obtain a feature vector; the batch normalization layer is used to standardize the feature vector; the activation function layer is used to introduce a nonlinear transformation; and the output layer is used to generate dynamic weights in the interval [0,1] for the input parameters.

[0016] Furthermore, the method also includes: Auxiliary context vectors for the unstructured text are generated using a large language model to determine the real-time power supply and demand situation of the current power system. The real-time power supply and demand situation includes states of supply shortage, supply surplus, and / or balance.

[0017] Furthermore, the composite loss function includes a prediction loss term based on mean squared error and a feature sparsity constraint term based on L1 regularization.

[0018] According to a second aspect of the present invention, the present invention provides a power supply and demand factor prediction system, the system comprising: The text acquisition module is used to acquire unstructured text of events affecting electricity supply and demand factors; The standard processing module is used to build a text parsing model based on the LLM semantic understanding engine, and to use the text parsing model to convert the unstructured text into a structured standardized event description. The continuous processing module is used to analyze the impact intensity of power supply and demand factors based on the structurally standardized event description through a context-aware impact intensity mapping mechanism. The feature fusion module is used to construct a dynamic gated fusion model based on real-time power supply and demand situation. It uses the standardized event description of the structure and the influence intensity of the power supply and demand factors as input parameters to perform feature fusion and obtain the power supply and demand factor feature vector. The result prediction module is used to predict the power supply and demand factors based on the power supply and demand factor feature vector using a power supply and demand factor prediction model based on a composite loss function, and obtain the prediction result.

[0019] The present invention, by adopting the above technical solution, has at least the following beneficial effects: This invention provides a method for predicting electricity supply and demand factors, comprising: acquiring unstructured text of events affecting electricity supply and demand factors; constructing a text parsing model based on an LLM semantic understanding engine, and using the text parsing model to convert the unstructured text into structured standardized event descriptions; analyzing the influence intensity of electricity supply and demand factors based on the structured standardized event descriptions using a context-aware influence intensity mapping mechanism; constructing a dynamic gating fusion model based on real-time electricity supply and demand conditions, and using the structured standardized event descriptions and the influence intensity of electricity supply and demand factors as input parameters for feature fusion to obtain a feature vector of electricity supply and demand factors; and using an electricity supply and demand factor prediction model based on a composite loss function to predict electricity supply and demand factors based on the feature vector of electricity supply and demand factors to obtain the prediction result. This invention achieves a qualitative leap in text parsing capabilities, makes the quantification of event influence more accurate and scientific, enhances the intelligence and flexibility of the feature fusion mechanism, and makes the prediction target more aligned with the actual needs of the electricity market.

[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating a power supply and demand factor prediction method according to an embodiment of the present invention is shown. Figure 2 This diagram illustrates a flowchart of unstructured text standardization processing provided by an embodiment of the present invention. Figure 3 A flowchart illustrating the influence intensity analysis of power supply and demand factors according to an embodiment of the present invention is shown. Figure 4 A schematic diagram of the structure of a power supply and demand factor prediction system provided in an embodiment of the present invention is shown; Figure 5 A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0023] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0024] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0025] Existing technologies for predicting electricity supply and demand factors have the following core technical problems: Insufficient utilization and weak parsing capabilities of unstructured text information: Traditional methods for predicting electricity supply and demand factors mainly rely on historical supply and demand data and structured meteorological and calendar variables, lacking an effective parsing mechanism for unstructured texts such as weather warnings, holiday work schedule adjustments, and announcements regarding restrictions on renewable energy output. These texts contain key drivers affecting electricity supply and demand factors (such as "300MW of wind power curtailment" and "5-day red alert for high temperatures"), but existing methods cannot automatically extract key information such as event type, impact intensity, and affected area, resulting in an incomplete feature system and a significantly increased risk of model misjudgment in extreme weather, policy adjustments, or sudden event scenarios.

[0026] Inaccurate quantification of event impact intensity: Existing feature engineering methods typically treat events simply as binary flags (e.g., is_holiday=1) or assign them fixed correction values, making it difficult to dynamically and precisely reflect the actual differences and nonlinear relationships in the impact of different levels of events (e.g., "yellow alert for high temperature" versus "red alert") on power supply and demand. For example, "massive photovoltaic power generation" is more likely to cause power curtailment pressure during low-load periods than during high-load periods, and existing methods cannot dynamically quantify this impact, resulting in distorted feature representation.

[0027] The feature fusion mechanism is rigid and lacks scenario adaptability: Most existing systems use simple splicing or introduce event features as independent inputs into the model, lacking the ability to dynamically adjust the contribution of multimodal features. In fact, the weight of the impact of the same event on power supply and demand factors varies greatly under different operating conditions (for example, high temperatures significantly compress bidding space during weekday peak hours, while having a weak impact on weekend nights), and existing static fusion strategies cannot achieve scenario-adaptive modeling, severely limiting the generalization performance of the model.

[0028] The limitations of current forecasting methods and their failure to focus on core market indicators are significant drawbacks. Existing research generally concentrates on electricity load forecasting, setting the forecast target as total grid demand or regional load curves. However, this neglects the more critical supply and demand factor (i.e., bidding space) in the electricity market. Since load only reflects demand-side changes and cannot account for supply-side disturbances such as fluctuations in renewable energy output, unit outages, and inter-regional power transmission capacity, model outputs struggle to directly support thermal power unit pricing, market clearing, and peak-shaving decisions, severely hindering the development of intelligent decision-making in the electricity market.

[0029] Based on this, embodiments of the present invention provide a method for predicting electricity supply and demand factors, focusing on the innovative application of LLM in the representation and prediction of electricity supply and demand factors, applicable to machine learning-based analysis of electricity market bidding space and short-term electricity supply and demand balance assessment. Figure 1 As shown, it may include at least the following steps S101~S105: Step S101: Obtain unstructured text of events affecting electricity supply and demand factors.

[0030] First, receive the original input of relevant events that may affect the power supply and demand factors, namely unstructured text input containing continuous variables (such as temperature, humidity, etc.) such as weather warnings, dispatch announcements, etc.

[0031] Step S102: Construct a text parsing model based on the LLM semantic understanding engine, and use the text parsing model to convert unstructured text into structured standardized event descriptions.

[0032] The core function of this step is to transform the received unstructured text input into a standardized, structured event description. Specific implementation methods are as follows: Figure 2 As shown, it includes at least the following steps S102-1 to S102-3: Step S102-1: Construct a knowledge constraint base for the power system domain that includes various power professional rules.

[0033] In this embodiment of the invention, the knowledge constraint base in the power system domain includes multiple core rules, such as power system operation rules, event classification system (three categories: meteorological impact, calendar events, and power grid maintenance), event impact logic rules, early warning level mapping rules (mapping the early warning level described in the text to an intensity value in the range of 0.0-1.0), unit normalization standard (unifying the unit of change in power supply and demand factors as "hundred MW"), and regional name standardization rules (mapping abbreviations of provincial administrative regions).

[0034] Step S102-2: Design a structured output template and domain knowledge enhancement prompts, encode power industry rules into the domain knowledge enhancement prompts; and / or, embed typical sample examples into the domain knowledge enhancement prompts.

[0035] Structured output templates are used to clearly define necessary fields and their value ranges, ensuring a consistent output format. Based on this, domain knowledge enhancement prompts are constructed, encoding power industry rules into the domain knowledge enhancement prompts of the LLM large language model, constraining the model output to meet professional requirements. In practical applications, typical examples can be embedded in the domain knowledge enhancement prompts to enhance the model's accuracy in professional scenarios through few-shot learning, achieving an entity recognition and numerical extraction accuracy rate of over 95%. Finally, the model output needs to undergo format validation and range checks to ensure that `event_level` is in the [0,1] interval and `load_impact` unit is correct. If validation fails, a retry mechanism is triggered. This solves the problems of low accuracy and inability to handle complex semantics in traditional keyword matching methods, achieving accurate parsing and structured transformation of text information.

[0036] Step S102-3: Based on the structured output template and domain knowledge enhancement prompts, perform reinforcement learning on the LLM semantic understanding engine to obtain a text parsing model that passes format validation and / or range check.

[0037] As a semantic understanding engine, LLM leverages its powerful contextual understanding and knowledge reasoning capabilities to automatically and accurately identify and extract key event information from complex text. In practical applications, unstructured text is input into the text parsing model, which outputs a structured, standardized event description containing multiple key event information, such as event type, direction of impact, area of ​​effect, duration, and intensity level.

[0038] This step transforms unstructured text into standardized structured event descriptions, effectively solving the technical problems of weak parsing capabilities and incomplete feature systems in traditional methods.

[0039] Step S103: Analyze the influence intensity of power supply and demand factors based on the structurally standardized event description using a context-aware influence intensity mapping mechanism.

[0040] To address the lack of quantification of event impact intensity, a context-aware impact intensity mapping mechanism was constructed. Specific implementation details are as follows: Figure 3 As shown, it includes at least steps S103-1 to S103-2: Step S103-1: Use a large language model to perform fine-grained semantic analysis on the description of structured standardized events, and transform discrete intensity levels into continuous impact values ​​that reflect the actual degree of impact. Step S103-2: Normalize the continuous influence values ​​based on the power system operating status to obtain the influence intensity of power supply and demand factor events on power supply and demand factors.

[0041] It is understandable that using a large language model to perform fine-grained semantic analysis on the description of structurally standardized events can transform traditional discrete intensity levels (such as blue, yellow, orange, and red warning levels) into continuous values ​​reflecting the actual degree of impact. These continuous values ​​can then be normalized by incorporating the power system's operating status (such as load level and seasonal background). For example, a "high-temperature red warning" is assigned differentiated impact indices under different load levels and seasonal backgrounds, accurately reflecting its nonlinear amplification effect on air conditioning load increases and thermal power demand. Simultaneously, for supply-side events (such as unit maintenance and transmission congestion), the model can automatically deduce the reduction in non-thermal power supply capacity based on specific parameters in the notification, thereby dynamically assessing the pressure on power supply and demand factors, achieving a leap from "qualitative description" to "quantitative representation." This ensures that the quantitative results accurately reflect the nonlinear impact of events under different operating conditions, thus avoiding the distortion of feature representation caused by traditional binary or fixed correction values.

[0042] Step S104: Construct a dynamic gating fusion model based on real-time power supply and demand situation, and use the structural standardized event description and the influence intensity of power supply and demand factors as input parameters to perform feature fusion to obtain the power supply and demand factor feature vector.

[0043] This step uses real-time power supply and demand as the basis for regulation, and dynamically adjusts the contribution weights of various event features through a learnable dynamic gating fusion model. Specifically, the dynamic gating fusion model in this embodiment integrates an input layer, a fully connected layer, a batch normalization layer, an activation function layer, and an output layer. The input layer receives input parameters; the fully connected layer maps the input parameters to the hidden space to obtain feature vectors; the batch normalization layer standardizes the feature vectors; the activation function layer introduces nonlinear transformations; and the output layer generates dynamic weights within the [0,1] interval for the input parameters using the Sigmoid function.

[0044] Furthermore, using an influence intensity gating model and real-time power supply and demand dynamics as the basis for regulation, dynamic weights of input parameters are calculated. Based on these dynamic weights, the event features (1-dimensional) corresponding to the standardized event descriptions are weighted, and then concatenated with continuous variable features (multi-dimensional, such as temperature, hour, weekday, and power supply and demand trend) corresponding to the influence intensity of power supply and demand factors to obtain a low-dimensional fusion vector, which serves as the power supply and demand factor feature vector. In practice, the aligned event features and continuous variable input gating units can be used to calculate dynamic weights, weight the event features, and concatenate them with the continuous variable features before a dimensionality reduction layer is applied to generate a 128-dimensional power supply and demand factor feature vector.

[0045] In practical applications, large language models are used to generate auxiliary context vectors for unstructured text to determine the real-time power supply and demand situation of the current power system. In other words, the large language model not only participates in the initial text parsing process but also generates auxiliary context vectors to help determine whether the current power system is in a state of supply shortage, oversupply, or equilibrium, thus guiding the selection of fusion strategies. For example, when the system is near full load, the weight of high-temperature events is automatically increased; while during periods of surplus clean energy, their impact is correspondingly suppressed. This fusion method breaks through the limitations of fixed weights or simple concatenation, making the feature representation highly adaptable to different scenarios and more realistically depicting the influence patterns of multiple factors coupled under complex operating conditions.

[0046] The dynamic temporal alignment mechanism accurately captures the response delay characteristics of power supply and demand factors in different seasons. The power supply and demand factor influence intensity gating model realizes scenario adaptation of feature representation and can dynamically adjust the contribution of each feature according to different scenarios.

[0047] Step S105: Using a power supply and demand factor prediction model based on a composite loss function, power supply and demand factors are predicted according to the power supply and demand factor feature vectors to obtain the prediction results.

[0048] The composite loss function in this embodiment of the invention includes a prediction loss term based on mean squared error and a feature sparsity constraint term based on L1 regularization, in order to balance prediction accuracy and feature simplicity.

[0049] The power supply and demand factor feature vector generated in step S104 above is used by the downstream power supply and demand factor prediction model to predict the power supply and demand factors and obtain the final power supply and demand factor prediction result.

[0050] This invention, through tightly connected data streams, achieves end-to-end transformation from raw text to power supply and demand factor features, solving key problems in traditional methods such as insufficient utilization of unstructured information, lack of quantitative analysis of event impact, and rigid feature fusion. Unlike existing technologies that focus on load forecasting, this invention, for the first time, explicitly proposes power supply and demand factors (i.e., market bidding space) as the core modeling object, constructing a complete technical chain from raw text input to low-dimensional dense feature output. The entire feature representation process revolves around the core objective of "how to accurately reflect changes in dispatchable resources," comprehensively integrating demand-side disturbances (such as holidays and high temperatures) and supply-side shocks (such as wind and solar power curtailment and unit shutdowns), forming a truly intelligent feature system serving power market decision-making. Therefore, this paradigm shift allows the model output to go beyond electricity consumption forecasting, directly supporting advanced applications such as market clearing price prediction, thermal power unit bidding assistance, and peak-shaving resource pre-allocation, filling the current technological gap in power supply and demand equilibrium modeling.

[0051] To enhance the understanding of this invention by those skilled in the art, the following example illustrates how this core technical solution works, using a power grid facing a scenario where "severe convective weather leading to wind power curtailment" and a "red alert for high temperatures" overlap during the summer peak season. Assume that the power dispatch center of a power grid receives the following information: an unstructured text message: "Due to the impact of severe convective weather, a power grid is expected to experience power curtailment of 300MW of wind power output this afternoon"; a weather forecast indicates a "red alert for high temperatures" for the next few days; and real-time monitoring shows that the current power supply and demand situation is "near full load."

[0052] The core technical solution of this invention will be processed according to the following steps: First, text structure parsing is performed (solving the problem of insufficient utilization of unstructured text): Domain knowledge-guided text parsing based on Large Language Model (LLM) receives the aforementioned unstructured text information; through pre-encoded power system operation rules, event classification systems (such as "new energy restricted" belonging to supply-side shocks), and impact logic, LLM can accurately understand the deeper meaning of the text. It is no longer a simple match of the keyword "power restriction," but accurately identifies that this is a "new energy restricted" event, with the direction of impact being "reduced supply," the area of ​​effect being "a certain power grid," the duration being "this afternoon," and the intensity being "300MW." At the same time, it can also identify the event "high temperature red alert." Finally, this information is transformed into standardized structured event records, solving the problem that traditional methods cannot effectively parse complex text.

[0053] Secondly, the impact intensity of the events is quantified (addressing the problem of inaccurate event impact intensity quantification): For the analyzed events of "300MW of renewable energy restricted" and "high temperature red alert," a continuous intensity modeling mechanism for the response of power supply and demand factors begins operation. For the "high temperature red alert," the LLM (Large Language Model) combines the current load level (e.g., during peak summer load) and seasonal background to transform its discrete alert level into a continuous, high-intensity impact value, reflecting its nonlinear amplification effect on the increase in air conditioning load and the demand for thermal power to fill the gap. For the "300MW of wind power output restricted," based on the specific parameters in the notification, the reduction in non-thermal power supply capacity is dynamically derived and transformed into a continuous, quantified impact intensity value on the bidding space. For example, if it occurs at night when the load is low, its squeezing effect on the bidding space may be less than during the midday when the load is high.

[0054] Furthermore, dynamic feature fusion is performed (addressing the rigidity of feature fusion mechanisms): At this point, the dynamic feature fusion mechanism driven by the power supply and demand factors (gated fusion architecture) comes into play. Since the current power supply and demand situation is "near full load," the gating unit dynamically adjusts the contribution weights of each event feature based on this real-time state. For example, it automatically increases the weights of the "high temperature red alert" and "renewable energy restriction" events (e.g., increasing the weight to 0.85), because these events are particularly critical to the power supply and demand balance when near full load. Through this dynamic weighting, these event features are fused with continuous variables (such as temperature, hour, day of the week, etc.) to form a 128-dimensional low-dimensional dense feature vector.

[0055] Finally, the fusion feature supports market decision-making (addressing the limitations of the prediction object): This low-dimensional dense feature vector directly reflects the power supply and demand factors (bidding space) status of a power grid under the superimposed scenarios of "300MW of wind power curtailment due to severe convective weather" and "high temperature red alert." This feature vector can then be directly input into the downstream power supply and demand factor prediction model to predict the future trend of bidding space changes, thus providing accurate and scenario-adaptive support for thermal power unit bidding, market clearing, and peak-shaving decisions. Experimental comparisons show that this invention significantly outperforms existing technologies in the summer power supply and demand factor prediction of the Anhui power grid. The overall mean absolute percentage error (MAPE) is reduced to 5.2%, a 59.1% reduction compared to the existing technology's 12.7%. Particularly in the high-temperature sudden change scenario, the error decreases from 18.3% to 5.6%, a 69.4% reduction; in the holiday scenario, the error decreases from 15.6% to 6.1%, a 60.9% reduction. This invention exhibits strong robustness to text loss; when 20% of the event text is missing, the accuracy decreases by only 3.8%. It supports hourly real-time updates, with feature generation taking less than 150ms. The generated feature vectors can be directly integrated into mainstream power supply and demand factor prediction models without modifying the existing system architecture, demonstrating good industrial applicability and cross-regional adaptability.

[0056] This invention provides a method for predicting electricity supply and demand factors, which, compared with the prior art, has at least the following advantages: 1) The forecasting target is more aligned with the actual needs of the electricity market: This invention is the first to shift the modeling paradigm from "electricity load forecasting" to "electricity supply and demand factor characteristic representation," achieving a fundamental shift in technological positioning. It focuses on the electricity supply and demand factor (i.e., bidding space = total electricity demand - total electricity supply from non-thermal power units), a core indicator reflecting the market's dispatchable resources. With a high proportion of renewable energy integration, the same load level may correspond to drastically different market conditions: when photovoltaic power generation is high, even with a high load, the bidding space may be negative (oversupply); while when wind power drops sharply and a peak load occurs, even with a low absolute load, the bidding space may expand dramatically (undersupply). This invention directly constructs a feature system targeting this key variable, enabling the model output to more accurately reflect the market supply and demand balance, providing direct support for thermal power unit bidding, market clearing, and peak-shaving decisions, filling the current technological gap in intelligent decision-making in the electricity market.

[0057] 2) A Qualitative Leap in Text Parsing Capabilities: Compared to existing technologies that rely on manually constructed keyword rule bases, this invention employs a domain-knowledge-enhanced large language model prompting engineering, achieving a qualitative leap in text parsing capabilities. Existing technologies can only recognize preset keywords (such as "high temperature" and "red alert"), failing to understand complex semantics and contextual relationships. For complex expressions like "Due to the impact of severe convective weather, a certain power grid is expected to experience power rationing of 300MW of wind power output this afternoon," they often only extract partial information or produce misjudgments. This invention, however, encodes power system expertise into prompt templates, guiding the large language model to automatically understand the deeper meaning of the text. It can not only identify event types but also accurately extract multi-dimensional information such as the direction of impact (increased demand or decreased supply), the area of ​​effect, duration, and intensity level. Real-world testing shows that entity recognition accuracy is improved to over 95%, a 21 percentage point improvement over existing keyword matching methods (approximately 78%). This capability enables the system to handle a wider range of event types, including supply-side disturbances such as limited renewable energy output, transmission congestion, and unplanned unit outages, constructing a more complete feature system.

[0058] 3) More Precise and Scientific Quantification of Event Impact: Existing technologies use a simplified approach with fixed impact coefficients (such as a red alert + 20% load), which fails to reflect the actual differences between events of varying intensities and the dynamic impact of system operation. This invention innovatively proposes a context-aware continuous intensity quantification mechanism, transforming discrete alert levels into continuous values ​​reflecting the actual degree of impact, and normalizing them in conjunction with the real-time system status. For example, a "high-temperature red alert" is assigned a differentiated impact index under different load levels and seasonal backgrounds, accurately reflecting its nonlinear amplification effect on the increase in air conditioning load and the demand for thermal power to make up for the shortfall; the market impact index of "200MW of photovoltaic power curtailment" is lower at night when the load is low than at midday when the load is high, accurately reflecting the difference in the degree of squeezing out the bidding space. This quantification method breaks through the limitations of traditional binary flags or fixed correction values, making the feature expression closer to physical reality and significantly improving the model's adaptability to complex scenarios.

[0059] 4) More Intelligent and Flexible Feature Fusion Mechanism: Existing technologies use simple splicing or introduce event features as independent inputs into the model, lacking the ability to dynamically adjust the contribution of multimodal features. This invention designs a gated fusion mechanism based on power supply and demand factors, using real-time power supply and demand as the basis for regulation. It dynamically adjusts the contribution weights of various event features through learnable gating units. For example, when the system is near full load, the weight of high-temperature events is automatically increased to 0.85; while during periods of surplus clean energy, its influence is suppressed, and the weight is reduced to 0.32. This fusion method gives the feature representation strong scene adaptability, automatically adjusting the contribution of each factor according to different operating states, truly reflecting the influence of multi-factor coupling under complex conditions. Compared to the fixed weights or simple splicing methods in existing technologies, the feature vectors generated by this invention have greater physical meaning and predictive effectiveness, especially in scenarios with extreme weather and complex event superposition, where the feature expression capability is significantly improved.

[0060] Furthermore, as Figure 1 In specific implementation, embodiments of the present invention provide a power supply and demand factor prediction system, such as... Figure 4 As shown, the system may include: a text acquisition module 410, a standard processing module 420, a continuous processing module 430, a feature fusion module 440, and a result prediction module 450.

[0061] The text acquisition module 410 can be used to acquire unstructured text of events affecting power supply and demand factors; The standard processing module 420 can be used to build a text parsing model based on the LLM semantic understanding engine, and use the text parsing model to convert unstructured text into structured standardized event descriptions. The continuous processing module 430 can be used to analyze the influence intensity of power supply and demand factors based on the structurally standardized event description through a context-aware influence intensity mapping mechanism. The feature fusion module 440 can be used to construct a dynamic gated fusion model based on real-time power supply and demand situation. It uses the structurally standardized event description and the influence intensity of power supply and demand factors as input parameters to perform feature fusion and obtain the power supply and demand factor feature vector. The result prediction module 450 can be used to predict the power supply and demand factors based on the power supply and demand factor feature vector using a power supply and demand factor prediction model based on a composite loss function, and obtain the prediction results.

[0062] It should be noted that other corresponding descriptions of the functional modules involved in the power supply and demand factor prediction system provided in this embodiment of the invention can be found in [reference]. Figure 1 The corresponding descriptions of the methods shown will not be repeated here.

[0063] Based on the above, Figure 1Accordingly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the power supply and demand factor prediction method described in any of the above embodiments.

[0064] Based on the above, Figure 1 The method shown and as Figure 4 The embodiment of the system shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 5 As shown, the computer device may include a communication bus, a processor, a memory, and a communication interface. It may also include input / output interfaces and a display device. The various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the steps of the power supply and demand factor prediction method described in the above embodiments.

[0065] Those skilled in the art will clearly understand that the specific working process of the systems, devices, modules and units described above can be referred to the corresponding process in the foregoing method embodiments. For the sake of brevity, it will not be repeated here.

[0066] Furthermore, the functional units in the various embodiments of the present invention can be physically independent of each other, or two or more functional units can be integrated together, or all functional units can be integrated into one processing unit. The integrated functional units described above can be implemented in hardware, or in software or firmware.

[0067] Those skilled in the art will understand that if the integrated functional unit is implemented in software and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or all or part of it, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computing device (e.g., a personal computer, server, or network device) to execute all or part of the steps of the methods described in the embodiments of the present invention when running the instructions. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0068] Alternatively, all or part of the steps of the foregoing method embodiments can be implemented by hardware (such as a computing device, personal computer, server, or network device) related to program instructions. The program instructions can be stored in a computer-readable storage medium. When the program instructions are executed by the processor of the computing device, the computing device executes all or part of the steps of the methods described in the various embodiments of the present invention.

[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that within the spirit and principles of the present invention, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the corresponding technical solutions to depart from the protection scope of the present invention.

Claims

1. A method for predicting electricity supply and demand factors, characterized in that, The method includes: Obtain unstructured text of events affecting electricity supply and demand factors; Construct a text parsing model based on an LLM semantic understanding engine, and use the text parsing model to convert the unstructured text into a structured standardized event description; By using a context-aware impact intensity mapping mechanism, the impact intensity of power supply and demand factors is analyzed based on the structurally standardized event description. A dynamic gating fusion model based on real-time power supply and demand situation is constructed. The standardized event description and the influence intensity of the power supply and demand factors are used as input parameters for feature fusion to obtain the power supply and demand factor feature vector. A power supply and demand factor prediction model based on a composite loss function is adopted to predict the power supply and demand factors according to the power supply and demand factor feature vector, and the prediction results are obtained.

2. The method according to claim 1, characterized in that, The construction of the text parsing model based on the LLM semantic understanding engine includes: Construct a knowledge constraint base for the power system domain that includes various power professional rules; Design structured output templates and domain knowledge enhancement prompts, encode the power industry rules into the domain knowledge enhancement prompts; and / or embed typical sample examples into the domain knowledge enhancement prompts; The LLM semantic understanding engine is augmented with the structured output template and the domain knowledge enhancement prompts to obtain a text parsing model that passes format validation and / or range checks.

3. The method according to claim 1, characterized in that, The knowledge constraint base for the power system domain includes at least one of the following: power system operation rules, event classification system, event impact logic rules, early warning level mapping rules, unit normalization standards, and regional name standardization rules.

4. The method according to claim 1, characterized in that, The process of converting the unstructured text into a structured, standardized event description using the text parsing model includes: The unstructured text is input into the text parsing model, and the output is a structured, standardized event description containing information on multiple key events. The multiple key event information includes at least one of the following: event type, direction of influence, area of ​​effect, duration, and intensity level.

5. The method according to claim 1, characterized in that, The construction of a context-aware impact intensity mapping mechanism, which analyzes the impact intensity of power supply and demand factors based on structurally standardized event descriptions, includes: Fine-grained semantic analysis of the standardized event descriptions of the structure is performed using a large language model, transforming discrete intensity levels into continuous impact values ​​that reflect the actual degree of impact. The continuous influence values ​​are normalized by combining the power system operating status to obtain the influence intensity of the power supply and demand factor influence events on the power supply and demand factors.

6. The method according to claim 1, characterized in that, The construction of a dynamic gated fusion model based on real-time power supply and demand dynamics involves fusing the standardized event descriptions and the influence intensity of power supply and demand factors as input parameters to obtain a power supply and demand factor feature vector, including: Construct an influence intensity gating model that integrates an input layer, a fully connected layer, a batch normalization layer, an activation function layer, and an output layer; Using the influence intensity gating model, and taking the real-time power supply and demand situation as the basis for regulation, the dynamic weights of the input parameters are calculated. The event features corresponding to the structured standardized event description are weighted according to the dynamic weights, and the continuous variable features corresponding to the influence intensity of the power supply and demand factors are concatenated to obtain a low-dimensional fusion vector, which is used as the feature vector of the power supply and demand factors.

7. The method according to claim 6, characterized in that, The input layer is used to receive the input parameters; the fully connected layer is used to map the input parameters to the hidden space to obtain the feature vector; the batch normalization layer is used to standardize the feature vector; and the activation function layer is used to introduce nonlinear transformation. The output layer is used to generate dynamic weights in the interval [0,1] for the input parameters.

8. The method according to claim 6, characterized in that, The method further includes: Auxiliary context vectors for the unstructured text are generated using a large language model to determine the real-time power supply and demand situation of the current power system. The real-time power supply and demand situation includes states of supply shortage, supply surplus, and / or balance.

9. The method according to any one of claims 1 to 8, characterized in that, The composite loss function includes a prediction loss term based on mean squared error and a feature sparsity constraint term based on L1 regularization.

10. A power supply and demand factor prediction system, characterized in that, The system includes: The text acquisition module is used to acquire unstructured text of events affecting electricity supply and demand factors; The standard processing module is used to build a text parsing model based on the LLM semantic understanding engine, and to use the text parsing model to convert the unstructured text into a structured standardized event description. The continuous processing module is used to analyze the impact intensity of power supply and demand factors based on the structurally standardized event description through a context-aware impact intensity mapping mechanism. The feature fusion module is used to construct a dynamic gated fusion model based on real-time power supply and demand situation. It uses the standardized event description of the structure and the influence intensity of the power supply and demand factors as input parameters to perform feature fusion and obtain the power supply and demand factor feature vector. The result prediction module is used to predict the power supply and demand factors based on the power supply and demand factor feature vector using a power supply and demand factor prediction model based on a composite loss function, and obtain the prediction result.