Electricity consumption prediction method and device

By collecting and utilizing production activity and electricity consumption prediction models, and combining production activity information and electricity consumption information, the problem of poor accuracy in electricity consumption prediction in existing technologies has been solved, and higher prediction accuracy has been achieved.

CN122072867APending Publication Date: 2026-05-22LIANGYUN SMART ENERGY (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIANGYUN SMART ENERGY (GUANGDONG) CO LTD
Filing Date
2024-11-15
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing electricity consumption forecasting models fail to effectively consider the impact of equipment production activities, resulting in poor forecast accuracy. Furthermore, due to data silos, it is difficult to obtain information on the timing of production activities.

Method used

Multiple characteristic data points for the target prediction date are collected, including time characteristics, production characteristics, equipment status characteristics, and historical electricity consumption characteristics. Pre-trained production activity prediction models and electricity consumption prediction models are used to predict production activity information and electricity consumption information respectively. The target electricity consumption information is determined by combining the two.

Benefits of technology

By providing production activity forecasting models, information on production activities is provided, reducing the impact of uncertainty and improving the accuracy of electricity consumption forecasts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122072867A_ABST
    Figure CN122072867A_ABST
Patent Text Reader

Abstract

The invention provides an electricity consumption prediction method and device, and relates to the technical field of power load prediction. The method comprises the steps of collecting multiple pieces of feature data of a target prediction day; according to the multiple pieces of feature data, adopting a pre-trained production activity prediction model to predict production activity information of each prediction time point in the target prediction day; according to the multiple pieces of feature data, a pre-trained electricity consumption prediction model is adopted to predict electricity consumption information of each prediction time point on the target prediction day; and determining target electricity consumption information of each prediction time point on the target prediction day according to the production activity information of each prediction time point on the target prediction day and the electricity consumption information of each prediction time point. According to the method, under the condition of not depending on direct production activity information, the time point at which the production activity will be executed is predicted through the production activity prediction model, the influence of uncertainty of production activity time on electricity consumption prediction is reduced, and the accuracy of electricity consumption prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power load forecasting technology, and more specifically, to a method and apparatus for forecasting electricity consumption. Background Technology

[0002] With the increasing maturity of the electricity market and the rapid development of smart grid technology, electricity consumption forecasting has become an indispensable part of the power system. Accurate electricity consumption forecasting can provide strong data support for the stable and efficient operation of the power system.

[0003] Currently, the trained prediction models often do not consider the impact of equipment production activities on electricity consumption prediction. Furthermore, due to the serious data silo problem between systems in the actual factory environment, it is difficult to obtain the time information of equipment production activities. The trained prediction models only use historical electricity consumption information as reference data for prediction, resulting in poor accuracy of the model's prediction results. Summary of the Invention

[0004] The purpose of this application is to provide a method and apparatus for predicting electricity consumption, in order to improve the accuracy of electricity consumption prediction results, addressing the shortcomings of the prior art.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, embodiments of this application provide a method for predicting electricity consumption, including:

[0007] Collect multiple characteristic data for the target prediction date, including: time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data;

[0008] Based on the aforementioned multiple feature data, a pre-trained production activity prediction model is used to predict the production activity information at each prediction time point under the target prediction day. The production activity information is used to indicate whether production activities will be carried out at the prediction time point.

[0009] Based on the aforementioned multiple feature data, a pre-trained electricity consumption prediction model is used to predict the electricity consumption information at each of the predicted time points under the target prediction day.

[0010] Based on the production activity information and electricity consumption information at each predicted time point under the target prediction date, the target electricity consumption information at each predicted time point under the target prediction date is determined.

[0011] Optionally, the collection of multiple feature data for the target prediction date includes:

[0012] Based on the date attribute of the target prediction date, the time feature data is determined, and the time feature data is used to indicate whether the target prediction date is a specified holiday, a specified workday, and a day of the week;

[0013] Based on the planned production order data for the target forecast date, calculate the planned production quantity of each production line on the target forecast date to obtain the production characteristic data;

[0014] Based on the equipment fault information at the current prediction time for the target prediction date, the equipment status characteristic data is determined; the equipment status characteristic data is used to indicate whether the equipment has malfunctioned.

[0015] Based on the electricity consumption information at each historical time point on the day preceding the target prediction date, the historical electricity consumption characteristic data is determined.

[0016] Optionally, determining the historical electricity consumption characteristic data based on the electricity consumption information at each historical time point on the day preceding the target prediction date includes:

[0017] Anomalies in the electricity consumption information at each historical time point are identified using preset criteria, and each anomaly is set as a missing value.

[0018] Interpolation algorithms are used to fill in the missing values ​​to obtain the historical electricity consumption characteristic data.

[0019] Optionally, the collection of multiple feature data for the target prediction date includes:

[0020] The initial time feature data and the initial device state feature data are respectively processed by one-hot encoding, and the initial time feature data and the initial device state feature data are respectively converted into binary vector data to obtain the time feature data and the device state feature data.

[0021] The initial production characteristic data and the initial historical electricity consumption characteristic data are normalized to obtain the production characteristic data and the historical electricity consumption characteristic data.

[0022] Optionally, the step of predicting production activity information at each prediction time point under the target prediction day using a pre-trained production activity prediction model based on the multiple feature data includes:

[0023] The time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data of the target prediction date are input into the production activity prediction model. The production activity prediction model then predicts the probability of production activities to be executed at each prediction time point under the target prediction date based on the time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data.

[0024] Based on the probability of production activities to be executed at each predicted time point under the target prediction day and the target production probability threshold, the production activity information at each predicted time point under the target prediction day is predicted.

[0025] Optionally, the process of determining the target production probability threshold includes:

[0026] Based on the range of the production probability threshold and the preset step size parameter, multiple candidate production probability thresholds are determined.

[0027] Based on the classification results of the production activity prediction model under each candidate production probability threshold, determine the classification accuracy of the production activity prediction model under each candidate production probability threshold.

[0028] The target production probability threshold is determined from the candidate production probability thresholds based on the classification accuracy of the production activity prediction model at each candidate production probability threshold.

[0029] Optionally, determining the target electricity consumption information for each forecast time point under the target forecast date based on the production activity information and the electricity consumption information for each forecast time point under the target forecast date includes:

[0030] If the production activity information at the predicted time point indicates that a production activity will be performed at the predicted time point, then the electricity consumption information at the predicted time point is determined as the target electricity consumption information at the predicted time point.

[0031] If the production activity information at the predicted time point indicates that no production activity will be carried out at the predicted time point, then the preset electricity consumption threshold will be used as the target electricity consumption information at the predicted time point.

[0032] Optionally, the training process of the production activity prediction model includes:

[0033] Multiple sample feature data corresponding to multiple sample days are collected. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, and sample historical electricity consumption feature data.

[0034] Based on the actual electricity consumption information of each sample day at each sample time point and the preset electricity consumption threshold, generate production activity tag information for each sample day at each sample time point;

[0035] The production activity prediction model is trained by using the multi-sample feature data corresponding to each sample day and the production activity label information of each sample day at each sample time point as training sample data.

[0036] Optionally, the training process of the electricity consumption prediction model includes:

[0037] Multiple sample feature data are collected for multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, sample historical electricity consumption feature data, and actual electricity consumption information of the sample day at each sample time point.

[0038] The sample time characteristic data, sample production characteristic data, sample equipment status characteristic data, sample historical electricity consumption characteristic data, and actual electricity consumption information at each sample time point for each sample day are used as training sample data to train the electricity consumption prediction model.

[0039] Secondly, embodiments of this application also provide an electricity consumption prediction device, including: a data acquisition module, a prediction module, and a determination module;

[0040] The acquisition module is used to collect multiple feature data for the target prediction day. These multiple feature data include: time feature data, production feature data, equipment status feature data, and historical electricity consumption feature data.

[0041] The prediction module is used to predict production activity information at each prediction time point under the target prediction day based on the multiple feature data and a pre-trained production activity prediction model. The production activity information is used to indicate whether production activities will be carried out at the prediction time points.

[0042] The prediction module is used to predict the electricity consumption information at each prediction time point under the target prediction day based on the multiple feature data and a pre-trained electricity consumption prediction model.

[0043] The determining module is used to determine the target electricity consumption information for each predicted time point under the target prediction day based on the production activity information and the electricity consumption information for each predicted time point under the target prediction day.

[0044] Optionally, the acquisition module is specifically used to determine the time feature data based on the date attribute of the target prediction date, wherein the time feature data is used to indicate whether the target prediction date is a specified holiday, a specified workday, and a day of the week;

[0045] Based on the planned production order data for the target forecast date, calculate the planned production quantity of each production line on the target forecast date to obtain the production characteristic data;

[0046] Based on the equipment fault information at the current prediction time for the target prediction date, the equipment status characteristic data is determined; the equipment status characteristic data is used to indicate whether the equipment has malfunctioned.

[0047] Based on the electricity consumption information at each historical time point on the day preceding the target prediction date, the historical electricity consumption characteristic data is determined.

[0048] Optionally, the acquisition module is specifically used to determine outliers in the electricity consumption information at each historical time point using preset criteria, and to set each outlier as a missing value;

[0049] Interpolation algorithms are used to fill in the missing values ​​to obtain the historical electricity consumption characteristic data.

[0050] Optionally, the acquisition module is specifically used to perform one-hot encoding processing on the acquired initial time feature data and initial device state feature data, respectively converting the initial time feature data into binary vector data and the initial device state feature data into binary vectors, to obtain the time feature data and the device state feature data.

[0051] The initial production characteristic data and the initial historical electricity consumption characteristic data are normalized to obtain the production characteristic data and the historical electricity consumption characteristic data.

[0052] Optionally, the prediction module is specifically used to input the time characteristic data, production characteristic data, equipment status characteristic data and historical electricity consumption characteristic data of the target prediction day into the production activity prediction model, and the production activity prediction model predicts the execution probability of production activities at each prediction time point under the target prediction day based on the time characteristic data, production characteristic data, equipment status characteristic data and historical electricity consumption characteristic data.

[0053] Based on the probability of production activities to be executed at each predicted time point under the target prediction day and the target production probability threshold, the production activity information at each predicted time point under the target prediction day is predicted.

[0054] Optionally, the determining module is further configured to determine multiple candidate production probability thresholds based on the range of the production probability threshold and a preset step size parameter.

[0055] Based on the classification results of the production activity prediction model under each candidate production probability threshold, determine the classification accuracy of the production activity prediction model under each candidate production probability threshold.

[0056] The target production probability threshold is determined from the candidate production probability thresholds based on the classification accuracy of the production activity prediction model at each candidate production probability threshold.

[0057] Optionally, the determining module is specifically used to determine the electricity consumption information at the predicted time point as the target electricity consumption information at the predicted time point if the production activity information at the predicted time point indicates that production activities will be carried out at the predicted time point.

[0058] If the production activity information at the predicted time point indicates that no production activity will be carried out at the predicted time point, then the preset electricity consumption threshold will be used as the target electricity consumption information at the predicted time point.

[0059] Optionally, it may also include: a training module;

[0060] The training module is used to collect multiple sample feature data corresponding to multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, and sample historical electricity consumption feature data.

[0061] Based on the actual electricity consumption information of each sample day at each sample time point and the preset electricity consumption threshold, generate production activity tag information for each sample day at each sample time point;

[0062] The production activity prediction model is trained by using the multi-sample feature data corresponding to each sample day and the production activity label information of each sample day at each sample time point as training sample data.

[0063] Optionally, the training module is also used to collect multiple sample feature data corresponding to multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, sample historical electricity consumption feature data, and actual electricity consumption information of the sample day at each sample time point.

[0064] The sample time characteristic data, sample production characteristic data, sample equipment status characteristic data, sample historical electricity consumption characteristic data, and actual electricity consumption information at each sample time point for each sample day are used as training sample data to train the electricity consumption prediction model.

[0065] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to implement the power consumption prediction method provided in the first aspect.

[0066] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the power consumption prediction method as provided in the first aspect.

[0067] The beneficial effects of this application are:

[0068] This application provides a method and apparatus for predicting electricity consumption, comprising: collecting multiple feature data for a target prediction day, including time feature data, production feature data, equipment status feature data, and historical electricity consumption feature data; predicting production activity information for each prediction time point under the target prediction day using a pre-trained production activity prediction model based on the multiple feature data; predicting electricity consumption information for each prediction time point under the target prediction day using a pre-trained electricity consumption prediction model based on the multiple feature data; and determining the target electricity consumption information for each prediction time point under the target prediction day based on the production activity information and the electricity consumption information for each prediction time point. This method trains a production activity prediction model and an electricity consumption prediction model based on the collected actual electricity consumption data, date attributes, production data, equipment status data, and historical electricity consumption data for a sample day. Therefore, the production activity prediction model can be used to predict the production activity information for each prediction time point on the prediction day, and the electricity consumption prediction model can be used to predict the electricity consumption for each prediction time point on the prediction day. By combining the production activity information and electricity consumption information for each prediction time point, the target electricity consumption information for each prediction time point can be predicted. In particular, without relying on direct production activity information, the production activity prediction model predicts the timing of production activities, providing necessary information for electricity consumption forecasting, reducing the impact of uncertainty in production activity timing on electricity consumption forecasting, and thus improving the accuracy of electricity consumption forecasting. Attached Figure Description

[0069] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1A flowchart illustrating an electricity consumption prediction method provided in an embodiment of this application;

[0071] Figure 2 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0072] Figure 3 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0073] Figure 4 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0074] Figure 5 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0075] Figure 6 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0076] Figure 7 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0077] Figure 8 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0078] Figure 9 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0079] Figure 10 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment;

[0080] Figure 11 A schematic diagram of an electricity consumption prediction device provided in an embodiment of this application;

[0081] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0083] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0084] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0085] With the increasing maturity of the electricity market and the rapid development of smart grid technology, electricity consumption forecasting has become an indispensable part of the power system. Accurate electricity consumption forecasting provides strong data support for the stable and efficient operation of the power system. Electricity consumption is closely related to production activities; it drops significantly during periods of no production activity. However, directly forecasting electricity consumption may not accurately capture this change, leading to overestimation. Furthermore, the severe data silos between IT systems in actual factory environments make it difficult to obtain information on production activity timing, resulting in discrepancies between planned and actual production times, especially on weekends when it's difficult to determine whether production activities occur. If information on production activity could be directly obtained, regression models could be used for electricity consumption forecasting. However, in most cases, due to a lack of data infrastructure or the inability to integrate data between systems, forecasting production activity timing information becomes a crucial step.

[0086] Based on this, this solution provides an electricity consumption forecasting method. Based on collected sample day actual electricity consumption data, date attributes, production data, equipment status data, and historical electricity consumption data, a production activity forecasting model and an electricity consumption forecasting model are trained respectively. The production activity forecasting model first predicts production activity information at each forecast time point on the forecast day, and then the electricity consumption forecasting model predicts electricity consumption at each forecast time point on the forecast day. Combining the production activity information and electricity consumption information at each forecast time point, the target electricity consumption information for each forecast time point can be predicted. Notably, without relying on direct production activity information, the production activity forecasting model predicts the time points when production activities will be executed, providing necessary information for electricity consumption forecasting, reducing the impact of uncertainty in production activity timing on electricity consumption forecasting, and thus improving the accuracy of electricity consumption forecasting.

[0087] Figure 1 This is a flowchart illustrating a power consumption prediction method provided in an embodiment of this application; the execution subject of this method can be a computer device such as a terminal or server. Figure 1 As shown, the method may include:

[0088] S101. Collect multiple characteristic data for the target prediction date. These multiple characteristic data include: time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data.

[0089] The target forecast date refers to the date on which electricity consumption forecasting needs to be performed. Multiple characteristic data points can be collected for the target forecast date. In this embodiment, these characteristic data points may include: time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data. Time characteristic data indicates whether the target forecast date falls on a weekend or a public holiday. Production characteristic data indicates production activity data for the target forecast date, which can be extracted from planned production order data for that date. Equipment status characteristic data indicates whether equipment malfunctions. It is worth noting that the type and number of equipment vary depending on the scenario being predicted. For larger production systems, there may be multiple devices performing production activities. Therefore, when forecasting the electricity consumption of a production system, the collected equipment status characteristic data can include the status characteristic data of each device within the production system, not just the status characteristic data of a single device. Historical electricity consumption characteristic data indicates the electricity consumption data of the day before the target forecast date. Since the day before the target forecast date is a date that has already occurred, the electricity consumption data for that day has already been generated and can be directly obtained. The electricity consumption data for that day represents actual electricity consumption or real electricity consumption.

[0090] S102. Based on multiple feature data, a pre-trained production activity prediction model is used to predict the production activity information at each prediction time point under the target prediction day.

[0091] Among them, production activity information is used to indicate whether production activities will be carried out at the predicted time point.

[0092] Optionally, based on the collected multiple feature data, the production activity prediction model can be trained to predict the production activity information at each prediction time point on the target prediction day.

[0093] The target prediction date can be divided into 24 time points from 0:00 to 23:00, and each time point can be used as a prediction time point to make more detailed predictions for the target prediction date.

[0094] The predicted production activity information at the predicted time point is used to indicate whether production activities will be carried out at the predicted time point. Since production activity information has a significant impact on the amount of electricity consumption, the predicted production activity information can be used to assist in the prediction of electricity consumption and improve the accuracy of electricity consumption prediction.

[0095] S103. Based on multiple feature data, a pre-trained electricity consumption prediction model is used to predict the electricity consumption information at each prediction time point on the target prediction day.

[0096] Optionally, based on the collected multiple feature data, the electricity consumption information at each prediction time point on the target prediction day can be predicted through a pre-trained electricity consumption prediction model.

[0097] S104. Based on the production activity information and electricity consumption information at each forecast time point under the target forecast date, determine the target electricity consumption information at each forecast time point under the target forecast date.

[0098] In some embodiments, since production activity information can have a significant impact on the prediction of electricity consumption, the production activity information and electricity consumption information at each prediction time point can be comprehensively analyzed to obtain the target electricity consumption information at each prediction time point. That is, the impact of production activity information on electricity consumption is used as reference information to optimize the predicted electricity consumption information to obtain the target electricity consumption information at each prediction time point under the target prediction day.

[0099] It is worth noting that information such as whether the target prediction date falls on a weekend or holiday, the size of production data, equipment failures, and the actual electricity consumption of adjacent days all have a significant or decisive impact on the prediction of whether production activities will take place on the target prediction date. Therefore, this solution uses the above-mentioned multiple characteristic data for prediction, which can improve the accuracy of the prediction results.

[0100] In summary, the electricity consumption prediction method provided in this embodiment includes: collecting multiple feature data for the target prediction day, including time feature data, production feature data, equipment status feature data, and historical electricity consumption feature data; using a pre-trained production activity prediction model based on the multiple feature data to predict production activity information at each prediction time point under the target prediction day; using a pre-trained electricity consumption prediction model based on the multiple feature data to predict electricity consumption information at each prediction time point under the target prediction day; and determining the target electricity consumption information at each prediction time point under the target prediction day based on the production activity prediction model and the electricity consumption information at each prediction time point. This method can train the production activity prediction model and the electricity consumption prediction model separately, thereby predicting the production activity information at each prediction time point under the prediction day based on the production activity prediction model, and then predicting the electricity consumption at each prediction time point under the prediction day based on the electricity consumption prediction model. By combining the production activity information and electricity consumption information at each prediction time point, the target electricity consumption information at each prediction time point can be predicted. In particular, without relying on direct production activity information, the production activity prediction model predicts the timing of production activities, providing necessary information for electricity consumption forecasting, reducing the impact of uncertainty in production activity timing on electricity consumption forecasting, and thus improving the accuracy of electricity consumption forecasting.

[0101] Figure 2 This is a flowchart illustrating another electricity consumption forecasting method provided in an embodiment of this application; optionally, in step S101, collecting multiple feature data for the target forecast date may include:

[0102] S201. Based on the date attribute of the target prediction date, determine the time characteristic data. The time characteristic data is used to indicate whether the target prediction date is a specified holiday, a specified workday, or a day of the week.

[0103] Optionally, time feature data for the target prediction date can be constructed based on the date attributes of the target prediction date. The time feature data may include, but is not limited to: whether the target prediction date is a designated holiday, such as statutory holidays such as "National Day" and "Mid-Autumn Festival"; whether the target prediction date is a national statutory working day; and which day of the week the target prediction date falls on.

[0104] For example, if the target prediction date is a statutory holiday, it is recorded as 1, otherwise as 0; if it is a statutory adjusted holiday, it is recorded as 1, otherwise as 0; and the value of the day of the week is an integer in the range of [0,6]. Then, the time feature data of the target prediction date can be {1,0,3}, which can represent that the target prediction date is a statutory holiday and is a Thursday of the week.

[0105] S202. Based on the planned production order data for the target forecast date, calculate the planned production quantity of each production line on the target forecast date to obtain production characteristic data.

[0106] The daily planned production order data is prepared in advance. By reading the planned production order data for the target forecast day, we can obtain the number of products planned to be produced by each production line on the target forecast day, thus obtaining the production characteristic data. In other words, the production characteristic data includes the number of products planned to be produced by each production line.

[0107] Since the products produced on the same production line are of similar types, the quantities of all planned products on the same production line can be summed to obtain the total quantity of products planned to be produced on that production line.

[0108] S203. Based on the equipment fault information at the current prediction time for the target prediction date, determine the equipment status characteristic data; the equipment status characteristic data is used to indicate whether the equipment has failed.

[0109] Equipment failure can be recorded as 1, and equipment without failure can be recorded as 0. For the target prediction date, we can collect equipment failure information at the current prediction time of the target prediction date as much as possible to generate equipment status feature data to ensure the accuracy of the collected equipment failure data.

[0110] S204. Based on the electricity consumption information at each historical time point on the day before the target prediction date, determine the historical electricity consumption characteristic data.

[0111] Since electricity consumption over a past period can reflect recent electricity consumption levels, electricity consumption information at various historical time points on the day before the target prediction date can be collected to construct historical electricity consumption characteristic data. These historical time points are also divided into 24 time points from 0:00 to 23:00.

[0112] Of course, in some embodiments, historical electricity consumption information may be collected, not limited to the previous day, but also the previous two days.

[0113] Figure 3 This is a flowchart illustrating another electricity consumption forecasting method provided in this application embodiment; optionally, in step S204, determining historical electricity consumption characteristic data based on the electricity consumption information at each historical time point on the day preceding the target forecast date may include:

[0114] S301. Use preset criteria to determine the abnormal values ​​in the electricity consumption information at each historical time point, and set each abnormal value as a missing value.

[0115] In some embodiments, outliers in historical electricity consumption information can be set as missing values ​​according to the 3σ criterion.

[0116] The 3σ criterion states that in a normally distributed dataset, approximately 99.73% (or 0.9974, depending on the precision of the calculation) of the data values ​​will fall within the range of the mean plus or minus three standard deviations, i.e., the interval (μ-3σ, μ+3σ). Here, μ represents the mean, and σ represents the standard deviation.

[0117] First, it is necessary to calculate the average (μ) and standard deviation (σ) of the initially collected historical electricity consumption characteristic data. Based on the 3σ criterion, the normal range of the data is determined, i.e., (μ-3σ, μ+3σ). The electricity consumption information for each historical time point in the historical electricity consumption characteristic data is compared with the control line to determine whether it falls within the normal range. If the electricity consumption information at a historical time point falls within the control line, it is considered normal; if the electricity consumption information at a historical time point exceeds the control line range, it may be an outlier and is marked as a missing value.

[0118] S302. Use an interpolation algorithm to fill in the missing values ​​to obtain historical electricity consumption characteristic data.

[0119] Next, for the data that was set as missing values, an interpolation algorithm can be used to fill in each missing value based on the initially collected historical electricity consumption feature data to obtain the historical electricity consumption feature data.

[0120] Figure 4 This is a flowchart illustrating another electricity consumption forecasting method provided in an embodiment of this application; optionally, in step S101, collecting multiple feature data for the target forecast date may include:

[0121] S401. Perform one-hot encoding on the collected initial time feature data and initial device status feature data respectively, converting the initial time feature data into binary vector data and the initial device status feature data into binary vectors respectively, to obtain time feature data and device status feature data.

[0122] In some embodiments, categorical variables can be one-hot encoded to convert them into binary vector representations. Categorical variables refer to the aforementioned time feature data and device status feature data.

[0123] After performing one-hot encoding on the collected initial time feature data and initial device status feature data, the time feature data and device status feature data can be obtained.

[0124] One-hot encoding converts each categorical variable into a binary vector where only one position contains a value of 1, and the rest contain values ​​of 0. This encoding method represents each categorical feature as a sparse vector in a high-dimensional space. It is primarily used for processing categorical data, converting categorical features into a numerical format that machine learning models can understand.

[0125] For example, in the time feature data, statutory holidays are denoted as 1 and non-statutory holidays are denoted as 0. After one-hot encoding, statutory holidays can be denoted as [1, 0] and non-statutory holidays as [0, 1].

[0126] S402. Normalize the collected initial production characteristic data and initial historical electricity consumption characteristic data to obtain production characteristic data and historical electricity consumption characteristic data.

[0127] For numerical variables, such as historical electricity consumption data and production data, normalization can be performed.

[0128] Data normalization, also known as data standardization or data normalization, scales the original data to a specific interval, such as [0,1] or [-1,1], through a linear transformation. This process ensures that all features or variables are on the same basis for comparison and analysis, eliminating the influence of dimensions and making them comparable.

[0129] Figure 5 This is a flowchart illustrating another electricity consumption prediction method provided in this application embodiment; optionally, in step S102, based on multiple feature data, a pre-trained production activity prediction model is used to predict the production activity information at each prediction time point under the target prediction day, which may include:

[0130] S501. Input the time characteristic data, production characteristic data, equipment status characteristic data and historical electricity consumption characteristic data of the target prediction date into the production activity prediction model. The production activity prediction model predicts the execution probability of production activities at each prediction time point under the target prediction date based on the time characteristic data, production characteristic data, equipment status characteristic data and historical electricity consumption characteristic data.

[0131] In some embodiments, the time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data of the target prediction day can be collected as input data into the production activity prediction model, and the production activity prediction model can predict the probability of production activity execution at each prediction time point under the target prediction day based on these characteristic data.

[0132] Typically, the target forecast date falls on a public holiday or weekend. The fewer products each production line plans to produce, the more likely there is equipment failure, and the lower the historical electricity consumption of the previous day, the lower the probability of production activities being carried out on the target forecast date. In summary, the above-mentioned characteristic data all have a significant impact on the prediction of production activities. During the training of the production activity prediction model, the weights of each characteristic data can be trained, and by combining the various characteristic data, the probability of production activities being carried out at each predicted time point on the target forecast date can be predicted.

[0133] S502. Based on the execution probability of production activities at each predicted time point under the target prediction day and the target production probability threshold, predict the production activity information at each predicted time point under the target prediction day.

[0134] When the probability of production activity execution at the predicted time point is greater than or equal to the target production probability threshold, the production activity information obtained at the predicted time point indicates that the production activity will be executed at the predicted time point; conversely, when the probability of production activity execution at the predicted time point is less than the target production probability threshold, the production activity information obtained at the predicted time point indicates that the production activity will not be executed at the predicted time point.

[0135] Figure 6 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment; optionally, in step S502, the process of determining the target production probability threshold includes:

[0136] S601. Based on the range of the production probability threshold and the preset step size parameter, determine multiple candidate production probability thresholds.

[0137] The target production probability threshold can be obtained through exhaustive testing. The production probability threshold can be set with a step size of 0.05, taking values ​​in the range of [0.1, 0.9]. Then, with a step size of 0.05, multiple candidate production probability thresholds can be determined within the range of [0.1, 0.9].

[0138] S602. Based on the classification results of the production activity prediction model under each candidate production probability threshold, determine the classification accuracy of the production activity prediction model under each candidate production probability threshold.

[0139] The classification results of the production activity prediction model were statistically analyzed for each candidate production probability threshold to obtain the classification accuracy of the production activity prediction model under each candidate production probability threshold.

[0140] Among them, classification accuracy is characterized by the proportion of samples correctly classified by the production activity prediction model out of the total samples.

[0141] S603. Based on the classification accuracy of the production activity prediction model under each candidate production probability threshold, determine the target production probability threshold from each candidate production probability threshold.

[0142] You can select the candidate production probability threshold with the highest classification accuracy as the target production probability threshold.

[0143] Similarly, the time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data of the target prediction day can be collected as input data into the electricity consumption prediction model. Through the electricity consumption prediction model, the electricity consumption information at each prediction time point under the target prediction day can be predicted.

[0144] Similarly, when the target forecast date is a working day, the greater the probability of production activities, the higher the electricity consumption is likely to be. Furthermore, the more products planned for production on the production line, or the higher the electricity requirements of the product type, the greater the final electricity consumption. If equipment does not malfunction, it will operate normally, increasing the probability of generating electricity consumption. Conversely, the higher the electricity consumption on the previous day, the higher the electricity consumption on the target forecast date is likely to be. By comprehensively considering the impact of various characteristics on electricity consumption forecasting, electricity consumption information at each forecast time point under the target forecast date can be predicted.

[0145] Figure 7 This is a flowchart illustrating another electricity consumption forecasting method provided in an embodiment of this application; optionally, in step S104, the target electricity consumption information for each forecast time point under the target forecast date is determined based on the production activity information and electricity consumption information for each forecast time point under the target forecast date, including:

[0146] S701. Based on the production activity information at each predicted time point under the target prediction date, the production activity information at at least one predicted time point is corrected to obtain the target production activity information at each predicted time point.

[0147] In some embodiments, the production activity information predicted by the production activity prediction model may also be corrected.

[0148] It can iterate through the production activity information of each prediction time point under the target prediction day, correct the production activity information of some prediction time points with abnormalities, and obtain the target production activity information of each prediction time point.

[0149] S702. Based on the target production activity information and electricity consumption information at each forecast time point, determine the target electricity consumption information at each forecast time point under the target forecast date.

[0150] Therefore, by combining the target production activity information and the electricity consumption information at each forecast time point, the target electricity consumption information at each forecast time point under the target forecast date can be determined. In other words, the electricity consumption information at each forecast time point predicted by the electricity consumption forecast model is corrected based on whether production activities are carried out at each forecast time point, so as to obtain the target electricity consumption information at each forecast time point under the target forecast date.

[0151] Figure 8 This is a flowchart illustrating another electricity consumption forecasting method provided in this application embodiment; optionally, in step S701, correcting the production activity information at at least one forecast time point based on the production activity information at each forecast time point under the target forecast day may include:

[0152] S801. Traverse each predicted time point. If the production activity information of the current predicted time point indicates that the production activity will not be executed at the current predicted time point, and the specified adjacent predicted time point of the current predicted time point will execute the production activity, then modify the production activity information of the current predicted time point to indicate that the production activity will be executed.

[0153] Optionally, the production activity information for each predicted time point is arranged in chronological order. Each predicted time point can be traversed sequentially. If it is found that the current predicted time point is predicted not to execute production activities, while the two hours before and after the current predicted time point are predicted to execute production activities, the production activity information for the current predicted time point can be corrected to indicate that the current predicted time point will execute production activities.

[0154] S802. If the production activity information at the current predicted time point indicates that a production activity will be performed at the current predicted time point, and the specified adjacent predicted time point of the current predicted time point will not perform a production activity, then the production activity information at the current predicted time point is corrected to indicate that a production activity will not be performed.

[0155] If it is found that the current predicted time point is predicted to be the time when production activities will be carried out, while the two hours before and after the current predicted time point are predicted not to be the time when production activities will be carried out, then the production activity information of the current predicted time point can be corrected to indicate that the current predicted time point will not be the time when production activities will be carried out.

[0156] Optionally, in step S104, determining the target electricity consumption information for each forecast time point under the target forecast date based on the production activity information and electricity consumption information for each forecast time point under the target forecast date may include:

[0157] If the production activity information at the predicted time point indicates that production activities will be carried out at the predicted time point, then the electricity consumption information at the predicted time point will be determined as the target electricity consumption information at the predicted time point.

[0158] In one implementation, if the production activity information indicates that a production activity will be carried out at a certain predicted time point, then the electricity consumption information predicted by the electricity consumption prediction model at that predicted time point can be directly used as the target electricity consumption information at that predicted time point.

[0159] If the production activity information at the predicted time point indicates that no production activity will be carried out at the predicted time point, then the preset electricity consumption threshold will be used as the target electricity consumption information at the predicted time point.

[0160] In another implementation, if the production activity information indicates that no production activity will be carried out at a certain predicted time point, then the electricity consumption at that predicted time point should theoretically be low. In this case, the electricity consumption information for the predicted time point can be set to a preset electricity consumption threshold instead of using the electricity consumption prediction model.

[0161] Optionally, the preset electricity consumption threshold can be determined based on the average electricity consumption information during the period when no production activities were performed in the specified adjacent days of the target forecast date.

[0162] Optionally, the average electricity consumption during the period of no production activity in the 10 days leading up to the target prediction date can be used as the preset electricity consumption threshold.

[0163] Figure 9 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment; optionally, the training process of the above-mentioned production activity prediction model includes:

[0164] S901. Collect multiple sample feature data corresponding to multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, and sample historical electricity consumption feature data.

[0165] Sample days refer to historical days that have already occurred. They are the same as the feature data collected during the prediction process. During model training, multiple sample feature data from multiple sample days can also be collected.

[0166] Since the sample day has already occurred, the sample production characteristic data for the sample day is the actual quantity of products produced by each production line on that day. Additionally, the historical electricity consumption characteristic data for the sample day also refers to the historical electricity consumption characteristic data of the day preceding the sample day.

[0167] S902. Based on the actual electricity consumption information of each sample day at each sample time point and the preset electricity consumption threshold, generate production activity tag information for each sample day at each sample time point.

[0168] Since the sample day has already occurred, the actual electricity consumption information at each sample time point within the sample day can be collected. The sample day is also divided into 24 time points from 0:00 to 23:00, with each time point being a sample time point.

[0169] The actual electricity consumption information at a sample time point can be compared with a preset electricity consumption threshold. If the actual electricity consumption information is greater than or equal to the preset electricity consumption threshold, the production activity label information for the sample time point is generated as "production activity executed"; if the actual electricity consumption information is less than the preset electricity consumption threshold, the production activity label information for the sample time point is generated as "production activity not executed".

[0170] Of course, you can also directly retrieve video information from the sample day or equipment operation information to obtain production activity tag information for each sample time point.

[0171] It is worth noting that the preset electricity consumption threshold in this embodiment can be the average electricity consumption during the period of no production activity in the past 10 days before the target prediction date; or it can be the average electricity consumption during the period of no production activity in the past 10 days during model training.

[0172] S903. Use the multi-sample feature data corresponding to each sample day and the production activity label information of each sample day at each sample time point as training sample data to train the production activity prediction model.

[0173] Optionally, the sample time characteristic data, sample production characteristic data, sample equipment status characteristic data, and sample historical electricity consumption characteristic data corresponding to each sample day can be used as training sample data, and an LR (Logistic Regression) model can be used to train a production activity prediction model.

[0174] During model training, based on the predicted production activity information and production activity label information of each sample day at each sample time point obtained by the model prediction, the network parameters of the model are continuously trained iteratively until the network loss accuracy meets the condition or the number of iterations meets the condition, thus obtaining the production activity prediction model.

[0175] Figure 10 A flowchart illustrating another electricity consumption prediction method provided in this application embodiment; optionally, the training process of the electricity consumption prediction model includes:

[0176] S1001. Collect multiple sample feature data corresponding to multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, sample historical electricity consumption feature data, and actual electricity consumption information of the sample day at each sample time point.

[0177] Unlike the training sample data for production activity prediction models, the training data for electricity consumption prediction models may include the actual electricity consumption information for each sample day at each time point. This actual electricity consumption information can guide the model's prediction of electricity consumption at each time point.

[0178] S1002. Use the sample time characteristic data, sample production characteristic data, sample equipment status characteristic data, sample historical electricity consumption characteristic data, and the actual electricity consumption information of the sample day at each sample time point as training sample data to train the electricity consumption prediction model.

[0179] Optionally, the sample time feature data, sample production feature data, sample equipment status feature data, sample historical electricity consumption feature data, and actual electricity consumption information at each sample time point for each sample day can be used as training sample data. The sample time feature data, sample production feature data, sample equipment status feature data, and sample historical electricity consumption feature data for each sample day are used as input data for the model, and the actual electricity consumption information at each sample time point for each sample day is used as output data for the model. The electricity consumption prediction model is trained based on the XGBoost (Extreme Gradient Boosting, an ensemble learning algorithm) algorithm.

[0180] That is, the actual electricity consumption information of each sample day at each sample time point is used as the electricity consumption label information of each sample. Based on the electricity consumption label information and the electricity consumption information predicted by the model, the network parameters of the model are continuously iterated and corrected until the network loss accuracy meets the condition or the number of iterations meets the condition, and the electricity consumption prediction model is obtained.

[0181] During the training of the production activity prediction model and the electricity consumption prediction model, the model parameters can be optimized by the k (k=5) fold cross-validation method. That is, the training sample data can be divided into 5 parts, and through 5 training sessions, one part is used as the validation set and the other 4 parts are used as the training set for each training session. The selected validation set is different each time. Finally, the results of k training sessions are averaged to obtain an overall evaluation of the model performance.

[0182] In summary, the electricity consumption prediction method provided in this embodiment includes: collecting multiple feature data for the target prediction day, including time feature data, production feature data, equipment status feature data, and historical electricity consumption feature data; using a pre-trained production activity prediction model based on the multiple feature data to predict production activity information at each prediction time point under the target prediction day; using a pre-trained electricity consumption prediction model based on the multiple feature data to predict electricity consumption information at each prediction time point under the target prediction day; and determining the target electricity consumption information at each prediction time point under the target prediction day based on the production activity information and the electricity consumption information at each prediction time point. This method trains a production activity prediction model and an electricity consumption prediction model based on the collected actual electricity consumption data, date attributes, production data, equipment status data, and historical electricity consumption data for the sample day. Therefore, the production activity prediction model can be used to predict the production activity information at each prediction time point under the prediction day, and the electricity consumption prediction model can be used to predict the electricity consumption at each prediction time point under the prediction day. By combining the production activity information and electricity consumption information at each prediction time point, the target electricity consumption information at each prediction time point can be predicted. In particular, without relying on direct production activity information, the production activity prediction model predicts the timing of production activities, providing necessary information for electricity consumption forecasting, reducing the impact of uncertainty in production activity timing on electricity consumption forecasting, and thus improving the accuracy of electricity consumption forecasting.

[0183] The following describes the apparatus, equipment, and storage medium used to execute the electricity consumption prediction method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0184] Figure 11 This is a schematic diagram of a power consumption prediction device provided in an embodiment of this application. The function implemented by this power consumption prediction device corresponds to the steps performed by the above-described method. This device can be understood as the aforementioned computer equipment or server, or the processor of a server, or it can be understood as a component that implements the functions of this application under the control of a server, independent of the aforementioned server or processor. Figure 11 As shown, the device may include: a data acquisition module 110, a prediction module 120, and a determination module 130;

[0185] The data acquisition module 110 is used to collect multiple feature data for the target prediction day. The multiple feature data include: time feature data, production feature data, equipment status feature data, and historical electricity consumption feature data.

[0186] The prediction module 120 is used to predict production activity information at each prediction time point under the target prediction day based on multiple feature data and a pre-trained production activity prediction model. The production activity information is used to indicate whether production activities will be carried out at the prediction time points.

[0187] The prediction module 120 is used to predict the electricity consumption information at each prediction time point on the target prediction day based on multiple feature data and a pre-trained electricity consumption prediction model.

[0188] The determination module 130 is used to determine the target electricity consumption information for each forecast time point under the target forecast date based on the production activity information and electricity consumption information for each forecast time point under the target forecast date.

[0189] Optionally, the acquisition module 110 is specifically used to determine time feature data based on the date attribute of the target prediction date. The time feature data is used to indicate whether the target prediction date is a specified holiday, a specified working day, or a day of the week.

[0190] Based on the planned production order data for the target forecast date, calculate the planned production quantity of each production line on the target forecast date to obtain production characteristic data.

[0191] Based on the equipment failure information at the current prediction time for the target prediction date, determine the equipment status characteristic data; the equipment status characteristic data is used to indicate whether the equipment has failed.

[0192] Based on the electricity consumption information at each historical time point on the day before the target prediction date, historical electricity consumption characteristic data are determined.

[0193] Optionally, the data acquisition module 110 is specifically used to determine the abnormal values ​​in the electricity consumption information at each historical time point using preset criteria, and to set each abnormal value as a missing value;

[0194] Interpolation algorithms were used to fill in the missing values ​​to obtain historical electricity consumption characteristic data.

[0195] Optionally, the acquisition module 110 is specifically used to perform one-hot encoding processing on the acquired initial time feature data and initial device status feature data, respectively converting the initial time feature data into binary vector data and the initial device status feature data into binary vectors, to obtain time feature data and device status feature data.

[0196] The initial production characteristic data and the initial historical electricity consumption characteristic data were normalized to obtain the production characteristic data and the historical electricity consumption characteristic data.

[0197] Optionally, the prediction module 120 is specifically used to input the time characteristic data, production characteristic data, equipment status characteristic data and historical electricity consumption characteristic data of the target prediction day into the production activity prediction model, and the production activity prediction model predicts the execution probability of production activities at each prediction time point under the target prediction day based on the time characteristic data, production characteristic data, equipment status characteristic data and historical electricity consumption characteristic data.

[0198] Based on the probability of production activities to be executed at each predicted time point under the target prediction day and the target production probability threshold, the production activity information at each predicted time point under the target prediction day is predicted.

[0199] Optionally, the determining module 130 is also used to determine multiple candidate production probability thresholds based on the range of the production probability threshold and the preset step size parameter.

[0200] Based on the classification results of the production activity prediction model at each candidate production probability threshold, determine the classification accuracy of the production activity prediction model at each candidate production probability threshold.

[0201] Based on the classification accuracy of the production activity prediction model at each candidate production probability threshold, the target production probability threshold is determined from each candidate production probability threshold.

[0202] Optionally, the determining module 130 is specifically used to determine the electricity consumption information at the predicted time point as the target electricity consumption information at the predicted time point if the production activity information at the predicted time point indicates that the production activity will be carried out at the predicted time point.

[0203] If the production activity information at the predicted time point indicates that no production activity will be carried out at the predicted time point, then the preset electricity consumption threshold will be used as the target electricity consumption information at the predicted time point.

[0204] Optionally, it may also include: a training module;

[0205] The training module is used to collect multiple sample feature data corresponding to multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, and sample historical electricity consumption feature data.

[0206] Based on the actual electricity consumption information of each sample day at each sample time point and the preset electricity consumption threshold, generate production activity tag information for each sample day at each sample time point;

[0207] The production activity prediction model is trained by using the multi-sample feature data corresponding to each sample day and the production activity label information of each sample day at each sample time point as training sample data.

[0208] Optionally, the preset electricity consumption threshold is determined based on the average electricity consumption information during the period when no production activities were performed in the specified adjacent days of the target forecast date.

[0209] Optionally, the training module is also used to collect multiple sample feature data corresponding to multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, sample historical electricity consumption feature data, and actual electricity consumption information of the sample day at each sample time point.

[0210] The sample time characteristic data, sample production characteristic data, sample equipment status characteristic data, sample historical electricity consumption characteristic data, and the actual electricity consumption information of the sample day at each sample time point are used as training sample data to train the electricity consumption prediction model.

[0211] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0212] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0213] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.

[0214] Figure 12This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The device may be a computing device with data processing capabilities.

[0215] The device includes: processor 801 and storage medium 802.

[0216] Storage medium 802 is used to store programs, and processor 801 calls the programs stored in storage medium 802 to execute the above method embodiments. The specific implementation and technical effects are similar, and will not be described in detail here.

[0217] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the power consumption prediction method according to various exemplary embodiments of this application as described in the "Exemplary Methods" section above.

[0218] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0219] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The storage medium can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type storage medium, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage medium, magnetic disk, optical disk, etc. The storage medium is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, storage medium 802 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0220] Optionally, this application also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, performs the above-described method embodiments.

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

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

[0223] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0224] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for predicting electricity consumption, characterized in that, include: Collect multiple characteristic data for the target prediction date, including: time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data; Based on the aforementioned multiple feature data, a pre-trained production activity prediction model is used to predict the production activity information at each prediction time point under the target prediction day. The production activity information is used to indicate whether production activities will be carried out at the prediction time point. Based on the aforementioned multiple feature data, a pre-trained electricity consumption prediction model is used to predict the electricity consumption information at each of the predicted time points under the target prediction day. Based on the production activity information and electricity consumption information at each predicted time point under the target prediction date, the target electricity consumption information at each predicted time point under the target prediction date is determined.

2. The method according to claim 1, characterized in that, The collection of multiple feature data for the target prediction date includes: Based on the date attribute of the target prediction date, the time feature data is determined, and the time feature data is used to indicate whether the target prediction date is a specified holiday, a specified workday, and a day of the week; Based on the planned production order data for the target forecast date, calculate the planned production quantity of each production line on the target forecast date to obtain the production characteristic data; Based on the equipment fault information at the current prediction time for the target prediction date, the equipment status characteristic data is determined; the equipment status characteristic data is used to indicate whether the equipment has malfunctioned. Based on the electricity consumption information at each historical time point on the day preceding the target prediction date, the historical electricity consumption characteristic data is determined.

3. The method according to claim 2, characterized in that, The step of determining the historical electricity consumption characteristic data based on the electricity consumption information at each historical time point on the day preceding the target prediction date includes: Anomalies in the electricity consumption information at each historical time point are identified using preset criteria, and each anomaly is set as a missing value. Interpolation algorithms are used to fill in the missing values ​​to obtain the historical electricity consumption characteristic data.

4. The method according to claim 1, characterized in that, The collection of multiple feature data for the target prediction date includes: The initial time feature data and the initial device state feature data are respectively processed by one-hot encoding, and the initial time feature data and the initial device state feature data are respectively converted into binary vector data to obtain the time feature data and the device state feature data. The initial production characteristic data and the initial historical electricity consumption characteristic data are normalized to obtain the production characteristic data and the historical electricity consumption characteristic data.

5. The method according to claim 1, characterized in that, The step of predicting production activity information at each prediction time point under the target prediction day using a pre-trained production activity prediction model based on the multiple feature data includes: The time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data of the target prediction date are input into the production activity prediction model. The production activity prediction model then predicts the probability of production activities to be executed at each prediction time point under the target prediction date based on the time characteristic data, production characteristic data, equipment status characteristic data, and historical electricity consumption characteristic data. Based on the probability of production activities to be executed at each predicted time point under the target prediction day and the target production probability threshold, the production activity information at each predicted time point under the target prediction day is predicted.

6. The method according to claim 5, characterized in that, The process of determining the target production probability threshold includes: Based on the range of the production probability threshold and the preset step size parameter, multiple candidate production probability thresholds are determined. Based on the classification results of the production activity prediction model under each candidate production probability threshold, determine the classification accuracy of the production activity prediction model under each candidate production probability threshold. The target production probability threshold is determined from the candidate production probability thresholds based on the classification accuracy of the production activity prediction model at each candidate production probability threshold.

7. The method according to claim 1, characterized in that, The step of determining the target electricity consumption information for each forecast time point under the target forecast date based on the production activity information and the electricity consumption information for each forecast time point under the target forecast date includes: If the production activity information at the predicted time point indicates that a production activity will be performed at the predicted time point, then the electricity consumption information at the predicted time point is determined as the target electricity consumption information at the predicted time point. If the production activity information at the predicted time point indicates that no production activity will be carried out at the predicted time point, then the preset electricity consumption threshold will be used as the target electricity consumption information at the predicted time point.

8. The method according to any one of claims 1-7, characterized in that, The training process of the production activity prediction model includes: Multiple sample feature data corresponding to multiple sample days are collected. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, and sample historical electricity consumption feature data. Based on the actual electricity consumption information of each sample day at each sample time point and the preset electricity consumption threshold, generate production activity tag information for each sample day at each sample time point; The production activity prediction model is trained by using the multi-sample feature data corresponding to each sample day and the production activity label information of each sample day at each sample time point as training sample data.

9. The method according to any one of claims 1-7, characterized in that, The training process of the electricity consumption prediction model includes: Multiple sample feature data are collected for multiple sample days. The multiple sample feature data includes: sample time feature data, sample production feature data, sample equipment status feature data, sample historical electricity consumption feature data, and actual electricity consumption information of the sample day at each sample time point. The sample time characteristic data, sample production characteristic data, sample equipment status characteristic data, sample historical electricity consumption characteristic data, and actual electricity consumption information at each sample time point for each sample day are used as training sample data to train the electricity consumption prediction model.

10. A power consumption prediction device, characterized in that, include: The module consists of a data acquisition module, a prediction module, and a determination module. The acquisition module is used to collect multiple feature data for the target prediction day. These multiple feature data include: time feature data, production feature data, equipment status feature data, and historical electricity consumption feature data. The prediction module is used to predict production activity information at each prediction time point under the target prediction day based on the multiple feature data and a pre-trained production activity prediction model. The production activity information is used to indicate whether production activities will be carried out at the prediction time points. The prediction module is used to predict the electricity consumption information at each prediction time point under the target prediction day based on the multiple feature data and a pre-trained electricity consumption prediction model. The determining module is used to determine the target electricity consumption information for each predicted time point under the target prediction day based on the production activity information and the electricity consumption information for each predicted time point under the target prediction day.