Enterprise energy consumption prediction method and system based on multi-clustering method
Through the combination of multi-clustering method and SHAP value model, the problem of insufficient data completion and cluster adaptability in enterprise energy consumption prediction is solved, and more accurate and interpretable energy consumption prediction is achieved, which is suitable for large-scale data sets.
Patent Information
- Application Number
- CN202411184671.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-10
AI Technical Summary
The existing enterprise energy consumption prediction methods have insufficient accuracy, completeness and adaptability in the data completion and clustering process, resulting in low prediction accuracy and lack of utilization of high-grained data trends and patterns.
Multi-clustering method is used to cluster the annual energy consumption data of enterprises, determine the optimal number of clusters, build subdivided industry nodes, complete data through particle swarm optimization algorithm, and use SHAP value model for interpretable analysis, combined with TPE- LightGBM framework performs energy consumption prediction.
It improves the accuracy and interpretability of energy consumption prediction, enhances the learning of information in segmented industries, improves the adaptability and decision-making confidence of prediction models, and accelerates model training and prediction through efficient feature splitting strategies and parallel computing.
Smart Images

Figure CN119106763A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine learning and time series forecasting and analysis, and in particular relates to a method and system for predicting enterprise energy consumption based on a multi-clustering method. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Energy is the support of modern society, and the demand for energy in all walks of life is growing. The rising demand for energy in the industrial field has driven the continuous rise of global energy consumption. Among them, enterprises in key energy-consuming industries such as steel, refining, coal-fired power, consumption, ceramics, coking, etc. are the main consumers of energy. Accurate energy consumption forecasting for them can provide support for the decision-making of the country, energy departments and energy-consuming enterprises themselves, and contribute to achieving energy supply and demand balance, improving energy management and reducing environmental impact.
[0004] In-depth exploration of the fundamental factors of corporate energy demand and the development of accurate energy consumption forecasting methods are of vital value to society. The practice of energy consumption forecasting for enterprises not only helps to promote the sustainable development of enterprises, but is also an important means for enterprises to fulfill their social responsibilities. By formulating long-term energy consumption forecasting and energy management strategies, key enterprises have the ability to optimize their energy structure and actively promote energy transformation, so as to better respond to global challenges such as climate change and energy security. At the same time, the establishment of a market trading mechanism for energy consumption indicators also requires scientific and accurate energy consumption assessment. Accurate energy consumption forecasting is a prerequisite for establishing a scientific and effective trading mechanism. Therefore, this requires the establishment of a reliable data statistics and monitoring system, the collection and collation of energy consumption data from various industries, and the use of advanced models and algorithms for energy consumption forecasting.
[0005] The inventors found that different models for prediction were constructed in the existing energy consumption prediction methods, but there are still some technical problems in the research in this field: interpolation and averaging methods are commonly used to complete data, which loses the accuracy, completeness and consistency of the data, and does not use the data of enterprises in the same industry. The data set is not refined enough, and some trends and patterns that appear in the data with higher granularity are lost. When clustering the data for prediction, the clustering method is single, which leads to insufficient adaptability of clustering and is very sensitive to noise and outliers, which ultimately leads to poor prediction accuracy. Summary of the invention
[0006] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides an enterprise energy consumption prediction method and system based on a multi-clustering method, which shows the trends and patterns that appear in finer-grained data aggregation, and can use the industry nodes to which the enterprise belongs to make a more accurate judgment on the energy consumption data prediction of the enterprise, and explain the possible determinants of this prediction.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A first aspect of the present invention provides a method for predicting enterprise energy consumption based on a multi-clustering method, comprising the following steps:
[0009] Obtain the enterprise annual energy consumption data set;
[0010] Determine the optimal number of clusters for clustering the annual energy consumption data of the enterprise, cluster the annual energy consumption data using multiple clustering methods based on the optimal number of clusters, match and merge the multiple clustering results to construct subdivided industry nodes, and add energy consumption upper and lower limits and energy consumption type information to the class labels of the nodes;
[0011] According to the upper and lower limits of the energy consumption and the energy consumption type of the enterprise to be predicted, they are allocated to the corresponding industry nodes, and the monthly energy consumption data of the enterprise to be predicted under the determined industry node is split and completed to obtain the monthly energy consumption data of the enterprise with subdivided industry node labels after data completion;
[0012] Based on the enterprise monthly energy consumption data with segmented industry node labels after data completion and the trained energy consumption prediction model, the enterprise energy consumption forecast result for the next month is obtained;
[0013] The SHAP value model is used to perform interpretable analysis on the enterprise energy consumption forecast results for the next month.
[0014] Furthermore, the process of determining the optimal number of clusters for clustering the annual energy consumption data of the enterprise includes:
[0015] The maximum number of subdivided industries is obtained based on the experts’ domain knowledge;
[0016] The annual energy consumption data of enterprises were clustered by k-means clustering and hierarchical clustering with the number of clusters being 2-max. The dbs index and silhouette index of each clustering result were calculated according to the clustering results, and the clustering result with the best index performance was selected as the optimal number of clusters finally selected.
[0017] Furthermore, clustering the annual energy consumption data using multiple clustering methods according to the optimal number of clusters, and matching and merging the obtained multiple clustering results, include:
[0018] According to the optimal number of clusters, k-means clustering, hierarchical clustering and density clustering are performed on the annual energy consumption data. According to the selection of the initial centroid and the distance measurement method, five clusterings are performed in total, including two k-means clusterings, two hierarchical clusterings and one density clustering, generating five clustering results.
[0019] Based on the five clustering results obtained, the class labels of one clustering result are matched with the class labels of the remaining clustering results, and the final merged result is obtained by merging them according to the set merging rules;
[0020] The merging rule is: the class label in cluster result A is i, and each class label in cluster result B is j, and the class labels in both cluster results that belong to class A are calculated. i and class B j The number of samples N of these two classes ij , find the maximum number of overlapping samples N ij The corresponding class i and class j of clustering result A and the class j in clustering result B are represented by the same class label.
[0021] Furthermore, the monthly energy consumption data of the enterprise to be predicted under the determined industry node is split and completed to obtain the enterprise monthly energy consumption data with subdivided industry node labels after data completion, including:
[0022] For enterprises with incomplete monthly data in industry nodes, split and complete them. If the missing monthly data is greater than the set threshold, the constructed node year-month splitting formula is used to split the annual data and split and complete the missing monthly data; if the missing monthly data is less than the set threshold, the interpolation method is used to complete the monthly data;
[0023] The process of constructing the node year-month splitting formula includes: using the particle swarm optimization algorithm to construct the node year-month splitting formula for all enterprises with complete monthly data in all subdivided industry nodes.
[0024] Furthermore, the training process of the energy consumption prediction model includes:
[0025] Add time series features to each piece of monthly energy consumption data, namely energy consumption in the previous month, energy consumption in the previous two months, and energy consumption in the previous three months;
[0026] Split the time series monthly energy consumption dataset into a test set and a training set;
[0027] The TPE parameter tuning method is used to tune the parameters of the energy consumption prediction model that will use the time series monthly energy consumption training set data, and the test set is used to verify the prediction results of the energy consumption prediction model.
[0028] Furthermore, the use of the SHAP value model to conduct an interpretable analysis of the enterprise energy consumption forecast results for the next month includes: quantifying the contribution of each prediction feature in the model output, displaying the impact of features including segmented industry nodes on model predictions, and then sorting the features by importance, and displaying the detailed impact of the features in the style of a SHAP value scatter plot.
[0029] A second aspect of the present invention provides an enterprise energy consumption prediction system based on a multi-clustering method, comprising:
[0030] A data acquisition module, which is used to obtain the enterprise's annual energy consumption data set;
[0031] The multi-clustering module is used to determine the optimal number of clusters for clustering the annual energy consumption data of an enterprise. According to the optimal number of clusters, the annual energy consumption data is clustered using multiple clustering methods. The multiple clustering results are matched and merged to construct subdivided industry nodes, and the upper and lower limits of energy consumption and energy consumption type information are added to the class labels of the nodes.
[0032] The splitting and completion module is used to allocate the energy consumption upper and lower limits and energy consumption types of the enterprise to be predicted to the corresponding industry nodes, split and complete the monthly energy consumption data of the enterprise to be predicted under the determined industry node, and obtain the enterprise monthly energy consumption data with subdivided industry node labels after data completion;
[0033] The energy consumption prediction module is used to predict the energy consumption forecast result of the enterprise for the next month based on the enterprise monthly energy consumption data with segmented industry node labels after data completion and the trained energy consumption prediction model;
[0034] The forecast result analysis module is used to use the SHAP value model to perform interpretable analysis on the enterprise energy consumption forecast results for the next month.
[0035] A third aspect of the present invention provides a computer-readable storage medium.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the enterprise energy consumption prediction method based on a multi-clustering method as described above.
[0037] A fourth aspect of the present invention provides a computer device.
[0038] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the enterprise energy consumption prediction method based on the multi-clustering method as described above are implemented.
[0039] The fifth aspect of the present invention provides a program product, which is a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements the steps in the enterprise energy consumption forecasting method based on the multi-clustering method as described above.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] 1. Aiming at the problems of data accuracy, completeness and consistency lost in the supplemented data in the existing enterprise energy consumption forecasting methods, insufficient refinement of the data set, and loss of some trends and patterns shown in the data with higher granularity, the present invention can perform time series information analysis and forecasting on the enterprise energy consumption data with finer granularity, and can analyze and utilize the information of the enterprise energy consumption data in the segmented nodes of the same industry to supplement the data, so that the energy consumption forecast of machine learning can be more accurate; and the SHAP value model analysis is used to perform interpretable analysis on the prediction results, so as to determine the source of influence of the prediction results and explain the influence of the characteristics that affect the prediction results.
[0042] 2. In view of the problem that the clustering adaptability is insufficient and the prediction accuracy is poor in the existing enterprise energy consumption prediction methods, the present invention clusters the historical data of enterprise energy consumption to obtain the energy consumption law information of different sub-industries. This information can enhance the prediction model's learning of sub-industry information and improve prediction accuracy. The present invention uses the SHAP value model to quantify the contribution of each prediction feature in the model output, revealing the impact of features including sub-industry nodes on model prediction. The results of energy consumption prediction are better interpretable, providing decision makers with understandable information and enhancing decision-making confidence.
[0043] 3. The present invention adopts the framework of TPE-LightGBM, adopts an efficient feature splitting strategy and parallel computing, which greatly improves the training and prediction speed of the model. It is particularly suitable for large-scale data sets and can quickly meet the energy consumption prediction needs of different scenarios and enterprises.
[0044] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0046] Figure 1 It is a flow chart of a method for predicting enterprise energy consumption based on a multi-clustering method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0048] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0049] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0050] In view of the problems of data accuracy, completeness and consistency lost in the completed data in the existing enterprise energy consumption forecasting methods mentioned in the background technology, as well as the insufficient refinement of the data set and the loss of some trends and patterns shown in the data with higher granularity, the present invention can perform time series information analysis and forecasting on enterprise energy consumption data with finer granularity, and can analyze and utilize the information of enterprise energy consumption data in the segmented nodes of the same industry to complete the data, so that the energy consumption forecast of machine learning can be more accurate; and the SHAP model analysis is used to perform explainable analysis on the prediction results, so as to determine the source of influence of the prediction results and explain the influence of the characteristics that affect the prediction results.
[0051] In view of the problem that the clustering adaptability is insufficient and the prediction accuracy is poor in the existing enterprise energy consumption prediction methods mentioned in the background technology, the present invention obtains the energy consumption law information of different sub-industries by clustering the historical data of enterprise energy consumption. This information can enhance the learning of the LightGBM prediction model on the sub-industry information and improve the prediction accuracy. The present invention uses the SHAP model to quantify the contribution of each prediction feature in the model output, revealing the influence of features including sub-industry nodes on model prediction. The results of energy consumption prediction are better interpretable, providing decision makers with understandable information and enhancing decision-making confidence. Secondly, because the TPE-LightGBM framework is used, an efficient feature splitting strategy and parallel computing are adopted, which greatly improves the training and prediction speed of the model, and is particularly suitable for large-scale data sets, and can quickly meet the energy consumption prediction needs of different scenarios and different enterprises.
[0052] The general idea proposed by the present invention is as follows:
[0053] First, clustering is used to determine the subdivided industry nodes. The coarse-grained annual energy consumption data of the enterprise is mainly used to construct the enterprise subdivided industry nodes using multiple clustering votes, determine the subdivided industry characteristics, the upper and lower limits of the industry nodes, and the energy type of the industry nodes, store them as subdivided industry labels, and add them to the enterprise annual energy consumption dataset. The new data determines the industry subdivision nodes based on the energy type and the upper and lower limits of energy consumption.
[0054] Secondly, the energy consumption data is completed and split mainly based on the enterprise's subdivided industry data, and the year-month splitting formula is constructed using the particle swarm optimization algorithm using the same industry data. If the monthly data of an enterprise is missing more than 60%, the year-month formula is used for splitting and completion, and if the monthly data of an enterprise is missing less than 60%, the linear interpolation method is used for completion.
[0055] Then, after adding time series information and segmenting industry categories to the monthly data, the TPE+LightGBM model is used to tune and predict energy consumption.
[0056] Finally, the model is explained using the SHAP algorithm within the framework to understand the inner workings of the model’s decisions and show the factors that influence the prediction results.
[0057] Embodiment 1
[0058] like Figure 1 As shown, this embodiment provides an enterprise energy consumption prediction method based on a multi-clustering method, comprising the following steps:
[0059] Step 1: Obtain the enterprise annual energy consumption dataset;
[0060] Step 2: Preprocess the acquired annual energy consumption data of enterprises, including 0-1 normalization and standardization of the data;
[0061] Step 3: Determine the optimal number of clusters for clustering the annual energy consumption data of the enterprise, perform multiple clustering on the data according to the optimal number of clusters, build subdivided industry nodes after matching and merging multiple clustering results, and add upper and lower limits of energy consumption and energy consumption type information to the nodes. The specific steps include the following:
[0062] Step 301: According to the domain knowledge of experts, the possible number of sub-industries is determined and the max value is set. The data is clustered by k-means clustering and hierarchical clustering with the number of clusters being 2-max. The dbs index and silhouette index of each clustering result are calculated based on the clustering results. The clustering result with the best index performance is selected as the optimal number of clusters finally selected.
[0063] Step 302: Perform k-means clustering, hierarchical clustering and density clustering on the data according to the optimal number of clusters obtained. Perform five clustering operations in total according to the selection of the initial centroid and the distance measurement method, including two k-means clustering operations, two hierarchical clustering operations and one density clustering operation. Finally, five clustering results A, B, C, D and E are generated, each of which contains k clusters.
[0064] Step 303: among the five clustering results A, B, C, D, and E, match the class label of one class with the class labels of the remaining classes, and vote to fuse the multiple clustering results;
[0065] Taking the matching of the class labels in class A and the class labels in the remaining classes as an example, the specific matching process is described, including:
[0066] Step 3031: In the class labels A and B, the class label in cluster result A is i (from 1 to k), and each class label in cluster result B is j (from 1 to k). Calculate the number of classes that belong to class A in both cluster results. i and class B j The number of samples N of these two classes ij ; Then find the maximum number of overlapping samples N ij The corresponding class i and class j of clustering result A and the class j in clustering result B are represented by the same class label.
[0067] Step 3032: Repeat step 3021 for class label i (from 1 to k) in A until all class labels are matched.
[0068] Step 3033: Then match the class labels of A and C, A and D, and A and E, the steps are the same as the class label matching process of steps 3021-3022.
[0069] Step 304: forming subdivided industry nodes according to the clustering results, adding upper and lower limit information of energy consumption and energy consumption type information to the nodes, and adding subdivided industry node labels to the annual and monthly data.
[0070] Step 4: Allocate the energy consumption upper and lower limits and energy consumption types of the enterprise to be predicted to the corresponding industry nodes, split and complete the monthly energy consumption data of the enterprise to be predicted under the determined industry node, and obtain the enterprise monthly energy consumption data with subdivided industry node labels after data completion, including the following steps:
[0071] Step 401: pre-processing all the complete monthly energy consumption data of enterprises in constructing the segmented industry nodes, including -1 normalization and standardization of the data;
[0072] Step 402: Split and complete the enterprises with incomplete monthly data in the node. If the missing monthly data is greater than the set threshold, the constructed node year-month splitting formula is used to split the annual data to split and complete the missing monthly data; if the missing monthly data is less than the set threshold, the monthly data is completed using the interpolation method;
[0073] In this embodiment, the threshold is 60%;
[0074] The process of constructing the node year-month splitting formula includes: using the data of the same industry and the particle swarm optimization algorithm to construct the node year-month splitting formula for all enterprises with complete monthly data in all subdivided industry nodes.
[0075] Step 5: Train the energy consumption prediction model based on the enterprise monthly energy consumption data with segmented industry node labels after data completion to obtain the trained energy consumption prediction model;
[0076] In this embodiment, the energy consumption prediction model uses the tpe-LightGBM model;
[0077] Among them, the energy consumption prediction model is trained based on the enterprise monthly energy consumption data with segmented industry node labels after data completion, including the following steps:
[0078] Step 501: Perform 0-1 normalization and standardization on the completed monthly energy consumption data.
[0079] Step 502: Add time series features to each piece of monthly energy consumption data, namely, energy consumption in the previous month, energy consumption in the previous two months, and energy consumption in the previous three months.
[0080] Step 503: split the time series monthly energy consumption data set into a test set and a training set;
[0081] Step 504: Use the TPE parameter tuning method to tune the parameters of LightGBM using the time series monthly energy consumption training set data to obtain the optimal LightGBM model, and use the test set to verify the prediction results of the energy consumption prediction model
[0082] Step 6: Based on the enterprise monthly energy consumption data with segmented industry node labels after data completion and the trained energy consumption prediction model, the enterprise energy consumption forecast results for the next month are predicted, and the enterprise energy consumption forecast results for the next month are added as known data to predict the data for the next month.
[0083] In step 6, before conducting enterprise energy consumption forecasting for the enterprise to be forecasted, the enterprise data corresponding to the enterprise to be forecasted is classified according to the upper and lower limit information of energy consumption and the energy consumption type information, and then the monthly data is completed to conduct the forecast.
[0084] Step 7: Use the SHAP value model to perform an interpretable analysis of the prediction results, including quantifying the contribution of each prediction feature in the model output, showing the impact of features including segmented industry nodes on model predictions, and then sorting the features by importance, and showing the detailed impact of the features in the style of a SHAP value scatter plot.
[0085] The features used for prediction and the prediction results are input into the SHAP value model and the SHAP value is used to calculate the mean of the marginal contribution.
[0086] The detailed explanation is as follows: A works alone to produce value v(A), and then joins B to jointly produce value v(A,B), then the cumulative contribution of B is v(A,B)-v(A). For all sequences that can form the full set N, find the cumulative contribution of feature i, and then take the average to get the SHAP value of i.
[0087] Assume that feature i has (S|-1)! sortings when participating in S training, |S| represents the number of feature members included in sorting S, and the remaining (n-|S) features have (n-|S)! ! sortings. The different sorting combinations of all feature i participating in divided by the random sorting combination of n features is the weight of the benefit that feature i should get for the whole, recorded as The marginal contribution created by feature i participating in different rankings S for its own participation in the alliance is recorded as: Then the benefit that feature i gets from the overall benefit is the SHAP value:
[0088]
[0089] Generates a comprehensive SHAP analysis chart showing the importance of features, quantifies the contribution of each prediction feature in the model output, and reveals the impact of features including segmented industry nodes on model predictions. It helps decision makers identify which features have a significant impact on model output, so that they can focus on these key factors in business decision-making and make more accurate and reasonable decisions.
[0090] Embodiment 2
[0091] This embodiment provides an enterprise energy consumption prediction system based on a multi-clustering method, including:
[0092] A data acquisition module, which is used to obtain the enterprise's annual energy consumption data set;
[0093] The multi-clustering module is used to determine the optimal number of clusters for clustering the annual energy consumption data of an enterprise. According to the optimal number of clusters, the annual energy consumption data is clustered using multiple clustering methods. The multiple clustering results are matched and merged to construct subdivided industry nodes, and upper and lower limits and energy consumption type information are added to the class labels of the nodes.
[0094] A splitting and completion module is used to split and complete the enterprise monthly energy consumption data of the constructed segmented industry nodes to obtain the enterprise monthly energy consumption data with segmented industry node labels after data completion;
[0095] The energy consumption prediction module is used to predict the energy consumption forecast result of the enterprise for the next month based on the enterprise monthly energy consumption data with segmented industry node labels after data completion and the trained energy consumption prediction model;
[0096] The forecast result analysis module is used to use the SHAP value model to perform interpretable analysis on the enterprise energy consumption forecast results for the next month.
[0097] Embodiment 3
[0098] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the enterprise energy consumption prediction method based on the multi-clustering method as described above are implemented.
[0099] Embodiment 4
[0100] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the enterprise energy consumption prediction method based on the multi-clustering method as described above are implemented.
[0101] Embodiment 5
[0102] This embodiment provides a program product, which is a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps in the enterprise energy consumption prediction method based on the multi-clustering method as described above are implemented.
[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0108] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for predicting enterprise energy consumption based on multi-clustering method, characterized in that: The steps include: Obtain the enterprise annual energy consumption data set; Determine the optimal number of clusters for clustering the annual energy consumption data of the enterprise, cluster the annual energy consumption data using multiple clustering methods based on the optimal number of clusters, match and merge the multiple clustering results to construct subdivided industry nodes, and add energy consumption upper and lower limits and energy consumption type information to the class labels of the nodes; According to the upper and lower limits of the energy consumption and the energy consumption type of the enterprise to be predicted, they are allocated to the corresponding industry nodes, and the monthly energy consumption data of the enterprise to be predicted under the determined industry node is split and completed to obtain the monthly energy consumption data of the enterprise with subdivided industry node labels after data completion; Based on the enterprise monthly energy consumption data with segmented industry node labels after data completion and the trained energy consumption prediction model, the enterprise energy consumption forecast result for the next month is obtained; The SHAP value model is used to perform interpretable analysis on the enterprise energy consumption forecast results for the next month.
2. The enterprise energy consumption prediction method based on multi-clustering method according to claim 1, characterized in that: The process of determining the optimal number of clusters for clustering the enterprise's annual energy consumption data includes: The maximum number of subdivided industries is obtained based on the experts’ domain knowledge; The annual energy consumption data of enterprises were clustered by k-means clustering and hierarchical clustering with the number of clusters being 2-max. The dbs index and silhouette index of each clustering result were calculated according to the clustering results, and the clustering result with the best index performance was selected as the optimal number of clusters finally selected.
3. The enterprise energy consumption prediction method based on multi-clustering method according to claim 1, characterized in that: The annual energy consumption data is clustered using a variety of clustering methods according to the optimal number of clusters, and the obtained multiple clustering results are matched and merged, including: According to the optimal number of clusters, k-means clustering, hierarchical clustering and density clustering are performed on the annual energy consumption data. According to the selection of the initial centroid and the distance measurement method, five clusterings are performed in total, including two k-means clusterings, two hierarchical clusterings and one density clustering, generating five clustering results. Based on the five clustering results obtained, the class labels of one clustering result are matched with the class labels of the remaining clustering results, and the final merged result is obtained by merging them according to the set merging rules; The merging rule is: the class label in cluster result A is i, and each class label in cluster result B is j, and the class labels in both cluster results that belong to class A are calculated. i and class B j The number of samples N of these two classes ij , find the maximum number of overlapping samples N ij The corresponding class i and class j of clustering result A and the class j in clustering result B are represented by the same class label.
4. The enterprise energy consumption prediction method based on multi-clustering method according to claim 1, characterized in that: The monthly energy consumption data of the enterprise to be predicted under the determined industry node is split and completed to obtain the enterprise monthly energy consumption data with subdivided industry node labels after data completion, including: For enterprises with incomplete monthly data in industry nodes, split and complete them. If the missing monthly data is greater than the set threshold, the constructed node year-month splitting formula is used to split the annual data and split and complete the missing monthly data; if the missing monthly data is less than the set threshold, the interpolation method is used to complete the monthly data; The process of constructing the node year-month splitting formula includes: using the particle swarm optimization algorithm to construct the node year-month splitting formula for all enterprises with complete monthly data in all subdivided industry nodes.
5. The enterprise energy consumption prediction method based on multi-clustering method according to claim 1, characterized in that: The training process of the energy consumption prediction model includes: Add time series features to each piece of monthly energy consumption data, namely energy consumption in the previous month, energy consumption in the previous two months, and energy consumption in the previous three months; Split the time series monthly energy consumption dataset into a test set and a training set; The TPE parameter tuning method is used to tune the parameters of the energy consumption prediction model that will use the time series monthly energy consumption training set data, and the test set is used to verify the prediction results of the energy consumption prediction model.
6. The enterprise energy consumption prediction method based on multi-clustering method according to claim 1, characterized in that: The use of the SHAP value model to perform an interpretable analysis of the enterprise energy consumption forecast results for the next month includes: quantifying the contribution of each prediction feature in the model output, displaying the impact of features including segmented industry nodes on model predictions, and then sorting the importance of features by size, and displaying the detailed impact of the features in the style of a shap value scatter plot.
7. An enterprise energy consumption prediction system based on multi-clustering method, characterized in that: include: A data acquisition module, which is used to obtain the enterprise's annual energy consumption data set; The multi-clustering module is used to determine the optimal number of clusters for clustering the annual energy consumption data of an enterprise. According to the optimal number of clusters, the annual energy consumption data is clustered using multiple clustering methods. The multiple clustering results are matched and merged to construct subdivided industry nodes, and the upper and lower limits of energy consumption and energy consumption type information are added to the class labels of the nodes. The splitting and completion module is used to allocate the energy consumption upper and lower limits and energy consumption types of the enterprise to be predicted to the corresponding industry nodes, split and complete the monthly energy consumption data of the enterprise to be predicted under the determined industry node, and obtain the enterprise monthly energy consumption data with subdivided industry node labels after data completion; The energy consumption prediction module is used to predict the energy consumption forecast result of the enterprise for the next month based on the enterprise monthly energy consumption data with segmented industry node labels after data completion and the trained energy consumption prediction model; The forecast result analysis module is used to use the SHAP value model to perform interpretable analysis on the enterprise energy consumption forecast results for the next month.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the enterprise energy consumption prediction method based on a multi-clustering method as described in any one of claims 1 to 6 are implemented.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the enterprise energy consumption prediction method based on a multi-clustering method as described in any one of claims 1-6 are implemented.
10. A program product, the program product being a computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps in the enterprise energy consumption prediction method based on a multi-clustering method as described in any one of claims 1 to 6 are implemented.
Citation Information
Cited By
System and method for detecting cycle time
TWI944531B
