Indoor temperature field prediction method and system based on physical information graph neural network
By combining CFD and graph neural network, using graph structure transformation and feature extraction, the problems of long calculation time and low accuracy in traditional methods are solved, fast and accurate prediction of indoor temperature fields are achieved, the operation strategy of air conditioning systems is optimized, and the building energy saving efficiency is improved.
Patent Information
- Application Number
- CN202510240784.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-05-30
AI Technical Summary
Traditional temperature field prediction methods such as CFD simulation have a long calculation time and high resource consumption, which is difficult to meet the real-time prediction needs; traditional machine learning methods are limited in their effectiveness when processing unstructured grid data, making it difficult to capture complex spatial and temporal dependencies.
Combining computational fluid dynamics (CFD) and graph neural network (GNN), through graph structure transformation and feature extraction, the graph neural network model is used to predict temperature field, including a combination of encoder, processor and decoder, and training is combined with physical information loss function.
It realizes fast and accurate prediction of the indoor temperature field, improves prediction accuracy and computing efficiency, and can optimize the operating strategies of the air-conditioning system in near real time, reduces energy consumption, and adapts to complex indoor environments.
Smart Images

Figure CN120068656A_ABST
Abstract
Description
Technical Field
[0001] This article belongs to the technical field of building energy conservation and intelligent control, and specifically relates to an indoor temperature field prediction method and system based on a physics-informed graph neural network. Background Technique
[0002] With the continuous increase in global energy consumption, the energy consumption of the building industry has reached about 40% of the total global energy consumption. Among them, the air-conditioning system is one of the main sources of building energy consumption. According to statistics, the energy consumption of the air-conditioning system accounts for 30%-50% of the total building energy consumption. Especially in large public buildings, the proportion of energy consumption of the air-conditioning system is even higher.
[0003] Therefore, optimizing the operating efficiency of the air-conditioning system and reducing building energy consumption have become an important research direction in the current field of building energy conservation.
[0004] Traditional temperature field prediction methods mainly rely on Computational Fluid Dynamics (CFD) simulation. By numerically solving the fluid mechanics equations, CFD can provide accurate temperature distribution results and is widely used in the design and optimization of building air-conditioning systems. However, CFD simulation has the problems of long calculation time and large consumption of computing resources. Especially when dealing with complex indoor environments, the generation and solution process of the computational grid often takes several hours or even days. In addition, CFD simulation has high requirements for computing hardware and is difficult to be widely applied in actual projects. Especially in scenarios that require real-time or near-real-time prediction, the limitations of CFD are more obvious.
[0005] To overcome the limitations of CFD simulation, a variety of machine learning-based temperature field prediction methods have been proposed in the prior art. These methods can quickly predict the changes in the temperature field by using historical data to train the model, reducing the calculation time and resource consumption. However, traditional machine learning methods have great difficulties in dealing with unstructured grid data. The grid data of the indoor temperature field is usually unstructured, and the number and distribution of grid points are uneven. Traditional machine learning methods (such as support vector machines, random forests, etc.) are difficult to effectively capture this complex spatial and temporal dependence. In addition, traditional machine learning methods usually require a large amount of feature engineering and data preprocessing, further increasing the complexity and computational cost of the model.
[0006] Therefore, how to combine machine learning with CFD to propose an efficient and accurate temperature field prediction method has become a hot issue in current research. Summary of the Invention
[0007] Aiming at the above problems of the existing technology, the purpose of this paper is to provide an indoor temperature field prediction method and system based on a physics-informed graph neural network, which can improve the accuracy of indoor temperature field prediction.
[0008] To solve the above technical problems, the specific technical solutions of this paper are as follows:
[0009] On the one hand, this paper provides an indoor temperature field prediction method based on a physics-informed graph neural network, and the method includes:
[0010] Using a temperature field simulation model, obtain multiple indoor flow field data based on a preset time interval, and the flow field data includes the temperature distribution at different positions in the room, the pressure field and velocity field of air flow;
[0011] Perform graph structure transformation on the indoor flow field data to obtain multiple graph structure data;
[0012] Use the encoder in the graph neural network model to extract features from each graph structure data, and obtain the feature vectors of nodes and edges in each graph structure data;
[0013] Use the processor in the graph neural network model to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data to obtain the spatio-temporal dynamic change data of the indoor flow field;
[0014] Use the decoder in the graph neural network model to perform mapping processing on the spatio-temporal dynamic change data of the indoor flow field to obtain the temperature change situation at the next moment in the room.
[0015] Further, the performing graph structure transformation on the indoor flow field data to obtain multiple graph structure data includes:
[0016] Define the node features and edge features of the graph structure data, where the node features include the air flow temperature, pressure and velocity at the spatial position where the node is located, and the edge features represent the relative displacement and transfer coefficient between nodes;
[0017] According to the node features and boundary conditions, determine the node types at different spatial positions in the room, and the node types at least include inflow nodes, outflow nodes and wall nodes;
[0018] Generate initial graph structure data according to the node types, edge features at different spatial positions, and the indoor flow field data at each acquisition time;
[0019] Normalize the initial graph structure data to obtain graph structure data under the same dimension.
[0020] Further, use the encoder in the graph neural network model to extract features from each graph structure data, and obtain the feature vectors of nodes and edges in each graph structure data, including:
[0021] Calculate the relative displacement vector between the nodes at both ends of each edge;
[0022] Use a multi-layer perceptron to map the node features of each node and the relative displacement vector between the nodes at both ends of each edge respectively, and obtain the feature vectors of each node and each edge.
[0023] Further, use the processor in the graph neural network model to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data, and obtain the spatio-temporal dynamic change data of the indoor flow field, including:
[0024] According to the feature vectors of the nodes at both ends of each edge, the feature vector of the edge, and the global attributes, use a multi-layer perceptron to calculate the updated feature vector of the edge;
[0025] According to the updated feature vector of each edge, determine the set of updated feature vectors of all the edges connected to each node;
[0026] Perform an aggregation process on the set of feature vectors to obtain the aggregated edge feature vector of each node;
[0027] According to the current feature vector of each edge, the aggregated edge feature vector, and the global data, use a multi-layer perceptron to update the feature vector of the node;
[0028] According to the updated feature vectors of each node and each edge, obtain the updated global edge features and global node features;
[0029] According to the updated global edge features and global node features, and the current global attributes, obtain the updated global attributes.
[0030] Further, use the decoder in the graph neural network model to perform a mapping process on the spatio-temporal dynamic change data of the indoor flow field to obtain the temperature change situation at the next moment in the indoor, including:
[0031] Use a multi-layer perceptron to map the updated feature vector of each node to a temperature change value;
[0032] According to the temperature change value of each node, use an Euler integrator to predict the temperature of each node at the next moment, and obtain the temperature situation of all the nodes in the indoor.
[0033] Further, the graph neural network model is trained through the following steps:
[0034] Construct an initial graph neural network model, where the initial graph neural network model includes an encoder, a processor, and a decoder;
[0035] Obtain the temperature field data collected at multiple time intervals indoors as the training set;
[0036] Use the training set to predict the initial graph neural network model to obtain prediction data for the next acquisition moment corresponding to each acquisition time;
[0037] According to the prediction data for the next acquisition moment and the real temperature field data, combine with a preset physical information loss function for training to obtain a graph neural network model that achieves the optimization goal.
[0038] Furthermore, the preset physical information loss function is represented by the following formula:
[0039]
[0040] where L phy represents the physical-driven loss function, and represent the spatial gradients of temperature, and x and y are the horizontal and vertical axes of the spatial coordinate system respectively.
[0041] Furthermore, the method further includes:
[0042] Obtain the predicted flow field data and the target flow field data indoors at the next moment, where the target flow field data is the data that is expected to be achieved in advance;
[0043] Set different color markings according to the interval ranges corresponding to the preset flow field data and the target flow field data;
[0044] Dynamically display the predicted flow field data and the target flow field data at each moment on the display interface.
[0045] On the other hand, this article also provides an indoor temperature field prediction device based on a physical information graph neural network. The device includes:
[0046] A flow field data acquisition module, which is used to use a temperature field simulation model to obtain multiple indoor flow field data based on a preset time interval. The flow field data includes the temperature distribution at different positions indoors, the pressure field and velocity field of air flow;
[0047] A graph structure construction module; which is used to perform graph structure transformation on the indoor flow field data to obtain multiple graph structure data;
[0048] A feature extraction module, which is used to use the encoder in the graph neural network model to extract features from each graph structure data to obtain the feature vectors of nodes and edges in each graph structure data;
[0049] A spatio-temporal dynamic processing module, which is used to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data by using a processor in a graph neural network model to obtain spatio-temporal dynamic change data of the indoor flow field;
[0050] A prediction module, which is used to perform mapping processing on the spatio-temporal dynamic change data of the indoor flow field by using a decoder in the graph neural network model to obtain the temperature change situation at the next moment in the room.
[0051] On the other hand, this article also provides an indoor temperature field prediction system based on a physics-informed graph neural network. The system includes:
[0052] A temperature adjustment device for adjusting the indoor temperature;
[0053] A controller for executing the above-mentioned indoor temperature field prediction method based on a physics-informed graph neural network to obtain the real-time temperature adjustment situation of the temperature adjustment device.
[0054] Adopting the above technical solution, this article provides an indoor temperature field prediction method and system based on a physics-informed graph neural network. The method includes: using a temperature field simulation model to obtain multiple indoor flow field data based on a preset time interval. The flow field data includes the temperature distribution at different positions in the room, the pressure field and velocity field of air flow; performing graph structure transformation on the flow field data in the room to obtain multiple graph structure data; using an encoder in the graph neural network model to perform feature extraction on each graph structure data to obtain the feature vectors of nodes and edges in each graph structure data; using a processor in the graph neural network model to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data to obtain spatio-temporal dynamic change data of the indoor flow field; using a decoder in the graph neural network model to perform mapping processing on the spatio-temporal dynamic change data of the indoor flow field to obtain the temperature change situation at the next moment in the room. This article can improve the accuracy of indoor temperature field prediction.
[0055] To make the above and other purposes, features and advantages of this article more obvious and understandable, the following specifically enumerates preferred embodiments and cooperates with the attached drawings to make a detailed description as follows. Description of the Drawings
[0056] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of this article. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0057] Figure 1The figure shows a schematic diagram of the steps of an indoor temperature field prediction method based on a physics-informed graph neural network provided by the embodiments herein;
[0058] Figure 2 The figure shows a schematic diagram of the overall process of the method provided herein;
[0059] Figure 3 The figure shows a schematic diagram of the steps of the FLUENT simulation model provided herein;
[0060] Figure 4 The figure shows a schematic diagram of the working of the processor module in the graph neural network model herein;
[0061] Figure 5 The figure shows a schematic diagram of the temperature field visualization herein;
[0062] Figure 6 The figure shows a comparison graph of the temperature field prediction results for the test set, showing the rolling prediction errors of the true values and the predicted values at all nodes at different time steps;
[0063] Figure 7 The figure shows a comparison graph of the prediction results of the temperature field nodes in an embodiment herein;
[0064] Figure 8 The figure shows a comparison graph of the prediction results of the temperature field nodes in an embodiment herein;
[0065] Figure 9 The figure shows a schematic diagram of the structure of an indoor temperature field prediction device based on a physics-informed graph neural network provided by the embodiments herein;
[0066] Figure 10 The figure shows a schematic diagram of the structure of a computer device provided by the embodiments herein.
[0067] Explanation of the reference signs in the drawings:
[0068] 910, Flow field data acquisition module; 920, Graph structure construction module; 930, Feature extraction module; 940, Spatiotemporal dynamic processing module; 950, Prediction module. Detailed implementation manners
[0069] Next, the technical solutions in the embodiments herein will be clearly and completely described in conjunction with the accompanying drawings in the embodiments herein. Obviously, the described embodiments are only a part of the embodiments herein, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments herein without creative efforts shall fall within the scope of protection herein.
[0070] It should be noted that the terms "first", "second", etc. in the description, claims and the above drawings of this article are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0071] In the prior art, the application of deep learning technology in the field of fluid dynamics has been gradually increasing. Especially, the graph neural network (GNN) performs excellently in dealing with non-Euclidean data structures. GNN can capture the complex relationships between nodes through the graph structure and is suitable for processing unstructured grid data. Compared with traditional machine learning methods, GNN can directly process unstructured grid data without complex feature engineering and has significant advantages in dealing with complex spatial and temporal dependencies. Therefore, how to combine GNN with CFD to propose an efficient and accurate temperature field prediction method has become a hot issue in current research.
[0072] To solve the above problems, the embodiments of this article provide an indoor temperature field prediction method based on physics-informed graph neural network, which can improve the efficiency and accuracy of indoor temperature field prediction. Figure 1 FIG. is a schematic diagram of the steps of an indoor temperature field prediction method based on physics-informed graph neural network provided by the embodiments of this article. This specification provides the method operation steps as described in the embodiments or flowcharts, but based on routine or non-creative labor, it may include more or fewer operation steps. The step order listed in the embodiments is only one way among the execution orders of numerous steps and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or executed in parallel. Specifically, as Figure 1 shown, the method may include:
[0073] S101: Using a temperature field simulation model, obtain multiple indoor flow field data based on a preset time interval, where the flow field data includes the temperature distribution at different positions in the room, the pressure field and velocity field of air flow;
[0074] S102: Perform graph structure transformation on the indoor flow field data to obtain multiple graph structure data;
[0075] S103: Use the encoder in the graph neural network model to extract features from each graph structure data, and obtain the feature vectors of nodes and edges in each graph structure data;
[0076] S104: Use the processor in the graph neural network model to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data, and obtain the spatio-temporal dynamic change data of the indoor flow field;
[0077] S105: Use the decoder in the graph neural network model to perform mapping processing on the spatio-temporal dynamic change data of the indoor flow field, so as to obtain the temperature change situation at the next moment indoors.
[0078] It can be understood that although traditional CFD simulations can accurately obtain temperature distributions, they are time-consuming and resource-intensive in calculation and difficult to meet the real-time prediction requirements; traditional machine learning methods have poor capabilities in processing unstructured grid data and limited prediction effects. The embodiments of this specification innovatively combine CFD simulations with GNNs to give full play to the advantages of both. CFD simulations provide high-precision basic data, and GNNs, relying on their ability to process graph structure data, can efficiently capture the complex spatio-temporal features of the temperature field. Through this combination, rapid and accurate prediction of the indoor temperature field can be achieved. Accurate temperature field prediction results can help optimize the operation strategies of air conditioning systems, such as intelligently adjusting the operation mode and temperature setting of air conditioners, thereby reducing unnecessary energy consumption, effectively reducing building energy consumption while improving indoor comfort, and providing practical solutions for the cause of building energy conservation.
[0079] Such as Figure 2 shown, which is the overall process schematic of the method provided by the embodiments of this specification.
[0080] The specific implementation process is as follows:
[0081] 1. Construction and preprocessing of the indoor temperature field dataset
[0082] The embodiments of this specification can use the FLUENT simulation model as the temperature field simulation model. As Figure 3 shown, it shows the indoor temperature field data generation process based on the FLUENT simulation model. By building a fluid simulation model of the indoor temperature field, performing numerical simulation calculations, and outputting the flow field data (including physical quantities such as pressure, temperature, and velocity) at a finite number of moments at fixed time intervals, and using it to construct a multivariate physical feature time series dataset. The specific steps are as follows:
[0083] Based on the FLUENT simulation model, generate the original data of the indoor temperature field. The simulation model solves the Navier-Stokes equations and energy equations to simulate the indoor air flow and heat transfer processes. The simulation results are output as flow field data at fixed time intervals, including the following physical quantities:
[0084] Temperature: Reflects the temperature distribution in each area of the room;
[0085] Pressure: Reflects the pressure field of air flow;
[0086] Velocity: Reflects the velocity field of air flow (including components in the x and y directions).
[0087] These physical quantities are stored in the form of grid nodes. Each node contains temperature, pressure, and velocity information at each time step, forming multivariate physical feature time series data.
[0088] Among them, the density of grid nodes can be determined according to the indoor space environment, such as the size, use of the room, or the temperature granularity to be predicted, etc.
[0089] In the embodiments of this specification, the conversion of the indoor flow field data into graph structure data includes:
[0090] Define the node features and edge features of the graph structure data. Among them, the node features include the air flow temperature, pressure, and velocity at the spatial position of the node, and the edge features represent the relative displacement and transfer coefficient between nodes;
[0091] Determine the node types at different spatial positions in the room according to the node features and boundary conditions. The node types at least include inflow nodes, outflow nodes, and wall nodes;
[0092] Generate initial graph structure data according to the node types, edge features at different spatial positions, and the indoor flow field data at each acquisition time;
[0093] Normalize the initial graph structure data to obtain graph structure data under the same dimension.
[0094] That is to say, in order to convert unstructured CFD grid data into graph structure, define the relationship between nodes and edges:
[0095] Node: Represents discrete points in space. Each node contains physical features such as temperature, pressure, and velocity;
[0096] Edge: Represents the heat transfer relationship between nodes. The features of the edge include the relative displacement and heat transfer coefficient between nodes.
[0097] By constructing a graph structure, represent the spatial relationship of the temperature field as graph data that can be processed by a graph neural network, which is convenient for subsequent model training and prediction.
[0098] The classification and calibration of node physical features For node physical features, pre-define node types (such as inflow nodes, outflow nodes, wall nodes, etc.), and complete the classification and calibration work. The specific steps are as follows:
[0099] Node classification: Nodes are classified into different types according to their physical locations and boundary conditions. For example, an inflow node represents a node near the air outlet of an air conditioner, an outflow node represents a node near the return air outlet, and a wall node represents a node near a wall or an obstacle.
[0100] Feature calibration: Standardize the physical features of each node to ensure that the data is in the same dimension. For example, normalize temperature, pressure, and velocity to the interval [0, 1] respectively to reduce numerical instability during model training.
[0101] Through the above steps, an indoor temperature field dataset containing multi - physical features, graph - structure representation, and node classification is constructed, providing a high - quality data basis for subsequent graph neural network model training and prediction.
[0102] 2. Construct a neural network model for rapid prediction of the temperature field
[0103] In the simulation of the indoor temperature field, although unstructured grid data can flexibly adapt to the complex shape of the indoor space, traditional methods are difficult to process. In the present invention, it is converted into a graph structure (setting spatial discrete points as nodes and defining the heat transfer relationship between nodes as edges). With the powerful graph data processing ability of the graph neural network, encoding, processing, and decoding operations are performed on the temperature field data to achieve accurate prediction of the temperature field at multiple moments, providing a strong basis for subsequent air - conditioning system regulation. At the same time, a grid - based graph neural network designed to capture the correlation between grid data and flow - field spatio - temporal data can extract the spatial features of the temperature field and promote the learning of fluid dynamics simulation.
[0104] Use the encoder in the graph neural network model to extract features from each graph - structure data, and obtain the feature vectors of nodes and edges in each graph - structure data, including:
[0105] Calculate the relative displacement vector between the two nodes at both ends of each edge;
[0106] Use a multi - layer perceptron to map the node features of each node and the relative displacement vector between the two nodes at both ends of each edge respectively, and obtain the feature vectors of each node and each edge.
[0107] Specifically, the encoder plays a crucial preprocessing role throughout the model. First, it constructs multiple graph structures, comprehensively and meticulously converting the temperature field data into graphs to ensure the complete representation of the spatial and heat transfer relationships in the data. Then, it calculates the relative displacement vectors between nodes, which contain information about the position differences between nodes, and encodes them as edge features, further enriching the attributes of the edges. Finally, leveraging the powerful non-linear mapping ability of the multi-layer perceptron (MLP), it maps the features of nodes and edges into 128-dimensional latent vectors, preparing for the in-depth processing of subsequent processors and effectively enhancing the model's ability to extract and represent temperature field features.
[0108] The specific steps are as follows:
[0109] Step 1: Construct multiple graph structures and convert the temperature field data into graphs;
[0110] Step 2: Calculate the relative displacement vectors between nodes and encode them as edge features;
[0111] Step 3: Use a multi-layer perceptron (MLP) to map the features of nodes and edges into latent vectors. The specific formula is as follows:
[0112] v i = φ v (x i ) = MLP v (x i ) (1)
[0113] e ij = φ e (r ij ) = MLP e (r ij ) (2)
[0114] where, v i represents the feature vector of node i, e ij represents the edge feature vector between node i and node j, x i represents the original feature of node i, and r ij represents the relative displacement vector between node i and node j.
[0115] Finally, the temperature field grid data generated by the CFD simulation is converted into a graph structure, where nodes represent discrete points in space and edges represent the heat transfer relationships between nodes. The feature vector of each node includes physical quantities such as temperature, pressure, and velocity, and the feature vector of the edge includes the relative displacement and heat transfer coefficient between nodes.
[0116] 1. In the embodiments of this specification, the processor in the graph neural network model is used to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data to obtain the spatio-temporal dynamic change data of the indoor flow field, including:
[0117] Based on the feature vectors of the nodes at both ends of each edge, the feature vector of the edge, and the global attributes, using a multi-layer perceptron, calculate the updated feature vector of the edge;
[0118] Based on the updated feature vector of each edge, determine the set of updated feature vectors of all the edges connected to each node;
[0119] Perform an aggregation process on the set of feature vectors to obtain the aggregated edge feature vector of each node;
[0120] Based on the current feature vector of each edge, the aggregated edge feature vector, and the global data, use a multi-layer perceptron to update the feature vector of the node;
[0121] Based on the updated feature vectors of each node and each edge, obtain the updated global edge features and global node features;
[0122] Based on the updated global edge features and global node features, and the current global attributes, obtain the updated global attributes.
[0123] Specifically, the processor uses a message passing mechanism to deeply mine the spatio-temporal dynamic changes of the temperature field. When updating the attributes of the edge, through a specific MLP function, comprehensively consider the features of the current edge, the features of the nodes at both ends of the edge, and the global attribute features, and accurately calculate the heat transfer relationship between the nodes. Then, aggregate the edge information of each node, integrate the updated information of all the edges connected to the node, and update the state of the node to capture the temperature changes in the local area. In addition, update the global attributes through a multi-layer perceptron (MLP), grasp the change trend of the temperature field from the overall level, so that the model can better adapt to the dynamic changes of the temperature field, improve the accuracy and stability of the prediction. The processor module process is as Figure 4 shown, demonstrating message passing through the use of CG blocks.
[0124] The specific steps include:
[0125] Step 1: Update the attributes of the edge and calculate the heat transfer relationship between the nodes;
[0126]
[0127] where e ij represents the edge feature between node i and node j, and represent the feature vectors of node i and node j respectively, and u represents the global attribute. The function Ψ e is a multi-layer perceptron (MLP) used to update the feature of the edge, comprehensively considering the feature of the current edge, the features of the two end nodes, and the global attribute.
[0128] Step 2: Create a new edge set, aggregate the edge information of each node, and update the status of the node;
[0129]
[0130] This formula represents creating a set E of all edges connected to node i i ′, where r k and s k represent the starting point and ending point of the edge respectively.
[0131]
[0132] This formula represents aggregating all edge features of node i to generate the aggregated edge feature of node i N i represents the number of neighbor nodes of node i.
[0133]
[0134] This formula represents using the multi-layer perceptron Ψ v to update the feature vector v′ of node i i , taking into account the aggregated edge features, the current node features, and the global attributes.
[0135] Step 3: Create an updated node set and an updated edge set, update the global attributes, and capture the overall change trend of the temperature field.
[0136]
[0137] This formula represents creating an updated set V′ of node features.
[0138]
[0139] This formula represents creating an updated set E′ of edge features, where e′ ij is the updated edge feature, r k and s k represent the starting point and ending point of the edge respectively.
[0140]
[0141] This formula represents globally aggregating the updated set E′ of edge features to generate the global edge feature
[0142]
[0143] This formula represents globally aggregating the updated set V′ of node features to generate the global node feature
[0144]
[0145] This formula represents updating the global attributes, where, e′ ij represents the updated edge features, and vi′ represents the updated node features.
[0146] Through these steps, the processor module can effectively capture the spatio-temporal dynamic changes of the temperature field, ensuring that the model can accurately predict the future temperature distribution.
[0147] In the embodiments of this specification, the decoder in the graph neural network model is used to map the spatio-temporal dynamic change data of the indoor flow field to obtain the temperature change situation at the next moment in the room, including:
[0148] Using a multi-layer perceptron to map the feature vector of each updated node to a temperature change value;
[0149] According to the temperature change value of each node, using an Euler integrator to predict the temperature of each node at the next moment, obtaining the temperature situation of all nodes in the room.
[0150] Specifically, the decoder is a key link in converting the processed graph structure data into the actual temperature field prediction result. It first uses a multi-layer perceptron (MLP) to map the latent features of the nodes to temperature change values, and these change values reflect the change trend of the node temperature at future moments. Then, with the help of an Euler integrator, according to the state of the current temperature field and the calculated temperature change values, the state of the temperature field is updated, thereby predicting the temperature distribution at the next moment, providing intuitive and practically valuable temperature prediction information for users.
[0151] The specific steps include:
[0152] Step 1: Use a multi-layer perceptron to map the node features to temperature change values;
[0153] Step 2: Update the state of the temperature field through an Euler integrator to predict the temperature distribution at the next moment. The specific formula is as follows:
[0154]
[0155] Where, represents the temperature of node i at the next moment, represents the temperature of node i at the current moment, p i represents the temperature change value of node i, Φ v represents the mapping function of the decoder.
[0156] In the embodiments of this specification, the graph neural network model is trained through the following steps:
[0157] Constructing an initial graph neural network model, wherein the initial graph neural network model includes an encoder, a processor, and a decoder;
[0158] Obtain indoor temperature field data collected at multiple time intervals as a training set;
[0159] Using the training set to predict the initial graph neural network model, obtain the prediction data of the next collection time corresponding to each time collection time;
[0160] According to the predicted data at the next collection moment and the actual temperature field data, training is performed in combination with the preset physical information loss function to obtain a graph neural network model that achieves the optimization goal.
[0161] It can be understood that in the data-driven method, the loss function calculates the error by comparing the difference between the training target and the output, that is, calculating the mean square error between the predicted temperature and the actual temperature. However, relying solely on the data-driven loss function may cause the model to overfit and ignore the laws of physics. To this end, the present invention introduces a physical information loss function to ensure that the model not only fits the data, but also follows the laws of physics.
[0162] The core idea of the physical information loss function is to add physical constraints to the loss function so that the model prediction not only meets the data fitting requirements but also conforms to the actual physical behavior. In thermodynamics, the gradient of the temperature field is an important feature to describe the change of temperature space. The more drastic the temperature change, the larger the gradient; conversely, when the temperature changes slowly, the gradient is smaller. Therefore, the smoothness of the temperature field is closely related to the size of its gradient.
[0163] Based on this physical property, the present invention designs a physical loss function to measure the smoothness of the temperature field by calculating the gradient of the temperature field. Specifically, the discrete difference method is used to calculate the gradient of the temperature in the x and y directions, and the sum of the squares of the gradients is used as a measure of the smoothness of the temperature field. This loss term is intended to guide the model to generate a temperature field that is both in line with physical laws and well distributed in space.
[0164] The formula of the physical information loss function is as follows:
[0165]
[0166] Among them, L phy represents the physical drive loss function, and Represents the spatial gradient of temperature.
[0167] In the embodiment of this specification, the predicted flow field data and target flow field data in the room at the next moment are obtained, and the target flow field data is the data that is preset and expected to be achieved;
[0168] Set different color identifications according to the preset flow field data and the corresponding range of the target flow field data;
[0169] Dynamically display the predicted flow field data and the target flow field data at each moment on the display interface.
[0170] It can be understood that in order to enable users to more intuitively understand the change of the temperature field, the present invention adopts advanced triangulation and interpolation techniques. Extract key simulation results and coordinates from the Pickle file containing predicted and target values, use the triangulation technique of Matplotlib to smoothly visualize the data on an irregular grid, and highlight the variable intensity through the jet color scheme to enhance the visualization effect. At the same time, combine custom functions with OpenCV to generate a motion video, compare the predicted and target flow fields, and can also dynamically adjust the color scale to ensure consistency between frames, facilitating users to observe the change differences of the temperature field at different moments, and providing an intuitive reference for analyzing and optimizing the operation of the air conditioning system. An example diagram of the visualization is as Figure 5 shown.
[0171] The specific formula is as follows:
[0172]
[0173] where, T ij represents the interpolated temperature value, and T k represents the temperature value of node k.
[0174] The embodiments of this specification provide a set of indoor temperature field prediction methods and systems based on physics-informed graph neural networks, aiming to solve the key problems in the current building energy conservation field. The present invention has significant advantages and effects. In terms of prediction accuracy, through the in-depth mining of complex temperature field data by GNN and the combination of a physics-informed loss function, the prediction accuracy is effectively improved. The experimental results show that the prediction error is significantly lower than that of traditional methods, and the changing trend of indoor temperature can be accurately grasped. In terms of computational efficiency, compared with traditional CFD simulations, the present invention significantly shortens the computational time, and the computational speed is increased by about 80%, which enables the system to achieve near-real-time prediction and provide a basis for regulating the air conditioning system in a timely manner. In addition, the invention enhances the adaptability of the system to complex indoor environments, can effectively process unstructured grid data, and has good application prospects in the optimization of air conditioning systems in different types of buildings, which helps to promote the development of building energy conservation towards intelligence and high efficiency.
[0175] Exemplarily, the embodiments of this specification also provide a specific implementation process of an indoor temperature field prediction method based on physics-informed graph neural networks:
[0176] 1. Data preparation
[0177] Use ANSYS Fluent software to perform CFD simulation on the office temperature field and generate temperature field data. The specific steps are as follows:
[0178] CFD simulation settings: First, establish a three-dimensional geometric model of the office, set boundary conditions (such as walls, windows, air conditioner outlets, etc.), and generate an unstructured computational grid. And ensure that the grid has a high resolution in key areas (such as near air conditioner outlets and heat sources).
[0179] CFD solution: Use the finite volume method (FVM) to solve the Navier-Stokes equations and simulate the temperature field distribution in the office.
[0180] Data conversion: Convert the grid data output by CFD into a graph structure. Nodes represent discrete points in space, and edges represent the heat transfer relationship between nodes. The feature vector of each node includes physical quantities such as temperature, pressure, and velocity, and the feature vector of the edge includes the relative displacement and heat transfer coefficient between nodes.
[0181] 2. Model training
[0182] Use Python and the PyTorch framework to implement a graph neural network model. The specific steps are as follows:
[0183] Data division: Divide the temperature field data into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the prediction performance of the model.
[0184] Model construction: Construct a graph neural network model, including an encoder, a processor, and a decoder. The encoder is responsible for converting the temperature field grid data into a graph structure and encoding the features of nodes and edges; the processor updates the features of nodes and edges through a message passing mechanism to capture the spatio-temporal dynamic changes of the temperature field; the decoder converts the processed graph structure data into the prediction results of the temperature field.
[0185] Model training: During the training process, the optimization goal is to minimize the loss function until the loss function of the training sample data set no longer decreases, and a trained neural network model is obtained.
[0186] 3. Model prediction
[0187] In the test stage, input the initial temperature field data and predict the temperature distribution at future times through the graph neural network model. The specific steps are as follows:
[0188] Input data: Input the known continuous finite number of flow field information at equal time intervals into the trained neural network model. The input data is a four-dimensional matrix, and the meaning of the matrix is: sequence number × number of channels × height × width, where the sequence number corresponds to the number of multi-time flow fields, the number of channels corresponds to the number of variables in the multi-variable flow field, and the height and width correspond to the size of the two-dimensional flow field.
[0189] Rolling prediction: Through the rolling prediction technique, the temperature field changes at multiple time steps are gradually predicted. After each prediction, the prediction result is used as the input for the next time step, and the temperature field distribution at future times is gradually generated. The rolling prediction error is as Figure 6 shown.
[0190] 4. Result evaluation
[0191] Use metrics such as RMSE and MAE to evaluate the prediction performance of the model. The specific steps are as follows:
[0192] Error calculation: Calculate in detail the error between the predicted values and the true values of 3894 nodes to evaluate the prediction accuracy of the model. The comparison of the prediction results of the temperature field nodes is as Figure 7 and Figure 8 shown.
[0193] Time comparison: Compare the calculation times of the CFD simulation and the GNN model.
[0194] The experimental results show that the method proposed in the present invention is superior to traditional CFD simulations and other machine learning methods in terms of prediction accuracy and computational efficiency.
[0195] The present invention proposes an indoor temperature field prediction method and system based on a physics-informed graph neural network. By combining CFD simulation with GNN and combining a physics-informed loss function, fast and accurate prediction of the indoor temperature field is achieved. The experimental results show that this method is superior to traditional CFD simulations and other machine learning methods in terms of prediction accuracy and computational efficiency, and has broad application prospects.
[0196] Based on the above-provided method, an embodiment of this specification further provides an indoor temperature field prediction device based on a physics-informed graph neural network. The device includes:
[0197] A flow field data acquisition module 910, configured to use a temperature field simulation model to acquire multiple indoor flow field data based on a preset time interval. The flow field data includes the temperature distribution at different positions in the room, the pressure field, and the velocity field of air flow;
[0198] A graph structure construction module 920, configured to perform graph structure transformation on the indoor flow field data to obtain multiple graph structure data;
[0199] A feature extraction module 930, configured to use an encoder in the graph neural network model to extract features from each graph structure data, and obtain the feature vectors of the nodes and edges in each graph structure data;
[0200] A spatio-temporal dynamic processing module 940, configured to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data by using a processor in a graph neural network model, so as to obtain spatio-temporal dynamic change data of the indoor flow field;
[0201] A prediction module 950, configured to perform mapping processing on the spatio-temporal dynamic change data of the indoor flow field by using a decoder in the graph neural network model, so as to obtain the temperature change condition at the next moment in the room.
[0202] The beneficial effects obtained by the above device are the same as those obtained by the above method, and the embodiments of this specification will not be elaborated.
[0203] In another embodiment, this article also provides an indoor temperature field prediction system based on a physics-informed graph neural network. The system includes:
[0204] A temperature adjustment device, configured to adjust the indoor temperature;
[0205] A controller, configured to execute the indoor temperature field prediction method based on the physics-informed graph neural network to obtain the real-time temperature adjustment condition of the temperature adjustment device.
[0206] This embodiment provides a computer device, and its internal structure diagram can be as Figure 10 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection.
[0207] Those skilled in the art can understand that Figure 10 the structure shown in
[0208] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0209] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0210] In one embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the steps in the above method embodiments.
[0211] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0212] It should also be understood that in the embodiments herein, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0213] Those of ordinary skill in the art will realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this article.
[0214] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0215] In the several embodiments provided in this article, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can also be electrical, mechanical, or other forms of connection.
[0216] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments in this article.
[0217] Specific embodiments are used in this article to elaborate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the method and its core idea of this article; at the same time, for those of ordinary skill in the art, based on the idea of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be construed as a limitation to this article.
Claims
1. A method for predicting indoor temperature field based on physical information graph neural network, characterized in that: The method comprises: Using a temperature field simulation model, a plurality of indoor flow field data based on a preset time interval are obtained, wherein the flow field data includes temperature distribution at different positions indoors, pressure field and velocity field of air flow; Performing graph structure conversion on the indoor flow field data to obtain a plurality of graph structure data; Use the encoder in the graph neural network model to extract features from each graph structure data and obtain feature vectors of nodes and edges in each graph structure data; The processor in the graph neural network model is used to dynamically process the feature vectors of nodes and edges in multiple graph structure data to obtain the spatiotemporal dynamic change data of the indoor flow field; The decoder in the graph neural network model is used to map the spatiotemporal dynamic change data of the indoor flow field to obtain the temperature change at the next moment in the room.
2. The method according to claim 1, characterized in that The graph structure conversion is performed on the indoor flow field data to obtain a plurality of graph structure data, including: Defining node features and edge features of graph structure data, wherein the node features include airflow temperature, pressure and velocity at the spatial position of the node, and the edge features represent the relative displacement and transfer coefficient between nodes; Determine the node types at different indoor spatial positions according to node characteristics and boundary conditions, wherein the node types at least include inflow nodes, outflow nodes and wall nodes; Generate initial graph structure data according to the node types and edge features at different spatial locations and the indoor flow field data at each acquisition time; The initial graph structure data is normalized to obtain graph structure data in the same dimension.
3. The method according to claim 1, characterized in that The encoder in the graph neural network model is used to extract features from each graph structure data to obtain feature vectors of nodes and edges in each graph structure data, including: Calculate the relative displacement vector between the nodes at both ends of each edge; A multi-layer perceptron is used to map the node features of each node and the relative displacement vector between the nodes at both ends of each edge to obtain the feature vectors of each node and each edge.
4. The method according to claim 3, characterized in that The processor in the graph neural network model is used to dynamically process the feature vectors of nodes and edges in multiple graph structure data to obtain the spatiotemporal dynamic change data of the indoor flow field, including: According to the feature vectors of the nodes at both ends of each edge, the feature vector of the edge and the global attribute, a multi-layer perceptron is used to calculate an updated feature vector of the edge; According to the updated feature vector of each edge, determine the updated feature vector set of all edges connected to each node; Aggregating the feature vector set to obtain an aggregated edge feature vector of each node; Update the feature vector of the node using a multi-layer perceptron according to the current feature vector of each edge, the aggregated edge feature vector and the global data; According to the updated feature vectors of each node and each edge, an updated global edge feature and a global node feature are obtained; According to the updated global edge features and global node features, and the current global attributes, an updated global attribute is obtained.
5. The method according to claim 1, characterized in that The decoder in the graph neural network model is used to map the spatiotemporal dynamic change data of the indoor flow field to obtain the temperature change at the next moment in the room, including: A multi-layer perceptron is used to map the updated feature vector of each node to a temperature change value; According to the temperature change value of each node, the Euler integrator is used to predict the temperature of each node at the next moment to obtain the temperature conditions of all nodes in the room.
6. The method according to claim 1, characterized in that The graph neural network model is trained through the following steps: Constructing an initial graph neural network model, wherein the initial graph neural network model includes an encoder, a processor, and a decoder; Obtain indoor temperature field data collected at multiple time intervals as a training set; Using the training set to predict the initial graph neural network model, obtain the prediction data of the next collection time corresponding to each time collection time; According to the predicted data at the next collection moment and the actual temperature field data, training is performed in combination with the preset physical information loss function to obtain a graph neural network model that achieves the optimization goal.
7. The method according to claim 6, characterized in that The preset physical information loss function is expressed by the following formula: Among them, L phy represents the physical drive loss function, and Represents the spatial gradient of temperature, where x and y are the horizontal and vertical axes of the spatial coordinate system, respectively.
8. The method according to claim 1, characterized in that The method further comprises: Obtaining predicted flow field data and target flow field data in the room at the next moment, wherein the target flow field data is the data that is expected to be achieved in advance; Setting different color identifiers according to the interval ranges corresponding to the preset flow field data and the target flow field data; The predicted flow field data and target flow field data at each moment are dynamically displayed on the display interface.
9. An indoor temperature field prediction device based on physical information graph neural network, characterized in that: The device comprises: A flow field data acquisition module, used to acquire a plurality of indoor flow field data based on a preset time interval using a temperature field simulation model, wherein the flow field data includes temperature distribution at different indoor locations, pressure field and velocity field of air flow; A graph structure building module, used for performing graph structure conversion on the indoor flow field data to obtain a plurality of graph structure data; A feature extraction module is used to extract features from each graph structure data using the encoder in the graph neural network model to obtain feature vectors of nodes and edges in each graph structure data; The spatiotemporal dynamic processing module is used to use the processor in the graph neural network model to perform dynamic feature processing on the feature vectors of nodes and edges in multiple graph structure data to obtain the spatiotemporal dynamic change data of the indoor flow field; The prediction module is used to use the decoder in the graph neural network model to map the spatiotemporal dynamic change data of the indoor flow field to obtain the temperature change at the next moment in the room.
10. An indoor temperature field prediction system based on physical information graph neural network, characterized in that: The system comprises: Temperature regulating equipment, used to regulate indoor temperature; A controller is used to execute the indoor temperature field prediction method based on physical information graph neural network as described in any one of claims 1 to 8 to obtain the real-time temperature adjustment status of the temperature adjustment device.
Citation Information
Cited By
Cryoablation temperature prediction method and device, electronic equipment and storage medium
CN120549608A