CN117829374A - Prediction method and system for power consumption of iron and steel enterprises - Google Patents

Prediction method and system for power consumption of iron and steel enterprises Download PDF

Info

Publication number
CN117829374A
CN117829374A CN202410146483.XA CN202410146483A CN117829374A CN 117829374 A CN117829374 A CN 117829374A CN 202410146483 A CN202410146483 A CN 202410146483A CN 117829374 A CN117829374 A CN 117829374A
Authority
CN
China
Prior art keywords
data
power consumption
model
prediction
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410146483.XA
Other languages
Chinese (zh)
Inventor
蒋俊
刘昕
魏雪琴
谢佳琳
董建刚
吴传汉
夏平
张威
黄凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wisco Gases Co ltd
Original Assignee
Wisco Gases Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wisco Gases Co ltd filed Critical Wisco Gases Co ltd
Priority to CN202410146483.XA priority Critical patent/CN117829374A/en
Publication of CN117829374A publication Critical patent/CN117829374A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/096Transfer learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Economics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A prediction method and system of power consumption of iron and steel enterprises relates to the field of data analysis, and the method comprises the following steps: collecting historical power consumption data for a plurality of time periods; preprocessing historical power consumption data; analyzing the historical power consumption data, and extracting to obtain key data characteristics; model training is carried out based on the key data characteristics and a plurality of test model frames, so that a plurality of initial prediction models are obtained; based on a transfer learning technology, taking a preset related model as a starting point, and performing fine adjustment on a plurality of initial prediction models to obtain a plurality of optimized prediction models; determining an optimized prediction model with highest performance evaluation score as a preferred prediction model; model parameters of the optimal prediction model are adjusted to obtain a final power consumption prediction model; and inputting the real-time power consumption data into a final power consumption prediction model to obtain a power consumption prediction result. By implementing the method, under the condition of insufficient enterprise historical data, the model fine adjustment is performed by applying the transfer learning technology, so that the problem of insufficient data is solved.

Description

Prediction method and system for power consumption of iron and steel enterprises
Technical Field
The application relates to the field of data analysis, in particular to a method and a system for predicting power consumption of a steel enterprise.
Background
With the development of industrialization progress, the power consumption of iron and steel enterprises is in a continuously growing situation. The power consumption of the iron and steel enterprises is not only related to the output of the iron and steel enterprises, but also related to various complex factors, such as equipment running conditions, weather conditions and the like, and the accuracy of the prediction results directly influences the power utilization decision of the enterprises and saves the cost. In order to improve the accuracy of power consumption prediction, enterprises are urgent to adopt scientific and reasonable prediction methods.
In the related art, some iron and steel enterprises use statistical models to predict power consumption, such as time series analysis models, linear regression models, and the like. The models can mine statistical rules among data, establish mathematical relations between data features and results, and realize model training of historical data.
However, the statistical model in the related art relies on a large amount of historical data, and in practical application of enterprises, sufficient training samples cannot be obtained. The corresponding electricity consumption prediction method also has the problem of insufficient training samples, so that the prediction result is inaccurate, and the demand of steel enterprises on electricity consumption prediction cannot be met.
Disclosure of Invention
The application provides a method and a system for predicting power consumption of a steel enterprise, which are used for improving the accuracy of power consumption prediction of the steel enterprise. The historical power consumption data is collected from a plurality of data sources of an enterprise, a plurality of model frames are adopted for training based on the extracted characteristic data to obtain a plurality of initial prediction models, then the models with the best performance are selected and continuously optimized, various data affecting power consumption can be effectively utilized, the accuracy of a prediction result is improved through model training and optimization, and the requirements of the enterprise on power consumption prediction are met. Meanwhile, under the condition of insufficient historical data of enterprises, the model is finely adjusted by applying a transfer learning technology, so that the problem of insufficient data is solved, and the prediction effect is ensured.
In a first aspect, the present application provides a method for predicting power consumption of an iron and steel enterprise, which is applied to a server of a power consumption prediction system, and the method includes: collecting historical power consumption data for a plurality of time periods from a plurality of data sources of the iron and steel enterprise; the historical power consumption data comprises production line data, equipment operation records, energy consumption logs, weather conditions and electric market prices; preprocessing historical power consumption data; preprocessing comprises removing abnormal values, processing missing data and normalizing; analyzing the historical power consumption data based on the domain knowledge data, and extracting to obtain key data characteristics; key data features include throughput, run time, seasonal factors, and historical power consumption trends; model training is carried out based on the key data characteristics and a plurality of test model frames, so that a plurality of initial prediction models are obtained; the test model framework comprises a time sequence analysis model, a machine learning regression model and a deep learning neural network model; when the number of the historical power consumption data is lower than a preset number threshold value, based on a transfer learning technology, taking a preset correlation model as a starting point, and performing fine adjustment on a plurality of initial prediction models to obtain a plurality of optimized prediction models; testing the performances of a plurality of optimized prediction models by using preset verification data to obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determining the optimized prediction model with the highest performance evaluation score as a preferable prediction model; model parameters of the optimal prediction model are adjusted according to the corresponding performance evaluation result, and a final power consumption prediction model is obtained; and inputting the collected real-time power consumption data into a final power consumption prediction model to obtain a power consumption prediction result.
In the above embodiment, the server collects historical power consumption data from multiple data sources of the enterprise, performs preprocessing on the data, extracts key features, trains by adopting multiple models to obtain multiple initial prediction models, performs fine adjustment on the basis of related models by using a transfer learning technology to obtain multiple optimization models, selects an optimal model as a prediction model, adjusts parameters to obtain a final model, inputs real-time data to perform prediction, and realizes correction of the model by using the transfer learning under the condition of insufficient historical data of the enterprise, thereby solving the problem of insufficient data, improving the prediction accuracy and meeting the requirements of the enterprise on power prediction. The method fully utilizes various power consumption affecting data of enterprises, improves the power consumption prediction accuracy by training an optimization model, and optimizes the problem of inaccurate prediction caused by the fact that the existing method depends on a large amount of historical data.
With reference to some embodiments of the first aspect, in some embodiments, the analyzing the historical power consumption data based on the domain knowledge data, and extracting the key data features specifically includes: acquiring a professional knowledge base written by an industrial engineer; the professional knowledge base comprises a plurality of characteristic factors which influence the power consumption of the iron and steel enterprises; the characteristic factors comprise steel yield, equipment use time, peak electricity consumption time, holiday factors, climate factors and raw material price changes; carrying out matching analysis on the historical power consumption data and a plurality of characteristic factors in a professional knowledge base to obtain a plurality of matching results; calculating the correlation degree between the historical power consumption data and the characteristic factors according to a plurality of matching results; and selecting the first N characteristic factors with highest correlation degree as key data characteristics.
In the embodiment, the server performs matching analysis on the professional knowledge base written by the engineer and the historical data, calculates the characteristic factor with the highest correlation degree as key characteristic data, realizes intelligent extraction of the key characteristic factor influencing power consumption based on domain knowledge, improves the effectiveness of model training, and provides an intelligent characteristic extraction technical scheme.
With reference to some embodiments of the first aspect, in some embodiments, based on the migration learning technology, fine tuning is performed on a plurality of initial prediction models with a preset correlation model as a starting point to obtain a plurality of optimized prediction models, which specifically includes: determining a plurality of preset correlation models associated with a plurality of initial prediction models as a starting point model; the method comprises the steps that a plurality of preset correlation models are trained on a preset number of historical power consumption data of the correlation industry in advance; training parameters of a fully connected network layer of the starting point model by using historical power consumption data to obtain fine-tuned parameters; and fine tuning the initial prediction model by using the fine-tuned parameters to obtain a plurality of optimized prediction models.
In the above embodiment, the server determines the relevant preset model as the starting model of the migration learning, trains the parameters of the starting model by using the enterprise historical data, realizes the migration fine tuning of the model, and solves the problem of insufficient data. The method fully utilizes a pre-training model of related industries as a preset related model, realizes cross-domain transfer learning, expands self data of enterprises, solves the problem of insufficient sample data, plays an important role in model training quality, and is an efficient transfer learning technology application.
With reference to some embodiments of the first aspect, in some embodiments, before the step of collecting historical power consumption data for a plurality of time periods from a plurality of data sources of the iron and steel enterprise, the method further comprises: configuring a plurality of data interfaces, and connecting the plurality of data interfaces with a plurality of data sources of the iron and steel enterprises; the plurality of data sources comprise a production management system, a device operation and maintenance system, a meteorological system and a power transaction system; the automatic data transmission is realized between the plurality of data interfaces and the plurality of data sources; according to a data acquisition strategy, pulling production data, equipment operation data, meteorological data and transaction electricity price data in a preset time period from a plurality of data sources through a plurality of data interfaces in a preset time period to obtain an initial data set; and storing an initial data set, and constructing a historical electricity consumption database of the iron and steel enterprise.
In the embodiment, before the server collects the historical data, the server is firstly configured with an interface to connect with a data source, and data of different systems are actively pulled according to strategies to construct an enterprise historical database, so that automatic data collection and storage are realized, the problem of inefficiency of manually collecting data is solved, the problem of non-uniform data formats of different systems is avoided, and the follow-up model training data sources are reliable and organized.
With reference to some embodiments of the first aspect, in some embodiments, before the step of inputting the collected real-time power consumption data into the final power consumption prediction model to obtain the power consumption prediction result, the method further includes: detecting whether deviation exists between the data characteristics of the collected real-time power consumption data and the training data characteristics of the final power consumption prediction model; if so, based on an online learning mode, the final power consumption prediction model is incrementally trained by using real-time power consumption data.
In the embodiment, the server detects the deviation from the model training data when collecting the real-time data, and if the deviation exists, the real-time data increment is used for adjusting the model, so that continuous online learning and optimization of the model are realized, the problem that the accuracy of the model is easy to reduce in practical application is solved, the prediction model can be dynamically adapted to new data, continuous optimization is realized, and the prediction robustness is improved.
With reference to some embodiments of the first aspect, in some embodiments, after the step of inputting the collected real-time power consumption data into the final power consumption prediction model to obtain the power consumption prediction result, the method further includes: performing verification analysis on abnormal data points based on the power consumption prediction result to obtain root causes of the abnormal data points; the abnormal data points are actual power consumption data points which differ from the power consumption prediction result by more than a preset difference threshold value; root causes include data anomalies, model under-fits, and new factor effects; if the root cause is data abnormality, eliminating abnormal data points, and keeping the final power consumption prediction model unchanged; if the root cause is model under fitting, acquiring more training data, and incrementally adjusting a final power consumption prediction model by using the more training data; if the root cause is influenced by a new factor, identifying the influencing factor influenced by the new factor, incorporating the influencing factor into the feature engineering, and retraining the final power consumption prediction model by using the newly added feature.
In the embodiment, the server distinguishes three conditions of abnormal data, model under-fitting and new factor influence by analyzing the reason of abnormal prediction results, and gives out a corresponding model optimization strategy, so that diagnosis and model optimization of prediction errors are realized, the problem that the prediction errors cannot be corrected in a targeted manner is solved, and the prediction method is more intelligent and adaptive.
With reference to some embodiments of the first aspect, in some embodiments, performing a verification analysis on the abnormal data point based on the power consumption prediction result to obtain a root cause of the abnormal data point, specifically including: calculating the abnormal proportion of the number of abnormal data points to the total number of all data points; if the anomaly ratio is smaller than a first preset threshold value, determining that the root cause is data anomaly; calculating a plurality of prediction errors for all data points; if the average error of the plurality of prediction errors is larger than a second preset threshold value, determining that the root cause is model under fitting; determining that the root cause is influenced by a new factor when a related event is newly added in a preset time period before and after the abnormal data point is detected; the related events include raw material price increase and holidays.
In the above embodiment, the server determines the cause of the abnormality by calculating the equivalent index of the average value of the abnormal data duty ratio and the prediction error, thereby realizing a quantified error determination strategy, avoiding subjective speculation, having more accurate determination result and more reasonable processing strategy.
In a second aspect, embodiments of the present application provide a server, including: a data collection module for collecting historical power consumption data of a plurality of time periods from a plurality of data sources of the iron and steel enterprises; the historical power consumption data comprises production line data, equipment operation records, energy consumption logs, weather conditions and electric market prices; the preprocessing module is used for preprocessing the historical power consumption data; preprocessing comprises removing abnormal values, processing missing data and normalizing; the feature extraction module is used for analyzing the historical power consumption data based on the domain knowledge data and extracting key data features; key data features include throughput, run time, seasonal factors, and historical power consumption trends; the model training module is used for carrying out model training based on the key data characteristics and a plurality of test model frames to obtain a plurality of initial prediction models; the test model framework comprises a time sequence analysis model, a machine learning regression model and a deep learning neural network model; the model correction module is used for carrying out fine adjustment on a plurality of initial prediction models by taking a preset related model as a starting point based on a transfer learning technology when the number of the historical power consumption data is lower than a preset number threshold value to obtain a plurality of optimized prediction models; the model screening module is used for testing the performances of the plurality of optimized prediction models by using preset verification data to obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determining the optimized prediction model with the highest performance evaluation score as a preferable prediction model; the model optimization module is used for adjusting model parameters of the optimal prediction model according to the corresponding performance evaluation result to obtain a final power consumption prediction model; the data prediction module is used for inputting the collected real-time power consumption data into a final power consumption prediction model to obtain a power consumption prediction result.
In a third aspect, embodiments of the present application provide a server, including: one or more processors and memory; the memory is coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors call to cause the server to perform the method as described in the first aspect and any possible implementation of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a server, cause the server to perform a method as described in the first aspect and any possible implementation of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium comprising instructions that, when executed on a server, cause the server to perform a method as described in the first aspect and any possible implementation of the first aspect.
It will be appreciated that the servers provided in the second aspect, the third aspect, the computer program product provided in the fourth aspect, and the computer storage medium provided in the fifth aspect are each configured to perform the method provided in the embodiment of the present application. Therefore, the advantages achieved by the method can be referred to as the advantages of the corresponding method, and will not be described herein.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
1. the method has the advantages that the technical scheme that historical power consumption data are collected from a plurality of data sources of an enterprise, a plurality of models are trained based on characteristic data, and model optimization fine adjustment is carried out through transfer learning is adopted, so that various multi-source heterogeneous data affecting power consumption of the enterprise are fully utilized, the plurality of models are trained, an optimal model is selected, the problem that single model accuracy is low is solved, data of related industries can be used in the model training process through transfer learning, the problem that the data volume of the enterprise is insufficient is solved, the problem that the model training is insufficient due to the fact that a large amount of historical data is relied on in the related art, and the problem that data cannot be shared among different enterprises is effectively solved, further, an enterprise power consumption prediction model with high accuracy can be trained under the condition that the historical data of the enterprise is limited, accuracy of a prediction result is improved, and the requirement of the enterprise on power prediction is met.
2. Due to the adoption of the technical scheme of detecting the deviation of the real-time data and the training data and performing incremental learning to adjust the model, the prediction deviation situation possibly occurring in the actual application process of the prediction model can be detected, new data are used for incremental adjustment of model parameters, the problem that the model is easy to decline in accuracy in actual use is solved, the problem that the model cannot be updated after one-time training in the related art is effectively solved, and further the prediction model can be dynamically adapted to the new real-time data and is continuously subjected to self-improvement and optimization, so that the generalization capability and the prediction robustness of the model are improved.
3. The method has the advantages that the subjective assumption can be avoided because the technical scheme that the prediction deviation causes are judged through quantitative analysis indexes and the model is optimized in a targeted mode is adopted, the reasons for judging the prediction problems are more accurate through quantitative analysis, the problem that a reasonable model optimization strategy cannot be provided corresponding to different error conditions in the related technology is solved, quantitative analysis and diagnosis can be further carried out on the deviation of model prediction, different model retraining or optimization schemes are provided in a targeted mode, and intelligent treatment is carried out on the prediction model, so that the intelligent level and the prediction accuracy of a prediction system are greatly improved.
Drawings
FIG. 1 is a schematic flow chart of a method for predicting power consumption of an iron and steel enterprise according to an embodiment of the present application;
FIG. 2 is another flow chart of a method for predicting power consumption of an iron and steel enterprise according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a functional module of a server according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a physical device of a server according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of this application, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this application is intended to encompass any or all possible combinations of one or more of the listed items.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
For easy understanding, the application scenario of the embodiments of the present application is described below;
iron and steel enterprise A is located in certain city of Hubei province, and the main product is steel for building. In recent three years, with the rapid growth of the downstream real estate market, enterprises increase the productivity investment, new blast furnace and rolling mill equipment are put into production successively, and annual steel production is increased from 300 ten thousand tons to 500 ten thousand tons. As the production increases, the power consumption of the enterprise increases rapidly. But the power forecast and procurement plan of the enterprise are still roughly estimated according to past experience, and are mainly forecast according to the total power consumption of the last year and the estimated growth rate. Such predictions cannot reflect real seasonal power consumption peaks and equipment operation dynamic change conditions, so that enterprises are seriously powered off in summer and production is seriously affected; and there is a partial waste of power during off-peak hours. Therefore, the enterprise decides to establish an automatic prediction system to realize the refined prediction of the power consumption of one week or one month in the future, so that the power purchasing plan can adapt to the actual power demand.
In the related art, rough prediction of the power consumption of the iron and steel enterprises can be achieved by adopting a simple statistical method or a linear regression model. According to the method, only a single variable or a small number of variables are considered, so that an oversimplified mathematical model is established, a complex real scene cannot be accurately described, and a large error exists in a prediction result.
A scenario using a prediction method of power consumption of a steel enterprise in the related art will be described.
Aiming at the power consumption prediction problem, the enterprise B tries to apply a linear regression model to predict. The model uses the annual average steel yield of the past 3 years as an independent variable X and the historical annual power consumption total as a dependent variable Y, and a linear regression equation Y=500+3.2X is obtained by fitting. The predicted power consumption is then calculated with the expected steel production taken into the future week or month. However, this model only considers a single variable of steel production, and does not consider other influencing factors such as temperature, seasons, equipment changes, and the like. And the relation between the steel yield and the power consumption is not a simple linear relation, and the prediction error of the linear regression model is large. The maximum temperature of 7 months in 2018 shows historic high-temperature weather, and the model cannot predict the influence of the temperature change at all, so that the actual power consumption of the month exceeds a predicted value, and large-area power failure of enterprises is caused.
By adopting the prediction method of the power consumption of the iron and steel enterprise in the embodiment of the application, the accurate prediction of the power consumption of the iron and steel enterprise is realized by constructing a complex nonlinear machine learning model, so that various influencing factors can be comprehensively considered, the complex nonlinear relation among variables can be automatically learned, and the prediction accuracy is remarkably improved.
The following describes a scenario in which the prediction method of the power consumption of the iron and steel enterprise in the present application is used.
To improve the accuracy of the power consumption prediction, enterprise C decides to use a machine learning model. The input variables of the model comprise various influencing factors such as steel yield, rolling mill working time, blast furnace working time, average temperature, holidays and the like in the past two years. And carrying out model training on the input variable and the actual power consumption by adopting a random forest algorithm to obtain a random forest regression model. The model can automatically learn complex nonlinear relations among a plurality of variables without manually designating a regression equation. In the prediction of 7 months in 2018, the random forest model considers the influence of temperature, so that the prediction result is more accurate, the prediction error is reduced by 30%, and the occurrence of power failure is avoided. The model verifies that the machine learning model can remarkably improve the accuracy of power consumption prediction of the iron and steel enterprises.
Therefore, by adopting the method for predicting the power consumption of the iron and steel enterprise in the embodiment of the application, the problems of single data, simplified model and the like in the related technology can be effectively solved while the accurate prediction of the power consumption of the iron and steel enterprise is realized, and the effect of power consumption prediction is greatly improved.
For ease of understanding, the method provided in this embodiment is described in the following in conjunction with the above scenario. Fig. 1 is a schematic flow chart of a method for predicting power consumption of an iron and steel enterprise according to an embodiment of the present application.
S101, collecting historical power consumption data of a plurality of time periods from a plurality of data sources of an iron and steel enterprise.
The server may collect historical power consumption data for a plurality of time periods from a plurality of data sources for the iron and steel enterprise. The server can be connected with a plurality of data sources such as a production management system, a device operation and maintenance system, a meteorological system, a power transaction system and the like of an enterprise through configuring a plurality of data interfaces, so that data transmission and integration among different systems are realized. For example, standard interface protocols such as OPC, RESTful, etc. may be employed, or middleware may be used to implement system integration. In a preset time period, for example, 2 a.m. a day, the server can automatically start the data interface and send a data pulling request to acquire all production data, equipment operation data, meteorological data and power transaction data of the last day or the past month.
S102, preprocessing the historical power consumption data.
After the original data set is obtained, the server can preprocess the historical power consumption data, and the main purpose is to improve the effect of subsequent machine learning. Common preprocessing steps include format conversion, outlier removal, missing value filling, smoothing, normalization, etc. For example, converting data of different data sources into a unified format, such as a CSV format; removing outliers and error data in the data set by using a four-quadrant rule and other methods; filling missing data by means of mean value filling, interpolation filling, model prediction filling and the like; smoothing the data by using a moving average or the like, and reducing noise; finally, different features are normalized by adopting methods such as Z-Score normalization and Min-Max normalization, and feature values are mapped to the same magnitude range, so that model training is facilitated. The server can select and design a proper preprocessing flow according to the characteristics of the data to obtain clean, unified and normalized structured data.
S103, analyzing the historical power consumption data based on the domain knowledge data, and extracting to obtain key data features.
After preprocessing, the server analyzes the historical power consumption data based on domain knowledge, and extracts key characteristic variables by using a characteristic engineering method. The server may obtain a expertise repository in which various characteristic factors affecting the power consumption of the iron and steel enterprise, such as iron and steel production, equipment use time, peak hours, holidays, climate, etc., are summarized by the system. Then, the server performs matching analysis on the collected historical power consumption data and the influence factors, calculates correlation between the two variables, and extracts the characteristic variables with strong correlation. Variables such as "steel yield" and "average temperature" which are strongly related. Reasonable characteristic variables are selected, so that the effect of subsequent modeling and the prediction accuracy can be improved.
And S104, performing model training based on the key data features and a plurality of test model frames to obtain a plurality of initial prediction models.
After the key characteristic variables are obtained, the server performs model training based on the data of the variables and a plurality of machine learning models to obtain a plurality of initial prediction models. The server may choose different types of model frameworks to train, for example, a time series analysis model (e.g., ARIMA) may analyze the time correlation of variables; machine learning regression models such as linear regression can establish mathematical relationships between variables; and the deep learning models such as tree models, neural networks and the like can automatically learn complex nonlinear relations among variables. The server takes the collected historical power consumption data and related characteristic data as training samples of the models, configures super parameters of each model, such as hidden layer unit numbers of a recurrent neural network, and the like, and trains a plurality of different models. By repeating the process, a plurality of initial prediction models based on different algorithms, such as an LSTM model, a random forest model and the like, can be finally obtained. These are also just initial models and require further selection optimization.
And S105, when the number of the historical power consumption data is lower than a preset number threshold, performing fine adjustment on the plurality of initial prediction models by taking a preset correlation model as a starting point based on a transfer learning technology to obtain a plurality of optimized prediction models.
After obtaining a plurality of initial predictive models, the server optimizes the models, particularly when the historical power consumption data volume is insufficient, and the model optimization can be performed by using a transfer learning technology. For example, an LSTM model may be pre-trained, and then this model may be used as a pre-trained model, with intermediate parameters frozen, and only a few neurons at the output layer trained, with fine tuning using the small amount of historical power consumption data of the enterprise itself. Thus, an optimization model with good performance and suitable for the current enterprise can be obtained rapidly. The server can also use models in other related fields as starting points of transfer learning, such as a properly pre-trained industrial yield prediction model and the like, and use historical power consumption data of steel enterprises to finely adjust a full-connection layer and the like to obtain a plurality of optimization models based on the transfer learning so as to solve the problem of insufficient data.
S106, testing the performances of the plurality of optimized prediction models by using preset verification data to obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determining the optimized prediction model with the highest performance evaluation score as a preferable prediction model.
The server obtains a plurality of candidate prediction models through a plurality of methods, and the models need to be evaluated and selected to obtain a final optimal model. The server may prepare a verification data set containing actual historical power consumption data over a period of time. And then testing the candidate models one by one, inputting data of the same verification set of the models, and comparing the prediction result output by the models with errors of real data. For example, evaluation metrics of MAE, RMSE, etc. may be calculated and the evaluation metrics of multiple models may be ranked. The candidate model with the best evaluation index is selected by the server as the preferred model, for example, if the LSTM model has the lowest RMSE among the 5 model comparisons, then the LSTM model is the preferred model. The evaluation index can further diagnose the problem of the model and provide basis for subsequent optimization.
And S107, adjusting model parameters of the optimal prediction model according to the corresponding performance evaluation result to obtain a final power consumption prediction model.
After obtaining the preferred model, the server can check the detailed index of the evaluation result, and further optimize the model. For example, the evaluation may show that the maximum error of the model is mainly due to summer data, indicating that the model is not fit enough to seasonal variations. The server may adjust the structure or parameters of the model, such as increasing seasonal dependent variables, increasing weights of related feature variables, allowing the model to enhance training on summer samples. Through the index-driven model tuning, the server can obtain a final prediction model for further improving the performance for formal deployment. After the final model is obtained, new data are continuously collected, the performance of the model is monitored, and the model is prevented from being outdated.
S108, inputting the collected real-time power consumption data into a final power consumption prediction model to obtain a power consumption prediction result.
After the server obtains the final power consumption prediction model, the model can be used for predicting the newly input data. For example, new steel production data, plant operation data, temperature data, etc. are collected in real time from the sensors and systems, and the server pre-processes these real-time data as the historical data and then inputs the pre-processed data into a deployed predictive model that outputs predicted power consumption for one week or one month in the future. The prediction result is submitted to a power purchasing system for making a power purchasing plan of an enterprise. Meanwhile, the server can continuously track errors of actual power consumption and a prediction result so as to perform incremental optimization of the model.
In the above embodiments, specific flows and module designs from data collection, feature extraction to model training and optimization are described. In practical application, the continuous and automatic operation of the power consumption prediction task can be realized by taking the characteristics of continuity, dynamic data change and the like of an industrial environment into consideration and performing incremental learning, automatic tuning and other optimal designs.
The following supplements the scenario of the present embodiment.
On the basis of using a machine learning model, the enterprise D is further optimized, and an online learning mode is adopted. The predicted power consumption and the actual power consumption of the model are compared every day, and if the deviation is too large, the model is incrementally adjusted by using the actual data. Thus, the model can be continuously optimized and is suitable for new changes of enterprises. When a completely new influencing factor is found, it can also be added to the model features for retraining. In 9 months 2018, the price of raw materials rises, so that the power consumption is increased by about 5% compared with that expected. The incremental learning model detects the change rapidly, automatically adjusts the model, and ensures the accuracy of prediction. The online learning enables the enterprise to realize automation and intellectualization of power consumption prediction, and has important significance for optimizing the power purchasing plan.
In combination with the above scenario, a further more specific flow of the method provided in this embodiment will be described below. Fig. 2 is a schematic flow chart of a method for predicting power consumption of an iron and steel enterprise according to an embodiment of the present application.
S201, collecting historical power consumption data of a plurality of time periods from a plurality of data sources of the iron and steel enterprises.
Referring to step S101, the server collects historical power consumption data.
In some embodiments, the server first configures a plurality of data interfaces, and connects the plurality of data interfaces with a plurality of data sources of the iron and steel enterprise; the plurality of data sources comprise a production management system, a device operation and maintenance system, a meteorological system and a power transaction system; the automatic data transmission is realized between the plurality of data interfaces and the plurality of data sources; according to a data acquisition strategy, pulling production data, equipment operation data, meteorological data and transaction electricity price data in a preset time period from a plurality of data sources through a plurality of data interfaces in a preset time period to obtain an initial data set; and storing an initial data set, and constructing a historical electricity consumption database of the iron and steel enterprise.
Specifically, first, the server configures a plurality of data interfaces, and connects with a plurality of systems inside the iron and steel enterprise through the standardized interfaces. For example, the interface can be realized by adopting the modes of an industrial internet standard OPC interface, a Restful API and the like to be in butt joint with a production management system of an enterprise, so that real-time production data such as information of steel yield, production line working time and the like can be obtained. Meanwhile, the device is also required to be in butt joint with an equipment operation and maintenance system to acquire data such as operation time and energy consumption of various manufacturing and rolling equipment. Real-time meteorological data such as temperature, humidity and the like of the geographic information system can be obtained by configuring an API interface. In addition, for the data of the power trading system, a special acquisition interface may need to be configured to acquire the electricity price information of the enterprise participating in the power market trade. Second, the server allows automated data transfer and integration between the different systems. For example, an intermediate data warehouse can be established to collect data and realize automatic data pushing or pulling based on event driving and other modes. And seamless connection between heterogeneous systems can be realized by using a middleware technology. Then, the server automatically starts the interface according to a data collection strategy, such as 2 a.m. every day, and actively pulls all data in a specified time period from the upstream system according to a preset data period, such as the last week, month, etc. These data will constitute an initial raw data set that the server can store in a relational database for use in constructing a historical electricity consumption database for the iron and steel enterprise. By continuously pulling up the latest incremental data and combining and storing the latest incremental data, the server can collect historical power consumption related data accumulated for a longer time span and provide rich sample data support for subsequent machine learning model training and prediction.
S202, preprocessing historical power consumption data.
Referring to step S102, the server pre-processes the historical power consumption data.
And S203, analyzing the historical power consumption data based on the domain knowledge data, and extracting to obtain key data features.
Referring to step S103, the server extracts key data features.
In some embodiments, the server will obtain a specialized knowledge base written by the industrial engineer; the professional knowledge base comprises a plurality of characteristic factors which influence the power consumption of the iron and steel enterprises; the characteristic factors comprise steel yield, equipment use time, peak electricity consumption time, holiday factors, climate factors and raw material price changes; carrying out matching analysis on the historical power consumption data and a plurality of characteristic factors in a professional knowledge base to obtain a plurality of matching results; calculating the correlation degree between the historical power consumption data and the characteristic factors according to a plurality of matching results; and selecting the first N characteristic factors with highest correlation degree as key data characteristics.
Specifically, firstly, a server obtains a professional knowledge base summarized and written by an industrial engineer, and the knowledge base systematically summarizes influence factors of power consumption of a steel enterprise and comprises a plurality of characteristic factors which possibly influence the power consumption of the enterprise. These characteristic factors include both direct factors such as steel production, equipment time of use, and indirect factors such as peak electricity usage periods, holidays, climate, etc. External economic factors, such as raw material price changes, may also be included to cause enterprises to adjust production, indirectly affecting electricity consumption. Then, the server performs matching analysis on the collected historical power consumption data and characteristic factors in the professional knowledge base one by one, and judges whether correlation exists between the historical power consumption data and the characteristic factors. For example, the data correlation of steel yield data and historical power consumption can be calculated, and the matching analysis result of the two variables can be obtained. The process is repeated, and a matching result of a plurality of characteristic factors and target variables can be obtained. The server may then calculate the degree of correlation and the degree of correlation between each characteristic factor and the historical power consumption using statistical methods such as pearson correlation coefficients based on the plurality of matching results. A high degree of correlation indicates a strong correlation between the two, and the characteristic factor has an important effect on the target variable. Finally, the server may rank the feature factors according to the relevance levels, and select the top N feature factors with the highest relevance as key data features, that is, the most important input variables. This may help model training focus on the main influencing factors. Through the matching analysis and the correlation calculation, the server can automatically extract the most critical feature subset from a plurality of candidate factors, and provide important focused input variables for subsequent model training.
S204, model training is carried out based on the key data features and the test model frames, and a plurality of initial prediction models are obtained.
Referring to step S104, the server performs model training based on the multiple test model frames to obtain multiple initial prediction models.
And S205, when the number of the historical power consumption data is lower than a preset number threshold, performing fine adjustment on a plurality of initial prediction models by taking a preset correlation model as a starting point based on a transfer learning technology to obtain a plurality of optimized prediction models.
Referring to step S105, the server performs fine tuning on the plurality of initial prediction models to obtain a plurality of optimized prediction models.
In some embodiments, the server may determine a plurality of preset correlation models associated with the plurality of initial predictive models as starting point models; the method comprises the steps that a plurality of preset correlation models are trained on a preset number of historical power consumption data of the correlation industry in advance; training parameters of a fully connected network layer of the starting point model by using historical power consumption data to obtain fine-tuned parameters; and fine tuning the initial prediction model by using the fine-tuned parameters to obtain a plurality of optimized prediction models.
Specifically, first, the server determines a plurality of preset models related to the current task, and these preset models are used as starting points of the migration learning. For example, a machine learning predictive model that has been trained on historical power consumption data of a similar iron and steel enterprise may be selected as the preset model. A pre-trained model for predicting similar industrial process parameters in the relevant industrial production field may also be selected. These model parameters may be obtained from a public model library. Then, the server uses the small-scale historical power consumption data of the enterprise itself, and performs model fine adjustment based on the thought of transfer learning by taking the preset models as starting points. Since the preset model has been trained on large-scale data, the feature representation of the field is extracted, so that the training process of the model on new data can be accelerated. Specifically, the server may train only the fully connected network layer portions of these pre-set models, keeping the previous feature extraction layer fixed. For example, for a model based on deep learning, parameters of a convolution layer can be frozen, only a full-connection layer is trained, and parameters such as weights, offsets and the like of the full-connection layer are adjusted by using enterprise data. After training of proper number of rounds, a new version of fine adjustment of the model parameters can be obtained. And finally, the server applies the fine-tuned parameters to a plurality of initial prediction models, such as replacing a full-connection layer of the related model, and loads new parameters to finish fine-tuning optimization of the model. Finally, a plurality of optimization prediction models which are based on transfer learning and adapt to the enterprise data can be obtained. This avoids the high resource consumption of training the model from scratch, allowing the model to adapt quickly to new scenarios. Through the migration learning and model fine tuning mechanism, the server can quickly obtain a plurality of predictive models optimized for the data set of the current iron and steel enterprise so as to cope with the challenge of insufficient data quantity.
S206, testing the performances of the plurality of optimized prediction models by using preset verification data to obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determining the optimized prediction model with the highest performance evaluation score as a preferable prediction model.
Referring to step S106, the server determines an optimized prediction model with the highest performance evaluation score as a preferred prediction model.
S207, adjusting model parameters of the optimal prediction model according to the corresponding performance evaluation result to obtain a final power consumption prediction model.
Referring to step S107, the server adjusts model parameters of the preferred prediction model according to the corresponding performance evaluation result to obtain a final power consumption prediction model.
S208, inputting the collected real-time power consumption data into a final power consumption prediction model to obtain a power consumption prediction result.
Referring to step S108, the server inputs the real-time power consumption data into the final power consumption prediction model to obtain a power consumption prediction result.
In some embodiments, the server detects whether the data features of the collected real-time power consumption data deviate from the training data features of the final power consumption prediction model; if so, based on an online learning mode, the final power consumption prediction model is incrementally trained by using real-time power consumption data.
Specifically, firstly, after a final power consumption prediction model is deployed to perform actual prediction, the server still needs to continuously collect real-time power consumption data of the iron and steel enterprise, and the new data reflect the latest running state of the enterprise. To evaluate whether the model is still able to accommodate new real-time data, the server detects whether there is a deviation of the characteristics of these new data from the training data characteristics of the model. For example, the statistical characteristics such as the average value and standard deviation of the detected data may be counted, and compared with the training data. If the new real-time data distribution characteristics change significantly, the model prediction effect is likely to be reduced. Then, once a significant deviation between the real-time data features and the training data is detected, the server starts online learning, and performs incremental training on the model by using the real-time data. Specifically, samples in the real-time data can be selected, and model parameters are updated only for new samples based on an online learning algorithm, such as a small batch of random gradient descent. Only a small part of the model is adjusted to avoid losing the original knowledge. Finally, the server realizes dynamic optimization of the model by incrementally and progressively online updating training of the final model, so that the model can be quickly adapted to the change of the actual condition of the enterprise, and the model is prevented from being outdated. Meanwhile, the calculation cost of repeated training of the whole model is greatly reduced. This allows the enterprise's power consumption predictions to continue to be valid. By detecting the characteristic change of the real-time data and performing incremental learning in time, the server realizes the dynamic continuous optimization of the power consumption prediction model so as to adapt to complex and changeable practical environments.
S209, calculating the abnormal proportion of the number of abnormal data points to the total number of all data points.
Based on the model prediction result, the server performs verification analysis on the abnormal data to judge the cause of the abnormality. The first criterion is the abnormal duty cycle. The server can count the number of abnormal data points which are predicted to generate larger errors by the model in a period of time, and the abnormal proportion of the total data is calculated. For example, the actual power consumption of 10 data points in the past week and the error of the model predictive value exceed the preset threshold, and the total number of data points is 1000, the abnormal proportion is 10/1000=1%. If the anomaly ratio is low, it is indicated that most of the data point predictions are still relatively accurate.
S210, if the abnormality proportion is smaller than a first preset threshold value, determining that the root cause is data abnormality.
If the anomaly ratio is below a certain predetermined threshold, for example below 5%, the server may determine that the anomaly data point is generated mainly due to anomalies in the data itself. Because most data predictions are accurate, only individual points are abnormal, in which case it is likely that these individual data points are themselves problematic, rather than modeling. The model can be accepted under normal conditions with individual mispredictions. The server may determine that the data anomaly is a resulting anomaly prediction.
S211, if the root cause is data abnormality, eliminating abnormal data points and keeping the final power consumption prediction model unchanged.
After determining that the explicit data is abnormal, the server can directly reject the abnormal data points without adjusting the model itself. Because the data itself has problems and cannot reflect the real situation, the current prediction model can be still kept unchanged after deletion for subsequent prediction work. Model tuning need only be considered when there are more outliers, as it may be that the model does not adapt to new changes. Through the judgment and the processing, the server can analyze the abnormal prediction result in a targeted manner, and the effect of the predictor is ensured.
S212, calculating a plurality of prediction errors of all data points.
If the abnormal data points are judged to be high, the server considers the condition of under fitting of the model. For this purpose, the server calculates the prediction error results of all data points, for example, the difference between the predicted power consumption and the actual power consumption for each sample point, and the prediction error for each point can be calculated.
S213, if the average error of the plurality of prediction errors is larger than a second preset threshold, determining that the root cause is model under fitting.
After obtaining the prediction errors of all sample points, the server can count the average or root mean square errors of the errors. If the average level of error is high, for example, the average absolute error exceeds a certain preset threshold, the prediction effect of the model as a whole is poor, and it is likely that the model does not learn the potential relationship between the variables sufficiently, so that the fit is insufficient as a whole.
And S214, if the root cause is model under fitting, acquiring more training data, and incrementally adjusting a final power consumption prediction model by using the more training data.
After the model is judged to be under-fitted, the server can conduct model adjustment to improve the fitting degree. For example, more sample data may be collected, particularly for more closely spaced samples during certain periods of greater error, and then used to incrementally train the model to help the model learn the complex relationships of such periods. The model structure can also be adjusted, such as increasing the number of hidden layer units, so as to strengthen the expression capability of the model. Training parameters may also be changed, such as expanding the number of iteration rounds, until the model achieves a significant improvement in the evaluation index. Through the model adjustment, the server can continuously optimize the fitting effect of the model and reduce the prediction error.
S215, when a related event is newly added in a preset time period before and after the abnormal data point is detected, determining that the root cause is influenced by a new factor.
If the model is not fit enough to account for anomalies, the server considers whether there are additional factors to influence. The server can analyze various related events of the enterprise in a window of a period of time before and after the abnormal point, such as whether the raw material price is greatly increased, holiday period and other factors which possibly influence the power consumption of the enterprise occur in a period of time before and after the abnormal point. These related events, if occurring before and after the point of abnormality, are likely to be new causes of abnormality.
S216, if the root cause is influenced by a new factor, identifying the influence factor influenced by the new factor, incorporating the influence factor into the feature engineering, and retraining a final power consumption prediction model by using the new feature.
After determining that a new factor has influence, the server locates the factor and adjusts the model. For example, encountering a holiday results in a person vacating, the device utilization is reduced, and the server may add a "holiday" factor to the model feature. If the price of the raw material increases to expand the production of the enterprise, the "raw material price" can be increased as a new feature. The server also needs to acquire data of these new feature factors for model retraining. The newly added data set may help the model learn these new impact relationships. After feature adjustment and model retraining are completed, the server can obtain a new model which is optimized in a targeted manner, more factors are comprehensively considered, the fitting effect is better, and the prediction error is reduced.
In the embodiment of the application, the multisource heterogeneous data collection technology, the characteristic engineering method, the machine learning model training technology, the transfer learning model optimization technology and the continuous increment learning technology are adopted, so that various data of enterprises can be fully utilized, the power consumption prediction model for the iron and steel enterprises can be constructed, the problems of single data and simplified model in the related technology are effectively solved, and the accuracy of power consumption prediction is greatly improved. Meanwhile, the scheme can continuously realize dynamic update of the prediction process through the new data increment optimization model, so that an accurate, automatic and intelligent power consumption prediction result is provided for the iron and steel enterprises, the power purchasing decision of the enterprises is scientifically guided, the purchasing cost is reduced, and the economic benefit is improved.
The server in the embodiment of the present application is described below from the viewpoint of a module. Fig. 3 is a schematic structural diagram of a functional module of a server according to an embodiment of the present application.
The server includes:
a data collection module 301 for collecting historical power consumption data for a plurality of time periods from a plurality of data sources of the iron and steel enterprise; the historical power consumption data comprises production line data, equipment operation records, energy consumption logs, weather conditions and electric market prices;
A preprocessing module 302, configured to preprocess historical power consumption data; preprocessing comprises removing abnormal values, processing missing data and normalizing;
the feature extraction module 303 is configured to analyze the historical power consumption data based on the domain knowledge data, and extract key data features; key data features include throughput, run time, seasonal factors, and historical power consumption trends;
the model training module 304 is configured to perform model training based on the key data features and a plurality of test model frames to obtain a plurality of initial prediction models; the test model framework comprises a time sequence analysis model, a machine learning regression model and a deep learning neural network model;
the model correction module 305 is configured to, when the number of the historical power consumption data is lower than a preset number threshold, perform fine adjustment on a plurality of initial prediction models with a preset correlation model as a starting point based on a transfer learning technology, so as to obtain a plurality of optimized prediction models;
the model screening module 306 is configured to test the performance of the plurality of optimized prediction models by using preset verification data, obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determine an optimized prediction model with the highest performance evaluation score as a preferred prediction model;
The model optimization module 307 is configured to adjust model parameters of the preferred prediction model according to the corresponding performance evaluation result, so as to obtain a final power consumption prediction model;
the data prediction module 308 is configured to input the collected real-time power consumption data into a final power consumption prediction model, so as to obtain a power consumption prediction result.
In some embodiments, the feature extraction module 303 is specifically configured to:
acquiring a professional knowledge base written by an industrial engineer; the professional knowledge base comprises a plurality of characteristic factors which influence the power consumption of the iron and steel enterprises; the characteristic factors comprise steel yield, equipment use time, peak electricity consumption time, holiday factors, climate factors and raw material price changes;
carrying out matching analysis on the historical power consumption data and a plurality of characteristic factors in a professional knowledge base to obtain a plurality of matching results;
calculating the correlation degree between the historical power consumption data and the characteristic factors according to a plurality of matching results;
and selecting the first N characteristic factors with highest correlation degree as key data characteristics.
In some embodiments, the model correction module 305 is specifically configured to:
determining a plurality of preset correlation models associated with a plurality of initial prediction models as a starting point model; the method comprises the steps that a plurality of preset correlation models are trained on a preset number of historical power consumption data of the correlation industry in advance;
Training parameters of a fully connected network layer of the starting point model by using historical power consumption data to obtain fine-tuned parameters;
and fine tuning the initial prediction model by using the fine-tuned parameters to obtain a plurality of optimized prediction models.
In some embodiments, the server further comprises a data pre-storage module for:
configuring a plurality of data interfaces, and connecting the plurality of data interfaces with a plurality of data sources of the iron and steel enterprises; the plurality of data sources comprise a production management system, a device operation and maintenance system, a meteorological system and a power transaction system; the automatic data transmission is realized between the plurality of data interfaces and the plurality of data sources;
according to a data acquisition strategy, pulling production data, equipment operation data, meteorological data and transaction electricity price data in a preset time period from a plurality of data sources through a plurality of data interfaces in a preset time period to obtain an initial data set;
and storing an initial data set, and constructing a historical electricity consumption database of the iron and steel enterprise.
In some embodiments, the server further comprises a model delta module for:
detecting whether deviation exists between the data characteristics of the collected real-time power consumption data and the training data characteristics of the final power consumption prediction model;
If so, based on an online learning mode, the final power consumption prediction model is incrementally trained by using real-time power consumption data.
In some embodiments, the server further comprises an anomaly verification module for:
performing verification analysis on abnormal data points based on the power consumption prediction result to obtain root causes of the abnormal data points; the abnormal data points are actual power consumption data points which differ from the power consumption prediction result by more than a preset difference threshold value; root causes include data anomalies, model under-fits, and new factor effects;
if the root cause is data abnormality, eliminating abnormal data points, and keeping the final power consumption prediction model unchanged;
if the root cause is model under fitting, acquiring more training data, and incrementally adjusting a final power consumption prediction model by using the more training data;
if the root cause is influenced by a new factor, identifying the influencing factor influenced by the new factor, incorporating the influencing factor into the feature engineering, and retraining the final power consumption prediction model by using the newly added feature.
In some embodiments, the anomaly verification module is specifically configured to:
calculating the abnormal proportion of the number of abnormal data points to the total number of all data points;
If the anomaly ratio is smaller than a first preset threshold value, determining that the root cause is data anomaly;
calculating a plurality of prediction errors for all data points;
if the average error of the plurality of prediction errors is larger than a second preset threshold value, determining that the root cause is model under fitting;
determining that the root cause is influenced by a new factor when a related event is newly added in a preset time period before and after the abnormal data point is detected; the related events include raw material price increase and holidays.
The server in the embodiment of the present application is described above from the point of view of the modularized functional entity, and the server in the embodiment of the present application is described below from the point of view of hardware processing, please refer to fig. 4, which is a schematic structural diagram of an entity device of the server in the embodiment of the present application.
It should be noted that the structure of the server shown in fig. 4 is only an example, and should not limit the functions and the application scope of the embodiments of the present invention.
As shown in fig. 4, the server includes a central processing unit (Central Processing Unit, CPU) 401 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 402 or a program loaded from a storage section 408 into a random access Memory (Random Access Memory, RAM) 403. In the RAM 403, various programs and data required for the system operation are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An Input/Output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including an audio input device, a push button switch, and the like; an output portion 407 including a liquid crystal display (Liquid Crystal Display, LCD), an audio output device, an indicator lamp, and the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present invention, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. When executed by a Central Processing Unit (CPU) 401, the computer program performs various functions defined in the present invention.
Specific examples of the computer-readable storage medium include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures.
Specifically, the server of the present embodiment includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the method for predicting the power consumption of the iron and steel enterprise provided in the foregoing embodiment is implemented.
As another aspect, the present invention also provides a computer-readable storage medium, which may be contained in the server described in the above embodiment; or may exist alone without being assembled into the server. The storage medium carries one or more computer programs which, when executed by a processor of the server, cause the server to implement the method for predicting power consumption of a steel enterprise provided in the above embodiment.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
As used in the above embodiments, the term "when …" may be interpreted to mean "if …" or "after …" or "in response to determination …" or "in response to detection …" depending on the context. Similarly, the phrase "at the time of determination …" or "if detected (a stated condition or event)" may be interpreted to mean "if determined …" or "in response to determination …" or "at the time of detection (a stated condition or event)" or "in response to detection (a stated condition or event)" depending on the context.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.

Claims (10)

1. The method for predicting the power consumption of the iron and steel enterprises is applied to a server of a power consumption prediction system and is characterized by comprising the following steps:
Collecting historical power consumption data for a plurality of time periods from a plurality of data sources of the iron and steel enterprise; the historical power consumption data comprises production line data, equipment operation records, energy consumption logs, weather conditions and electric power market prices;
preprocessing the historical power consumption data; the preprocessing comprises the steps of removing abnormal values, processing missing data and normalizing;
analyzing the historical power consumption data based on domain knowledge data, and extracting to obtain key data characteristics; the key data features include throughput, run time, seasonal factors, and historical power consumption trends;
model training is carried out based on the key data features and a plurality of test model frames, so that a plurality of initial prediction models are obtained; the test model framework comprises a time sequence analysis model, a machine learning regression model and a deep learning neural network model;
when the number of the historical power consumption data is lower than a preset number threshold value, performing fine adjustment on the plurality of initial prediction models by taking a preset correlation model as a starting point based on a transfer learning technology to obtain a plurality of optimized prediction models;
testing the performance of the plurality of optimized prediction models by using preset verification data to obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determining the optimized prediction model with the highest performance evaluation score as a preferable prediction model;
According to the corresponding performance evaluation result, adjusting model parameters of the optimal prediction model to obtain a final power consumption prediction model;
and inputting the collected real-time power consumption data into the final power consumption prediction model to obtain a power consumption prediction result.
2. The method according to claim 1, wherein the analyzing the historical power consumption data based on the domain knowledge data extracts key data features, specifically including:
acquiring a professional knowledge base written by an industrial engineer; the professional knowledge base comprises a plurality of characteristic factors influencing the power consumption of the iron and steel enterprises; the characteristic factors comprise steel yield, equipment use time, peak electricity consumption time, holiday factors, climate factors and raw material price changes;
performing matching analysis on the historical power consumption data and the characteristic factors in the professional knowledge base to obtain a plurality of matching results;
calculating the correlation degree between the historical power consumption data and the characteristic factors according to the plurality of matching results;
and selecting the first N characteristic factors with the highest correlation degree as key data characteristics.
3. The method according to claim 1, wherein the performing fine tuning on the plurality of initial prediction models with a preset correlation model as a starting point based on the transfer learning technology to obtain a plurality of optimized prediction models specifically includes:
Determining a plurality of preset correlation models associated with the plurality of initial prediction models as a starting point model; the plurality of preset correlation models are trained on a preset number of historical power consumption data of the correlation industry in advance;
training parameters of the fully connected network layer of the starting point model by using the historical power consumption data to obtain fine-tuned parameters;
and fine tuning the initial prediction model by using the fine-tuned parameters to obtain a plurality of optimized prediction models.
4. The method of claim 1, wherein prior to the step of collecting historical power consumption data for a plurality of time periods from a plurality of data sources for the iron and steel enterprise, the method further comprises:
configuring a plurality of data interfaces, and connecting the plurality of data interfaces with a plurality of data sources of a steel enterprise; the data sources comprise a production management system, a device operation and maintenance system, a meteorological system and a power transaction system; the plurality of data interfaces and the plurality of data sources realize automatic data transmission;
according to a data acquisition strategy, pulling production data, equipment operation data, meteorological data and transaction electricity price data in a preset time period from the plurality of data sources through the plurality of data interfaces in a preset time period to obtain an initial data set;
And storing the initial data set, and constructing a historical electricity consumption database of the iron and steel enterprise.
5. The method of claim 1, wherein prior to the step of inputting the collected real-time power consumption data into the final power consumption prediction model to obtain a power consumption prediction result, the method further comprises:
detecting whether deviation exists between the data characteristics of the collected real-time power consumption data and the training data characteristics of the final power consumption prediction model;
if so, performing incremental training on the final power consumption prediction model by using the real-time power consumption data based on an online learning mode.
6. The method according to claim 1, wherein after the step of inputting the collected real-time power consumption data into the final power consumption prediction model to obtain a power consumption prediction result, the method further comprises:
performing verification analysis on abnormal data points based on the power consumption prediction result to obtain root causes of the abnormal data points; the abnormal data points are actual power consumption data points which differ from the power consumption prediction result by more than a preset difference threshold; the root causes include data anomalies, model under-fitting, and new factor effects;
If the root cause is data abnormality, eliminating the abnormal data points, and keeping the final power consumption prediction model unchanged;
if the root cause is model under fitting, acquiring more training data, and incrementally adjusting the final power consumption prediction model by using the more training data;
and if the root cause is influenced by a new factor, identifying influencing factors influenced by the new factor, incorporating the influencing factors into a feature engineering, and retraining the final power consumption prediction model by using the newly added features.
7. The method of claim 6, wherein the performing a verification analysis on the outlier data points based on the power consumption prediction result to obtain root causes that lead to the outlier data points specifically comprises:
calculating the abnormal proportion of the number of abnormal data points to the total number of all data points;
if the anomaly ratio is smaller than a first preset threshold value, determining that the root cause is data anomaly;
calculating a plurality of prediction errors for all data points;
if the average error of the plurality of prediction errors is larger than a second preset threshold value, determining that the root cause is model under fitting;
when a new related event is added in a preset time period before and after the abnormal data point is detected, determining that the root cause is influenced by a new factor; the related events include raw material price increase and holidays.
8. A power consumption prediction system, the power consumption prediction system comprising a server, the server comprising:
a data collection module for collecting historical power consumption data of a plurality of time periods from a plurality of data sources of the iron and steel enterprises; the historical power consumption data comprises production line data, equipment operation records, energy consumption logs, weather conditions and electric power market prices;
the preprocessing module is used for preprocessing the historical power consumption data; the preprocessing comprises the steps of removing abnormal values, processing missing data and normalizing;
the characteristic extraction module is used for analyzing the historical power consumption data based on the domain knowledge data and extracting key data characteristics; the key data features include throughput, run time, seasonal factors, and historical power consumption trends;
the model training module is used for carrying out model training based on the key data characteristics and a plurality of test model frames to obtain a plurality of initial prediction models; the test model framework comprises a time sequence analysis model, a machine learning regression model and a deep learning neural network model;
the model correction module is used for carrying out fine adjustment on the plurality of initial prediction models by taking a preset related model as a starting point based on a transfer learning technology when the number of the historical power consumption data is lower than a preset number threshold value to obtain a plurality of optimized prediction models;
The model screening module is used for testing the performances of the plurality of optimized prediction models by using preset verification data to obtain a plurality of performance evaluation results and a plurality of performance evaluation scores, and determining the optimized prediction model with the highest performance evaluation score as a preferable prediction model;
the model optimization module is used for adjusting model parameters of the optimal prediction model according to the corresponding performance evaluation result to obtain a final power consumption prediction model;
and the data prediction module is used for inputting the collected real-time power consumption data into the final power consumption prediction model to obtain a power consumption prediction result.
9. A server, comprising: one or more processors and memory;
the memory is coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke to cause the server to perform the method of any of claims 1-7.
10. A computer readable storage medium comprising instructions which, when run on a server, cause the server to perform the method of any of claims 1-7.
CN202410146483.XA 2024-02-01 2024-02-01 Prediction method and system for power consumption of iron and steel enterprises Pending CN117829374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410146483.XA CN117829374A (en) 2024-02-01 2024-02-01 Prediction method and system for power consumption of iron and steel enterprises

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410146483.XA CN117829374A (en) 2024-02-01 2024-02-01 Prediction method and system for power consumption of iron and steel enterprises

Publications (1)

Publication Number Publication Date
CN117829374A true CN117829374A (en) 2024-04-05

Family

ID=90517412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410146483.XA Pending CN117829374A (en) 2024-02-01 2024-02-01 Prediction method and system for power consumption of iron and steel enterprises

Country Status (1)

Country Link
CN (1) CN117829374A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118297245A (en) * 2024-06-06 2024-07-05 宁德时代新能源科技股份有限公司 Energy consumption prediction method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118297245A (en) * 2024-06-06 2024-07-05 宁德时代新能源科技股份有限公司 Energy consumption prediction method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112001439A (en) GBDT-based shopping mall building air conditioner cold load prediction method, storage medium and equipment
CN117829374A (en) Prediction method and system for power consumption of iron and steel enterprises
JP2002532799A (en) Case-based reasoning system and method and apparatus for sensor prediction, especially in technological processes of cement kilns
CN112766535B (en) Building load prediction method and system considering load curve characteristics
CN109447332A (en) A kind of Middle-long Electric Power Load Forecast method suitable for S type load curve
CN112801388A (en) Power load prediction method and system based on nonlinear time series algorithm
CN117114438A (en) Building area energy system cold and hot load data driving prediction method with flexibility and interpretability
CN116663746A (en) Power load prediction method and device, computer equipment and storage medium
Guo et al. Power demand forecasting and application based on SVR
CN116388150A (en) Matching short-term load prediction method based on digital twin and neural network technology
CN114581141A (en) Short-term load prediction method based on feature selection and LSSVR
CN117595231B (en) Intelligent power grid distribution management system and method thereof
CN118095704A (en) Rural typical energy supply and demand balance method and system based on big data
CN117728385A (en) Power grid load prediction method based on deep learning
CN117277312A (en) Gray correlation analysis-based power load influence factor method and equipment
CN109829115B (en) Search engine keyword optimization method
CN114004414B (en) Method for predicting energy load of enterprise coupling Copula and LSTM
CN113449933B (en) Regional medium-term load prediction method and device based on clustering electric quantity curve decomposition
CN118569814B (en) Intelligent gas enterprise user supervision method, internet of things system and medium
CN113837486B (en) RNN-RBM-based distribution network feeder long-term load prediction method
CN117009752A (en) Power consumption demand prediction method based on POA-VMD-SSA-KELM model
Zhang et al. Prediction Interval Construction for Electric Load and Wind Power via Machine Learning
CN117374963A (en) Ultra-short-term power demand prediction method for iron and steel enterprises based on load characteristics
CN118539440A (en) Intelligent power operation and maintenance system and method for power distribution network based on safety monitoring
Waheed et al. A Data-driven Long-Short Term Load Forecasting with LSTM-RNN Networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination