Industrial electricity monthly maximum demand control method and system based on production schedule

CN122801207APending Publication Date: 2026-09-22HEXING ELECTRICAL CO LTD +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610715243.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-22
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0004]然而,上述技术在大型工业场景的实际应用中存在显著的缺陷:首先,现有方案在处理生产排程数据时,普遍将其与环境参数并列作为历史观测量输入模型进行外推,预测时域严重受限(通常不超过24小时),无法在月初提前识别月末可能出现的月度极值,电力调度能力较差;其次,现有技术档案缺乏对生产计划表中非结构化字段的处理能力,使得大量信息无法被模型直接利用,往往需要人工二次加工,引入了额外成本

Benefits of technology

[0029]1.本发明通过对包含多类型混合字段的生产计划表进行系统性编码映射,并将其与静态协变量、历史数据共同作为未来已知输入和历史已知输入,输入至时序融合Transformer模型中,实现了对生产计划数据的前瞻性时序建模;该方法在保留电力历史负荷数据时序特性的同时,利用解码器实现了生产计划特征的融合,显著提升了模型对未来一段目标时间的负荷预测曲线及月度最大需预测量数值的预测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122801207A_ABST
    Figure CN122801207A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of industrial electricity monthly maximum demand control method and system based on production schedule.The method comprises: obtaining historical load data, static metadata and production schedule containing multiple types of mixed fields;Systematic encoding mapping is carried out on the mixed field, and production plan features are generated;Static covariants are generated based on static metadata;Production plan features are timestamped with historical load data, to generate historical known input and future known input;Static covariants, historical known input and future known input are input into the time series fusion Transformer model;Prospective time series modeling is carried out by the decoder inside the model, and the load prediction curve of a target time in the future is output;The prediction value of monthly maximum demand and the time when the prediction peak value appears are extracted from the load prediction curve, and the total target reduction power of exceeding the set demand control threshold is calculated;Power dispatching control is carried out based on the total target reduction power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent demand-side management technology for industrial electricity, specifically to a method and system for controlling the monthly maximum demand for industrial electricity based on a production schedule. Background Technology

[0002] In industrial electricity billing systems, demand-based charges are a significant component of electricity expenses for large industrial users. Power companies charge based on the user's maximum actual demand for the month; the higher the peak demand, the greater the cost. Therefore, accurately predicting the timing and magnitude of monthly peak demand and implementing peak-shaving measures in advance has become a core requirement for industrial enterprises to reduce electricity costs. However, the industrial production environment is complex and volatile, with significant load fluctuations. Accurately capturing peak demand on a monthly basis and implementing targeted power dispatch is extremely difficult.

[0003] In existing technologies, the prediction and control of monthly maximum industrial electricity demand is mainly achieved through two technical means. The first is a time-series prediction method based on historical load data. This method primarily uses models such as ARIMA and LSTM to extrapolate historical electricity consumption patterns to predict monthly maximum demand. It offers a certain level of accuracy when production plans are stable and is characterized by its simplicity and low management cost. The second is a multi-modal data fusion prediction method. This method uses environmental parameters, production scheduling data, and electricity pricing policies as auxiliary features, inputting them along with historical load data into a hybrid model for prediction. Compared to the first approach, this method offers improved robustness.

[0004] However, the above technologies have significant drawbacks in practical applications in large-scale industrial scenarios: First, when processing production scheduling data, existing solutions generally treat it alongside environmental parameters as historical observations for extrapolation into the model, severely limiting the prediction time domain (usually no more than 24 hours), making it impossible to identify potential monthly extreme values ​​at the end of the month in advance, resulting in poor power dispatch capabilities; Second, existing technical files lack the ability to process unstructured fields in production plan tables, making it impossible for a large amount of information to be directly used by the model, often requiring manual secondary processing and introducing additional costs. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for controlling the monthly maximum demand of industrial electricity based on a production schedule. This method has the advantages of a long prediction time domain and high forward-looking prediction accuracy; it has the ability to process unstructured fields in the production schedule, and can automatically link production scheduling when energy storage capacity is limited to achieve dual-path collaborative peak shaving; it can proactively reduce the monthly electricity demand cost of industrial users and improve the operating profit of enterprises.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] In a first aspect, the present invention provides a method for controlling the monthly maximum demand for industrial electricity based on a production schedule, the method comprising:

[0008] S1. Obtain historical load data, static metadata, and a production plan table containing multiple types of mixed fields from the enterprise information system; perform systematic encoding and mapping on the mixed fields, and generate production plan features;

[0009] S2. Generate static covariates based on the static metadata; align the production plan features with the historical load data using timestamps to generate historical known inputs and future known inputs;

[0010] S3. Input the static covariates, historical known inputs, and future known inputs into a pre-trained temporal fusion Transformer model; perform forward-looking temporal modeling through the decoder inside the temporal fusion Transformer model, and output the load prediction curve for a target time period in the future;

[0011] S4. Extract the predicted value of the monthly maximum demand and the predicted time of the peak from the load forecast curve;

[0012] S5. Based on the predicted value of the maximum monthly demand and the time when the predicted peak occurs, calculate the total target power reduction exceeding the set demand control threshold; and perform power dispatch control based on the total target power reduction.

[0013] As a preferred embodiment of the present invention, the steps of the power dispatch control include:

[0014] Assess the available discharge capacity of the existing energy storage system. If the available discharge capacity is greater than or equal to the total target power reduction, generate energy storage charging and discharging scheduling instructions and send them to the energy storage management system.

[0015] If the available discharge capacity is less than the total target power reduction, then production scheduling optimization control will be implemented.

[0016] As a preferred embodiment of the present invention, the method for optimizing and controlling the production scheduling is specifically as follows:

[0017] During off-peak periods, find available windows that meet the continuous duration requirement, migrate high-energy-consuming processes that overlap with the predicted peak time, generate optimized scheduling suggestions, and feed them back to the manufacturing execution system.

[0018] As a preferred embodiment of the present invention, the temporal fusion Transformer model includes a variable selection network, a gated residual network, an LSTM encoder-decoder, an interpretable multi-head attention mechanism, and a quantile output layer, which are connected in series.

[0019] Secondly, this invention provides a monthly maximum demand control system for industrial electricity based on a production schedule, the system comprising:

[0020] The data acquisition module is used to acquire historical load data, static metadata, and production plan tables containing multiple types of mixed fields from the enterprise information system;

[0021] The feature encoding module is used to systematically encode and map the mixed fields to form production plan features; it is also used to generate static covariates based on the static metadata; and to align the production plan features with the historical load data using timestamps to generate historical known inputs and future known inputs.

[0022] The prediction inference module is used to perform inference and prediction on the input static covariates, historical known inputs and future known inputs, and output the load prediction curve for a target time period in the future;

[0023] The decision control module is used to extract the predicted value of the monthly maximum demand and the time when the predicted peak occurs from the load forecast curve; and to calculate the total target power reduction exceeding the set demand control threshold based on the predicted value of the monthly maximum demand and the time when the predicted peak occurs; and to perform power dispatch control based on the total target power reduction.

[0024] As a preferred embodiment of the present invention, the data acquisition module includes a power load acquisition unit, a production plan import unit, and a metadata input unit; the power load acquisition unit is used to acquire historical load data and perform preprocessing; the production plan import unit is used to import the production plan table; and the metadata input unit is used to write the static metadata.

[0025] As a preferred embodiment of the present invention, the feature encoding module includes a production planning encoding unit, a static covariate encoding unit, and a time-series feature alignment unit.

[0026] As a preferred embodiment of the present invention, the prediction inference module includes a temporal fusion Transformer model module and a peak extraction unit; the temporal fusion Transformer model module includes a variable selection network layer, a gated residual network layer, an LSTM encoder-decoder layer, an interpretable multi-head attention mechanism layer, and a quantile output layer.

[0027] As a preferred embodiment of the present invention, the decision control module includes an energy storage scheduling unit and a production scheduling optimization unit.

[0028] In summary, the present invention has the following beneficial effects:

[0029] 1. This invention achieves forward-looking time-series modeling of production plan data by systematically encoding and mapping a production plan table containing multiple types of mixed fields, and then using it together with static covariates and historical data as known inputs for the future and known inputs for the past, and inputting them into a time-series fusion Transformer model. This method preserves the time-series characteristics of historical power load data while using a decoder to fuse production plan features, significantly improving the model's prediction accuracy for the load forecast curve and the monthly maximum demand forecast value for a target period in the future.

[0030] 2. This invention constructs a temporal fusion Transformer model, which suppresses irrelevant noise and guides the model to focus on key temporal features through the underlying network. At the same time, it uses the quantile output layer to directly quantize the prediction interval. Only one inference is needed on the fused data to extract the time when the predicted peak occurs, without the need for manual secondary data processing.

[0031] 3. The dual-path power dispatch control scheme provided by this invention can be directly applied to the energy storage management system and manufacturing execution system of large industrial users. By evaluating the available discharge capacity, this method can adaptively start production scheduling optimization control when energy storage is limited. By finding available windows that meet the continuous duration requirements during off-peak periods and migrating high-energy-consuming processes, it breaks through the constraints of single energy storage hardware on the peak shaving effect and significantly improves the engineering practicality and economy of existing industrial power management methods. Attached Figure Description

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

[0033] Figure 1 This is a flowchart of the method of the present invention;

[0034] Figure 2 This is a system structure block diagram of the present invention;

[0035] Figure 3 This is a schematic diagram of the temporal fusion Transformer model in this invention. Detailed Implementation

[0036] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the various examples. For example, the described methods may be performed in a different order than described, and steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in other examples.

[0037] Example 1

[0038] like Figure 1 As shown in the figure, this embodiment further elaborates on the method for controlling the monthly maximum demand of industrial electricity based on a production schedule provided by the present invention. The method includes:

[0039] S1. Obtain historical load data, static metadata, and a production plan table containing multiple types of mixed fields from the enterprise information system; perform systematic coding and mapping on the mixed fields, and generate production plan features.

[0040] The enterprise information system is either an enterprise MES or ERP system. Historical load data, static metadata, and production plan tables containing multiple types of mixed fields are obtained from the enterprise information system. Systematic coding and mapping are performed on the mixed fields in the production plan tables that are difficult to calculate directly.

[0041] The specific rule is as follows: categorical fields such as shift number and operating mode are mapped to integer indices through a label encoder, and then converted into fixed-dimensional vectors through the Embedding layer.

[0042] Text description fields such as maintenance instructions are mapped to enumerated categories through keyword matching. For example, "planned maintenance" is mapped to 0, "temporary shutdown" is mapped to 1, "normal operation" is mapped to 2, and "standby" is mapped to 3.

[0043] Split the time period field into start hour. and duration (Minutes) Two values, calculated as follows:

[0044]

[0045]

[0046] The Boolean field (device on / off status) is directly retained as a 0 / 1 value;

[0047] After coding, align the timestamps of the production plan table with the timestamps of power acquisition, unifying them to a 15-minute granularity; and generate standardized production plan features. ,in The total number of time steps. This represents the encoded feature dimension.

[0048] S2. Generate static covariates based on static metadata; align production plan features with historical load data using timestamps to generate historical known inputs and future known inputs.

[0049] static covariates Includes time-unchanging metadata such as factory number, transformer capacity, and industry type. Historical known input. Includes the past The actual load observation values ​​at each time step and the historical production records for the corresponding time period, among which (Corresponds to 7 days x 96 steps).

[0050] Future known input Includes the future Production planning characteristics at each time step ,in (Corresponds to 30 days x 96 steps).

[0051] S3. Input the static covariates, historical known inputs, and future known inputs into the pre-trained temporal fusion Transformer model; perform forward-looking temporal modeling through the decoder inside the temporal fusion Transformer model, and output the load prediction curve for a target time period in the future.

[0052] The Temporal Fusion Transformer (TFT) model is a multi-view temporal prediction model that can simultaneously process heterogeneous input data and provide interpretable prediction results. Unlike the standard Transformer, this invention modularizes the input structure for the TFT temporal prediction task, classifying all input variables into three categories based on their temporal attributes: static covariates that do not change over time, historically known inputs from past times, and future known inputs whose future times are determined.

[0053] Based on this architectural feature, the present invention maps fields such as shift schedule, equipment start-up and shutdown plan, and planned output in the production plan to future known input channels, so that the model can directly use the production arrangement information of the whole month when making predictions, thereby realizing forward-looking prediction of the monthly load curve.

[0054] like Figure 3As shown, the temporal fusion Transformer model includes a variable selection network, a gated residual network, an LSTM encoder-decoder, an interpretable multi-head attention mechanism, and a quantile output layer, which are connected in series.

[0055] The variable selection network calculates soft attention weights for all input variables at each time step, automatically filtering effective features related to demand forecasting and outputting importance scores for each variable, providing a basis for interpretability analysis. The gated residual network performs nonlinear transformations on each feature, with a built-in gating mechanism dynamically deciding whether to skip the transformation, effectively suppressing noise introduced by irrelevant features. The LSTM encoder-decoder performs local time-series modeling on historical observation sequences and future planning sequences, capturing short-range dependencies and initializing the hidden state with a static context vector, enabling the model to perceive static attributes at the factory level. The interpretable multi-head attention mechanism models long-range time-series dependencies based on the LSTM output, with each attention head sharing the Value matrix, allowing attention weights to be directly interpreted as which historical periods the model prioritizes when predicting peak values. The quantile output layer simultaneously outputs prediction curves for the P10, P50, and P90 quantiles, providing the uncertainty range of peak demand and offering both conservative and aggressive strategy guidelines for energy storage scheduling.

[0056] More specifically, the input features on the historical and future sides ( and The Variable Selection Network (VSN) is applied to calculate the soft attention weights of each input variable at each time step, and the effective features related to demand prediction are automatically selected.

[0057] For time step place Input variables Each variable first undergoes an independent GRN transformation:

[0058]

[0059] The variable weights are calculated from the concatenated input using a weighted GRN:

[0060]

[0061] The weighted fusion output is:

[0062]

[0063] Weight vector This refers to the importance score of each variable, used to explain which production planning fields contribute the most to demand forecasting.

[0064] static covariates After encoding by a gated residual network (GRN), a static context vector is generated. Used to initialize subsequent modules:

[0065]

[0066] in, For hidden layer activation, After passing through a linear layer, it is split into a value vector and a gate vector. For the Sigmoid function, For element-wise multiplication, This is the residual projection matrix.

[0067] The LSTM encoder processes the feature sequence filtered by VSN from the historical side, while the LSTM decoder processes the feature sequence from the future side. Both share a hidden state to convey historical information.

[0068]

[0069]

[0070] The initial hidden state is generated from the static context vector:

[0071] , ; and For linear projection layers;

[0072] The outputs of the splicing encoder and decoder are then connected via a GRN gated jump connection:

[0073]

[0074] Using the decoder output as the query, the complete sequence Perform interpretable multi-head self-attention computation. Each attention head shares the Value matrix. , No. The attention weights for each attention head are:

[0075]

[0076] in, , ;

[0077] The interpretable attention weights are obtained by averaging across all heads:

[0078]

[0079] The attention output is processed by residual connections and LayerNorm, and then by position-feedforward GRN:

[0080]

[0081] right At each time step, through Multiple independent linear output heads simultaneously predict multiple quantiles:

[0082]

[0083] During training, quantile loss is used to jointly optimize all quantiles:

[0084]

[0085] in, For batch size, This represents the actual load value.

[0086] S4. Extract the predicted value of the monthly maximum demand and the predicted time of the peak from the load forecast curve.

[0087] After the forecast is completed, the monthly maximum demand forecast value and the time of the forecast peak are extracted from the load forecast curve (P50 median curve):

[0088]

[0089]

[0090] This is a forecast of the maximum monthly demand (kW). To predict when the peak will occur.

[0091] S5. Based on the predicted value of the maximum monthly demand and the time when the predicted peak occurs, calculate the total target power reduction that exceeds the set demand control threshold; and perform power dispatch control based on the total target power reduction.

[0092] Based on the extracted predicted monthly maximum demand and the predicted peak time, combined with the demand control threshold set by the enterprise... Calculate the total target power reduction that exceeds the threshold. The total target power reduction is the sum of the power that needs to be reduced.

[0093] Power dispatch and control are then carried out through two paths:

[0094] One approach is energy storage charging and discharging scheduling. Specifically, the available discharge capacity of the existing energy storage system is assessed. If the available discharge capacity is greater than or equal to the total target power reduction, energy storage charging and discharging instructions are directly generated (e.g., charging 4 hours before the peak and discharging during the peak period) and sent to the energy storage management system to complete peak shaving.

[0095] During execution, for example, by identifying P50 curves that exceed the demand control threshold. Time period set Calculate the total target power reduction:

[0096]

[0097] in, Charge is scheduled 4 hours (15 minutes) before the peak (16 time steps), and discharge is performed on demand during the peak period to reduce the actual demand to the demand control threshold. the following.

[0098] The second approach is production scheduling optimization control, specifically, when the energy storage system has available discharge capacity... Limited, meaning the amount of electricity reduced is less than the total target. When the system triggers linkage control, it searches for available windows that meet the continuous duration requirements during the low period of the predicted load curve, moves high-energy-consuming processes that overlap with the predicted peak time to the low window, generates optimized scheduling suggestions and feeds them back to the manufacturing execution system, thereby reducing the peak from the power consumption side.

[0099] During execution, when At that time, the production scheduling optimization module is activated to identify the set of off-peak periods in the predicted load curve. Traverse the production plan in descending order of rated power. Overlapping processes, move them to The system selects available windows that meet the continuous duration requirement and generates optimized production scheduling suggestions.

[0100] Example 2

[0101] like Figure 2 As shown in the figure, this embodiment further elaborates on the specific architecture of a monthly maximum demand control system for industrial electricity based on a production schedule provided by the present invention. The system includes:

[0102] The data acquisition module is used to acquire historical load data, static metadata, and production plan tables containing multiple types of mixed fields from the enterprise information system;

[0103] The feature encoding module is used to systematically encode and map mixed fields into production planning features; it is also used to generate static covariates based on static metadata; and it timestamps the production planning features with historical load data to generate historical known inputs and future known inputs.

[0104] The predictive inference module is used to infer and predict the input static covariates, historical known inputs, and future known inputs, and output the load prediction curve for a target time period in the future;

[0105] The decision control module is used to extract the predicted value of the monthly maximum demand and the time when the predicted peak occurs from the load forecast curve; and to calculate the total target power reduction for the amount of electricity exceeding the set demand control threshold based on the predicted value of the monthly maximum demand and the time when the predicted peak occurs; and to perform power dispatch control based on the total target power reduction.

[0106] In addition, the data acquisition module includes a power load acquisition unit, a production plan import unit, and a metadata input unit; the power load acquisition unit is used to collect historical load data and perform preprocessing; the production plan import unit is used to import production plan tables; and the metadata input unit is used to write static metadata.

[0107] The feature encoding module includes a production planning encoding unit, a static covariate encoding unit, and a time-series feature alignment unit.

[0108] The prediction inference module is the core module of this system, which includes a temporal fusion Transformer model module and a peak extraction unit. The temporal fusion Transformer model module includes a variable selection network layer, a gated residual network layer, an LSTM encoder-decoder layer, an interpretable multi-head attention mechanism layer, and a quantile output layer.

[0109] The decision control module includes an energy storage scheduling unit and a production scheduling optimization unit. These are two parallel peak shaving control units, which are automatically selected or coordinated based on whether the energy storage capacity is sufficient.

[0110] Example 3

[0111] This embodiment combines real data obtained from practical applications of this method to provide a specific application case, further demonstrating the excellent performance of this method in the process of enterprise monthly demand forecasting and peak shaving control.

[0112] A large machinery manufacturing enterprise has multiple production lines, including a casting workshop, a machining workshop, a heat treatment workshop, and an assembly workshop. The transformer capacity is 10,000 kVA. It operates under the large industrial electricity price, with demand-based electricity charges calculated based on the actual maximum monthly demand at a unit price of 30 yuan / kW·month. In March 2024, the enterprise's maximum monthly demand reached 4,800 kW, with demand-based electricity expenses amounting to 144,000 yuan, accounting for 25% of its total electricity costs.

[0113] First, data collection and preprocessing were performed. Historical load data for 14 months, from January 2023 to February 2024, was collected from the enterprise's AMI system at a granularity of 15 minutes, totaling 40,320 time steps. Then, a complete production plan for March 2024 was exported from the enterprise's MES system, including the following fields: date, shift (morning / afternoon / night shift), production line name, equipment start / stop status (0 / 1), operating mode (full load / half load / standby), planned output (units), maintenance instructions (normal operation / planned maintenance / temporary shutdown), and start and end times of operation.

[0114] Next, the production planning coding module performs unified coding on the mixed-type fields. Specifically, the shift field is mapped to an integer index via a label encoder: morning shift → 0, afternoon shift → 1, evening shift → 2, and subsequently converted to a 4-dimensional vector via the embedding layer within the model; the operating mode field is mapped to: full load → 0, half load → 1, standby → 2, and converted to a 3-dimensional vector via embedding; the maintenance description field is mapped to an enumerated category via keyword matching: normal operation → 2, planned maintenance → 0, temporary shutdown → 1; the start and end times of operation are split into two numerical features: the start hour and the duration, for example, "08:00-16:00" is converted to a start hour of 8.0 and a duration of 480 minutes; the equipment start / stop status is directly retained as a 0 / 1 value.

[0115] The static covariates include the factory number (mapped to a 4-dimensional vector via embedding), the transformer capacity of 10000kVA (normalized to 1.0), and the industry type "machinery manufacturing" (mapped to a 3-dimensional vector via embedding). After encoding, the production plan features and historical load data are aligned to a 15-minute granularity by timestamp, constructing historical known inputs (past 7 days, 672 time steps) and future known inputs (future 30 days, 2880 time steps).

[0116] Next, model training and validation were performed. Data from January 2023 to January 2024 (13 months) was used as the training set, and data from February 2024 was used as the validation set. A sliding window method was used to construct the training samples. The hyperparameters of the TFT model were configured as follows: hidden layer dimension 128, LSTM layers 2, attention heads 4, dropout rate 0.1, quantiles [0.1, 0.5, 0.9]; the Adam optimizer was used with a learning rate of 1e. -3 Batch size 16, training for 50 epochs.

[0117] After training, the model performance was evaluated on the validation set. The mean absolute error (MAE) of the monthly load forecast curve was 120 kW, the root mean square error (RMSE) was 180 kW, the mean absolute percentage error (MAPE) was 3.8%, and the coefficient of determination R0 was [missing value].2 The error is 0.92; the monthly maximum demand prediction error is 35kW; the peak occurrence time prediction error is 45 minutes; and the peak recognition rate (the proportion of predicted peak times falling within the actual peak ± 1 hour window) is 88%.

[0118] The verification results show that the model's prediction accuracy meets the requirements for engineering applications.

[0119] Next, a monthly forecast for March 2024 is performed. On March 1, 2024, the system reads historical load data for the past 7 days (February 23 to February 29) and production plans for the next 30 days (March 1 to March 30), and inputs them into the trained TFT model for forecasting. The model outputs three load forecast curves: P10, P50, and P90, each containing 2880 time steps (30 days × 96 steps / day).

[0120] The predicted maximum monthly demand was extracted from the P50 curve. The predicted maximum demand is 4650kW, and the predicted peak time is 14:30 on March 18th. The maximum demand of the P10 curve is 4350kW, and the maximum demand of the P90 curve is 4950kW. The predicted range is 600kW, reflecting the uncertainty of the peak value.

[0121] Interpretability analysis shows that the top 5 most important known input variables are: equipment start / stop status in the foundry workshop (weight 0.28), operating mode in the machining workshop (weight 0.22), planned output in the heat treatment workshop (weight 0.18), shift schedule (weight 0.15), and maintenance instructions (weight 0.12).

[0122] The time-series attention heatmap shows that when predicting the peak on March 18, the model mainly referenced the load patterns of two historical periods, February 25 and March 11, which had similar production arrangements to March 18 (the foundry and machining workshops were operating at full capacity simultaneously).

[0123] Finally, a dual-path peak-shaving strategy is generated. The demand control thresholds set by the enterprise are known. The capacity is 3800kW, which is 850kW less than the predicted peak of 4650kW; the energy storage system configured by the company has a capacity of 1000kWh and a rated power of 500kW.

[0124] Path 1: The system identified 32 time steps (8 hours) in the P50 curve where the power output exceeded 3800 kW, mainly concentrated between 12:00 and 20:00 on March 18th. The total required discharge was calculated to be 850 kW × 8 h = 6800 kWh, far exceeding the energy storage capacity of 1000 kWh, thus determining that the energy storage capacity was insufficient.

[0125] The system generates an energy storage dispatch plan, scheduling charging from 08:00 to 12:00 on March 18th (16 time steps) with a charging power of 250kW and a cumulative charging amount of 1000kWh; and scheduling discharging from 12:00 to 16:00 on March 18th (16 time steps) with a discharging power of 500kW and a cumulative discharging amount of 2000kWh (due to capacity limitations, only 1000kWh can actually be discharged). Energy storage dispatch can reduce demand by approximately 500kW, with approximately 350kW remaining above the threshold.

[0126] Path Two: Due to insufficient energy storage capacity, the system automatically activates the production scheduling optimization unit, identifying the off-peak periods as 00:00 to 06:00 and 22:00 to 24:00 on March 18th, with load levels below 3000kW. The system then iterates through the production plans in descending order of rated power, identifying two production lines—the foundry workshop (rated power 800kW) and the heat treatment workshop (rated power 600kW)—operating between 12:00 and 20:00 on March 18th, overlapping with the predicted peak periods.

[0127] The system generated optimization suggestions, shifting the production tasks of the foundry workshop from 14:00 to 18:00 on March 18 (4 hours) to 22:00 on March 18 to 02:00 the next day (4 hours), and shifting the production tasks of the heat treatment workshop from 16:00 to 20:00 on March 18 (4 hours) to 00:00 to 04:00 on March 19 (4 hours). The optimized production schedule can further reduce demand by approximately 400kW.

[0128] In the above process, after the dual-path peak shaving action based on this method is executed, the implementation effect is evaluated.

[0129] The company adopted the system-generated dual-path peak shaving scheme and executed the planned energy storage charging and discharging schedule on March 18th, migrating the production tasks of the casting and heat treatment workshops to off-peak hours. On March 31st, the system read the actual load data for March from the AMI system, showing that the actual maximum demand was 3750kW, occurring at 13:45 on March 18th. This represents a reduction of 900kW compared to the predicted peak of 4650kW, a reduction of 19.4%. Economic benefit analysis: The electricity cost for March was 3750kW × 30 yuan / kW·month = 112,500 yuan, a saving of 31,500 yuan compared to the February demand cost of 144,000 yuan, a reduction of 21.9%, with an annualized saving of approximately 378,000 yuan in demand costs. Considering the investment cost of the energy storage system is about 2 million yuan and the investment payback period is about 5.3 years, if the production scheduling optimization path is not adopted and only energy storage dispatch is used, the maximum monthly demand can only be reduced to 4150kW, the demand electricity cost is 124,500 yuan, the annualized savings are only 234,000 yuan, and the investment payback period is extended to 8.5 years. It can be seen that the synergistic cooperation of the two paths can shorten the investment payback period by 37%, and the economic benefits are significant.

[0130] Interpretability verification: Post-event analysis showed that the actual peak time on March 18th deviated from the predicted time by only 15 minutes, indicating accurate peak identification; the ranking of variable importance matched the actual situation, and the simultaneous full-load operation of the casting workshop and machining workshop was indeed the main reason for the peak; the company's management expressed their approval of the system's prediction accuracy and interpretability, and decided to promote the system to other production bases.

[0131] In summary, this invention achieves a complete technical closed loop from production plan input to monthly maximum demand forecasting and then to proactive peak shaving control.

[0132] In terms of prediction accuracy, the model controls the mean absolute error (MAE) of the monthly load curve within 3% to 5%, the prediction error of the monthly maximum demand value is less than 50kW, the prediction error of the peak occurrence time is controlled within 1 hour, and the peak recognition rate (the proportion of the predicted peak time falling within the actual peak ± 1 hour window) reaches more than 85%.

[0133] In terms of interpretability, the system outputs a ranking of the contribution of each production planning field to demand forecasting, quantifies the influence weight of factors such as shift scheduling, equipment start-up and shutdown status, and planned output, and uses a time-series attention heatmap visualization model to focus on historical periods when predicting peak values.

[0134] In terms of control effectiveness, the energy storage dispatch unit can reduce the maximum monthly demand by 10% to 20%. When the energy storage capacity is insufficient, the production scheduling optimization unit can further reduce it by 5% to 10%. The two paths working together can achieve an economic benefit of reducing monthly demand electricity costs by 15% to 30%.

[0135] Therefore, it can be seen that this method has high practicality and wide applicability.

[0136] Several embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technological improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for controlling the monthly maximum demand of industrial electricity based on a production schedule, characterized in that the method... include: S1. Obtain historical load data, static metadata, and a production plan table containing mixed fields of multiple types from the enterprise information system; The hybrid fields are systematically encoded and mapped to generate production plan features; S2. Generate static covariates based on the static metadata; The production plan features are timestamped with the historical load data to generate historical known inputs and future known inputs. S3. Input the static covariates, historical known inputs, and future known inputs into a pre-trained temporal fusion Transformer model; perform forward-looking temporal modeling through the decoder inside the temporal fusion Transformer model, and output the load prediction curve for a target time period in the future; S4. Extract the predicted value of the monthly maximum demand and the predicted time of the peak from the load forecast curve; S5. Based on the predicted value of the maximum monthly demand and the time when the predicted peak occurs, calculate the total target power reduction exceeding the set demand control threshold; and perform power dispatch control based on the total target power reduction.

2. The method for controlling the monthly maximum demand of industrial electricity based on a production schedule according to claim 1, characterized in that, The steps of the power dispatch control include: Assess the available discharge capacity of the existing energy storage system. If the available discharge capacity is greater than or equal to the total target power reduction, generate energy storage charging and discharging scheduling instructions and send them to the energy storage management system. If the available discharge capacity is less than the total target power reduction, then production scheduling optimization control will be implemented.

3. The method for controlling the monthly maximum demand of industrial electricity based on a production schedule according to claim 2, characterized in that, The specific method for optimizing and controlling the production scheduling is as follows: During off-peak periods, find available windows that meet the continuous duration requirement, migrate high-energy-consuming processes that overlap with the predicted peak time, generate optimized scheduling suggestions, and feed them back to the manufacturing execution system.

4. The method for controlling the monthly maximum demand of industrial electricity based on a production schedule according to claim 1, characterized in that, The temporal fusion Transformer model comprises a variable selection network, a gated residual network, an LSTM encoder-decoder, an interpretable multi-head attention mechanism, and a quantile output layer, which are connected in series.

5. A monthly maximum demand control system for industrial electricity based on a production schedule, characterized in that the system... include: The data acquisition module is used to acquire historical load data, static metadata, and production plan tables containing multiple types of mixed fields from the enterprise information system; The feature encoding module is used to systematically encode and map the hybrid fields to form production plan features; it is also used to generate static covariates based on the static metadata. The production plan features are timestamped with the historical load data to generate historical known inputs and future known inputs. The prediction inference module is used to perform inference and prediction on the input static covariates, historical known inputs and future known inputs, and output the load prediction curve for a target time period in the future; The decision control module is used to extract the predicted value of the monthly maximum demand and the time when the predicted peak occurs from the load forecast curve; and to calculate the total target power reduction exceeding the set demand control threshold based on the predicted value of the monthly maximum demand and the time when the predicted peak occurs; and to perform power dispatch control based on the total target power reduction.

6. The monthly maximum demand control system for industrial electricity based on a production schedule as described in claim 5, characterized in that, The data acquisition module includes a power load acquisition unit, a production plan import unit, and a metadata input unit; The power load acquisition unit is used to collect historical load data and perform preprocessing. The production plan import unit is used to import the production plan table; The metadata input unit is used to write the static metadata.

7. The monthly maximum demand control system for industrial electricity based on a production schedule as described in claim 5, characterized in that, The feature encoding module includes a production planning encoding unit, a static covariate encoding unit, and a time-series feature alignment unit.

8. The monthly maximum demand control system for industrial electricity based on a production schedule according to claim 5, characterized in that, The prediction inference module includes a temporal fusion Transformer model module and a peak extraction unit; the temporal fusion Transformer model module includes a variable selection network layer, a gated residual network layer, an LSTM encoder-decoder layer, an interpretable multi-head attention mechanism layer, and a quantile output layer.

9. The monthly maximum demand control system for industrial electricity based on a production schedule as described in claim 5, characterized in that, The decision control module includes an energy storage scheduling unit and a production scheduling optimization unit.