Industrial electricity consumption intelligent prediction method, system and device and storage medium

By collecting and processing multi-source heterogeneous data, a hybrid prediction model is constructed, which solves the problems of accuracy and robustness in industrial electricity load prediction, and achieves high-precision point prediction and interval prediction, supporting enterprises in optimizing electricity costs and providing early warning of anomalies.

CN122000862APending Publication Date: 2026-05-08INSPUR ARTIFICIAL INTELLIGENCE RES INST CO LTD SHANDONG CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR ARTIFICIAL INTELLIGENCE RES INST CO LTD SHANDONG CHINA
Filing Date
2025-12-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Industrial electricity load forecasting is inaccurate due to high volatility and the influence of multiple factors. Existing models are unable to capture long-term dependencies and complex external causal effects, and they are insufficient in handling abnormal operating conditions, resulting in limited forecast accuracy and poor robustness.

Method used

Collect heterogeneous data from multiple sources, perform data fusion, cleaning and outlier handling, construct a preprocessed time series dataset, extract multiple types of features, and perform fusion prediction through a hybrid prediction model, including the output results of time series deep learning and ensemble learning models.

Benefits of technology

It significantly improves the ability to understand complex patterns of industrial electricity consumption, enables high-precision point prediction and reliable interval prediction, supports accurate optimization of electricity costs and early warning of anomalies, and enhances the intelligent management and economy of industrial electricity consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000862A_ABST
    Figure CN122000862A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides an intelligent prediction method, system and device for industrial power consumption and a storage medium, and the method comprises the steps: collecting power consumption load, production operation, environment and time calendar multi-source data, carrying out the fusion, cleaning and abnormal value processing, constructing a preprocessing time series data set, and generating state marking features in the abnormal processing; feature engineering is carried out on the data set, and lagging, sliding statistics, trend, periodicity and external causal features are extracted; standardizing the numeric features, combining the standardized numeric features with the category features, and constructing a model input feature set; and inputting the set into a pre-trained hybrid prediction model, fusing output results of the time sequence deep learning model and the integrated learning model therein, and finally outputting point prediction and interval prediction of the industrial electrical load. According to the method, through multi-source fusion and refined feature engineering, the cognition and prediction precision of an industrial power consumption complex mode is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, specifically relating to an intelligent prediction method, system, device, and storage medium for industrial power consumption. Background Technology

[0002] Industrial electricity load forecasting is a core component of enterprise energy management and cost control. However, industrial electricity data is characterized by high volatility and nonlinearity, and is subject to complex influences from multiple sources such as production plans, ambient temperature, and equipment status, making accurate forecasting extremely difficult. Traditional single forecasting models, such as statistical models or shallow machine learning models, often fail to effectively capture long-term dependencies and complex external causal effects. Furthermore, existing methods typically rely solely on historical load data, failing to systematically integrate key causal variables such as production and environment, and are insufficient in handling abnormal operating conditions within the data. This results in limited forecasting accuracy and poor robustness, making it difficult to support refined electricity cost optimization and anomaly early warning decisions. Therefore, there is an urgent need for an intelligent forecasting method that can integrate multi-source information, quantify causal influences, and possess high-precision interval forecasting capabilities. Summary of the Invention

[0003] In view of the above-mentioned shortcomings of the prior art, the present invention provides an intelligent prediction method, system, device and storage medium for industrial power consumption to solve the above-mentioned technical problems.

[0004] In a first aspect, the present invention provides an intelligent prediction method for industrial electricity consumption, comprising: Collect multi-source heterogeneous data, perform data fusion, cleaning and outlier processing on the multi-source heterogeneous data to construct a preprocessed time series dataset, wherein the outlier processing includes generating outlier state label features; Feature engineering is performed on the preprocessed time series dataset to extract multiple types of features, including lag features, moving statistics features, trend features, periodic features, and external causal features. The numerical features among the multiple types of features are standardized and combined with the categorical features to construct a feature set for model input; The feature set is input into a pre-trained hybrid prediction model, and the output prediction results of the temporal deep learning model and the ensemble learning model in the hybrid prediction model are fused to output industrial electricity load point prediction and interval prediction based on the fusion result. Specifically, based on the feature set generated in historical periods, and using electricity load as a label, the hybrid prediction model is trained to obtain a pre-trained hybrid prediction model; the hybrid prediction model includes a time-series deep learning model and an ensemble learning model. The multi-source heterogeneous data includes electricity load data, production and operation data, environmental data, and time calendar data.

[0005] In one optional implementation, the multi-source heterogeneous data is fused, cleaned, and outlier-handled to construct a preprocessed time-series dataset, including: Using a unified timestamp as the primary key, multi-source data from different systems are correlated; for non-uniformly sampled data, interpolation or aggregation methods are used to align it to the same time granularity as the electricity load data. Missing data is processed as follows: for consecutive missing data caused by equipment maintenance, event marker features are created and the missing data is filled in using the mean of data from the preceding and following time periods or interpolation based on production conditions; for random missing data, sliding window mean or linear interpolation methods are used to fill in the missing data. The system employs statistical box plot or Z-score methods, combined with business rule-based judgments, to identify abnormal data points. For the identified outliers, the system corrects them to smoothed values ​​based on normal data before and after the time intervals, or marks them as abnormal state features.

[0006] In one optional implementation, abnormal data points are identified by combining business rule-based judgment, including: First-level identification: Initial screening is performed using rules based on statistical control, including: Static threshold rule: Compare electrical load to a fixed threshold based on equipment rated parameters; Dynamic threshold rule: A dynamic threshold is generated based on statistics of historical data from the same period, and the dynamic threshold is determined by the 3-Sigma rule or the quantile method; Second-level identification: The initial screening results are verified using rules based on business logic. These rules include: State contradiction rule: Determine whether the equipment status data and the power load data are logically consistent; Abnormal mode rules: Compare the current electricity load curve with the typical curve of the same period in history to determine whether the difference in shape exceeds the allowable range.

[0007] In an optional implementation, feature engineering is performed on the preprocessed time-series dataset, including: Constructing basic time-series features: By extracting the electricity load values ​​of 1 hour, 3 hours, 6 hours, 12 hours, 24 hours, and 168 hours before the current time, lag features are generated; by calculating the mean, standard deviation, maximum, and minimum values ​​of the electricity load within the 6-hour and 24-hour time windows before the current time, sliding statistical features are generated; by performing linear regression on the electricity load sequence within the preset time window before the current time, the resulting slope is used as the trend feature.

[0008] Constructing periodic features: Through sine and cosine transformations, the time-related fields in the preprocessed time-series dataset are converted into cyclic encoded features; by determining the date type, Boolean features for marking holidays and the day before the holiday are generated.

[0009] Constructing external causal features: By querying production and operation data that is time-aligned with the electricity load data, the planned output, overall equipment efficiency, and number of production lines in operation can be directly extracted or calculated; by calculating the cooling and heating time of the temperature in the environmental data based on a preset base temperature; by identifying equipment maintenance schedules and special production task work orders, corresponding event tag features can be generated.

[0010] In an optional implementation, the numerical features among the multiple types of features are standardized and combined with the categorical features to construct a feature set for model input, including: The numerical features are scaled using a standardization or normalization method. The scaled numerical features are concatenated with the unscaled categorical features to form a unified feature vector. The feature vectors are associated with the electricity load label values ​​of the corresponding timestamps to construct a feature set for model training and prediction.

[0011] In an optional implementation, the feature set is input into a pre-trained hybrid prediction model, and the output prediction results of the temporal deep learning model and the ensemble learning model in the hybrid prediction model are fused, including: The feature set is simultaneously input into the temporal deep learning model and the ensemble learning model in the pre-trained hybrid prediction model; Obtain the first prediction result output by the temporal deep learning model and the second prediction result output by the ensemble learning model; The first prediction result and the second prediction result are fused. The fusion method is to use both as input features and input them into a meta-learner for final prediction.

[0012] In an optional implementation, the hybrid prediction model is constructed and trained as follows: Model architecture: The temporal deep learning model is a temporal convolutional network (TCN) or a Transformer model; the ensemble learning model is a LightGBM model; Training strategy: The temporal deep learning model and the ensemble learning model are trained independently using datasets that are strictly divided in chronological order to prevent future information leakage; Loss function: When training the time-series deep learning model, the Huber loss function or the quantile loss function is used; Result fusion: The prediction results output by the two models are fused using a linear regression model as a meta-learner.

[0013] Secondly, the present invention provides an intelligent prediction system for industrial electricity consumption, comprising: The data acquisition module is used to collect multi-source heterogeneous data, perform data fusion, cleaning and outlier processing on the multi-source heterogeneous data to construct a preprocessed time series dataset, wherein the outlier processing includes generating outlier state label features. The feature extraction module is used to perform feature engineering on the preprocessed time series dataset and extract multiple types of features, including lag features, moving statistical features, trend features, periodic features, and external causal features. The feature processing module is used to standardize the numerical features among the multiple types of features and combine them with the categorical features to construct a feature set for model input. The model prediction module is used to input the feature set into the pre-trained hybrid prediction model, and to fuse the output prediction results of the time-series deep learning model and the ensemble learning model in the hybrid prediction model, and output the industrial electricity load point prediction and interval prediction based on the fusion result. Specifically, based on the feature set generated in historical periods, and using electricity load as a label, the hybrid prediction model is trained to obtain a pre-trained hybrid prediction model; the hybrid prediction model includes a time-series deep learning model and an ensemble learning model. The multi-source heterogeneous data includes electricity load data, production and operation data, environmental data, and time calendar data.

[0014] Thirdly, a device is provided, comprising: Memory used to store intelligent prediction programs for industrial power consumption; A processor is configured to implement the steps of the intelligent industrial power consumption prediction method provided in the first aspect when executing the intelligent industrial power consumption prediction program.

[0015] Fourthly, a computer-readable storage medium is provided, on which an intelligent prediction program for industrial power consumption is stored, wherein when the intelligent prediction program for industrial power consumption is executed by a processor, the steps of the intelligent prediction method for industrial power consumption as provided in the first aspect are implemented.

[0016] The beneficial effects of this invention are that the intelligent industrial power consumption forecasting method, system, equipment, and storage medium provided by this invention significantly improve the model's ability to understand complex patterns of industrial power consumption by integrating multi-source data such as production and environment, and introducing refined temporal and causal features. Adopting a hybrid model architecture, it combines the advantages of long-term reliance on data capture and feature interaction learning, ultimately achieving high-precision point prediction and reliable interval prediction. Its beneficial effects are: on the one hand, providing enterprises with more reliable load forecasts, supporting accurate peak shaving and valley filling and electricity cost optimization; on the other hand, through prediction intervals and anomaly marking, enabling early detection of equipment failures and energy efficiency anomalies, comprehensively improving the intelligent management and economy of industrial power consumption. Attached Figure Description

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

[0018] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.

[0019] Figure 2 This is a schematic block diagram of a system according to an embodiment of the present invention.

[0020] Figure 3 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0023] The intelligent prediction method for industrial power consumption provided in this embodiment of the invention is executed by a computer device, and correspondingly, the intelligent prediction system for industrial power consumption runs in the computer device.

[0024] Figure 1This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The implementing entity can be an intelligent industrial power consumption forecasting system. Depending on different needs, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0025] like Figure 1 As shown, the method includes: S1. Collect multi-source heterogeneous data, perform data fusion, cleaning and outlier processing on the multi-source heterogeneous data to construct a preprocessed time series dataset, wherein the outlier processing includes generating outlier state label features; S2. Perform feature engineering on the preprocessed time series dataset to extract multiple types of features, including lag features, moving statistics features, trend features, periodic features, and external causal features; S3. Standardize the numerical features among the multiple features and combine them with the categorical features to construct a feature set for model input; S4. Input the feature set into the pre-trained hybrid prediction model, and fuse the output prediction results of the time-series deep learning model and the ensemble learning model in the hybrid prediction model to output the industrial electricity load point prediction and interval prediction based on the fusion result. Specifically, based on the feature set generated in historical periods, and using electricity load as a label, the hybrid prediction model is trained to obtain a pre-trained hybrid prediction model; the hybrid prediction model includes a time-series deep learning model and an ensemble learning model. The multi-source heterogeneous data includes electricity load data, production and operation data, environmental data, and time calendar data.

[0026] In one embodiment of the present invention, based on step S1, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0027] S101. Specific implementation of data fusion and alignment: First, create a uniform timeline with minute or 15-minute intervals on a data processing platform (such as Spark or Pandas) as a baseline index.

[0028] Electricity load data: usually has a regular timestamp, which can be used directly as a reference.

[0029] Production and operation data: For example, "equipment status" and "shift output" obtained from the MES system. This data may be event-triggered (such as recorded when status changes) or summarized by shift. For event data, we resample and padded forward to a uniform time granularity; for shift output data, we distribute it evenly or interpolate it linearly to each time point within the shift, thereby generating a continuous time series.

[0030] Environmental data: Hourly temperature data obtained via API is downscaled to the same 15-minute granularity as the electricity load data using linear interpolation.

[0031] Finally, using timestamps as keys, all source tables are joined into a single wide table through database connections (such as SQL JOIN) or data frame merge operations, thus completing the data fusion.

[0032] S102. Specific implementation of missing data handling: For consecutive missing data: The system uses the maintained "Equipment Maintenance Plan" to determine this. When a period is identified as falling within a planned maintenance period and all data is missing, the following operations are performed: Create a boolean event marker named is_maintenance and assign it the value 1 (True) during this period.

[0033] The load value for this period is filled by averaging the normal data from N hours before and after the maintenance period. For example, the average load of the 24 hours before and after the maintenance begins is used as the filler value for the maintenance period. This better reflects the actual operating condition of the equipment without load during maintenance.

[0034] For randomly missing data: A computationally efficient and smooth linear interpolation method is used to fill in the missing data at individual time points. In Pandas, this can be achieved directly using the `dataframe.interpolate(method='linear')` function. For data with obvious periodicity (such as temperature), seasonal sliding window mean interpolation can also be used, i.e., filling with the average of windows near the same time in the previous period.

[0035] S103. Specific implementation of outlier detection and handling: This step employs a multi-level, rule-driven hybrid strategy to ensure the comprehensiveness and accuracy of the detection.

[0036] First layer: Statistical detection Using the Z-Score method: Calculate the Z-Score of the load value at each time point. Set the threshold to 3; when |Z-Score|>3, it is initially marked as a statistical outlier.

[0037] Using box plots: Calculate the quartiles (Q1, Q3) and interquartile range (IQR) on the daily data, and initially mark values ​​below Q1 - 1.5*IQR or above Q3 + 1.5*IQR as outliers.

[0038] Second layer: Business rule verification Here are some common and practical exception detection rules: (1) Rules based on statistical control, which are derived from the theory of statistical process control (SPC) and determine the statistical boundaries of normal behavior through historical data.

[0039] Static threshold rule: Set an absolute upper or lower limit for electricity consumption or power. Once the threshold is exceeded, an anomaly is triggered.

[0040] Application example: If the power consumption of a device exceeds 110% of its rated power, it is considered an overload. If the total power consumption is less than a certain minimum baseline value, it may indicate a production stoppage or a malfunction in the metering equipment.

[0041] Dynamic threshold rule: The threshold is no longer a fixed value, but changes dynamically over time. It is usually calculated based on statistics from historical data of the same period (such as "the same time last week").

[0042] Application example: The 3-Sigma rule states that the current load value is greater than the mean (for the same period in the past 4 weeks) + 3 * standard deviation (for the same period in the past 4 weeks). This indicates that the current value exceeds 99.7% of the normal fluctuation range and is highly likely to be abnormal.

[0043] Quantile method: The 95th percentile of historical data is used as a dynamic upper limit, and an alarm is triggered if it is exceeded.

[0044] Advantages: It can adapt to periodic changes such as daily, weekly, and quarterly, making it more intelligent than static thresholds.

[0045] (2) Judgment based on business logic and rules These rules are deeply integrated with specific production and operation knowledge, and the basis for judging anomalies is "whether it is physically or logically possible".

[0046] State contradiction rule: Compare power consumption data with equipment status data, and judge it as abnormal when the two are logically inconsistent.

[0047] Application example: The device status is "shutdown," but the power reading is >0. This could mean the device was not completely powered off or that the sensor is malfunctioning.

[0048] Total electricity consumption is greater than 0, but all production lines report an output of 0. This may indicate energy leakage or failure to report production data in a timely manner.

[0049] Abnormal Pattern Rule: Compare the current electricity consumption curve with the typical curve (baseline) of the same period in history. When there is a significant difference in the shape, it is judged as abnormal.

[0050] Application example: Production peaks typically occur between 9 AM and 11 AM on weekdays, during which the load curve should remain stable and at a high level. If the load curve exhibits sharp, irregular sawtooth-like fluctuations during this period, it may indicate production instability or frequent equipment start-ups and shutdowns.

[0051] (3) Rules based on machine learning models These rules utilize the predictive model itself to detect anomalies, making them a more advanced and adaptive approach.

[0052] Prediction bias rule: Use a trained high-precision prediction model (such as the aforementioned Transformer or LightGBM model) to predict the load at the current moment. The model not only outputs the predicted value, but also provides a prediction interval (such as a 90% confidence interval).

[0053] Application example: If the real-time load value consistently falls outside the upper limit of the prediction range, an anomaly is triggered. This indicates that the current electricity consumption behavior has significantly deviated from the model's expectations, possibly due to unknown factors (such as a sudden drop in equipment efficiency or new equipment not being registered for operation).

[0054] Residual analysis rules: Analyze the residuals (actual value - predicted value) predicted by the model. Under normal circumstances, the residuals should be randomly distributed and close to zero. If the residual sequence shows consecutive positive signs (e.g., multiple consecutive positive residuals) or a sudden increase in amplitude, it indicates a systematic bias, i.e., an anomaly.

[0055] (4) Complex and sequence regularity To reduce false alarms and improve the accuracy of alerts, multiple rules are usually combined.

[0056] Duration rule: A single instantaneous spike may not be a true anomaly, but a deviation that persists for a period of time is what needs attention.

[0057] Application example: An alarm is triggered only when the power exceeds the dynamic limit and lasts for more than 5 minutes, ignoring short-term fluctuations.

[0058] Rule combination: Combine different types of rules using logical operators (AND / OR / NOT).

[0059] Application example: An alarm should only be triggered when (power > threshold) and (device status == "Running"). This avoids false alarms during normal device start-up and shutdown.

[0060] Outlier Handling: For confirmed outliers, forward propagation or linear interpolation of normal values ​​before and after the anomaly is used for smoothing correction to maintain the continuity of the data sequence. Simultaneously, a Boolean feature named `is_anomaly` is created, assigned a value of 1 (True) at the time the anomaly occurred. This feature will serve as valuable input information, subsequently informing the prediction model that an abnormal condition occurred at that location.

[0061] In one embodiment of the present invention, based on step S2, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0062] S201. Specific Implementation of Constructing Basic Temporal Features Basic time-series features are used to help the model "remember" the past and understand recent dynamics.

[0063] Generating lagged features: In a Pandas dataframe, create a series of lagged columns for each time point t using the .shift() method. For example: df['load_lag_1h'] = df['total_power'].shift(4) / / Assuming a 15-minute granularity, a 1-hour lag means a 4-point lag; df['load_lag_24h'] = df['total_power'].shift(96) / / Delay by 24 hours; Similarly, features such as load_lag_3h, load_lag_6h, load_lag_12h, and load_lag_168h are generated.

[0064] Generation of sliding statistical features: The `.rolling()` window function is used to calculate statistics within a specified window. To avoid future information leakage, data whose window ends at the current time `t` is strictly used.

[0065] df['load_roll_mean_6h'] = df['total_power'].rolling(window=24).mean() / / Mean of a 6-hour window (assuming 15-minute granularity and a window size of 24); df['load_roll_std_24h'] = df['total_power'].rolling(window=96).std() / / Standard deviation of the 24-hour window; Similarly, calculate features such as load_roll_max_6h and load_roll_min_24h.

[0066] Trend feature generation: Set a backtracking window, for example, window = 12 (i.e., backtracking the data of the most recent 3 hours).

[0067] For each time point t, take the load value y of the previous window time points and its corresponding time number x (e.g., [1, 2, 3, ..., window]).

[0068] Use scipy.stats.linregress(x, y) to perform linear regression on the sequence.

[0069] The slope obtained from the regression is used as the trend feature load_trend_3h at the current time t. A positive slope indicates that the recent load is trending upward, while a negative slope indicates a downward trend.

[0070] S202. Specific Implementation of Constructing Periodic Features Periodic features are used to help models understand and predict recurring time patterns.

[0071] Implementation of cyclic encoding: To avoid treating "23:59" and "00:00" as being numerically far apart, we perform sine-cosine transformation on the hour and day of the week.

[0072] Hour code: hour_sin = np.sin(2 * np.pi * df['hour'] / 24); hour_cos = np.cos(2 * np.pi * df['hour'] / 24); Day of the week code: day_of_week_sin = np.sin(2 * np.pi * df['day_of_week'] / 7); day_of_week_cos = np.cos(2 * np.pi * df['day_of_week'] / 7).

[0073] In this way, each time period attribute is mapped to a point on a two-dimensional circle, maintaining the cyclical continuity of time.

[0074] Implementation of date type features: Create boolean features using pandas' holiday calendar or a predefined list of holidays.

[0075] df['is_holiday'] = df['date'].isin(holiday_list).astype(int) df['is_holiday_eve'] = (df['date']+ pd.Timedelta(days=1)).isin(holiday_list).astype(int) / / Mark the day before the holiday.

[0076] S203. Specific Implementation of Constructing External Causal Characteristics External causal features transform the prediction problem from pure time-series inference to causal inference, which is key to improving the model's generalization ability.

[0077] Extraction of production-related features: Planned output and the number of production lines in operation are read directly from the aligned MES data table.

[0078] The calculation of Overall Equipment Effectiveness (OEE) (if not directly provided): OEE = Availability × Performance Rate × Quality Rate. Where, Availability = Uptime / Planned Man-Hours; Performance Rate = (Total Output × Ideal Cycle Time) / Uptime. These data are obtained from the MES system and calculated in real time.

[0079] Calculation of environmentally relevant characteristics: Cooling Time-of-Day (CDD) and Heating Time-of-Day (HDD) are used to quantify the non-linear effect of temperature on air conditioning energy consumption. A base temperature is set (e.g., 18°C ​​for heating and 24°C for cooling).

[0080] CDD = max(0, current temperature - 24), HDD = max(0, 18 - current temperature), Thus, when the temperature deviates from the comfort zone, the CDD / HDD value increases, and the model can learn the resulting increase in air conditioning load.

[0081] Generation of event tag features: Create binary tags by querying the company calendar or work order system.

[0082] df['is_maintenance']: Marked as 1 during equipment maintenance.

[0083] df['is_special_order']: Marked as 1 during periods of special high-energy-consuming production tasks.

[0084] In one embodiment of the present invention, based on step S3, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0085] S301. The numerical features are scaled using a standardization or normalization method.

[0086] To prevent features with large numerical ranges (such as yield) from dominating model training and to accelerate model convergence, numerical features need to be scaled.

[0087] Method selection and fitting: Standardization: For features whose distribution is approximately normal or unknown, StandardScaler is preferred. This method scales the features to a distribution with a mean of 0 and a standard deviation of 1. The calculation formula is: (x - μ) / σ, where μ is the mean and σ is the standard deviation.

[0088] Normalization: Use MinMaxScaler when you are certain that the feature distribution does not follow a normal distribution, or when you need to strictly compress the features to a specific interval (such as [0, 1]). The calculation formula is: (x-min) / (max-min).

[0089] Key implementation details: The scaler must be fitted using only the training set data to obtain parameters μ, σ, or min, max. These parameters are then used to transform the validation and test sets, strictly avoiding any form of data leakage.

[0090] Typical features that require scaling include: electricity load, temperature, planned output, sliding statistics, trend slope, CDD / HDD, etc.

[0091] Features that do not require scaling: features after cyclic encoding (already in the [-1,1] interval) and lagged features (already scaled to the target variable).

[0092] S302. The scaled numerical features are concatenated with the unscaled categorical features to form a unified feature vector.

[0093] Categorical feature processing: For categorical features that are already numerical (such as device status codes: 0 = stopped, 1 = running, 2 = standby), and whose values ​​themselves do not have magnitude meaning, scaling is usually not performed to preserve their categorical attributes.

[0094] For high cardinality category features, the use of target encoding can be considered depending on the actual situation. However, in this embodiment, for the sake of simplicity, it is usually used directly.

[0095] Vector concatenation: The scaled numerical feature matrix and the categorical feature matrix are horizontally concatenated according to the sample dimension.

[0096] S303. Associate the feature vector with the electricity load label value of the corresponding timestamp to construct a feature set for model training and prediction.

[0097] Transforming time-series data into (feature, label) pairs is a prerequisite for training supervised learning models.

[0098] Define the prediction task: Define the forecast target, for example: use all features of the past 24 hours (x_{t-23}, x_{t-22}, ..., x_t) to predict the load value for the next hour (y_{t+1}).

[0099] Here, y_{t+1} is the label.

[0100] Dataset Construction: Samples are generated using the sliding window method. For each time point t, its corresponding feature vector x_t is taken as input, and its load value y_{t+k} at the k-th future time point is taken as the label.

[0101] Key implementation details: When dividing the training, validation, and test sets, the sets must be divided in chronological order before generating samples for this step. This ensures that the information in any sample does not come from a time period after its set, thus preventing information leakage.

[0102] For tree models such as LightGBM, the review window for each sample can be flattened; for deep learning models such as Transformer / TCN, the three-dimensional structure (number of samples, time step, number of features) is directly used as input.

[0103] In one embodiment of the present invention, based on step S4, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0104] The specific process of model inference (prediction process) describes how to use a trained model to predict new data.

[0105] S401. Specific implementation of model input: The same feature set X_input, obtained after preprocessing and feature engineering, is simultaneously input into two independently trained models.

[0106] For temporal deep learning models (such as TCN), the input is a tensor that preserves the temporal structure, with a shape of (batch_size, look_back_steps, num_features).

[0107] For the ensemble learning model (LightGBM), the input is a flattened feature vector at the same time step, with a shape of (batch_size, num_features). This means that for each time series sample segment seen by TCN, LightGBM only takes the feature vector from the last time step of that segment for prediction.

[0108] S402. Specific implementation of obtaining preliminary prediction results: Call tcn_model.predict(X_input_tensor) to get the first prediction result y_pred_tcn.

[0109] Call lgb_model.predict(X_input_vector) to get the second prediction result y_pred_lgb.

[0110] Both prediction results, y_pred_tcn and y_pred_lgb, are point predictions for the target time.

[0111] S403. Specific implementation of result fusion (meta-learner approach): Constructing meta-features: Combining the preliminary prediction results of the two models into a new two-dimensional dataset, namely "prediction of predicted values".

[0112] Create a new feature matrix X_meta, where each row is a sample containing two features: [y_pred_tcn_i, y_pred_lgb_i].

[0113] Meta-learner prediction: X_meta is input into a pre-trained meta-learner. In this embodiment, the meta-learner is a linear regression model.

[0114] Output final prediction: The meta-learner outputs the final, fused point prediction value y_pred_final.

[0115] y_pred_final= meta_learner.predict(X_meta) This linear regression model learns to assign optimal weights to y_pred_tcn and y_pred_lgb, thereby achieving a more accurate fusion effect than simple averaging by "compensating for each other's weaknesses".

[0116] The detailed implementation process of model building and training explains how to train the above hybrid model from scratch.

[0117] 1. Model Architecture: Temporal deep learning models: TCN: Implemented using keras-tcn or PyTorch. A typical configuration includes stacking four residual blocks, each containing a dilated causal convolutional layer (dilation coefficients of 1, 2, 4, and 8 in sequence), a ReLU activation function, weight normalization, and a Dropout layer. Finally, a fully connected layer outputs the predicted value.

[0118] Transformer: Implemented using PyTorch or TensorFlow. Configure an encoder that includes a multi-head self-attention mechanism and a feedforward neural network. Position encoding uses learnable parameters or sine / cosine encoding.

[0119] Ensemble learning models: LightGBM: Uses the lightgbm library. Key hyperparameters are determined through grid search or Bayesian optimization, for example: boosting_type='gbdt', num_leaves=31, learning_rate=0.05, feature_fraction=0.9.

[0120] 2. Specific implementation of training strategies (preventing information leakage): Dataset partitioning: The entire time series dataset is divided into three parts in chronological order: the first 80% as the training set, the middle 10% as the validation set, and the last 10% as the test set. Random partitioning is strictly prohibited.

[0121] Independent training: The TCN / Transformer and LightGBM models are trained independently using the same training and validation sets, respectively.

[0122] When training LightGBM, its built-in early stopping function must be based on the validation set loss, and the validation set is also divided in chronological order.

[0123] 3. Specific implementation of the loss function: Huber loss function: When training TCN / Transformer, Huber loss is used as the loss function. It represents mean squared error when the error is small, and mean absolute error when the error is large. It is not sensitive to outliers and the training is more stable.

[0124] In PyTorch, you can use torch.nn.HuberLoss(delta=1.0).

[0125] Quantile loss function: Quantile loss is used if interval prediction is required. The model needs to output multiple prediction heads (e.g., the 10th, 50th, and 90th quantiles). The loss function is: L = max(τ*(y - y_pred), (τ-1)*(y - y_pred)), where τ is the target quantile.

[0126] By outputting multiple quantiles simultaneously (such as the 5th and 95th quantiles), a 90% prediction interval can be obtained.

[0127] 4. Specific implementation of meta-learner training: After the model has been trained independently, the first prediction is made using the validation set data.

[0128] Using TCN and LightGBM to predict the validation set, we obtain y_val_tcn and y_val_lgb.

[0129] Using [y_val_tcn, y_val_lgb] as features and the true payload value y_true of the validation set as the label, a linear regression model is trained as a meta-learner.

[0130] This step ensures that the meta-learner learns how to best combine the performance of the two base models on unseen data to achieve optimal generalization performance.

[0131] In some embodiments, the intelligent industrial power consumption forecasting system may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the intelligent industrial power consumption forecasting system may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) The function of intelligent prediction of industrial electricity consumption.

[0132] In this embodiment, the industrial power consumption intelligent prediction system can be divided into multiple functional modules according to its functions, such as... Figure 2 As shown. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0133] The data acquisition module is used to collect multi-source heterogeneous data, perform data fusion, cleaning and outlier processing on the multi-source heterogeneous data to construct a preprocessed time series dataset, wherein the outlier processing includes generating outlier state label features. The feature extraction module is used to perform feature engineering on the preprocessed time series dataset and extract multiple types of features, including lag features, moving statistical features, trend features, periodic features, and external causal features. The feature processing module is used to standardize the numerical features among the multiple types of features and combine them with the categorical features to construct a feature set for model input. The model prediction module is used to input the feature set into the pre-trained hybrid prediction model, and to fuse the output prediction results of the time-series deep learning model and the ensemble learning model in the hybrid prediction model, and output the industrial electricity load point prediction and interval prediction based on the fusion result. Specifically, based on the feature set generated in historical periods, and using electricity load as a label, the hybrid prediction model is trained to obtain a pre-trained hybrid prediction model; the hybrid prediction model includes a time-series deep learning model and an ensemble learning model. The multi-source heterogeneous data includes electricity load data, production and operation data, environmental data, and time calendar data.

[0134] Figure 3 The intelligent prediction method for industrial power consumption provided in the embodiments of this application can be applied to equipment. Those skilled in the art will understand that the equipment structure involved in the embodiments of this invention does not constitute a limitation on the equipment. The equipment may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the equipment includes, but is not limited to, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The equipment may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.

[0135] The device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0136] The memory 320 can be used to store execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 is able to perform some or all of the steps in the above method embodiments.

[0137] The processor 310 serves as the control center of the storage device, connecting various parts of the electronic device via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0138] The communication unit 330 is used to establish a communication channel, enabling the storage device to communicate with other devices. It can receive user data sent by other devices or send user data to other devices.

[0139] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0140] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer device (which may be a personal computer, a server, or a second device, network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0141] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[0142] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.

[0143] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0144] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0145] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.

Claims

1. A method for intelligent prediction of industrial electricity consumption, characterized in that, include: Collect multi-source heterogeneous data, perform data fusion, cleaning and outlier processing on the multi-source heterogeneous data to construct a preprocessed time series dataset, wherein the outlier processing includes generating outlier state label features; Feature engineering is performed on the preprocessed time series dataset to extract multiple types of features, including lag features, moving statistics features, trend features, periodic features, and external causal features. The numerical features among the multiple types of features are standardized and combined with the categorical features to construct a feature set for model input; The feature set is input into a pre-trained hybrid prediction model, and the output prediction results of the temporal deep learning model and the ensemble learning model in the hybrid prediction model are fused to output industrial electricity load point prediction and interval prediction based on the fusion result. Specifically, based on the feature set generated in historical periods, and using electricity load as a label, the hybrid prediction model is trained to obtain a pre-trained hybrid prediction model; the hybrid prediction model includes a time-series deep learning model and an ensemble learning model. The multi-source heterogeneous data includes electricity load data, production and operation data, environmental data, and time calendar data.

2. The method according to claim 1, characterized in that, The multi-source heterogeneous data is fused, cleaned, and outlier-handled to construct a preprocessed time-series dataset, including: Using a unified timestamp as the primary key, multi-source data from different systems are correlated; for non-uniformly sampled data, interpolation or aggregation methods are used to align it to the same time granularity as the electricity load data. Missing data is processed as follows: for consecutive missing data caused by equipment maintenance, event marker features are created and the missing data is filled in using the mean of data from the preceding and following time periods or interpolation based on production conditions; for random missing data, sliding window mean or linear interpolation methods are used to fill in the missing data. The system employs statistical box plot or Z-score methods, combined with business rule-based judgments, to identify abnormal data points. For the identified outliers, the system corrects them to smoothed values ​​based on normal data before and after the time intervals, or marks them as abnormal state features.

3. The method according to claim 2, characterized in that, Based on business rule-based judgments, identify anomalous data points, including: First-level identification: Initial screening is performed using rules based on statistical control, including: Static threshold rule: Compare electrical load to a fixed threshold based on equipment rated parameters; Dynamic threshold rule: A dynamic threshold is generated based on statistics of historical data from the same period, and the dynamic threshold is determined by the 3-Sigma rule or the quantile method; Second-level identification: The initial screening results are verified using rules based on business logic. These rules include: State contradiction rule: Determine whether the equipment status data and the power load data are logically consistent; Abnormal mode rules: Compare the current electricity load curve with the typical curve of the same period in history to determine whether the difference in shape exceeds the allowable range.

4. The method according to claim 1, characterized in that, Feature engineering is performed on the preprocessed time-series dataset, including: Constructing basic time-series features: By extracting the electricity load values ​​of 1 hour, 3 hours, 6 hours, 12 hours, 24 hours, and 168 hours before the current time, lag features are generated; by calculating the mean, standard deviation, maximum, and minimum values ​​of the electricity load within the 6-hour and 24-hour time windows before the current time, sliding statistical features are generated; by performing linear regression on the electricity load sequence within the preset time window before the current time, the resulting slope is used as the trend feature. Constructing periodic features: Through sine and cosine transformations, the time-related fields in the preprocessed time-series dataset are converted into cyclic encoded features; by determining the date type, Boolean features for marking holidays and the day before the holiday are generated. Constructing external causal features: By querying production and operation data that is time-aligned with the electricity load data, the planned output, overall equipment efficiency, and number of production lines in operation can be directly extracted or calculated; by calculating the cooling and heating time of the temperature in the environmental data based on a preset base temperature; by identifying equipment maintenance schedules and special production task work orders, corresponding event tag features can be generated.

5. The method according to claim 1, characterized in that, The numerical features among the multiple types of features are standardized, and combined with the categorical features, a feature set for model input is constructed, including: The numerical features are scaled using a standardization or normalization method. The scaled numerical features are concatenated with the unscaled categorical features to form a unified feature vector. The feature vectors are associated with the electricity load label values ​​of the corresponding timestamps to construct a feature set for model training and prediction.

6. The method according to claim 1, characterized in that, The feature set is input into a pre-trained hybrid prediction model, and the output prediction results of the temporal deep learning model and the ensemble learning model in the hybrid prediction model are fused, including: The feature set is simultaneously input into the temporal deep learning model and the ensemble learning model in the pre-trained hybrid prediction model; Obtain the first prediction result output by the temporal deep learning model and the second prediction result output by the ensemble learning model; The first prediction result and the second prediction result are fused. The fusion method is to use both as input features and input them into a meta-learner for final prediction.

7. The method according to claim 6, characterized in that, The construction and training methods of the hybrid prediction model are as follows: Model architecture: The temporal deep learning model is a temporal convolutional network (TCN) or a Transformer model; the ensemble learning model is a LightGBM model; Training strategy: The temporal deep learning model and the ensemble learning model are trained independently using datasets that are strictly divided in chronological order to prevent future information leakage; Loss function: When training the time-series deep learning model, the Huber loss function or the quantile loss function is used; Result fusion: The prediction results output by the two models are fused using a linear regression model as a meta-learner.

8. An intelligent prediction system for industrial electricity consumption, characterized in that, include: The data acquisition module is used to collect multi-source heterogeneous data, perform data fusion, cleaning and outlier processing on the multi-source heterogeneous data, so as to construct a preprocessed time series dataset, wherein the outlier processing includes generating outlier state label features. The feature extraction module is used to perform feature engineering on the preprocessed time series dataset and extract multiple types of features, including lag features, moving statistics features, trend features, periodic features and external causal features. The feature processing module is used to standardize the numerical features among the multiple types of features and combine them with the categorical features to construct a feature set for model input. The model prediction module is used to input the feature set into the pre-trained hybrid prediction model, and to fuse the output prediction results of the time-series deep learning model and the ensemble learning model in the hybrid prediction model, and output the industrial electricity load point prediction and interval prediction based on the fusion result. Specifically, based on the feature set generated in historical periods, and using electricity load as a label, the hybrid prediction model is trained to obtain a pre-trained hybrid prediction model; the hybrid prediction model includes a time-series deep learning model and an ensemble learning model. The multi-source heterogeneous data includes electricity load data, production and operation data, environmental data, and time calendar data.

9. An intelligent predictive device for industrial power consumption, characterized in that, include: Memory used to store intelligent prediction programs for industrial power consumption; A processor is configured to implement the steps of the industrial power consumption intelligent prediction method as described in any one of claims 1-7 when executing the industrial power consumption intelligent prediction program.

10. A computer-readable storage medium storing a computer program, characterized in that, The readable storage medium stores an intelligent industrial power consumption prediction program, which, when executed by a processor, implements the steps of the intelligent industrial power consumption prediction method as described in any one of claims 1-7.