Gnn-based building traffic energy coupling relationship modeling analysis method and system
By using a spatiotemporal heterogeneous graph network and probabilistic prediction model based on GNN, the problem of dynamic modeling and anomaly localization of building-transportation coupling relationship is solved, achieving high-precision energy consumption prediction and anomaly detection, and supporting energy management decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE ARCHITECTURAL DESIGN & RES INST OF ZHEJIANG UNIV CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies struggle to dynamically model the building-transportation coupling relationship and lack probabilistic prediction and efficient anomaly localization capabilities, leading to inaccurate predictions of building and transportation energy consumption.
Based on GNN, a spatiotemporal heterogeneous graph network is constructed. By combining a type-aware attention mechanism and hierarchical prediction with a probabilistic prediction model and encoding-decoding reconstruction, the dynamic coupling relationship between building and transportation energy consumption can be modeled and probabilistically predicted. Furthermore, abnormal data can be located by reconstructing errors.
It improves the accuracy of building and traffic load forecasting, can adapt to changes in energy consumption characteristics under different time periods and passenger flow scales, provides stable analysis capabilities, and can quickly identify and locate abnormal forecast data to support energy dispatching and capacity planning.
Smart Images

Figure CN122451731A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy management technology, specifically to a method and system for modeling and analyzing the coupling relationship between building, transportation, and energy based on Generative Neural Networks (GNN). Background Technology
[0002] With the increasing coupling between building and transportation energy systems, especially with the widespread adoption of electric vehicles and the intensification of cross-regional population movement, the linkage between building load and transportation load is becoming more and more significant. However, existing energy load forecasting methods mostly treat building energy consumption and transportation energy consumption as independent systems and model them separately. For example, building load forecasting mainly relies on historical electricity consumption data and meteorological parameters, while transportation load forecasting focuses on travel chains or charging pile usage records, resulting in low coupling.
[0003] Currently, some solutions introduce graph neural networks for multi-energy system modeling, but these typically pre-determine fixed graph structures, making it difficult to capture the dynamic coupling relationships between people, buildings, and transportation. Furthermore, current prediction methods are mostly deterministic point predictions, which struggle to trace information within complex coupled systems.
[0004] Therefore, there is an urgent need for a building-traffic-energy coupling analysis method that can dynamically model the building-traffic coupling relationship, provide probabilistic predictions, and have anomaly location capabilities. Summary of the Invention
[0005] This application provides a modeling and analysis method and system for building-transportation-energy coupling relationship based on GNN, which is used to address the technical problem of probabilistic adaptive prediction and efficient anomaly localization under dynamic modeling of building-transportation coupling relationship in the existing technology.
[0006] In view of the above problems, this application provides a method and system for modeling and analyzing the coupling relationship between building, transportation and energy based on GNN.
[0007] This application provides a method for modeling and analyzing the coupling relationship between buildings, transportation, and energy based on Geographic Neural Networks (GNNs). The method includes: for a target energy region, determining heterogeneous entity nodes based on people, buildings, and transportation; performing cross-domain energy coupling relationship modeling to obtain a spatiotemporal heterogeneous graph network; performing hierarchical prediction based on the spatiotemporal heterogeneous graph network to obtain a predicted load sequence, wherein the hierarchical prediction includes prediction of the linkage effect of building load and transportation load based on personnel flow events, and load prediction; importing the predicted load sequence into a probabilistic prediction model, performing heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network, and determining probabilistic prediction results; performing encoding and decoding-based reconstruction processing on the heterogeneous graph structure and probabilistic prediction results, and locating abnormal prediction data through reconstruction errors; and managing the target energy region based on the probabilistic prediction results and the abnormal prediction data.
[0008] This application provides a modeling and analysis system for building-transportation-energy coupling relationships based on GNN. The system includes: a network construction unit: for a target energy area, heterogeneous entity nodes are determined based on people-building-transportation, and cross-domain energy coupling relationship modeling is performed to obtain a spatiotemporal heterogeneous graph network; a load prediction unit: hierarchical prediction is performed based on the spatiotemporal heterogeneous graph network to obtain a predicted load sequence, wherein the hierarchical prediction includes prediction of the linkage effect of building load and traffic load based on people flow events and load prediction; a probabilistic prediction unit: the predicted load sequence is imported into a probabilistic prediction model, and heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network are performed to determine the probabilistic prediction results; an anomaly location unit: the heterogeneous graph structure and probabilistic prediction results are reconstructed based on encoding and decoding, and anomaly prediction data is located through reconstruction errors; and a region management unit: the target energy area is managed based on the probabilistic prediction results and the anomaly prediction data.
[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages: The building-transportation-energy coupling relationship modeling and analysis method based on GNN provided in this application targets a target energy area. It identifies heterogeneous entity nodes based on people, buildings, and transportation, performs cross-domain energy coupling relationship modeling, and obtains a spatiotemporal heterogeneous graph network. Based on the spatiotemporal heterogeneous graph network, it performs hierarchical prediction to obtain a predicted load sequence. This predicted load sequence is then imported into a probabilistic prediction model, and heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network are performed to determine probabilistic prediction results. The heterogeneous graph structure and probabilistic prediction results are reconstructed based on encoding and decoding, and abnormal prediction data are located through reconstruction errors. Based on the probabilistic prediction results and the abnormal prediction data, the target energy area is managed. This method addresses the technical problem in existing technologies where it is difficult to achieve probabilistic adaptive prediction and efficient anomaly location under dynamic modeling of building-transportation coupling relationships. It can adapt to changes in energy consumption characteristics under different time periods and passenger flow scales, significantly improving the prediction accuracy and stability analysis capability of building and transportation coupling loads. Attached Figure Description
[0010] Figure 1 This application provides a schematic diagram of the modeling and analysis method for the coupling relationship between buildings, transportation, and energy based on GNN.
[0011] Figure 2 This application provides a schematic diagram of the structure of a GNN-based building transportation energy coupling relationship modeling and analysis system.
[0012] Explanation of reference numerals in the attached diagram: Network construction unit 11, load prediction unit 12, probabilistic prediction unit 13, anomaly location unit 14, area management unit 15. Detailed Implementation
[0013] This application provides a modeling and analysis method for building-transportation-energy coupling relationship based on GNN, which is used to solve the technical problem in the prior art of probabilistic adaptive prediction and efficient anomaly localization under dynamic modeling of building-transportation coupling relationship.
[0014] Example 1: As Figure 1 As shown, this application provides a method for modeling and analyzing the coupling relationship between building, transportation, and energy based on GNN, the method comprising: S1: For the target energy area, heterogeneous entity nodes are determined based on people, buildings and transportation, and cross-domain energy coupling relationship modeling is performed to obtain a spatiotemporal heterogeneous graph network.
[0015] In one specific implementation, the target energy area refers to a continuous geographic spatial range that needs to be analyzed and managed, such as a new urban area or an industrial park. The heterogeneous entity nodes refer to graph nodes of different types, specifically including personnel nodes, building nodes, and transportation nodes.
[0016] Among them, personnel nodes represent individual users or user groups within the area, and each personnel node can be associated with their movement trajectory and energy consumption behavior; building nodes represent various energy-consuming buildings within the area, such as residential buildings, office buildings, and shopping malls, and each building node can be associated with its building type and historical energy consumption intensity; transportation nodes represent transportation infrastructure or vehicles, such as charging stations, bus stops, or electric vehicles, and each transportation node can be associated with its charging load and operating status.
[0017] After identifying the heterogeneous entity nodes, cross-domain energy consumption coupling relationship modeling is performed to obtain a spatiotemporal heterogeneous graph network. Specifically, the cross-domain energy consumption coupling relationship refers to the mutual influence and correlation between three different domains—personnel, buildings, and transportation—through energy consumption behavior.
[0018] The specific modeling method is as follows: Using the aforementioned personnel nodes, building nodes, and transportation nodes as vertices in the graph, edge connections are constructed based on actual physical behaviors to form a heterogeneous graph structure. For example, when a person stays inside a building, an edge is established between the person node and the corresponding building node. The weight of the edge can be set as a weighted average of the stay duration; for example, a stay of 30 minutes corresponds to a weight of 0.5, and a stay of 2 hours corresponds to a weight of 2.0. When a person uses transportation to travel, an edge is established between the person node and the corresponding transportation node. The weight of the edge can be set as a weighted average of the travel distance and frequency; for example, a single trip of 10 kilometers corresponds to a weight of 1.0, and frequent use of a charging station within a week increases the weight accordingly. Through these edge connections, the original isolated nodes are organized into a heterogeneous graph structure reflecting physical interactions.
[0019] Subsequently, a type-aware attention mechanism is deployed on this heterogeneous graph structure to form the spatiotemporal heterogeneous graph network. The type-aware attention mechanism refers to using different parameter mapping matrices for different types of nodes.
[0020] Specifically, during the attention calculation process, the query matrix, key matrix, and value matrix are linearly mapped according to node type, meaning that personnel nodes, building nodes, and transportation nodes each have independent projection weights. The aim is to enable the network to learn the differentiated interaction patterns between different types of nodes.
[0021] Furthermore, in a preferred embodiment of this application, the spatiotemporal heterogeneous graph network also incorporates time information, such as discretizing time into multiple time periods, each time period corresponding to a graph snapshot, or using time encoding as part of the node features as input.
[0022] In this application, a spatiotemporal heterogeneous graph network is constructed with people, buildings, and transportation as heterogeneous nodes. The type-aware attention mechanism is used to distinguish the association characteristics of different entities and fully express the coupling law between people flow and energy load.
[0023] In summary, we finally obtained a spatiotemporal heterogeneous graph network that can simultaneously represent heterogeneous node attributes, cross-domain coupling relationships, and temporal evolution dynamics, providing a structured input representation for subsequent hierarchical and probabilistic predictions.
[0024] Furthermore, cross-domain energy coupling relationship modeling is performed to obtain a spatiotemporal heterogeneous graph network. Step S1 of this application includes: In the target energy area, distributed positioning personnel nodes, building nodes, and transportation nodes serve as heterogeneous entity nodes; edge connections are made to the heterogeneous entity nodes to determine the heterogeneous graph structure; a type-aware attention mechanism is deployed on the heterogeneous graph structure to form the spatiotemporal heterogeneous graph network, wherein in the attention mechanism, query, key, and value matrices are mapped according to node type.
[0025] In the heterogeneous graph structure, the personnel-building edge represents the weighted dwell time of personnel in the building, and the personnel-transportation edge represents the weighted travel distance and frequency of personnel using transportation. The node features include building type, energy intensity, transportation type, and charging load.
[0026] In one specific implementation, personnel nodes, building nodes, and transportation nodes are first distributed and located within the target energy area as heterogeneous entity nodes. Personnel nodes are located using mobile terminal beacons, building nodes are extracted using urban geographic information systems, and transportation nodes are extracted using charging facility and road network data. For example, five hundred personnel nodes, fifty building nodes, and twenty transportation nodes are located within an industrial park.
[0027] Then, edges are connected to the aforementioned heterogeneous entity nodes to determine the heterogeneous graph structure. The edges between personnel nodes and building nodes represent the weighted dwell time of personnel within the building. For example, a linear relationship between dwell time and weight is established, such as a 30-minute dwell time corresponding to a weight of 0.5. The edges between personnel nodes and transportation nodes represent the weighted travel distance and frequency of personnel using transportation. Similarly, a linear relationship between distance, frequency, and weight is established, such as a single trip of 5 kilometers receiving a weight of 0.5, and using the same charging station 5 times within a week receiving a weight of 2.5. Initial characteristics are configured for each node: the characteristics of building nodes include building type and energy intensity, while the characteristics of transportation nodes include traffic type and charging load.
[0028] Finally, a type-aware attention mechanism is deployed on the heterogeneous graph structure to form a spatiotemporal heterogeneous graph network. In this attention mechanism, the query matrix, key matrix, and value matrix are mapped according to the node type, that is, personnel nodes, building nodes, and traffic nodes each have independent linear projection parameters.
[0029] For example, when calculating the attention of a node of type t to a node of type s, the source node features are mapped to a query vector through a query matrix of type t, and the target node features are mapped to a key vector through a key matrix of type s. The dot product of the two yields the attention score, which is then weighted and summed using the value matrix of type s to update the node representation. Embedding temporal encoding into node features or using temporal graph snapshots allows the network to simultaneously capture spatial coupling and temporal evolution.
[0030] S2: Perform hierarchical prediction based on the spatiotemporal heterogeneous graph network to obtain the predicted load sequence, wherein the hierarchical prediction includes the prediction of the linkage effect of building load and traffic load based on personnel flow events and load prediction.
[0031] In one specific implementation, hierarchical prediction is first performed based on the spatiotemporal heterogeneous graph network constructed above. Specifically, the hierarchical prediction includes two sub-tasks performed sequentially: the first sub-task is the prediction of the linkage effect based on personnel flow events, and the second sub-task is the load prediction.
[0032] Specifically, the system extracts personnel trajectory data from the higher-level time period from the spatiotemporal heterogeneous graph network to identify whether there are personnel flow events that meet a preset scale, such as a large-scale transfer from residential areas to office areas during the morning rush hour. If such an event occurs, the system first predicts the linkage effect between building load and traffic load, that is, predicts the quantitative relationship between the decrease in building load and the increase in traffic load. For example, for every 1,000 people transferred, the building load decreases by 200 kilowatts, while the traffic charging load increases by 50 kilowatts.
[0033] Subsequently, after obtaining the linkage effect, this linkage effect is used as a constraint, combined with building energy consumption data and traffic energy consumption data for lower time periods—that is, whether there are pre-planned events involving large-scale population shifts—to perform load forecasting, which predicts the specific numerical sequences of building load and traffic load over several future time steps. Through the above hierarchical forecasting, the final output is a predicted load sequence containing timestamps, predicted building load values, and predicted traffic load values.
[0034] Furthermore, hierarchical prediction is performed based on the spatiotemporal heterogeneous graph network to obtain the predicted load sequence. Step S2 of this application includes: Based on the personnel trajectory data of the upper time period and the personnel flow events of the lower time period, it is determined whether there are personnel flow events that meet the preset scale. If so, a first-level prediction is performed based on the spatiotemporal heterogeneous graph network to obtain the linkage effect of the decrease in building load and the increase in traffic load. With the linkage effect as a constraint, a second-level prediction is performed based on the personnel trajectory data, building energy consumption data and traffic energy consumption data of the upper time period to obtain the predicted load sequence.
[0035] The two-layer prediction includes deterministic point prediction and coupled structure prediction. Deterministic point prediction yields the spatiotemporal distribution prediction of the building-traffic coupled load. Coupled structure prediction yields a dynamic graph structure describing the coupling relationship between people, buildings, and traffic. The dynamic graph structure defines the coupling strength and information propagation path between the current heterogeneous entity nodes. The spatiotemporal distribution prediction and the dynamic graph structure are integrated to form the predicted load sequence.
[0036] In one specific implementation, the system first determines whether a population movement event meeting a preset scale exists based on the population trajectory data of the upper time period and the population movement events of the lower time period. The upper time period refers to the time window of historical or currently collected data, such as 7:00 AM to 9:00 AM; the lower time period refers to the time window immediately following the upper time period and to be predicted, such as 9:00 AM to 10:00 AM; the population movement event refers to a large-scale spatial transfer of people from one type of building node to another or to a transportation node; the preset scale refers to the threshold for triggering the prediction of a linkage effect, such as the number of people transferred exceeding one hundred or the transfer density exceeding fifty people per hectare.
[0037] For example, if trajectory data from 7:00 to 9:00 in the upper time period shows that 500 people moved from residential buildings to office buildings, and the lower time period from 9:00 to 10:00 predicts that this movement will continue, then it is determined that there is a population movement event that meets the preset scale.
[0038] If the aforementioned personnel movement events occur, a single-layer prediction is performed based on the spatiotemporal heterogeneous graph network to obtain the linkage effect between the decrease in building load and the increase in traffic load. This single-layer prediction refers to outputting the relationship between the changes in building load and traffic load, rather than directly outputting specific load values.
[0039] Specifically, by utilizing the type-aware attention mechanism in spatiotemporal heterogeneous graph networks, the energy transfer patterns of personnel nodes migrating from building nodes to transportation nodes are extracted, and the ratio of the reduction in building load to the increase in transportation load corresponding to a unit of personnel movement is calculated. For example, the prediction output of the first layer is: for every 100 people moved, the building load decreases by 200 kilowatts, and the transportation charging load increases by 50 kilowatts. The linkage effect is expressed as the ratio of the decrease to the increase, i.e., four to one.
[0040] Furthermore, after obtaining the linkage effect, using the linkage effect as a constraint, and based on the personnel trajectory data, building energy consumption data and traffic energy consumption data of the upper time period, a two-layer prediction is performed on the spatiotemporal heterogeneous graph network to obtain the predicted load sequence.
[0041] The constraint condition refers to the requirement that the load values predicted in the second-level forecast must satisfy the proportional relationship defined by the linkage effect, that is, the ratio of the predicted decrease in building load to the increase in traffic load should be consistent with the prediction result of the first level. The second-level forecast specifically includes two parallel subtasks: deterministic point forecasting and coupled structure forecasting.
[0042] Deterministic point prediction yields the spatiotemporal distribution predictions of building-traffic coupled loads. This deterministic point prediction refers to outputting specific load values; for example, using a temporal convolutional network with a spatiotemporal heterogeneous graph network as the backbone, it outputs the predicted load values for each future time step, each building node, and each traffic node.
[0043] For example, for the lower time period from 9:00 to 10:00, every 15 minutes is a time step, outputting the spatiotemporal distribution prediction values of the office building load gradually decreasing from 800 kW to 600 kW, while the charging station load increases from 100 kW to 150 kW.
[0044] Simultaneously, through coupling structure prediction, a dynamic graph structure describing the coupling relationship between people, buildings, and transportation is obtained. This coupling structure prediction refers to predicting the changes in edge weights between heterogeneous entity nodes over a future time period, rather than node attributes. The dynamic graph structure is isomorphic to the spatiotemporal heterogeneous graph network, but its edge weights are updated over time. The weight of each edge defines the current coupling strength and information propagation path between the heterogeneous entity nodes.
[0045] For example, in the dynamic graph structure, the weight of the people-building edge, which was originally 0.5, drops to 0.1 after the morning rush hour, indicating weakened coupling; the weight of the people-traffic edge, which was originally 0.3, rises to 0.8 after the morning rush hour, indicating enhanced coupling. This dynamic graph structure also defines the information propagation path, that is, how load changes propagate along the edges from building nodes to people nodes and then to traffic nodes.
[0046] Finally, the spatiotemporal distribution predictions and the dynamic graph structure are integrated to form the predicted load sequence. That is, the node load values predicted by deterministic points and the edge weight values predicted by the coupled structure are spatiotemporally mapped and merged into a unified data structure, such as a heterogeneous graph with spatiotemporal labels. Node attributes store the predicted load values, and edge attributes store the coupling strength. This integrated predicted load sequence contains information on both the predicted values and how they influence each other, providing complete input for subsequent probabilistic prediction and anomaly localization.
[0047] In summary, a two-tiered prediction structure is adopted. First, large-scale population movement is identified and the linkage effect of declining building load and rising traffic load is predicted. Then, point prediction and coupled structure prediction are carried out based on this constraint, which fully explores the spatiotemporal correlation characteristics and significantly improves the prediction accuracy of building and traffic coupled load.
[0048] S3: Import the predicted load sequence into the probabilistic prediction model, perform heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network, and determine the probabilistic prediction result.
[0049] In one specific implementation, the predicted load sequence is first imported into a probabilistic prediction model. The probabilistic prediction model pre-embeds a heterogeneous graph structure determined by the aforementioned spatiotemporal heterogeneous graph network. Gaussian noise is gradually added to the load sequence through a forward diffusion process until it becomes pure noise, and the original load distribution is learned to be recovered from the pure noise through a reverse diffusion process as a training method.
[0050] In this application, after importing the predicted load sequence into the probabilistic prediction model, a heterogeneous graph structure initialization based on the spatiotemporal heterogeneous graph network is performed. Specifically, the probabilistic prediction model reads the dynamic graph structure contained in the predicted load sequence, namely the edge weight matrix describing the coupling strength and information propagation path between people, buildings, and transportation. This dynamic graph structure is used to initialize the parameters of the preset heterogeneous graph structure within the model, aligning the model's information propagation skeleton with the actual coupling relationship within the current prediction period.
[0051] After initialization, reverse diffusion generation is performed. Specifically, starting with pure noise sampling, the initialized heterogeneous graph structure serves as the denoising propagation framework. Denoising is iteratively performed step-by-step according to the learned reverse diffusion process, with information propagation and updates occurring along the edges of the heterogeneous graph structure at each step. After multiple steps of reverse diffusion, the model generates a set of load prediction samples. The distribution of these samples reflects the uncertainty of the prediction. Based on this set of samples, statistics are calculated, such as the median, a pre-set confidence interval, and the prediction interval width, to ultimately determine the probabilistic prediction result.
[0052] In summary, by updating the coupling strength and information propagation path between heterogeneous nodes in real time, and adapting to changes in energy consumption characteristics under different time periods and passenger flow scales, the system maintains stable analytical capabilities in different scenarios. It can intuitively reflect the risks and uncertainties of load fluctuations, and provide a more reliable basis for energy dispatching and capacity planning.
[0053] Furthermore, the heterogeneous graph structure initialization and reverse diffusion generation based on the aforementioned spatiotemporal heterogeneous graph network are performed to determine the probabilistic prediction results. Step S3 of this application includes: A probabilistic prediction model is trained by embedding the heterogeneous graph structure in the spatiotemporal heterogeneous graph network. The probabilistic prediction model initializes the embedded heterogeneous graph structure by reading the dynamic graph structure in the predicted load sequence. The initialized heterogeneous graph structure is used as a denoising propagation skeleton to sample from pure noise and generate a set of load prediction samples through multi-step back diffusion. The probabilistic prediction result is determined based on the spatiotemporal distribution prediction value and the load prediction samples.
[0054] The training process uses the heterogeneous graph structure in the spatiotemporal graph diffusion network as the information propagation skeleton and adopts a joint training process of forward diffusion and reverse diffusion. In the forward diffusion process, Gaussian noise is gradually added to the load sequence until it becomes pure noise, while the reverse diffusion process learns to recover the original load distribution based on the load sequence from the pure noise.
[0055] In one specific implementation, a probabilistic prediction model is first trained by embedding a heterogeneous graph structure within the spatiotemporal heterogeneous graph network. The probabilistic prediction model employs a spatiotemporal graph diffusion network architecture, its core feature being the pre-embedded fixed heterogeneous graph structure as the backbone of information propagation. This heterogeneous graph structure originates from the aforementioned spatiotemporal heterogeneous graph network constructed using a type-aware attention mechanism, and includes three types of nodes: people, buildings, and transportation, along with the edge connections between them. During training, this embedded heterogeneous graph structure remains unchanged, serving as the static topological basis for message passing. The training process specifically employs a joint training method of forward diffusion and reverse diffusion: during forward diffusion, Gaussian noise is gradually added to the real load sequences in the training set, with the amount of noise added at each step controlled by a preset noise scheduling table. After a sufficient number of steps, the original load sequence is completely destroyed, becoming a pure noise distribution. During reverse diffusion, the model learns to start from pure noise, using the embedded heterogeneous graph structure as the message propagation backbone, gradually removing noise to recover the original load sequence. Model parameters are optimized by minimizing the difference between the noise added by forward diffusion and the noise predicted by backward diffusion.
[0056] For the training samples, the samples are divided into multiple groups according to the corresponding heterogeneous graph structure. For each group of samples, the above training process is performed separately. Iterative training under different heterogeneous graph structures is performed until convergence, and the constructed probability prediction model is obtained.
[0057] After training, the probabilistic prediction model initializes the embedded heterogeneous graph structure by reading the dynamic graph structure in the predicted load sequence. The predicted load sequence is the output obtained from the aforementioned hierarchical prediction, which includes not only the predicted spatiotemporal distribution of building-traffic coupled loads given by deterministic point prediction, but also the dynamic graph structure given by coupled structure prediction. This dynamic graph structure defines the coupling strength and information propagation path between heterogeneous entity nodes within the current prediction period.
[0058] For example, the weight of a person-building edge in a dynamic graph structure changes from 0.5 to 0.1, indicating a weakening of coupling. The probabilistic prediction model reads the edge weight matrix of this dynamic graph structure, uses it as initial parameters, and updates the edge weights of the pre-embedded static heterogeneous graph structure. This adjusts the information propagation framework of the probabilistic prediction model from a static topology to a dynamic topology that matches the actual coupling relationship during the current prediction period.
[0059] After initialization, the initialized heterogeneous graph structure is used as the denoising propagation skeleton. A set of load prediction samples is generated from pure noise sampling through multiple steps of reverse diffusion.
[0060] Specifically, a pure noise vector is first sampled from a standard Gaussian distribution, with the same dimension as the spatiotemporal distribution prediction. Then, using the initialized heterogeneous graph structure as the message passing topology for each denoising step, the noise vector is progressively updated for denoising according to the backdiffusion process learned during training. At each denoising step, the representation of each node is updated by aggregating its neighboring nodes, i.e., according to the edge connection information in the heterogeneous graph structure, with the aggregation weight determined by the edge weights. After a preset number of backdiffusion steps, a complete load prediction sample is output. This process from pure noise sampling to backdiffusion is repeated multiple times, for example, one hundred times, generating one hundred load prediction samples. The set of these samples reflects the uncertainty distribution of the prediction.
[0061] Finally, based on the spatiotemporal distribution predicted value and the load prediction samples, a probabilistic prediction result is determined. The spatiotemporal distribution predicted value is the specific load value output in the aforementioned deterministic point prediction stage, for example, the load prediction value for an office building at 10:00 AM is 600 kilowatts. Simultaneously, statistical calculations are performed on the generated multiple load prediction samples: the median of each sample is taken as the central predicted value, and a pre-set confidence interval, such as 90%, is used, i.e., the interval between the 5th percentile and the 95th percentile of the sample distribution is taken as the prediction interval, and the width of this interval is calculated. For example, for a certain building node, the median of one hundred samples is 610 kilowatts, the 90% confidence interval is 580 to 640 kilowatts, and the interval width is 60 kilowatts.
[0062] Subsequently, the above statistical results are integrated with the spatiotemporal distribution predictions to finally output probabilistic prediction results with uncertainty quantification.
[0063] This application employs probabilistic forecasting outputs to support risk prediction. It can intuitively reflect load fluctuation risks and uncertainties, providing a more reliable basis for energy dispatching and capacity planning.
[0064] Furthermore, based on the spatiotemporal distribution prediction values and the load prediction samples, a probabilistic prediction result is determined. Step S3 of this application includes: The load prediction sample is subjected to the median within a group, a preset confidence interval, and a prediction interval width to determine the prediction data of a type I node. The preset confidence interval is greater than or equal to a preset confidence level. In the spatiotemporal distribution prediction values, the prediction data of the type I nodes are replaced, and the remaining nodes are identified as type II nodes, which are used as probabilistic prediction results.
[0065] In one specific implementation, the generated load prediction samples are first subjected to within-group statistical processing to determine the prediction data of a class of nodes. In this application, the class of nodes refers to nodes with low prediction uncertainty and high reliability, and the selection criteria may be the variance of historical prediction errors or the dispersion of the current sample.
[0066] Specifically, for each node, its corresponding load prediction samples, such as one hundred samples, are grouped together, and the median of this group is calculated as the central estimate of the node. Simultaneously, a confidence interval is set according to a preset confidence level. The preset confidence interval is greater than or equal to the preset confidence level; for example, if the preset confidence level is 90%, then the confidence interval is from 90% to 100%, and the interval width is calculated, i.e., the upper limit minus the lower limit.
[0067] For example, for a certain building node, the median of 100 samples is 610 kilowatts, the 90% confidence interval is 580 to 640 kilowatts, and the interval width is 60 kilowatts. Nodes that meet the pre-set confidence requirements are labeled as a class of nodes, and their predicted data includes the median, confidence interval, and interval width.
[0068] Then, in the spatiotemporal distribution prediction values, the prediction data for a certain type of node is replaced. The spatiotemporal distribution prediction values are the specific load values output in the aforementioned deterministic point prediction stage. For example, if the deterministic prediction value of a building node at the same time step is 600 kilowatts, the spatiotemporal distribution prediction value for a certain type of node is replaced with the median obtained from the load prediction sample statistics, and the probabilistic prediction result replaces the deterministic point prediction result.
[0069] Simultaneously, for the remaining nodes not selected as Category I nodes, they are identified as Category II nodes. Category II nodes retain their original spatiotemporal distribution prediction values, i.e., deterministic point prediction values, as their prediction data. Finally, the prediction data of all nodes after the above processing, i.e., Category I nodes using sample statistical results and Category II nodes using deterministic point prediction values, are integrated and output as probabilistic prediction results.
[0070] In summary, the probabilistic prediction results retain the probability distribution information of reliable nodes while avoiding unreliable probability intervals for low-confidence nodes due to excessive sample dispersion.
[0071] S4: Perform encoding and decoding-based reconstruction processing on the heterogeneous graph structure and probabilistic prediction results, and locate abnormal prediction data through reconstruction error.
[0072] S5: Based on the probabilistic prediction results and the abnormal prediction data, manage the target energy area.
[0073] In one specific implementation, the heterogeneous graph structure and the probabilistic prediction results are first input into an encoder-decoder network for reconstruction. The encoder uses the heterogeneous graph structure as the information propagation framework to compress the probabilistic prediction results into a low-dimensional latent representation; the decoder reconstructs this latent representation back into the original data space based on the same graph structure. The reconstruction error between the probabilistic prediction results and the reconstruction results is calculated. When the reconstruction error of a node exceeds a preset threshold, the prediction data corresponding to that node is identified as abnormal prediction data.
[0074] Then, based on the probabilistic prediction results and the anomaly prediction data, the target energy area is managed. A specific management method is exemplified as follows: The energy storage scheduling strategy within the area is adjusted according to the confidence interval width in the probabilistic prediction results, reserving more backup capacity for nodes with wider confidence intervals; based on the anomaly node type and propagation path in the anomaly prediction data, the root cause node of abnormal load fluctuations is located, such as a building node or traffic node, and corresponding control measures are triggered, such as sending an early warning to the area where the node is located or adjusting the energy allocation in that area.
[0075] Furthermore, based on encoding and decoding reconstruction processing, anomaly prediction data is located through reconstruction errors. Step S4 of this application includes: According to the first encoder, using the heterogeneous graph structure as the encoding skeleton, the probabilistic prediction results based on building-traffic are compressed into a low-dimensional latent representation, which is then transferred to the second decoder for reconstruction to determine the reconstruction result. By measuring the reconstruction error between the probabilistic prediction result and the reconstruction result, nodes with reconstruction errors greater than the corresponding prediction interval width are located as anomaly root cause nodes, and propagation analysis based on the heterogeneous graph structure is performed to determine anomaly prediction data, wherein the anomaly prediction data includes anomaly type and propagation path.
[0076] In one specific implementation, firstly, using the heterogeneous graph structure as the encoding skeleton, the probabilistic prediction results based on building-traffic are compressed into a low-dimensional latent representation using a first encoder. The first encoder employs a graph encoder architecture, such as a graph convolutional network or a graph attention network. The heterogeneous graph structure, as the encoding skeleton, defines the topological path for information propagation during the encoding process; that is, node feature updates are aggregated only along existing edges in the graph. The probabilistic prediction results refer to the data output from the aforementioned steps, containing the load prediction values and uncertainty measures for building and traffic nodes. The encoder takes the original feature vector of each node, including the median load prediction and interval width, as input, and performs neighbor aggregation and nonlinear transformation layer by layer according to the heterogeneous graph structure, mapping the high-dimensional input into a low-dimensional latent vector.
[0077] For example, a probabilistic prediction result containing one hundred nodes, each node having an original feature dimension of ten, is compressed by the first encoder to output a low-dimensional latent representation with a dimension of thirty-two for each node.
[0078] Then, the low-dimensional latent representation is passed to the second decoder for reconstruction, and the reconstruction result is determined. The second decoder adopts a graph decoder architecture symmetrical to the first encoder, and also uses the heterogeneous graph structure as the propagation skeleton to gradually restore the low-dimensional latent representation back to the original data space. The output dimension of the decoder is the same as the input dimension of the first encoder, that is, each node outputs a reconstructed feature vector, and this reconstruction result represents the decoder's regeneration of the original probabilistic prediction result.
[0079] After obtaining the reconstruction results, the reconstruction error is measured between the probabilistic prediction results and the reconstruction results. Nodes with reconstruction errors greater than the corresponding prediction interval width are identified as abnormal root cause nodes.
[0080] In this application, normal data can be effectively compressed and restored by low-dimensional latent representation, while abnormal data is difficult to be accurately reconstructed due to its deviation from the normal distribution, resulting in a large reconstruction error, which serves as the basis for anomaly detection.
[0081] For example, the reconstruction error measurement employs a node-by-node error calculation method, such as calculating the mean squared error or absolute error between the original feature vector before reconstruction and the reconstructed feature vector after reconstruction. For each node, its corresponding prediction interval width is obtained, which is derived from the aforementioned probabilistic prediction step; for example, the prediction interval width for a building node is sixty kilowatts. If the reconstruction error of a node exceeds this prediction interval width, the node is determined to be an anomalous root cause node. For example, if the reconstruction error of a node is eighty kilowatts and its prediction interval width is sixty kilowatts, then the node is marked as an anomalous root cause node.
[0082] Finally, a propagation analysis based on the heterogeneous graph structure is performed to determine the anomaly prediction data. That is, starting from the root cause node of the anomaly, the anomaly is traced backward or propagated forward along the edges in the heterogeneous graph structure to neighboring nodes to analyze the range and direction of the anomaly's impact.
[0083] Specifically, the proportion of neighboring nodes of the root cause node whose reconstruction error exceeds the width of their respective prediction intervals is calculated. If the reconstruction error of a neighboring node also exceeds the limit, it is included in the anomaly propagation path. This process is repeated until it can no longer be expanded, ultimately resulting in one or more anomaly propagation paths.
[0084] The anomaly prediction data includes anomaly type and propagation path: the anomaly type is determined according to the building type or traffic type of the corresponding node and the positive or negative direction of the reconstruction error. For example, if the predicted building load value is lower than the reconstruction value, it means that the actual energy consumption is abnormally high. If the predicted traffic load value is higher than the reconstruction value, it means that the charging demand is abnormally low. The propagation path is recorded in the form of a node sequence or edge sequence. For example, it propagates from building node A to personnel node B and then to traffic node C.
[0085] In summary, the final output includes anomaly prediction data containing the root cause node, anomaly type, and propagation path.
[0086] The building-transport-energy coupling relationship modeling and analysis method based on GNN provided in this application has the following technical effects: 1. Construct a spatiotemporal heterogeneous graph network with people, buildings, and transportation as heterogeneous nodes. Use a type-aware attention mechanism to distinguish the association characteristics of different entities and fully express the cross-domain coupling law between people flow and energy load.
[0087] 2. A two-tiered prediction structure is adopted. First, large-scale population flows are identified and the synergistic effect of declining building load and increasing traffic load is predicted. Then, point prediction and coupled structure prediction are carried out based on this constraint, fully exploring the spatiotemporal correlation characteristics and significantly improving the prediction accuracy of building and traffic coupled loads. Combining a heterogeneous graph skeleton and diffusion model to achieve reverse diffusion generation, probabilistic results with confidence intervals and prediction intervals are output, which can intuitively reflect the risk and uncertainty of load fluctuations, providing a more reliable decision-making basis for energy dispatch and capacity planning. The coupling strength and information propagation path between heterogeneous nodes can be updated in real time, adapting to changes in energy consumption characteristics under different time periods and passenger flow scales, maintaining stable analytical capabilities.
[0088] 3. By reconstructing and comparing the prediction results through the encoding and decoding structure, the abnormal nodes can be quickly located using the reconstruction error, and the abnormal propagation path can be traced based on the graph structure, thereby realizing the automatic identification of the abnormal type and root cause, effectively reducing the impact of erroneous predictions on regional energy management.
[0089] Example 2, based on the same inventive concept as the GNN-based building-transportation-energy coupling relationship modeling and analysis method in the previous examples, such as... Figure 2 As shown, this application provides a modeling and analysis system for building-transportation-energy coupling relationships based on GNN, wherein the system includes: Network building unit 11: For the target energy area, heterogeneous entity nodes are determined based on people-buildings-transportation, cross-domain energy coupling relationship modeling is performed, and a spatiotemporal heterogeneous graph network is obtained; Load forecasting unit 12: Performs hierarchical forecasting based on the spatiotemporal heterogeneous graph network to obtain a predicted load sequence, wherein the hierarchical forecasting includes the prediction of the linkage effect of building load and traffic load based on personnel flow events and load forecasting; Probabilistic prediction unit 13: imports the predicted load sequence into the probabilistic prediction model, performs heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network, and determines the probabilistic prediction result; Anomaly localization unit 14: performs encoding and decoding-based reconstruction processing on the heterogeneous graph structure and probabilistic prediction results, and locates the anomaly prediction data through reconstruction error; Regional Management Unit 15: Manages the target energy region based on the probabilistic prediction results and the abnormal prediction data.
[0090] Furthermore, the network construction unit 11 is used to perform the following steps: in the target energy area, distributed positioning personnel nodes, building nodes and traffic nodes are used as heterogeneous entity nodes; edge connections are made to the heterogeneous entity nodes to determine the heterogeneous graph structure; a type-aware attention mechanism is deployed on the heterogeneous graph structure to form the spatiotemporal heterogeneous graph network, wherein in the attention mechanism, the query, key and value matrices are mapped according to the node type.
[0091] In the heterogeneous graph structure, the personnel-building edge represents the weighted dwell time of personnel in the building, and the personnel-transportation edge represents the weighted travel distance and frequency of personnel using transportation. The node features include building type, energy intensity, transportation type, and charging load.
[0092] Furthermore, the load prediction unit 12 is used to perform the following steps: based on the personnel trajectory data of the upper time period and the personnel flow events of the lower time period, determine whether there is a personnel flow event that meets the preset scale; if so, perform a first-level prediction based on the spatiotemporal heterogeneous graph network to obtain the linkage effect of the decrease in building load and the increase in traffic load; using the linkage effect as a constraint, perform a second-level prediction based on the personnel trajectory data, building energy consumption data and traffic energy consumption data of the upper time period and the spatiotemporal heterogeneous graph network to obtain the predicted load sequence.
[0093] Furthermore, the load prediction unit 12 is used to perform the following steps: the two-layer prediction includes deterministic point prediction and coupled structure prediction; wherein, through deterministic point prediction, the spatiotemporal distribution prediction value of the building-traffic coupled load is obtained; through coupled structure prediction, a dynamic graph structure describing the coupling relationship between people-building-traffic is obtained, wherein the dynamic graph structure defines the coupling strength and information propagation path between the current heterogeneous entity nodes; the spatiotemporal distribution prediction value and the dynamic graph structure are integrated as the predicted load sequence.
[0094] Furthermore, the probabilistic prediction unit 13 is used to perform the following steps: training a probabilistic prediction model by embedding the heterogeneous graph structure in the spatiotemporal heterogeneous graph network; the probabilistic prediction model initializes the embedded heterogeneous graph structure by reading the dynamic graph structure in the predicted load sequence; using the initialized heterogeneous graph structure as a denoising propagation skeleton, sampling from pure noise, and generating a set of load prediction samples through multi-step reverse diffusion; and determining the probabilistic prediction result based on the spatiotemporal distribution prediction value and the load prediction samples.
[0095] Furthermore, the probabilistic prediction unit 13 is used to perform the following steps: taking the median within the group, setting a preset confidence interval and prediction interval width for the load prediction sample, and determining the prediction data of a type of node, wherein the preset confidence interval is greater than or equal to a preset confidence level; replacing the prediction data of the type of node in the spatiotemporal distribution prediction value, and identifying the remaining nodes as type II nodes, as the probabilistic prediction result.
[0096] The training process uses the heterogeneous graph structure in the spatiotemporal graph diffusion network as the information propagation skeleton and adopts a joint training process of forward diffusion and reverse diffusion. In the forward diffusion process, Gaussian noise is gradually added to the load sequence until it becomes pure noise, while the reverse diffusion process learns to recover the original load distribution based on the load sequence from the pure noise.
[0097] Furthermore, the anomaly localization unit 14 is used to perform the following steps: according to the first encoder, using the heterogeneous graph structure as the encoding skeleton, compressing the probabilistic prediction result based on building-traffic into a low-dimensional latent representation, transferring it to the second decoder for reconstruction, and determining the reconstruction result; by measuring the reconstruction error between the probabilistic prediction result and the reconstruction result, locating nodes whose reconstruction error is greater than the corresponding prediction interval width, as anomaly root cause nodes, and performing propagation analysis based on the heterogeneous graph structure to determine anomaly prediction data, wherein the anomaly prediction data includes anomaly type and propagation path.
[0098] Through the foregoing detailed description of the GNN-based building-traffic-energy coupling relationship modeling and analysis method, those skilled in the art can clearly understand the GNN-based building-traffic-energy coupling relationship modeling and analysis method in this embodiment. As for the apparatus disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and relevant parts can be referred to the method section description.
[0099] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for modeling and analyzing the coupling relationship between building, transportation, and energy based on GNN, characterized in that, The method includes: For the target energy area, heterogeneous entity nodes are identified based on people, buildings, and transportation. Cross-domain energy consumption coupling relationship modeling is performed to obtain a spatiotemporal heterogeneous graph network. Hierarchical prediction is performed based on the spatiotemporal heterogeneous graph network to obtain the predicted load sequence. The hierarchical prediction includes the prediction of the linkage effect of building load and traffic load based on personnel flow events, as well as the load prediction. The predicted load sequence is imported into the probabilistic prediction model, and the heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network are performed to determine the probabilistic prediction results. The heterogeneous graph structure and probabilistic prediction results are reconstructed based on encoding and decoding, and the abnormal prediction data are located by reconstructing the error. The target energy region is managed based on the probabilistic prediction results and the abnormal prediction data.
2. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 1, characterized in that, Performing cross-domain energy coupling relationship modeling yields a spatiotemporal heterogeneous graph network, including: In the target energy area, distributed positioning personnel nodes, building nodes, and transportation nodes serve as heterogeneous entity nodes. Connect the heterogeneous entity nodes with edges to determine the heterogeneous graph structure; The spatiotemporal heterogeneous graph network is constructed by deploying a type-aware attention mechanism on the heterogeneous graph structure, wherein the query, key, and value matrices are mapped according to the node type in the attention mechanism.
3. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 2, characterized in that, In the heterogeneous graph structure, the personnel-building edge represents the weighted dwell time of personnel in the building, and the personnel-transportation edge represents the weighted travel distance and frequency of personnel using transportation. The node characteristics include building type, energy intensity, traffic type, and charging load.
4. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 1, characterized in that, Hierarchical prediction is performed based on the spatiotemporal heterogeneous graph network to obtain the predicted load sequence, including: Based on the personnel trajectory data of the upper time period and the personnel flow events of the lower time period, determine whether there are personnel flow events that meet the preset scale. If it exists, perform a layer prediction based on the spatiotemporal heterogeneous graph network to obtain the linkage effect between the decrease in building load and the increase in traffic load; Using the aforementioned linkage effect as a constraint, and based on the personnel trajectory data, building energy consumption data, and transportation energy consumption data of the upper time period, a two-layer prediction is performed on the spatiotemporal heterogeneous graph network to obtain the predicted load sequence.
5. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 4, characterized in that, Two-layer prediction includes deterministic point prediction and coupled structure prediction; Among them, the spatiotemporal distribution prediction value of building-traffic coupled load is obtained through deterministic point prediction; Through coupling structure prediction, a dynamic graph structure describing the coupling relationship between people, buildings, and transportation is obtained, wherein the dynamic graph structure defines the coupling strength and information propagation path between the current heterogeneous entity nodes; The spatiotemporal distribution predictions and dynamic graph structure are integrated to form the predicted load sequence.
6. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 5, characterized in that, Perform heterogeneous graph structure initialization and reverse diffusion generation based on the aforementioned spatiotemporal heterogeneous graph network, and determine probabilistic prediction results, including: A probabilistic prediction model is trained by embedding the heterogeneous graph structure in the spatiotemporal heterogeneous graph network. The probabilistic prediction model initializes the embedded heterogeneous graph structure by reading the dynamic graph structure in the predicted load sequence; The initialized heterogeneous graph structure is used as the denoising propagation skeleton. A set of load prediction samples is generated from pure noise sampling through multiple steps of reverse diffusion. Based on the spatiotemporal distribution prediction values and the load prediction samples, a probabilistic prediction result is determined.
7. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 6, characterized in that, Based on the spatiotemporal distribution prediction values and the load prediction samples, a probabilistic prediction result is determined, including: The load prediction sample is subjected to the median within a group, a preset confidence interval, and a prediction interval width to determine the prediction data for a class of nodes, wherein the preset confidence interval is greater than or equal to a preset confidence level; In the spatiotemporal distribution prediction values, the prediction data of Class I nodes are replaced, and the remaining nodes are identified as Class II nodes, which are used as probabilistic prediction results.
8. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 7, characterized in that, The training process uses the heterogeneous graph structure in the spatiotemporal graph diffusion network as the information propagation skeleton and adopts a joint training process of forward diffusion and backward diffusion. In the forward diffusion process, Gaussian noise is gradually added to the load sequence until it becomes pure noise, while the backward diffusion process learns to recover the original load distribution based on the load sequence from the pure noise.
9. The building-transportation-energy coupling relationship modeling and analysis method based on GNN as described in claim 7, characterized in that, Perform encoding and decoding-based reconstruction processing, and locate anomaly prediction data through reconstruction errors, including: According to the first encoder, using the heterogeneous graph structure as the encoding skeleton, the probabilistic prediction results based on building-traffic are compressed into a low-dimensional latent representation, which is then transferred to the second decoder for reconstruction to determine the reconstruction result. By measuring the reconstruction error between the probabilistic prediction results and the reconstruction results, nodes with reconstruction errors greater than the corresponding prediction interval width are located as root cause nodes of anomalies and propagation analysis based on the heterogeneous graph structure is performed to determine anomaly prediction data, wherein the anomaly prediction data includes anomaly type and propagation path.
10. A building-transportation-energy coupling relationship modeling and analysis system based on GNN, characterized in that, The system is used to perform the GNN-based building-transportation-energy coupling relationship modeling and analysis method as described in any one of claims 1-9, the system comprising: Network building unit: For the target energy area, heterogeneous entity nodes are determined based on people, buildings and transportation, and cross-domain energy coupling relationship modeling is performed to obtain a spatiotemporal heterogeneous graph network; Load forecasting unit: Performs hierarchical forecasting based on the spatiotemporal heterogeneous graph network to obtain a predicted load sequence, wherein the hierarchical forecasting includes the prediction of the linkage effect of building load and traffic load based on personnel flow events and load forecasting; Probabilistic prediction unit: imports the predicted load sequence into the probabilistic prediction model, performs heterogeneous graph structure initialization and reverse diffusion generation based on the spatiotemporal heterogeneous graph network, and determines the probabilistic prediction result; Anomaly localization unit: performs encoding and decoding-based reconstruction processing on the heterogeneous graph structure and probabilistic prediction results, and locates the anomaly prediction data through reconstruction error; Regional management unit: manages the target energy region based on the probabilistic prediction results and the abnormal prediction data.