Building energy consumption prediction method, system, equipment and medium

By using hierarchical GNN feature encoding and temporal modeling, combined with sensor and attribute information inside and between buildings, the dynamic and non-uniformity issues of building energy consumption prediction are solved, enabling accurate prediction and optimized management of energy consumption in single multi-story buildings.

CN121998322APending Publication Date: 2026-05-08SHENZHEN ZHONGHONG LOW CARBON BUILDING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN ZHONGHONG LOW CARBON BUILDING TECH CO LTD
Filing Date
2026-01-14
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing building energy consumption monitoring technologies mainly rely on sensor networks for real-time data collection and statistics, which makes it difficult to effectively predict future energy consumption. This leads to passive operation and management, making it impossible to adjust equipment operation strategies or optimize energy procurement in advance, and it is also difficult to accurately locate energy efficiency bottlenecks.

Method used

A hierarchical GNN feature encoding and temporal modeling method is adopted. By acquiring sensor information and attribute information, the edge weights are calculated using the Pearson correlation coefficient. The feature is then fused by combining temporal graph convolutional network and graph attention network to capture spatiotemporal feature patterns. Finally, energy consumption is predicted through a fully connected network.

Benefits of technology

It enables effective prediction of energy consumption in single multi-story buildings, improves the accuracy of energy consumption prediction, and allows for adjustments to strategies before peak electricity consumption, optimizing energy use and reducing operating costs and risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998322A_ABST
    Figure CN121998322A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of building energy consumption prediction, in particular to a building energy consumption prediction method, system and device and a medium, and the method comprises the steps: calculating a Pearson's correlation coefficient according to the information of a sensor in an initial layer; feature aggregation is carried out through a tense graph convolutional network, and a mean value is obtained under the condition that global average pooling processing is carried out on a plurality of pieces of fusion feature tensor information; splicing the intra-layer local coding feature vector information and the initial global attribute information; performing global weight processing according to the floor spacing information; carrying out attention score calculation on the global node feature information through a graph attention network; adjusting the first global edge weight information according to the attention parameter; aggregating the global node feature information and the second global edge weight information; performing coding operation on the spatial fusion feature sequence information through a time sequence model; building energy consumption prediction is carried out on the high-dimensional features of the space-time fusion feature vector information through the full-connection network, and the energy consumption prediction accuracy of the single building is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of building energy consumption prediction, and in particular to a building energy consumption prediction method, system, device and medium. Background Technology

[0002] As urbanization continues, buildings, as the main carriers of energy consumption, are receiving increasing attention for energy efficiency management. The three-dimensional layout and diverse functional zones within buildings, along with the independent yet interconnected operation of equipment and human activities on each floor, result in dynamic and non-uniform complex characteristics in overall energy consumption.

[0003] Currently, buildings rely on sensor networks deployed in various zones for energy consumption monitoring. The core of this system is to collect and aggregate data from different sub-meters such as water, electricity, and gas in real time. Essentially, it records and statistically analyzes historical and current energy consumption status, generating various data reports to provide a basis for energy consumption audits and post-event analysis.

[0004] However, this statistics-based monitoring model is limited in that it primarily focuses on the past and present, making it difficult to effectively predict the future. Due to a lack of data mining and modeling, the system cannot rely solely on current and historical statistical values, leading to passive operational management. This results in the inability to adjust equipment operating strategies or initiate demand response before peak electricity demand arrives, the inability to optimize energy procurement plans or the charging and discharging sequence of energy storage systems based on predicted load curves, and the difficulty in accurately locating potential energy efficiency bottlenecks. Managers typically can only take countermeasures after anomalies or peaks occur, leading to delayed energy-saving scheduling, low optimization efficiency, and increased operating costs and risks. These problems need to be addressed. Summary of the Invention

[0005] To overcome the statistical limitations of existing monitoring technologies, achieve effective prediction of energy consumption in single-story buildings, and improve the accuracy of energy consumption prediction for single buildings, this application provides a building energy consumption prediction method, system, equipment, and medium, employing the following technical solution: Firstly, this application provides a method for predicting building energy consumption, including: Obtain initial intra-layer sensor information, calculate the Pearson correlation coefficient between pairs of sensors within the layer based on the initial intra-layer sensor information, and obtain intra-layer edge weight information; The initial layer attribute information is obtained, and the sensor information, attribute information and edge weight information in the initial layer are aggregated by the temporal graph convolutional network to obtain the fused feature tensor information. By performing global average pooling on several fused feature tensor information, the mean value is taken to obtain the local encoded feature vector information within the layer; The initial global attribute information is obtained, and the local encoded feature vector information within the layer and the initial global attribute information are concatenated to obtain the global node feature information; The floor spacing information is obtained, and global weights are processed based on the floor spacing information to obtain the first global edge weight information. Attention scores are calculated on the global node feature information through a graph attention network to obtain attention parameters. The first global edge weight information is adjusted based on the attention parameters to obtain the second global edge weight information. Global node feature information and second global edge weight information are aggregated to obtain spatial fusion feature sequence information; the spatial fusion feature sequence information is encoded through a temporal model to obtain spatiotemporal fusion feature vector information. By using a fully connected network to reduce the dimensionality of high-dimensional features of spatiotemporal fusion feature vector information, the predicted building energy consumption value at the target time can be obtained.

[0006] Preferred options also include: Obtain the actual energy consumption value, calculate the loss between the predicted building energy consumption value and the actual energy consumption value at the target time based on the mean absolute error, and obtain the energy consumption loss value for parameter updating.

[0007] Preferred options also include: Historical data is acquired and preprocessed to obtain initial layer sensor information, initial layer attribute information, and initial global attribute information.

[0008] Preferably, the specific steps for aggregating global node feature information and second global edge weight information to obtain spatial fusion feature sequence information are as follows: Obtain time step information, sort global node feature information according to time step information, and obtain global fused feature sequence information; The global fusion feature sequence information is concatenated with the corresponding time step information to obtain the spatial fusion feature sequence information.

[0009] Preferably, the specific steps for obtaining the initial layer attribute information and performing feature aggregation on the initial layer sensor information, initial layer attribute information, and layer edge weight information through a temporal graph convolutional network to obtain fused feature tensor information are as follows: Obtain the initial layer attribute information, and concatenate the initial layer sensor information and the initial layer attribute information to obtain the initial node feature information; The initial node feature information and the intra-layer edge weight information are combined into intra-layer weighted data association information; By using a temporal graph convolutional network, spatial correlation features are aggregated from the weighted data correlation information within each layer to obtain fused feature tensor information.

[0010] Preferably, the specific steps for obtaining the floor spacing information and performing global weight processing based on the floor spacing information to obtain the first global edge weight information are as follows: Obtain the floor spacing information, and perform a reciprocal calculation on the floor spacing information to obtain the reciprocal information of the floor spacing; Obtain the fixed weight parameters, and perform global weight processing based on the fixed weight parameters and the reciprocal information of the floor spacing to obtain the first global edge weight information.

[0011] Preferably, the specific steps for reducing the dimensionality of high-dimensional features of the spatiotemporal fusion feature vector information through a fully connected network to obtain the predicted building energy consumption value at the target time are as follows: The first-dimensional feature is obtained by linearly mapping the spatiotemporal fusion feature vector information through the first layer of fully connected network. The second-dimensional features are obtained by linearly transforming and compressing the first-dimensional features through a second fully connected network. The building energy consumption prediction value at the target time is obtained by linear regression of the second dimension features through a third fully connected network.

[0012] Secondly, this application provides a building energy consumption prediction system, comprising: The intra-layer edge weight analysis module is used to obtain the initial intra-layer sensor information, calculate the Pearson correlation coefficient between pairs of sensors in the layer based on the initial intra-layer sensor information, and obtain the intra-layer edge weight information. The intra-layer feature fusion module is used to obtain the initial intra-layer attribute information. It uses a temporal graph convolutional network to aggregate the initial intra-layer sensor information, initial intra-layer attribute information, and intra-layer edge weight information to obtain the fused feature tensor information. The global average pooling module is used to take the average value of several fused feature tensors through global average pooling to obtain the local encoded feature vector information within the layer. The node feature concatenation module is used to obtain initial global attribute information, and concatenate the local encoded feature vector information within the layer and the initial global attribute information to obtain global node feature information; The global edge weight analysis module is used to obtain floor spacing information, calculate the reciprocal of the floor spacing information to obtain the first global edge weight information; calculate the attention score of the global node feature information through the graph attention network to obtain the attention parameters; and adjust the first global edge weight information according to the attention parameters to obtain the second global edge weight information. The spatiotemporal fusion feature processing module is used to aggregate global node feature information and second global edge weight information to obtain spatial fusion feature sequence information; and to encode the spatial fusion feature sequence information through a temporal model to obtain spatiotemporal fusion feature vector information. The energy consumption prediction module is used to reduce the dimensionality of high-dimensional features of spatiotemporal fusion feature vector information through a fully connected network to obtain the predicted building energy consumption value at the target time.

[0013] Thirdly, this application provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the building energy consumption prediction method as described above.

[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the building energy consumption prediction method as described above when it is run.

[0015] In summary, compared with the prior art, the beneficial effects of the technical solution provided in this application include at least the following: This application obtains initial in-layer sensor information and initial in-layer attribute information by acquiring in-layer edge weight information and fusing local features within the building to obtain in-layer local encoded feature vector information. Based on this, global spatial fusion processing between floors is performed to obtain spatial fusion feature sequence information containing building spatial structure. After temporal feature fusion, the high-dimensional features of the spatiotemporal fusion feature vector information are reduced using a time series model to capture long-term patterns and obtain spatiotemporal fusion feature vector information. Finally, a fully connected network is used to regress and output the building energy consumption prediction value at the specific target time. This overcomes the statistical limitations of existing monitoring technologies, achieves effective prediction of energy consumption in single multi-story buildings, and improves the accuracy of energy consumption prediction for single buildings. Attached Figure Description

[0016] Figure 1 This is a schematic flowchart of a building energy consumption prediction method according to an embodiment of this application.

[0017] Figure 2 This is a schematic diagram of a building energy consumption prediction system according to an embodiment of this application.

[0018] Explanation of reference numerals in the attached figures: 1. Intra-layer edge weight analysis module; 2. Intra-layer feature fusion module; 3. Global average pooling processing module; 4. Node feature splicing module; 5. Global edge weight analysis module; 6. Spatiotemporal fusion feature processing module; 7. Energy consumption prediction module. Detailed Implementation

[0019] The following combination Figures 1-2 The present application will be described in further detail below. The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting.

[0020] Reference Figure 1The building energy consumption prediction method involved in this application specifically includes: Step S1: Obtain initial intra-layer sensor information, calculate the Pearson correlation coefficient between pairs of sensors within the layer based on the initial intra-layer sensor information, and obtain the intra-layer edge weight information; Step S2: Obtain the initial layer attribute information, and perform feature aggregation on the initial layer sensor information, initial layer attribute information and layer edge weight information through a temporal graph convolutional network to obtain fused feature tensor information; Step S3: Take the mean value of several fused feature tensor information after global average pooling to obtain the local encoded feature vector information within the layer; Step S4: Obtain initial global attribute information, concatenate the local encoded feature vector information within the layer with the initial global attribute information to obtain global node feature information; Step S5: Obtain floor spacing information, perform global weight processing based on floor spacing information to obtain first global edge weight information; calculate attention scores for global node feature information through graph attention network to obtain attention parameters; adjust the first global edge weight information based on attention parameters to obtain second global edge weight information. Step S6: Aggregate the global node feature information and the second global edge weight information to obtain spatial fusion feature sequence information; encode the spatial fusion feature sequence information through a temporal model to obtain spatiotemporal fusion feature vector information; Step S7: Reduce the dimensionality of the high-dimensional features of the spatiotemporal fusion feature vector information through a fully connected network to obtain the predicted building energy consumption value at the target time.

[0021] Specifically, this application addresses the problems of fragmented features within floors, weak inter-floor correlations, and insufficient spatiotemporal feature fusion in energy consumption prediction for multi-story buildings by combining hierarchical GNN feature encoding and temporal modeling. First, it acquires initial intra-layer sensor information at the bottom layer. Then, it calculates the Pearson correlation coefficient of the intra-layer sensors using this initial intra-layer sensor information as intra-layer edge weight information. A TGCN (Temporal Graph Convolutional Network) is used to process the acquired initial intra-layer attribute information, initial intra-layer sensor information, and intra-layer edge weight information, combined with the intra-layer edge weight information, to obtain fused feature tensor information. This is then fused with local features within the building to obtain intra-layer local encoded feature vector information. Based on each intra-layer local encoded feature vector information, it is concatenated with the acquired initial global attribute information to obtain global node feature information. The first global edge weight information is obtained by processing the floor spacing information. An attention score is calculated using a GAT (Graph Attention Network) to obtain attention parameters. Finally, the first global edge weight information is adjusted based on the attention parameters to obtain the second global edge weight information. Then, using global node feature information as nodes and second global edge weight information as edge weights, the spatial fusion feature sequence information of the entire building is output. After temporal feature fusion, the high-dimensional features of the spatiotemporal fusion feature vector information are reduced through a time series model to capture long-term patterns and obtain highly abstract spatiotemporal fusion feature vector information. Finally, a fully connected network is used to regress and output the building energy consumption prediction value at the specific target time, overcoming the statistical limitations of existing monitoring technologies, realizing effective prediction of energy consumption of single multi-story buildings, and improving the accuracy of energy consumption prediction for single buildings.

[0022] This application constructs a subgraph on a single floor basis, with each sensor as a node. The node feature is a combination of sensor monitoring data and floor attributes for that area. The edge weight is the Pearson correlation coefficient between the two sensor data; a higher Pearson correlation coefficient results in a larger edge weight, indicating a stronger correlation between the two factors on energy consumption. A single-layer TGCN aggregates the neighbor information of each node, outputting a local encoded feature vector for that floor. For example, the features from 20 sensors are aggregated into a single 256-dimensional floor feature vector.

[0023] This application employs Gaussian Attraction-Based Feature Analysis (GAT) to adaptively adjust the correlation strength between floors based on the inverse weight of building distance, further improving feature fusion accuracy. A global graph is constructed for the entire building, with each floor's local fusion feature vector serving as a node. Node features supplement global attributes such as floor function type. Edge weights are related to the vertical distance between two floors; the closer the distance, the greater the edge weight, consistent with the physical laws of heat transfer and equipment linkage. For example, during heating, the energy consumption correlation between floors 1 and 2 is stronger than that between floors 1 and 5. The correlation information of each floor is aggregated through floor 1 GAT, outputting the spatial fusion feature sequence information of the entire building. For example, for a 10-story building, the output is a feature sequence of time steps × 10 × 256, with each time step corresponding to the global correlation features of each floor.

[0024] This application employs lightweight time-series models, such as LSTM, TCN, and Informer, which concatenate spatial fusion feature sequence information and temporal features. These are then input into the time-series model, which learns from the feature sequences of the past N days to capture the temporal variation patterns of energy consumption, such as the energy consumption peak at 9 AM on weekdays and the stable value of heating energy consumption at night during winter. The output is a time-space fusion feature vector, such as compressing 30 days of sequence features into a single 512-dimensional fusion vector.

[0025] As one implementation method, historical data information is acquired, and the historical data information is preprocessed to obtain initial layer sensor information, initial layer attribute information, and initial global attribute information.

[0026] Specifically, the historical data information collection scope of this application embodiment includes sensor data within the floor, such as temperature, humidity, light intensity, equipment operating power, and personnel density of each floor, with each sensor serving as a node of the GNN within the floor; floor attribute data, such as area, floor height, functional zoning, and thermal insulation performance of each floor, with functional zoning including offices, meeting rooms, and computer rooms, with floor attribute data serving as a supplement to node features; and time feature data, such as hours, dates, whether it is a holiday, and season, to lay the groundwork for subsequent time series modeling.

[0027] This embodiment of the application describes a multi-story building containing L floors, denoted by the set of floor indices. Each floor deploy One sensor records the floor. The sensor index set is The data collection time series is There are N time steps in total, with a time interval of . The core dataset includes sensor data sets. ,in Indicates floor The M-dimensional monitoring data collected by the s-th sensor at time t. Represents the real number field; floor attribute data set L, ,in Represents the K-dimensional attribute characteristics of floor l. Represents the real number field; a time-featured data set. ,in Representing the P-dimensional time feature of time t, Represents the real number field; a set of real energy consumption labels. ,in This represents the actual total energy consumption of a building at time t (unit: kWh). It represents positive numbers in the real number field.

[0028] The data preprocessing in this embodiment includes outlier handling, missing value imputation, feature normalization, and correlation calculation. Outlier handling, such as extreme values ​​caused by sensor malfunctions, uses the 3σ criterion or interpolation to correct for them. Missing value imputation uses forward imputation, linear interpolation, or prediction imputation based on similar sensors. Feature normalization normalizes features of different dimensions, such as temperature and power, to the [0,1] interval to avoid model training bias. Correlation calculation pre-calculates the Pearson correlation coefficient of each sensor data within a floor, and the edge weights within each floor; it also measures the vertical distance between floors, such as the floor height difference between the 1st and 2nd floors, and calculates the reciprocal as the edge weight between floors.

[0029] The embodiments of this application adopt The criteria for detecting abnormal values ​​in sensors include each sensor. The m-th dimension monitoring data ( ), calculate the mean of the dataset Standard deviation If the data at time step t satisfies If the value is not found, it is considered an outlier and corrected using linear interpolation. ,in , representing the maximum value among the normal values ​​less than at time t; , representing the minimum value among the normal values ​​greater than time t.

[0030] This application's embodiments include missing value filling for missing data. The K-nearest neighbor filling algorithm is used, and the filling formula is defined. .in, The K non-missing time steps that are closest to time t are defined as follows: time distance is defined as... .

[0031] In this embodiment of the application, feature normalization is performed to eliminate dimensional differences. Min-Max normalization is applied to sensor data X and floor attribute data A, while time features are normalized accordingly. Continuous variables are also normalized, such as hours, while discrete variables are kept in 0-1 encoding, such as holidays. Where z is the original eigenvalue, , Normalization characteristics Let the normalized dataset be . .

[0032] Dataset partitioning and training set in this embodiment of the application Corresponding data , , , ,in , The proportion of the training set. The validation set. Corresponding data , , ,in , The percentage of the validation set. Test set. Corresponding data , , ,satisfy .

[0033] As one implementation method, the specific steps for obtaining initial intra-layer sensor information, calculating the Pearson correlation coefficient between pairs of sensors within the layer based on the initial intra-layer sensor information, and obtaining intra-layer edge weight information are as follows: For any two sensors within floor l The edge weights are calculated using the Pearson correlation coefficient. Defined as: ; in, For sensors The normalized characteristic mean, Represents the Euclidean norm, weight The absolute value is used as the final edge weight, and its correlation strength is independent of whether it is positive or negative. .

[0034] The weight matrix of the floor l-side is: .

[0035] As one implementation method, the specific steps for obtaining initial in-layer attribute information and then performing feature aggregation on the initial in-layer sensor information, initial in-layer attribute information, and in-layer edge weight information through a temporal graph convolutional network to obtain fused feature tensor information are as follows: Obtain the initial layer attribute information, and concatenate the initial layer sensor information and the initial layer attribute information to obtain the initial node feature information; The initial node feature information and the intra-layer edge weight information are combined into intra-layer weighted data association information; By using a temporal graph convolutional network, spatial correlation features are aggregated from the weighted data correlation information within each layer to obtain fused feature tensor information.

[0036] Specifically, in this embodiment of the application, for floor l, the input is a node feature matrix. ,in This is the length of the timing window, for example, 12 time steps. Additionally, This represents the feature vector of the s-th sensor on floor l at the t-th time step within the time window, i.e., the initial node feature information.

[0037] In this embodiment, each time step within the time window of the graph convolutional layer is... Perform graph convolution operations separately, aggregate the spatial correlation features of the sensors, and obtain the weighted data correlation information within the layer: ; in, The graph convolution weight matrix, The graph convolution bias vector, The convolution outputs the feature dimension. For activation function, The intermediate feature vector of spatiotemporal-spatial coordinates output by graph convolution.

[0038] In the convolutional layer, a 1D convolution kernel is used to perform temporal dimension convolution on the feature vector output by the graph convolution to extract short-term temporal patterns of the sensor data. For example, if the convolution kernel is set to 3, it represents the energy consumption change trend of the three nearest time steps, thus obtaining the fused feature tensor information. ; Where k is the kernel size, For temporal convolution kernel weights, The temporal convolution outputs the feature dimension. This is the temporal-spatial fusion feature vector output by TCGN.

[0039] As one implementation method, the specific steps for obtaining the local encoded feature vector information within the layer by averaging several fused feature tensors through global average pooling are as follows: In the floor-level local feature aggregation layer, the fused feature tensor information output by TCGN is subjected to temporal-dimensional global average pooling, which combines the features of each sensor. The features at each time step are aggregated into a single vector, representing the spatiotemporal global features of the sensor within the time window: ; Further, the average of the spatiotemporal global features of all sensors on floor l is taken to obtain the local coding features of that floor, namely the local coding feature vector information within the floor, which represents the spatiotemporal correlation features of the floor as a whole: ; The local coding features of all floors form a matrix: ; Local encoded features form a matrix that is input into the graph attention network.

[0040] As one implementation method, the specific steps for obtaining initial global attribute information and concatenating the in-layer local encoded feature vector information with the initial global attribute information to obtain global node feature information are as follows: The GAT network definition between floors uses the local coding features of all floors as nodes, and the input data satisfies... ,in The attribute characteristics of floor l, The feature concatenation process ensures that the node features contain local coding information and inherent floor attributes.

[0041] As one implementation method, the specific steps for obtaining floor spacing information and performing global weight processing based on the floor spacing information to obtain the first global edge weight information are as follows: Obtain the floor spacing information, and perform a reciprocal calculation on the floor spacing information to obtain the reciprocal information of the floor spacing; Obtain the fixed weight parameters, and perform global weight processing based on the fixed weight parameters and the reciprocal information of the floor spacing to obtain the first global edge weight information.

[0042] Specifically, the floors in the embodiments of this application The vertical distance is This refers to the floor spacing information, where the unit is meters (m). For example, if the spacing between adjacent floors is the floor height (h), then... The edge weight between floors, which is the inverse of the distance between floors: ; Where the weight is a fixed parameter To avoid the minimum value where the denominator is 0, the weights are... This satisfies the physical law that "the closer the distance, the greater the weight".

[0043] Global edge weight matrix, first global edge weight information: .

[0044] As one implementation method, attention parameters are obtained by calculating attention scores on global node feature information through a graph attention network, and the first global edge weight information is adjusted according to the attention parameters to obtain the second global edge weight information. Specifically, a single-layer graph attention mechanism is adopted.

[0045] Specifically, the embodiments of this application employ a single-layer graph attention mechanism to achieve feature fusion between floors, including... Each attention head. Calculate the attention parameters for floors p and q: ; in, For the first Linear transformation weights for each attention head; For the first Attention parameters for each attention head; The global node features of floor p; This is the activation function.

[0046] The attention score is incorporated into the floor weight score for correction, which is the second global edge weight information: , indicating the first Under each attention head, the feature contribution weight of floor q to floor p.

[0047] As one implementation method, the specific steps for aggregating global node feature information and second global edge weight information to obtain spatial fusion feature sequence information are as follows: Obtain time step information, sort global node feature information according to time step information, and obtain global fused feature sequence information; The global fusion feature sequence information is concatenated with the corresponding time step information to obtain the spatial fusion feature sequence information.

[0048] Specifically, this embodiment of the application also uses GAT to perform multi-head attention feature aggregation, aggregating the feature outputs of all attention heads for each floor p. , .in, For the first The output features of each attention head; This represents the global fusion feature of floor p.

[0049] This application embodiment aligns the global fusion features of all floors by time step to form a spatiotemporal fusion feature sequence, i.e., global fusion feature sequence information: ; Global spatial features and temporal features are concatenated at time steps to obtain the spatial fusion feature sequence information of the final input time series model: ; in yes The normalized time eigenvector.

[0050] This application employs a hierarchical GNN spatial feature encoding mechanism, changing the traditional coarse-grained modeling approach that treats buildings as single nodes. It uses a two-level GNN encoding: intra-floor and inter-floor. First, it focuses on the local correlation of sensors within a floor, then upgrades to global correlation between floors, achieving precise capture of spatial features from fine to coarse. Furthermore, the physical interpretability of the dynamic weight design overcomes the shortcomings of existing GNNs with fixed weights. Within a floor, the correlation coefficient of sensor data is used as the edge weight, reflecting the essence of data correlation. Between floors, the inverse of the building distance is used as the edge weight, conforming to the laws of physical space influence. This ensures that the model weights are not a black box, but rather fit the actual impact logic of building energy consumption, ultimately improving the accuracy of energy consumption prediction for individual buildings.

[0051] As one implementation method, the specific steps for encoding spatial fusion feature sequence information using a temporal model to obtain spatiotemporal fusion feature vector information are as follows: A lightweight temporal model is used to concatenate the output spatial fusion feature sequence information with temporal features and input it into the temporal model. The model learns from past feature sequences and outputs spatiotemporal fusion feature vector information.

[0052] ; Specifically, lightweight temporal models such as LSTM, TCN, and Informer are used. Spatial fusion feature sequence information is concatenated with temporal features, such as the feature of each time step being "spatial feature + hour + season". The model learns the feature sequence of the past N days, such as 30 days, to capture the temporal variation pattern of energy consumption, such as the energy consumption peak at 9 am on weekdays and the stable value of heating energy consumption at night in winter. The spatiotemporal fusion feature vector information is a time-space fusion feature vector, such as compressing the 30-day sequence features into a single 512-dimensional fusion vector.

[0053] As one implementation method, the specific steps for reducing the dimensionality of high-dimensional features of spatiotemporal fusion feature vector information using a fully connected network to obtain the predicted building energy consumption value at the target time are as follows: The first-dimensional feature is obtained by linearly mapping the spatiotemporal fusion feature vector information through the first layer of fully connected network. The second-dimensional features are obtained by linearly transforming and compressing the first-dimensional features through a second fully connected network. The building energy consumption prediction value at the target time is obtained by linear regression of the second dimension features through a third fully connected network.

[0054] Specifically, a fully connected structure with activation functions is adopted. The first layer maps the spatiotemporal fusion feature vector information to 256 dimensions and enhances the nonlinear expression through the ReLU activation function. The second layer maps to 64 dimensions to further refine the features. The third layer outputs a 1-dimensional prediction of the building's total energy consumption, such as the total energy consumption in kWh for the next hour.

[0055] ; ; in and This is the weight matrix. and Here, PCT is the bias vector, and PCT is the Dropout rate. For the output of the fully connected layer, This represents the predicted energy consumption value.

[0056] As one implementation method, it also includes: Obtain the actual energy consumption value, calculate the loss between the predicted building energy consumption value and the actual energy consumption value at the target time based on the mean absolute error, and obtain the energy consumption loss value for parameter updating.

[0057] Specifically, in the embodiments of this application, the model training uses the mean absolute error (MAE) as the loss function to minimize the deviation between the predicted value and the true value: ; in, The number of time steps in the training set. Let be the actual total energy consumption value at time step t.

[0058] The embodiments of this application adopt a progressive fusion architecture of spatiotemporal features. First, spatial dimension features are purified through a two-level GNN. Then, temporal dimension dependency modeling is completed through a sequence model. Finally, a fully connected layer is used to achieve accurate mapping of spatiotemporal features to total energy consumption, reducing the information interference problem caused by direct stacking of spatiotemporal features.

[0059] Reference Figure 2 This application provides a building energy consumption prediction system, which includes: The intra-layer edge weight analysis module 1 is used to obtain the initial intra-layer sensor information, calculate the Pearson correlation coefficient between pairs of sensors in the layer based on the initial intra-layer sensor information, and obtain the intra-layer edge weight information. Intra-layer feature fusion module 2 is used to obtain initial intra-layer attribute information. It performs feature aggregation on the initial intra-layer sensor information, initial intra-layer attribute information and intra-layer edge weight information through a temporal graph convolutional network to obtain fused feature tensor information. Global average pooling module 3 is used to take the average value of several fused feature tensors under global average pooling processing to obtain the local encoded feature vector information within the layer. The node feature concatenation module 4 is used to obtain the initial global attribute information, and to concatenate the local encoded feature vector information within the layer and the initial global attribute information to obtain the global node feature information. The global edge weight analysis module 5 is used to obtain floor spacing information, perform reciprocal calculation on the floor spacing information to obtain the first global edge weight information; calculate the attention score on the global node feature information through the graph attention network to obtain the attention parameters; and adjust the first global edge weight information according to the attention parameters to obtain the second global edge weight information. The spatiotemporal fusion feature processing module 6 is used to aggregate global node feature information and second global edge weight information to obtain spatial fusion feature sequence information; and to encode the spatial fusion feature sequence information through a temporal model to obtain spatiotemporal fusion feature vector information. The energy consumption prediction module 7 is used to reduce the dimensionality of the high-dimensional features of the spatiotemporal fusion feature vector information through a fully connected network to obtain the predicted building energy consumption value at the target time.

[0060] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the building energy consumption prediction method as described above.

[0061] This application provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the building energy consumption prediction method as described above when running.

[0062] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device and product described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0063] In the several embodiments provided in this application, it should be understood that the disclosed methods, systems, apparatus and program products can be implemented in other ways.

[0064] 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.

[0065] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for predicting building energy consumption, characterized in that, include: Obtain initial intra-layer sensor information, calculate the Pearson correlation coefficient between pairs of sensors within the layer based on the initial intra-layer sensor information, and obtain intra-layer edge weight information; The initial layer attribute information is obtained, and the sensor information, attribute information and edge weight information in the initial layer are aggregated by the temporal graph convolutional network to obtain the fused feature tensor information. By performing global average pooling on several fused feature tensor information, the mean value is taken to obtain the local encoded feature vector information within the layer; The initial global attribute information is obtained, and the local encoded feature vector information within the layer and the initial global attribute information are concatenated to obtain the global node feature information; The floor spacing information is obtained, and global weights are processed based on the floor spacing information to obtain the first global edge weight information. Attention scores are calculated on the global node feature information through a graph attention network to obtain attention parameters. The first global edge weight information is adjusted based on the attention parameters to obtain the second global edge weight information. The global node feature information and the second global edge weight information are aggregated to obtain spatial fusion feature sequence information; The spatial fusion feature sequence information is encoded by a temporal model to obtain the spatiotemporal fusion feature vector information; By using a fully connected network to reduce the dimensionality of high-dimensional features of spatiotemporal fusion feature vector information, the predicted building energy consumption value at the target time can be obtained.

2. The building energy consumption prediction method according to claim 1, characterized in that, Also includes: Obtain the actual energy consumption value, calculate the loss between the predicted building energy consumption value and the actual energy consumption value at the target time based on the mean absolute error, and obtain the energy consumption loss value for parameter updating.

3. The building energy consumption prediction method according to claim 1, characterized in that, Also includes: Historical data is acquired and preprocessed to obtain initial layer sensor information, initial layer attribute information, and initial global attribute information.

4. The building energy consumption prediction method according to claim 1, characterized in that, The specific steps for aggregating global node feature information and second global edge weight information to obtain spatial fusion feature sequence information are as follows: Obtain time step information, sort global node feature information according to time step information, and obtain global fused feature sequence information; The global fusion feature sequence information is concatenated with the corresponding time step information to obtain the spatial fusion feature sequence information.

5. The building energy consumption prediction method according to claim 1, characterized in that, The specific steps for obtaining the initial layer attribute information and performing feature aggregation on the initial layer sensor information, initial layer attribute information, and layer edge weight information through a temporal graph convolutional network to obtain fused feature tensor information are as follows: Obtain the initial layer attribute information, and concatenate the initial layer sensor information and the initial layer attribute information to obtain the initial node feature information; The initial node feature information and the intra-layer edge weight information are combined into intra-layer weighted data association information; By using a temporal graph convolutional network, spatial correlation features are aggregated from the weighted data correlation information within each layer to obtain fused feature tensor information.

6. The building energy consumption prediction method according to claim 1, characterized in that, The specific steps for obtaining the floor spacing information and performing global weight processing based on the floor spacing information to obtain the first global edge weight information are as follows: Obtain the floor spacing information, and perform a reciprocal calculation on the floor spacing information to obtain the reciprocal information of the floor spacing; Obtain the fixed weight parameters, and perform global weight processing based on the fixed weight parameters and the reciprocal information of the floor spacing to obtain the first global edge weight information.

7. The building energy consumption prediction method according to claim 1, characterized in that, The specific steps for reducing the dimensionality of high-dimensional features of spatiotemporal fusion feature vector information through a fully connected network to obtain the predicted building energy consumption value at the target time are as follows: The first-dimensional feature is obtained by linearly mapping the spatiotemporal fusion feature vector information through the first layer of fully connected network. The second-dimensional features are obtained by linearly transforming and compressing the first-dimensional features through a second fully connected network. The building energy consumption prediction value at the target time is obtained by linear regression of the second dimension features through a third fully connected network.

8. A building energy consumption prediction system, characterized in that, include: The intra-layer edge weight analysis module is used to obtain the initial intra-layer sensor information, calculate the Pearson correlation coefficient between pairs of sensors in the layer based on the initial intra-layer sensor information, and obtain the intra-layer edge weight information. The intra-layer feature fusion module is used to obtain the initial intra-layer attribute information. It uses a temporal graph convolutional network to aggregate the initial intra-layer sensor information, initial intra-layer attribute information, and intra-layer edge weight information to obtain the fused feature tensor information. The global average pooling module is used to take the average value of several fused feature tensors through global average pooling to obtain the local encoded feature vector information within the layer. The node feature concatenation module is used to obtain initial global attribute information, and concatenate the local encoded feature vector information within the layer and the initial global attribute information to obtain global node feature information; The global edge weight analysis module is used to obtain floor spacing information, calculate the reciprocal of the floor spacing information to obtain the first global edge weight information; calculate the attention score of the global node feature information through the graph attention network to obtain the attention parameters; and adjust the first global edge weight information according to the attention parameters to obtain the second global edge weight information. The spatiotemporal fusion feature processing module is used to aggregate global node feature information and second global edge weight information to obtain spatial fusion feature sequence information; The spatial fusion feature sequence information is encoded by a temporal model to obtain the spatiotemporal fusion feature vector information; The energy consumption prediction module is used to reduce the dimensionality of high-dimensional features of spatiotemporal fusion feature vector information through a fully connected network to obtain the predicted building energy consumption value at the target time.

9. An electronic device, characterized in that, The system includes a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the building energy consumption prediction method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute any of the building energy consumption prediction methods of claims 1-7 at runtime.