A constant-temperature load dynamic modeling method based on federated learning and domain knowledge enhancement

By employing federated learning and domain knowledge enhancement methods, a unified data structure and boundary enhancement samples for the hot water system are constructed, resolving the conflict between privacy protection and model sharing in multi-site collaborative modeling. This improves the prediction accuracy and robustness of the model under extreme conditions and achieves efficient knowledge transfer and physical consistency across sites.

CN120995427BActive Publication Date: 2026-01-27NANJING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511517141.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-27
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing dynamic modeling methods for constant temperature loads present a contradiction between data privacy protection and model sharing in multi-site collaborative modeling scenarios. They also suffer from insufficient physical consistency of the models, making it difficult to adapt to diverse building scenarios and complex operating conditions. Furthermore, they lack generalization ability in high-frequency heat load prediction and extreme operating conditions.

Method used

By employing a federated learning and domain knowledge enhancement approach, a unified data structure for multi-site hot water systems is constructed. Hot water usage cycle features are extracted, boundary enhancement samples are generated, and a perceptual regression model is built by combining thermodynamic boundary conditions. This enables cross-site collaborative modeling while ensuring privacy and improving the model's predictive ability under extreme conditions.

Benefits of technology

This approach enhances the model's generalization ability and physical consistency while protecting user privacy, addressing the issues of insufficient model applicability and accuracy in existing technologies, and improving the prediction accuracy and robustness of hot water systems under extreme conditions and long-term prediction tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995427B_ABST
    Figure CN120995427B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of intelligent building energy efficiency management, and discloses a constant-temperature load dynamic modeling method based on federated learning and domain knowledge enhancement, which collects hot water system operation data through multi-site sensors to construct structured modeling input; generates boundary enhancement samples by using physical boundary characteristics; designs a neural network model embedded with domain knowledge and integrates a physical constraint mechanism; realizes multi-client collaborative training and model aggregation by using a federated learning framework, and improves the model generalization ability and privacy protection level. The present application realizes high-precision temperature prediction and energy consumption modeling of multi-site hot water systems under the premise of protecting user data privacy, and solves the problems of poor physical consistency, low modeling precision and difficult data sharing in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent building energy efficiency management technology, specifically relating to a dynamic modeling method for constant temperature load based on federated learning and domain knowledge enhancement. Background Technology

[0002] In the field of intelligent building energy efficiency management, constant temperature load dynamic modeling technology is a key method for achieving precise control and energy-saving optimization of hot water systems. It aims to accurately model and control building heat load by constructing mathematical models that can predict the temperature change patterns in the hot water system. This technology typically utilizes sensor observation data, physical knowledge, and advanced machine learning algorithms to comprehensively characterize the operating characteristics of the hot water system under different usage conditions, providing data support for energy-saving optimization and operational decisions of building energy systems. In recent years, with the continuous improvement of the refinement and intelligence of building energy consumption management, constant temperature load modeling technology has received widespread attention. However, traditional modeling methods face many bottlenecks: on the one hand, relying on single-site data or physical formulas makes it difficult to adapt to diverse building scenarios and complex operating conditions, limiting the model's applicability and generalization ability; on the other hand, in multi-site collaborative modeling scenarios, the contradiction between data privacy protection and model sharing is prominent, and the lack of a deep integration mechanism between physical laws and data-driven approaches makes it difficult for the model to balance accuracy and physical consistency.

[0003] In response, research has been conducted on related technologies, primarily focusing on the following three aspects: First, the development of federated learning and privacy protection mechanisms, aiming to address privacy and security issues in multi-site data sharing. For example, patent application CN202411685234.4 discloses a federated learning attack prevention method that, through aggregation node clock synchronization, network latency control, and VDF verification mechanisms, effectively improves the robustness of the model aggregation process while ensuring the security of the training process, thus solving the problem of verifying the authenticity and timeliness of model parameters in federated learning. Second, the optimization of intelligent control modeling methods in building and energy systems, aiming to improve load forecasting accuracy and system control efficiency. For example, patent application CN202211612922.9 discloses a heat station load prediction and optimization control method based on distributed machine learning, which significantly enhances the accuracy of heat load prediction by training local models through edge computing devices and effectively solves the problems of scattered data and untimely updates in multi-site heat systems; thirdly, innovations in comprehensive scheduling and energy efficiency optimization strategies based on reinforcement learning to cope with the challenges of parameter uncertainty in complex systems, such as a low-carbon energy optimization method for building clusters based on reinforcement learning proposed in patent application CN202411283136.8, which solves the modeling difficulties caused by parameter uncertainty in energy regulation of clustered buildings.

[0004] Despite the breakthroughs achieved in the aforementioned technologies, current research on dynamic modeling of isothermal loads still has the following shortcomings:

[0005] First, existing federated learning mechanisms focus on protecting model parameter privacy and improving update methods, but fail to fully integrate the internal thermodynamic mechanisms of physical systems for modeling, resulting in insufficient physical consistency of the model and difficulty in accurately adapting to the nonlinear heat exchange laws in the operation of hot water systems. In practical applications, prediction bias is likely to occur.

[0006] Second, most building or energy regulation methods focus on system-level energy efficiency optimization or control strategy formulation, neglecting structured modeling and targeted learning of isothermal heat release processes under dynamic time scales. This results in limited application of the models in tasks such as high-frequency heat load prediction, making it difficult to meet the needs of regulation implementation.

[0007] Third, existing multi-site model training methods are mainly data-driven and do not fully incorporate sample augmentation strategies guided by physical laws. This results in insufficient generalization ability of the model in extreme working conditions or sparse data regions. In particular, there is a significant lack in the mechanism for sharing knowledge among multi-source systems, which makes it impossible to achieve efficient knowledge transfer across scenarios and systems. This restricts the large-scale application of constant temperature load dynamic modeling technology in complex building energy systems. Summary of the Invention

[0008] To address the aforementioned technical issues, this invention provides a dynamic modeling method for isothermal loads based on federated learning and domain knowledge enhancement. This method aims to achieve mid-level water temperature prediction modeling for multi-site hot water systems, improving the model's generalization ability and physical consistency while protecting user privacy.

[0009] The present invention discloses a dynamic modeling method for isothermal load based on federated learning and domain knowledge enhancement, comprising the following steps:

[0010] Step S1: Data acquisition and preprocessing;

[0011] Step S101: Data acquisition for multi-site hot water system;

[0012] For multi-site hot water supply systems, a unified observation data structure is constructed for subsequent modeling tasks. By connecting to the hot water system sensor interface at each hot water supply station, three key variables are continuously collected from the system: water temperature in the middle of the hot water tank... Hot water flow rate and the on / off status of the heat pump , This indicates whether the heat pump is in a closed or open state.

[0013] To achieve a unified data representation, the above observation data are organized into triples, and a multidimensional time series dataset with cross-time and site indexes is constructed:

[0014] ,

[0015] in, Indicates time Hot water stations The observation vector; This represents the total sample time step. This represents the total number of observation stations.

[0016] Step S102: Data cleaning and anomaly removal;

[0017] For missing data, the following processing strategy is adopted: when the length of consecutive missing data exceeds a preset threshold... For short-term breaks, samples within the corresponding time period are directly deleted; for short-term breaks, linear interpolation is used to fill in the missing values ​​based on data characteristics. If the missing value is located within... and The interpolation result is expressed using the following expression:

[0018] ,

[0019] in, This represents the observation vector at the current time point to be interpolated; Indicates the observation vector at the starting point of the interpolation window; This represents the observation vector at the end of the interpolation window; Indicates the start time of the interpolation window; Indicates the end time of the interpolation window;

[0020] Outlier detection is based on a defined valid range for variables, and the sampled data must simultaneously meet the following constraints:

[0021] ,

[0022] in, This represents the lower limit of the effective temperature range for the water temperature in the central region. This represents the upper limit of the effective temperature range for the water temperature in the central region. Indicates the maximum permissible outflow rate;

[0023] After completing the above processing, a cleaned dataset with consistent structure and complete data is obtained. :

[0024] .

[0025] Step S103: Feature extraction and structured modeling input construction;

[0026] The heat release cycle during hot water use is identified using a sliding window or a state-switching-based strategy. The heat release cycle is defined as the period when the heat pump shuts down (…). And the outflow rate The continuous time period. Within each heat release cycle, three core characteristic quantities are extracted: the initial temperature of the hot water usage cycle. (This refers to the start time of the cycle) Value), actual cumulative water discharge within the period (For all moments in this period) (cumulative sum) and duration of hot water heat release ; The calculation method is to multiply the period length by the sampling time interval. ,Right now:

[0027] ,

[0028] The regression target of the model is set as the mid-water temperature at the end of each cycle. Based on this, training samples are constructed, where the input feature vector is:

[0029] ,

[0030] in, Indicates the tag value;

[0031] The total number of samples is This forms a complete supervised learning sample set:

[0032] ,

[0033] in, Represents the characteristic matrix; Represents a label vector; Indicates the sample index number. ;

[0034] The above structured dataset As a direct input for model training and prediction, it possesses stable dimensions and explicit semantic information.

[0035] Step S104: Generation of boundary thermodynamic enhancement samples;

[0036] Based on the physical properties of the hot water system, the system exhibits stable thermodynamic boundary behavior under extreme conditions: when the cumulative water output... As the temperature approaches infinity, the water temperature in the middle of the terminal section approaches the replenishment temperature. When the heat release lasts for a period of time As the water temperature approaches infinity, the water temperature in the middle of the terminal section tends to approach the ambient temperature. .

[0037] Based on this, enhancement rules are designed for each real sample. Construct two sets of boundary-enhanced samples.

[0038] Under the scenario of extreme increase in water volume, Replace with the set maximum water volume ,Keep and The label remains unchanged, and is set to the system water replenishment temperature. The augmented sample is obtained:

[0039] ,

[0040] In the time-limited augmentation scenario, Replace with maximum heat release time ,Keep and Keep it unchanged, and set the label to ambient temperature. The augmented sample is obtained:

[0041] ,

[0042] Perform a union operation between all augmented samples and the original samples to construct the expanded training dataset as follows:

[0043] ,

[0044] in, and These represent the sets of all water volume-limited augmentation samples and time-limited augmentation samples, respectively. and This is the set of its corresponding tag values; This represents the expanded training feature set; This represents the expanded training label set.

[0045] The aforementioned boundary enhancement strategy ensures that the model has the ability to express data in the boundary region of the data distribution, supporting its robust inference ability under unknown operating conditions.

[0046] Step S2: Construction of the augmented perceptual regression model;

[0047] The "boundary enhancement perception mechanism" refers to a combined strategy that integrates physical knowledge and data-driven models, aiming to improve the predictive ability of regression models under the physical boundary conditions of hot water systems. This mechanism consists of two core components:

[0048] (1) Boundary sample augmentation strategy (see step S104): By analyzing the extreme behavior of the hot water system, construct a sample that reflects the maximum output water volume. Duration of maximum heat release Samples in the specified circumstances, and assign them corresponding labels. Expand the training dataset;

[0049] (2) Design of the perceptual regression model (see step S202): In the process of training the regression model, the above-mentioned enhanced samples are introduced to guide the model to learn the physical boundary behavior through data-driven methods, thereby ensuring that its prediction results in the sparse data region have physical consistency.

[0050] Based on boundary enhancement sample set A neural network regression architecture suitable for modeling the nonlinear behavior of hot water systems was constructed, and a corresponding training configuration scheme was established. This model, by introducing enhanced samples reflecting boundary states, achieves modeling and perception capabilities regarding the physical boundary conditions of the hot water system, thereby improving the model's expressive power and physical consistency under extreme conditions.

[0051] Step S201: Input structure definition and modeling target setting;

[0052] The expanded training sample set consists of the original observation data and two types of boundary augmentation samples, with each input sample having a three-dimensional feature vector. . This represents the midpoint water temperature measurement at the start of the cycle. Cumulative hot water consumption (including actual observed values) With the limit of water volume enhancement value ), Duration of continuous heat release (including the original duration) With time limit enhancement value The regression target is the mid-water temperature at the end of the cycle. The modeling task aims to train a nonlinear mapping function. Its mathematical description is:

[0053] ,

[0054] in, This indicates the predicted end temperature of the cycle; This represents the modeling error term that is independent and identically distributed; This represents the nonlinear mapping function to be learned.

[0055] Step S202: Neural network architecture design and physical constraint integration;

[0056] Mapping function A five-layer feedforward neural network structure was used. To achieve approximation, each layer of the design meets specific functional requirements.

[0057] Input layer Receive three-dimensional feature vectors Standardization layer For the input features, perform a normalization transformation based on the statistical properties of the training set. The standardization operation for 3D features is defined as follows:

[0058] ,

[0059] in, Indicates the first 3D features in the training set The mean of the values; This represents the corresponding standard deviation; This represents the standardized feature value.

[0060] The standardized feature matrix is ​​obtained after standardization:

[0061] ,

[0062] in, Indicates the first The standardized feature vector of each sample; This represents the total number of samples in the expanded sample set; this standardized feature matrix serves as the direct input for subsequent model training.

[0063] Hidden layer and Each module is configured with 128 neurons, and the ReLU activation function is used to introduce the necessary nonlinear expressive power.

[0064] ,

[0065] Both hidden layers are applied Regularization techniques, with regularization coefficients set to... This is to suppress model overfitting. Output layer Using a single-node linear structure, predicted values ​​are directly generated. .

[0066] The boundary enhancement perception mechanism is implemented through the integration of boundary samples constructed in step S104, enabling the model to learn the following physical constraint behavior patterns: when At that time, the predicted output converges to the system makeup water temperature. ;when At that time, the predicted output converges to the ambient temperature. This mechanism ensures that the model maintains physical consistency in sparse data boundary regions.

[0067] The loss function is defined as:

[0068] ,

[0069] in, Indicates the first The size of a small batch of samples; This represents the sample index in a mini-batch; Represents the actual label value; Indicates the model's predicted value; Represents the set of all learnable parameters; This represents the squared L2 norm of the parameter; This represents the regularization strength coefficient; This represents the j-th mini-batch sample drawn from the complete dataset.

[0070] Step S3: Model training and optimization iteration;

[0071] Step S301: Neural network model initialization and centralized benchmark training;

[0072] The construction of an augmented perceptual regression model requires establishing a reasonable initial state and completing centralized benchmark training to provide a performance reference for subsequent federated learning. This is based on a standardized feature matrix. and label vector The Xavier initialization strategy is used to initialize the neural network parameter vector. Configure the weight matrix. The initialization follows the principle of normal distribution:

[0073] ,

[0074] in, Indicates the input dimension of this layer; Indicates the output dimension; This represents a normal distribution.

[0075] Model training employs the Adam optimizer to perform a centralized learning process, with the parameter update mechanism based on the gradient descent rule.

[0076] ,

[0077] in, Indicates the learning rate; Represents the loss function; This represents the gradient of the loss function with respect to the parameters.

[0078] The training process continues until the maximum number of iterations is reached or the validation loss converges, ultimately generating centralized optimal parameters. .

[0079] Step S302: Federated learning environment construction and collaborative training;

[0080] The establishment of a distributed collaborative training framework requires configuring a multi-client environment and implementing a distributed learning mechanism for parameter optimization. The system defines a set of clients. Each client c maintains a local dataset. , It is the local feature data of client c. It is the local tag data of client c.

[0081] During the initialization phase of the global model, the system uses the optimal model parameters obtained through centralized training. Instead of using traditional random initialization, this initialization method serves as the starting point. This method improves the convergence speed and model performance of federated training by fully utilizing prior data structures and boundary augmentation information. The initial parameter settings for the global model follow these guidelines:

[0082] ,

[0083] in, Indicates the initial parameters of the global model; This represents the optimal parameters of the pre-trained centralized model.

[0084] The federated training process employs an iterative communication mechanism to achieve distributed parameter optimization. In the... During round-robin communication iterations, the central server will send the current global parameters. The global parameters are broadcast synchronously to all participating client nodes. Each client receives the global parameters and uses them as the initialization state of its local model. Subsequently, the client performs a local training process based on its private dataset, through continuous... The gradient descent algorithm in this round optimizes and updates the model parameters. Local parameter updates follow the standard gradient descent rules:

[0085] ,

[0086] in, Indicates the client In the Local model parameters in round-robin communication; Indicates data from the client's local dataset A small batch of training samples randomly selected from the data; This represents the loss function based on local data; This indicates the number of iterations during local training.

[0087] When each client completes its reservation After a round of local training, updated model parameters will be obtained. This data is then transmitted back to the central server. After collecting parameter updates from all clients, the server executes a federated average aggregation algorithm to generate new global model parameters through a weighted average. The aggregation process uses weighted calculations based on the proportion of data volume from each client.

[0088] ,

[0089] in, Indicates the first Global model parameters after round aggregation; This indicates the number of training samples owned by client c; This represents the total number of training samples across all clients. Indicates that client c is in the... The local model parameters after the first round of training.

[0090] Through the above iterative process, the system outputs the global model parameters optimized by federated aggregation. This parameter integrates the local knowledge of each client without directly accessing the original training data, achieving the goal of collaborative learning while protecting privacy.

[0091] Step S303: Federated training convergence determination and optimal model output;

[0092] The training process monitoring mechanism needs to determine the optimal stopping point and output the final federated model. The system implements a dual termination condition judgment framework, whereby the maximum number of communication rounds is reached. Forced shutdown is executed upon execution. Simultaneously, a verification error change monitoring mechanism is established:

[0093] ,

[0094] in, This represents the convergence tolerance threshold; k represents the historical window length. This represents the mean absolute error of the validation set in the r-th round;

[0095] The system terminates the training process and outputs the final federated model parameters when any of the termination conditions are met.

[0096] ,

[0097] in, Indicates the communication round in which the termination condition is met; This represents the parameters of the optimal federated model.

[0098] Based on the optimal parameter configuration, a federated augmented perception regression model is constructed:

[0099] ,

[0100] in, This represents the complete federated training model; This represents a neural network mapping function configured with optimal federated parameters.

[0101] Step S4: Federated Enhancement Model Evaluation and Physical Consistency Verification;

[0102] Step S401: Multi-dimensional performance evaluation and quantification of innovation effects;

[0103] The comprehensive evaluation system for the federated enhanced perception regression model covers three core dimensions: accuracy, physical consistency, and privacy protection capabilities. The evaluation process employs a differentiated testing strategy, using site-level test sets. Quantify local accuracy performance using a global joint test set Verify cross-site generalization capabilities and enhance the test set through boundary checks. To test the effectiveness of physical constraint learning.

[0104] The innovative contributions of the federated learning framework are demonstrated through privacy-preserving efficiency indicators. Conduct a quantitative assessment:

[0105] ,

[0106] in, This represents the mean absolute error of intensive training. This represents the mean absolute error of the federated training.

[0107] The innovative effect of boundary reinforcement strategies improves metrics through physical consistency. Conduct quantitative assessment:

[0108] ,

[0109] in, This indicates the number of times the baseline model violates physical constraints on the boundary test set; This indicates the number of violations in the augmentation model.

[0110] Step S402: Robustness verification of fused physical constraints;

[0111] The model robustness verification process uses thermodynamic boundary conditions as the verification benchmark, focusing on verifying the effectiveness of the boundary reinforcement strategy under extreme conditions. This is based on the trained federated model. The verification framework covers two boundary conditions: water volume limit condition and time limit condition.

[0112] Water volume limit conditions Physical consistency verification is achieved through the following limiting conditions:

[0113] ,

[0114] Time Limit Conditions The physical constraint verification adopts the following limit form:

[0115] ,

[0116] in, Indicates the water replenishment temperature; Indicates ambient temperature; Indicates the maximum cumulative water output; This indicates the duration of maximum heat release.

[0117] Sensitivity analysis is achieved by constructing a response stability quantification matrix for input variables. The application follows a Gaussian distribution The random perturbation is calculated, and the variance characteristics of the predicted output are determined:

[0118] ,

[0119] in, This represents the model prediction under noisy input conditions. This represents the expected value. By comparing and analyzing the prediction variance distribution of the model before and after boundary enhancement, the contribution of the boundary enhancement strategy to the model's robustness is quantitatively evaluated, and the effectiveness of the enhancement strategy in improving model stability is verified.

[0120] The beneficial effects of this invention are as follows:

[0121] 1) Based on the boundary thermodynamic enhancement mechanism, this invention constructs physical boundary samples under water volume and time limits, explicitly guides the neural network to learn the physical constraint behavior of the hot water system under extreme conditions, realizes the physical consistency of the model prediction under boundary conditions, effectively solves the problem of insufficient physical rationality caused by the lack of thermodynamic boundary modeling in the prior art, and improves the model's inference ability in sparse data regions and prediction robustness under extreme conditions.

[0122] 2) Based on the federated learning framework, this invention aggregates the modeling knowledge of each site without sharing the original data by constructing a multi-client collaborative training process, thereby realizing distributed collaborative modeling of the hot water system across sites and ensuring user privacy and data security. At the same time, the federated average aggregation strategy effectively integrates the features of multi-source data, improves the generalization ability of the model under diverse hot water usage behaviors, and solves the problem of insufficient adaptability of existing modeling techniques in processing heterogeneous data from multiple sites.

[0123] 3) This invention is based on a domain knowledge enhancement modeling strategy. By embedding the operating mechanism and physical prior information of the hot water system into the feature extraction and model architecture, the model can maintain data-driven learning capabilities while having higher interpretability and learning efficiency. This solves the problem of high training difficulty and slow convergence caused by relying on pure data training in existing federated learning methods, and further enhances the usability and maintainability of the model in actual deployment.

[0124] 4) This invention establishes a constant temperature load modeling method with physical consistency and wide adaptability on the basis of protecting privacy. It overcomes the shortcomings of traditional methods in terms of physical rationality, data security and multi-source generalization ability, and significantly improves the dynamic energy efficiency prediction and operation optimization capabilities of intelligent building hot water systems. It has good engineering application and promotion value. Attached Figure Description

[0125] Figure 1 This is a flowchart of the method described in this invention;

[0126] Figure 2 To enhance the impact of data volume on global error;

[0127] Figure 3 A distribution map of training and test set data for each site;

[0128] Figure 4 Performance metrics for a centralized learning black-box model;

[0129] Figure 5 Performance metrics for federated learning black-box models;

[0130] Figure 6 A graph showing the temperature distribution of the water storage tank along the height under different hot water consumption levels (centralized learning).

[0131] Figure 7 A graph showing the temperature distribution of the water tank along the height under different reheating cycles (centralized learning).

[0132] Figure 8 A graph showing the temperature distribution of the water tank along the height under different hot water consumption levels (Federated Learning).

[0133] Figure 9 The distribution of water tank temperature along the height under different reheating cycles (Federated Learning). Detailed Implementation

[0134] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0135] like Figure 1As shown, the present invention provides a dynamic modeling method for isothermal loads based on federated learning and domain knowledge enhancement, aiming to solve the problem of protecting user privacy while improving the prediction accuracy of isothermal loads in a distributed environment. The method includes the following steps:

[0136] Step S1: Based on the original observation data of the hot water system in multiple hot water supply stations, construct a multi-dimensional time series dataset, preprocess the dataset, extract the hot water usage cycle characteristics, design physical boundary enhancement rules based on the physical boundary characteristics of the hot water system, and generate a boundary enhancement sample set containing real and enhanced samples.

[0137] Step S2: Based on the boundary augmentation sample set, construct an augmented perception regression model suitable for hot water systems. By introducing augmented samples under boundary conditions for training, improve the model's expressive power and consistency under physical boundary conditions.

[0138] Step S3: Adopt a centralized-fed hybrid training strategy. Initial parameters are obtained through centralized data, and then global model parameters are obtained through federated averaging algorithm and multiple rounds of communication iteration optimization.

[0139] Step S4: Evaluate the prediction accuracy, physical consistency, and robustness of the enhanced perception regression model on a multi-level sample set, and quantitatively analyze the privacy protection effect and physical consistency through indicators.

[0140] The method described in this invention is implemented in a Python programming environment and experimentally simulated and analyzed using the MATLAB / Simulink platform. The centralized model is built and trained using MATLAB's Deep Learning Toolbox, while the federated learning experiment employs a distributed computing framework integrated with MATLAB. Experimental data originates from a real-world pilot site in the Netherlands, comprising dozens of near-zero-energy buildings, each equipped with an air-source heat pump for space heating and to provide domestic hot water to a 200L hot water buffer. Data from three sensors were used in the experiment: a temperature sensor installed in the middle of the hot water tank, a flow meter measuring hot water consumption, and a sensor indicating the heat pump's operating mode. This data was sampled at a 15-minute time resolution, forming the basic dataset for this embodiment. By comparing the performance of different learning methods (centralized learning and federated learning) and with or without the introduction of domain knowledge (black-box model and gray-box model) under different data volume conditions, the effectiveness of the method described in this invention in improving model prediction accuracy while protecting user privacy is verified.

[0141] Figure 2 The global mean absolute error distributions of collaborative learning and federated learning models are shown under different data augmentation ratios (0.0, 0.5, 1.0, 2.0). From... Figure 2It is evident that when the data augmentation ratio is 0%, both learning models exhibit high error values ​​and greater error fluctuations, especially the federated learning model, which shows a staggering error rate of [missing value]. The extreme error values ​​are on the order of magnitude. As the data augmentation ratio increases to 0.5 or higher, the error values ​​of both learning modes significantly decrease and tend to stabilize, with the global mean absolute error for most data points decreasing to [amount missing]. The data augmentation ratio of 1.0 yielded the best results, and increasing it to 2.0 did not significantly reduce the error. This verifies that in the domain knowledge injection model, The optimal ratio of augmented samples to real samples is the best choice, which can effectively balance model training efficiency and prediction accuracy.

[0142] Figure 3 This shows the data partitioning across six different sites, with each site's data divided into a training set and a test set. From Figure 3 As can be seen, all sites adopted a similar data partitioning strategy, with approximately 90% of the data used for model training and 10% for model testing. Site 1 had a training set of approximately 90% and a test set of approximately 10%; sites 2 through 6 maintained a similar distribution. This data partitioning method conforms to the commonly used training-test data splitting principle in machine learning, helping to ensure the reliability of model evaluation.

[0143] Figure 4 This paper demonstrates the trends of three performance metrics of black-box models in a centralized learning environment as a function of time and the number of agents. Figure 4 In the text, (a) represents the site error. Figure 4 In the diagram, (b) represents the global error. Figure 4 In the diagram, (c) represents the domain error. This shows the performance trends of the three error metrics as time increases (from 7 weeks to 112 weeks) and the number of agents increases (from 1 to 64). Each curve represents the performance of a fixed number of agents over a given data collection period. In a centralized learning environment, model performance improves rapidly with increasing data volume, and increasing the number of agents has almost the same effect as increasing the amount of data per agent, as represented by the isopleths on the diagonal. This indicates that in a centralized learning framework, increasing the number of agents has a similar effect on improving model performance as increasing the amount of data per agent.

[0144] Figure 5 This paper demonstrates the trends of three performance metrics of a black-box model in a federated learning environment as a function of time and the number of agents. Figure 5 In the text, (a) represents the site error. Figure 5 In the diagram, (b) represents the global error. Figure 4 In this context, (c) represents the neighborhood error. From... Figure 5 As can be seen, all three error metrics show a decreasing trend with increasing time (from 7 weeks to 112 weeks) and the increase in the number of agents (from 1 to 64), indicating an improvement in model performance. Particularly when the number of agents is small (1-4), the error decrease is more significant with time; however, when the number of agents reaches a higher level (32-64), the performance improvement tends to plateau, and the error values ​​at different time points gradually converge. This demonstrates that although the performance improvement effect under the federated learning framework is not as significant as centralized learning, as the amount of data approaches its asymptotic value, the federated model can eventually converge to an error level similar to that of the centralized model, while ensuring that user data privacy is not shared, providing an effective alternative for application scenarios requiring privacy protection.

[0145] Figure 6 The distribution of temperature variation with height inside the water tank under different hot water consumption conditions (0 liters, 50 liters, 100 liters, 180 liters) is shown. Figure 6 The solid line represents the prediction results of the model with domain knowledge enhancement (BB), and the dashed line represents the prediction results of the model without domain knowledge enhancement (GB). It can be observed that as hot water consumption increases, the overall temperature inside the water tank decreases, especially in the high-temperature area at the top. The prediction results of the two models (BB and GB) are similar, indicating that under the centralized learning framework, domain knowledge has a limited impact on temperature distribution prediction. The red shaded area (<20°C) represents the infeasible area, which all prediction curves effectively avoid. This result shows that in a centralized learning environment, even without introducing domain knowledge, the model can capture the impact of hot water consumption on the temperature distribution of the water tank well. This may be because centralized learning can acquire complete data from all sites, thus learning a more comprehensive set of data distribution characteristics.

[0146] Figure 7 The distribution of temperature variation with altitude within the water tank is shown under different reheating cycles (0 days, 1 day, 7 days, and 30 days). As the reheating cycle lengthens, the overall temperature within the water tank shows a significant downward trend, especially at higher water levels. A slight difference exists in the prediction results between the model with domain knowledge enhancement (BB) and the model without domain knowledge enhancement (GB), primarily in the long-cycle (7 days and 30 days) cases. This indicates that domain knowledge may offer some advantages in simulating long-term dynamic heat loss, but its overall impact remains limited. The red shaded area (<20°C) marks the infeasible temperature region, which all prediction curves appropriately avoid. This result further confirms that under a centralized learning framework, domain knowledge enhancement has limited impact on model performance, especially with sufficient data.

[0147] Figure 8This study illustrates the temperature distribution within a water tank as a function of height under different hot water consumption conditions (0 L, 50 L, 100 L, 180 L). Among the models trained using federated learning, there are significant differences in prediction results between the model with domain knowledge enhancement (FL-BB) and the model without domain knowledge enhancement (FL-GB). As hot water consumption increases, the temperature stratification within the tank becomes more pronounced, with the temperature difference between the top and bottom gradually decreasing. Particularly under high hot water consumption (180 L), the prediction difference between the two models is most significant, demonstrating the crucial impact of domain knowledge on the model's prediction accuracy under complex operating conditions. The red shaded area (<20°C) represents unsuitable temperature regions, while the blue shaded area represents suitable temperature ranges. This result indicates that in federated learning scenarios, incorporating domain knowledge can help the model better capture thermodynamic behavior under extreme conditions, improving the model's prediction accuracy and reliability.

[0148] Figure 9 This study illustrates the temperature distribution within the water tank as a function of altitude under different reheating cycles (0 days, 1 day, 7 days, and 30 days). In the model trained using federated learning, the overall tank temperature decreases with increasing reheating intervals, and the prediction difference between the model with domain knowledge enhancement (FL-BB) and the model without domain knowledge enhancement (FL-GB) gradually widens. Particularly in the case of prolonged non-heating (30 days), the prediction results of the two models differ significantly, and their prediction trends are even opposite, indicating that the introduction of domain knowledge is crucial for long-term prediction tasks. Red shading areas (<20°C) represent unsuitable temperature regions, while blue shading areas represent suitable temperature ranges. This result demonstrates that in a federated learning environment, the introduction of domain knowledge helps the model better understand the physical processes of heat loss, improving the accuracy and reliability of predictions. In long-term prediction tasks, the improvement in model performance through the introduction of domain knowledge is even more significant.

[0149] The experimental results of this embodiment demonstrate that the dynamic modeling method for isothermal loads based on federated learning and domain knowledge enhancement proposed in this invention can significantly improve model performance in extreme conditions and long-term prediction tasks while protecting user privacy, through the introduction of domain knowledge. When data volume is limited, the improvement in federated learning model performance through domain knowledge enhancement is even more pronounced, providing an effective solution for finding a balance between protecting user privacy and improving model performance in practical applications.

[0150] The above description is merely a preferred embodiment of the present invention and is not intended to further limit the present invention. All equivalent changes made based on the description and drawings of the present invention are within the protection scope of the present invention.

Claims

1. A dynamic modeling method for isothermal load based on federated learning and domain knowledge enhancement, characterized in that, Includes the following steps: Step S1: Based on the original observation data of the hot water system in multiple hot water supply stations, construct a multi-dimensional time series dataset, preprocess the dataset, extract the hot water usage cycle characteristics, design physical boundary enhancement rules based on the physical boundary characteristics of the hot water system, and generate a boundary enhancement sample set containing real samples and enhanced samples. Step S2: Based on the boundary augmentation sample set, construct an augmented perception regression model suitable for hot water systems. By introducing augmented samples under boundary conditions for training, improve the model's expressive power and consistency under physical boundary conditions. Step S3: Adopt a centralized-fed hybrid training strategy. Initial parameters are obtained through centralized data, and then global model parameters are obtained through federated averaging algorithm and multiple rounds of communication iteration optimization. Step S4: Evaluate the prediction accuracy, physical consistency, and robustness of the enhanced perception regression model on a multi-level sample set, and quantitatively analyze the privacy protection effect and physical consistency through indicators.

2. The method for dynamic modeling of isothermal load based on federated learning and domain knowledge enhancement according to claim 1, characterized in that, In step S1, the multidimensional time series dataset It consists of observation vectors from multiple hot water supply stations, each observation vector being represented as... ,satisfy: , in, The observation vector represents time t and hot water station s; This represents the total sample time step. This represents the total number of monitoring stations for the hot water system. This indicates the water temperature in the middle of the hot water tank. Indicates the hot water output flow rate. This indicates the status of the heat pump.

3. The method for dynamic modeling of isothermal load based on federated learning and domain knowledge enhancement according to claim 2, characterized in that, In step S1, the extracted hot water usage cycle characteristics include: the initial water temperature of the hot water usage cycle. Actual cumulative water output during the cycle and duration of heat release from hot water Construct training samples, with the input feature vector as follows: , Obtain the complete supervised learning sample set: , Where X represents the original training feature set; y represents the label set; N represents the total number of samples; and i represents the sample index number. ; Based on the thermodynamic boundary characteristics during the operation of the hot water system, a boundary enhancement sample set is constructed, including: 1) Constructing a sample under the limiting enhancement condition of water volume: , 2) Constructing samples under time-limited augmentation conditions: , The final expanded training set is obtained through a union operation: , in, This is the maximum allowable flow rate of the hot water system. The maximum time threshold, To adjust the water supply temperature for the hot water system For ambient temperature, , and , These are two types of augmented samples and their label sets, respectively.

4. The method for dynamic modeling of isothermal load based on federated learning and domain knowledge enhancement according to claim 3, characterized in that, In step S2, the constructed augmented perception regression model adopts a five-layer feedforward neural network structure. ,in, For the input layer, For normalization layer, and As a hidden layer, For output layer; , in, This represents the size of the j-th mini-batch; This represents the sample index in a mini-batch; Represents the actual label value; Indicates the model's predicted value; Represents the set of all learnable parameters; This represents the squared L2 norm of the parameter; This represents the regularization strength coefficient; This represents the first sample extracted from the complete dataset. A small batch of samples; This represents the standardized feature matrix obtained after processing by the normalization layer.

5. The method for dynamic modeling of isothermal load based on federated learning and domain knowledge enhancement according to claim 4, characterized in that, In step S3, a centralized-fed hybrid training strategy is used for training, including: (1) Based on the extended training set By optimizing the loss function Initial model parameters are obtained using a centralized training method. ; (2) Initialize the parameters of the federated global model as follows: Then, using this as a starting point, the subsequent federated averaging algorithm is trained to finally obtain the aggregated global model parameters: , in, Indicates the first Global model parameters after round aggregation; This indicates the number of training samples that client c possesses; This represents the total number of training samples across all clients. Indicates that client c is in the first... The local model parameters after the first round of training; C represents the total number of clients.

6. The method for dynamic modeling of isothermal load based on federated learning and domain knowledge enhancement according to claim 5, characterized in that, In step S3, the federated training termination decision is based on reaching the maximum number of communication rounds. Or the verification error converges, where the convergence criterion for the verification error is: , in, This represents the convergence tolerance threshold; k represents the historical window length. This represents the mean absolute error of the validation set in the r-th round; The hot water system terminates its training process and outputs the final federated model parameters when any of the termination conditions are met. , in, Indicates the communication round in which the termination condition is met; Indicates the parameters of the optimal federated model; Based on the optimal parameter configuration, a federated augmented perception regression model is constructed: , in, This represents the complete federated training model; This represents a neural network mapping function configured with optimal federated parameters.

7. The method for dynamic modeling of isothermal load based on federated learning and domain knowledge enhancement according to claim 1, characterized in that, In step S4, a site-level test set is constructed. Global Joint Test Set With boundary enhancement test set The localization accuracy, cross-site generalization ability, and physical consistency of the federated enhancement model were evaluated, and the privacy protection efficiency index was used to assess these aspects. Physical consistency improvement index For quantitative analysis, the formulas are expressed as follows: , , in, This represents the mean absolute error of intensive training. This represents the mean absolute error of the federated training. This indicates the number of times the baseline model violates physical constraints on the boundary test set; This indicates the number of violations in the augmentation model.

Citation Information

Patent Citations

  • Heating station load prediction and optimization control method based on distributed machine learning

    CN116306911A

  • Federal learning attack prevention method, system and device and storage medium

    CN119276630A

  • Low-carbon building cluster energy management optimization method and system based on reinforcement learning

    CN119359496A

  • Heat supply pipe network water loss diagnosis method based on federal transfer learning

    CN117312945A

  • Layered contrast anti-fact learning method and system oriented to visual question and answer model

    CN119166795A