Large model-based short-term electric power and electric quantity balance analysis method and system

By optimizing model parameters using a graph neural network based on a spatiotemporal attention mechanism and a distributed computing framework, the problems of low load forecasting accuracy and inefficiency in traditional methods are solved, achieving efficient and accurate load forecasting and generation plan optimization, and ensuring the stable and flexible operation of the power system.

CN121124113APending Publication Date: 2025-12-12STATE GRID GANSU ELECTRIC POWER RESEARCH INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511310747.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Traditional short-term power balance analysis methods struggle to capture complex spatiotemporal dependencies, resulting in low prediction accuracy. They are also inefficient when dealing with massive amounts of data, unable to quickly complete model training and prediction tasks, and their power generation plans are not flexible enough to effectively respond to changes in actual demand.

Method used

A graph neural network ST-GNN model based on a spatiotemporal attention mechanism is used to model a comprehensive dataset. The model is trained using a distributed computing framework and a batch gradient descent algorithm to simulate power supply and demand under different scenarios, set constraints, and optimize power generation plans.

Benefits of technology

It achieves an effective representation of complex power grid topologies, improves load forecasting accuracy and model training efficiency, can quickly generate high-precision load forecasting results, optimizes power generation plans, reduces energy waste and system instability, and provides strong real-time scheduling support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121124113A_ABST
    Figure CN121124113A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term electric power and electric quantity balance analysis method and system based on a large model, and relates to the technical field of short-term electric power and electric quantity balance analysis methods, and the method comprises the steps: collecting historical load data, real-time power grid operation data and weather forecast information of an electric power system, and building a comprehensive data set; a graph neural network ST-GNN load prediction model based on a space-time attention mechanism is adopted to carry out modeling on the preprocessed comprehensive data set, and a load prediction model is obtained; training the load prediction model based on the distributed computing environment, and outputting a load prediction result; on the basis of the load prediction result, limiting conditions are set, power supply and demand conditions under different scenes are simulated, and a power utilization plan scheme is obtained; specific measures are implemented based on the power utilization plan scheme, and the use of short-term electric power and electric quantity is balanced; nodes and connection relations thereof are identified based on power grid operation state information, a power network graph structure is constructed, and a space-time attention mechanism is introduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of short-term power balance analysis methods, and in particular to a short-term power balance analysis method and system based on a large model. Background Technology

[0002] Short-term power balance analysis is a technical solution for optimizing the short-term operation of power systems. It aims to accurately predict load demand in the future by comprehensively analyzing historical load data, real-time power grid operation data and weather forecast information, and formulate reasonable power generation plans and power consumption strategies accordingly to achieve economical and efficient operation of the power system.

[0003] In the field of short-term power balance analysis methods, traditional load forecasting methods usually employ simple statistical models or machine learning algorithms, which are difficult to capture complex spatiotemporal dependencies, resulting in low forecast accuracy. When faced with massive amounts of data, traditional computing frameworks and optimization algorithms are often inefficient and cannot quickly complete model training and forecasting tasks. At the same time, existing methods often fail to fully consider the power supply and demand situation under various scenarios when formulating power consumption plans, resulting in inflexible power generation plans that cannot effectively respond to changes in actual demand. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a short-term power balance analysis method based on a large model to solve the problem that traditional load forecasting methods usually use simple statistical models or machine learning algorithms, which are difficult to capture complex spatiotemporal dependencies, resulting in low prediction accuracy. When faced with massive amounts of data, traditional computing frameworks and optimization algorithms are often inefficient and unable to quickly complete model training and prediction tasks.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a short-term power balance analysis method based on a large model, which includes:

[0008] Historical load data, real-time power grid operation data, and meteorological forecast information from multiple channels are collected and processed to obtain a comprehensive dataset;

[0009] The preprocessed comprehensive dataset is modeled using a graph neural network ST-GNN load prediction model based on a spatiotemporal attention mechanism to obtain a load prediction model.

[0010] Big data analytics methods are used to process the load forecasting model to obtain load forecasting results;

[0011] Based on load forecasting results, constraints are set, and power supply and demand under different scenarios are simulated to obtain power consumption planning schemes.

[0012] Implement specific measures based on the electricity consumption plan and balance the use of short-term electricity.

[0013] As a preferred embodiment of the short-term power balance analysis method based on a large model described in this invention, the specific steps for collecting historical load data, real-time grid operation data, and meteorological forecast information of the power system to establish a comprehensive dataset are as follows:

[0014] Obtain load data from the past 3 to 5 years through third-party platforms;

[0015] Smart meters, sensors, and SCADA platforms are used to collect information on the power grid's operational status.

[0016] The power grid's operating status information includes voltage, current, frequency, and switching status;

[0017] Obtain high-precision weather forecast data from weather service providers;

[0018] The meteorological forecast data includes temperature, humidity, wind speed, and precipitation;

[0019] Perform a preliminary check on the collected data and remove obviously erroneous or incomplete records;

[0020] For different types of data, mathematical transformations are applied to convert them to the same scale, resulting in a comprehensive dataset.

[0021] As a preferred embodiment of the short-term power balance analysis method based on a large model described in this invention, the method of establishing a load forecasting model using a graph neural network (ST-GNN) based on a spatiotemporal attention mechanism to model the preprocessed comprehensive dataset to obtain the load forecasting model includes the following specific steps:

[0022] Based on power grid operation status information, the nodes in the power grid and their connection relationships are identified, and a power network graph structure is constructed.

[0023] Nodes are represented as vertices in the graph, and edge weights are assigned based on the actual line transmission capacity or load intensity to form a weighted undirected graph.

[0024] Each node contains its historical load data and meteorological data as node attributes;

[0025] A spatiotemporal attention mechanism is introduced, including a spatial attention module and a temporal attention module;

[0026] In the spatial attention module, the correlation weights between the above nodes are calculated, and the contributions of important nodes are highlighted.

[0027] Define spatial attention coefficient For nodes and nodes Spatial attention weights between them;

[0028] The time attention module dynamically adjusts the importance of different time periods to capture the time dynamics of load changes.

[0029] Define the time attention coefficient For time step Importance weights;

[0030] By combining spatial attention and temporal attention modules, features of nodes and their neighbors are extracted using graph convolution operations, and load change trends are learned through time series modeling.

[0031] For each node time step ;

[0032] Stack the above feature update operations into 3-5 layers, with each layer using a non-linear activation function to enhance the model's expressive power, resulting in a load prediction model.

[0033] As a preferred embodiment of the short-term power balance analysis method based on a large model described in this invention, the specific steps of training the load forecasting model based on a distributed computing environment and outputting load forecasting results are as follows:

[0034] Utilize the Hadoo distributed computing framework to build an environment for processing large-scale datasets;

[0035] Partition the comprehensive dataset by time;

[0036] Load the load prediction model in a distributed computing environment and train the model using the partitioned dataset;

[0037] Batch gradient descent algorithm is used to update model parameters, reducing training time and improving model performance;

[0038] The trained load forecasting model is used to predict the load over a future period of time, and the load forecast values ​​for each time point are obtained.

[0039] As a preferred embodiment of the short-term power balance analysis method based on a large model described in this invention, the step of using a batch gradient descent algorithm to update model parameters, reducing training time and improving model performance, specifically includes the following steps:

[0040] Initial parameters are loaded based on the preload prediction model;

[0041] The comprehensive dataset is divided into multiple smaller batches, each containing a fixed number of samples.

[0042] For each batch of data, the mean squared error (MSE) is used as the loss function to calculate the prediction error under the current model parameters.

[0043] According to the loss function Calculate model parameters The gradient;

[0044] Update model parameters using the batch gradient descent formula;

[0045] Iterate through all batches of data and perform gradient calculation and parameter update operations for each batch in turn;

[0046] After traversing a complete dataset, the data order is shuffled again, and the above process is repeated until the predetermined number of iterations is reached or the loss function converges.

[0047] As a preferred embodiment of the short-term power balance analysis method based on a large model described in this invention, the steps of simulating power supply and demand under different scenarios based on load forecasting results and setting constraints to obtain a power consumption plan are as follows:

[0048] Define constraints based on the power grid's operational status information;

[0049] Construct a mathematical model to minimize the total power generation cost;

[0050] The relationship between power generation cost and power generation is defined as linear.

[0051] At any given time point, the total power generation should equal the load demand plus transmission losses, and the power generation of each generator unit should be within its maximum and minimum output range.

[0052] The actual transmission volume of each transmission line shall not exceed its maximum capacity;

[0053] The mathematical model constructed above was solved using the optimization solver Gurobi.

[0054] The input parameters include the power generation cost coefficient, the maximum output power of each generator set, the maximum transmission capacity of the transmission line, and the predicted load value. ;

[0055] The output results include the optimal power generation schedule and the optimal transmission volume at each time point;

[0056] The total generation cost under each scenario is assessed, and the electricity consumption plan is derived by combining the assessment results.

[0057] As a preferred embodiment of the short-term power balance analysis method based on a large model described in this invention, the specific steps for implementing specific measures based on the power consumption plan and balancing short-term power consumption are as follows:

[0058] The power generation of each generator unit is dynamically adjusted based on real-time load data and forecast errors.

[0059] When the actual load is higher than the forecast, power generation is increased; conversely, it is reduced.

[0060] For loads that can be flexibly adjusted, develop specific load transfer strategies;

[0061] During periods of low load, excess electrical energy is stored using energy storage devices.

[0062] During peak load periods, stored electrical energy is released to alleviate supply and demand pressures.

[0063] Secondly, the present invention provides a short-term power balance analysis system based on a large model, comprising:

[0064] The system includes a data management module, a model building module, a predictive analysis module, a solution development module, and a real-time scheduling module.

[0065] The data management module is used to collect historical load data, real-time power grid operation data and weather forecast information from multiple channels, and to perform preliminary inspection, cleaning and standardization processing to form a comprehensive dataset.

[0066] The model building module is used to identify nodes and their connection relationships based on power grid operation status information, construct a power network graph structure, introduce a spatiotemporal attention mechanism, and use a graph neural network to model the preprocessed comprehensive dataset to generate a load prediction model.

[0067] The predictive analysis module is used to optimize model parameters using a distributed computing framework, train the model using a batch gradient descent algorithm, and use the trained model to predict the load over a period of time in the future, thereby obtaining the load prediction values ​​for each time node.

[0068] The scheme formulation module is used to set constraints, simulate the power supply and demand situation under different scenarios, construct a mathematical model to solve for minimizing the total power generation cost, obtain the optimal power generation arrangement and transmission volume, and form a power consumption plan scheme.

[0069] The real-time scheduling module is used to dynamically adjust the power generation of each generator unit based on real-time load data, implement demand-side response strategies and energy storage device scheduling, and ensure the balanced use of short-term power.

[0070] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the short-term power balance analysis method based on a large model as described in the first aspect of the present invention.

[0071] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the short-term power balance analysis method based on a large model as described in the first aspect of the present invention.

[0072] The beneficial effects of this invention are as follows: By identifying nodes and their connections based on power grid operation status information, a power network graph structure is constructed. A spatiotemporal attention mechanism is introduced, and a graph neural network is used to model the preprocessed comprehensive dataset to generate a load forecasting model. This achieves an effective representation of the complex topology of the power grid. Through an accurate load forecasting model, future load demand can be predicted more accurately, power generation plans can be optimized, and energy waste and system instability caused by inaccurate load forecasting can be reduced. By utilizing a distributed computing framework to optimize model parameters, using a batch gradient descent algorithm to train the model, and using the trained model to predict the load over a future period, load forecast values ​​for each time node are obtained. This achieves efficient processing of large-scale data and rapid model training. The fast and efficient model training process not only saves time and resources but also provides high-precision load forecasting results in a short time, providing strong support for real-time scheduling and decision-making. Attached Figure Description

[0073] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.

[0074] Figure 1 This is a flowchart of the short-term power balance analysis method based on a large model in Example 1.

[0075] Figure 2 This is a schematic diagram of the short-term power balance analysis system based on a large model in Example 1. Detailed Implementation

[0076] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0077] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0078] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0079] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a short-term power balance analysis method based on a large model, including the following steps:

[0080] S1. Collect historical load data, real-time grid operation data and weather forecast information of the power system, and establish a comprehensive dataset;

[0081] Furthermore, load data from the past 3 to 5 years can be obtained through third-party platforms;

[0082] Smart meters, sensors, and SCADA platforms are used to collect information on the power grid's operational status.

[0083] The operating status information of the power grid includes voltage, current, frequency, and switch status;

[0084] Obtain high-precision weather forecast data from weather service providers;

[0085] Weather forecast data includes temperature, humidity, wind speed, and precipitation;

[0086] Perform a preliminary check on the collected data and remove obviously erroneous or incomplete records;

[0087] For different types of data, mathematical transformations are applied to convert them to the same scale, resulting in a comprehensive dataset;

[0088] It should be noted that by integrating data from multiple sources and standardizing them, the consistency and accuracy of the data can be ensured, providing high-quality input for subsequent load forecasting models. This method not only improves the efficiency of model training but also enhances the reliability of forecast results, helping to more accurately capture the dynamic changes of the power system.

[0089] S2. The load prediction model is modeled on the preprocessed comprehensive dataset using the ST-GNN graph neural network load prediction model based on the spatiotemporal attention mechanism.

[0090] Furthermore, based on power grid operation status information, the nodes in the power grid and their connection relationships are identified, and a power network graph structure is constructed;

[0091] Nodes are represented as vertices in the graph, and edge weights are assigned based on the actual line transmission capacity or load intensity to form a weighted undirected graph.

[0092] Each node contains its historical load data and meteorological data as node attributes;

[0093] A spatiotemporal attention mechanism is introduced, including a spatial attention module and a temporal attention module;

[0094] In the spatial attention module, the correlation weights between the above nodes are calculated, and the contributions of important nodes are highlighted;

[0095] Define spatial attention coefficient For nodes and nodes The spatial attention weights between them are expressed as follows: ;

[0096] in, These are learnable parameters. It is a node eigenvectors, It is a node The set of neighboring nodes;

[0097] The time attention module dynamically adjusts the importance of different time periods to capture the temporal dynamics of load changes.

[0098] Define the time attention coefficient For time step Importance weights, expressed as: ;

[0099] in, It is the weight of the time attention layer. It is the time step The hidden state;

[0100] By combining spatial attention and temporal attention modules, features of nodes and their neighbors are extracted using graph convolution operations, and load change trends are learned through time series modeling.

[0101] For each node time step The expression is: ;

[0102] in, It is an activation function. It is a node Updated feature representation;

[0103] Stack the above feature update operations into 3-5 layers, with each layer using a non-linear activation function to enhance the model's expressive power, and obtain the load prediction model;

[0104] It should be noted that the introduction of the spatiotemporal attention mechanism enables the model to adaptively focus on the importance of different nodes and time steps, thereby improving the understanding of load patterns in complex power networks. The mechanism is particularly suitable for power grid environments with high heterogeneity and dynamism, and can significantly improve the accuracy and robustness of load forecasting.

[0105] S3. Train the load forecasting model based on a distributed computing environment and output the load forecasting results;

[0106] Furthermore, the Hadoop distributed computing framework is used to build an environment for processing large-scale datasets;

[0107] The comprehensive dataset is partitioned by time to enable parallel processing in a distributed computing framework;

[0108] Load the load prediction model in a distributed computing environment and train the model using the partitioned dataset;

[0109] Batch gradient descent algorithm is used to update model parameters, reducing training time and improving model performance;

[0110] Initial parameters are loaded based on the preload prediction model;

[0111] The comprehensive dataset is divided into multiple smaller batches, each containing a fixed number of samples.

[0112] For each batch of data, the mean squared error (MSE) is used as the loss function to calculate the prediction error under the current model parameters. The expression is as follows: ;

[0113] in, It is the actual value. These are model predictions;

[0114] According to the loss function Calculate model parameters The gradient is expressed as: ;

[0115] Update model parameters using the batch gradient descent formula;

[0116] Iterate through all batches of data and perform gradient calculation and parameter update operations for each batch in turn;

[0117] After traversing a complete dataset, the data order is shuffled again, and the above process is repeated until the predetermined number of iterations is reached or the loss function converges.

[0118] The trained load forecasting model is used to forecast the load over a future period of time, and the load forecast values ​​at each time point are obtained.

[0119] It should be noted that using a distributed computing framework and batch gradient descent algorithm for large-scale data processing and model training can not only significantly reduce training time, but also effectively address the computational challenges brought by massive amounts of data. The method ensures that the model can be optimized in a short time and generate high-precision load prediction results, providing a solid foundation for real-time scheduling.

[0120] S4. Based on the load forecast results, set constraints, simulate the power supply and demand situation under different scenarios, and obtain the power consumption plan scheme;

[0121] Furthermore, constraints are defined based on the power grid's operational status information;

[0122] Construct a mathematical model to minimize the total power generation cost;

[0123] The objective function is defined as follows: The cost of power generation is linearly related to the amount of power generated. ;

[0124] in, It is the first Cost coefficient of each generator set It is its power generation;

[0125] At any given time point, the total power generation should equal the load demand plus transmission losses, and the power generation of each generator unit should be within its maximum and minimum output range.

[0126] The actual transmission volume of each transmission line must not exceed its maximum capacity;

[0127] The mathematical model constructed above was solved using the optimization solver Gurobi.

[0128] Input parameters include the generation cost factor, the maximum output power of each generator unit, the maximum transmission capacity of the transmission line, and the predicted load value. ;

[0129] The output includes the optimal power generation schedule and optimal transmission volume at each time point;

[0130] The total generation cost under each scenario is assessed, and the electricity consumption plan is derived by combining the assessment results.

[0131] It should be noted that by constructing and solving a mathematical model to minimize the total power generation cost, the optimal power generation arrangement and transmission strategy can be found under the premise of satisfying system constraints. The method not only considers economic efficiency, but also takes into account the stability of the system and the utilization rate of renewable energy, providing grid operators with scientific and reasonable decision support.

[0132] S5. Implement specific measures based on the electricity consumption plan and balance the use of short-term electricity.

[0133] Furthermore, the power generation of each generator unit is dynamically adjusted based on real-time load data and forecast errors;

[0134] When the actual load is higher than the forecast, power generation is increased; conversely, it is reduced.

[0135] For loads that can be flexibly adjusted, develop specific load transfer strategies;

[0136] During periods of low load, excess electrical energy is stored using energy storage devices.

[0137] During peak load periods, stored electrical energy is released to alleviate supply and demand pressures;

[0138] It should be noted that dynamically adjusting the power generation plan based on real-time load data, combined with demand-side response strategies and energy storage device scheduling, can effectively alleviate the pressure on power supply and demand and ensure the stable operation of the system. This method can not only improve the flexibility and response speed of the power system, but also achieve effective energy utilization and cost control without affecting users' normal electricity consumption.

[0139] This embodiment also provides a short-term power balance analysis system based on a large model, including:

[0140] The system includes a data management module, a model building module, a predictive analysis module, a solution development module, and a real-time scheduling module.

[0141] The data management module is used to collect historical load data, real-time power grid operation data and weather forecast information from multiple channels, and to perform preliminary inspection, cleaning and standardization processing to form a comprehensive dataset;

[0142] The model building module is used to identify nodes and their connections based on power grid operation status information, construct the power network graph structure, introduce a spatiotemporal attention mechanism, and use graph neural networks to model the preprocessed comprehensive dataset to generate a load forecasting model.

[0143] The predictive analysis module is used to optimize model parameters using a distributed computing framework, train the model using the batch gradient descent algorithm, and use the trained model to predict the load over a period of time, obtaining the load forecast values ​​for each time node.

[0144] The scheme formulation module is used to set constraints, simulate the power supply and demand situation under different scenarios, build a mathematical model to solve the problem to minimize the total power generation cost, obtain the optimal power generation arrangement and transmission volume, and form a power consumption plan scheme.

[0145] The real-time scheduling module is used to dynamically adjust the power generation of each generator unit based on real-time load data, implement demand-side response strategies and energy storage device scheduling, and ensure the balanced use of short-term power.

[0146] This embodiment also provides a computer device applicable to the short-term power balance analysis method based on a large model, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the short-term power balance analysis method based on a large model as proposed in the above embodiment.

[0147] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0148] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the short-term power balance analysis method based on a large model as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0149] In summary, this invention identifies nodes and their connections based on power grid operating status information, constructs a power network graph structure, introduces a spatiotemporal attention mechanism, and uses a graph neural network to model the preprocessed comprehensive dataset, generating a load forecasting model. This achieves an effective representation of the complex topology of the power grid. Through an accurate load forecasting model, future load demand can be predicted more accurately, optimizing power generation plans and reducing energy waste and system instability caused by inaccurate load forecasting. By utilizing a distributed computing framework to optimize model parameters, employing a batch gradient descent algorithm to train the model, and using the trained model to predict load over a future period, load forecast values ​​for each time node are obtained. This achieves efficient processing of large-scale data and rapid model training. The fast and efficient model training process not only saves time and resources but also provides high-precision load forecasting results in a short time, providing strong support for real-time scheduling and decision-making.

[0150] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A short-term power balance analysis method based on a large model, characterized in that: include: Collect historical load data, real-time grid operation data, and weather forecast information from the power system to establish a comprehensive dataset; The preprocessed comprehensive dataset is modeled using a graph neural network ST-GNN load prediction model based on a spatiotemporal attention mechanism to obtain a load prediction model; The load forecasting model is trained using a distributed computing environment, and the load forecasting results are output. Based on load forecasting results, constraints are set, and power supply and demand under different scenarios are simulated to obtain power consumption planning schemes. Implement specific measures based on the electricity consumption plan and balance the use of short-term electricity.

2. The short-term power balance analysis method based on a large model as described in claim 1, characterized in that: The specific steps for collecting historical load data, real-time grid operation data, and weather forecast information from the power system to establish a comprehensive dataset are as follows: Obtain power system load data from the past 3 to 5 years through third-party platforms; Smart meters, sensors, and SCADA platforms are used to collect information on the power grid's operational status. The power grid's operating status information includes voltage, current, frequency, and switching status; Obtain high-precision weather forecast data from weather service providers; The meteorological forecast data includes temperature, humidity, wind speed, and precipitation; Perform a preliminary check on the collected data and remove obviously erroneous or incomplete records; For different types of data, mathematical transformations are applied to convert them to the same scale, resulting in a comprehensive dataset.

3. The short-term power balance analysis method based on a large model as described in claim 2, characterized in that: The method for establishing a load forecasting model using a graph neural network (ST-GNN) based on a spatiotemporal attention mechanism is described above. The preprocessed comprehensive dataset is modeled to obtain the load forecasting model. The specific steps are as follows: Based on power grid operation status information, the nodes in the power grid and their connection relationships are identified, and a power network graph structure is constructed. Nodes are represented as vertices in the graph, and edge weights are assigned based on the actual line transmission capacity or load intensity to form a weighted undirected graph. Each node contains its historical load data and meteorological data as node attributes; A spatiotemporal attention mechanism is introduced, including a spatial attention module and a temporal attention module; In the spatial attention module, the correlation weights between the above nodes are calculated, and the contributions of important nodes are highlighted. Define spatial attention coefficient For nodes and nodes The spatial attention weights between them are expressed as follows: ; in, These are learnable parameters. It is a node eigenvectors, It is a node The set of neighboring nodes; The time attention module dynamically adjusts the importance of different time periods to capture the temporal dynamics of load changes. Define the time attention coefficient For time step Importance weights, expressed as: ; in, It is the weight of the time attention layer. It is the time step The hidden state; By combining spatial attention and temporal attention modules, features of nodes and their neighbors are extracted using graph convolution operations, and load change trends are learned through time series modeling. For each node time step The expression is: ; in, It is an activation function. It is a node Updated feature representation; Stack the above feature update operations into 3-5 layers, with each layer using a non-linear activation function to enhance the model's expressive power, resulting in a load prediction model.

4. The short-term power balance analysis method based on a large model as described in claim 3, characterized in that: The specific steps for training the load forecasting model based on a distributed computing environment and outputting load forecasting results are as follows: Utilize the Hadoo distributed computing framework to build an environment for processing large-scale datasets; Partition the comprehensive dataset by time. Load the load prediction model in a distributed computing environment and train the model using the partitioned dataset; Batch gradient descent algorithm is used to update model parameters, reducing training time and improving model performance; The trained load forecasting model is used to predict the load over a future period of time, and the load forecast values ​​for each time point are obtained.

5. The short-term power balance analysis method based on a large model as described in claim 4, characterized in that: The batch gradient descent algorithm is used to update model parameters, reducing training time and improving model performance. The specific steps are as follows: Initial parameters are loaded based on the preload prediction model; The comprehensive dataset is divided into multiple smaller batches, each containing a fixed number of samples. For each batch of data, the mean squared error (MSE) is used as the loss function to calculate the prediction error under the current model parameters. The expression is as follows: ; in, It is the actual value. These are model predictions; According to the loss function Calculate model parameters The gradient is expressed as: ; Update model parameters using the batch gradient descent formula; Iterate through all batches of data and perform gradient calculation and parameter update operations for each batch in turn; After traversing a complete dataset, the data order is shuffled again, and the above process is repeated until the predetermined number of iterations is reached or the loss function converges.

6. The short-term power balance analysis method based on a large model as described in claim 5, characterized in that: Based on load forecasting results, constraints are set, and power supply and demand under different scenarios are simulated to obtain a power consumption plan. The specific steps are as follows: Define constraints based on the power grid's operational status information; Construct a mathematical model to minimize the total power generation cost; The objective function is defined as follows: The cost of power generation is linearly related to the amount of power generated. ; in, It is the first Cost coefficient of each generator set It is its power generation; At any given time point, the total power generation should equal the load demand plus transmission losses, and the power generation of each generator unit should be within its maximum and minimum output range. The actual transmission volume of each transmission line must not exceed its maximum capacity; The mathematical model constructed above was solved using the optimization solver Gurobi. Input parameters include the generation cost factor, the maximum output power of each generator set, the maximum transmission capacity of the transmission line, and the predicted load value; The output includes the optimal power generation schedule and optimal transmission volume at each time point; The total generation cost under each scenario is assessed, and the electricity consumption plan is derived by combining the assessment results.

7. The short-term power balance analysis method based on a large model as described in claim 6, characterized in that: The specific steps for implementing measures based on the electricity consumption plan and balancing short-term electricity usage are as follows: The power generation of each generator unit is dynamically adjusted based on real-time load data and forecast errors. When the actual load is higher than the forecast, power generation is increased; conversely, it is reduced. For loads that can be flexibly adjusted, develop specific load transfer strategies; During periods of low load, excess electrical energy is stored using energy storage devices. During peak load periods, stored electrical energy is released to alleviate supply and demand pressures.

8. A short-term power balance analysis system based on a large model, based on the short-term power balance analysis method based on a large model as described in any one of claims 1 to 7, characterized in that: include: The system includes a data management module, a model building module, a predictive analysis module, a solution development module, and a real-time scheduling module. The data management module is used to collect historical load data, real-time power grid operation data and weather forecast information from multiple channels, and to perform preliminary inspection, cleaning and standardization processing to form a comprehensive dataset. The model building module is used to identify nodes and their connection relationships based on power grid operation status information, construct a power network graph structure, introduce a spatiotemporal attention mechanism, and use a graph neural network to model the preprocessed comprehensive dataset to generate a load prediction model. The predictive analysis module is used to optimize model parameters using a distributed computing framework, train the model using a batch gradient descent algorithm, and use the trained model to predict the load over a period of time in the future, thereby obtaining the load prediction values ​​for each time node. The scheme formulation module is used to set constraints, simulate the power supply and demand situation under different scenarios, construct a mathematical model to solve for minimizing the total power generation cost, obtain the optimal power generation arrangement and transmission volume, and form a power consumption plan scheme. The real-time scheduling module is used to dynamically adjust the power generation of each generator unit based on real-time load data, implement demand-side response strategies and energy storage device scheduling, and ensure the balanced use of short-term power.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the short-term power balance analysis method based on a large model as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the short-term power balance analysis method based on a large model as described in any one of claims 1 to 7.