Energy consumption prediction model construction method, energy consumption prediction method and energy consumption prediction device
By constructing a multi-model fusion energy consumption prediction model and utilizing convolutional neural networks, bidirectional long short-term memory networks, and convolutional kernel attention mechanisms, the problem of poor energy consumption prediction accuracy in forging production lines was solved, achieving high-precision energy consumption prediction and production optimization.
Patent Information
- Application Number
- CN202610071244.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-02-17
AI Technical Summary
In existing technologies, the energy consumption prediction accuracy of forging production lines is poor, making it difficult to adapt to the complex dynamic changes throughout the entire process and unable to accurately predict the energy consumption transfer patterns between multiple processes and equipment.
A multi-model fusion energy consumption prediction model is constructed. By sequentially fusing convolutional neural networks, bidirectional long short-term memory networks, KAN networks, and convolutional kernel attention mechanisms, local and global features are extracted, temporal dependencies are captured, and high-precision energy consumption prediction is achieved.
It improves the accuracy of energy consumption prediction for forging production lines, comprehensively reflects the actual energy consumption of the entire production line, and provides decision support for production control and energy consumption optimization.
Smart Images

Figure CN121543843A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial process energy consumption monitoring and prediction technology, and in particular to a method for constructing an energy consumption prediction model, a prediction method, and an apparatus. Background Technology
[0002] In the automotive manufacturing industry, forging production lines are a core component in the production of critical automotive parts (such as steering knuckles), and their energy consumption directly impacts production costs and carbon emissions. During forging, energy consumption primarily stems from the mechanical power consumed by the material during deformation, and is influenced by multiple factors including process parameters, equipment status, material properties, and production cycle time. Furthermore, production coordination and cycle time matching between different workstations can also cause fluctuations in local and overall energy consumption. Traditional energy consumption prediction methods mainly employ statistical regression or univariate time series analysis, often neglecting the nonlinear coupling and complex spatiotemporal transmission effects between multiple variables, making it difficult to comprehensively reflect the actual energy consumption of the entire forging production line.
[0003] In recent years, the development of deep learning technology has provided new solutions for energy consumption prediction in forging production lines. Deep learning methods can automatically extract complex features from data and learn the nonlinear mapping relationships between high-dimensional variables, showing great potential in the field of industrial energy consumption prediction. For example, convolutional neural networks (CNNs) can extract local features, and long short-term memory networks (LSTMs) can capture temporal dependencies. However, existing deep learning-based methods are mainly used for energy consumption modeling of single equipment or single processes, making it difficult to adapt to the complex dynamic changes of the entire forging production line and accurately predict the energy consumption of the forging production line. Furthermore, single neural network structures have certain limitations in modeling complex nonlinear relationships, leading to unstable long-term prediction accuracy and difficulty in effectively capturing the energy consumption transfer patterns between multiple processes and equipment.
[0004] Therefore, there is an urgent need to design a more advanced energy consumption prediction technology for forging production lines to solve the problem of poor accuracy in energy consumption prediction of forging production lines in existing technologies. Summary of the Invention
[0005] The purpose of this invention is to provide a method for constructing an energy consumption prediction model, a prediction method, and an apparatus. By comprehensively processing key process parameters, equipment operating status, and time information, a multi-model fusion production line energy consumption prediction model is constructed, which realizes high-precision prediction of the energy consumption of the entire forging production line, effectively improves the accuracy of energy consumption prediction for forging production lines, and solves the problem of poor accuracy in energy consumption prediction for forging production lines in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for constructing an energy consumption prediction model, which may include: Acquire initial forging data; the initial forging data is forging data related to energy consumption on the forging production line; the initial forging data includes at least multiple initial forging variables and time characteristic data of multiple initial forging variables; The initial forging data is preprocessed to obtain the production line energy consumption dataset; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction. Based on the production line energy consumption dataset, the initial forging production line energy consumption prediction model is trained until it meets the preset convergence condition, thus obtaining the target forging production line energy consumption prediction model. The initial forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
[0007] Preferably, based on the production line energy consumption dataset, the initial forging production line energy consumption prediction model is trained until it meets a preset convergence condition, thus obtaining the target forging production line energy consumption prediction model, including: The production line energy consumption dataset is divided into a training set and a test set to obtain the production line energy consumption training set and the production line energy consumption test set. The initial forging production line energy consumption prediction model is trained using the production line energy consumption training set to obtain the intermediate production line energy consumption prediction model. The intermediate production line energy consumption prediction model is tested using the production line energy consumption test set. When the intermediate production line energy consumption prediction model meets the preset convergence conditions, the intermediate production line energy consumption prediction model is used as the target forging production line energy consumption prediction model. The step of training the initial forging production line energy consumption prediction model using the production line energy consumption training set includes: The production line energy consumption training set is input into the convolutional neural network model to extract spatiotemporal features and output spatiotemporal feature data for the forging production line. The spatiotemporal characteristic data of the forging production line are input into the bidirectional long short-term memory network model to capture temporal dependencies and output the first energy consumption state data for the forging production line, including the forward and backward dependencies of the spatiotemporal sequence data. The first energy consumption status data is input into the KAN network model, and time-series feature reconstruction and nonlinear transformation are performed to output the second energy consumption status data for the forging production line. The second energy consumption state data is input into the convolutional kernel attention mechanism, and the attention mechanism is used to perform feature weighting on the second energy consumption state data to output the energy consumption prediction data for the forging production line.
[0008] Preferably, the step of inputting the production line energy consumption training set into the convolutional neural network model, extracting spatiotemporal features, and outputting spatiotemporal feature data for the forging production line may include: Using the one-dimensional convolution calculation formula: ; Local feature extraction is performed; among which, Represents the output feature sequence after the convolution operation. Represents the input sequence of a convolutional neural network model. Represents the convolution kernel weight vector, Indicates the kernel size, This represents the element at time position t+i in the input sequence, where t represents the current time step.
[0009] Preferably, the step of inputting the spatiotemporal characteristic data of the forging production line into the bidirectional long short-term memory network model for temporal dependency capture, and outputting the first energy consumption state data for the forging production line, including the forward and backward dependencies of the spatiotemporal sequence data, may include: Formula used: ; Perform input gate operations; Formula used: ; Perform the forget gate operation; Formula used: ; Perform output gate operations; Formula used: ; Perform candidate memory unit operations; Formula used: ; Update the memory units; Formula used: ; Perform hidden state update; among which, Indicates time step The input vector serves as the input to the bidirectional long short-term memory network model. Indicates the hidden state of the previous time step. The weight matrix representing different gated units, The bias terms for different gated units are represented by σ, σ represents the Sigmoid function, tanh represents the hyperbolic tangent activation function, and ⊙ represents element-wise multiplication (Hadamard product). [] represents the concatenation of the hidden state of the previous time step and the input features of the current time step; Formula used: ; ; ; A bidirectional long short-term memory network model was used to extract the fusion hidden states of forward and backward dependencies from time series data; among which... This represents the first energy consumption state data output after the fusion of the hidden states of the bidirectional LSTM. This indicates that the forward LSTM is at time step Hidden state This indicates that the backward LSTM is at time step Hidden state This represents the hidden state of the forward LSTM in the previous step. This represents the hidden state of the backward LSTM in the next step.
[0010] Preferably, the step of inputting the first energy consumption status data into the KAN network model, performing time-series feature reconstruction and nonlinear transformation, and outputting the second energy consumption status data for the forging production line may include: Based on the Kolmogorov-Arnold representation theorem, the formula is adopted: ; The input data is combined nonlinearly; where, The input features are represented by n, which serve as the input to the KAN network model. Feature dimensions, This represents the p-th inner-layer nonlinear transformation function of the q-th group used to map a single input feature. This represents the q-th outer-layer combination function used to integrate the inner-layer transformation results of the corresponding group; Formula used: ; Define the KAN network matrix; where, This indicates the composition of functions. Represents the inner function matrix, Represents the outer function vector; Formula used: ; Determine the KAN stacking layers; where L represents any layer of the KAN network; Formula used: ; For input features A fully connected layer is applied to each inner function individually, defining multiple nonlinear transformations; among them, Representing multiple nonlinear transformations, Indicates the index of the inner function, The fully connected layer operation corresponding to the j-th inner function is as follows: ;in, This represents the weight matrix of the j-th inner fully connected layer. Represents the bias vector of the j-th inner fully connected layer. The output dimension is 1; ReLU activation is used to enhance nonlinearity at the output of the fully connected layer: ; After normalization and regularization, the results of all inner layer transformations are concatenated into a high-dimensional feature vector: ; in, This indicates the splicing characteristics of the inner layer transformation; The outer network layer is responsible for further combining the features to generate the final features; outer network Perform full-connection and ReLU processing: ; in, The weight matrix representing the outer layer combination, Represents the bias vector of the outer network; The outputs of the inner and outer layers are connected via residual connections to preserve the original input information before being activated by ReLU. ; in, The weight matrix representing the residual mapping, This represents the second energy consumption status data.
[0011] Preferably, the step of inputting the second energy consumption state data into the convolutional kernel attention mechanism, using the attention mechanism to perform feature weighting on the second energy consumption state data, and outputting energy consumption prediction data for the forging production line may include: Formula used: ; Map the fully connected layer to the input To query ,key Sum ;in, D represents the trainable weight matrix, and D′ represents the mapped dimension. B represents batch size, T represents sequence length, and D represents feature dimension; For each attention point, the formula is as follows: ; Calculate the standard dot product attention score; where, The dimension of the key vector Indicates to The last two dimensions are transposed, and Score represents the standard dot product attention score; Formula used: ; ; Element-wise multiplication of the score is performed to fuse local kernel features; among which... This indicates that local kernel features of the input data are extracted through a one-dimensional convolutional layer. Indicates fusion of local kernel features; Formula used: ; The attention weights are obtained by applying Softmax to the adjusted scores. ; Formula used: ; Values based on attention weights We perform a weighted summation to obtain the attention output. and through linear projection Map the multi-head attention output back to the original dimension and add residual connections and layer normalization: ; Feature fusion and output prediction are performed using a feedforward network. The feedforward network uses an attention mechanism on the convolutional kernels to output the feature. Perform nonlinear transformation: ; Then, through residual connections and layer normalization, we obtain: ; The final prediction layer will use the output of the feedforward network. Flatten: ; Then, it is mapped to a scalar output through a series of fully connected layers: ; ; ; in, This indicates the predicted energy consumption data for the forging production line. The weight matrix of the feedforward network, For the bias term of the feedforward network, The weight matrix of fully connected layer 1, For the bias terms of fully connected layer 1, The weight matrix of fully connected layer 2, For the bias terms of fully connected layer 2, For the final prediction output layer weight matrix, This is the bias term for the final prediction output layer.
[0012] Preferably, the step of preprocessing the initial forging data to obtain the production line energy consumption dataset may include: Formula used: ; Outlier removal was performed on the forging data; among which, This represents the sample mean; denoted by , where represents the sample standard deviation and x represents the original data.
[0013] Preferably, the step of preprocessing the initial forging data to obtain the production line energy consumption dataset may include: Formula used: ; The forging data is standardized, where, It is the variable after removing outliers; This represents the sample mean of the variable; The sample standard deviation of the variable; These are standardized variables.
[0014] Secondly, the present invention provides an energy consumption prediction method, wherein the energy consumption prediction method described in the first aspect uses a forging production line energy consumption prediction model constructed by the method for constructing the energy consumption prediction model to make predictions. The prediction method may include: Obtain the forecast data for the target forging production line; The data to be predicted is preprocessed to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction. The target prediction data is input into the trained forging production line energy consumption prediction model to predict the production line energy consumption, thereby obtaining the energy consumption prediction of the target forging production line; the forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
[0015] Thirdly, the present invention provides an energy consumption prediction device, which is applied to a forging production line energy consumption prediction model constructed by the energy consumption prediction model construction method described in the first aspect. The device may include: The acquisition module is used to acquire the data to be predicted from the target forging production line; A data preprocessing module is used to preprocess the data to be predicted to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction. An energy consumption prediction module is used to input the target prediction data into a trained forging production line energy consumption prediction model to predict the energy consumption of the production line and obtain the energy consumption prediction of the target forging production line. The forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
[0016] Compared with the prior art, the energy consumption prediction model construction method provided by the first aspect of the present invention involves acquiring initial forging data; the initial forging data is forging data related to energy consumption on the forging production line; the initial forging data includes at least multiple initial forging variables and time feature data of multiple initial forging variables; then, the initial forging data is preprocessed to obtain a production line energy consumption dataset; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction; finally, based on the production line energy consumption dataset, the initial forging production line energy consumption prediction model is trained until the initial forging production line energy consumption prediction model meets the preset convergence conditions, thus obtaining the target forging production line energy consumption prediction model; the initial forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism. Based on this, the energy consumption prediction model for the target forging production line constructed in this invention can extract local spatial features of the input data (such as image texture and short-term fluctuations in time series) through convolutional kernels. Then, it uses a bidirectional long short-term memory network model to capture long-term bidirectional dependencies, uses a forward LSTM to learn historical information, and a backward LSTM to capture future context, thereby improving the ability to model long-term trends. Furthermore, it utilizes the KAN network model as a novel lightweight network, replacing the traditional fixed activation function with a learnable activation function to improve nonlinear fitting ability and reduce the number of parameters. Finally, it uses a convolutional kernel attention mechanism to dynamically allocate weights during feature transfer, suppressing noise and strengthening key information. This can improve the accuracy of energy consumption prediction for forging production lines and solve the problem of poor accuracy in energy consumption prediction for forging production lines in existing technologies.
[0017] The energy consumption prediction method provided in the second aspect of the present invention has the same beneficial effects as the energy consumption prediction model for forging production line constructed by the energy consumption prediction model construction method provided in the first aspect, and will not be repeated here.
[0018] The energy consumption prediction device provided in the third aspect of the present invention has the same beneficial effects as the energy consumption prediction model for forging production line constructed by the energy consumption prediction model construction method provided in the first aspect, and will not be described in detail here. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram of the main process of constructing an energy consumption prediction model provided by the present invention; Figure 2 A schematic diagram of the energy consumption curves for the training loss and validation loss curves of the forging production line energy consumption prediction model constructed in this invention. Figure 3 A schematic diagram comparing the energy consumption prediction results with the actual energy consumption values of a forging production line energy consumption prediction model constructed in this invention. Figure 4 This is a schematic diagram of the main process of an energy consumption prediction method provided by the present invention; Figure 5 This is a schematic diagram of the structure of an energy consumption prediction device provided by the present invention. Detailed Implementation
[0020] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0021] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0022] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding related objects have an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0023] Currently, the development of deep learning technology has provided new solutions for predicting energy consumption in forging production lines. However, in the application of energy consumption prediction in forging production lines, energy consumption modeling is mainly based on single equipment or single process. This technical solution is difficult to adapt to the complex dynamic changes of the entire forging production line process and cannot accurately predict the energy consumption of the forging production line. For example, using only convolutional neural networks (CNNs) to extract local features of data; or using long short-term memory networks (LSTMs) to capture the dependencies between different time series; single neural network structures have certain limitations when modeling complex nonlinear relationships, resulting in unstable long-term prediction accuracy and difficulty in effectively capturing the energy consumption transfer patterns between multiple processes and multiple equipment. This leads to poor accuracy in predicting the energy consumption of forging production lines in practical applications.
[0024] In view of this, the present invention provides a method for constructing an energy consumption prediction model, a prediction method, and an apparatus that can integrate multi-source time-series data, fully extract local and global features, and use multi-model fusion to achieve high-precision production line energy consumption prediction, providing decision support for production control and energy consumption optimization; and solves the problem of poor energy consumption prediction accuracy in forging production lines in the prior art.
[0025] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings: Please see Figure 1 , Figure 1 The main flowchart of the method for constructing an energy consumption prediction model provided by the present invention is shown below; the main body executing the method can be a model training platform or training device equipped with the method for constructing an energy consumption prediction model provided by the present invention.
[0026] exist Figure 1 In this context, the methods for constructing energy consumption prediction models may include: Step 110: Obtain initial forging data; the initial forging data is forging data related to energy consumption on the forging production line; the initial forging data includes at least multiple initial forging variables and time characteristic data of multiple initial forging variables.
[0027] Step 120: Perform data preprocessing on the initial forging data to obtain the production line energy consumption dataset; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction.
[0028] In steps 110 to 120, the initial forging data refers to the energy-related forging data on the corresponding forging production line. The energy-related forging data may differ between different forging production lines and in different application scenarios. The specific type of forging data can be determined through testing, expert scoring, or technical manual queries, and then the corresponding forging data is obtained through sensors on the production line. This invention uses an automotive steering knuckle forging production line as an example. For instance, the initial forging data on an automotive steering knuckle forging production line may include 12 input variables and time characteristic data related to power consumption, such as the forging exit temperature, pre-forging temperature, final forging temperature, trimming temperature, transfer robot R2 time, first to fourth impact forces, overall line cycle time, off-line cycle time, and number of parts off-line. The initial forging data can be obtained by deploying sensors on the forging production line to collect these 12 input variables and their corresponding time data.
[0029] Furthermore, the collected time data was converted into a standard format, and five features (year, month, day, hour, minute) were extracted and merged with the original variable data; the sample mean was calculated using statistical methods. with standard deviation Outliers were removed based on the 3σ criterion of normal distribution. Then, a standardization formula was used to process the data to ensure consistency in the dimensions of each variable. The standardized data was then arranged chronologically, with the horizontal axis representing the input variables and the vertical axis representing the time steps, to construct a production line energy consumption dataset for model training.
[0030] Step 130: Based on the production line energy consumption dataset, train the initial forging production line energy consumption prediction model until the initial forging production line energy consumption prediction model meets the preset convergence condition, and obtain the target forging production line energy consumption prediction model; the initial forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
[0031] In step 130, the convolutional neural network model, bidirectional long short-term memory network model, KAN network model, and convolutional kernel attention mechanism are first sequentially fused to obtain an initial forging production line energy consumption prediction model. Then, the data from the production line energy consumption dataset is input into the convolutional neural network model for feature extraction, extracting local spatial features, and outputting them through a fully connected layer to the bidirectional long short-term memory network model. The bidirectional long short-term memory network model is used to capture temporal dependencies, outputting the forward and backward dependencies of the spatiotemporal sequence data to the KAN network model. Finally, the KAN network model is used to... The time-series features are reconstructed and nonlinearly transformed, and then output to the convolutional kernel attention mechanism. The convolutional kernel attention mechanism is used to perform feature weighting on the second energy consumption state data, and outputs the energy consumption prediction data for the forging production line. The process continues until the initial forging production line energy consumption prediction model meets the preset convergence conditions, and the target forging production line energy consumption prediction model is obtained. Using this model to predict the energy consumption of the production line can improve the prediction accuracy of the energy consumption of the production line. This solves the problem that the existing technology relies only on the energy consumption modeling of a single equipment or a single process, which is difficult to adapt to the complex dynamic changes of the entire forging production line and cannot accurately predict the energy consumption of the forging production line.
[0032] Based on this, the energy consumption prediction model construction method provided by this invention, by comprehensively processing key process parameters, equipment operating status, and time information, constructs a high-precision energy consumption prediction model, which has at least the following beneficial effects: Employing a deep learning model that integrates CNN, BiLSTM, Kernel Attention, and KAN, it can automatically extract and fuse complex spatiotemporal features between multiple processes and equipment in the forging production line, eliminating the cumbersome nature of traditional physical modeling. Training is based on a large amount of production data, making data acquisition and processing simple and easy, and the model has strong generalization capabilities, making it suitable for energy consumption prediction of the entire production line. Furthermore, the model establishment process avoids seeking complex mathematical and physical relationships between variables affecting the energy consumption of the forging production line, effectively solving the problems of strong coupling, nonlinearity, and instability in long-term prediction among input variables. It captures the energy consumption transfer patterns between multiple processes and equipment, comprehensively reflecting the actual energy consumption of the entire forging production line, achieving energy consumption prediction for the entire forging production line, effectively improving the accuracy of forging production line energy consumption prediction, and providing strong technical support for energy-saving optimization and intelligent scheduling; it also solves the problem of poor accuracy in forging production line energy consumption prediction in existing technologies.
[0033] As an optional embodiment, in step 120, the time data in the initial forging data is converted to a standard format, five features (year, month, day, hour, and minute) are extracted and merged with the original variable data; the sample mean is calculated using statistical methods. with standard deviation Outliers are removed based on the 3σ criterion of normal distribution; that is, the initial forging data is preprocessed to obtain the production line energy consumption dataset, which may include: Formula used: (1); Outlier removal was performed on the forging data; among which, This represents the sample mean; denoted by , where represents the sample standard deviation and x represents the original data.
[0034] Furthermore, standardized formulas are used to process the data to ensure consistency in the dimensions of all variables. This involves preprocessing the initial forging data to obtain a production line energy consumption dataset, which may also include: Formula used: (2); The forging data is standardized, where, It is the variable after removing outliers; This represents the sample mean of the variable; The sample standard deviation of the variable; These are standardized variables.
[0035] Then, the standardized forging data are arranged in chronological order, with the horizontal axis representing each input variable and the vertical axis representing the time step, to construct a supervised learning production line energy consumption dataset.
[0036] Specifically, a sliding window technique can be used to construct a supervised learning dataset from the preprocessed data in chronological order. Each window contains both the original variable values within consecutive time steps and the corresponding cumulative sums and other statistical features to fully represent the temporal information.
[0037] As an optional embodiment, in step 130, the initial forging production line energy consumption prediction model is trained based on the production line energy consumption dataset until the initial forging production line energy consumption prediction model meets the preset convergence conditions, thereby obtaining the target forging production line energy consumption prediction model. The model can be trained in the same way as S1 to S3 to obtain the target forging production line energy consumption prediction model.
[0038] S1: Divide the production line energy consumption dataset into a training set and a test set to obtain the production line energy consumption training set and the production line energy consumption test set.
[0039] In S1, the data can be divided into training and testing sets according to time sequence. 80% of the data in the production line energy consumption dataset is selected as the training set, and the remaining 20% is selected as the testing set. This ensures that the training data and testing data maintain temporal continuity, which is suitable for time series prediction and avoids the "peeping" effect of future data on model training.
[0040] S2: Use the production line energy consumption training set to train the initial forging production line energy consumption prediction model to obtain the intermediate production line energy consumption prediction model.
[0041] In S2, the initial forging production line energy consumption prediction model can be trained using the training set data, and then tested using the test set in S3 to obtain the generalization performance of the intermediate production line energy consumption prediction model. The model performance can be optimized by early stop and learning rate adjustment strategies.
[0042] Specifically, the initial forging production line energy consumption prediction model can be trained using the production line energy consumption training set. The convolutional neural network model, bidirectional long short-term memory network model, KAN network model, and convolutional kernel attention mechanism can be sequentially fused and trained according to the methods in S21 to S24.
[0043] S21: Input the production line energy consumption training set into the convolutional neural network model, extract spatiotemporal features, and output spatiotemporal feature data for the forging production line.
[0044] Convolutional Neural Network (CNN) models employ local connectivity and weight sharing to perform high-dimensional mapping of raw data, effectively extracting data features. The structure of a CNN model includes convolutional layers, pooling layers, and fully connected layers. First, the CNN model performs one-dimensional convolution on the input data, extracting features through the convolutional layers. Then, pooling layers extract these local spatial features, and finally, the fully connected layers output the final feature.
[0045] Specifically, the production line energy consumption training set is input into a convolutional neural network model to extract spatiotemporal features, and the output spatiotemporal feature data for the forging production line can include: Using the one-dimensional convolution calculation formula: (3); Local feature extraction is performed; among which, Represents the output feature sequence after the convolution operation. Represents the input sequence of a convolutional neural network model. Represents the convolution kernel weight vector, Indicates the kernel size, This represents the element at time position t+i in the input sequence, where t represents the current time step. It should be noted that the input sequence of the convolutional neural network model is the temporal feature vector constructed by the sliding window.
[0046] S22: Input the spatiotemporal characteristic data of the forging production line into the bidirectional long short-term memory network model to capture the temporal dependency and output the first energy consumption state data for the forging production line, including the forward and backward dependencies of the spatiotemporal sequence data.
[0047] The Bidirectional Long Short-Term Memory (LSTM) network model evolved from the LSTM model, adding a new hierarchical structure. It primarily uses two LSTM units simultaneously to process the input sequence, extracting information from both directions: the forward LSTM processes the original sequence, and the backward LSTM processes the reverse sequence. The reversed result is then inverted and concatenated with the forward output. Applied to prediction, it allows the extraction of forward and backward dependencies from the forward and backward LSTMs, respectively, to predict the current energy consumption status of the forging production line.
[0048] Specifically, the spatiotemporal characteristic data of the forging production line is input into a bidirectional long short-term memory network model to capture temporal dependencies. The model outputs first energy consumption state data for the forging production line, including forward and backward dependencies of the spatiotemporal sequence data, as well as: Formula used: (4); Perform input gate operations.
[0049] Formula used: (5); Perform the forget gate operation.
[0050] Formula used: (6); Perform output gate operations.
[0051] Formula used: (7); Perform candidate memory unit operations.
[0052] Formula used: (8); Update the memory units.
[0053] Formula used: (9); Perform a hidden state update.
[0054] In formulas (4) to (9), Indicates time step The input vector serves as the input to the bidirectional long short-term memory network model. Indicates the hidden state of the previous time step. The weight matrix representing different gated units, The bias terms for different gated units are represented by σ, σ represents the Sigmoid function, tanh represents the hyperbolic tangent activation function, and ⊙ represents element-wise multiplication (Hadamard product). [] represents the concatenation of the hidden state of the previous time step and the input features of the current time step.
[0055] Furthermore, the formula can be used: (10); (11); (12); A bidirectional long short-term memory network model is used to extract the fusion hidden states of forward and backward dependencies in time series data. In equations (10) to (12), This represents the first energy consumption state data output after the fusion of the hidden states of the bidirectional LSTM. This indicates that the forward LSTM is at time step Hidden state This indicates that the backward LSTM is at time step Hidden state This represents the hidden state of the forward LSTM in the previous step. This represents the hidden state of the backward LSTM in the next step.
[0056] S23: Input the first energy consumption state data into the KAN network model, perform time-series feature reconstruction and nonlinear transformation, and output the second energy consumption state data for the forging production line.
[0057] The KAN module is inspired by the Kolmogorov-Arnold representation theorem, allowing arbitrary continuous functions to be represented. It can be decomposed into a series of nonlinear combinations. This is achieved through inner network ( ) and outer network (Φ) are used to construct complex function representations.
[0058] Specifically, the first energy consumption state data can be input into the KAN network model for time-series feature reconstruction and nonlinear transformation, outputting the second energy consumption state data for the forging production line, which may include: Based on the Kolmogorov-Arnold representation theorem, the formula is adopted: (13); The input data is combined nonlinearly; where, The input features are represented by n, which serve as the input to the KAN network model. Feature dimensions, This represents the p-th inner-layer nonlinear transformation function of the q-th group used to map a single input feature. This represents the q-th outer-layer combination function used to integrate the inner-layer transformation results of the corresponding group; Furthermore, the formula is adopted: (14); Define the KAN network matrix; where, This indicates the composition of functions. Represents the inner function matrix, Represents the outer function vector; The inner function matrix is composed of all inner nonlinear transformation functions; The outer function vector, composed of all outer combination functions, is represented in matrix form as follows: , Both are components of the following Kolmogorov-Arnold layer: .
[0059] ; in The transformation matrix for a single Kolmogorov-Arnold layer; middle ; middle .
[0060] It should be noted that in formula (14), This indicates that when defining the network matrix using the function composition operation method represented by formula (14), the first step is to execute... right The mapping, then execute. right The mapping is used to define the KAN network matrix.
[0061] Furthermore, the formula is adopted: (15); Determine the KAN stacking layers; where L represents any layer of the KAN network; that is, after defining the layers, constructing the Kolmogorov-Arnold network only requires stacking layers, and the entire L-layer KAN network is the network defined by formula (15).
[0062] Furthermore, the temporal features of the BiLSTM output are reconstructed after the KAN (Kolmogorov-Arnold Network) is defined above.
[0063] Specifically, each input feature can be mapped to a high-dimensional space through an inner network, and then the outputs of the inner network can be combined and mapped to the target space through an outer network. Finally, the original input information can be preserved through residual connections to enhance the expressive power of the model.
[0064] The main steps are as follows: Inner network computes multiple Functions, each network acts independently on the input variables. Its output serves as the input to the outer network. For the input features... Apply a fully connected layer to each inner function individually, and define multiple nonlinear transformations. , Indicates the index of the inner function.
[0065] The formula can be used: (16); For input features A fully connected layer is applied to each inner function individually, defining multiple nonlinear transformations; among them, Representing multiple nonlinear transformations, Indicates the index of the inner function, The fully connected layer operation corresponding to the j-th inner function is as follows: ;in, This represents the weight matrix of the j-th inner fully connected layer. Represents the bias vector of the j-th inner fully connected layer. The output dimension is 1.
[0066] Furthermore, the output of the fully connected layer is activated by ReLU using formula (17) to enhance nonlinearity.
[0067] (17); Furthermore, after normalization and regularization, the results of all inner layer transformations are concatenated into a high-dimensional feature vector using formula (18).
[0068] (18); in, This represents the splicing characteristics of the inner layer transformation, which serve as the input to the outer layer network.
[0069] Furthermore, the outer network is responsible for further combining the features to generate the final features; formula (19) can be used to utilize the outer network to... Perform full-connection and ReLU processing: (19); in, The weight matrix representing the outer layer combination, This represents the bias vector of the outer network.
[0070] Finally, using formula (20), the outputs of the inner and outer layers of the network are connected via residual connections to retain the original input information before being activated by ReLU: (20); in, The weight matrix representing the residual mapping, This represents the second energy consumption status data.
[0071] S24: Input the second energy consumption state data into the convolutional kernel attention mechanism, use the attention mechanism to perform feature weighting on the second energy consumption state data, and output the energy consumption prediction data for the forging production line.
[0072] The Kernel Attention module introduces local kernel features extracted by convolution to the traditional multi-head attention module. It uses a fully connected layer to perform a linear transformation on the output to generate the query, key, and value required for multi-head attention. The query, key, and value are reshaped and transposed to realize multi-head attention calculation. A one-dimensional convolutional layer is used as the kernel projection layer to extract the kernel features of the input data and multiply them by the attention scores calculated from the query and key. After softmax normalization and Dropout processing, the values are weighted using attention weights. Finally, after layer normalization, a residual connection is established with the output of the original KAN layer.
[0073] Specifically, the second energy consumption state data is input into the convolutional kernel attention mechanism, and the attention mechanism is used to perform feature weighting on the second energy consumption state data to output the energy consumption prediction data for the forging production line, including the technical means corresponding to S241 to S245.
[0074] S241: Linear transformation of query, key, and value.
[0075] Specifically, the input is mapped through a fully connected layer. (Where B is the batch size, T is the sequence length, and D is the feature dimension) to query ,key Sum A formula can be used: (twenty one); Map the fully connected layer to the input To query ,key Sum ;in, D represents the trainable weight matrix, and D′ represents the mapped dimension. B represents batch size, T represents sequence length, and D represents feature dimension.
[0076] S242: For each attention head, calculate the standard dot product attention score. Specifically, for each attention head, use the following formula: (twenty two); Calculate the standard dot product attention score; where, The dimension of the key vector Indicates to The last two dimensions are transposed, and Score represents the standard dot product attention score.
[0077] S243: Fusion of local kernel features.
[0078] Specifically, local kernel features of the input data can be extracted using one-dimensional convolutional layers. Then, the score is multiplied element-wise. That is, the formula is: (twenty three); (twenty four); Element-wise multiplication of the score is performed to fuse local kernel features; among which... For one-dimensional convolution operations, This indicates that local kernel features of the input data are extracted through a one-dimensional convolutional layer. This indicates the fusion of local kernel features.
[0079] S244: Softmax normalization and weighted summation.
[0080] Specifically, attention weights can be obtained by applying Softmax to the adjusted score. That is, the formula can be used: (25); The attention weights are obtained by applying Softmax to the adjusted scores. .
[0081] Then use attention weights to adjust the values We perform a weighted summation to obtain the attention output.
[0082] The formula can be used: (26); Values based on attention weights We perform a weighted summation to obtain the attention output. and through a linear projection matrix Map the multi-head attention output back to the original dimension and add residual connections and layer normalization: (27); in, For multi-head attention output, the projected features, `reshape` is a layer normalization operation, and `reshape` is a dimension reshaping operation.
[0083] S245: Feature fusion and output prediction are performed through a feedforward network. The feedforward network performs a nonlinear transformation on the output of the convolutional kernel attention mechanism.
[0084] Specifically, a feedforward network is used for feature fusion and output prediction. The feedforward network employs an attention mechanism on the convolutional kernels to predict the output. Nonlinear transformations can be performed using the following formula: (28); Then, through residual connections and layer normalization, we obtain: (29); The final prediction layer will use the output of the feedforward network. Flatten: (30); Then, it is mapped to a scalar output through a series of fully connected layers: (31); (32); (33); in, It is the local correlation features extracted by the convolutional kernel attention module from the output of the KAN network; Flatten is the flattening operation (converting multidimensional features into a one-dimensional vector). The weight matrix of the feedforward network, For the bias term of the feedforward network, The weight matrix of fully connected layer 1, For the bias terms of fully connected layer 1, The weight matrix of fully connected layer 2, For the bias terms of fully connected layer 2, For the final prediction output layer weight matrix, For the bias term of the final prediction output layer, This represents the predicted energy consumption data for the forging production line.
[0085] S3: Use the production line energy consumption test set to test the intermediate production line energy consumption prediction model. When the intermediate production line energy consumption prediction model meets the preset convergence conditions, use the intermediate production line energy consumption prediction model as the target forging production line energy consumption prediction model.
[0086] During model testing, the coefficient of determination can be used. The mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE) are used to evaluate the model's performance.
[0087] Specifically, the formula can be used: (34); (35); (36); (37); In formulas (34) to (35), Indicates the number of samples. Indicates the actual value. Indicates the predicted value. This represents the mean of the actual values.
[0088] Furthermore, to verify the prediction accuracy of the forging production line energy consumption prediction model constructed using the energy consumption prediction model construction method provided by this invention, please refer to [link to relevant documentation]. Figures 2 to 3 , Figure 2 A schematic diagram of the energy consumption curves for the training loss and validation loss curves of the forging production line energy consumption prediction model constructed in this invention. Figure 3 This diagram illustrates the comparison between the predicted energy consumption and the actual energy consumption of the forging production line energy consumption prediction model constructed in this invention. It should be noted that due to the large amount of training and validation data, only a portion of representative data is shown.
[0089] from Figure 2 The training loss shows a continuous decrease, rapidly dropping from approximately 0.15 to near 0.00, indicating that the model learns well on the training data and fits the training samples well. The validation loss initially decreases and then stabilizes; it also decreases rapidly in the early stages of iteration. In the actual validation data, after approximately 200 iterations, the validation loss stabilizes (fluctuating around 0.025) and no longer decreases significantly. This leads to the energy consumption prediction model for the forging production line established in this invention.
[0090] Further analysis using the energy consumption prediction model of this forging production line yielded the following results: Figure 3 The aforementioned comparison chart; from Figure 3It can be seen that the predicted curve and the actual curve are consistent in trend for most time steps, indicating that the model can capture the overall pattern of energy consumption change and improve the prediction accuracy of energy consumption in the forging production line.
[0091] Based on this, the present invention provides a method for constructing an energy consumption prediction model for a forging production line. This model employs a fusion of Convolutional Neural Network (CNN), Bidirectional Long Short-Term Memory (BiLSTM) network, Kolmogorov-Arnold Network (KAN), and kernel attention mechanism. The model is based on a large amount of production data, which is easy to collect, thus exhibiting strong generalization ability. Furthermore, this method can fully explore the coupling relationships between multiple processes and equipment, extract local and global features, and enhance nonlinear mapping capabilities through KAN, thereby achieving accurate prediction of the entire production line's energy consumption. This method differs from traditional single-equipment, single-process energy consumption modeling, and can more comprehensively reflect the dynamic energy consumption characteristics of the forging production line, providing strong support for optimizing energy management.
[0092] Secondly, this invention provides an energy consumption prediction method, which uses a forging production line energy consumption prediction model constructed using the energy consumption prediction model construction method described in the first aspect for prediction. Please refer to... Figure 4 , Figure 4 The diagram shows the main process of an energy consumption prediction method provided by the present invention. The main body executing the method is a service platform or terminal device equipped with the energy consumption prediction method provided by the present invention, such as a forging energy consumption management platform or a prediction terminal device attached to the forging platform.
[0093] exist Figure 4 In this context, energy consumption prediction methods may include: S410: Obtain the data to be predicted for the target forging production line.
[0094] In step 410, the data to be predicted for the target forging production line is data related to energy consumption; for example, for a forging production line used for automotive steering knuckles, the data to be predicted related to energy consumption may be 12 input variables, such as the forging exit temperature, pre-forging temperature, final forging temperature, trimming temperature, transfer robot R2 time, first to fourth impact force, overall line cycle time, off-line cycle time, and off-line quantity, as well as the time data corresponding to these 12 input variables.
[0095] S420: Perform data preprocessing on the data to be predicted to obtain target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction.
[0096] The data preprocessing method in step 420 is the same as the data preprocessing method in step 120 disclosed in the first aspect, and will not be described again here.
[0097] S430: Input the target prediction data into the trained forging production line energy consumption prediction model to predict the production line energy consumption, and obtain the energy consumption prediction of the target forging production line; the forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
[0098] In step 430, the trained forging production line energy consumption prediction model is the target forging production line energy consumption prediction model obtained after the first aspect of training; that is, the forging production line energy consumption prediction model obtained by serially fusing the convolutional neural network model, bidirectional long short-term memory network model, KAN network model, and convolutional kernel attention mechanism disclosed in the first aspect and then training the model, which has high energy consumption prediction accuracy. Therefore, inputting the target prediction data into this forging production line energy consumption prediction model can output energy consumption data of the target forging production line with high prediction accuracy.
[0099] Based on this, the energy consumption prediction method provided by the present invention obtains the data to be predicted for the target forging production line; performs data preprocessing on the data to be predicted to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction; then inputs the target prediction data into a trained forging production line energy consumption prediction model to predict the production line energy consumption, thereby obtaining the energy consumption prediction of the target forging production line; the forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism; it can obtain energy consumption data of the target forging production line with higher accuracy, improving the accuracy of forging production line energy consumption prediction; and solving the problem of poor accuracy in forging production line energy consumption prediction in the prior art.
[0100] Thirdly, the present invention provides an energy consumption prediction device, which is applied to the forging production line energy consumption prediction model constructed by the energy consumption prediction model construction method described in the first aspect. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of the structure of an energy consumption prediction device provided by the present invention.
[0101] exist Figure 5 In this context, the energy consumption prediction device may include: The acquisition module 510 is used to acquire the data to be predicted for the target forging production line.
[0102] The data preprocessing module 520 is used to preprocess the data to be predicted to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction.
[0103] The energy consumption prediction module 530 is used to input the target prediction data into the trained forging production line energy consumption prediction model to predict the production line energy consumption and obtain the energy consumption prediction of the target forging production line; the forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model and a convolutional kernel attention mechanism.
[0104] Based on this, the energy consumption prediction device provided by the present invention can acquire the data to be predicted for the target forging production line through the acquisition module 510; then, the data preprocessing module 520 performs data preprocessing on the data to be predicted to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction; finally, the energy consumption prediction module 530 inputs the target prediction data into the trained forging production line energy consumption prediction model to predict the production line energy consumption, thereby obtaining the energy consumption prediction of the target forging production line; the forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism; it outputs high-precision energy consumption data of the target forging production line, improving the accuracy of forging production line energy consumption prediction; and solving the problem of poor accuracy in forging production line energy consumption prediction in the prior art.
[0105] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed invention. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0106] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely exemplary descriptions of the invention as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A method for constructing an energy consumption prediction model, characterized in that, include: Obtain initial forging data; The initial forging data refers to forging data related to energy consumption on the forging production line; The initial forging data includes at least a plurality of initial forging variables and time characteristic data of the plurality of initial forging variables; The initial forging data is preprocessed to obtain the production line energy consumption dataset; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction. Based on the production line energy consumption dataset, the initial forging production line energy consumption prediction model is trained until it meets the preset convergence condition, thus obtaining the target forging production line energy consumption prediction model. The initial forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
2. The method of claim 1, wherein the energy consumption prediction model is constructed based on a plurality of energy consumption data of the at least one device. Based on the production line energy consumption dataset, the initial forging production line energy consumption prediction model is trained until it meets the preset convergence conditions, thus obtaining the target forging production line energy consumption prediction model, including: The production line energy consumption dataset is divided into a training set and a test set to obtain the production line energy consumption training set and the production line energy consumption test set. The initial forging production line energy consumption prediction model is trained using the production line energy consumption training set to obtain the intermediate production line energy consumption prediction model. The intermediate production line energy consumption prediction model is tested using the production line energy consumption test set. When the intermediate production line energy consumption prediction model meets the preset convergence conditions, the intermediate production line energy consumption prediction model is used as the target forging production line energy consumption prediction model. The step of training the initial forging production line energy consumption prediction model using the production line energy consumption training set includes: The production line energy consumption training set is input into the convolutional neural network model to extract spatiotemporal features and output spatiotemporal feature data for the forging production line. The spatiotemporal characteristic data of the forging production line are input into the bidirectional long short-term memory network model to capture temporal dependencies and output the first energy consumption state data for the forging production line, including the forward and backward dependencies of the spatiotemporal sequence data. The first energy consumption status data is input into the KAN network model, and time-series feature reconstruction and nonlinear transformation are performed to output the second energy consumption status data for the forging production line. The second energy consumption state data is input into the convolutional kernel attention mechanism, and the attention mechanism is used to perform feature weighting on the second energy consumption state data to output the energy consumption prediction data for the forging production line.
3. The method of claim 2, wherein the energy consumption prediction model is constructed based on the following equation: ###0001### where, E is the energy consumption prediction model, X is the input vector, and Y is the output vector. The step of inputting the production line energy consumption training set into the convolutional neural network model, extracting spatiotemporal features, and outputting spatiotemporal feature data for the forging production line includes: Using the one-dimensional convolution calculation formula: ; performing local feature extraction; wherein denotes the output feature sequence after convolution operation, denotes the input sequence of the convolutional neural network model, denotes the convolution kernel weight vector, denotes the convolution kernel size, denotes the element of the input sequence at the t+i time position, t denotes the current time step.
4. The method of claim 2, wherein the energy consumption prediction model is constructed based on the following equation: ###0001### where, E is the energy consumption prediction model, X is the input vector, and Y is the output vector. The process involves inputting the spatiotemporal characteristic data of the forging production line into the bidirectional long short-term memory network model to capture temporal dependencies and outputting first energy consumption state data for the forging production line, including forward and backward dependencies of the spatiotemporal sequence data. Formula used: ; Perform input gate operations; Formula used: ; Perform the forget gate operation; Formula used: ; Perform output gate operations; Formula used: ; Perform candidate memory unit operations; Formula used: ; Update the memory units; Formula used: ; performing hidden state update; wherein denotes the input vector at time step denotes the input vector at time step denotes the hidden state at the previous time step, denotes the weight matrix of different gating units, denotes the bias term of different gating units, σ denotes a Sigmoid function, tanh denotes a hyperbolic tangent activation function, ⊙ denotes element-wise multiplication (Hadamard product), denotes the concatenation of the hidden state at the previous time step and the input feature at the current time step. Formula used: ; ; ; The fused hidden state of the bidirectional LSTM is outputted as the first energy consumption state data. The fused hidden state of the bidirectional LSTM is outputted as the first energy consumption state data. The hidden state of the forward LSTM at time step The hidden state of the forward LSTM at time step The hidden state of the backward LSTM at time step The hidden state of the backward LSTM at time step The hidden state of the forward LSTM at the previous step The hidden state of the backward LSTM at the next step.
5. The method of claim 2, wherein the energy consumption prediction model is constructed by using a machine learning algorithm. The step of inputting the first energy consumption status data into the KAN network model, performing time-series feature reconstruction and nonlinear transformation, and outputting the second energy consumption status data for the forging production line includes: Based on the Kolmogorov-Arnold representation theorem, the formula is adopted: ; nonlinearly combining the input data; wherein represents input features, n represents the feature dimension of the qth group, represents the pth inner nonlinear transformation function of the qth group for mapping a single input feature, represents the qth outer combination function for integrating the inner transformation results of the corresponding group. Formula used: ; define the KAN network matrix; wherein, denotes the function composition operation, denotes the inner function matrix, denotes the outer function vector; Formula used: ; Determine the KAN stacking layers; where L represents any layer of the KAN network; Formula used: ; For input features A fully connected layer is applied to each inner layer function to define multiple nonlinear transformations; wherein, represents the multiple nonlinear transformations, represents the index of the inner layer function, is the operation of the fully connected layer corresponding to the jth inner layer function, and the specific form is: ; wherein, represents the weight matrix of the jth inner fully connected layer, represents the bias vector of the jth inner fully connected layer, The output dimension of is 1. ReLU activation is used to enhance nonlinearity at the output of the fully connected layer: ; After normalization and regularization, the results of all inner layer transformations are concatenated into a high-dimensional feature vector: ; wherein represents the splicing feature of the inner layer transformation; The outer network layer is responsible for further combining the features to generate the final features; Outer network pair Fully connected and ReLU processing: ; wherein, denotes a weight matrix of the outer layer combination, denotes a bias vector of the outer layer network; The outputs of the inner and outer layers are connected via residual connections to preserve the original input information before being activated by ReLU. ; wherein, denotes a weight matrix for residual mapping, denotes second energy consumption state data.
6. The method of claim 2, wherein the energy consumption prediction model is constructed based on a plurality of energy consumption data of a plurality of users. The step of inputting the second energy consumption state data into the convolutional kernel attention mechanism, using the attention mechanism to perform feature weighting on the second energy consumption state data, and outputting energy consumption prediction data for the forging production line includes: Formula used: ; Map the fully connected layer to the input To query ,key Sum ;in, D represents the trainable weight matrix, and D′ represents the mapped dimension. B represents batch size, T represents sequence length, and D represents feature dimension; For each attention point, the formula is as follows: ; Calculate the standard dot product attention score; where, The dimension of the key vector Indicates to The last two dimensions are transposed, and Score represents the standard dot product attention score; Formula used: ; ; Element-wise multiplication of the score is performed to fuse local kernel features; among which... This indicates that local kernel features of the input data are extracted through a one-dimensional convolutional layer. Indicates fusion of local kernel features; Formula used: ; The attention weights are obtained by applying Softmax to the adjusted scores. ; Formula used: ; Values based on attention weights We perform a weighted summation to obtain the attention output. and through linear projection Map the multi-head attention output back to the original dimension and add residual connections and layer normalization: ; Feature fusion and output prediction are performed using a feedforward network. The feedforward network uses an attention mechanism on the convolutional kernels to output the feature. Perform nonlinear transformation: ; Then, through residual connections and layer normalization, we obtain: ; The final prediction layer will use the output of the feedforward network. Flatten: ; Then, it is mapped to a scalar output through a series of fully connected layers: ; ; ; in, This indicates the predicted energy consumption data for the forging production line. The weight matrix of the feedforward network, For the bias term of the feedforward network, The weight matrix of fully connected layer 1, For the bias terms of fully connected layer 1, The weight matrix of fully connected layer 2, For the bias terms of fully connected layer 2, For the final prediction output layer weight matrix, This is the bias term for the final prediction output layer.
7. The method for constructing the energy consumption prediction model as described in claim 1, characterized in that, The process of preprocessing the initial forging data to obtain the production line energy consumption dataset includes: Formula used: ; Outlier removal was performed on the forging data; among which, This represents the sample mean; denoted by , where represents the sample standard deviation and x represents the original data.
8. The method for constructing the energy consumption prediction model as described in claim 7, characterized in that, The process of preprocessing the initial forging data to obtain the production line energy consumption dataset includes: Formula used: ; The forging data is standardized, where, It is the variable after removing outliers; This represents the sample mean of the variable; The sample standard deviation of the variable; These are standardized variables.
9. An energy consumption prediction method, characterized in that, The energy consumption prediction method uses the energy consumption prediction model for the forging production line constructed by the method described in any one of claims 1 to 8 to make predictions. The prediction method includes: Obtain the forecast data for the target forging production line; The data to be predicted is preprocessed to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction. The target prediction data is input into the trained forging production line energy consumption prediction model to predict the production line energy consumption, thereby obtaining the energy consumption prediction of the target forging production line; the forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
10. An energy consumption prediction device, characterized in that, The energy consumption prediction device is applied to the forging production line energy consumption prediction model constructed by the energy consumption prediction model construction method according to any one of claims 1 to 8, and the device includes: The acquisition module is used to acquire the data to be predicted from the target forging production line; A data preprocessing module is used to preprocess the data to be predicted to obtain the target prediction data; the data preprocessing includes at least time format conversion, 3σ criterion for outlier removal, data standardization, and data time series construction. An energy consumption prediction module is used to input the target prediction data into a trained forging production line energy consumption prediction model to predict the energy consumption of the production line and obtain the energy consumption prediction of the target forging production line. The forging production line energy consumption prediction model is a network model obtained by serially fusing a convolutional neural network model, a bidirectional long short-term memory network model, a KAN network model, and a convolutional kernel attention mechanism.
Citation Information
Patent Citations
Metallurgical enterprise energy consumption prediction method based on integrated long-term and short-term memory network
CN110533249A
Wind power probability prediction model based on VMD and CNN-LSTM
CN113673768A
Marine corrosion real-time monitoring method and system, terminal and storage medium
CN119198525A
Method and device for accurately predicting forging heating energy consumption based on hybrid model driving
CN120297120A
Multi-sensor and cross-working-condition industrial fault diagnosis method
CN120822033A