A method and system for power load forecasting based on multi-model heterogeneous AI parallel forecasting

By using a multi-model heterogeneous AI parallel prediction method, the problems of diverse data formats, lack of systematic modeling of the impact of holidays, and unstable accuracy of single models in power load forecasting are solved. Stable and accurate predictions are achieved under different data conditions, adapting to multiple data formats and automatically applying physical rationality constraints.

CN123121473APending Publication Date: 2026-11-17ENERGY CHINA YNPD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610990416.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing power load forecasting methods suffer from several problems, including the lack of systematic modeling of the impact of Chinese holidays, unstable accuracy of single models under different data conditions, unreliable predictions when training data is insufficient, and a lack of physical constraints on the prediction results.

Method used

A multi-model heterogeneous AI parallel prediction method is adopted, including multi-encoding adaptive data access and Chinese semantic alignment, fusion of lunar and Gregorian calendar mixed holiday influence weight modeling, joint construction of six types of multi-dimensional features, parallel training and prediction of six heterogeneous load prediction models, adaptive data volume mode switching and year-by-year monotonically increasing enhancement and multi-model integration.

Benefits of technology

It achieves stable prediction accuracy under various data conditions, adapts to various data formats, automatically applies physical rationality constraints, and improves the reliability and accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to a power load forecasting method and system based on multi-model heterogeneous AI parallel prediction, belonging to the field of power system load forecasting technology. The method includes: multi-encoding adaptive data access and Chinese semantic alignment; weighted modeling of the impact of mixed lunar and Gregorian calendar holidays; joint construction of six types of multi-dimensional features; multi-model heterogeneous AI parallel prediction; adaptive data volume mode switching and hybrid inference; year-by-year monotonically increasing modulus and multi-model integration. The system includes a data access module, a holiday modeling module, a feature engineering module, a parallel prediction engine module, a post-processing and integration module, and a visualization output module. This invention solves the technical problems of difficult multi-source data access, insufficient modeling of holiday impacts, unreliable small-sample prediction, and lack of physical constraints in prediction results by combining the parallel asynchronous execution and anomaly isolation of six heterogeneous models with data volume-aware recursive prediction, trend-seasonal hybrid inference, and physical rationality constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system load forecasting technology, specifically involving a power load forecasting method and system based on multi-model heterogeneous AI parallel forecasting, which is applicable to monthly load forecasting in scenarios such as industrial parks, commercial complexes, and residential communities. Background Technology

[0002] Power load forecasting is a fundamental aspect of power system planning, operation scheduling, and energy management. Accurate load forecasting can provide key decision-making basis for transformer capacity configuration, line planning, distributed power source access, and energy storage system scheduling in distribution networks. The load of end-point microgrid scenarios such as industrial parks and commercial complexes exhibits the following significant characteristics: (1) Affected by production plans, commercial activities, and seasonal climate, the load fluctuates greatly and the peak-valley difference is obvious; (2) Significantly affected by Chinese statutory holidays (especially the traditional Lunar New Year, Dragon Boat Festival, Mid-Autumn Festival, etc.) and summer and winter vacations, the load patterns of weekdays and non-working days, and holidays and non-holidays are very different; (4) The historical load data accumulation of newly built or expanded parks is limited, and the sample size available for training is small.

[0003] Currently, various technical approaches are employed in load forecasting both domestically and internationally. Among statistical methods, the Autoregressive Integral Moving Average (ARIMA) model and its variants, including Seasonal ARIMA (SARIMA), are widely used for stationary time series forecasting, but their ability to capture nonlinear patterns and multiple seasonal components is limited. Among machine learning methods, Support Vector Regression (SVR), Random Forest, and Gradient Boosting Tree perform well when feature engineering is sufficient, but they rely on manual feature design and have weak modeling capabilities for temporal dependencies. Among deep learning methods, architectures such as Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), and Transformer have made significant progress in long-sequence forecasting; the Informer model reduces the computational complexity of the standard Transformer through the ProbSparse self-attention mechanism, and the TSMamba model introduces a State-Space Model (SSM) to achieve linear complexity long-sequence modeling; the CNN-BiLSTM hybrid architecture combines the local feature extraction capabilities of convolutional neural networks with the bidirectional temporal modeling capabilities of bidirectional LSTM. Among hybrid methods, CEEMDAN (Adaptive Noise Complete Set Empirical Mode Decomposition) decomposes the original signal into eigenmode functions of different frequencies and then models each component independently, showing advantages in processing non-stationary, noisy load signals.

[0004] However, the above-mentioned existing technical methods have the following common or individual limitations: (1) The prediction accuracy of a single model is highly dependent on the degree of matching between data features and model assumptions, and lacks robustness when the amount of data and load patterns change; (2) Deep learning models require sufficient training data, and are prone to overfitting in small sample scenarios, resulting in drastic fluctuations or even negative values ​​in the prediction results; (3) Most methods only use simple binary labels for whether it is a holiday or not, and do not establish a systematic influence weight decay model for Chinese-specific lunar holidays and summer and winter vacations; (4) In the Chinese environment, the data provided by users are diverse in format, and the column names are named in Chinese and have many variations. Existing load forecasting systems lack automated Chinese semantic alignment and format adaptation capabilities; (5) There is a lack of constraints on the prediction results that conform to the physical laws of power load, and the predicted values ​​may show a trend of decreasing year by year or drastic fluctuations that do not conform to reality.

[0005] Therefore, there is an urgent need for a regional distribution network load forecasting method and system that can adapt to multiple data sources, deeply model the impact of Chinese holidays, maintain stable forecast accuracy under various data conditions, and automatically apply physical rationality constraints. Summary of the Invention

[0006] This invention aims to address the key technical problems faced by existing power load forecasting technologies, including: (2) difficulties in data access due to various encoding formats and column name variations; (2) lack of systematic modeling of the impact of factors such as Chinese lunar holidays and summer / winter breaks; (3) unstable accuracy of a single forecasting model under different data conditions; (4) unreliable forecasting when training data is insufficient; and (5) lack of physical rationality constraints on forecasting results. A power load forecasting method and system based on multi-model heterogeneous AI parallel forecasting is provided.

[0007] The specific technical solution is: a power load forecasting method based on multi-model heterogeneous AI parallel forecasting, including the following steps: S1. Multi-encoding adaptive data access and Chinese semantic alignment: This step addresses the data access issues arising from diverse raw workload data file formats, inconsistent encoding, and non-standard column names. The system receives raw workload data files uploaded by users, supporting CSV (comma-separated value files), Excel (.xlsx, .xls, .xlsm) and TXT (plain text files) formats. For Excel files, the openpyxl engine is used first for parsing; if parsing fails, it automatically falls back to the xlrd engine. For CSV and TXT files, the file encoding format and field separators are first determined through sampling and detection, and then loaded using the Pandas library.

[0008] The encoding detection strategy is as follows: A preset encoding detection sequence [UTF-8, GBK, GB2312, GB18030, Latin-1] is constructed, and each encoding is used sequentially to attempt to decode the original byte content of the file. The decoding success rate is calculated for each encoding, defined as the number of characters successfully decoded into readable characters divided by the total number of characters in the file. When the decoding success rate of a certain encoding exceeds a preset threshold of 90%, the detection of subsequent encodings is terminated, and that encoding is directly adopted. This strategy ensures that internationally used files encoded in UTF-8, Chinese Windows environment files encoded in GBK / GB2312, and Western files encoded in Latin-1 can be correctly decoded.

[0009] After loading, semantic alignment of Chinese column names is performed. A Chinese → English column name mapping dictionary is preset. This dictionary uses Chinese strings as keys and standardized English strings as values, covering the following column name types and their common variations: Time ("Time" → "date", "Date" → "date", "Year and Month" → "date"), Load ("Load" → "load", "Electricity Consumption" → "load", "Power" → "load", "Electricity" → "load"), Temperature ("Maximum Temperature" → "max_temp", "Minimum Temperature" → "min_temp", "Average Temperature" → "avg_temp", "Temperature" → "temp"), Humidity ("Humidity" → "humidity", "Relative Humidity" → "humidity"), Rainfall ("Rainfall Amount" → "rainfall", "Precipitation Amount" → "rainfall", "Rainfall" → "rainfall"). The system iterates through all column names in the data table, performs exact matching or prefix matching on each column name in the mapping dictionary, and replaces the column name with the corresponding standard English name when a match is found.

[0010] If, after semantic mapping, a column named "date" still does not exist in the data table, the system initiates an automatic date column discovery process: It iterates through all columns in the data table that are not identified as known types, randomly samples no more than 50 rows of data from each column, and attempts to parse five date formats: (a) YYYYMMDD integer format (e.g., 20260315 represents March 15, 2026), (b) Excel serial number format (based on December 30, 1899 as serial number 0, e.g., 46000 corresponds to December 9, 2025), (c) YYYY-MM-DD string format, (d) YYYY / MM / DD string format, and (e) YYYY.MM.DD string format. For each format, the parsing hit rate of all sampled rows in that column is calculated. When the hit rate of a column exceeds 70% in any format, the column is identified as a date column and its name is renamed to "date".

[0011] If the above process fails to identify the `load` column in the data table, the system searches in priority order: first, it checks if a standardized `load` column exists; second, it checks if a standardized Chinese `load` column name exists; if neither exists, the last numeric column in the data table is selected as a fallback `load` column. After column identification, Pandas' `dropna` method is called to delete completely empty rows and columns, converting the `date` column to `datetime` type and sorting by date. The final output is a standardized time-series dataset containing only `date`, `load`, and any possible optional meteorological columns (`max_temp`, `min_temp`, `avg_temp`, `humidity`, `rainfall`, etc.). `pd.date_range` is called to reindex the dates by daily frequency, filling the loads corresponding to missing dates with NaN for subsequent preprocessing.

[0012] S2. Weighting modeling of the impact of combined lunar and Gregorian calendar holidays: This step constructs a hybrid holiday calendar class, HolidayCalendar, which integrates traditional lunar holidays, statutory holidays in the Gregorian calendar, winter and summer vacation windows, and custom events. It also quantifies the overall impact of holidays on the workload through an impact weight decay function.

[0013] A pre-calculated dictionary for traditional Chinese lunar holidays is used. Due to the varying correspondence between the lunar and Gregorian calendars each year and the complexity of the calculations, a pre-calculation strategy covers a 26-year period from 2010 to 2035. The pre-calculated results are organized using a Python dictionary data structure: the year (int type) serves as the first-level key, mapping to a sub-dictionary containing traditional Chinese lunar holidays; each traditional Chinese holiday uses a string in the format "year-holiday name" (e.g., "2026-Spring Festival") as the second-level key, with the corresponding value being the Gregorian calendar date string (e.g., "2026-02-17"). Traditional Chinese lunar holidays include the Spring Festival, Dragon Boat Festival, and Mid-Autumn Festival. The holiday dates and their adjustments are subject to relevant national regulations. This pre-calculated dictionary is loaded as a hard-coded constant during class initialization, avoiding complex lunar calendar conversion calculations during each query.

[0014] The statutory holidays according to the Gregorian calendar include New Year's Day, Qingming Festival, Labor Day, and National Day. The holiday dates and consecutive arrangements formed by adjusting workdays are subject to relevant national regulations. These holidays are determined directly by the month and day rules and do not require pre-calculation.

[0015] Construction of O(1) lookup dictionary for holidays: During system initialization, the generate_holiday_calendar() method is invoked to traverse the range from 2010 to the current year plus 5, and expand the specific dates of all traditional lunar holidays and statutory Gregorian holidays into the holiday_lookup dictionary with date strings (in "YYYY-MM-DD" format) as keys, where each value contains the name and type (lunar / Gregorian) of the holiday. For consecutive working days formed by compensatory leave, the date_range function of Pandas is used to expand all dates between the start and end dates of the holidays and add them to the dictionary one by one. This dictionary supports fast lookup with O(1) time complexity.

[0016] Pre-holiday / post-holiday impact window model: People usually reduce production activities before the arrival of holidays and gradually resume work after the holidays, and this impact is not abrupt but gradual. The system defines two configurable parameters: days_before_holiday (the number of days in the pre-holiday impact window, default is 3 days) and days_after_holiday (the number of days in the post-holiday impact window, default is 3 days). The is_before_holiday(date) method calculates the distance (date difference) between the target date and all dates in the holiday set, takes the minimum absolute distance D, and returns True if 0 < D ≤ days_before_holiday and the target date is before the holiday. The is_after_holiday(date) method judges the post-holiday window in the same way. days_to_nearest_holiday(date) returns the signed distance to the nearest holiday (a positive value indicates pre-holiday, a negative value indicates post-holiday, and zero indicates the holiday day itself).

[0017] The impact weight attenuation function is the core algorithm of this step. For any target date, the calculation formula of the comprehensive impact weight HolidayImpact is: HolidayImpact = min(0.8×I_holiday + max(0, 1−|D| / (N+1))×0.5 + ΣW_custom, 1.0) Where: I_holiday is the indicator variable for the holiday day (it is 1 if the target date is found in holiday_lookup, otherwise it is 0); D is the calculation result of days_to_nearest_holiday(date); N is the size of the impact window (that is, the value of days_before_holiday or days_after_holiday); W_custom is the weight value of the custom event; min(·,1.0) means the final weight does not exceed 1.0.

[0018] When the target date is a holiday, I_holiday=1, |D|=0, the basic weight term is 0.8, and the distance attenuation term max(0, 1−0 / (N+1))×0.5=0.5, then HolidayImpact =min(0.8×1+0.5,1.0)=(1.3,1.0)=1.0. When the target date is within the window before or after the holiday and the distance is d (1≤d≤N), the distance attenuation term is max(0, 1−d / (N+1))×0.5, that is, it linearly attenuates from about 0.42 when the distance is 1 to about 0.04 when the distance is N. This attenuation function simulates the process of load change before and after the holiday from gradual to normal.

[0019] Summer / Winter Vacation Window Model: The `is_vacation(date)` method is constructed to determine whether a target date falls within a summer vacation window (default July 1st to August 31st) or a winter vacation window (default January 15th to February 15th). The year-end characteristic of the winter vacation window is achieved by directly determining whether the month value is in the range [1,2] and the date is in the range [15, end of month] or [1,15], without requiring special processing for the year. The vacation marker `is_vacation` is used as an independent feature input for subsequent feature engineering.

[0020] Custom Event Management: The system provides the `add_custom_event(date, name, weight)` interface, allowing users to add impactful events for specific dates (such as planned power outage maintenance days, large commercial event days, extreme weather days, etc.). Each event includes an effective date, name, and weight value. All custom events are stored in a dictionary, and the weight is accumulated when calculating `HolidayImpact`. The interface also provides the functionality to delete custom events by index. The state of the `HolidayCalendar` instance supports serialization and deserialization through the `to_dict()` and `from_dict()` methods, facilitating persistent storage of configurations and cross-session transmission.

[0021] S3, Joint construction of six types of multidimensional features: This step constructs six categories of features, totaling more than 40 dimensions, on the monthly frequency time-series data after step S1 and preprocessing, forming a complete feature matrix. The feature construction function `build_features(df, holiday_calendar, config, include_weather)` takes the monthly data DataFrame and the HolidayCalendar instance generated in step S2 as input, and constructs six categories of features in the following order: Category 1: Basic Time Features (7 dimensions). Using Pandas' datetime accessor, extract the following from the date column: hour (0-23), day_of_week (0-6, 0 for Monday, 6 for Sunday), month (1-12), quarter (1-4), day_of_year (1-366), week_of_year (ISO week number, 1-53), and is_weekend (weekend marker, True when day_of_week ≥ 5).

[0022] Category 2: Holiday Features (17 Dimensions). Traverse each row of the data table, and for each date, call the corresponding method of the HolidayCalendar instance to populate the following: is_holiday (whether it is a statutory holiday), is_vacation (whether it is within the winter / summer vacation window), is_workday (whether it is a workday, defined as neither a weekend nor a holiday), holiday_name (holiday name string, None for non-holidays), days_to_holiday (signed days from the nearest holiday), days_since_holiday (days from the previous holiday), is_before_holiday (whether it is within the pre-holiday influence window), is_after_holiday (whether it is within the post-holiday influence window), holiday_impact_weight (the comprehensive influence weight value described in step S2, a continuous value of 0-1), and unique hot indicator variables for the seven major holidays: Spring Festival, Dragon Boat Festival, Mid-Autumn Festival, New Year's Day, Qingming Festival, Labor Day, and National Day (value 1 when the target date belongs to the corresponding holiday, otherwise 0).

[0023] The third category: Lag features (7 dimensions). The `shift()` method of Pandas was used to perform a time-shift operation on the `load` column, generating seven lag columns: `load_lag_1`, `load_lag_2`, `load_lag_3`, `load_lag_7`, `load_lag_12`, `load_lag_14`, and `load_lag_30`. In monthly frequency data, `lag_12` corresponds exactly to the load value of the same month last year, and `lag_1` corresponds to the load value of the previous month. Missing values ​​generated by the `shift` operation (the first few rows could not be shifted due to a lack of historical data) were retained as NaN and handled in subsequent model training.

[0024] Category 4: Rolling Statistical Features (12-dimensional). A sliding window operation is performed on the `load` column with window sizes of 3, 6, 7, 12, 14, and 30. Two statistics are calculated for each window: `rolling(N).mean()` (rolling mean) and `rolling(N).std()` (rolling standard deviation), for a total of 12 dimensions. Setting the parameter `min_periods=1` ensures that valid values ​​are output even in the early stages of the window (data rows that have not yet met the window size requirements) (at this point, the statistical results represent a portion of the window), avoiding excessive NaN values ​​that could negatively impact subsequent model training.

[0025] Category 5: Periodic Encoding Features (6-dimensional). Months, weeks, and days in a year are all variables with cyclical properties (e.g., January follows December, and the cycle boundary needs to be continuous). Trigonometric function transformations are used to map these cyclical variables to a continuous space [-1, 1]. The transformation formulas are: feature_sin = sin(2π × value / period), feature_cos = cos(2π × value / period), where value is the original value of the periodic variable to be encoded, and period is the period length of that variable.

[0026] Specifically, for the month feature period=12, calculate month_sin = sin(2π×month / 12) and month_cos = cos(2π×month / 12); for the week feature period=7, calculate dow_sin = sin(2π×day_of_week / 7) and dow_cos = cos(2π×day_of_week / 7); for the number of days in the year feature period=366, calculate doy_sin = sin(2π×day_of_year / 366) and doy_cos = cos(2π×day_of_year / 366).

[0027] This transformation ensures that December and January are close to each other in the feature space, eliminating the spurious large distance between 12 and 1 when the months are taken as integer inputs.

[0028] Category 6: Interaction and Meteorological Features (N+2 dimensions, where N is the number of effective meteorological columns). A cross-product term of holiday_load_interaction = holiday_impact_weight × load is constructed to enable the model to learn the non-linear relationship between the degree of holiday impact and load amplitude. A temperature range feature is constructed as temp_range = max_temp − min_temp. Missing values ​​in the meteorological columns (max_temp, min_temp, avg_temp, temp, humidity, rainfall, etc.) are filled in order of priority: first, linear interpolation is attempted (using Pandas' interpolate method), then forward filling (ffill), and finally, backward filling (bfill) is used as a fallback.

[0029] Future Feature Matrix Construction: The system provides the function `build_future_features(last_known_data, future_dates, holiday_calendar, include_weather)` to construct the feature matrix for the future forecast period. The implementation strategy is as follows: The last 60 rows of historical data are selected as a context window (this window needs to be large enough to cover the maximum lag step of 30 and the maximum scroll window of 30). The context window DataFrame is concatenated with the list of future dates to be predicted to form an extended dataset. In the future date rows of this extended dataset, the `load` column is filled with the last known load value from the historical data—this is to ensure that when the `build_features()` function is called, the lag features can be calculated correctly (the `shift` operation requires values ​​in the preceding rows), and the scroll statistics features can also be calculated correctly (the scroll window requires values ​​in the preceding rows). Missing values ​​in the weather column are filled using the arithmetic mean of existing values ​​for the same historical month. Periodic encoded features (month_sin, month_cos, etc.) are calculated independently based on the actual calendar position of the future date and are not affected by the `load` filler values. After inputting the expanded dataset into the `build_features()` function to generate the complete feature matrix, rows corresponding to future dates are extracted as the final prediction input features and returned to the model for prediction. This strategy achieves fully automated feature construction for future dates, requiring no manual intervention.

[0030] S4, Six-Model Heterogeneous Parallel Prediction: This step constructs six heterogeneous load prediction models that complement each other in terms of algorithm principles, model architecture, and applicable scenarios, and implements parallel asynchronous training and prediction of the models through a thread pool mechanism. The six models cover six different technical approaches: statistical, machine learning, deep learning, state-space model, Transformer, and hybrid decomposition.

[0031] (a) Prophet Model (Statistical Class): The Prophet model, open-sourced by Meta (formerly Facebook), is specifically designed for business time series with strong seasonality and multiple holiday effects. In this invention, the ProphetModel class encapsulates the use of Prophet, with the following configuration parameters: seasonality_mode='additive' (additive seasonal decomposition), yearly_seasonality=10 (annual seasonal Fourier series of order 10), weekly_seasonality=True (enable weekly seasonality), and changepoint_prior_scale=0.05 (change point detection sensitivity). Chinese standard holidays are injected via prophet.add_country_holidays('CN'). A DataFrame containing all holiday dates described in step S2 is constructed and passed to the holidays parameter, with holiday_prior_scale set to 10.0 to enhance the prior influence of holidays. The Prophet model automatically detects trend changes and decomposes the time series into an additive combination of trend, seasonal, and holiday effect components for prediction.

[0032] (b) XGBoost-DayType Model (Machine Learning): The XGBoost-DayType model is based on the Extreme Gradient Boosting (XGBoost) algorithm, an ensemble learning method based on gradient boosting decision trees. In this invention, the XGBoostDayTypeModel class is configured with the following parameters: n_estimators=300 (number of decision trees), max_depth=6 (maximum depth per tree), learning_rate=0.1 (learning rate), subsample=0.8 (row sampling ratio), and colsample_bytree=0.8 (column sampling ratio). This model uses all time features, holiday features, lag features, rolling statistical features, periodic encoding features, and interaction features generated in step S3 as input feature vectors. Day type information (derived from features such as is_workday and is_holiday in step S2) is injected using one-hot encoding to enhance the model's ability to learn about workday / non-workday load differences.

[0033] (c) CNN-BiLSTM-CrossAttention Model (Deep Learning): This model is implemented based on the PyTorch deep learning framework and adopts a three-stage cascaded architecture. The first stage is a two-layer one-dimensional convolutional neural network (Conv1d), with 64 convolutional kernels per layer, used to extract local temporal patterns of the load sequence (such as short-term fluctuations between adjacent months). The second stage is a two-layer bidirectional long short-term memory network (BiLSTM), with 128 hidden units per layer. The forward LSTM reads the sequence from front to back, and the backward LSTM reads the sequence from back to front. The outputs of both directions are concatenated and fed into the next layer to capture long-distance bidirectional temporal dependencies of the load sequence. The third stage is a four-head cross-attention mechanism (CrossAttention), where the outputs of BiLSTM are used as queries and key-value pairs for multi-head attention calculation. The features at different time positions are adaptively weighted and fused using attention weights. After dimensionality reduction by global average pooling (GlobalAvgPool1d), the output of CrossAttention is output by a fully connected layer (Linear) to produce the final predicted value. Training uses the mean squared error loss function (MSELoss) and the Adam optimizer, with a default training duration of 100 epochs and a batch size of 32.

[0034] (d) TSMamba Model (State Space Model Class): The TSMamba model is based on the latest advancements in Structured State Space Model (SSM). Unlike the self-attention mechanism of traditional Transformers, SSM models sequential signals using a set of continuous-time state equations h'(t)=Ah(t)+Bx(t), y(t)=Ch(t)+Dx(t). After discretization, it can be efficiently computed in parallel using a diagonal matrix A. In this invention, the TSMambaModel class is configured with the following parameters: state_dim=16 (state space dimension), d_model=64 (hidden layer dimension), and n_layers=4 (encoder layers). The model appends a learnable sinusoidal positional code to the beginning of the input sequence to inject temporal positional information. The linear time complexity O(L) of SSM gives it a significant efficiency advantage over Transformer's O(L²) when processing long sequences, making it particularly suitable for modeling historical sequences lasting tens of months at monthly frequencies. The training configuration is the same as CNN-BiLSTM-CrossAttention.

[0035] (e) Informer Model (Transformer Class): The Informer model improves upon the three major problems of the standard Transformer in long-sequence time series prediction: high computational complexity of self-attention, large memory consumption, and slow encoder-decoder architecture. Key innovations include: (i) ProbSparse self-attention mechanism – by selectively calculating the attention scores between a few "active" queries and all keys, the computational complexity of self-attention is reduced from O(L²) to O(L·ln L). Query selection is achieved by using Kullback-Leibler divergence to measure the difference between the query attention distribution and a uniform distribution; (ii) Self-attention distillation – by inserting one-dimensional convolution and max-pooling distillation operations between encoder layers, the sequence length is reduced layer by layer to extract dominant features; (iii) Generative decoder – predicting all future time steps at once, rather than generating them step-by-step through autoregression, significantly improving inference speed. In this invention, the InformerModel class is configured with the following parameters: d_model=64 (model dimension), n_heads=4 (number of attention heads), e_layers=2 (number of encoder layers), d_layers=1 (number of decoder layers), factor=5 (ProbSparse filtering factor), and dropout=0.2.

[0036] (f) CEEMDAN-LSTM-Attention Model (Hybrid Decomposition): This model employs a three-step strategy of "decomposition, modeling, and reconstruction." First, the CEEMDAN (Complete Ensemble Empirical Mode Decomposition with Adaptive Noise) algorithm, within the framework of classic EMD (Empirical Mode Decomposition), effectively solves the mode aliasing problem of EMD by adding different white noise multiple times in each decomposition iteration and taking the ensemble average, while maintaining the completeness of the decomposition (the sum of all components is exactly equal to the original signal). The algorithm decomposes into 8 IMF (Intrinsic Mode Function) components by default, corresponding to different fluctuation modes from high to low frequency in the original load signal. Second, a prediction model is independently constructed for each IMF component: each component is fed into the same network architecture—a bidirectional LSTM (64 hidden units) combined with an attention mechanism to extract temporal dependencies and output the predicted value of that component. Third, the predicted values ​​of all IMF components are summed point by point to reconstruct the prediction of the original signal. Training uses mean squared error loss and the Adam optimizer, with each component trained for 80 epochs by default.

[0037] Parallel execution mechanism: Training and prediction of six models are scheduled in parallel via a thread pool. The `ThreadPoolExecutor` from the `concurrent.futures` module of the Python standard library is used, with the maximum number of worker threads set to `min(3, the number of models selected by the user)` to avoid excessive thread contention for CPU resources. The `executor.submit()` method asynchronously submits training and prediction tasks for each selected model, returning a `Future` object; the `as_completed()` iterator collects model completion results in real time and updates progress. Each model's `train()` and `predict()` calls are wrapped in a try-except exception handling block: if any exception occurs during training or prediction (such as model non-convergence, incompatible data formats, etc.), the exception is caught and the error information is recorded in the `errors` dictionary. The model is marked as failed, but no exception is thrown to interrupt the execution of other parallel tasks. The execution time of each model (the time difference from submission to completion) is independently recorded in the `timing` dictionary. Finally, a dictionary containing three parts is returned: `predictions` (a mapping of model name to the array of predicted values), `errors` (a mapping of model name to error information), and `timing` (a mapping of model name to a floating-point value in seconds).

[0038] S5, Adaptive Data Volume Mode Switching and Hybrid Inference: This step addresses the problem of unreliable predictions from deep learning models when training data is insufficient. Through data-aware automatic mode switching and statistical hybrid inference strategies, it can output reasonable predictions under different data conditions.

[0039] Adaptive parameter adjustment: Before each model training, the system calls the _adapt_params(model_name, data_rows) function to perform data volume-aware parameter adaptation. The function calculates the number of rows data_rows of the training data. When data_rows < min_window + forecast_horizon (default minimum window min_window=3, default forecast period forecast_horizon=36, that is, the threshold is 39 rows), the configuration of the deep learning models (CNN-BiLSTM-CrossAttention, TSMamba, Informer, CEEMDAN-LSTM-Attention) is switched to the recursive prediction mode: the forecast period forecast_horizon is set to 1, and the input window window_size is reduced to 3. In the recursive prediction mode, the model only predicts one future time step each time, then splices the predicted value of this step to the end of the input sequence and removes the earliest value in the sequence to form a new input sequence for predicting the next step, and iterates in this way until all 36 steps of prediction are completed.

[0040] For the CEEMDAN-LSTM-Attention model, when data_rows < 50 rows, in addition to switching to the recursive mode, the number of components and the number of training epochs are doubly reduced: the number of IMF decomposition components is adjusted from 8 to 3 (because an extremely short time series cannot support the effective extraction of high-frequency components), and the number of training iterations of the LSTM network for each component is reduced from 80 epochs to 30 epochs (to prevent severe overfitting caused by excessive training on very few data).

[0041] Trend-seasonality hybrid inference strategy: When the number of training data rows is less than the second preset threshold of 60 rows, the hybrid inference strategy is enabled for all models (not limited to deep learning models). This strategy integrates the stability of statistical models and the flexibility of machine learning models to generate corrected predicted values. The specific process is as follows: (a) Trend extraction: Use the numpy.polyfit(deg=1) function (first-order polynomial fitting by the least squares method) to perform linear fitting on the historical load time series to obtain the slope a and intercept b. The value of the fitted straight line at the last time point in history is the trend reference value trend_end = a × last_index + b. The trend estimate of the annual growth rate is annual_rate = a / mean(historical load values).

[0042] (b) Calculation of seasonality factor: Group the historical load data by month from January to December, calculate the arithmetic mean of the load for each month, and obtain monthly_avg = [avg_Jan, avg_Feb, ..., avg_Dec]; calculate the overall mean of all historical data, overall_avg; the seasonality factor of each month, seasonality[m] = monthly_avg[m-1] / overall_avg (m=1,2,...,12), reflects the degree of deviation of the load of each month from the annual average level: greater than 1 indicates that the month is a peak load month, and less than 1 indicates a trough month.

[0043] (c) Monthly growth rate constraint: The annual growth rate (annual_rate) from step (a) is decomposed into a monthly growth rate (monthly_rate) = (1+annual_rate)^(1 / 12)−1 using a geometric mean. Upper and lower limits are imposed on this monthly growth rate: if monthly_rate < 0.001, then 0.001 is used (minimum monthly growth of 0.1%); if monthly_rate > 0.01, then 0.01 is used (maximum monthly growth of 1%), to prevent extreme values ​​from excessively influencing the prediction results.

[0044] (d) Baseline Generation: For the k-th forecast month (k=1,2,...,forecast_horizon), calculate the trend-seasonal baseline forecast: baseline[k] = trend_end×(1+monthly_rate)^k×seasonality[(k-1)% 12]. Here, trend_end comes from step (a), monthly_rate from step (c), and the seasonality array from step (b). This formula comprehensively considers the combined effect of growth trends and monthly seasonal fluctuations.

[0045] (e) Weighted fusion: For each prediction month k, the final prediction value final[k] = 0.4×model_output[k]+0.6×baseline[k]. The weight allocation of 0.4 / 0.6 tends to rely more on statistical regularity (trend-seasonal baseline) when the data is sparse, and reduce the dependence on the model output (because the model is unreliable with little data).

[0046] (f) Extreme value capping: An additional constraint is imposed on the output of the Prophet model: if the Prophet predicted value is greater than trend_end×3 (3 times the trend extrapolation value), it is pruned to trend_end×3. The Prophet model may over-amplify the holiday effect when the data is sparse, resulting in extreme predicted values. This capping effectively prevents such anomalies.

[0047] (g) Predicted value floor: A floor constraint is uniformly applied to the predicted values ​​of all models: predicted_value = max(predicted_value, historical_minimum×0.5), that is, the predicted value is not lower than 50% of the historical minimum load, to prevent unreasonable low or negative value predictions. This constraint is implemented after the model training is completed and before the annual incremental binding process.

[0048] S6. Year-by-year monotonically increasing enhancement mechanism and multi-model integration: This step performs post-processing on the preliminary prediction values ​​of each model output in step S4 and the corrected prediction values ​​output in step S5 to ensure that the prediction results meet the physical constraints of the natural growth of power load, and performs multi-model integration to output the final prediction.

[0049] Historical growth rate calculation: Historical load data is grouped by year (using Pandas' resample('Y') method), and the total or average load for each complete year is calculated as the representative value for that year. The year-on-year growth rate is calculated for the representative values ​​of adjacent years: growth_rate_t = (value_year_t / value_year_{t-1} - 1). The arithmetic mean of the year-on-year growth rates for all years is taken as the annual average growth rate historical_growth. max(historical_growth, 0.03) is taken as the minimum annual growth rate r_floor; that is, if the historical annual average growth rate is lower than 3%, 3% is used as the minimum. This minimum guarantee mechanism is based on the general trend of positive long-term growth in electricity load, preventing unreasonable low growth forecasts caused by historical fluctuations.

[0050] Model-wise year-by-year monotonic increasing processing: For the prediction result predictions[model_name] (a numerical array with a length of L) output by each successful model, divide the values into prediction years with 12 values as one group. Suppose there are Y complete prediction years (Y is the floor value of L / 12). For the i-th prediction year (i=1,2,...,Y-1, the first year is based on the data of the last complete historical year): calculate the arithmetic mean M_prev of all 12-month predicted values of the previous prediction year (i-1); if i=0 (the first prediction year), the mean of the last 12 months of historical data is used to replace M_prev. Calculate the constraint threshold threshold = M_prev × (1+ r_floor). Check the minimum value min_current among the 12-month values of the current prediction year. If min_current < threshold, it indicates that the predicted value of the current year is lower than the reasonable growth expectation of the previous year, and translation correction is required. Calculate the translation amount delta = threshold - min_current, and add delta to all values of the current prediction year and all subsequent prediction years. This translation operation ensures the monotonic increasing trend of the load between years, while keeping the relative variation pattern between months within the year unchanged.

[0051] Ensemble averaging: When the number N of models that have successfully completed prediction is ≥2, start the ensemble averaging. Suppose the prediction results of the N successful models are Y1, Y2, ..., YN respectively, and the prediction lengths of each model are L1, L2, ..., LN respectively (since different models may predict different numbers of periods or generate different lengths due to post-processing). Take the shortest common length L_min = min(L1, L2,..., LN). Truncate the prediction result of each model to the first L_min values: Yi[:L_min]. Calculate the point-wise arithmetic average for all the truncated predictions: Ensemble[k]= (Y1[k] + Y2[k]+ ... + YN[k]) / N, where k=0,1,...,L_min-1. The ensemble averaging result is taken as the final prediction output of the system, which is displayed as a bold dashed line in the front-end chart. This ensemble strategy is based on the "wisdom of crowds" principle: the average of multiple heterogeneous models is usually better than any single model, and has a strong smoothing and deviation-correcting effect on the extreme predictions of individual models.

[0052] Error assessment and ranking: The last 20% of the time series data is used as the test set (this part of the data is not used for model training). Three standard regression evaluation indicators are calculated on the test set: (1) MAE (Mean Absolute Error) = Σ|y_true − y_pred| / n, which reflects the average absolute magnitude of the prediction error; (2) MAPE (Mean Absolute Percentage Error) = Σ(|y_true − y_pred| / |y_true|) / n ×100%. Data points where the actual value y_true is 0 are skipped during the calculation to avoid division by zero error. This indicator reflects the proportion of the prediction error relative to the actual value; (3) RMSE (Root Mean Square Error) = √(Σ(y_true − y_pred)² / n). Since the error term is squared, this indicator applies a higher penalty weight to large prediction deviations. The models are ranked in ascending order of their RMSE values ​​(the smaller the RMSE, the higher the accuracy). The ranking results are output to the front-end interface in tabular form, allowing users to compare the performance differences of each model on the current dataset.

[0053] This invention also provides a power load forecasting system based on multi-model heterogeneous AI parallel forecasting, employing a front-end / back-end separated browser / server architecture, including: The backend service layer is built on an asynchronous Python web framework and runs within a single Uvicorn process; The front-end presentation layer is built on HTML5 / CSS3 / JavaScript and communicates with the back-end service layer through a RESTful API. The backend service layer includes the following functional modules deployed within the same Python process. Data is passed between modules in the same process memory space via Python variable references and function return values. Intermediate calculation results are stored in a global state dictionary within the process, without relying on an external database: The data access module is configured to receive raw load data files uploaded by users through a RESTful API interface, perform adaptive encoding detection, column name semantic mapping and missing date completion, and generate a standardized time series dataset. The holiday modeling module is configured to receive the standardized time-series dataset, load the pre-computed holiday dictionary and calculate the comprehensive influence weight, and generate an extended feature dataset containing holiday features. The feature engineering module is configured to receive the extended feature dataset and construct a multidimensional training feature matrix through a temporal feature extraction sub-method. The parallel prediction engine module is configured to receive the multidimensional training feature matrix, asynchronously submit at least two different types of load prediction models through a thread pool to perform parallel training and prediction, and output the preliminary prediction results of each model. The post-processing and integration module is configured to receive the preliminary prediction results of each model, and sequentially perform floor constraint, adaptive data volume correction, yearly monotonically increasing manual processing, multi-model integration averaging and error evaluation ranking, and output the final prediction results and model error ranking. The visualization output module is configured to receive the final prediction results and model error rankings, and render historical comparison charts, future prediction charts, and error ranking tables through an interactive chart library.

[0054] The beneficial effects of this invention are as follows: By constructing an end-to-end technical pipeline that integrates multi-encoding adaptive data access, weighted modeling of mixed lunar and Gregorian calendar holidays, joint construction of six types of multi-dimensional features, heterogeneous parallel prediction using multiple models, adaptive hybrid inference based on data volume, and post-processing for physical rationality, this invention systematically solves the long-standing technical pain points in the field of power load forecasting, such as difficulties in accessing multi-source heterogeneous data, coarse-grained modeling of the impact of Chinese holidays, poor robustness of single models, unreliable prediction in small sample scenarios, and lack of physical constraints on prediction results. It achieves full automation from drag-and-drop uploading of original files to interactive visualization of prediction results output, significantly improving the accuracy, robustness, and engineering usability of monthly load forecasting in end-point microgrid scenarios such as industrial parks and commercial complexes. Specific beneficial effects are as follows: (1) Robustness of Data Access: Existing technologies lack the ability to automatically adapt to multiple encoding formats, column name variations, and non-standard date formats in a Chinese environment, resulting in high manual costs and easy introduction of errors during the data cleaning stage. This invention achieves zero-configuration, fully automatic access to raw payload data files from different sources such as Chinese, English, and Japanese through automatic multi-encoding detection (UTF-8→GBK→GB2312→GB18030→Latin-1 gradient attempts) and a Chinese column name semantic mapping dictionary. It covers common encoding formats and column name variations in industrial production environments, compressing the time-consuming manual data cleaning work in traditional methods to be completed automatically in milliseconds. At the same time, missing dates are filled by date re-indexing to ensure the continuity of time series data, eliminating the risk of prediction failure caused by data format incompatibility from the source.

[0055] (2) Deep System Modeling of the Impact of Chinese Holidays: Unlike existing methods that only use simple binary labels for whether a holiday is a holiday, this invention constructs a four-layer nested model of the impact of holidays, including lunar (26-year pre-calculated dictionary) and Gregorian holidays, linear decay impact windows before / after holidays, custom windows for winter and summer vacations, and user-defined events. In particular, by using the comprehensive impact weight decay function HolidayImpact=min(0.8×I_holiday+max(0,1−|D| / (N+1))×0.5+ΣW_custom,1.0), the model quantitatively characterizes for the first time the change process of load from asymptotic disturbance to normal before and after holidays. This significantly improves the prediction accuracy of the model within the 3-day window before and after holidays compared to the traditional binary label model, effectively capturing the nonlinear jump and gradual recovery characteristics of load caused by China's unique holidays.

[0056] (3) Robustness improvement of multi-model heterogeneous integration: This invention deploys six highly complementary heterogeneous models in terms of algorithm principle and applicable scenarios in parallel: statistical model Prophet, machine learning model XGBoost-DayType, deep learning model CNN-BiLSTM-CrossAttention, state space model TSMamba, efficient Transformer model Informer, and hybrid decomposition model CEEMDAN-LSTM-Attention. It uses a thread pool mechanism to achieve asynchronous parallel training and prediction, and uses an anomaly isolation mechanism to ensure that the overall task is not interrupted when a single model crashes. Then, by integrating multiple models, the output of each model is smoothed point by point on the shortest common prediction length, thereby effectively suppressing the extreme prediction bias of individual models and significantly improving the overall robustness and generalization ability of the prediction system when facing different data conditions and load pattern changes.

[0057] (4) Adaptive reasoning capability in small data scenarios: In response to the typical application pain points of newly built parks or insufficient historical data, this invention designs a three-level adaptive strategy. When the number of training data rows is less than 39, the deep learning model is automatically switched to recursive prediction mode to avoid long-term extrapolation distortion. When it is less than 60 rows, a trend-seasonal hybrid reasoning strategy with a weight of 0.4 / 0.6 is launched to integrate statistical regularity with model output. When it is less than 50 rows, the number of IMF components and training iterations of the CEEMDAN decomposition model are further reduced. Thus, even under extremely sparse data conditions, it can still output reasonable prediction values ​​that conform to long-term trends and monthly seasonal regularity, breaking through the rigid dependence of traditional deep learning models on large data volume.

[0058] (5) Physical rationality constraints of prediction results: This invention imposes hard constraints on the prediction values ​​from two dimensions, namely upper and lower boundaries and long-term trends, on the prediction values ​​through the floor constraint of the prediction value (not less than 50% of the historical minimum load), the cap constraint of the Prophet extreme value (not more than 3 times the trend extrapolation value), and the monotonically increasing control processing of each year (based on the overall translation correction of the prediction year group based on the 3% guaranteed annual growth rate). This ensures that the prediction curve satisfies both statistical optimality and engineering feasibility, and avoids the engineering unavailability problems that may be generated by pure machine learning models, such as the prediction value decreasing year by year or violent oscillation.

[0059] (6) Full-process automation: This invention encapsulates multi-encoding adaptive parsing, automatic construction of six types of features with more than 40 dimensions, parallel scheduling of six models, adaptive parameter switching, post-processing of physical constraints, and interactive visualization rendering into an end-to-end automated pipeline. Users only need to complete file upload and a few interactive clicks through the front-end interface to obtain a complete prediction report containing historical comparison charts, future prediction curves, holiday marked intervals, and model error rankings within seconds to minutes. This greatly reduces the threshold for using professional prediction tools and enables non-professional power planners to quickly obtain highly reliable load prediction results. Attached Figure Description

[0060] Figure 1 This is a flowchart of the overall process of the method of the present invention, which shows the complete six-step process from raw data access, holiday modeling, feature engineering, multi-model parallel prediction, adaptive inference to post-processing integration; Figure 2 The interface diagram of the multi-encoding adaptive data access module shows the upload status of historical load data; Figure 3 The interface diagram for semantic alignment of Chinese column names shows the mapping of Chinese column names to their corresponding English standard names, the pre-computed dictionary structure, the injection of Gregorian calendar rules, the expansion of holiday adjustment dates, and the hierarchical relationship generated by the O(1) lookup dictionary.

[0061] Figure 4 The daily-scale meteorological-load raw dataset imported by users serves as the standard input data source for the data access layer.

[0062] Figure 5 The front-end panel for data preprocessing and holiday parameter configuration displays two core functional areas: time-series data cleaning and custom configuration of holiday features.

[0063] Figure 6 The feature engineering visualization configuration and result statistics interface displays the feature construction switch, one-click generation function, and full-dimensional feature statistics details.

[0064] Figure 7The historical load visualization charts show the time-series changes in electricity load from January 2022 to January 2025, statistically analyzed monthly.

[0065] Figure 8 The front-end model selection interface for the multi-model parallel prediction layer showcases the filtering, selection, and parameter description functions for six types of heterogeneous time series prediction models.

[0066] Figure 9 The global prediction parameter configuration interface showcases the global scheduling configuration module for the multi-model parallel prediction layer.

[0067] Figure 10 The results interface of the multi-model parallel forecast engine displays the monthly load forecast values ​​after parallel extrapolation of six time series models.

[0068] Figure 11 The system provides a visualization interface for multi-model prediction results, displaying historical loads, prediction curves for six types of single models, and the integrated average curve. It also provides statistics on the peak, trough, and mean values ​​of each model's predictions.

[0069] Figure 12 The interface for quantifying and evaluating multi-model error indices displays the standard regression error indices for six types of time-series prediction models.

[0070] Figure 13 The interface for exporting prediction results demonstrates that the system supports exporting in four formats: CSV, Excel, PNG charts, and TXT reports, which respectively output predicted values, visualized curves, and complete evaluation text reports.

[0071] Figure 14 The software architecture diagram of the system of the present invention shows the composition and interaction of the data access module, holiday modeling module, feature engineering module, parallel prediction engine module, post-processing and integration module, and visualization output module. Detailed Implementation

[0072] To make the technical problems and solutions solved by the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention. Example 1

[0073] The power load forecasting method and system based on multi-model heterogeneous AI parallel forecasting provided by this invention are used to forecast the power load of the following industrial parks, such as... Figure 1 As shown, the specific implementation steps are as follows: S1. Multi-encoding adaptive data access and Chinese semantic alignment Using a dataset of meteorological and electricity load data from an industrial park (e.g.) Figure 4 The column names include "Date", "Load (kW)", and "Maximum Temperature". After the system receives this file (e.g., ...), Figure 2 First, the file extension .xlsx is detected. The openpyxl engine is then used to read all worksheets and merge them into a single DataFrame. The DataFrame's column name list is traversed, and Chinese semantic mapping is performed on each column name: "date" matches the "date" key in the mapping dictionary, and the column name is replaced with "date"; "load (kW)" contains the substring "load", and the pure load portion is extracted and mapped to "load"; "maximum temperature" exactly matches the mapping dictionary key, and the column name is replaced with "max_temp". After mapping, pd.to_datetime is called to convert the "date" column to a date type, dropna is called to delete blank rows, and the data is sorted in ascending order by date. The final output is a standardized DataFrame containing only date, load, max_temp, avg_temp, humidity, and rainfall (e.g., ...). Figure 3 ), for use in subsequent preprocessing.

[0074] Field identifier Field meaning Data volume Numerical range unit date date 1105 2022-01-01~2025-01-10 / load Daily demand load 1105 10659.559~30349.047 kW max_temp Daily maximum temperature 1105 6.2~54.9 ℃ min_temp Daily minimum temperature 1105 3.9~28.8 ℃ avg_temp Daily average temperature 1105 5.5~32.1 ℃ humidity Daily average relative humidity 1105 21.0~99.0 % rainfall Daily rainfall 1105 0.0~236.1 mm S2. Pre-calculation of Lunar New Year Holidays and Weight Attenuation The uploaded data spans from January 2022 to January 2025. When the system initializes the HolidayCalendar component, it first reads the corresponding Gregorian calendar dates for the Spring Festival, Qingming Festival, Dragon Boat Festival, and Mid-Autumn Festival from the pre-calculated date dictionary for 2022-2025. Specifically, the Spring Festival in 2022 is February 1st (the first day of the first lunar month of the Year of the Tiger), in 2023 it is January 22nd (the first day of the first lunar month of the Year of the Rabbit), in 2024 it is February 10th (the first day of the first lunar month of the Year of the Dragon), and in 2025 it is January 29th (the first day of the first lunar month of the Year of the Snake). When the system executes the `generate_holiday_calendar()` method, it expands and generates a continuous sequence of holiday dates according to the two sets of periodic parameters in the holiday configuration panel.

[0075] Taking the Spring Festival in 2025 as an example, the system expands the relevant impact period of the Spring Festival to January 28 (the day before the first day of the Lunar New Year) to February 4 (the seventh day of the Lunar New Year), a total of 8 days, and stores them all in the holiday_lookup holiday index dictionary; at the same time, it loads the fixed Gregorian calendar statutory holiday periods: New Year's Day January 1, 2025, Qingming Festival April 4-April 6, Labor Day May 1-May 5, and National Day and Mid-Autumn Festival combined holiday October 1-October 8.

[0076] Example of calculating HolidayImpact (panel configuration: Holiday impact days N=3): Example 1: February 8, 2024 (2 days before the Spring Festival) I_holiday=0: This date is not a core holiday date in the holiday sequence; D=2: 2 days until the Spring Festival on February 10th; N=3 (taken from the "Number of Days Affected by Holidays" parameter in the panel settings); The holiday baseline value is 0, and the distance attenuation term is calculated as: (1-2 / 4)×0.5=0.25; No custom special events, and the sum of custom weights ΣW=0; Final impact value: HolidayImpact=min(0.25,1.0)=0.25.

[0077] Example 2: February 9, 2024 (Lunar New Year's Eve) I_holiday=1: After being expanded by the panel cycle using generate_holiday_calendar(), Lunar New Year's Eve has been included in the continuous holiday sequence and written into the holiday_lookup dictionary, and marked as a holiday impact day; D=0: The day is the first day of the extended Spring Festival holiday period, and the interval from the actual Spring Festival day is 0. The base weight is 0.8, the distance decay term is max(0,1-0 / 4)×0.5=0.5, and the summation value is 1.3; After applying the upper limit constraint min(·,1.0), the final impact value is: HolidayImpact=1.0.

[0078] This value has the highest weight, indicating that the impact of electricity load disturbance on Lunar New Year's Eve (the 30th day of the twelfth lunar month in the Jia Chen year) is exactly the same as that on official statutory holidays. This set of weight calculation logic based on panel cycle configuration can accurately distinguish the disturbance intensity of different dates: Although Lunar New Year's Eve is not an independent statutory holiday, its pre-holiday business traffic and activity disturbance level has reached or is even equivalent to the business characteristics of official statutory holidays; while the two days before the Spring Festival (the 29th day of the twelfth lunar month in the Jia Chen year) have a pre-holiday effect, but the intensity is only about one-quarter of that of official holidays, and it is in the mild attenuation zone.

[0079] S3, Joint Construction of Six Types of Features The feature construction results are shown using data from June 2022 as an example. This date is June 15, 2022 (Wednesday, not a public holiday, before summer vacation).

[0080] Basic time characteristics: hour=0 (default 0 o'clock for monthly frequency), day_of_week=2 (Wednesday), month=6, quarter=2, day_of_year=166, week_of_year=24, is_weekend=False.

[0081] Holiday characteristics: is_holiday=False, is_vacation=False, is_workday=True, holiday_impact_weight=0.0, the most recent holiday is the Dragon Boat Festival (June 3, 2022), and days_since_holiday=12 days.

[0082] Lag characteristics: load_lag_1 = load value in May 2022, load_lag_12 = load value in June 2021 (same period last year).

[0083] Rolling statistics: load_rolling_mean_12 = the rolling average of the load for 12 months from July 2021 to June 2022.

[0084] Periodic encoding: month_sin=sin(2π×6 / 12)=0, month_cos=cos(2π×6 / 12)=−1.

[0085] This row contains approximately 49 feature values, which are input into subsequent models for training or prediction.

[0086] S4, Six-Model Parallel Prediction (see...) Figure 8-12 ) All six models were selected. The training data consisted of 1105 rows of daily data from January 2022 to January 2025, which were then resampled to 37 rows of monthly data as model input. The prediction period was 36 months (February 2025 to January 2028). The system created a ThreadPoolExecutor (max_workers=3) and submitted six submit tasks: ProphetModel.train+predict, XGBoostDayTypeModel.train+predict, ... to CEEMDANLSTMModel.train+predict.

[0087] Three worker threads execute in parallel, and `as_completed` collects results in the order of completion. The Prophet model completes in approximately 0.5 seconds, XGBoost in approximately 1.2 seconds, and deep learning models (such as CNN-BiLSTM-CrossAttention) in approximately 5-8 seconds. The overall waiting time is approximately equal to the time taken by the slowest model. If CNN-BiLSTM-CrossAttention triggers an anomaly due to loss non-convergence during training 30th epoch, this anomaly is captured, and error details are recorded in `errors['CNN-BiLSTM-CrossAttention']`. The other five models complete their predictions normally.

[0088] S5, Small Data Hybrid Inference Scenario: A newly built industrial park has only accumulated 30 rows of monthly load data from January 2022 to June 2024.

[0089] When _adapt_params() detects that data_rows=30<39, CNN-BiLSTM-CrossAttention, TSMamba, and Informer automatically switch to recursive prediction mode.

[0090] Since CEEMDAN-LSTM-Attention has a value of 30 < 50, the number of IMF components is reduced from 8 to 3, and the number of training rounds is reduced from 80 to 30.

[0091] 30 < 60 triggers hybrid inference: numpy.polyfit fits 30 rows of data and obtains a slope a = 125.3, intercept b = 485200, historical average of about 520000 kWh, annual growth rate annual_rate = 125.3×12 / 520000 ≈ 0.00289; monthly growth rate monthly_rate = min(max((1.00289^(1 / 12)−1), 0.001), 0.01) = 0.001 (pulled down to 0.1% by the lower limit).

[0092] Seasonal factors: August = 1.23 (summer peak), February = 0.78 (Spring Festival trough).

[0093] For July 2025 (k=1): trend_end=485200+125.3×30=488959; baseline[0]=488959×1.001^1×seasonality[July]=488959×1.001×0.98≈480000.

[0094] If the XGBoost predicted value is 450,000, the final value = 0.4 × 450,000 + 0.6 × 480,000 = 468,000. If the Prophet predicted value is 1,500,000 (far exceeding the trend × 3 = 1,466,000), it will be pruned to 1,466,000.

[0095] S6, Monotonically increasing year by year and integration Scenario: A model predicts monthly values ​​for 36 months (February 2025 to January 2028). The average value for the first 12 months (February 2025 to January 2026) is 510,000, with a guaranteed growth rate r_floor = 0.03. The 12 predicted values ​​for the second year (February 2026 to January 2027) are checked: the minimum value among the 12 months is min_month = 498,000. The threshold is calculated as threshold = 510,000 × 1.03 = 525,300. Since min_month = 498,000 < 525,300, delta is calculated as delta = 525,300 - 498,000 = 27,300. 27,300 is added to the values ​​for all 12 months in 2026, and the same applies to the values ​​for 2027 and beyond (to maintain trend consistency). After processing, we continued to examine 2027 (based on the revised 2026 mean). Five models successfully predicted (Prophet failed), and the shortest common length L_min=36 was taken (all model output lengths are 36). The first 36 values ​​were averaged point by point to obtain the ensemble curve.

[0096] The test set consisted of the last 6 rows (the bottom 20%) of 30 rows of historical monthly frequency data. RMSE was calculated on these 6 rows: Prophet=12500, XGBoost=9800, CNN-BiLSTM=11200, TSMamba=10500, Informer=13200, CEEMDAN-LSTM=8900. Rankings: 1. CEEMDAN-LSTM (8900), 2. XGBoost (9800), 3. TSMamba (10500), 4. CNN-BiLSTM (11200), 5. Prophet (12500), 6. Informer (13200).

[0097] Experimental comparison and effect verification To verify the actual effectiveness of the technical solution of this invention, the method of this invention was compared with existing single-model methods and simplified versions under the same dataset and experimental environment. The results are as follows: Table 1 Comparison of Data Access Module Parsing Performance

[0098] Table 2. Comparison of prediction accuracy between the holiday weighted model and the binary labeling model (3-day window before and after holidays) Model Holiday Binary Label MAPE Weighted decay model MAPE Accuracy improvement XGBoost-DayType 7.8% 6.2% Decrease by 1.6% Prophet 12.5% 8.9% Decrease by 3.6% CNN-BiLSTM 9.1% 7.3% Decrease by 1.8% TSMamba 8.6% 6.9% Decrease by 1.7% Informer 10.3% 8.1% Decrease by 2.2% CEEMDAN-LSTM-Attn 6.5% 5.4% Decrease by 1.1% Table 3. Comparison of prediction stability between multi-model ensemble and single-model ensemble (S6 test set) Prediction methods RMSE MAE MAPE Single-model optimization (CEEMDAN-LSTM) 8,900 7,200 6.5% The worst-case scenario for a single model (Informer) 13,200 10,500 10.3% Integrated average (5 models) 8,200 6,500 5.8% Integration of relative best single-model improvement 7.9% 9.7% 0.7% Table 4 Comparison of the predictive rationality of different strategies in small data scenarios (30 rows of monthly frequency data) Prediction Strategy Does a negative value occur? Has there been a year-on-year decline? Does it meet the 3% minimum growth target? Predicted availability Pure deep learning (CNN-BiLSTM, direct 36-step prediction) yes yes no Unavailable Recursive prediction + hybrid reasoning (this invention) no no yes Available Example 2

[0099] The method described in Example 1 can be deployed as a complete software system. For example... Figure 14 As shown, the system adopts a front-end / back-end separated B / S (Browser / Server) architecture: the back-end is built on Python and the FastAPI framework (Starlette asynchronous engine), while the front-end uses native HTML5 / CSS3 to build the user interface and JavaScript and the Plotly.js v6.7+ interactive charting library for data visualization. The system does not rely on any external databases; all intermediate calculation results (uploaded files, feature matrices, model objects, prediction results) are stored in an in-process global dictionary maintained by the api / state.py module. Data is passed between modules within the same process via Python variable references and function return values, without the need for message queues or inter-process communication (IPC) mechanisms. The system can be started with a single click using `python app.py` or deployed via Docker containerization (base image python:3.12-slim). Minimum runtime requirements: Python 3.9+, 8GB memory, 4-core CPU. The specific implementation of each core module is as follows.

[0100] (1) Data access module The RESTful API interface `POST / api / data / upload`, defined by the FastAPI route decorator `@router.post(" / upload")`, is exposed externally. The module receives user-uploaded files via FastAPI's `UploadFile` mechanism, automatically selecting the parsing engine based on the file extension—.csv files are read using the default UTF-8 encoding, while .xlsx files are read using the `openpyxl` engine, merging all worksheets into a single DataFrame. The built-in encoding detection sequence is UTF-8→GBK→GB2312→GB18030→Latin-1, and confidence is verified using the `chardet` library; the encoding scheme with the first valid row exceeding 90% is adopted. Column name semantic mapping uses 15 predefined Chinese-English-Japanese mapping dictionaries (covering semantic pairs such as "date / load / maximum temperature / minimum temperature / average temperature / humidity / rainfall"), standardizing column names through exact matching or substring matching. The automatic date column discovery process iterates through all columns, sampling three date formats (YYYYMMDD integer / Excel serial number / YYYY-MM-DD string). A match rate of ≥70% is considered valid. After standardization, missing dates are filled in using pd.date_range re-indexing, and finally passed to the next module as a Python object reference.

[0101] (2) Holiday modeling module Implemented as a Python module `core / holiday_calendar.py`, this module loads a 26-year (2010-2035) dictionary of lunar-to-Gregorian calendar dates into memory. It covers three traditional lunar holidays (Spring Festival, Dragon Boat Festival, and Mid-Autumn Festival) and four fixed Gregorian holiday windows (New Year's Day, Qingming Festival, Labor Day, and National Day), plus user-configurable start and end dates for winter and summer vacations (default winter vacation: January 15th - February 15th; summer vacation: July 1st - August 31st). The dictionary size is approximately 3KB and resides in memory. The core method `days_to_nearest_holiday(date)` calculates the absolute distance between a given date and the nearest holiday. The holiday impact weight formula is: `HolidayImpact = min(0.8×I_holiday + max(0, 1−|D| / (N+1))×0.5 + ΣW_custom, 1.0)`, where N is the number of days in the impact window (default 3 days). Users can inject custom events using `add_custom_event()`. The generated 17-dimensional holiday features are passed to the feature engineering module via DataFrame column expansion.

[0102] (3) Feature Engineering Module As an implementation of the Python module core / feature_engine.py, the FeatureEngineer class contains five sub-methods: _add_time_features() extracts 7-dimensional time features (hour / day_of_week / month / quarter / day_of_year / week_of_year / is_weekend) based on the date column; _add_lag_features() constructs 7-dimensional lag features using pd.DataFrame.shift() (lag_{1,2,3,7,12,14,30}, where lag_12 = the same period last year at monthly frequency); _add_rolling_features() uses pd.DataFrame.shift() to construct 7-dimensional lag features (lag_{1,2,3,7,12,14,30}, where lag_12 = the same period last year at monthly frequency); and _add_rolling_features() constructs features using pd.DataFrame.shift(). The `rolling(window=w,min_periods=1)` function calculates 12-dimensional features (rolling_mean and rolling_std) for six window sizes (3 / 6 / 7 / 12 / 14 / 30) respectively (min_periods=1 ensures that valid values ​​are output early in the window, and NaN values ​​in the std column are filled with `fillna(0)` as a fallback). `_add_cyclical_features()` constructs a 6-dimensional cyclical encoding using sin / cos(2π×variable / period) to maintain the continuity of the boundary values ​​between December and January. `_add_interaction_features()` constructs the holiday_impact_weight×load interaction term and temp_range derived features. Missing values ​​in the weather column are filled by `ffill()+interpolate()` in `core / preprocessor.py`. Finally, a training matrix with more than 40 dimensions of features is generated.

[0103] (4) Parallel prediction engine module As implemented in the Python module core / parallel_engine.py, the ParallelPredictor class encapsulates concurrent.futures.ThreadPoolExecutor, with the number of worker threads max_workers=min(3,model_count) dynamically adapted. Submit the following six Future objects simultaneously using executor.submit(): Prophet (additive decomposition + 10th-order Fourier transform for year and season + prior knowledge of Chinese holidays + predict(36)), XGBoost-DayType (300 trees / depth 6 / learning_rate=0.1 / subsample=0.8 + day-type one-hot encoding), CNN-BiLSTM-CrossAttention (PyTorch: Conv1d×2→BiLSTM×2→4head-CrossAttention→GlobalAvgPool→Linear, epochs=80), TSMamba (PyTorch: diagonal SSM / state_dim=16 / d_model=64 / 4 layers / sine PE), Informer (PyTorch: ProbSparse O(L·lnL)+ConvDistill+generative Decoder) Factor=5) and CEEMDAN-LSTM-Attention (8IMF → independent BiLSTM-Attention for each IMF → summation and reconstruction of each component). Each model is isolated by independent try / except exceptions: a single model exception is only logged, while the rest continue; the result dictionary is collected by as_completed(); when the training rows are <39, the deep learning model automatically switches to recursive prediction (horizon=1, window=3), and when <60 rows, hybrid inference is enabled (final=0.4×model+0.6×trend_baseline). When the training rows are <50, the number of IMFs of CEEMDAN-LSTM changes from 8 to 3 / epochs from 80 to 30.

[0104] (5) Post-processing and integration module As a post-processing function chain implementation in api / routes_predict.py, it executes five layers sequentially: Layer 1 (floor constraint): max(pred, 0.5×history_min) to prevent negative values. Layer 2 (data volume adaptation): ≥60 lines of standard pattern, 39-59 lines of mixed inference, <39 lines of recursive + mixed inference. Layer 3 (year-on-year monotonically increasing): Calculate the historical year-on-year average → guarantee a minimum of 3% → gradually increase values ​​that do not meet the increasing condition year by year and month by month. Layer 4 (ensemble averaging): When ≥2 models succeed, calculate the point-by-point arithmetic average over the shortest common length. Layer 5 (error ranking): Calculate RMSE / MAE / MAPE on the bottom 20% of the test set and rank them in ascending order.

[0105] (6) Visualization output module Deployed as a front-end JS module, it uses the Plotly.js v6.7+ interactive charting library. After retrieving JSON data via GET / api / predict / result, it renders three components: Component 1 (Historical Comparison Line Chart) draws the actual load with a solid black line, overlaying backtest curves of each model with six colors (blue / green / red / orange / purple / brown) and different line styles. Component 2 (Future Prediction Chart) draws the integrated average predicted value with a dark blue thick solid line, and displays the extreme value range of each model's predicted value with light blue semi-transparent bands (fill:tonexty) at the top and bottom. Both charts use Plotly shapes to mark the Spring Festival / National Day / Labor Day holiday intervals with gray semi-transparent rectangles. Component 3 (Error Ranking Table) sorts the models in ascending order by RMSE using an HTML table, highlighting the best row in light green (#e8f5e9). The system provides Excel (openpyxl) and CSV dual-format export via GET / api / predict / export.

[0106] (7) System deployment and inter-module communication Data transfer between modules is entirely within the same Python process, using variable references and function return values. The transferred objects are DataFrame references pointing to the same memory address, eliminating serialization overhead. Internally, the parallel engine shares process memory space via ThreadPoolExecutor. The front-end and back-end communicate via a RESTful API—the JS side sends JSON requests using `fetch()`, and FastAPI returns a JSONResponse after validation with a Pydantic v2 BaseModel. All states are stored in an in-process dictionary in `api / state.py` (keys include `predictions / features / monthly_data / models`, etc.), and each module obtains the same instance by importing `state` from `api.state`. Static files are provided directly from the `static / ` directory by the FastAPI StaticFiles middleware, sharing the same Uvicorn process as the API.

[0107] The present invention has been described in detail above through specific and preferred embodiments. However, those skilled in the art should understand that the present invention is not limited to the embodiments described above. Any modifications, equivalent substitutions, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A power load forecasting method based on multi-model heterogeneous AI parallel forecasting, characterized in that, Includes the following steps: S1. Multi-encoding adaptive data access and Chinese semantic alignment: Receive the raw payload data file, automatically select the parsing engine according to the file extension, attempt to decode sequentially through the preset encoding detection sequence and select the encoding with a decoding success rate exceeding the preset threshold, standardize the Chinese column names to English standard column names through the preset Chinese column name semantic mapping dictionary, automatically discover the date column and payload column for unidentified column names using the sampling method, fill in the missing dates through date re-indexing, and generate a standardized time series dataset; S2. Impact Weight Modeling of Combined Lunar and Gregorian Calendar Holidays: Construct a hybrid holiday calendar containing a pre-calculated dictionary of traditional lunar holidays and rules for statutory Gregorian holidays; pre-calculate the Gregorian dates corresponding to traditional lunar holidays within a specified year range; construct a lookup dictionary with date strings as keys; define pre-holiday and post-holiday impact windows; calculate the minimum absolute distance between the target date and all holiday sets; construct a comprehensive impact weight decay function containing the weight of the holiday day, the linear decay weight of the pre-holiday window, the linear decay weight of the post-holiday window, and the weight of custom events, with a final weight upper limit constraint of 1.0; construct a configurable winter and summer vacation window model and support automatic handling across years. S3. Joint Construction of Six Types of Multidimensional Features: On the monthly frequency time series data, the following are constructed sequentially: A basic time feature subset, extracted using a datetime accessor, including hour, day of the week, month, quarter, number of days in the year, number of weeks in the year, and weekend markers; a holiday feature subset, calculated using the holiday calendar from step S2, including whether it is a holiday, whether it is on a holiday, whether it is a working day, the comprehensive weight of the holiday's impact, days until the holiday, pre-holiday indication, post-holiday indication, and unique indication of major holidays, totaling 17 dimensions; and a lag feature subset, generated through data shifting operations, including the previous 1st step, the previous 2nd step, the previous 3rd step, and the previous... The system includes: 7-step, 12-step, 14-step, and 30-step lag features; a rolling statistical feature subset, which calculates the rolling mean and rolling standard deviation using sliding windows of preset window sizes (3, 6, 7, 12, 14, and 30); a periodic encoding feature subset, which maps variables with cyclic properties to continuous space using trigonometric function transformations; an interactive feature subset, which includes at least the cross-product of holiday impact weights and load values; and a future feature matrix for future prediction, using the last 60 rows of historical data as a context window, and extracting the future portion after calling the above feature construction process with a concatenated dataset of historical data and future dates. S4. Multi-model Heterogeneous AI Parallel Prediction: Six distinct load prediction models are constructed, including the statistical Prophet model, the machine learning XGBoost-DayType model, the deep learning CNN-BiLSTM-CrossAttention model, the state-space model TSMamba model, the Transformer Informer model, and the hybrid decomposition CEEMDAN-LSTM-Attention model. A thread pool mechanism is used to simultaneously submit training and prediction tasks for all selected models, achieving parallel and asynchronous execution of heterogeneous models. After each model outputs an initial prediction value, a prediction floor constraint is applied, whereby the predicted value is no less than 50% of the historical minimum load. S5. Data Volume Adaptive Mode Switching and Hybrid Inference: Before training each model, the prediction mode is automatically determined and switched based on the number of rows in the training data. When the number of rows in the training data is less than a preset threshold, the deep learning model automatically switches to recursive prediction mode. The recursive prediction mode sets the model prediction period to 1, reduces the input window to 3, and after training, fills the input sequence with the single-step prediction result to perform the next prediction. This process is iterated until all prediction periods are completed. When the number of rows in the training data is further less than the second preset threshold, the trend-seasonal hybrid inference strategy is enabled. The trend term is extracted from historical data through first-order linear fitting using the least squares method. The seasonality factor for each month is calculated, and the monthly growth rate constrained by upper and lower limits is calculated. The model output is weighted and fused with the trend-seasonal baseline according to preset weights to generate a corrected prediction value. An extreme value capping constraint is applied to the Prophet model, which means that the predicted value of the Prophet model does not exceed 3 times the trend extrapolation value. S6. Year-by-Year Monotonically Increasing Modulation and Multi-Model Integration: Historical load data is grouped by year to calculate the year-on-year growth rate and take the average, setting a minimum guaranteed annual growth rate. The predicted outputs of each model are divided into 12-month groups for each prediction year. Each group's monthly predicted value is checked to ensure it meets the constraint that it is not lower than the product of the arithmetic mean of the previous year's monthly predicted values ​​and the minimum guaranteed growth rate. Prediction groups that do not meet the constraint are shifted upwards to satisfy it. When the number of models that successfully complete the prediction is no less than two, the point-by-point arithmetic mean of all successful models along the shortest common prediction length is calculated as the integrated average prediction output. The mean absolute error, mean absolute percentage error, and root mean square error of each model are calculated on the test set and ranked in ascending order of root mean square error. The test set is defined as the last 20% of all historical data arranged in chronological order.

2. The power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, In step S1, for Excel files, the openpyxl engine is used first for parsing, and the xlrd engine is automatically switched if parsing fails. For CSV and TXT files, the field delimiter is determined by sampling detection and then loaded using the Pandas library. The preset encoding detection sequence is UTF-8, GBK, GB2312, GB18030, and Latin-1 in sequence. The decoding success rate is calculated for each encoding, which is the proportion of successfully decoded characters to the total number of characters. The first encoding with a decoding success rate exceeding 90% is selected. The preset Chinese column name semantic mapping dictionary covers column name types including time, date, load, electricity consumption, highest temperature, lowest temperature, average temperature, humidity, rainfall, and so on. Common abbreviations and variations; the sampling method for automatically discovering date columns includes: traversing all numeric and text columns in the data table that are not mapped to known types, randomly sampling several rows of data for each column, and attempting to parse the following formats: YYYYMMDD integer format, Excel serial number format based on December 30, 1899, YYYY-MM-DD string format, YYYY / MM / DD string format, and YYYY.MM.DD string format. The parsing hit rate for each format is calculated, and when the hit rate of a column under any format exceeds 70%, the column is identified as a date column; the load column is automatically located and searched in a preset priority order, with the priority being the standardized load column, the standardized load column, and the last numeric column in the data table.

3. The power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, The time range covered by the pre-calculated dictionary for traditional lunar holidays in step S2 is from 2010 to 2035. The data is organized in a four-level nested structure: the year is used as the first-level key, mapping to a sub-dictionary containing traditional lunar holidays; each traditional lunar holiday uses "year-holiday name" as the second-level key, with the corresponding Gregorian calendar date string as the value; the traditional lunar holidays are Spring Festival, Dragon Boat Festival, and Mid-Autumn Festival; the pre-holiday influence window and post-holiday influence window are configurable parameters, with a default window size of 3 days; the calculation formula for the influence weight decay function is: HolidayImpact = min(0.8 × I_holiday + max(0, 1 − |D_nearest| / (N+1)) ×0.5 + ΣW_custom, 1.0) Wherein, I_holiday is the indicator variable for the holiday day, 1 if it is, 0 otherwise; D_nearest is the minimum absolute distance between the target date and the set of all holiday dates; N is the size of the affected window; W_custom is the custom event weight; all adjusted working days between the start and end dates of holidays are added to the lookup dictionary one by one through the date range expansion function; in the summer and winter vacation window model, the default start and end dates of summer vacation are July 1 and August 31, and the default start and end dates of winter vacation are January 15 and February 15. Automatic processing of the cross-year winter vacation window is realized by judging the month value range; the addition and deletion interfaces of custom events are provided, and the persistent storage of holiday calendar configuration is supported through serialization and deserialization methods.

4. The power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, The formulas for the trigonometric function transformations described in step S3 are: feature_sin = sin(2π × value / period), feature_cos = cos(2π × value / period). The period is defined as follows: value is the original value of the periodic variable to be encoded, period is the period length of the variable, period=12 for month features, period=7 for weekday features, and period=366 for year-end features; the lag feature in monthly frequency data, the first 12 steps of lag feature lag_12 corresponds to the load value of the same month in the same period last year; the rolling statistical feature is calculated with a minimum effective window of 1 to ensure that early data rows do not generate null values; the interaction and meteorological feature subset includes at least the cross product of the impact weight of holidays and load values ​​and the temperature difference feature, and the missing values ​​of the meteorological column are filled in priority order: first try linear interpolation, then try forward filling, and finally use backward filling as a fallback; the future feature matrix construction process is as follows: select the last 60 rows of historical data as the context window, concatenate the context window with the future date to be predicted to form an extended dataset, input the extended dataset into the feature construction process of step S3 to generate a complete feature matrix, and cut the rows corresponding to the future date from the complete feature matrix as the final prediction input features; In this process, the load values ​​for future dates are uniformly filled with the last known historical load value to ensure the computability of lag features. Meteorological features are filled with the arithmetic mean of existing historical values ​​for the same month. Periodic coding features are calculated independently based on the actual calendar position of future dates.

5. The power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, In step S4: (a) The Prophet model uses an additive seasonal decomposition algorithm, with the annual seasonal Fourier series order set to 10, the variable point prior scale set to 0.05, and the holiday prior scale set to 10.

0. Holiday prior information is injected through the Chinese holiday calendar. (b) The XGBoost-DayType model uses the gradient boosting tree algorithm, with a decision tree count of 300, a maximum tree depth of 6, a learning rate of 0.1, a subsampling ratio of 0.8, and a column sampling ratio of 0.

8. The day type features are input in a one-hot encoding manner. (c) The CNN-BiLSTM-CrossAttention model is implemented based on the PyTorch framework. Its architecture consists of 2 layers of one-dimensional convolution (64 kernels) → 2 layers of bidirectional long short-term memory network (128 hidden units) → 4-head cross attention mechanism → global average pooling → fully connected output layer. (d) The TSMamba model is based on the PyTorch framework to implement a diagonal state space model, with a state dimension of 16, a model dimension of 64, an encoder layer of 4, and sinusoidal position encoding. (e) The Informer model is implemented based on the PyTorch framework. It uses the ProbSparse self-attention mechanism to reduce the computational complexity from O(n²) of the standard attention mechanism to O(n·ln n). The model is configured with a dimension of 64, an attention head of 4, an encoder layer of 2, a decoder layer of 1, and a selection factor of 5. (f) The CEEMDAN-LSTM-Attention model uses an adaptive noise complete set empirical mode decomposition algorithm, which decomposes the model into 8 intrinsic mode function components by default. For each component obtained by decomposition, a bidirectional long short-term memory network-attention model is independently constructed for training and prediction. The prediction results of each component are summed and reconstructed into the final prediction value.

6. A power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, The preset threshold mentioned in step S5 is the sum of the minimum window value and the number of prediction periods. The default minimum window value is 3 and the number of prediction periods is 36. The recursive prediction mode sets the number of prediction periods of the model to 1 and shrinks the input window to 3. After training, the input sequence is filled with the single-step prediction results to perform the next prediction. The process is iterated until the prediction of all prediction periods is completed. The second preset threshold is 60 rows. When the number of training data rows is less than 60 rows, the specific steps of the trend-seasonal hybrid inference strategy include: (a) Trend extraction: using the numpy.polyfit function to perform least squares linear fitting on the historical load data with a polynomial order of 1, obtaining the slope and intercept, and calculating the trend baseline value and annual growth rate at the end point of the fitted line in history; (b) Seasonal factor calculation: grouping the historical data by month, calculating the monthly load average, and then dividing by the load average value of all historical data to obtain the seasonal factor of each month; (c) Monthly growth rate calculation: geometrically decomposing the annual growth rate in step (a) into monthly growth rates, and limiting the monthly growth rate to the range of 0.1% to 1%; (d) Baseline generation: for the k-th predicted month in the future, the trend-seasonal baseline prediction value = trend baseline value × (1 + monthly growth rate)^k × (k mod) 12) Monthly seasonal factors; (e) Weighted fusion: Final forecast = Model output × 0.4 + Trend - Seasonal baseline forecast × 0.6; (f) Extreme value capping: Apply a capping constraint of no more than 3 times the trend extrapolation value to the forecasts of the Prophet model; (g) Forecast floor: All model forecasts are no less than 50% of the historical minimum load.

7. A power load forecasting method based on multi-model heterogeneous AI parallel forecasting as described in claim 1 or 6, characterized in that, When the number of training data rows is less than 50, the CEEMDAN-LSTM-Attention model described in step S5 automatically reduces the number of intrinsic mode function decomposition components from 8 to 3, and reduces the number of long short-term memory network training iterations for each component from 80 rounds to 30 rounds, in order to avoid overfitting under sparse data conditions.

8. A power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, The minimum guaranteed annual growth rate in step S6 is 3%; the specific execution logic of the monotonically increasing incremental processing is as follows: the prediction results are divided into multiple prediction year groups at 12 equal intervals, and the set of predicted monthly values ​​for the nth year is Pn={p1,p2,…,p12}. The arithmetic mean Mn-1 of the predicted values ​​for the previous year (n-1) is calculated, and the constraint threshold Tn = Mn-1×(1+r_floor) is defined, where r_floor is the minimum guaranteed annual growth rate; check whether the minimum value in the set Pn is less than Tn. If so, calculate the offset Δ = Tn − min(Pn), add Δ to all values ​​in Pn, update Pn, and continue to check the next prediction year group; the ensemble averaging starts when the number of successful prediction models N≥2. Let the prediction results of all successful models be Y1,Y2,…,YN, and the prediction lengths of each model be L1,L2,…,LN, respectively. Take the shortest common length L_min = min(L1,L2,…,LN), truncate the predictions of each model to the length of L_min, and calculate the arithmetic mean of each point to obtain the ensemble prediction result E = (Y1[:L_min] + Y2[:L_min] + … + YN[:L_min]) / N; calculate MAE=mean(|y_true−y_pred|), MAPE=mean(|y_true−y_pred| / |y_true|)×100% (when the actual value is not zero) and RMSE=√(mean((y_true−y_pred)²)) on the test set, and output the ranking of each model in ascending order of RMSE value.

9. The power load forecasting method based on multi-model heterogeneous AI parallel forecasting according to claim 1, characterized in that, The thread pool mechanism described in step S4 is implemented using ThreadPoolExecutor from the concurrent.futures module of the Python standard library. The maximum number of concurrent worker threads is set to the smaller of 3 and the number of models to be executed. The training and prediction tasks of each model are submitted asynchronously through the executor.submit() method, which returns a collection of Future objects. The completion results of each model are collected in real time through the as_completed() iterator. The training and prediction process of each model is wrapped in an exception handling block. When a training or prediction exception occurs in a single model, the model is only marked as failed and the error information is recorded without interrupting other parallel model tasks. The execution time of each successful model is recorded independently.

10. A power load forecasting system based on multi-model heterogeneous AI parallel forecasting, characterized in that, It adopts a browser / server architecture with a front-end and back-end separation, including: The backend service layer is built on an asynchronous Python web framework and runs within a single Uvicorn process; The front-end presentation layer is built on HTML5 / CSS3 / JavaScript and communicates with the back-end service layer through a RESTful API. The backend service layer includes the following functional modules deployed within the same Python process. Data is passed between modules in the same process memory space via Python variable references and function return values. Intermediate calculation results are stored in a global state dictionary within the process, without relying on an external database: The data access module is configured to receive raw load data files uploaded by users through a RESTful API interface, perform adaptive encoding detection, column name semantic mapping and missing date completion, and generate a standardized time series dataset. The holiday modeling module is configured to receive the standardized time-series dataset, load the pre-computed holiday dictionary and calculate the comprehensive influence weight, and generate an extended feature dataset containing holiday features. The feature engineering module is configured to receive the extended feature dataset and construct a multidimensional training feature matrix through a temporal feature extraction sub-method. The parallel prediction engine module is configured to receive the multidimensional training feature matrix, asynchronously submit at least two different types of load prediction models through a thread pool to perform parallel training and prediction, and output the preliminary prediction results of each model. The post-processing and integration module is configured to receive the preliminary prediction results of each model, and sequentially perform floor constraint, adaptive data volume correction, yearly monotonically increasing manual processing, multi-model integration averaging and error evaluation ranking, and output the final prediction results and model error ranking. The visualization output module is configured to receive the final prediction results and model error rankings, and render historical comparison charts, future prediction charts, and error ranking tables through an interactive chart library.