Method for predicting energy consumption of a building and related device
By constructing an energy consumption prediction model and utilizing feature extraction and feature fusion techniques, the problem of inaccurate energy consumption prediction for electrical components in building areas was solved, achieving higher accuracy in energy consumption prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to accurately predict the individual energy consumption of each electrical component in building area energy consumption forecasting, leading to inaccurate total energy consumption forecasts.
By constructing an energy consumption prediction model, the first and second feature extraction modules are used to extract features from energy consumption data, meteorological data, and time data. The features are then fused through a bidirectional long short-term memory network module to predict the energy consumption of each power-consuming component.
This improves the accuracy of energy consumption prediction for each electrical component, thereby improving the accuracy of total building energy consumption prediction.
Smart Images

Figure CN121579992B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of energy consumption prediction, in particular to a building energy consumption prediction method and related device. BACKGROUND
[0002] With the expansion of urban building scale, the proportion of electricity loads such as air conditioners, elevators and sockets in building operation costs continues to increase. In order to achieve energy saving and carbon reduction and intelligent operation and maintenance, the operator needs to accurately predict the sub-item energy consumption hour by hour in the future period of time, which is used for load peak clipping, operation strategy optimization and energy saving renovation evaluation.
[0003] The existing technology mainly includes load estimation based on empirical formula and simple regression model, and total energy consumption of a region is mainly predicted based on traditional single neural network model, but the energy consumption of different electrical components in a region may be affected by different factors. If only the total energy consumption of a region is predicted from a macro perspective without targeted energy consumption prediction of each electrical component, the determined total energy consumption may not be accurate. SUMMARY
[0004] In view of this, the present application provides a building energy consumption prediction method and related device, which processes the energy consumption data of multiple electrical components in a historical statistical period, meteorological data of multiple time points in a to-be-predicted time period and time data through an energy consumption prediction model, so as to obtain energy consumption prediction data of each electrical component in the to-be-predicted time period, and make the subsequent total energy consumption of the building obtained by each electrical component more accurate.
[0005] The present application provides a building energy consumption prediction method, applied to an electronic device, which comprises the following steps:
[0006] Obtain the energy consumption data of multiple electrical components in a building in a historical statistical period, meteorological data of multiple time points in a to-be-predicted time period and time data, wherein the time data includes time series and category labels for representing whether the time points are weekdays or non-weekdays;
[0007] Use a first feature extraction module in an energy consumption prediction model to extract features from each of the energy consumption data, each of the meteorological data and each of the time series to obtain first feature data, and use a second feature extraction module arranged side by side with the first feature extraction module in the energy consumption prediction model to extract features from each of the category labels to obtain second feature data;
[0008] Fuse the first feature data and the second feature data to obtain target feature data;
[0009] Based on the target feature data, the energy consumption prediction data of each electrical component in the building is obtained during the predicted time period.
[0010] In one possible embodiment, fusing the first feature data and the second feature data to obtain the target feature data includes:
[0011] The first feature data and the second feature data are concatenated to obtain the third feature data;
[0012] The third feature data is processed using the bidirectional long short-term memory network module in the energy consumption prediction model to obtain the target feature data.
[0013] In one possible embodiment, the time series includes hour identifiers for the time points, the first feature data includes first feature sub-data for each time point, and the second feature data includes second feature sub-data for each time point;
[0014] The step of concatenating the first feature data and the second feature data to obtain the third feature data includes:
[0015] The scene category for each time point is determined based on the hour identifier and category label of each time point;
[0016] Based on the scenario category at each time point, a weighted reorganization is determined for each time point, wherein the weighted reorganization includes the weighted weight between the first feature sub-data and the second feature sub-data corresponding to the time point;
[0017] According to the weighted weight of each time point, the first feature sub-data and the second feature sub-data corresponding to each time point are weighted to obtain the updated first feature data and the updated second feature data.
[0018] The updated first feature data and the updated second feature data are concatenated to obtain the third feature data.
[0019] In one possible embodiment, the time features in the time series include the hour identifier of the time point, the date identifier of the date, the week identifier of the date, and the month identifier of the date. Before the first feature extraction module in the energy consumption prediction model extracts features from each of the energy consumption data, each of the meteorological data, and each of the time series to obtain the first feature data, the method further includes:
[0020] Encode all time features contained in each of the time series and each of the meteorological data respectively;
[0021] The encoded time features and meteorological data are then normalized.
[0022] The normalized time features, meteorological data, and energy consumption data are spliced together to obtain spliced data, and the spliced data is input into the first feature extraction module in the energy consumption prediction model.
[0023] In one possible embodiment, the first feature extraction module includes multiple cascaded convolutional layers. The first feature extraction module in the energy consumption prediction model extracts features from each of the energy consumption data, each of the meteorological data, and each of the time series to obtain first feature data, including:
[0024] The concatenated data is processed using the first convolutional layer in the first feature extraction module to obtain the feature data output by the first convolutional layer;
[0025] For non-first convolutional layers, the feature data output by the previous convolutional layer is processed to obtain the feature data output by the non-first convolutional layer.
[0026] In this context, the feature data output by the last convolutional layer in the first feature extraction module is used as the first feature data.
[0027] In one possible embodiment, obtaining the predicted energy consumption data of each electrical component in the building during the predicted time period based on the target feature data includes:
[0028] The target feature data is processed using the prediction module in the energy consumption prediction model to obtain the initial energy consumption prediction data of each of the power-consuming components during the time period to be predicted.
[0029] Perform a normalized inverse transform on each of the initial energy consumption prediction data to obtain the advanced energy consumption prediction data corresponding to each of the initial energy consumption prediction data.
[0030] The advanced energy consumption prediction data are subjected to non-negative truncation to obtain the energy consumption prediction data of each power consumption component within the time period to be predicted.
[0031] In one possible embodiment, the energy consumption prediction data for each of the electrical components during the predicted time period includes energy consumption data for each of the electrical components at multiple time points during the predicted time period. After obtaining the energy consumption prediction data for each of the electrical components in the building during the predicted time period based on the target feature data, the method further includes:
[0032] Based on the energy consumption data of each electrical component at multiple time points within the predicted time period, an energy consumption change curve of the electrical component within the predicted time period is generated.
[0033] The energy consumption curves of each of the electrical components are displayed on the display interface of the electronic device.
[0034] This application provides an energy consumption prediction device for a building, applied to electronic devices, including:
[0035] The data acquisition unit is used to acquire energy consumption data of multiple electrical components in the building during a historical statistical period, meteorological data of multiple time points during the time period to be predicted, and time data. The time data includes time series and category labels used to characterize whether the date of the time point is a working day or a non-working day.
[0036] The feature extraction unit is used to extract features from each of the energy consumption data, each of the meteorological data and each of the time series using the first feature extraction module in the energy consumption prediction model to obtain first feature data; and to extract features from each of the category labels using the second feature extraction module set in parallel with the first feature extraction module in the energy consumption prediction model to obtain second feature data.
[0037] The feature fusion unit is used to fuse the first feature data and the second feature data to obtain target feature data;
[0038] An energy consumption prediction unit is used to obtain energy consumption prediction data for each electrical component in the building during the time period to be predicted, based on the target feature data.
[0039] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps in any of the above-described building energy consumption prediction methods.
[0040] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the energy consumption prediction method for any of the above-described buildings.
[0041] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the energy consumption prediction method for any of the above-described building structures.
[0042] In the energy consumption prediction method and related apparatus for buildings provided in this application, the first feature extraction module and the second feature extraction module in the energy consumption prediction model are used to perform targeted feature extraction on energy consumption data within the historical statistical period, meteorological data and time data at multiple time points within the prediction period. Then, the target feature data obtained by fusing the first feature data and the second feature data obtained by feature extraction is used to obtain the energy consumption prediction data of multiple electrical components in the building within the prediction period. This realizes the use of one energy consumption prediction model to model the energy consumption of multiple electrical components within the prediction period, the energy consumption data of the historical statistical period, and the meteorological data and time data at multiple time points within the prediction period. This can improve the accuracy of the energy consumption prediction of each electrical component, thereby improving the accuracy of the total energy consumption data of the building determined subsequently based on the energy consumption prediction data of each electrical component. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is one of the flowcharts illustrating a method for predicting the energy consumption of a building provided in this application embodiment;
[0045] Figure 2 This is a schematic diagram of the structure of the first feature extraction module in the energy consumption prediction model provided in the embodiments of this application;
[0046] Figure 3 This is a second schematic flowchart of a method for predicting the energy consumption of a building provided in an embodiment of this application;
[0047] Figure 4 This is the structure of an energy consumption prediction model provided in an embodiment of this application;
[0048] Figure 5 This is a schematic diagram of energy consumption change curves drawn based on the energy consumption prediction data of elevators within a building during the time period to be predicted, provided in an embodiment of this application.
[0049] Figure 6 This is a schematic diagram of energy consumption change curves drawn based on the actual energy consumption data of elevators within a building during the time period to be predicted, provided in an embodiment of this application.
[0050] Figure 7 This is one of the functional unit block diagrams of an energy consumption prediction device for a building provided in this application embodiment;
[0051] Figure 8 This is the second functional unit block diagram of an energy consumption prediction device for a building provided in this application embodiment;
[0052] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0055] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0056] See also Figure 1 , Figure 1 This is one of the flowcharts illustrating a building energy consumption prediction method provided in this application embodiment. The building energy consumption prediction method is applied to electronic devices. The building energy consumption prediction method includes the following steps:
[0057] S101, acquire energy consumption data of multiple electrical components in the building during the historical statistical period, meteorological data and time data at multiple time points during the forecast period.
[0058] The building structure can be an office building, an industrial park, etc. Electrical components can include, but are not limited to, electrical equipment and devices that connect it to the circuit. For example, electrical components can include air conditioners, elevators, and electrical outlets.
[0059] The time data includes a time series and category labels indicating whether a given date is a weekday or a non-working day. For example, the time series could be: Year X, Month Y, Day Z, Hour A. The time series provides the date identifier (Z), month identifier (Y), and hour identifier (A) for that given date. For instance, January 15, 2026, 08:00 would have a date identifier of 15, a month identifier of 1, and an hour identifier of 08. Optionally, the time series may also include a weekday identifier; for example, a weekday identifier of 1 indicates that the given date is Monday. If the given date is a weekday, the category label can be 1; if the given date is a non-working day, the category label can be 0.
[0060] The energy consumption data of multiple electrical components within a historical statistical period may include energy consumption data of each electrical component at multiple time points each day within the historical statistical period and / or total energy consumption data of each electrical component each day within the historical statistical period. The energy consumption data may include the electrical energy consumed. This embodiment uses the energy consumption data of multiple electrical components within a historical statistical period, including energy consumption data of each electrical component at multiple time points within the historical statistical period, as an example.
[0061] Meteorological data at each point in time may include temperature data and / or humidity data. Temperature data refers to outdoor temperature, and humidity data refers to outdoor humidity.
[0062] S102, the first feature extraction module in the energy consumption prediction model is used to extract features from each energy consumption data, each meteorological data and each time series to obtain the first feature data; and the second feature extraction module in the energy consumption prediction model, which is set in parallel with the first feature extraction module, is used to extract features from each category label to obtain the second feature data.
[0063] The energy consumption prediction model can be a pre-trained network model. The first feature extraction module and the second feature extraction module are set up side-by-side in the energy consumption prediction model. The first and second feature extraction modules can have the same structure but different internal parameters; specifically, they can be convolutional neural network modules. The input to the first feature extraction module is various energy consumption data, various meteorological data, and various time series data; the output is the first feature data. The input to the second feature extraction module is the category label at each time point; the output is the second feature data.
[0064] S103, the first feature data and the second feature data are fused to obtain the target feature data.
[0065] Specifically, the first and second feature data can be concatenated and then input into the feature fusion module of the energy consumption prediction model. The output of the feature fusion module is the target feature data. The feature fusion module can be a bidirectional long short-term memory network module.
[0066] S104. Based on the target feature data, obtain the predicted energy consumption data of each electrical component in the building during the time period to be predicted.
[0067] As mentioned above, electrical components can include air conditioners, elevators, sockets, etc. For example, if the number of electrical components is 8, it means that the energy consumption prediction model can output the energy consumption prediction data of 8 electrical components for the predicted time period at once. The energy consumption prediction data of each electrical component for the predicted time period can include the energy consumption data of each electrical component at multiple time points every day during the predicted time period, the total daily energy consumption data of each electrical component during the predicted time period, and / or the total energy consumption data of each electrical component for the predicted time period.
[0068] Specifically, the prediction module in the energy consumption prediction model can be used to process the target feature data to obtain the energy consumption prediction data of each electrical component in the building during the predicted time period. The prediction module can include a fully connected layer. After the target feature data is input into the fully connected layer, the initial energy consumption prediction data of each electrical component output by the fully connected layer during the predicted time period can be directly used as the energy consumption prediction data of each electrical component in the building during the predicted time period. Alternatively, the initial energy consumption prediction data output by the fully connected layer can be further processed to obtain the energy consumption prediction data of each electrical component during the predicted time period.
[0069] Subsequently, the energy consumption prediction data of each electrical component during the predicted time period can be used to obtain the building's energy consumption prediction data during the predicted time period.
[0070] In the above scheme, the first and second feature extraction modules in the energy consumption prediction model are used to perform targeted feature extraction on energy consumption data within the historical statistical period, meteorological data and time data at multiple time points within the prediction period. Then, the target feature data obtained by fusing the first and second feature data obtained from the feature extraction is used to obtain the energy consumption prediction data of multiple electrical components in the building within the prediction period. This realizes the use of one energy consumption prediction model to model the energy consumption of multiple electrical components within the prediction period, as well as the energy consumption data of the historical statistical period, and the meteorological and time data at multiple time points within the prediction period. This can improve the accuracy of the energy consumption prediction of each electrical component, thereby improving the accuracy of the total energy consumption data of the building determined subsequently based on the energy consumption prediction data of each electrical component.
[0071] In one possible embodiment, the time features in the time series include the hour identifier of the time point, the date identifier of the current date, the week identifier of the current date, and the month identifier of the current date. Specifically, before using the first feature extraction module in the energy consumption prediction model to extract features from each energy consumption data, each meteorological data, and each time series to obtain the first feature data, the method further includes: encoding all time features and each meteorological data contained in each time series respectively; normalizing the encoded time features and each meteorological data; concatenating the normalized time features, each meteorological data, and each energy consumption data to obtain concatenated data, and inputting the concatenated data into the first feature extraction module in the energy consumption prediction model.
[0072] The time series can include a time field and a weekday identifier as an independent time feature. Time features are extracted from the time field to obtain the hour identifier, date identifier, and month identifier for each time point. The weekday identifier can be encoded using one-hot encoding. The encoded hour, date, and month identifiers, along with the meteorological data, are then normalized. Category encoding is used as an allowed state feature. Alternatively, energy consumption data at each time point can also be encoded and normalized.
[0073] One method for stitching together the normalized time features, meteorological data, and energy consumption data to obtain the stitched data is as follows: For each time point, the hour identifier, date identifier, month identifier, day of the week identifier, meteorological data, and energy consumption data for that time point are stitched together to obtain the stitched sub-data for each time point. The set of all stitched sub-data is then used as the stitched data.
[0074] Optionally, before encoding all time features and meteorological data contained in each time series, data cleaning, time format conversion, and missing value handling can be performed on all time features and meteorological data contained in each time series.
[0075] In the above scheme, if the encoded hour, date, and month identifiers, as well as the meteorological data, are not normalized, the energy consumption prediction model may be biased towards features with large numerical ranges, while ignoring small but important features. After normalization, the encoded hour, date, and month identifiers, as well as the meteorological data, are on the same scale, allowing the energy consumption prediction model to fairly learn the contribution of each time feature.
[0076] In one possible embodiment, the first feature extraction module includes multiple cascaded convolutional layers. The method of using the first feature extraction module in the energy consumption prediction model to extract features from each energy consumption data, each meteorological data, and each time series to obtain the first feature data may include: processing the concatenated data using the first convolutional layer in the first feature extraction module to obtain the feature data output by the first convolutional layer; for non-first convolutional layers, processing the feature data output by the previous convolutional layer to obtain the feature data output by the non-first convolutional layer; wherein the feature data output by the last convolutional layer in the first feature extraction module is used as the first feature data.
[0077] For example, such as Figure 2 As shown, the first feature extraction module includes three convolutional layers: the first convolutional layer, the second convolutional layer, and the third convolutional layer.
[0078] Optionally, a pooling layer can be added after the first, second, and third convolutional layers. For example, a first pooling layer can be added after the first convolutional layer, a second pooling layer after the second convolutional layer, and a third pooling layer after the third convolutional layer. The first convolutional layer is the first convolutional layer in the first feature extraction module, while the second and third convolutional layers are not the first convolutional layers. The input to the first convolutional layer is the concatenated data, the input to the second convolutional layer is the feature data output by the first pooling layer, and the input to the third convolutional layer is the feature data output by the second pooling layer. Then, the feature data output by the third pooling layer is used as the first feature data.
[0079] Similarly, the second feature extraction module can also include three convolutional layers, and a pooling layer can be set after each convolutional layer.
[0080] In the above scheme, three convolutional layers are set in the first feature extraction module and the second feature extraction module, which can realize the accurate transformation of spliced data into high-dimensional feature data.
[0081] In one possible embodiment, the above-described S103 may include, for example: Figure 3 The following steps are shown:
[0082] S201, the first feature data and the second feature data are concatenated to obtain the third feature data.
[0083] As mentioned above, the time features in the time series can include the hour identifier of each time point. The first feature data includes the first feature sub-data of each time point, and the second feature data includes the second feature sub-data of each time point. In one possible embodiment, considering that the usage of various electrical components may differ at different times within the same day, or that the energy consumption difference between weekdays and non-weekdays may be small, if the data is simply spliced together and processed directly, the bidirectional long short-term memory network module may not be able to accurately capture the relationship between working hours or not working and the time points within each date, resulting in insufficient accuracy of subsequent energy consumption prediction results. Therefore, to solve this problem, the above S201 may include the following steps:
[0084] First, the scene category for each time point is determined based on the hour identifier and category label. For example, in this building, elevator usage peaks at 9:00 AM and 6:00 PM on weekdays, with less usage at other times. However, at 5:00 AM, the energy consumption of certain electrical components shows little difference between weekdays and non-weekdays. Therefore, a mapping relationship between each hour identifier / category label combination and the scene category can be pre-established. Subsequently, the weighted weights between the first and second feature sub-data at each time point can be determined based on the scene category. Each scene category corresponds to a set of weighted weights.
[0085] Secondly, based on the scenario category at each time point, a weighted reassembly is determined for each time point. This weighted reassembly includes the weighted weight between the first and second feature sub-data corresponding to each time point. Optionally, the first feature sub-data at each time point includes feature data corresponding to each time feature and the meteorological data, and the weighted weight of the first feature sub-data includes the weighted weight of the feature data corresponding to each time feature and the meteorological data.
[0086] Then, according to the weighted weights of each time point, the first feature sub-data and the second feature sub-data corresponding to each time point are weighted to obtain the updated first feature data and the updated second feature data. For example, for each time point, the first feature sub-data and the meteorological data corresponding to each time point are weighted according to the weighted weights of each time feature and the meteorological data corresponding to that time point to obtain the updated first feature data. Similarly, the second feature sub-data is weighted using the weighted weights of the second feature sub-data to obtain the updated second feature data.
[0087] Finally, the updated first feature data and the updated second feature data are concatenated to obtain the third feature data.
[0088] One approach is to use the intermediate layer of the energy consumption prediction model to concatenate the updated first and second feature data to obtain the third feature data. Alternatively, the updated first and second feature data can be directly concatenated along the time dimension to obtain the third feature data.
[0089] In the above scheme, the weighted recombination of each time point is determined according to the scenario category at each time point, and then the first feature data and the second feature data are updated according to each weighted recombination, so that the energy consumption prediction data obtained in the subsequent determination is more accurate.
[0090] S202, the third feature data is processed using the bidirectional long short-term memory network module in the energy consumption prediction model to obtain the target feature data.
[0091] The bidirectional long short-term memory (LSTM) network module includes a forward LTM network module and a reverse LTM network module arranged in parallel. The forward LTM network module takes the third feature data as input and outputs the fourth feature data, while the reverse LTM network module takes the third feature data as input and outputs the fifth feature data. The fourth and fifth feature data are fused to obtain the target feature data; for example, the fourth and fifth feature data are concatenated to obtain the target feature data.
[0092] In the above scheme, convolutional features are first extracted using the first feature extraction module and the second feature extraction module, and then the long-term dependency relationship is modeled using the bidirectional long short-term memory network module, so that the energy consumption prediction data of each power consumption component in the time period to be predicted is more accurate.
[0093] In one possible embodiment, S104 may include the following steps: processing the target feature data using the prediction module in the energy consumption prediction model to obtain the initial energy consumption prediction data of each power consumption component in the time period to be predicted; performing a normalization inverse transformation on each initial energy consumption prediction data to obtain the advanced energy consumption prediction data corresponding to each initial energy consumption prediction data; and performing non-negative truncation processing on each advanced energy consumption prediction data to obtain the energy consumption prediction data of each power consumption component in the time period to be predicted.
[0094] Normalizing data maps it to a specific numerical range, while inverse normalization transforms data within that range back to its original value. For example, the initial energy consumption prediction data might be between [0,1]. Then, through inverse normalization, the initial energy consumption prediction is restored to a value with actual physical energy consumption units, such as kWh. For instance, the prediction results, after inverse normalization, are restored to the actual electricity consumption values of components such as air conditioners, elevators, and electrical outlets, and then organized by timestamp.
[0095] One way to perform non-negative truncation on the advanced energy consumption prediction data is to truncate the negative values in each advanced energy consumption prediction data to zero.
[0096] In the above scheme, after normalizing and inverse transforming the initial energy consumption prediction data, it is convenient for users to view. In addition, the non-negative truncation processing of each advanced energy consumption prediction data can ensure the rationality of the final energy consumption prediction data of each power consumption component in the time period to be predicted.
[0097] Optionally, the building's energy consumption prediction data for the predicted time period can be obtained by summing the energy consumption prediction data of each electrical component within the predicted time period. Alternatively, the building can be treated as a whole, and the energy consumption data of the building at multiple time points within a historical statistical period can also be used as input to the first feature extraction module in the energy consumption prediction model. In addition to predicting the energy consumption prediction data of each electrical component in the building within the predicted time period, the energy consumption prediction model can also simultaneously output the energy consumption prediction data of the building as a whole within the predicted time period, for example, simultaneously outputting the energy consumption data of the building at multiple time points within the predicted time period.
[0098] In one possible embodiment, the energy consumption prediction data for each electrical component within the predicted time period includes energy consumption data for each electrical component at multiple time points within the predicted time period. After obtaining the energy consumption prediction data for each electrical component in the building within the predicted time period based on the target feature data, the method further includes: generating energy consumption change curves for each electrical component within the predicted time period based on the energy consumption data for each electrical component at multiple time points within the predicted time period; and displaying the energy consumption change curves for each electrical component on the display interface of the electronic device.
[0099] This can be achieved by directly plotting energy consumption change curves based on the energy consumption data of each electrical component at each time point within the predicted time period, or by summing the predicted energy consumption data of each electrical component at each time point within the same day to obtain the daily energy consumption prediction data for each electrical component. For each electrical component, a graph can be plotted as follows: Figure 5 The energy consumption change curve shown is plotted with time as the horizontal axis and daily energy consumption forecast data as the vertical axis.
[0100] The energy consumption curves of different power-consuming components can be displayed in different display areas on the display interface of electronic devices.
[0101] In the above solution, by displaying the energy consumption change curves of each power-consuming component on the display interface of the electronic device, users can easily view the energy consumption of each power-consuming component at different points in time.
[0102] This method utilizes several energy consumption detection components to monitor the energy consumption data of various electrical components within a building at multiple time points within a predicted time period, thereby obtaining the actual energy consumption data of each component at multiple time points within the predicted time period. These energy consumption detection components can include, but are not limited to, any components capable of acquiring electricity-related data, such as electricity meters, ammeters, and / or voltmeters. The actual energy consumption data of each electrical component at multiple time points within the predicted time period can be used to predict the energy consumption data of each component at multiple time points within the next predicted detection time period.
[0103] In one possible embodiment, the structure of the energy consumption prediction model can be as follows: Figure 4 As shown, the energy consumption prediction model includes a first feature extraction module and a second feature extraction module, a bidirectional long short-term memory module, and a prediction module, all arranged in parallel and with identical structures. Based on this, the energy consumption prediction method for buildings may include the following steps:
[0104] Acquire energy consumption data of multiple electrical components in a building at multiple points in time within a historical statistical period, temperature data, humidity data, hour markers, date markers, week markers, month markers, and category labels at multiple points in time within the period to be predicted.
[0105] The data obtained above is used to construct features. Specifically, the energy consumption data of each electrical component at multiple time points within the historical statistical period, the temperature data, humidity data, hour markers, date markers, weekday markers, and month markers at multiple time points within the predicted time period are encoded. The weekday marker is encoded using one-hot encoding. Each category label is used as a state feature.
[0106] The temperature, humidity, hour, date, day of the week, and month data for each time point within the forecast period are normalized. Additionally, the energy consumption data of each electrical component at multiple time points within the historical statistical period can also be normalized after encoding.
[0107] The normalized hourly identifiers, date identifiers, weekday identifiers, month identifiers, meteorological data, and energy consumption data are spliced together to obtain spliced data, which is then input into the first feature extraction module of the energy consumption prediction model.
[0108] The first feature extraction module in the energy consumption prediction model is used to extract features from each energy consumption data, each meteorological data, and each time series to obtain the first feature data; and the second feature extraction module, which is set up in parallel with the first feature extraction module in the energy consumption prediction model, is used to extract features from each category label to obtain the second feature data.
[0109] The energy consumption prediction model may also include an intermediate layer (not shown in the figure), which is used to concatenate the first feature data and the second feature data to obtain the third feature data.
[0110] The third feature data is processed using a bidirectional long short-term memory module to obtain the target feature data.
[0111] Based on the target feature data, the energy consumption prediction data of each electrical component in the building is obtained within the predicted time period. The energy consumption prediction data of each electrical component within the predicted time period includes the energy consumption data of each electrical component at multiple time points within the predicted time period. Specifically, the energy consumption data of each electrical component at multiple time points within the predicted time period, along with the timestamps, can be stored together.
[0112] Based on the energy consumption data of each electrical component at multiple time points within the predicted time period, energy consumption change curves of each electrical component can be generated and displayed on the display interface of the electronic device.
[0113] The energy consumption prediction method for buildings may also include a training step for the energy consumption prediction model. This involves constructing training and validation sample sets based on historical energy consumption data, historical meteorological data, and historical time data for multiple electrical components within the building at several historical time points. Here, the historical time data includes time series data and category labels for each historical time point.
[0114] Based on a preset time window length, the training sample set is generated into time series samples using a sliding window method in chronological order. Historical energy consumption data, historical meteorological data, and historical time data at several historical time points within the window are used as input. The energy consumption values of various electrical components at certain time points within the next window are used as output labels to train the energy consumption prediction model. For example, the network parameters and number of training epochs of the energy consumption prediction model are adjusted to achieve stable convergence. Specifically, a 48-hour time series within the window can be used as input, and the multi-objective energy consumption of the next hour after the window can be used as the output label. The energy consumption prediction model is validated using a validation set. If the loss of the energy consumption prediction model is less than or equal to a preset loss, or if the preset number of training epochs is reached, the energy consumption prediction model is considered to have completed training.
[0115] Based on testing, during the energy consumption prediction process for multiple electrical components in a building, including elevators, the energy consumption change curves plotted using predicted energy consumption data for elevators at multiple time points between September 1, 2024, and November 1, 2024, are shown below. Figure 5 As shown, the energy consumption change curves plotted from the actual energy consumption data of elevators within the building at multiple time points from September 1, 2024 to November 1, 2024 are as follows. Figure 6 As shown. ComparisonFigure 5 and Figure 6 The energy consumption change curve shown indicates that the difference between the predicted energy consumption data of elevators among the multiple electrical components of the building and the actual energy consumption data of elevators in this scheme is small, and the accuracy is high.
[0116] In some application scenarios, building energy consumption prediction methods can be directly deployed and applied in the smart operation and maintenance platform of actual buildings or parks.
[0117] The following describes an energy consumption prediction device for a building provided in this application. The energy consumption prediction device for a building described below corresponds to the method of the energy consumption prediction device for a building described above.
[0118] This application also provides a building energy consumption prediction device 500, applied to electronic devices; please refer to [link / reference]. Figure 7 The building energy consumption prediction device 500 includes: a data acquisition unit 501, a feature extraction unit 502, a feature fusion unit 503, and an energy consumption prediction unit 504. The data acquisition unit 501 is used to acquire energy consumption data of multiple electrical components in the building during a historical statistical period, meteorological data at multiple time points within the prediction period, and time data. The time data includes time series and category labels indicating whether the date at each time point is a weekday or a non-working day. The feature extraction unit 502 is used to extract features from each of the energy consumption data, meteorological data, and time series using a first feature extraction module in the energy consumption prediction model to obtain first feature data; and to extract features from each of the category labels using a second feature extraction module arranged parallel to the first feature extraction module in the energy consumption prediction model to obtain second feature data. The feature fusion unit 503 is used to fuse the first feature data and the second feature data to obtain target feature data. The energy consumption prediction unit 504 is used to obtain predicted energy consumption data for each of the electrical components in the building within the prediction period based on the target feature data.
[0119] In one possible embodiment, the feature fusion unit 503 fuses the first feature data and the second feature data to obtain target feature data, including:
[0120] The first feature data and the second feature data are concatenated to obtain the third feature data;
[0121] The third feature data is processed using the bidirectional long short-term memory network module in the energy consumption prediction model to obtain the target feature data.
[0122] In one possible embodiment, the time series includes hour identifiers for the time points, the first feature data includes first feature sub-data for each time point, and the second feature data includes second feature sub-data for each time point;
[0123] Feature fusion unit 503 concatenates the first feature data and the second feature data to obtain third feature data, including:
[0124] The scene category for each time point is determined based on the hour identifier and category label of each time point;
[0125] Based on the scenario category at each time point, a weighted reorganization is determined for each time point, wherein the weighted reorganization includes the weighted weight between the first feature sub-data and the second feature sub-data corresponding to the time point;
[0126] According to the weighted weight of each time point, the first feature sub-data and the second feature sub-data corresponding to each time point are weighted to obtain the updated first feature data and the updated second feature data.
[0127] The updated first feature data and the updated second feature data are concatenated to obtain the third feature data.
[0128] In one possible embodiment, the building energy consumption prediction device 500 further includes a data preprocessing unit (not shown). The time features in the time series include the hour identifier of the time point, the date identifier of the current date, the week identifier of the current date, and the month identifier of the current date. Before the first feature extraction module in the energy consumption prediction model extracts features from each of the energy consumption data, each of the meteorological data, and each of the time series to obtain the first feature data, the data preprocessing unit is used for:
[0129] Encode all time features contained in each of the time series and each of the meteorological data respectively;
[0130] The encoded time features and meteorological data are then normalized.
[0131] The normalized time features, meteorological data, and energy consumption data are spliced together to obtain spliced data, and the spliced data is input into the first feature extraction module in the energy consumption prediction model.
[0132] In one possible embodiment, the first feature extraction module of the feature extraction unit 502 includes multiple cascaded convolutional layers. The first feature extraction module in the energy consumption prediction model extracts features from each of the energy consumption data, each of the meteorological data, and each of the time series to obtain first feature data, including:
[0133] The concatenated data is processed using the first convolutional layer in the first feature extraction module to obtain the feature data output by the first convolutional layer;
[0134] For non-first convolutional layers, the feature data output by the previous convolutional layer is processed to obtain the feature data output by the non-first convolutional layer.
[0135] In this context, the feature data output by the last convolutional layer in the first feature extraction module is used as the first feature data.
[0136] In one possible embodiment, the energy consumption prediction unit 504 obtains energy consumption prediction data for each of the electrical components in the building during the predicted time period based on the target feature data, including:
[0137] The target feature data is processed using the prediction module in the energy consumption prediction model to obtain the initial energy consumption prediction data of each of the power-consuming components during the time period to be predicted.
[0138] Perform a normalized inverse transform on each of the initial energy consumption prediction data to obtain the advanced energy consumption prediction data corresponding to each of the initial energy consumption prediction data.
[0139] The advanced energy consumption prediction data are subjected to non-negative truncation to obtain the energy consumption prediction data of each power consumption component within the time period to be predicted.
[0140] In one possible embodiment, the energy consumption prediction data for each of the electrical components within the predicted time period includes energy consumption data for each of the electrical components at multiple time points within the predicted time period. After obtaining the energy consumption prediction data for each of the electrical components in the building within the predicted time period based on the target feature data, the energy consumption prediction unit 504 is further configured to:
[0141] Based on the energy consumption data of each electrical component at multiple time points within the predicted time period, an energy consumption change curve of the electrical component within the predicted time period is generated.
[0142] The energy consumption curves of each of the electrical components are displayed on the display interface of the electronic device.
[0143] It is understood that since the method embodiments and the device embodiments are different presentations of the same technical concept, the content of the method embodiment section in this application should be adapted to the device embodiment section in a synchronous manner, and will not be repeated here.
[0144] In the case of using integrated units, please refer to Figure 8 , Figure 8 This is the second functional unit block diagram of an energy consumption prediction device for a building provided in this application embodiment. The energy consumption prediction device for a building is applied to electronic devices. Figure 8 The building energy consumption prediction device 500 includes a processing module 512 and a communication module 511. The processing module 512 controls and manages the operation of the building energy consumption prediction device 500, for example, executing steps of the data acquisition unit, feature extraction unit, feature fusion unit, and energy consumption prediction unit, and / or other processes using the techniques described herein. The communication module 511 is used for interaction between the building energy consumption prediction device 500 and other devices. Figure 8 As shown, the building energy consumption prediction device 500 may also include a storage module 513, which is used to store the program code and data of the building energy consumption prediction device 500.
[0145] The processing module 512 can be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication module 511 can be a transceiver, RF circuitry, or a communication interface, etc. The storage module 513 can be a memory.
[0146] All relevant content for each scenario involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here. The energy consumption prediction device 500 for the building can execute the energy consumption prediction method for the building.
[0147] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 9As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions from the memory 630 to execute the aforementioned energy consumption prediction method for the building.
[0148] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the energy consumption prediction method for buildings provided in the above embodiments.
[0150] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the energy consumption prediction method for any of the above-described building structures.
[0151] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0152] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0153] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0154] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0156] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0157] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0158] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0159] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0160] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0161] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. A method of predicting energy consumption of a building, characterized by, The method is applied to an electronic device and comprises the following steps: Obtaining energy consumption data of a plurality of electrical components in a building body in a historical statistical period, meteorological data at a plurality of time points in a to-be-predicted time period, and time data, wherein the time data includes time sequences and category labels for indicating whether the time points are on weekdays or non-weekdays; Extracting features from each of the energy consumption data, each of the meteorological data, and each of the time sequences by using a first feature extraction module in an energy consumption prediction model to obtain first feature data, and extracting features from each of the category labels by using a second feature extraction module arranged in parallel with the first feature extraction module in the energy consumption prediction model to obtain second feature data; the time sequences include hour identifiers of the time points, the first feature data includes first feature sub-data of each of the time points, and the second feature data includes second feature sub-data of each of the time points; Fusing the first feature data and the second feature data to obtain target feature data, including: determining scene categories of each of the time points according to the hour identifiers and the category labels of the time points; determining a set of weighting weights of each of the time points according to the scene categories of the time points, wherein the set of weighting weights includes weighting weights between the first feature sub-data and the second feature sub-data corresponding to the time points; weighting the first feature sub-data and the second feature sub-data corresponding to each of the time points according to the weighting weights of the time points to obtain updated first feature data and updated second feature data; splicing the updated first feature data and the updated second feature data to obtain third feature data; and processing the third feature data by using a bidirectional long short-term memory network module in the energy consumption prediction model to obtain the target feature data; Based on the target feature data, obtaining energy consumption prediction data of each of the electrical components in the building body in the to-be-predicted time period, including: processing the target feature data by using a prediction module in the energy consumption prediction model to obtain initial energy consumption prediction data of each of the electrical components in the to-be-predicted time period; performing normalization inverse transformation on each of the initial energy consumption prediction data to obtain advanced energy consumption prediction data corresponding to each of the initial energy consumption prediction data; and performing non-negative truncation processing on each of the advanced energy consumption prediction data to obtain the energy consumption prediction data of each of the electrical components in the to-be-predicted time period.
2. The method of claim 1, wherein, The time features in the time sequences include hour identifiers of the time points, date identifiers of the dates, week identifiers of the dates, and month identifiers of the dates, and before the first feature data is obtained by using the first feature extraction module in the energy consumption prediction model to extract features from each of the energy consumption data, each of the meteorological data, and each of the time sequences, the method further comprises: Encoding all the time features included in each of the time sequences and each of the meteorological data; Performing normalization processing on the encoded time features and the meteorological data; and The normalized time features, the meteorological data, and the energy consumption data are spliced to obtain spliced data, and the spliced data is input into a first feature extraction module in the energy consumption prediction model.
3. The method of claim 2, wherein, The first feature extraction module includes a plurality of convolution layers arranged in cascade, and the first feature extraction module in the energy consumption prediction model is used to extract features from the energy consumption data, the meteorological data, and the time sequence to obtain first feature data, including: The first convolution layer in the first feature extraction module is used to process the spliced data to obtain feature data output by the first convolution layer; For a non-first convolution layer, the feature data output by the previous convolution layer is processed to obtain feature data output by the non-first convolution layer; The feature data output by the last convolution layer in the first feature extraction module is used as the first feature data.
4. The method of claim 1, wherein, The energy consumption prediction data of each electrical component in the to-be-predicted time period includes energy consumption data of each electrical component at a plurality of time points in the to-be-predicted time period, and after the target feature data is obtained, the method further includes: According to the energy consumption data of each electrical component at a plurality of time points in the to-be-predicted time period, an energy consumption change curve of each electrical component in the to-be-predicted time period is generated; The energy consumption change curves of the electrical components are displayed on a display interface of the electronic device.
5. An energy consumption prediction device for a building, characterized in that, The method is applied to an electronic device, including: A data acquisition unit is configured to acquire energy consumption data of a plurality of electrical components in a building body in a historical statistical period, meteorological data at a plurality of time points in a to-be-predicted time period, and time data including time sequences and category labels representing whether the time points are in weekdays or non-weekdays; A feature extraction unit is configured to extract features from the energy consumption data, the meteorological data, and the time sequences by using a first feature extraction module in an energy consumption prediction model to obtain first feature data, and extract features from the category labels by using a second feature extraction module arranged in parallel with the first feature extraction module in the energy consumption prediction model to obtain second feature data; the time sequences include hour identifiers of the time points, the first feature data includes first feature sub-data of the time points, and the second feature data includes second feature sub-data of the time points. The feature fusion unit is configured to fuse the first feature data and the second feature data to obtain target feature data, including: determining a scene category of each of the time points according to the hour identifier and the category label of each of the time points; determining a weighting weight set of each of the time points according to the scene category of each of the time points, the weighting weight set including a weighting weight between the first feature sub-data and the second feature sub-data corresponding to the time point; weighting the first feature sub-data and the second feature sub-data corresponding to each of the time points according to the weighting weight of each of the time points to obtain updated first feature data and updated second feature data; splicing the updated first feature data and the updated second feature data to obtain third feature data; and processing the third feature data by using a bidirectional long short-term memory network module in the energy consumption prediction model to obtain the target feature data; The energy consumption prediction unit is configured to obtain energy consumption prediction data of each of the electrical components in the building body in the to-be-predicted time period based on the target feature data, including: processing the target feature data by using a prediction module in the energy consumption prediction model to obtain initial energy consumption prediction data of each of the electrical components in the to-be-predicted time period; performing normalization inverse transformation on each of the initial energy consumption prediction data to obtain advanced energy consumption prediction data corresponding to each of the initial energy consumption prediction data; and performing non-negative truncation processing on each of the advanced energy consumption prediction data to obtain the energy consumption prediction data of each of the electrical components in the to-be-predicted time period.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the energy consumption prediction method of the building body according to any one of claims 1-4.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the energy consumption prediction method of the building body according to any one of claims 1-4.
Citation Information
Patent Citations
Building energy consumption prediction method and system based on deep feature fusion network
CN116050579A