Data set construction-based electricity consumption prediction method and related product

Through clustering and correlation analysis methods, a power consumption prediction model is constructed, which solves the problem of low accuracy in power consumption prediction in the prior art, and achieves more accurate power consumption prediction.

CN119151053APending Publication Date: 2024-12-17CHINA AUTOMOTIVE RES INST AUTOMOTIVE IND ENG (TIANJIN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411191202.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The prior art has low accuracy in industrial electricity consumption prediction, especially in the electricity consumption prediction of automobile companies, and it is impossible to effectively capture the complex modes and temperature effects of electricity consumption.

Method used

By obtaining historical data of the target area, generating feature sets and clustering, generating clustered data sets, determining the power consumption pattern, calculating data correlation, and building a power consumption prediction model based on these data to perform power consumption prediction.

Benefits of technology

The accuracy of electricity consumption prediction is improved, and typical electricity consumption patterns of automobile companies are identified through cluster analysis and selected appropriate data set training models to achieve more accurate electricity consumption prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151053A_ABST
    Figure CN119151053A_ABST
Patent Text Reader

Abstract

The invention provides a data set construction-based electricity consumption prediction method and related products, and the method comprises the steps: obtaining historical data corresponding to a target region, selecting the historical data of a preset first continuous number of days to generate a first feature set, and generating a clustering data set through the first feature set. And clustering the clustering data set to obtain a plurality of clustering results. And determining a second feature set corresponding to a target clustering result in the first feature set based on the plurality of clustering results. And according to the second feature set, determining training data corresponding to a prediction day and a preset second continuous number of days before the prediction day. And generating an original training data set according to the training data of the third continuous days close to the prediction day. A prediction data set is determined based on the correlation. And training the pre-training model based on the prediction data set to obtain an electricity consumption prediction model. And predicting the electricity consumption by using the electricity consumption prediction model. The method provided by the invention can accurately predict a complex power consumption scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electricity consumption prediction, and in particular to an electricity consumption prediction method based on a data set and related products. Background Art

[0002] With the continuous development of science and technology, people's demand for energy is getting higher and higher, and at the same time, people's requirements for carbon emissions are also increasing. Among all carbon emissions, industrial carbon emissions account for a significant proportion. Industrial carbon emissions are proportional to industrial electricity consumption to a certain extent. The existing technology for predicting electricity consumption, especially the prediction of electricity consumption by automobile companies, is generally based on energy monitoring and management systems. Through the energy monitoring and management system, the correlation between the operating characteristics of automobile companies and electricity consumption is simply studied to predict electricity consumption. However, the accuracy of the existing technology for predicting electricity consumption is low.

[0003] Therefore, how to improve the accuracy of electricity consumption prediction has become a technical problem that technical personnel in this field need to solve urgently. Summary of the invention

[0004] Based on the above problems, this application provides a power consumption prediction method and related products based on a data set:

[0005] The power consumption prediction method constructed based on the data set includes:

[0006] Acquire historical data corresponding to the target area, the historical data including a historical date, a historical single-day power consumption corresponding to the historical date, power consumption of multiple power items corresponding to the historical date, a historical single-day maximum outdoor temperature corresponding to the historical date, and a historical single-day minimum outdoor temperature corresponding to the historical date;

[0007] Selecting historical data of a preset first continuous number of days to generate a first feature set;

[0008] Generate a clustering data set using the historical single-day maximum outdoor temperature in the first feature set, the power consumption of the number of people power consumption items corresponding to the number of people in the target area among the multiple power consumption items, and the power consumption of the output power consumption items corresponding to the output of the target area among the multiple power consumption items;

[0009] Clustering the clustering data set to obtain a plurality of clustering results, wherein the clustering results are used to represent the power consumption pattern of the target area;

[0010] Determine a second feature set corresponding to a target clustering result in the first feature set based on the multiple clustering results;

[0011] Determine the training data corresponding to each day of the prediction day and the second consecutive days preset before the prediction day according to the second feature set;

[0012] Generate an original training data set based on the training data of the third consecutive days close to the predicted day;

[0013] Calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day;

[0014] determining a prediction data set based on the correlation;

[0015] Based on the prediction data set, the pre-trained model is trained to obtain a power consumption prediction model;

[0016] The power consumption prediction model is used to predict the power consumption on the prediction day to obtain the power consumption prediction result on the prediction day.

[0017] In a possible implementation, clustering the clustering data set to obtain a plurality of clustering results includes:

[0018] Determine the number of clusters K based on the number n of cluster data in the cluster data set, the current class k, the inter-cluster covariance matrix trB(k) and the intra-cluster covariance matrix trW(k);

[0019] The cluster number K is determined by the following formula:

[0020]

[0021] The clustering data set is clustered according to the clustering number K to obtain K clustering results.

[0022] In a possible implementation manner, determining a second feature set corresponding to a target clustering result in the first feature set based on the multiple clustering results includes:

[0023] Calculate the Pearson index between the historical single-day electricity consumption corresponding to the historical date and the features of the historical date under the kth clustering result according to the kth clustering result among the K clustering results;

[0024] The second feature set is generated by using the features in the first feature set whose Pearson index is greater than 0.5.

[0025] In a possible implementation, calculating the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day includes:

[0026] Calculate the cosine similarity between the data corresponding to each day in the original training data set and the data corresponding to the predicted day;

[0027] The cosine similarity is used as the data corresponding to each day in the original training data set and the data corresponding to the predicted day as the correlation.

[0028] This application also provides a power consumption prediction device based on a data set:

[0029] A first acquisition module is used to acquire historical data corresponding to the target area, wherein the historical data includes a historical date, a historical single-day power consumption corresponding to the historical date, power consumption of multiple power consumption items corresponding to the historical date, a historical single-day maximum outdoor temperature corresponding to the historical date, and a historical single-day minimum outdoor temperature corresponding to the historical date;

[0030] A first generating module, used for selecting historical data of a preset first continuous number of days to generate a first feature set;

[0031] A second generating module is used to generate a clustering data set by using the historical single-day maximum outdoor temperature in the first feature set, the power consumption of the number of people in the target area among the multiple power consumption items, and the power consumption of the output power consumption item corresponding to the output of the target area among the multiple power consumption items;

[0032] A clustering module, used for clustering the clustering data set to obtain a plurality of clustering results, wherein the clustering results are used to represent the power consumption pattern of the target area;

[0033] A first determining module, configured to determine a second feature set corresponding to a target clustering result in the first feature set based on the multiple clustering results;

[0034] A second determination module is used to determine the training data corresponding to the prediction day and a second consecutive number of days preset before the prediction day according to the second feature set;

[0035] A third generating module, used to generate an original training data set according to the training data of the third consecutive days close to the predicted day;

[0036] A correlation determination module, used to calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day;

[0037] A third determination module, configured to determine a prediction data set based on the correlation;

[0038] A model training module, used to train the pre-trained model based on the prediction data set to obtain a power consumption prediction model;

[0039] The prediction module is used to use the power consumption prediction model to predict the power consumption on the prediction day to obtain the power consumption prediction result on the prediction day.

[0040] In a possible implementation, the clustering module is specifically used to:

[0041] Determine the number of clusters K based on the number n of cluster data in the cluster data set, the current class k, the inter-cluster covariance matrix trB(k) and the intra-cluster covariance matrix trW(k);

[0042] The cluster number K is determined by the following formula:

[0043]

[0044] The clustering data set is clustered according to the clustering number K to obtain K clustering results.

[0045] In a possible implementation manner, the first determining module is specifically configured to:

[0046] Calculate the Pearson index between the historical single-day electricity consumption corresponding to the historical date and the features of the historical date under the kth clustering result according to the kth clustering result among the K clustering results;

[0047] The second feature set is generated by using the features in the first feature set whose Pearson index is greater than 0.5.

[0048] In a possible implementation manner, the correlation determination module is specifically used to:

[0049] Calculate the cosine similarity between the data corresponding to each day in the original training data set and the data corresponding to the predicted day;

[0050] The cosine similarity is used as the data corresponding to each day in the original training data set and the data corresponding to the predicted day as the correlation.

[0051] The present application also provides an electronic device, the electronic device comprising a processor and a memory:

[0052] The memory is used to store a computer program and transmit the computer program to the processor;

[0053] The processor is used to execute the steps of the above-mentioned power consumption prediction method based on the data set according to the instructions in the computer program.

[0054] The present application also provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, and when the computer program is executed by an electronic device, the steps of the above-mentioned power consumption prediction method based on the data set are implemented.

[0055] Compared with the prior art, this application has the following beneficial effects:

[0056] The method provided by the present application first obtains the historical data corresponding to the target area, and selects the historical data of the preset first continuous days to generate the first feature set. When constructing the data set, the method provided by the present application clusters the clustering data set formed by the first feature set into the clustering results corresponding to the power consumption modes of multiple automobile companies by clustering. A corresponding second feature set can be constructed for each power consumption mode. According to the second feature set, the training data corresponding to each day of the predicted day and the preset second continuous days before the predicted day are determined. The original training data set is generated according to the training data of the third continuous days close to the predicted day. When selecting the training data, the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day is calculated, and the predicted data set is determined based on the correlation, and then the pre-trained model is trained based on the predicted data set to obtain the power consumption prediction model. The method provided by the present application can predict the power consumption based on the method of data set construction. The method provided by the present application can obtain the clustering results corresponding to the power consumption modes of multiple automobile companies by clustering, and the data set that is more in line with the power consumption mode of the automobile company can be selected through the clustering results, so as to train a more accurate power consumption prediction model, and finally make a more accurate prediction of the power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0058] Figure 1 A flow chart of a method for predicting power consumption based on a data set provided in an embodiment of the present application;

[0059] Figure 2 A schematic diagram of the structure of a device for predicting power consumption based on a data set provided in an embodiment of the present application;

[0060] Figure 3 A schematic diagram of a clustering result provided in an embodiment of the present application;

[0061] Figure 4 A comparison diagram of the average cosine similarity of a filtered and unfiltered forecast day data set provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] As described above, the existing technology for predicting electricity consumption, especially the prediction of electricity consumption by automobile companies, is generally based on energy monitoring and management systems. The energy monitoring and management system simply studies the correlation between the operating characteristics of automobile companies and electricity consumption to predict electricity consumption. However, the accuracy of electricity consumption prediction by existing technology is low.

[0063] After research, it was found that the electricity consumption of automobile companies is very complex. For example, on weekdays with more orders, both manual and machine electricity consumption will be higher. On rest days with hot weather, manual electricity consumption will be higher and machine electricity consumption will be lower. The electricity consumption of automobile companies is not only related to the electricity consumption of each item, but also has a certain relationship with temperature. In order to more accurately predict the electricity consumption of automobile companies, this application provides a method for predicting electricity consumption based on a data set and related products.

[0064] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] It is understandable that the method provided in the present application can be applied to a processing device, which is a processing device for a power consumption prediction method based on a data set, such as a terminal device or server for a power consumption prediction method based on a data set. The method provided in the present application can be executed independently by a terminal device or a server, or can be applied to a network scenario in which a terminal device and a server communicate, and is executed by the cooperation of a terminal device and a server. Among them, the terminal device can be a computer, a mobile phone and other devices. The server can be understood as an application server or a Web server. In actual deployment, the server can be a stand-alone server or a cluster server.

[0066] Figure 1 A flow chart of a method for predicting power consumption based on a data set provided in this application, the method comprising the following steps:

[0067] S101: Acquire historical data corresponding to a target area.

[0068] The processing device obtains historical data of the target area. The target area may be a target park of an automobile enterprise. The historical data may include a historical date, a historical single-day power consumption corresponding to the historical date, power consumption of multiple power consumption items corresponding to the historical date, a historical single-day maximum outdoor temperature corresponding to the historical date, and a historical single-day minimum outdoor temperature corresponding to the historical date.

[0069] Specifically, if the historical date is 20th of month X, 20XX, the historical daily electricity consumption corresponding to this historical date is y 1 The historical maximum outdoor temperature for the day corresponding to this historical date is Temp. max,1 The historical maximum outdoor temperature for the day corresponding to this historical date is Temp.min,1 , the power consumption of multiple power items corresponding to the historical date can be x 1,1 、x 2,1 、x 3,1 ……x n,1 Here, we take one day’s data as an example. max,1 Temp min,1 and x n,1 The subscript of is 1. The electricity consumption of multiple electricity items can also include the electricity consumption of manufacturing process sub-items, public sub-items and lighting sub-items.

[0070] S102: Selecting historical data of a preset first continuous number of days to generate a first feature set.

[0071] The processing device selects historical data of a preset first continuous number of days to generate a first feature set. The preset first continuous number of days may be any continuous number of days, for example, seven consecutive days.

[0072] Specifically, when acquiring historical data, a historical date can be selected as the starting point for data acquisition, for example, 20th of month X, 20XX is used as the starting point for data acquisition. From the starting point, historical data of the first preset consecutive days can be acquired. For example, historical data of 20th of month X, 20XX and the previous seven days, that is, eight days in total, can be acquired, t=8.

[0073] At this time, the historical daily electricity consumption corresponding to the seven days before the historical date is y t-1 ,y t-2 ,...,y t-7 The power consumption of multiple power items corresponding to the seven days before the historical date is x 1,t-1 , ..., x 1,t-7 ,x 2,t-1 , …, x 2,t-7 , …, x m,t-1 , …, x n,t-7 .

[0074] The first feature set X t for:

[0075] X t ={Temp max,t ,Temp min,t ,y t-1 ,y t-2 ,...,y t-7 ,x 1,t-1 , ..., x 1,t-7 ,x 2,t-1 , …, x 2,t-7 , …, x n,t-1 , …, xn,t-7}.

[0076] S103: Generate a clustering data set using the historical daily maximum outdoor temperature in the first feature set, the power consumption of the number of people in the target area among multiple power consumption items, and the power consumption of the output power consumption item corresponding to the output of the target area among multiple power consumption items.

[0077] The processing device generates a clustering data set using the historical daily maximum outdoor temperature in the first feature set, the power consumption of the number of people in the target area among multiple power consumption items, and the power consumption of the output power consumption item corresponding to the output of the target area among multiple power consumption items.

[0078] Specifically, the processing device may select the first feature set X t Temp max,t , the power consumption x of the power consumption item corresponding to the number of people in the target area in the previous day p,t-1 , the electricity consumption x of the output electricity consumption item corresponding to the output of the target area in the previous day's multiple electricity consumption items q,t-1 Combine into clustered data sets.

[0079] When clustering, the number of clusters K required can be determined in advance. Specifically, the optimal number of clusters K can be determined by the Calinski-Harabasz index and the CH index. The number of clusters K can be determined by the following formula:

[0080]

[0081] Among them, n is the number of cluster data in the clustering data set, k is the current class, trB(k) is the between-cluster covariance matrix and trW(k) is the within-cluster covariance matrix, and K is the number of clusters.

[0082] S104: Clustering the clustering data set to obtain multiple clustering results.

[0083] The processing device clusters the clustering data set to obtain a plurality of clustering results, and the clustering results are used to represent the power consumption pattern of the target area.

[0084] Specifically, the processing equipment can obtain clustering results through the K-means clustering method, and finally obtain K clustering results, and the K clustering results correspond to K typical operation modes of the park.

[0085] S105: Determine a second feature set corresponding to the target clustering result in the first feature set based on the multiple clustering results.

[0086] The processing device determines a second feature set corresponding to the target clustering result in the first feature set based on the plurality of clustering results. If there are K clustering results, there are K second feature sets corresponding to the K clustering results.

[0087] In a possible implementation, the processing device calculates the Pearson index between the historical single-day power consumption corresponding to the historical date and the features of the historical date under the kth clustering result according to the kth clustering result among the K clustering results, and then generates the second feature set X using the features with the Pearson index greater than 0.5 in the first feature set. k,t .

[0088] S106: Determine, according to the second feature set, the training data corresponding to the prediction day and the second consecutive days preset before the prediction day.

[0089] The processing device determines the training data corresponding to each of the prediction day and the second consecutive days preset before the prediction day according to the second feature set, wherein the second consecutive days may be the same as the first consecutive days or different from the first consecutive days.

[0090] For example, the second consecutive day is i, and the second feature set determines that the training data corresponding to the predicted day and the second consecutive days preset before the predicted day is d. k,T-i . Where T is the total number of days corresponding to the second feature set.

[0091] S107: Generate an original training data set based on the training data of the third consecutive days close to the prediction day.

[0092] The processing device generates an original training data set based on the training data of the third consecutive day close to the predicted day, wherein the third consecutive day may be the same as the second consecutive day or may be different from the second consecutive day.

[0093] For example, the third consecutive day is r, and the original training data set generated by the training data of the third consecutive day close to the prediction day is D′ k,T ={d k,T-1 ,d k,T-2 ,...,d k,T-r} T Wherein, T is the total number of days corresponding to the second feature set.

[0094] S108: Calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the prediction day.

[0095] The processing device may calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day.

[0096] Specifically, the processing device can calculate the cosine similarity between the data corresponding to each day in the original training data set and the data corresponding to the predicted day. Then, the cosine similarity is used as the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day. The cosine similarity can be calculated by the following formula:

[0097]

[0098] The second feature set determines that the training data corresponding to the prediction day and the second consecutive days preset before the prediction day is d k,T-i The data corresponding to each day in the original training data set is d k,T .

[0099] S109: Determine a prediction data set based on the correlation.

[0100] The processing device determines a predictive data set based on the correlation.

[0101] Specifically, the processing device may select the data of the s day with the greatest correlation to form the prediction data set.

[0102] S110: Train the pre-trained model based on the prediction data set to obtain a power consumption prediction model.

[0103] The processing device trains the pre-trained model based on the prediction data set to obtain the power consumption prediction model.

[0104] Specifically, the processing device can train the basic model based on the Xgboost algorithm and adopt a rolling training update mechanism to obtain a power consumption prediction model.

[0105] S111: using the power consumption prediction model to predict the power consumption on the prediction day, and obtaining the power consumption prediction result on the prediction day.

[0106] Specifically, before predicting the power consumption every day, the above S101-110 are repeated to obtain a power consumption prediction model, and the power consumption is predicted using the power consumption prediction model.

[0107] The present application also provides a Figure 2 The schematic diagram of the structure of the device for predicting power consumption based on a data set is shown, and the device 200 for predicting power consumption based on a data set includes:

[0108] The first acquisition module 201 is used to acquire historical data corresponding to the target area, wherein the historical data includes a historical date, a historical single-day power consumption corresponding to the historical date, power consumption of multiple power consumption items corresponding to the historical date, a historical single-day maximum outdoor temperature corresponding to the historical date, and a historical single-day minimum outdoor temperature corresponding to the historical date;

[0109] A first generating module 202, configured to select historical data of a preset first continuous number of days to generate a first feature set;

[0110] The second generating module 203 is used to generate a clustering data set by using the historical single-day maximum outdoor temperature in the first feature set, the power consumption of the number of people in the target area among the multiple power consumption items, and the power consumption of the output power consumption item corresponding to the output of the target area among the multiple power consumption items;

[0111] A clustering module 204, configured to cluster the clustering data set to obtain a plurality of clustering results, wherein the clustering results are used to represent the power consumption pattern of the target area;

[0112] A first determination module 205, configured to determine a second feature set corresponding to a target clustering result in the first feature set based on the multiple clustering results;

[0113] A second determination module 206 is used to determine the training data corresponding to the prediction day and a second consecutive number of days preset before the prediction day according to the second feature set;

[0114] A third generating module 207, configured to generate an original training data set according to the training data of the third consecutive days close to the predicted day;

[0115] A correlation determination module 208 is used to calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day;

[0116] A third determination module 209, configured to determine a prediction data set based on the correlation;

[0117] A model training module 210, configured to train a pre-trained model based on the prediction data set to obtain a power consumption prediction model;

[0118] The prediction module 211 is used to predict the power consumption on the prediction day by using the power consumption prediction model to obtain the power consumption prediction result on the prediction day.

[0119] In a possible implementation, the clustering module is specifically used to:

[0120] Determine the number of clusters K based on the number n of cluster data in the cluster data set, the current class k, the inter-cluster covariance matrix trB(k) and the intra-cluster covariance matrix trW(k);

[0121] The cluster number K is determined by the following formula:

[0122]

[0123] The clustering data set is clustered according to the clustering number K to obtain K clustering results.

[0124] In a possible implementation manner, the first determining module is specifically configured to:

[0125] Calculate the Pearson index between the historical single-day electricity consumption corresponding to the historical date and the features of the historical date under the kth clustering result according to the kth clustering result among the K clustering results;

[0126] The second feature set is generated by using the features in the first feature set whose Pearson index is greater than 0.5.

[0127] In a possible implementation manner, the correlation determination module is specifically used to:

[0128] Calculate the cosine similarity between the data corresponding to each day in the original training data set and the data corresponding to the predicted day;

[0129] The cosine similarity is used as the data corresponding to each day in the original training data set and the data corresponding to the predicted day as the correlation.

[0130] The above-mentioned device first obtains the historical data corresponding to the target area, and selects the historical data of the preset first continuous days to generate the first feature set. When constructing the data set, the method provided by the present application clusters the clustering data set formed by the first feature set into the clustering results corresponding to the power consumption modes of multiple automobile enterprises by clustering. A corresponding second feature set can be constructed for each power consumption mode. According to the second feature set, the training data corresponding to each day of the predicted day and the preset second continuous days before the predicted day are determined. The original training data set is generated according to the training data of the third continuous days close to the predicted day. When selecting the training data, the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day is calculated, and the predicted data set is determined based on the correlation, and then the pre-trained model is trained based on the predicted data set to obtain the power consumption prediction model. The method provided by the present application can predict the power consumption based on the method of data set construction. The method provided by the present application can obtain the clustering results corresponding to the power consumption modes of multiple automobile enterprises by clustering, and the data set that is more in line with the power consumption mode of the automobile enterprise can be selected through the clustering results, so as to train a more accurate power consumption prediction model, and finally make a more accurate prediction of the power consumption.

[0131] In S104, the processing device may cluster the clustering data set to obtain a plurality of clustering results. Figure 3 A schematic diagram of a clustering result provided in an embodiment of the present application is shown in FIG. Figure 3 There are four clustering results, mode 1 (square), mode 2 (triangle), mode 3 (circle) and mode 4 (diamond). Figure 3 The relationship between the lighting power consumption, outdoor maximum temperature and process power consumption for each mode is shown in Figure 2.

[0132] In S105, the processing device determines a second feature set corresponding to the target clustering result in the first feature set based on the multiple clustering results. That is, the processing device performs data screening based on the clustering results in the first feature set. Figure 4 A comparison chart of average cosine similarity between a filtered and unfiltered forecast day data set provided in an embodiment of the present application. Figure 4 It can be seen that the cosine similarity without data screening fluctuates greatly, while the cosine similarity with data screening fluctuates less.

[0133] An embodiment of the present application also provides an electricity consumption prediction device constructed based on a data set, wherein the device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device performs the steps of the electricity consumption prediction method constructed based on a data set described in any embodiment of the present application.

[0134] In practical applications, the computer-readable storage medium may be any combination of one or more computer-readable media, which may be a computer-readable signal medium or a computer-readable storage medium.

[0135] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0136] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0137] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0138] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0139] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0140] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for predicting power consumption based on a data set, characterized in that: include: Acquire historical data corresponding to the target area, the historical data including a historical date, a historical single-day power consumption corresponding to the historical date, power consumption of multiple power items corresponding to the historical date, a historical single-day maximum outdoor temperature corresponding to the historical date, and a historical single-day minimum outdoor temperature corresponding to the historical date; Selecting historical data of a preset first continuous number of days to generate a first feature set; Generate a clustering data set using the historical single-day maximum outdoor temperature in the first feature set, the power consumption of the number of people power consumption items corresponding to the number of people in the target area among the multiple power consumption items, and the power consumption of the output power consumption items corresponding to the output of the target area among the multiple power consumption items; Clustering the clustering data set to obtain a plurality of clustering results, wherein the clustering results are used to represent the power consumption pattern of the target area; Determine a second feature set corresponding to a target clustering result in the first feature set based on the multiple clustering results; Determine the training data corresponding to each day of the prediction day and the second consecutive days preset before the prediction day according to the second feature set; Generate an original training data set based on the training data of the third consecutive days close to the predicted day; Calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day; determining a prediction data set based on the correlation; Based on the prediction data set, the pre-trained model is trained to obtain a power consumption prediction model; The power consumption prediction model is used to predict the power consumption on the prediction day to obtain the power consumption prediction result on the prediction day.

2. The method according to claim 1, characterized in that The clustering of the clustering data set to obtain a plurality of clustering results comprises: Determine the number of clusters K based on the number n of cluster data in the cluster data set, the current class k, the inter-cluster covariance matrix trB(l) and the intra-cluster covariance matrix trW(k); The cluster number K is determined by the following formula: The clustering data set is clustered according to the clustering number K to obtain K clustering results.

3. The method according to claim 2, characterized in that The determining, based on the plurality of clustering results, a second feature set corresponding to a target clustering result in the first feature set comprises: Calculate the Pearson index between the historical single-day electricity consumption corresponding to the historical date and the features of the historical date under the kth clustering result according to the kth clustering result among the K clustering results; The second feature set is generated by using the features in the first feature set whose Pearson index is greater than 0.

5.

4. The method according to claim 1, characterized in that: The calculating of the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day comprises: Calculate the cosine similarity between the data corresponding to each day in the original training data set and the data corresponding to the predicted day; The cosine similarity is used as the data corresponding to each day in the original training data set and the data corresponding to the predicted day as the correlation.

5. A power consumption prediction device based on a data set, characterized in that: include: A first acquisition module is used to acquire historical data corresponding to the target area, wherein the historical data includes a historical date, a historical single-day power consumption corresponding to the historical date, power consumption of multiple power consumption items corresponding to the historical date, a historical single-day maximum outdoor temperature corresponding to the historical date, and a historical single-day minimum outdoor temperature corresponding to the historical date; A first generating module, used for selecting historical data of a preset first continuous number of days to generate a first feature set; A second generating module is used to generate a clustering data set by using the historical single-day maximum outdoor temperature in the first feature set, the power consumption of the number of people in the target area among the multiple power consumption items, and the power consumption of the output power consumption item corresponding to the output of the target area among the multiple power consumption items; A clustering module, used for clustering the clustering data set to obtain a plurality of clustering results, wherein the clustering results are used to represent the power consumption pattern of the target area; A first determining module, configured to determine a second feature set corresponding to a target clustering result in the first feature set based on the multiple clustering results; A second determination module is used to determine the training data corresponding to the prediction day and a second consecutive number of days preset before the prediction day according to the second feature set; A third generating module, used to generate an original training data set according to the training data of the third consecutive days close to the predicted day; A correlation determination module, used to calculate the correlation between the data corresponding to each day in the original training data set and the data corresponding to the predicted day; A third determination module, configured to determine a prediction data set based on the correlation; A model training module, used to train the pre-trained model based on the prediction data set to obtain a power consumption prediction model; The prediction module is used to use the power consumption prediction model to predict the power consumption on the prediction day to obtain the power consumption prediction result on the prediction day.

6. The device according to claim 5, characterized in that The clustering module is specifically used for: Determine the number of clusters K based on the number n of cluster data in the cluster data set, the current class k, the inter-cluster covariance matrix trB(k) and the intra-cluster covariance matrix trW(k); The cluster number K is determined by the following formula: The clustering data set is clustered according to the clustering number K to obtain K clustering results.

7. The device according to claim 5, characterized in that The first determining module is specifically used for: Calculate the Pearson index between the historical single-day electricity consumption corresponding to the historical date and the features of the historical date under the kth clustering result according to the kth clustering result among the K clustering results; The second feature set is generated by using the features in the first feature set whose Pearson index is greater than 0.

5.

8. The device according to claim 5, characterized in that The correlation determination module is specifically used for: Calculate the cosine similarity between the data corresponding to each day in the original training data set and the data corresponding to the predicted day; The cosine similarity is used as the data corresponding to each day in the original training data set and the data corresponding to the predicted day as the correlation.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the electricity consumption prediction method based on the data set as described in any one of claims 1-4.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method for predicting electricity consumption based on a data set as described in any one of claims 1 to 4 is implemented.