Electric power and electric quantity balancing method and system based on TabDiT load prediction

By processing heterogeneous load data using the TabDiT load forecasting model, high-precision load forecast values ​​are generated. Combined with the power balance optimization model, the problems of forecast deviation and inaccurate scheduling in traditional methods are solved, thereby improving the economy of the distribution network and the renewable energy absorption capacity.

CN121663504APending Publication Date: 2026-03-13STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Traditional load forecasting methods are unable to effectively characterize the nonlinear and non-stationary fluctuations of load sequences, and are also unable to handle multi-source heterogeneous characteristics and variable-length input-output sequences, resulting in large forecasting errors, inaccurate dispatching, and high operating costs in power balance.

Method used

The TabDiT load forecasting model is adopted, which processes heterogeneous load data through a non-global variational autoencoder and a diffusion converter, and generates future load forecasts by combining an autoregressive decoder. A power balance optimization model is constructed, taking into account the constraints of generator sets and energy storage devices, to achieve a balance between power supply and demand.

Benefits of technology

It achieves high-precision load forecasting in high-uncertainty scenarios, improves the economy of distribution networks and the capacity for renewable energy absorption, solves the problems of inaccurate scheduling and high operating costs caused by forecasting bias in traditional methods, and realizes intelligent and adaptive power balance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121663504A_ABST
    Figure CN121663504A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power and electric quantity balancing method and system based on TabDiT load prediction, and belongs to the technical field of electric power systems, and the method comprises the steps: obtaining historical load data of a planning region, carrying out the normalization processing through employing a pre-stored standardized parameter, inputting the data into a pre-trained TabDiT load prediction model, and obtaining a standardized load prediction value of a future time period; carrying out anti-standardization processing by using pre-stored standardization parameters, and converting the pre-stored standardization parameters into a future load prediction result of an original magnitude; taking a future load prediction result as a load demand, and constructing an electric power and electric quantity balance optimization model; and solving the electric power and electric quantity balance optimization model to obtain an optimal output plan of the generator set and the energy storage device, and generating a power grid dispatching instruction. According to the method, high-precision power load prediction is realized through the TabDiT model, power and electric quantity balance is optimized, and the economical efficiency, the reliability and the new energy consumption capability of power grid operation are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system technology, and relates to the field of distribution network planning under the background of power balance, and particularly to a power balance method and system based on TabDiT load forecasting. Background Technology

[0002] In recent years, with the large-scale integration of distributed generators (DGs) and the increasing spatiotemporal uncertainty of power loads, the operation mode and planning methods of traditional distribution networks are facing severe challenges. The widespread penetration of DGs has altered the unidirectional power flow characteristics of traditional power grids, transforming distribution networks from passive power supply to active supply-demand interaction. Simultaneously, the increasing complexity of load types, including new elements such as electric vehicle charging loads, flexible and adjustable loads, and user-side energy storage, further exacerbates the uncertainty of system operation. To adapt to the development needs of a new power system characterized by a high proportion of renewable energy, it is urgent to fully explore the regulation potential of new power electronic devices in the power generation, grid, load, and storage links, and to construct a more flexible distribution network with stronger distributed energy absorption capacity through multi-device collaborative control and optimized scheduling.

[0003] In power system analysis and operation, load forecasting is a key foundational element, and its accuracy directly affects the efficiency of grid dispatching, energy management, and market transactions. Current mainstream power load forecasting methods can be categorized into three types: First, statistical methods based on traditional time series analysis, such as the Autoregressive Integral Moving Average (ARIMA) model. These methods have good fitting ability for linear and stationary time series data, but they are difficult to effectively characterize the nonlinear and non-stationary fluctuations in the load series caused by factors such as weather and holidays. Second, forecasting models based on classic deep learning architectures, such as Long Short-Term Memory (LSTM) networks and Transformers. These methods capture long-term time series dependencies by using gating or self-attention mechanisms, and are superior to traditional statistical methods in handling complex nonlinear load series. However, they still have insufficient modeling capabilities when dealing with the multi-source heterogeneous characteristics of load data (such as multi-dimensional features such as meteorology, electricity prices, and social events) and variable-length input-output sequences. Third, generative forecasting models that have emerged in recent years, such as TimeGrad based on diffusion probability models. These methods can characterize the uncertainty in load forecasting through the probability generation process and provide diversity in forecast intervals. However, they have limitations in integrating multimodal and heterogeneous external features, and it is difficult to effectively handle the randomness and diversity of load series while ensuring forecast accuracy.

[0004] The intermittent, volatile, and uncontrollable nature of renewable energy output significantly impacts the safe and stable operation of distribution networks, leading to issues such as voltage exceeding limits, frequency fluctuations, and reverse power flow, thus reducing system power supply reliability. To address the dual challenges posed by renewable energy integration and load uncertainty, research on power balance is receiving increasing attention. How to further improve the comprehensive utilization efficiency of power resources while meeting the growing and diversified power supply demands has become a core issue in current distribution network planning and operation. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a power balance method and system based on TabDiT load forecasting.

[0006] The present invention adopts the following technical solution.

[0007] A first aspect of the present invention provides a power balance method based on TabDiT load forecasting, comprising: Historical load data of the planning area is obtained and normalized using pre-stored standardized parameters. The historical load data includes numerical load characteristics, timestamp characteristics, and relevant meteorological condition characteristics. Normalized historical load data is input into a pre-trained TabDiT load forecasting model to obtain standardized load forecasts for future periods. The standardized load forecast values ​​are de-standardized using pre-stored standardized parameters to convert them into future load forecast results of the original magnitude. Using future load forecasts as load demand, a power balance optimization model is constructed with the goal of minimizing total operating costs or minimizing system ineffective power, taking into account generator operation constraints and energy storage device capacity constraints. Solving the power balance optimization model yields the optimal output plan for generator sets and energy storage devices, and generates grid dispatch instructions to achieve power supply and demand balance in the distribution network.

[0008] Optionally, the TabDiT load forecasting model obtains standardized load forecasts for future periods in the following manner: A non-global variational autoencoder is used to map the tabular row data containing numerical load characteristics, timestamp characteristics, and related meteorological condition characteristics to the potential space to obtain the historical load potential sequence. Using the statistical characteristics of historical load potential sequences as conditional embeddings, the diffusion transformer is guided to perform a denoising process in the potential space to generate load potential sequences for future periods; By reconstructing the potential load sequence for future periods using an autoregressive decoder, standardized load forecasts for future periods are generated.

[0009] Optionally, the conditional embedding also incorporates external input information, including weather and electricity prices.

[0010] Optionally, the fusion includes: The conditional embedding, weather embedding vector, and electricity price embedding vector are concatenated and then nonlinearly transformed through a learnable multilayer perceptron network to generate the transformed fused embedding vector. The transformed fused embedding vector is input into the conditional input layer of the diffusion transformer.

[0011] Optionally, the denoising process of the diffusion transformer employs a category-guided mechanism, which adjusts the weights of conditional noise prediction and unconditional noise prediction through a guide coefficient to enhance the obedience of the generated sequence to the conditional embedding. The denoising process employs the DDIM accelerated sampling strategy.

[0012] Optionally, the TabDiT load prediction model achieves variable-length prediction through a sequence end token mechanism: During training, end tokens are padded into the load sequence whose length is less than the preset maximum length to construct training samples; During prediction, sequence generation is terminated when the autoregressive decoder outputs an end token to dynamically adapt to changes in load sequence length due to date type differences.

[0013] Optionally, the constraints of the power balance optimization model include generator operation constraints, energy storage device capacity constraints, and system power balance constraints, wherein: Generator set operating constraints include ramp rate constraints, output upper and lower limit constraints, and operating consumption characteristic constraints. Constraints on energy storage devices include upper and lower capacity limits, charging and discharging power constraints, and energy conservation constraints.

[0014] A second aspect of the present invention provides a power balancing system based on TabDiT load forecasting, used to implement the power balancing method based on TabDiT load forecasting described in the first aspect of the present invention, comprising: The system comprises a data preprocessing module, a load forecasting module, a post-processing module, an optimized scheduling module, and a scheduling instruction generation module, among which: The data preprocessing module is used to acquire historical load data of the planning area and perform normalization processing using pre-stored standardized parameters. The historical load data includes numerical load characteristics, timestamp characteristics, and relevant meteorological condition characteristics. The load forecasting module has a built-in pre-trained TabDiT load forecasting model, which is used to receive the normalized historical load data and output standardized load forecast values ​​for future periods. The post-processing module is used to de-standardize the standardized load forecast values ​​using pre-stored standardized parameters, converting them into future load forecast results of the original magnitude. The optimized scheduling module is used to construct a power balance optimization model with the goal of minimizing total operating costs or minimizing system invalid electricity, based on future load forecast results as load demand, and takes into account generator set operation constraints and energy storage device capacity constraints. The dispatch instruction generation module is used to solve the power balance optimization model to obtain the optimal output plan of generator sets and energy storage devices, and generate power grid dispatch instructions to achieve the power supply and demand balance of the distribution network.

[0015] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when loaded onto the processor, implements a power balance method based on TabDiT load forecasting according to a first aspect of the present invention.

[0016] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, characterized in that, when executed by a processor, the computer program implements a power balance method based on TabDiT load forecasting according to a first aspect of the present invention.

[0017] Compared with the prior art, the beneficial effects of the present invention include at least the following: 1. This invention introduces the TabDiT model, which integrates non-integral VAE and diffusion converter, to process heterogeneous load data containing numerical, temporal, and meteorological data. This effectively solves the key technical problems of traditional prediction methods, such as insufficient fusion of multi-source heterogeneous features and difficulty in adapting to dynamic changes in sequence length. It achieves high-precision, variable-length prediction of power load in high-uncertainty scenarios.

[0018] 2. This invention solves the problems of inaccurate scheduling plans, high operating costs, or serious energy waste caused by large prediction deviations in traditional planning methods by deeply coupling high-precision load forecasting results with a power balance optimization model aimed at economic operation or optimal efficiency. It achieves improved economic efficiency and renewable energy absorption capacity of distribution network operation while ensuring power supply reliability.

[0019] 3. This invention enables the load forecasting model to automatically identify and adapt to load patterns and length differences of different date types such as weekdays and holidays through sequence end tokens and condition guidance mechanisms. This solves the drawbacks of fixed forecasting windows having poor flexibility and requiring manual adjustment, and realizes intelligent and adaptive processes from data preprocessing to scheduling decisions, thereby improving the practicality and automation level of the method. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the TabDiT denoising network (a) and VAE network (b) provided according to an embodiment of the present invention; Figure 2 This is a power distribution network topology diagram of region A provided in accordance with an embodiment of the present invention; Figure 3 This is a power load forecast curve provided according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the power balance result provided in accordance with an embodiment of the present invention; Figure 5 This is a flowchart of a method provided according to an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.

[0022] In Example 1, this invention provides a power balance method based on TabDiT (Tabular Diffusion Transformer) load forecasting, such as... Figure 5 As shown, it includes the following steps: Step 1: Obtain historical load data for the planning area and normalize it using pre-stored standardized parameters. The historical load data includes numerical load characteristics, timestamp characteristics, and relevant meteorological condition characteristics.

[0023] Preferably, in step 1, the data source is: collecting historical load data and photovoltaic power generation output of the planning area; the data features include three types of features: numerical load, timestamp, and relevant meteorological conditions.

[0024] For example, in order to eliminate the influence of different variable units, the original input data (such as load and temperature) is standardized:

[0025] in, This is the load value. This is the temperature value; and These are the mean and standard deviation of the load, respectively. and These represent the mean and standard deviation of the temperature, respectively.

[0026] Step 2: Input the normalized historical load data into the pre-trained TabDiT load forecasting model to obtain standardized load forecast values ​​for future periods.

[0027] Preferably, the TabDiT load forecasting model obtains standardized load forecasts for future time periods in the following manner: A non-global variational autoencoder is used to map the tabular row data containing numerical load characteristics, timestamp characteristics, and related meteorological condition characteristics to the potential space to obtain the historical load potential sequence. Using the statistical characteristics of historical load potential sequences as conditional embeddings, the diffusion transformer is guided to perform a denoising process in the potential space to generate load potential sequences for future periods; By reconstructing the potential load sequence for future periods using an autoregressive decoder, standardized load forecasts for future periods are generated.

[0028] More preferably, the conditional embedding also incorporates external input information, including weather and electricity prices.

[0029] More preferably, the fusion includes: The conditional embedding, weather embedding vector, and electricity price embedding vector are concatenated and then nonlinearly transformed through a learnable multilayer perceptron network to generate the transformed fused embedding vector. The transformed fused embedding vector is input into the conditional input layer of the diffusion transformer.

[0030] More preferably, the denoising process of the diffusion transformer employs a category-guided mechanism, which adjusts the weights of conditional noise prediction and unconditional noise prediction through a guide coefficient to enhance the obedience of the generated sequence to the conditional embedding. The denoising process employs the DDIM accelerated sampling strategy.

[0031] More preferably, the TabDiT load prediction model achieves variable-length prediction through a sequence end-of-sequence token mechanism: During training, end tokens are padded into the load sequence whose length is less than the preset maximum length to construct training samples; During prediction, sequence generation is terminated when the autoregressive decoder outputs an end token to dynamically adapt to changes in load sequence length due to date type differences.

[0032] Specifically, unlike traditional VAEs that encode the entire sequence as a whole, TabDiT employs a row-by-row independent encoding strategy to adapt to the variable length characteristics of power load sequences. The VAE encoder takes a single load table row as input. During encoding, numerical features (such as numerical load features) and categorical features (such as timestamp features and relevant meteorological conditions) are first converted into token sequences, and then the latent vector is output through a VAE encoder that integrates a multi-head self-attention mechanism. .

[0033] The mathematical expression of this VAE encoder is:

[0034] In the formula, r represents a single-row table containing load and temperature information, Embed(·) is the feature embedding function, and MultiHeadAttn(·) is a multi-head self-attention layer. and Let be the mean and logarithmic variance of the latent vector output by the encoder, respectively. It is standard normal noise.

[0035] The training loss of VAE is a weighted sum of the reconstruction loss and the KL divergence, and the loss function for adapting the load data is:

[0036] In the formula, For VAE decoder, β is the KL divergence weight, MSE(·) ensures the consistency between the decoding result and the original table rows, and the KL divergence constraint latent distribution is close to the standard normal. This factor determines the model's ability to reconstruct historical load curves and predict future load values. It forces the decoder to accurately recover the original load table rows from the compressed latent vector z. Although the formula is MSE, in actual decoding, the classification field is reconstructed by calculating the cross-entropy loss using Softmax. This ensures that the model can correctly understand and reproduce the load patterns under different scenarios. Formula Items This allows the model to learn the inherent, smooth changes in power load, ensuring that the actual load does not experience drastic jumps between adjacent moments.

[0037] KL divergence makes the potential space continuous and smooth, meaning that points with similar load patterns (such as morning peaks on two workdays) will be close together in the potential space. This smoothness makes it easier to generate time-coherent, physically consistent load curves when DiT is generated through diffusion in the potential space, avoiding abrupt, unrealistic power spikes or drops.

[0038] Specifically, for the autoregressive VAE decoder, to improve the accuracy of workload data reconstruction, the decoder starts with the [Start] token and uses an autoregressive mechanism to generate table rows token by token, relying on two types of attention: Causal attention ensures the order of feature generation, while cross attention associates latent vectors. With decoding features.

[0039] The decoding process of this decoder can be mathematically expressed as follows:

[0040] in, Given the token sequence generated before t, CrossAttn(·) is for cross-attention and CausalAttn(·) is for causal attention; Finally, by generating each token individually, the data is concatenated into a complete load table row, ensuring consistency between numerical loads and category attributes.

[0041] Specifically, the TabDiT load forecasting model achieves dynamic length load forecasting through the EoS token forecasting mechanism, as follows: During training, the length The load sequence, add Each EoS padding row, together with the real rows, constitutes the training samples. , The preset maximum length; During prediction, DiT generates potential sequences. Then, the decoder decodes line by line, stopping when the first line containing the EoS token is detected, with an output length of [length missing]. Load sequence:

[0042] This mechanism can automatically adapt to the difference in workload between weekdays and weekends without requiring manual adjustment.

[0043] Specifically, DiT, as a denoiser, takes three types of information as input: the noisy latent sequence. Temporal embedding (TEMB), conditional embedding (C), output prediction noise Noise is added to the potential sequence s0 following a linear beta scheduling process. :

[0044] in, , , The noise figure is linearly increasing.

[0045] After normalizing time step t, it is mapped to a feature vector:

[0046] In the formula, T=200 is the total number of diffusion steps, and MLP(·) is a two-layer linear network with ReLU activation.

[0047] Conditional embedding uses the mean of the historical load potential sequence as a condition to guide the prediction trend:

[0048] Where K is the length of the historical sequence.

[0049] It should be noted that the historical load latent variable mean is mainly used as a conditional embedding to provide trend guidance. At the same time, this conditional embedding mechanism is scalable and can integrate exogenous operating characteristics such as weather, temperature, and electricity prices to enhance the responsiveness to load fluctuations.

[0050] For example, weather and electricity prices can be combined, and the combination method can be represented as follows:

[0051] Where eprice and eweather are weather and electricity price condition embeddings, respectively; fcond(·) is a learnable fusion function.

[0052] To enhance the conditional constraints, a category-guided (CFG) mechanism is used to predict noise:

[0053] Where s is the guiding coefficient. For conditional noise prediction of c, This is an unconditional prediction. The training loss of DiT is the MSE of the predicted noise and the actual noise:

[0054] The prediction phase utilizes DDIM sampling acceleration, which can significantly improve inference efficiency.

[0055] TabDiT's denoising network and VAE network are as follows Figure 1 As shown.

[0056] Step 3: Use the pre-stored standardized parameters to de-standardize the standardized load forecast values ​​and convert them into future load forecast results of the original magnitude.

[0057] Step 4: Using the future load forecast results as the load demand, construct a power balance optimization model with the goal of minimizing total operating costs or minimizing system invalid electricity, and take into account generator operation constraints and energy storage device capacity constraints.

[0058] Preferably, the constraints of the power balance optimization model include generator operation constraints, energy storage device capacity constraints, and system power balance constraints, wherein: Generator set operating constraints include ramp rate constraints, output upper and lower limit constraints, and operating consumption characteristic constraints. Constraints on energy storage devices include upper and lower capacity limits, charging and discharging power constraints, and energy conservation constraints.

[0059] Specifically, given a clear forecast of the power load for each distribution network zone, and based on a stable power system operation mode, a flexible calculation method is applied to control the power supply and demand balance. Considering that the load demand of the distribution network is constantly changing, and with the goal of meeting the power supply load demand of each distribution network zone, while ensuring the minimum amount of ineffective power output, flexible complementarity is applied to the power output of each distribution network zone. The specific calculation formula is as follows:

[0060] In the formula, This represents the calculated value of flexible complementarity in power supply and demand. Indicates time, This indicates the load parameters.

[0061] By constructing a power system operation model and substituting the above calculation formulas into it, we obtain the following equation:

[0062] In the formula, This represents the climbing rate coefficient, which is dimensionless. Indicates the generator set power. Indicates the number of generator sets in the distribution network. This indicates the power consumption of the generator set. Indicates the capacity of the energy storage device. , This indicates the maximum and minimum energy storage capacity.

[0063] Considering the ramp rate of generator sets in the distribution network, and controlling the output power of the generator sets, the adjustment target can be set as follows:

[0064] Based on the above calculation results, the optimal ramp rate setting is determined. This ensures that the total power generation of the generator sets and energy storage units in each section of the distribution network exceeds the load demand, meets the electricity needs of distribution network users, and ultimately guarantees the power balance of the power system.

[0065] Step 5: Solve the power balance optimization model to obtain the optimal output plan of generator sets and energy storage devices, and generate grid dispatch instructions to achieve power supply and demand balance in the distribution network.

[0066] It should be noted that, after studying representative methods in the field of tabular time series generation, it was found that existing technologies are difficult to directly meet the high requirements of accuracy and flexibility for power load forecasting. For example, models such as TabGPT, which are based on the autoregressive Transformer architecture, rely on initial real sequences for guidance during the forecasting process, lack unconditional generation capabilities, and cannot independently complete load sequence forecasting from scratch. On the other hand, methods such as REaLTabFormer use fixed-length digital encoding to process numerical features, which easily generates a large amount of redundant information, leading to increased decoding errors and decreased computational efficiency.

[0067] To address the aforementioned challenges, this invention introduces and deeply adapts the TabDiT model framework. This model innovatively proposes a two-stage architecture of "non-global VAE + DiT," providing a novel technical path for the unconditional, high-precision generation of heterogeneous tabular time-series data. This invention does not simply apply this model; rather, it specifically enhances the latent space encoding and generation inference strategies of power load data based on its unique core characteristics, such as significant periodicity, large peak-valley differences, and continuous physical changes. Core optimizations include: During the coding phase, line-by-line VAE coding is adopted and temporal continuity constraints are introduced to make the evolution of latent variables over time smoother, so as to strictly conform to the physical change law of power load.

[0068] In the feature fusion stage, the cross-attention mechanism is used to achieve deep fusion of multi-source heterogeneous data such as meteorological and date data with load values, so as to fully explore the key factors affecting load fluctuations.

[0069] During the sequence control phase, the dynamic length control of the prediction sequence is achieved through the EoS (End of Sequence) token mechanism, which automatically adapts to the differences in load patterns and durations caused by different date types such as weekdays and holidays, fundamentally solving the problem of mismatch in fixed prediction windows.

[0070] During the generation phase, the advantages of diffusion models in characterizing uncertainty are fully utilized, and combined with the conditional guidance mechanism, load curves that conform to the overall trend and include reasonable random fluctuations are generated, providing more reliable predictive input for power balance.

[0071] Through the above systematic optimization, the TabDiT load forecasting method provided by this invention can more accurately characterize the uncertainty and periodic coupling relationship of load fluctuations, providing high-precision technical support for distribution network planning and scheduling in complex operating scenarios.

[0072] In Embodiment 2, this invention provides a power balancing system based on TabDiT load forecasting, used in the power balancing method based on TabDiT load forecasting described in Embodiment 1, comprising: The system comprises a data preprocessing module, a load forecasting module, a post-processing module, an optimized scheduling module, and a scheduling instruction generation module, among which: The data preprocessing module is used to acquire historical load data of the planning area and perform normalization processing using pre-stored standardized parameters. The historical load data includes numerical load characteristics, timestamp characteristics, and relevant meteorological condition characteristics. The load forecasting module has a built-in pre-trained TabDiT load forecasting model, which is used to receive the normalized historical load data and output standardized load forecast values ​​for future periods. The post-processing module is used to de-standardize the standardized load forecast values ​​using pre-stored standardized parameters, converting them into future load forecast results of the original magnitude. The optimized scheduling module is used to construct a power balance optimization model with the goal of minimizing total operating costs or minimizing system invalid electricity, based on future load forecast results as load demand, and takes into account generator set operation constraints and energy storage device capacity constraints. The dispatch instruction generation module is used to solve the power balance optimization model to obtain the optimal output plan of generator sets and energy storage devices, and generate power grid dispatch instructions to achieve the power supply and demand balance of the distribution network.

[0073] Embodiment 3 of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded onto the processor, it implements a power balance method based on TabDiT load forecasting as described in Embodiment 1.

[0074] Embodiment 4 of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a power balance method based on TabDiT load forecasting as described in Embodiment 1.

[0075] To more clearly illustrate the outstanding substantive features of this invention and the significant progress it brings to the prior art, an application example of implementing this invention is described below.

[0076] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Specific application examples include: The medium-voltage power distribution system in area A is adopted, and its topology is shown in the figure below. Figure 2As shown, the power distribution system has a rated voltage of 10kV and a capacity of 1000kVA. The photovoltaic power generation system is installed at nodes 1 and 2 respectively, and a generator set is added at node 3.

[0077] A real electricity load dataset with 15-minute intervals from region A was used, containing three types of features: numerical load, timestamps, and relevant meteorological conditions. The training and test sets were divided in an 8:2 ratio. The comparison models were LSTM and Transformer, and the evaluation metrics were MAE (Root Mean Square Error), RMSE (Mean Absolute Error), and MAPE (Mean Absolute Percentage Error). The prediction results are compared with the evaluation metrics of different models. Figure 3 As shown in Table 1.

[0078] Table 1 Comparison of Evaluation Indicators for Prediction Models

[0079] This table compares the performance of three prediction models—LSTM, Transformer, and TabDiT—on three metrics: MAE (mean absolute error), RMSE (root mean square error), and MAPE (mean absolute percentage error).

[0080] Among them, the TabDiT model performed best in all three metrics, with a MAE of 97.1kW, an RMSE of 119.1kW, and a MAPE of 2.85%; the Transformer model was second best; and the LSTM model performed relatively poorly, reflecting the differences in prediction accuracy among different models, with the TabDiT model having the highest prediction accuracy.

[0081] The model demonstrates significant advantages in adapting to variable-length sequences. Through the EoStoken prediction mechanism, it can automatically identify the length characteristics of load sequences in different scenarios without the need for manual preset of fixed window parameters.

[0082] In this context, "same scenario" mainly refers to the differences in electricity consumption continuity characteristics caused by factors such as date type (weekday, weekend, holiday), day-night differences, and weather during actual power system operation. The duration of complete and effective high load also varies across different date series. Therefore, when performing rolling forecasts at a 15-minute resolution, the model needs to automatically determine the forecast length based on the current operating conditions, rather than fixing it to a single window.

[0083] The purpose of the EoS Token is to mark the natural end of the load sequence. The model learns the generation probability of the EoS in the latent space, and stops generating when the symbol is predicted in the decoding stage, no longer constrained by the fixed window. In practice, the model treats the end of the sequence as a predictable discrete symbol with equal status to the load value, participating in conditional generation and probability calculation, so that the sequence length is automatically determined by the model rather than manually set.

[0084] This dynamic adaptability stems from the unconstrained nature of non-global VAE encoding on sequence length and the precise learning of the "end of sequence" signal by DiT in the latent space, enabling the model to naturally adapt to the load duration characteristics of different time periods.

[0085] In capturing time-series abrupt changes, the model effectively tracks peak and trough fluctuations in the load sequence by leveraging the causal attention and cross-attention collaborative mechanism of the autoregressive VAE decoder. For sudden increases and decreases in intraday load (such as the morning start peak and midday trough transition), the decoding process ensures the consistency between the predicted curve and the actual trend through token-by-token generation of time-series constraints, reducing the lag or lead bias common in traditional models at abrupt change points.

[0086] In terms of heterogeneous feature collaborative modeling, the model achieves a deep correlation between numerical load and temporal category attributes through an in-row multi-head self-attention mechanism. For load prediction tasks that include scene attributes, the embedding vectors of category features and the variable range representations of numerical features interact dynamically through attention weights, enabling the model to automatically strengthen the influence of key scene information on load trends and improve prediction consistency in complex scenarios.

[0087] Overall, the model's design mechanism fundamentally solves the limitations of traditional methods in variable length adaptation, mutation capture, and heterogeneous collaboration, demonstrating a powerful modeling capability for complex time series patterns.

[0088] Power balance analysis was performed using data from one day of load forecasting. from Figure 4 As can be seen, after applying the proposed power balancing method, the actual output power met the electricity load demand, ensuring the stable operation of the distribution network, thus proving the feasibility of the TabDiT-based load forecasting method. In the absence of photovoltaic output, load demand is mainly met by generator units. When photovoltaic output overflows, energy storage can achieve flexible balancing. The average unbalanced power is 145.024 kW, and the maximum unbalanced power is 2089.709 kW.

[0089] Therefore, this invention provides a method based on the TabDiT load forecasting model, which achieves high-quality power balance management.

[0090] This invention adapts the TabDiT framework to power load forecasting scenarios. Through four core innovations—non-global VAE encoding, variable-range numerical representation, autoregressive decoding, and variable-length sequence generation—it effectively addresses the shortcomings of traditional models in heterogeneous data modeling, variable-length sequence adaptation, and forecast diversity. Experimental results show that the model significantly outperforms existing methods in prediction accuracy, temporal consistency, and practical value, providing a new and effective solution for short-term power load forecasting in complex scenarios. Based on the TabDiT load forecasting model, high-quality power balance management can be achieved.

[0091] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A power balance method based on TabDiT load forecasting, characterized in that, include: Historical load data of the planning area is obtained and normalized using pre-stored standardized parameters. The historical load data includes numerical load characteristics, timestamp characteristics, and relevant meteorological condition characteristics. Normalized historical load data is input into a pre-trained TabDiT load forecasting model to obtain standardized load forecasts for future periods. The standardized load forecast values ​​are de-standardized using pre-stored standardized parameters to convert them into future load forecast results of the original magnitude. Using future load forecasts as load demand, a power balance optimization model is constructed with the goal of minimizing total operating costs or minimizing system ineffective power, taking into account generator operation constraints and energy storage device capacity constraints. Solving the power balance optimization model yields the optimal output plan for generator sets and energy storage devices, and generates grid dispatch instructions to achieve power supply and demand balance in the distribution network.

2. The power balance method based on TabDiT load forecasting according to claim 1, characterized in that: The TabDiT load forecasting model obtains standardized load forecasts for future periods in the following way: A non-global variational autoencoder is used to map the tabular row data containing numerical load characteristics, timestamp characteristics, and related meteorological condition characteristics to the potential space to obtain the historical load potential sequence. Using the statistical characteristics of historical load potential sequences as conditional embeddings, the diffusion transformer is guided to perform a denoising process in the potential space to generate load potential sequences for future periods; By reconstructing the potential load sequence for future periods using an autoregressive decoder, standardized load forecasts for future periods are generated.

3. The power balance method based on TabDiT load forecasting according to claim 2, characterized in that: The conditional embedding also incorporates external input information, including weather and electricity prices.

4. The power balance method based on TabDiT load forecasting according to claim 3, characterized in that: The fusion includes: The conditional embedding, weather embedding vector, and electricity price embedding vector are concatenated and then nonlinearly transformed through a learnable multilayer perceptron network to generate the transformed fused embedding vector. The transformed fused embedding vector is input into the conditional input layer of the diffusion transformer.

5. The power balance method based on TabDiT load forecasting according to claim 2, characterized in that: The denoising process of the diffusion transformer adopts a category-guided mechanism, which adjusts the weights of conditional noise prediction and unconditional noise prediction through a guide coefficient to enhance the obedience of the generated sequence to the conditional embedding. The denoising process employs the DDIM accelerated sampling strategy.

6. The power balance method based on TabDiT load forecasting according to claim 2, characterized in that: The TabDiT load prediction model achieves variable-length prediction through a sequence end-of-sequence token mechanism. During training, end tokens are added to the load sequence whose length is less than the preset maximum length to construct training samples; During prediction, sequence generation is terminated when the autoregressive decoder outputs an end token to dynamically adapt to changes in load sequence length due to date type differences.

7. The power balance method based on TabDiT load forecasting according to claim 1, characterized in that: The constraints of the power balance optimization model include generator operation constraints, energy storage device capacity constraints, and system power balance constraints, among which: Generator set operating constraints include ramp rate constraints, output upper and lower limit constraints, and operating consumption characteristic constraints. Constraints on energy storage devices include upper and lower capacity limits, charging and discharging power constraints, and energy conservation constraints.

8. A power balancing system based on TabDiT load forecasting, used to implement the power balancing method based on TabDiT load forecasting as described in any one of claims 1-7, characterized in that, include: The system comprises a data preprocessing module, a load forecasting module, a post-processing module, an optimized scheduling module, and a scheduling instruction generation module, among which: The data preprocessing module is used to acquire historical load data of the planning area and perform normalization processing using pre-stored standardized parameters. The historical load data includes numerical load characteristics, timestamp characteristics, and relevant meteorological condition characteristics. The load forecasting module has a built-in pre-trained TabDiT load forecasting model, which is used to receive the normalized historical load data and output standardized load forecast values ​​for future periods. The post-processing module is used to de-standardize the standardized load forecast values ​​using pre-stored standardized parameters, converting them into future load forecast results of the original magnitude. The optimized scheduling module is used to construct a power balance optimization model with the goal of minimizing total operating costs or minimizing system invalid electricity, based on future load forecast results as load demand, and takes into account generator set operation constraints and energy storage device capacity constraints. The dispatch instruction generation module is used to solve the power balance optimization model to obtain the optimal output plan of generator sets and energy storage devices, and generate power grid dispatch instructions to achieve the power supply and demand balance of the distribution network.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is loaded into the processor, it implements a power balance method based on TabDiT load forecasting according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a power balance method based on TabDiT load forecasting according to any one of claims 1-7.