Lightweight manufacturing enterprise cluster energy consumption situation real-time prediction method, equipment and medium

By decomposing the energy consumption status sequence into energy consumption patterns and periodic components, and using a lightweight model structure for prediction, the complexity of real-time prediction of energy consumption status in manufacturing enterprise clusters is solved, achieving efficient and real-time energy consumption status prediction and supporting energy management decisions.

CN121835978APending Publication Date: 2026-04-10CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies struggle to provide accurate and real-time energy consumption forecasts in manufacturing enterprise clusters, especially in industrial environments where computing and resources are limited. Existing models are complex and fail to meet real-time requirements.

Method used

A lightweight real-time energy consumption forecasting method for manufacturing enterprise clusters is adopted. The energy consumption status sequence is decomposed into energy consumption pattern components and periodic components through trend decomposition module and surplus decomposition module. These components are processed separately using a first-order linear layer and integrated through a sequence fusion module to construct a lightweight real-time energy consumption forecasting network.

Benefits of technology

It significantly reduces the computational complexity of model training and prediction processes, enabling real-time energy consumption forecasts at the minute or even second level, maintaining high accuracy and reliability, and supporting energy management decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835978A_ABST
    Figure CN121835978A_ABST
Patent Text Reader

Abstract

The invention provides a lightweight manufacturing enterprise cluster energy consumption situation real-time prediction method and device and a medium, and relates to the technical field of industrial big data and intelligent manufacturing, and the method comprises the steps: collecting the historical power data of each enterprise in a cluster, and constructing a cluster overall power consumption data set; a sliding time window including an input step size, an output step size, and a bias is defined. And training a dedicated prediction network based on the data set and a sliding window. The network comprises a trend decomposition module, a margin decomposition module and a sequence fusion module. The trend module extracts energy consumption mode components through symmetrical filling and mean pooling and outputs mode information through a linear layer. The margin module subtracts the original sequence from the mode component to obtain a periodic component, and outputs periodic information through a linear layer; and the fusion module adds the mode information and the periodic information to obtain a final prediction result. The network is trained by adopting a mean square difference loss function and a stochastic gradient descent algorithm until convergence, and model parameters are stored.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of industrial big data and intelligent manufacturing technology, specifically involving a method, equipment and medium for real-time prediction of energy consumption status of lightweight manufacturing enterprise clusters. Background Technology

[0002] With the transformation and upgrading of the manufacturing industry, manufacturing enterprise clusters, as a highly efficient form of industrial organization, have become a key target for regional energy management due to their high overall energy intensity and large total energy consumption. Accurate and real-time forecasting of the future energy consumption patterns of manufacturing enterprise clusters can provide crucial data support for grid dispatching, demand-side response, and the enterprises' own energy and carbon management, which is of great significance for ensuring energy supply security and improving energy efficiency.

[0003] Currently, some research in the field of energy consumption prediction focuses on energy consumption modeling for individual equipment, workshops, or factories. These methods typically construct models by correlating complex process parameters with energy consumption data. However, when applying these methods to larger-scale manufacturing enterprise clusters with more complex energy consumption patterns, significant limitations emerge. First, the energy consumption data of manufacturing enterprise clusters exhibits high heterogeneity and nonlinearity, stemming from differences in production rhythms and order execution patterns among different enterprises and equipment within the cluster. Second, while many existing data-driven methods (such as models based on deep recurrent neural networks, convolutional neural networks, or Transformers) may possess strong representational capabilities, their complex model structures introduce significant computational and inference costs, making it difficult to meet the stringent real-time requirements of engineering practice. Furthermore, existing technologies often prioritize improving prediction accuracy while neglecting that in resource-constrained industrial environments, the computational efficiency and real-time performance of the model are equally crucial factors determining its practical application. Summary of the Invention

[0004] This application provides a lightweight method, device, and medium for real-time prediction of energy consumption in manufacturing enterprise clusters to solve one of the aforementioned technical problems.

[0005] The technical solution adopted in this application is as follows: This application provides a lightweight method for real-time prediction of energy consumption in manufacturing enterprise clusters, including: Collect historical power data from multiple manufacturing enterprises in a manufacturing enterprise cluster to construct a dataset of overall electricity consumption for the cluster. Based on the overall power consumption dataset of the cluster, a sliding time window is defined, which includes an input step size, an output step size, and a bias. Using the cluster's overall electricity consumption dataset, a real-time energy consumption status prediction network is trained within the sliding time window. The real-time energy consumption status prediction network includes a trend decomposition module, a surplus decomposition module, and a sequence fusion module. The trend decomposition module is used to perform symmetric filling and one-dimensional mean pooling operations on the input energy consumption status sequence, extract the energy consumption pattern components, and output the energy consumption pattern information through a first-order linear layer. The residual decomposition module is used to calculate periodic components based on the energy consumption status sequence and the energy consumption mode components, and output periodic information through a first-order linear layer. The sequence fusion module is used to fuse the energy consumption pattern information and the periodic information to obtain the energy consumption situation prediction result; The real-time energy consumption prediction network is trained using the mean squared difference loss function and the stochastic gradient descent optimization algorithm until the model converges, and the final model parameters are saved.

[0006] According to one embodiment of this application, the trend decomposition module performs the following operations: The input energy consumption status sequence is symmetrically padded to obtain the padded sequence; Perform a one-dimensional mean pooling operation on the padded sequence to obtain the energy consumption mode component; The energy consumption mode components are input into a first-order linear layer, and energy consumption mode information is output.

[0007] According to one embodiment of this application, the step size of the symmetrical filling is calculated using the following formula:

[0008] in, Indicates the fill step size. Indicates the length of the input sequence. Hyperparameter representing the unit trend length of the sequence.

[0009] According to one embodiment of this application, the residual decomposition module performs the following operations: Subtract the input energy consumption status sequence from the energy consumption mode component to obtain the periodic component; Perform a one-dimensional mean pooling operation on the periodic components; The pooled periodic components are input into a first-order linear layer, and periodic information is output.

[0010] According to one embodiment of this application, the sequence fusion module obtains the energy consumption situation prediction result by adding the energy consumption pattern information to the periodic information.

[0011] According to one embodiment of this application, the power data is collected at a granularity of 15 minutes, in kilowatts.

[0012] According to one embodiment of this application, the training objective of the real-time energy situation prediction network is to minimize the mean squared difference loss function, and the optimization algorithm is stochastic gradient descent.

[0013] A second aspect of this application provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps described in the method.

[0014] A third aspect of this application provides an electronic device including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described.

[0015] Due to the adoption of the above technical solution, the beneficial effects achieved by this application are as follows: This application decomposes complex energy consumption status sequences into energy consumption pattern components and periodic components through trend decomposition and residual decomposition modules, transforming the complex nonlinear prediction problem into a linear modeling problem of two relatively stable components. Subsequently, each component is processed individually using an extremely lightweight model structure of a first-order linear layer, and finally integrated through a sequence fusion module. This "decomposition-linear modeling-fusion" strategy greatly simplifies the model structure and significantly reduces the computational complexity and resource consumption during model training and prediction, thereby meeting the engineering needs of manufacturing sites for real-time prediction of energy consumption status at the minute or even second level.

[0016] The trend decomposition module, through symmetrical filling and one-dimensional mean pooling operations, effectively extracts smooth, slowly changing trend information (energy consumption pattern component) from energy consumption data, reflecting the overall basic energy consumption level of the cluster. The residual decomposition module, by subtracting the energy consumption pattern component from the original sequence, accurately separates the periodic component, which contains short-term fluctuations and cyclical patterns. This decomposition method specifically characterizes the inherent heterogeneity of energy consumption data from manufacturing enterprise clusters, enabling the model to more clearly learn the core patterns of energy consumption trends and laying a solid foundation for subsequent accurate predictions.

[0017] By fusing separately predicted energy consumption patterns with periodic information through a sequence fusion module, the future energy consumption landscape is fully reconstructed. This solution does not simply sacrifice accuracy for speed; rather, it employs a novel modeling paradigm more suited to the characteristics of industrial data. Through targeted decomposition and modeling of the essential patterns in the data, it outputs high-precision and highly reliable prediction results while maintaining low computational consumption, effectively supporting energy management decisions. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating the lightweight real-time energy consumption prediction method for manufacturing enterprise clusters provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0019] Figure label: 810, Processor; 820, Communication interface; 830, Memory; 840, Communication bus. Detailed Implementation

[0020] To more clearly illustrate the overall concept of this application, a detailed explanation is provided below with reference to the accompanying drawings.

[0021] Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below. It should be noted that, unless otherwise specified, the embodiments of this application and the features thereof can be combined with each other.

[0022] In this application, unless otherwise expressly specified and limited, the "above" or "below" of the second feature can mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. In the description of this specification, references to terms such as "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples.

[0023] Example 1 like Figure 1 As shown, a real-time prediction method for energy consumption in lightweight manufacturing enterprise clusters includes: S100: Collect historical power data from multiple manufacturing enterprises in the manufacturing enterprise cluster to construct a dataset of overall power consumption for the cluster.

[0024] As mentioned above, collecting historical power data from multiple manufacturing enterprises within a manufacturing cluster is not simply a data aggregation process. Rather, it refers to the continuous and automatic recording of power parameters at preset, fixed time intervals using intelligent sensing devices (such as smart meters) deployed at key power supply nodes in each manufacturing enterprise within the cluster. The term "historical" here defines the temporal attribute of the data used for model training; it represents real-world operational data accumulated over a past period. "Power data" directly reflects the instantaneous intensity of electricity consumption and is the most direct and crucial physical quantity for analyzing energy consumption patterns.

[0025] The presence of multiple manufacturing enterprises within a manufacturing cluster clarifies the spatial dimension and source characteristics of the data. It emphasizes that the data collection object is not a single factory, but rather a geographically or logically aggregated entity comprised of a core enterprise and its numerous upstream, downstream, or parallel manufacturing enterprises. This ensures that the constructed dataset can encompass the diversity and complementarity of electricity consumption behaviors resulting from different production types and work schedules within the cluster, thus truly reflecting the overall, macro-level energy consumption patterns of the cluster.

[0026] Constructing a cluster-wide electricity consumption dataset is an integrated step in data processing. This means algebraically summing the instantaneous power data (usually in kilowatts (kW)) from all the aforementioned manufacturing enterprises along the same time dimension to obtain a single time series representing the total electricity load of the entire manufacturing enterprise cluster at that moment. This dataset is essentially a collection of cluster-level total power values ​​arranged in chronological order, providing a unique and unified data input for subsequent time series analysis.

[0027] For example, consider an "automobile manufacturing industrial cluster" located in an industrial park. This cluster includes a vehicle assembly plant (Company A), an engine manufacturing plant (Company B), an automotive seat factory (Company C), and a glass factory (Company D).

[0028] Data collection: Smart meters were installed at the main power inlets of four companies (A, B, C, and D). These meters automatically recorded instantaneous active power (unit: kW) every 15 minutes and transmitted the data remotely to a central data platform. The platform collected readings from all these meters over the past three years, forming four independent power time series corresponding to each company.

[0029] Construction: The data platform's processing unit adds up the power readings of companies A, B, C, and D at each 15-minute timestamp. For example, at a certain point in time, plant A consumes 1000kW, plant B 800kW, plant C 300kW, and plant D 400kW; then the "overall cluster power consumption data" at that moment is 2500kW. By repeating this operation for all historical time points, a completely new, single time-series dataset is generated, where each data point represents the total power load of the entire automotive manufacturing industry cluster at the corresponding time.

[0030] It should be noted that, in specific implementation scenarios, the "power data" can be expanded to include various electrical parameters such as active power, reactive power, and apparent power, based on the above scheme. The constructed dataset can accordingly be a "cluster-wide active power consumption dataset" or a "cluster-wide apparent power dataset," to support the prediction of the situation of different energy quality indicators.

[0031] In specific implementation scenarios, the concept of "electricity consumption dataset" can be extended to multiple energy forms based on the above scheme. For example, while collecting electricity data, or separately, data on gas consumption, water consumption, steam consumption, etc., from various enterprises within the cluster can also be collected, and "cluster-wide gas consumption dataset" and "cluster-wide comprehensive energy consumption dataset" can be constructed using the same method, making this method applicable to predicting the multi-energy comprehensive situation of the cluster.

[0032] In specific implementation scenarios, the "construction of a cluster-wide electricity consumption dataset" can further include multi-level aggregation steps, building upon the above approach. For example, several companies producing the same or similar products can be defined as a "sub-cluster," and electricity consumption datasets for each "sub-cluster" can be constructed first. Then, the datasets from each sub-cluster can be aggregated into a single dataset for the entire cluster. This hierarchical data processing approach helps in analyzing the structural energy consumption characteristics within the cluster.

[0033] In specific implementation scenarios, in addition to the above solutions, when constructing the dataset, metadata can be associated with the dataset besides pure numerical sequences. This metadata could include the time granularity of data collection (e.g., 1 minute, 1 hour), the cluster region identifier represented by the data, and the season or workday identifier corresponding to the data. This additional information can serve as auxiliary inputs or conditional variables for subsequent prediction models, further improving the contextual relevance and accuracy of the predictions.

[0034] S200. Based on the overall power consumption dataset of the cluster, define a sliding time window, which includes an input step size, an output step size, and a bias.

[0035] As mentioned above, this step is a crucial preprocessing and task definition stage in this scheme, transforming static time series data into dynamic supervised learning samples. Its core lies in systematically extracting a series of causally related "input-output" data pairs from continuous historical electricity consumption data using a sliding data window, thereby providing standardized training samples for the subsequent prediction model. Specifically, the "sliding time window" is a data segmentation strategy that moves gradually along the time axis with a fixed window length, extracting a continuous data segment from the sequence at each step. This window is clearly divided into two parts: the input step size defines the length of historical data over a past period used by the model for prediction, allowing the model to learn and capture historical energy consumption patterns; the output step size defines the length of data over a future period that the model needs to predict, representing the target of the prediction task; and the bias controls the step distance of each window slide, determining the degree of overlap between adjacent samples, thus affecting the number and diversity of generated samples. By precisely defining these three parameters, continuous electricity consumption time series were successfully transformed into a structured sample set that can be used to train a time series prediction model. The mapping relationship that the model needs to learn was clarified, namely, the prediction of a future electricity consumption series of a specific length from a historical electricity consumption series of a specific length.

[0036] For example, consider a specific industrial scenario. Suppose we have a data sequence of the total electricity consumption of an industrial park over the past year, with data granularity at 15-minute intervals. We need to train a model that can predict the electricity load for the next 6 hours based on historical data from the past 24 hours. In this scenario, we can define the input step size of the sliding time window as 96 (because 24 hours / 15 minutes = 96 data points) and the output step size as 24 (6 hours / 15 minutes = 24 data points). If the bias is set to 1, this means the window slides forward only one time step (i.e., 15 minutes) at a time. Then, when this window starts sliding from the beginning of the time series, the first sample will contain data from time points 1 to 96 as input, and data from time points 97 to 120 as the expected output label; the second sample will contain data from time points 2 to 97 as input, and data from time points 98 to 121 as the output label, and so on. In this way, tens of thousands of pairs of samples with clear correspondences for model training and validation are generated from a long, continuous sequence.

[0037] It should be noted that, in specific implementation scenarios, the parameters of the sliding time window can be dynamically configurable, rather than fixed, based on the above scheme. For example, the system can dynamically adjust the output step size according to the real-time requirements of the prediction task, using a smaller output step size for short-term predictions (e.g., the next 2 hours) and a larger output step size for long-term planning (e.g., the next 48 hours). Secondly, the sliding method of the window can be extended to non-equal interval sliding. For example, the bias can not be fixed at 1, but can be based on weekday and holiday patterns, using one bias on weekdays and another bias on holidays to generate samples that better match the actual business cycle. In addition, the sliding time window strategy can be further extended to multi-scale windows, that is, simultaneously defining multiple windows with different input and output step sizes to capture short-term fluctuations (e.g., on an hourly scale) and long-term trends (e.g., on a daily scale) of electricity consumption, and fusing these features at different scales in the model to improve the comprehensiveness of the prediction. Finally, the triggering conditions for the window can be expanded beyond regular sliding over time. They can also be triggered based on events. For example, when a sharp fluctuation in electricity consumption is detected, the system can automatically use that event point as a benchmark to extract data of a specific length before and after the event to form a sample for focused analysis or model retraining.

[0038] S300. Using the overall electricity consumption dataset of the cluster, train the real-time energy consumption status prediction network under the sliding time window. The real-time energy consumption status prediction network includes a trend decomposition module, a surplus decomposition module and a sequence fusion module. The trend decomposition module is used to perform symmetric filling and one-dimensional mean pooling operations on the input energy consumption status sequence, extract the energy consumption pattern components, and output the energy consumption pattern information through a first-order linear layer. The residual decomposition module is used to calculate periodic components based on the energy consumption status sequence and the energy consumption mode components, and output periodic information through a first-order linear layer. The sequence fusion module is used to fuse the energy consumption pattern information and the periodic information to obtain the energy consumption situation prediction result.

[0039] As mentioned above, this step is the core of the entire solution, involving the training process of a neural network model with a specific architecture designed for real-time prediction of energy consumption in manufacturing enterprise clusters. This network is not a single black box model, but consists of three functionally defined, collaborative modules, and its design philosophy stems from a deep understanding of the inherent composition (trends and periods) of industrial energy consumption data.

[0040] Trend Decomposition Module: This module is responsible for extracting smooth, slowly changing long-term trend components (i.e., energy consumption pattern components) from the input energy consumption status subsequence, which has been segmented by a sliding window. The technical approach is as follows: First, data is added to both ends of the sequence through a symmetrical padding operation to eliminate edge effects generated when calculating the mean at the sequence boundaries, ensuring the integrity of the trend extraction. Next, a one-dimensional mean pooling operation is used to filter the padded sequence, essentially calculating a local average within a sliding window, thereby filtering out short-term random fluctuations and some periodic noise to obtain a "baseline" that represents the basic electricity consumption level for that period. Finally, this baseline data (energy consumption pattern component) is transformed through a first-order linear layer (i.e., a fully connected layer) to learn and output the final energy consumption pattern information, which carries the slowly changing trend patterns in the sequence.

[0041] Residual Decomposition Module: This module works in series with the trend decomposition module, specifically designed to capture the remaining portion of the original sequence that cannot be explained by the trend. This portion typically contains strong periodicity, seasonality, and irregular fluctuations. Its working principle involves performing a "residual" calculation: subtracting the energy consumption pattern component extracted by the trend decomposition module from the original energy consumption pattern sequence. This subtraction operation directly separates the sequence's details and periodic characteristics (i.e., the periodic component). Subsequently, this periodic component is also modeled through a first-order linear layer, outputting periodic information that characterizes the sequence's high-frequency fluctuations and periodic patterns.

[0042] Sequence Fusion Module: This module, as the network's output, is responsible for information integration and final prediction. It fuses the energy consumption pattern information output by the trend decomposition module (representing the "baseline" level of future electricity consumption) with the periodic information output by the surplus decomposition module (representing the "fluctuation" of future electricity consumption around the baseline). The simplest fusion method is algebraic addition, resulting in a complete energy consumption situation prediction that includes both trend and periodic details.

[0043] For example, suppose an "equipment manufacturing cluster" has a daily basic electricity load (trend) that steadily increases between 10,000 kW and 11,000 kW from Monday to Friday of a certain work week, but at the same time, there is a fixed pattern (cycle) of morning peak, midday trough and evening peak every day.

[0044] The trend decomposition module works as follows: When the electricity consumption sequence for a certain number of days in a week is input, the module outputs a smooth upward curve through mean pooling. This curve ignores daily peak and trough fluctuations and only reflects the gradual increase in the cluster's "basic energy consumption" from Monday to Friday. The first-order linear layer learns from this curve to predict the continuation trend of this "basic energy consumption" in the next few days, i.e., energy consumption pattern information.

[0045] The residual decomposition module works by subtracting the smoothed trend curve from the original peak-and-valley electricity consumption curve, resulting in a "residual" curve that fluctuates around zero. This residual curve clearly shows the recurring "morning peak, midday trough, and evening peak" pattern. The first-order linear layer learns this pattern and predicts how this periodic fluctuation will manifest in future time periods, i.e., periodic information.

[0046] The sequence fusion module works by adding the predicted "baseline energy consumption" (from energy consumption pattern information) to the predicted "peak-valley fluctuation pattern" (from periodicity information) when predicting electricity consumption for a future day. For example, if the predicted baseline energy consumption for Friday is 10,900 kW, and the predicted additional 800 kW of electricity consumption during the morning peak, then the final prediction from the fusion module would be: the total cluster power load during Friday's morning peak is expected to be 11,700 kW.

[0047] It should be noted that, in specific implementation scenarios, the "first-order linear layer" can be extended to multiple stacked linear layers or a lightweight nonlinear activation function can be introduced on the basis of the above scheme to improve the fitting ability of complex components, as long as its main structure remains lightweight and does not introduce heavy computing units such as recurrent neural networks or complex attention mechanisms.

[0048] In specific implementation scenarios, based on the above scheme, the cascaded structure of the "trend decomposition module" and the "residual quantity decomposition module" can be extended to a multi-layered cascade to achieve multi-scale decomposition. For example, the periodic component output by the residual quantity decomposition module can be input again into a new "trend-residual quantity" decomposition pair to further separate components of different time scales such as "weekly cycle" and "daily cycle".

[0049] In specific implementation scenarios, based on the above scheme, the fusion method of the "sequence fusion module" can be expanded from simple algebraic addition to weighted fusion or dynamic fusion based on attention mechanisms. For example, learnable weights can be assigned to energy consumption pattern information and periodic information, enabling the network to autonomously adjust its dependence on trend and periodic information according to different prediction periods (such as weekdays and holidays).

[0050] In specific implementation scenarios, based on the above approach, during training, in addition to using the energy situation sequence itself, external features such as temperature, humidity, and weekday identifiers can be injected in parallel into the trend decomposition module and / or residual decomposition module. These features can serve as additional inputs to the first-order linear layer, helping the model better understand and predict the causes of trend and cycle changes, thereby improving prediction accuracy.

[0051] S400. Train the real-time energy consumption prediction network using the mean squared difference loss function and stochastic gradient descent optimization algorithm until the model converges, and save the final model parameters.

[0052] As mentioned above, this step is the key optimization process in this scheme that enables the prediction network to grow from its initial state to one with accurate prediction capabilities. Its core lies in automatically finding a set of optimal internal model parameters within a vast parameter space through a quantitative evaluation criterion (loss function) and an efficient search strategy (optimization algorithm), allowing the network's prediction output to infinitely approximate the actual energy consumption situation. Specifically, the "mean squared difference loss function" acts as the "judge" of the network's performance. It quantifies the magnitude of the prediction error by calculating the average of the squared differences between the network's predicted future energy consumption sequence and the corresponding actual energy consumption sequence in the real historical data for each corresponding point; the smaller this value, the more accurate the network's prediction. The "stochastic gradient descent optimization algorithm" acts as the "navigator." Based on the error signal calculated by the loss function, it randomly samples from the training data in a "mini-batch" manner and calculates the gradient direction of the error under the current model parameters, thereby guiding all parameters (including the weights of the first-order linear layers in the trend decomposition module and the residual decomposition module) to be fine-tuned and updated in the direction of reducing error. This process is iterative. "Until the model converges" means that when the loss value no longer decreases significantly or fluctuates within a very small range, the network is considered to have learned the stable intrinsic patterns in the data. At this point, "saving the final model parameters" means fixing the optimized internal state of the network (i.e., the weights and biases of each layer) to form a mature prediction model that can be used for actual deployment.

[0053] For example, let's take a specific industrial scenario as an example. Suppose we are training a network to predict the electricity load of a "precision manufacturing cluster" for the next 8 hours. During the training process, a small batch (e.g., 32) of samples are drawn from a large number of samples generated by the sliding window and input into the network. The network will output 32 corresponding prediction sequences. The mean squared difference loss function then starts working: it compares these 32 prediction sequences with 32 real, known electricity load sequences point by point. For example, at a certain time point, the network predicts a value of 2550kW, while the actual value is 2500kW. Then the squared error at that point is (50)² = 2500. After calculating for all points and all samples, the average value is taken to obtain an overall loss value, such as 150. This value reflects the degree of "unreliability" of the current network prediction. Then, the stochastic gradient descent optimization algorithm starts working: it analyzes this loss value of 150 and calculates in which direction (increase or decrease) each parameter in the network (such as the weight of the first-order linear layer in the trend decomposition module) should be adjusted, and by how much, so that the loss value can be reduced in the next iteration. Therefore, all parameters are slightly updated. This process is repeated thousands of times. Under the "tutelage" of a large amount of historical data, the mean square error between the network's predicted output sequence and the actual sequence gradually decreases from 150 to 10, eventually stabilizing at around 5. At this point, the model is considered to have "converged," and this set of parameters that makes the prediction most accurate is saved for future real-time energy consumption prediction services for the cluster.

[0054] It should be noted that, in specific implementation scenarios, the "mean squared error loss function" can be extended to other loss functions suitable for regression tasks, such as the mean absolute error loss function (which is less sensitive to outliers than mean squared error) or the Hubell loss function (which combines the advantages of mean squared error and mean absolute error). These alternatives can also effectively measure the deviation between predicted and true values ​​and guide model optimization. Secondly, the "stochastic gradient descent optimization algorithm" can be extended to a series of its better-performing variants or improvements, such as momentum-driven stochastic gradient descent, adaptive learning rate algorithms (such as Adam, AdaGrad, or RMSprop), etc. These algorithms can accelerate the convergence process and help escape local optima by introducing momentum terms or adaptively adjusting the learning rate for each parameter, thereby finding globally optimal or suboptimal model parameters more efficiently. In addition, the termination condition of the training process, "until the model converges," can be specifically extended to include a strategy of early stopping based on the validation set, that is, terminating training early when the model's performance on the independent validation set no longer improves, in order to prevent overfitting of the training data. Finally, the training process can be extended to include learning rate scheduling. For example, during training, the learning rate can be dynamically reduced according to preset rules or the plateau effect of loss reduction, so that parameter updates are more refined in the later stages, thereby stably converging to the optimal point.

[0055] According to one embodiment of this application, the trend decomposition module performs the following operations: The input energy consumption status sequence is symmetrically padded to obtain the padded sequence; Perform a one-dimensional mean pooling operation on the padded sequence to obtain the energy consumption mode component; The energy consumption mode components are input into a first-order linear layer, and energy consumption mode information is output.

[0056] As described above, a symmetric padding operation is performed on the input energy consumption pattern sequence to obtain the padded sequence. This step aims to handle the sequence boundaries by mirroring the original data points at the beginning and end of the sequence, ensuring that subsequent mean pooling operations can obtain a complete context window at both ends of the sequence, thus avoiding distortion or deviation of the extracted trend components at both ends of the sequence due to missing boundary data.

[0057] A one-dimensional mean pooling operation is performed on the filled sequence to obtain the energy consumption pattern component. This operation uses a fixed-length sliding window to calculate the arithmetic mean of all data points within the window. This process effectively filters out high-frequency noise caused by random events or short-term fluctuations in the original electricity consumption data, while retaining and highlighting the slowly changing, long-term regularities of the basic components of the electricity load, namely the energy consumption pattern component.

[0058] The obtained energy consumption pattern components are input into a first-order linear layer, which outputs the final energy consumption pattern information. This first-order linear layer performs a linear transformation on the input pattern components, and by adjusting their weights and bias parameters, the network can learn and represent the more complex dynamic changes of the trend components in the time dimension. This results in outputting more accurate energy consumption pattern information that better reflects future trends, providing a foundation for the final sequence fusion.

[0059] According to one embodiment of this application, the step size of the symmetrical filling is calculated using the following formula:

[0060] in, Indicates the fill step size. Indicates the length of the input sequence. Hyperparameter representing the unit trend length of the sequence.

[0061] As described above, the step size of the symmetrical filling is determined by the formula... Calculation determined. In this formula, the symbols... This indicates the required padding step size, i.e., the number of data points that need to be expanded at both ends of the input sequence. (Symbol) This represents the length of the input sequence, i.e., the total number of data points contained in the energy situation sequence. (Symbol) It is a preset hyperparameter used to characterize the scale of data points required to form a basic trend unit in a sequence.

[0062] The calculation logic of this formula is as follows: first, the total length of the sequence is... Divide by hyperparameters Then subtract 1 from the quotient, and finally round down the result to obtain the integer filling step size. This calculation process ensures that the filling range is correlated with the sequence length and the desired trend granularity. Its purpose is to provide sufficient boundary context for subsequent mean pooling operations, thereby accurately extracting representative energy consumption pattern components at the beginning and end of the sequence and avoiding trend distortion introduced by data boundary truncation. Hyperparameters The specific values ​​can be configured and optimized according to the sequence periodicity characteristics and model performance requirements in the actual application scenario.

[0063] According to one embodiment of this application, the residual decomposition module performs the following operations: Subtract the input energy consumption status sequence from the energy consumption mode component to obtain the periodic component; Perform a one-dimensional mean pooling operation on the periodic components; The pooled periodic components are input into a first-order linear layer, and periodic information is output.

[0064] As described above, the input energy consumption trend sequence is subtracted from the corresponding data points of the energy consumption pattern components extracted by the trend decomposition module to obtain the periodic components. The core of this operation is to remove the identified trend components from the original sequence, so that the remaining part can highlight the periodic fluctuations and short-term change characteristics that are masked by the trend.

[0065] One-dimensional mean pooling is performed on the obtained periodic components. This step calculates the local average value through a sliding window, aiming to smooth out any random noise and irregular disturbances that may exist in the component, while preserving its main periodic fluctuation pattern, thereby obtaining more stable and representative periodic characteristics.

[0066] The pooled periodic components are input into a first-order linear layer. This linear layer performs linear transformations and dimensionality adjustments on the input features through its trainable weight parameters, thereby learning the temporal variation patterns in the periodic components and outputting periodic information representing the periodic variation characteristics in future time periods.

[0067] According to one embodiment of this application, the sequence fusion module obtains the energy consumption situation prediction result by adding the energy consumption pattern information to the periodic information.

[0068] As described above, the sequence fusion module integrates information through algebraic addition. This module adds the energy consumption pattern information output by the trend decomposition module and the periodic information output by the surplus decomposition module to corresponding data points to obtain the final energy consumption situation prediction result.

[0069] The essence of this operation is to reconstruct a complete energy consumption pattern: energy consumption pattern information provides a baseline level or long-term trend of electricity load during the forecast period, while periodic information provides details of regular fluctuations around this baseline level. Adding the two together ensures that the forecast result simultaneously includes both slowly changing trend components and short-term fluctuating periodic components, thus forming a comprehensive forecast sequence that can fully reflect the future energy consumption pattern.

[0070] According to one embodiment of this application, the power data is collected at a granularity of 15 minutes, in kilowatts.

[0071] As mentioned above, "collection granularity of 15 minutes" means that when collecting power data from the monitoring points of each manufacturing enterprise, the time interval is 15 minutes, that is, an instantaneous active power value is recorded every 15 minutes. This time interval setting can achieve a balance between capturing short-term fluctuations in energy consumption and controlling the total amount of data.

[0072] The phrase "unit: kilowatt" indicates that the power data collected is measured in kilowatts, using kilowatts as the basic unit of measurement for active power. This standard unit ensures that heterogeneous data collected from different enterprises within the cluster has a unified dimension and benchmark, providing the necessary conditions for subsequent direct numerical aggregation to construct a comprehensive cluster-wide electricity consumption dataset.

[0073] According to one embodiment of this application, the training objective of the real-time energy situation prediction network is to minimize the mean squared difference loss function, and the optimization algorithm is stochastic gradient descent.

[0074] As mentioned above, the training objective is to minimize the mean squared difference loss function. This loss function quantifies the accuracy of the network's predictions by calculating the squared mean of the differences between the predicted values ​​output by the network and the corresponding actual energy consumption data. Minimizing this loss function means adjusting the network parameters to make the predicted sequence approximate the actual sequence as closely as possible, thereby directly optimizing the model's prediction accuracy.

[0075] To achieve this minimization objective, stochastic gradient descent is chosen as the optimization algorithm. During training, this algorithm iteratively calculates the gradient of the loss function with respect to the model parameters using randomly selected mini-batches of samples, and updates the parameters in the opposite direction of the gradient. This random sampling-based optimization method effectively guides the network parameters to gradually converge to a state that minimizes the loss function while ensuring training efficiency.

[0076] A second aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any of the embodiments of the first aspect above.

[0077] Figure 2 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 2 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logical instructions in the memory 830 to execute the method in any of the embodiments of the first aspect described above, the method including: Collect historical power data from multiple manufacturing enterprises in a manufacturing enterprise cluster to construct a dataset of overall electricity consumption for the cluster. Based on the overall power consumption dataset of the cluster, a sliding time window is defined, which includes an input step size, an output step size, and a bias. Using the cluster's overall electricity consumption dataset, a real-time energy consumption status prediction network is trained within the sliding time window. The real-time energy consumption status prediction network includes a trend decomposition module, a surplus decomposition module, and a sequence fusion module. The trend decomposition module is used to perform symmetric filling and one-dimensional mean pooling operations on the input energy consumption status sequence, extract the energy consumption pattern components, and output the energy consumption pattern information through a first-order linear layer. The residual decomposition module is used to calculate periodic components based on the energy consumption status sequence and the energy consumption mode components, and output periodic information through a first-order linear layer. The sequence fusion module is used to fuse the energy consumption pattern information and the periodic information to obtain the energy consumption situation prediction result; The real-time energy consumption prediction network is trained using the mean squared difference loss function and the stochastic gradient descent optimization algorithm until the model converges, and the final model parameters are saved.

[0078] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0079] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer being able to perform the methods provided by the above methods, the method comprising: Collect historical power data from multiple manufacturing enterprises in a manufacturing enterprise cluster to construct a dataset of overall electricity consumption for the cluster. Based on the overall power consumption dataset of the cluster, a sliding time window is defined, which includes an input step size, an output step size, and a bias. Using the cluster's overall electricity consumption dataset, a real-time energy consumption status prediction network is trained within the sliding time window. The real-time energy consumption status prediction network includes a trend decomposition module, a surplus decomposition module, and a sequence fusion module. The trend decomposition module is used to perform symmetric filling and one-dimensional mean pooling operations on the input energy consumption status sequence, extract the energy consumption pattern components, and output the energy consumption pattern information through a first-order linear layer. The residual decomposition module is used to calculate periodic components based on the energy consumption status sequence and the energy consumption mode components, and output periodic information through a first-order linear layer. The sequence fusion module is used to fuse the energy consumption pattern information and the periodic information to obtain the energy consumption situation prediction result; The real-time energy consumption prediction network is trained using the mean squared difference loss function and the stochastic gradient descent optimization algorithm until the model converges, and the final model parameters are saved.

[0080] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided by the above methods, the method comprising: Collect historical power data from multiple manufacturing enterprises in a manufacturing enterprise cluster to construct a dataset of overall electricity consumption for the cluster. Based on the overall power consumption dataset of the cluster, a sliding time window is defined, which includes an input step size, an output step size, and a bias. Using the cluster's overall electricity consumption dataset, a real-time energy consumption status prediction network is trained within the sliding time window. The real-time energy consumption status prediction network includes a trend decomposition module, a surplus decomposition module, and a sequence fusion module. The trend decomposition module is used to perform symmetric filling and one-dimensional mean pooling operations on the input energy consumption status sequence, extract the energy consumption pattern components, and output the energy consumption pattern information through a first-order linear layer. The residual decomposition module is used to calculate periodic components based on the energy consumption status sequence and the energy consumption mode components, and output periodic information through a first-order linear layer. The sequence fusion module is used to fuse the energy consumption pattern information and the periodic information to obtain the energy consumption situation prediction result; The real-time energy consumption prediction network is trained using the mean squared difference loss function and the stochastic gradient descent optimization algorithm until the model converges, and the final model parameters are saved.

[0081] Example 2 Step 1) Collect power data in kilowatts (kW) with a granularity of 15 minutes by installing electricity meters in each manufacturing enterprise within the manufacturing enterprise cluster, and further construct an overall electricity consumption dataset for the manufacturing enterprise cluster. :

[0082] In the formula, Indicates the manufacturing enterprise cluster in the 1st Power data at each time step; Step 2) Based on the established overall electricity consumption dataset of the manufacturing enterprise cluster Define the sliding time window. The size, including the input step size Output step size and bias Therefore, the task of real-time prediction of energy consumption patterns in manufacturing enterprise clusters can be defined as:

[0083] Where F represents the prediction model, This represents the output time series prediction results. This represents the input power timing data.

[0084] Step 3) Utilize In the sliding time window Training the energy situation real-time prediction network under the following settings It mainly includes a trend decomposition module. Balance decomposition module and sequence fusion module .

[0085] Preferably, step 3 includes the following steps: Step 301) In order to obtain trend information on the energy consumption of manufacturing enterprise clusters, a trend decomposition module is designed. It obtains the mean of the energy consumption data sequence through a symmetric imputation averaging operation to reflect the time-series energy consumption pattern information of the manufacturing enterprise cluster within that period. The specific calculation process includes: first, obtaining the imputed input sequence through a symmetric imputation operation; second, obtaining the energy consumption pattern components of the sequence using a one-dimensional mean pooling operation; and finally, performing time modeling using a first-order linear layer to obtain energy consumption pattern information of the manufacturing enterprise cluster's energy consumption situation.

[0086] in, Represents a first-order linear layer. This represents the energy consumption status sequence of the manufacturing enterprise cluster. Energy consumption pattern components that indicate the energy consumption status of manufacturing enterprise clusters Energy consumption pattern information indicating energy consumption status. This represents a one-dimensional mean pooling operation. This represents the energy consumption status sequence data after symmetrical filling. express The Middle Power value, The fill step size is shown below, and its calculation method is as follows:

[0087] in, Represents the input sequence Length, The hyperparameter representing the unit trend length of the sequence can be adjusted based on the sequence length and experimental results.

[0088] Step 302) In order to obtain periodic information on the energy consumption status of manufacturing enterprise clusters, a surplus decomposition module is designed. It calculates the characteristic differences of energy consumption pattern components using energy consumption status sequence data to reflect the temporal periodicity of the manufacturing enterprise cluster within a given period. The specific calculation process includes: first, subtracting the energy consumption pattern components obtained in step 301 from the energy consumption status data of the manufacturing enterprise cluster to obtain the periodicity components of the energy consumption status; second, using a one-dimensional mean pooling operation to obtain the energy consumption pattern components of the sequence; and finally, using a first-order linear layer for time modeling to obtain the periodicity information of the energy consumption status of the manufacturing enterprise cluster.

[0089] in, The periodic component representing the energy consumption pattern of manufacturing enterprise clusters. Periodic information indicating energy consumption status.

[0090] Step 303) To integrate and learn the energy consumption patterns of manufacturing enterprise clusters, a sequence fusion module is designed. By integrating energy consumption pattern information and periodic information, a complete energy consumption trend forecast has been obtained:

[0091] Step 4) By introducing the mean squared difference loss function, train the real-time energy situation prediction network using the stochastic gradient descent optimization algorithm until the model converges, and save the final parameters. Training is over.

[0092] For any parts not mentioned in this application, existing technologies may be used or referenced.

[0093] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0094] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A method for real-time prediction of energy consumption status in lightweight manufacturing enterprise clusters, characterized in that, include: Collect historical power data from multiple manufacturing enterprises in a manufacturing enterprise cluster to construct a dataset of overall electricity consumption for the cluster. Based on the overall power consumption dataset of the cluster, a sliding time window is defined, which includes an input step size, an output step size, and a bias. Using the cluster's overall electricity consumption dataset, a real-time energy consumption status prediction network is trained within the sliding time window. The real-time energy consumption status prediction network includes a trend decomposition module, a surplus decomposition module, and a sequence fusion module. The trend decomposition module is used to perform symmetric filling and one-dimensional mean pooling operations on the input energy consumption status sequence, extract the energy consumption pattern components, and output the energy consumption pattern information through a first-order linear layer. The residual decomposition module is used to calculate periodic components based on the energy consumption status sequence and the energy consumption mode components, and output periodic information through a first-order linear layer. The sequence fusion module is used to fuse the energy consumption pattern information and the periodic information to obtain the energy consumption situation prediction result; The real-time energy consumption prediction network is trained using the mean squared difference loss function and the stochastic gradient descent optimization algorithm until the model converges, and the final model parameters are saved.

2. The method according to claim 1, characterized in that, The trend decomposition module performs the following operations: The input energy consumption status sequence is symmetrically padded to obtain the padded sequence; Perform a one-dimensional mean pooling operation on the padded sequence to obtain the energy consumption mode component; The energy consumption mode components are input into a first-order linear layer, and energy consumption mode information is output.

3. The method according to claim 2, characterized in that, The step size of the symmetrical filling is calculated using the following formula: in, Indicates the fill step size. Indicates the length of the input sequence. Hyperparameter representing the unit trend length of the sequence.

4. The method according to claim 1, characterized in that, The residual decomposition module performs the following operations: Subtract the input energy consumption status sequence from the energy consumption mode component to obtain the periodic component; Perform a one-dimensional mean pooling operation on the periodic components; The pooled periodic components are input into a first-order linear layer, and periodic information is output.

5. The method according to claim 1, characterized in that, The sequence fusion module obtains the energy consumption situation prediction result by adding the energy consumption pattern information to the periodic information.

6. The method according to claim 1, characterized in that, The power data was collected at a granularity of 15 minutes, and the unit was kilowatts.

7. The method according to claim 1, characterized in that, The training objective of the real-time energy consumption status prediction network is to minimize the mean squared difference loss function, and the optimization algorithm is stochastic gradient descent.

8. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-7.

9. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.