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

By combining distributed machine learning and federated learning technologies with edge computing and cloud collaboration, a load prediction model for heating stations was constructed, which solved the problems of data privacy leakage and insufficient prediction accuracy, and achieved efficient and accurate load prediction and optimized control of heating stations.

CN116306911BActive Publication Date: 2026-05-05HANGZHOU YINGJI POWER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU YINGJI POWER TECH CO LTD
Filing Date
2022-12-15
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies pose a risk of data privacy breaches in load forecasting for heating stations, and the accuracy and training speed of the forecasting models are insufficient, making it difficult to meet the stable operation requirements of heating systems.

Method used

By employing a distributed machine learning approach, combined with federated learning and edge-cloud collaboration technologies, local data processing and model training are performed through edge computing devices. Feature vectors are constructed using the load characteristics and time series characteristics of the heating station to establish a heat load prediction model. The model parameters are then aggregated in the cloud to avoid data uploading, thereby achieving accurate prediction and real-time control.

Benefits of technology

It improves the accuracy and communication efficiency of heat load forecasting, protects the data privacy of heating stations, avoids privacy and security issues, and maintains the efficient operation of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116306911B_ABST
    Figure CN116306911B_ABST
Patent Text Reader

Abstract

This invention discloses a method for load prediction and optimized control of heating stations based on distributed machine learning, comprising: setting up corresponding edge computing devices near multiple heating stations, constructing feature vectors based on the load characteristics and time series characteristics of the heating stations; a cloud server initially sets up a global heat load prediction network model and distributes it to each edge computing device; the edge computing devices use local data to train the heat load prediction network model to obtain a local heat load prediction network model; the cloud server aggregates the local heat load prediction network models of multiple edge computing devices, updates the global heat load prediction network model, and distributes it to each edge computing device; while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a secondary network supply water temperature prediction model is established, the setpoint of the secondary network supply water temperature is calculated, and the primary network regulating valve is adjusted to control the secondary heating network supply water temperature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart heating technology, specifically relating to a method for load prediction and optimization control of heating stations based on distributed machine learning. Background Technology

[0002] With my country's goal of building a resource-conserving society, centralized heating has gradually become the main heating method in northern China during winter. Centralized heating systems are complex in structure and exhibit characteristics such as nonlinearity, large time lag, large inertia, time variability, and uncertainty. Accurate heat load forecasting is essential to achieve on-demand heating, improve energy efficiency, and optimize heating control strategies. Therefore, based on the characteristics of heating systems, heat load forecasting and optimized control become particularly important.

[0003] Traditional methods rely on historical heat load data from heat exchange stations in the heating system, using machine learning to predict heat load and provide a theoretical basis for subsequent system operation and regulation, thereby improving the quality of heating network control. Machine learning methods have strong fitting capabilities and can fully reflect the nonlinear characteristics of heat load, providing reliable heat load data for the control system and effectively supporting heat load regulation. However, collecting, storing, and exchanging large amounts of real-time operational data from heating stations poses a serious risk of privacy breaches. Malicious attackers stealing real-time heating operation data can not only affect the privacy and security of heating stations but also cause irreversible damage to the heating system. Furthermore, accurate and rapid heat load prediction is crucial not only for the stable and normal operation of the heating system but also for its significant impact on the production and daily life of society as a whole. Therefore, solving the data leakage problem while ensuring the accuracy of the prediction model and improving the training speed of the model are urgent issues that need to be addressed.

[0004] Based on the above technical problems, a new method for load prediction and optimization control of heat stations based on distributed machine learning needs to be designed. Summary of the Invention

[0005] The technical problem this invention aims to solve is to overcome the shortcomings of existing technologies and provide a method for predicting and optimizing the load control of heat stations based on distributed machine learning. This method combines federated learning and edge-cloud collaboration technologies to build a prediction model, train the model locally, and perform federated aggregation. It utilizes additional features of time-series data for modeling, thereby enabling more accurate predictions of time-series data. Based on the heat station load characteristics and time-series characteristics, feature vectors are constructed for training the prediction model, improving the model's prediction accuracy. Furthermore, during the training of the heat load prediction network model, the federated learning training method only uploads the parameters of the training model, not the heat station's operating data. This method effectively protects the data privacy of the heat station, effectively avoiding privacy and security issues. At the same time, since no anonymization operation is performed on the training data, the availability of the data is not reduced. This improves communication efficiency, avoids privacy and security issues caused by data leakage, and the accuracy of model prediction is not reduced.

[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0007] This invention provides a method for load forecasting and optimal control of heating stations based on distributed machine learning. The method includes:

[0008] Step S1: Set up corresponding edge computing devices near multiple heating stations, acquire and preprocess the heat load impact dataset of the heating stations to obtain the heating station load sequence, extract additional features related to the time series, and construct feature vectors based on the heating station load features and time series features.

[0009] Step S2: The cloud server uses existing publicly available data to initialize a global heat load prediction network model and broadcasts it to each edge computing device in the federated learning system.

[0010] Step S3: Each edge computing device participating in the training uses local data to train the heat load prediction network model, obtains the local heat load prediction network model, and uploads it to the cloud server.

[0011] Step S4: The cloud server aggregates the local heat load prediction network models of multiple edge computing devices, updates the global heat load prediction network model, and distributes it to each edge computing device.

[0012] Step S5: Repeat steps S1-S4 until the model finally converges or reaches the training number of times. Obtain the load prediction value of each heating station through the global heat load prediction network model.

[0013] Step S6: Combining the load forecast values ​​of each heating station with the heat balance equation, and keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a secondary network water supply temperature prediction model is also established using a distributed machine learning method. The set value of the secondary network water supply temperature is calculated, and the primary network regulating valve is adjusted to control the secondary heating network water supply temperature, so that the actual water supply temperature can follow the set temperature value and achieve real-time control.

[0014] Furthermore, in step S1, after acquiring and preprocessing the heat load impact dataset of the heating station, a heat station load sequence is obtained, and additional time-series related features are extracted. The feature vector is constructed based on the heat station load features and time-series features, including:

[0015] Obtain the heat load impact dataset of the heating station, including the historical supply and return water temperatures, supply and return water flow rates, supply and return water pressures, heat load, and historical outdoor temperatures, outdoor wind speeds, and outdoor humidity.

[0016] After processing the missing data and outliers in the heat load impact dataset, wavelet packet decomposition and single-branch reconstruction are performed. Wavelet basis functions and decomposition degree are selected to obtain the decomposed low-frequency and high-frequency component sequences. Adaptive complete empirical mode decomposition is used to decompose the high-frequency components to obtain different IMF components. After normalizing both the low-frequency components and the IMF components, the heat station load sequence is obtained.

[0017] The importance of each feature in the load sequence of the heating station was calculated using the XGBoost model. Feature selection was then performed, and the more important load features were selected as the set of load features for the heating station.

[0018] Consider the month, hour, weekday, and holidays at time t as the time series feature set at time t;

[0019] The load characteristics of the heating station at time t are constituted by considering the load characteristics at time t, the time distance to time t, the load characteristics at the next time t, and the time distance to the next time t.

[0020] The load characteristics of the heating station at time t and the time series characteristics are combined to form a feature vector.

[0021] Furthermore, the heat load prediction network model employs a DeepAR autoregressive recurrent neural network, internally comprising an LSTM model and a likelihood module. The likelihood module structure design includes likelihood function selection, loss function determination, and input layer neuron number setting. The likelihood function includes a Gaussian likelihood function and a negative binomial likelihood function. The loss function is defined as: z represents the actual load of the heating station at the predicted time. The load value of the heating station at any time follows a Gaussian distribution, N~(μ, σ). 2), μ is the mean, and σ is the standard deviation; the number of neurons in the input layer is set according to the number of time feature sequences and the load value of the heating station at the previous time step; the LSTM model includes an input layer, hidden layers, and an output layer, an optimization algorithm, a loss function, and an activation function. The number of neurons in the input layer is determined according to the number of samplings of the heating station load sequence. The number of hidden layers and the number of neurons in the hidden layers are determined by continuously adjusting the parameters using the control variable method to select the optimal parameters. The output layer neurons output the load value of the heating station at the next time step, with a feature dimension of 1 and a number of neurons in the output layer of 1. The optimization algorithm adopts the Adam optimization algorithm. The loss function uses the mean square error to measure the difference between the predicted value and the true value. The activation function of the hidden layer is set to the sigmoid function, and the activation function of the output layer is set to the tanh function. The DeepAR autoregressive recurrent neural network model adopts a grid search algorithm to optimize the model hyperparameters in the hyperparameter space through exhaustive search to obtain the optimal DeepAR autoregressive recurrent neural network model.

[0022] Furthermore, in step S3, the local heat load prediction network model is trained using local data to obtain a local heat load prediction network model, including:

[0023] The feature vectors, including heat station load characteristics and time series characteristics, are used as local data and input into the LSTM model in the heat load prediction network model for training to obtain the output h. i,t =h(h i,t-1 ,z i,t-1 ,x i,t h is the hidden layer function, which is implemented using a multi-layer recurrent neural network, and the hidden layer function is parameterized by the parameter Θ; during training, at each time step t, h i,t-1 This represents the output state of the heat load prediction network model at the previous time step; z i,t-1 x represents the value at the previous time step from the starting point of the measurement, and x represents the observable data value at the last moment; i,t Let be the value of the load sequence i of the heating station at time step t, representing the network input state;

[0024] The Gaussian distribution parameters μ and σ of the time series at future time steps are calculated and expressed as:

[0025]

[0026]

[0027] and b is the likelihood layer weight matrix; μ and b σ This is the bias vector for the fully connected layer;

[0028] The Gaussian distribution is determined based on the Gaussian distribution parameters μ and σ. The quartile of the Gaussian distribution is then used as the predicted value z of the heat load sequence of the heating station at time t. i,t .

[0029] Furthermore, in step S4, the cloud server aggregates the local heat load prediction network models of multiple edge computing devices and updates the global heat load prediction network model, including:

[0030] The cloud server uses the FedAvg federated aggregation algorithm to perform weighted aggregation of local heat load prediction network models of multiple edge computing devices, and completes the update of weight and threshold parameters of the global heat load prediction network model.

[0031] The FedAvg federated aggregation algorithm performs model-weighted aggregation, as follows:

[0032]

[0033] W t and W t+1 These represent the weights and activation threshold vector parameters of the global heat load prediction network model in training rounds t and t+1, respectively; K is the number of heating stations; n is the total number of data samples from the K heating stations; n k The data sample size for heating station k; Here, g represents the weights and activation threshold vector parameters of the local heat load prediction network model for heat station k during the (t+1)th training round; η is the learning rate; g k Let be the gradient of the loss function of the local model of heat station k. L(·) is the loss function of the local heat load prediction network model, X k y is the input feature sequence of the local heat load prediction network model for heat station k. k w represents the actual heat load value of heating station k. k These are the weights and activation threshold vector parameters of the local heat load prediction network model for heat station k.

[0034] Furthermore, in step S6, combining the load forecast values ​​of each heating station and based on the heat balance equation, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a distributed machine learning method is used to establish a secondary network supply water temperature prediction model to calculate the setpoint for the secondary network supply water temperature, including:

[0035] The edge computing device combines the load forecast values ​​of the heating stations with the heat balance equation to obtain and preprocess the data set of the secondary network's supply water temperature impact, thereby obtaining the supply water temperature sequence and extracting additional features related to the time series, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant. The data set of the secondary network's supply water temperature impact includes the load forecast values ​​of each heating station, the return water temperature of the secondary network, the supply water temperature of the primary network, the return water temperature of the primary network, the flow rate of the primary network, the outdoor temperature, the outdoor wind speed, and the outdoor humidity.

[0036] The cloud server uses existing publicly available data to initialize a global secondary network water supply temperature prediction network model and broadcasts it to each edge computing device in the federated learning system.

[0037] Each edge computing device participating in the training uses local data to train the secondary network water supply temperature prediction network model, obtains a local secondary network water supply temperature prediction network model, and uploads it to the cloud server.

[0038] The cloud server aggregates the local secondary network water supply temperature prediction network model of multiple edge computing devices, updates the global secondary network water supply temperature prediction network model, and distributes it to each edge computing device.

[0039] Repeat the above process until the model finally converges or reaches the training iterations, and obtain the setpoint values ​​of the secondary network water supply temperature for each heating station through the global secondary network water supply temperature prediction network model.

[0040] Furthermore, the heating station load prediction and optimization control method also includes:

[0041] When a new heating station is added, a similar heating station is selected from the existing heating stations, and a transferable heat load prediction network model and a secondary network water supply temperature prediction network model are trained using data from the similar heating stations. Then, the heat load prediction network model and the secondary network water supply temperature prediction network model are further fine-tuned based on the operating data of the new heating station.

[0042] Furthermore, the selection of similar heating stations takes into account the service targets of the heating stations, their location and functions, the heat medium transported by the connected heating network, and the area supplied by the heating stations.

[0043] The process involves training a transferable heat load prediction network model and a secondary network water supply temperature prediction network model using data from similar heat stations: training a global heat load prediction network model and a secondary network water supply temperature prediction network model using data from similar heat stations, and then transferring the weights and activation threshold vector parameters of the trained models to the edge computing device corresponding to the new heat station.

[0044] The heat load prediction network model and the secondary network water supply temperature prediction network model are further fine-tuned based on the operating data of the new heating station: the weights and activation threshold vector parameters of the transferred model are used as the initial parameters for training the local federated model, and then the new gradient of the model is calculated using the local operating data of the new heating station to adjust the model parameters, thereby obtaining the local heat load prediction network model and the secondary network water supply temperature prediction network model of the new heating station.

[0045] Furthermore, when the cloud server and edge computing device transmit data, the sender encrypts the data before transmitting it to the receiver, and the receiver decrypts it to obtain the plaintext data. The cloud server and edge computing device are equipped with a cryptographic unit, which is pre-loaded with encryption and decryption algorithms, including at least symmetric encryption algorithms and asymmetric encryption algorithms.

[0046] The beneficial effects of this invention are:

[0047] This invention involves setting up corresponding edge computing devices near multiple heating stations to acquire and preprocess the heat load impact dataset of the heating stations, obtaining the heating station load sequence, and extracting additional time-series related features. Feature vectors are constructed based on the heating station load features and time-series features. A cloud server uses existing publicly available data to initialize a global heat load prediction network model and broadcasts it to each edge computing device in the federated learning system. Each edge computing device participating in the training uses local data to train its heat load prediction network model, obtaining a local heat load prediction network model, which is then uploaded to the cloud server. The cloud server aggregates the local heat load prediction network models from multiple edge computing devices, updates the global heat load prediction network model, and distributes it to each edge computing device. This process is repeated until the model finally converges or reaches the training iterations, obtaining the predicted load values ​​for each heating station through the global heat load prediction network model. Combining the predicted load values ​​of each heating station with the heat balance equation, and keeping the total flow rate of the heating system and the secondary network return water temperature constant, a distributed... The machine learning method also establishes a secondary network water supply temperature prediction model, calculates the setpoint for the secondary network water supply temperature, and adjusts the primary network regulating valve to control the secondary heating network water supply temperature, so that the actual water supply temperature can follow the setpoint, achieving real-time control. It can combine federated learning and edge-cloud collaboration technologies to build the prediction model, perform local training and federated aggregation, and utilize additional features of time-series data for modeling, thereby making more accurate predictions of time-series data. Based on the load characteristics of the heating station and time-series features, feature vectors are constructed for training the prediction model, improving prediction accuracy. Furthermore, during the training of the heat load prediction network model, the cloud server distributes the training task to various edge computing devices. Each edge computing device stores its corresponding historical operating data of the heating station. The final global heat load prediction network model is built by the cloud server. Throughout the model training process, the edge computing devices do not share each other's historical operating data of the heating stations, avoiding privacy leaks. Unlike traditional centralized training methods, federated learning only uploads the parameters of the training model instead of the operating data of the heat station. This method can effectively protect the data privacy of the heat station and avoid privacy and security issues. At the same time, since no anonymization operation is performed on the training data, the availability of the data is not reduced. This improves communication efficiency, avoids privacy and security issues caused by data leakage, and the accuracy of model prediction is not reduced.

[0048] Other features and advantages will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.

[0049] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0050] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0051] Figure 1 This is a schematic diagram of the process of a heat station load prediction and optimization control method based on distributed machine learning according to the present invention.

[0052] Figure 2 This is a schematic diagram of the DeepAR network structure of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Example 1

[0055] Figure 1 This is a schematic diagram of a heat station load prediction and optimization control method based on distributed machine learning, which is involved in this invention.

[0056] Figure 2 This is a schematic diagram of the DeepAR network structure involved in this invention.

[0057] like Figure 1 and 2 As shown in Embodiment 1, this embodiment provides a method for load prediction and optimization control of a heating station based on distributed machine learning. The method includes:

[0058] Step S1: Set up corresponding edge computing devices near multiple heating stations, acquire and preprocess the heat load impact dataset of the heating stations to obtain the heating station load sequence, extract additional features related to the time series, and construct feature vectors based on the heating station load features and time series features.

[0059] Step S2: The cloud server uses existing publicly available data to initialize a global heat load prediction network model and broadcasts it to each edge computing device in the federated learning system.

[0060] Step S3: Each edge computing device participating in the training uses local data to train the heat load prediction network model, obtains the local heat load prediction network model, and uploads it to the cloud server.

[0061] Step S4: The cloud server aggregates the local heat load prediction network models of multiple edge computing devices, updates the global heat load prediction network model, and distributes it to each edge computing device.

[0062] Step S5: Repeat steps S1-S4 until the model finally converges or reaches the training number of times. Obtain the load prediction value of each heating station through the global heat load prediction network model.

[0063] Step S6: Combining the load forecast values ​​of each heating station with the heat balance equation, and keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a secondary network water supply temperature prediction model is also established using a distributed machine learning method. The set value of the secondary network water supply temperature is calculated, and the primary network regulating valve is adjusted to control the secondary heating network water supply temperature, so that the actual water supply temperature can follow the set temperature value and achieve real-time control.

[0064] In this embodiment, in step S1, after acquiring and preprocessing the heat load impact dataset of the heating station to obtain the heating station load sequence, additional time-series related features are extracted, and a feature vector is constructed based on the heating station load features and time-series features, including:

[0065] Obtain the heat load impact dataset of the heating station, including the historical supply and return water temperatures, supply and return water flow rates, supply and return water pressures, heat load, and historical outdoor temperatures, outdoor wind speeds, and outdoor humidity.

[0066] After processing the missing data and outliers in the heat load impact dataset, wavelet packet decomposition and single-branch reconstruction are performed. Wavelet basis functions and decomposition degree are selected to obtain the decomposed low-frequency and high-frequency component sequences. Adaptive complete empirical mode decomposition is used to decompose the high-frequency components to obtain different IMF components. After normalizing both the low-frequency components and the IMF components, the heat station load sequence is obtained.

[0067] The importance of each feature in the load sequence of the heating station was calculated using the XGBoost model. Feature selection was then performed, and the more important load features were selected as the set of load features for the heating station.

[0068] Consider the month, hour, weekday, and holidays at time t as the time series feature set at time t;

[0069] The load characteristics of the heating station at time t are constituted by considering the load characteristics at time t, the time distance to time t, the load characteristics at the next time t, and the time distance to the next time t.

[0070] The load characteristics of the heating station at time t and the time series characteristics are combined to form a feature vector.

[0071] In this embodiment, the heat load prediction network model adopts a DeepAR autoregressive recurrent neural network, which includes an LSTM model and a likelihood module. The likelihood module structure design includes the selection of the likelihood function, the determination of the loss function, and the setting of the number of neurons in the input layer. The likelihood function includes a Gaussian likelihood function and a negative binomial likelihood function. The loss function is defined as: z represents the actual load of the heating station at the predicted time. The load value of the heating station at any time follows a Gaussian distribution, N~(μ, σ). 2 ), μ is the mean, and σ is the standard deviation; the number of neurons in the input layer is set according to the number of time feature sequences and the load value of the heating station at the previous time step; the LSTM model includes an input layer, hidden layers, and an output layer, an optimization algorithm, a loss function, and an activation function. The number of neurons in the input layer is determined according to the number of samplings of the heating station load sequence. The number of hidden layers and the number of neurons in the hidden layers are determined by continuously adjusting the parameters using the control variable method to select the optimal parameters. The output layer neurons output the load value of the heating station at the next time step, with a feature dimension of 1 and a number of neurons in the output layer of 1. The optimization algorithm adopts the Adam optimization algorithm. The loss function uses the mean square error to measure the difference between the predicted value and the true value. The activation function of the hidden layer is set to the sigmoid function, and the activation function of the output layer is set to the tanh function. The DeepAR autoregressive recurrent neural network model adopts a grid search algorithm to optimize the model hyperparameters in the hyperparameter space through exhaustive search to obtain the optimal DeepAR autoregressive recurrent neural network model.

[0072] It's important to note that the heat load of a heating station is significantly influenced by users' daily routines and habits, which in turn are affected by time factors. Clearly, the heat load used during the day for work and outdoor activities is less, while the heat load used at night for sleeping and resting is greater. Similarly, the heat load demand on weekends differs from that on weekdays. Furthermore, the heat load demand during holidays such as the Spring Festival and Mid-Autumn Festival also differs from usual. These time factors increase the complexity of heating station heat load forecasting and are crucial for achieving accurate forecasts. Therefore, the DeepAR model is introduced to predict the heat load of heating stations. The DeepAR model can utilize additional features of time-series data for modeling, thereby enabling more accurate predictions of time-series data.

[0073] In this embodiment, step S3, training the heat load prediction network model using local data to obtain a local heat load prediction network model, includes:

[0074] The feature vectors, including heat station load characteristics and time series characteristics, are used as local data and input into the LSTM model in the heat load prediction network model for training to obtain the output h. i,t =h(h i,t-1 ,z i,t-1 ,x i,t h is the hidden layer function, which is implemented using a multi-layer recurrent neural network, and the hidden layer function is parameterized by the parameter Θ; during training, at each time step t, h i,t-1 This represents the output state of the heat load prediction network model at the previous time step; z i,t-1 x represents the value at the previous time step from the starting point of the measurement, and x represents the observable data value at the last moment; i,t Let be the value of the load sequence i of the heating station at time step t, representing the network input state;

[0075] The Gaussian distribution parameters μ and σ of the time series at future time steps are calculated and expressed as:

[0076]

[0077]

[0078] and b is the likelihood layer weight matrix; μ and b σ This is the bias vector for the fully connected layer;

[0079] The Gaussian distribution is determined based on the Gaussian distribution parameters μ and σ. The quartile of the Gaussian distribution is then used as the predicted value z of the heat load sequence of the heating station at time t. i,t .

[0080] It's important to note that during the training of the heat load prediction network model, the cloud server distributes the training task to each edge computing device. Each edge computing device stores its own historical operating data for the corresponding heating station. The final global heat load prediction network model is built by the cloud server. Throughout the entire model training process, the edge computing devices do not share each other's historical operating data for the heating stations, thus avoiding privacy leaks. Unlike traditional centralized training methods, federated learning only uploads the parameters of the training model, not the operating data of the heating stations. This method effectively protects the data privacy of the heating stations and avoids privacy security issues. Furthermore, since no anonymization is performed on the training data, data availability is not reduced. Federated learning improves communication efficiency while avoiding privacy security issues caused by data leaks.

[0081] In this embodiment, step S4, where the cloud server aggregates local heat load prediction network models from multiple edge computing devices and updates the global heat load prediction network model, includes:

[0082] The cloud server uses the FedAvg federated aggregation algorithm to perform weighted aggregation of local heat load prediction network models of multiple edge computing devices, and completes the update of weight and threshold parameters of the global heat load prediction network model.

[0083] The FedAvg federated aggregation algorithm performs model-weighted aggregation, as follows:

[0084]

[0085] W t and W t+1 These represent the weights and activation threshold vector parameters of the global heat load prediction network model in training rounds t and t+1, respectively; K is the number of heating stations; n is the total number of data samples from the K heating stations; n k The data sample size for heating station k; Here, g represents the weights and activation threshold vector parameters of the local heat load prediction network model for heat station k during the (t+1)th training round; η is the learning rate; g k Let be the gradient of the loss function of the local model of heat station k. L(·) is the loss function of the local heat load prediction network model, X k y is the input feature sequence of the local heat load prediction network model for heat station k. k w represents the actual heat load value of heating station k. k These are the weights and activation threshold vector parameters of the local heat load prediction network model for heat station k.

[0086] It should be noted that the FedAvg federated aggregation algorithm means that the edge computing devices participating in the heating station can use the calculated gradients to update the parameters of the local local heat load prediction network model. Then, the updated local local heat load prediction network model parameters are uploaded to the cloud server. The cloud server performs weighted aggregation of the local local heat load prediction network model parameters from the edge computing devices participating in the heating station to complete the parameter update of the global local heat load prediction network model. In the FedAvg federated aggregation algorithm, the edge computing devices participating in the heating station can perform multiple rounds of iterative updates locally before uploading the final local local heat load prediction network model parameters. This effectively simplifies the computational load on the cloud server and reduces the number of communications between the edge computing devices and the cloud server, thereby improving system performance.

[0087] In this embodiment, in step S6, combining the load forecast values ​​of each heating station and based on the heat balance equation, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a distributed machine learning method is used to establish a secondary network supply water temperature prediction model to calculate the setpoint of the secondary network supply water temperature, including:

[0088] The edge computing device combines the load forecast values ​​of the heating stations with the heat balance equation to obtain and preprocess the data set of the secondary network's supply water temperature impact, thereby obtaining the supply water temperature sequence and extracting additional features related to the time series, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant. The data set of the secondary network's supply water temperature impact includes the load forecast values ​​of each heating station, the return water temperature of the secondary network, the supply water temperature of the primary network, the return water temperature of the primary network, the flow rate of the primary network, the outdoor temperature, the outdoor wind speed, and the outdoor humidity.

[0089] The cloud server uses existing publicly available data to initialize a global secondary network water supply temperature prediction network model and broadcasts it to each edge computing device in the federated learning system.

[0090] Each edge computing device participating in the training uses local data to train the secondary network water supply temperature prediction network model, obtains a local secondary network water supply temperature prediction network model, and uploads it to the cloud server.

[0091] The cloud server aggregates the local secondary network water supply temperature prediction network model of multiple edge computing devices, updates the global secondary network water supply temperature prediction network model, and distributes it to each edge computing device.

[0092] Repeat the above process until the model finally converges or reaches the training iterations, and obtain the setpoint values ​​of the secondary network water supply temperature for each heating station through the global secondary network water supply temperature prediction network model.

[0093] In this embodiment, the heating station load prediction and optimization control method further includes:

[0094] When a new heating station is added, a similar heating station is selected from the existing heating stations, and a transferable heat load prediction network model and a secondary network water supply temperature prediction network model are trained using data from the similar heating stations. Then, the heat load prediction network model and the secondary network water supply temperature prediction network model are further fine-tuned based on the operating data of the new heating station.

[0095] In this embodiment, the selection of similar heating stations takes into account the service targets of the heating stations, their location and functions, the heat medium transported by the connected heating network, and the area supplied by the heating stations.

[0096] The process involves training a transferable heat load prediction network model and a secondary network water supply temperature prediction network model using data from similar heat stations: training a global heat load prediction network model and a secondary network water supply temperature prediction network model using data from similar heat stations, and then transferring the weights and activation threshold vector parameters of the trained models to the edge computing device corresponding to the new heat station.

[0097] The heat load prediction network model and the secondary network water supply temperature prediction network model are further fine-tuned based on the operating data of the new heating station: the weights and activation threshold vector parameters of the transferred model are used as the initial parameters for training the local federated model, and then the new gradient of the model is calculated using the local operating data of the new heating station to adjust the model parameters, thereby obtaining the local heat load prediction network model and the secondary network water supply temperature prediction network model of the new heating station.

[0098] It should be noted that a transfer network is established between similar heating stations based on the federated learning algorithm. All heating stations in the network jointly train a shared and transferable federated model. Through global training and local fine-tuning of the federated model, the common heating patterns of multiple heating stations and the individual heating characteristics of a single heating station are learned. This transfer network can realize the safe and effective use of data from multiple parties, thereby effectively dealing with small sample scenarios where some heating stations have limited operational data.

[0099] In this embodiment, when the cloud server and the edge computing device transmit data, the sender encrypts the data before transmitting it to the receiver, and the receiver decrypts it to obtain the plaintext data. The cloud server and the edge computing device are equipped with a cryptographic unit, which is pre-loaded with encryption and decryption algorithms, including at least symmetric encryption algorithms and asymmetric encryption algorithms.

[0100] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can also be implemented in other ways. The system embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0101] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0102] If the functionality is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0103] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for load forecasting and optimal control of a heat station based on distributed machine learning, characterized in that, The heating station load prediction and optimization control method includes: Step S1: Set up corresponding edge computing devices near multiple heating stations, acquire and preprocess the heat load impact dataset of the heating stations to obtain the heating station load sequence, extract additional features related to the time series, and construct feature vectors based on the heating station load features and time series features. Step S2: The cloud server uses existing publicly available data to initialize a global heat load prediction network model and broadcasts it to each edge computing device in the federated learning system. Step S3: Each edge computing device participating in the training uses local data to train the heat load prediction network model, obtains the local heat load prediction network model, and uploads it to the cloud server. Step S4: The cloud server aggregates the local heat load prediction network models of multiple edge computing devices, updates the global heat load prediction network model, and distributes it to each edge computing device. In step S4, the cloud server aggregates local heat load prediction network models from multiple edge computing devices and updates the global heat load prediction network model, including: The cloud server uses the FedAvg federated aggregation algorithm to perform weighted aggregation of local heat load prediction network models of multiple edge computing devices, and completes the update of weight and threshold parameters of the global heat load prediction network model. The FedAvg federated aggregation algorithm performs model-weighted aggregation, as follows: W t and W t+1 These represent the weights and activation threshold vector parameters of the global heat load prediction network model in training rounds t and t+1, respectively; K is the number of heating stations; n is the total number of data samples from the K heating stations; n k The data sample size for heating station k; Here, g represents the weights and activation threshold vector parameters of the local heat load prediction network model for heat station k during the (t+1)th training round; η is the learning rate; g k Let be the gradient of the loss function of the local model of heat station k. L(·) is the loss function of the local heat load prediction network model, X k y is the input feature sequence of the local heat load prediction network model for heat station k. k w represents the actual heat load value of heating station k. k The weights and activation threshold vector parameters are the local heat load prediction network model for heat station k. Step S5: Repeat steps S1-S4 until the model finally converges or reaches the training number of times. Obtain the load prediction value of each heating station through the global heat load prediction network model. Step S6: Combining the load forecast values ​​of each heating station, and based on the heat balance equation, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a secondary network water supply temperature prediction model is also established using a distributed machine learning method. The set value of the secondary network water supply temperature is calculated, and the primary network regulating valve is adjusted to control the secondary heating network water supply temperature, so that the actual water supply temperature can follow the set temperature value and achieve real-time control. In step S6, combining the load forecast values ​​of each heating station and based on the heat balance equation, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant, a distributed machine learning method is used to establish a secondary network supply water temperature prediction model to calculate the setpoint for the secondary network supply water temperature, including: The edge computing device combines the load forecast values ​​of the heating stations with the heat balance equation to obtain and preprocess the data set of the secondary network's supply water temperature impact, thereby obtaining the supply water temperature sequence and extracting additional features related to the time series, while keeping the total flow rate of the heating system and the return water temperature of the secondary network constant. The data set of the secondary network's supply water temperature impact includes the load forecast values ​​of each heating station, the return water temperature of the secondary network, the supply water temperature of the primary network, the return water temperature of the primary network, the flow rate of the primary network, the outdoor temperature, the outdoor wind speed, and the outdoor humidity. The cloud server uses existing publicly available data to initialize a global secondary network water supply temperature prediction network model and broadcasts it to each edge computing device in the federated learning system. Each edge computing device participating in the training uses local data to train the secondary network water supply temperature prediction network model, obtains a local secondary network water supply temperature prediction network model, and uploads it to the cloud server. The cloud server aggregates the local secondary network water supply temperature prediction network model of multiple edge computing devices, updates the global secondary network water supply temperature prediction network model, and distributes it to each edge computing device. Repeat the above process until the model finally converges or reaches the training iterations, and obtain the setpoint values ​​of the secondary network water supply temperature for each heating station through the global secondary network water supply temperature prediction network model.

2. The method for load prediction and optimized control of a heating station according to claim 1, characterized in that, In step S1, the heat load impact dataset of the heating station is acquired and preprocessed to obtain the heating station load sequence, and additional time-series related features are extracted. A feature vector is constructed based on the heating station load features and time-series features, including: Obtain the heat load impact dataset of the heating station, including the historical supply and return water temperatures, supply and return water flow rates, supply and return water pressures, heat load, and historical outdoor temperatures, outdoor wind speeds, and outdoor humidity. After processing the missing data and outliers in the heat load impact dataset, wavelet packet decomposition and single-branch reconstruction are performed. Wavelet basis functions and decomposition degree are selected to obtain the decomposed low-frequency and high-frequency component sequences. Adaptive complete empirical mode decomposition is used to decompose the high-frequency components to obtain different IMF components. After normalizing both the low-frequency components and the IMF components, the heat station load sequence is obtained. The importance of each feature in the load sequence of the heating station was calculated using the XGBoost model. Feature selection was then performed, and the more important load features were selected as the set of load features for the heating station. Consider the month, hour, weekday, and holidays at time t as the time series feature set at time t; The load characteristics of the heating station at time t are constituted by considering the load characteristics at time t, the time distance to time t, the load characteristics at the next time t, and the time distance to the next time t. The load characteristics of the heating station at time t and the time series characteristics are combined to form a feature vector.

3. The method for load prediction and optimized control of a heating station according to claim 1, characterized in that, The heat load prediction network model employs a DeepAR autoregressive recurrent neural network, internally comprising an LSTM model and a likelihood module. The likelihood module structure design includes likelihood function selection, loss function determination, and input layer neuron number setting. The likelihood functions include Gaussian likelihood function and negative binomial likelihood function. The loss function is defined as: z represents the actual load of the heating station at the predicted time. The load value of the heating station at any time follows a Gaussian distribution, N~(μ,σ). 2 ), μ is the mean, and σ is the standard deviation; the number of neurons in the input layer is set according to the number of time feature sequences and the load value of the heating station at the previous time step; the LSTM model includes an input layer, hidden layers, and an output layer, an optimization algorithm, a loss function, and an activation function. The number of neurons in the input layer is determined according to the number of samplings of the heating station load sequence. The number of hidden layers and the number of neurons in the hidden layers are determined by continuously adjusting the parameters using the control variable method to select the optimal parameters. The output layer neurons output the load value of the heating station at the next time step, with a feature dimension of 1 and a number of neurons in the output layer of 1. The optimization algorithm adopts the Adam optimization algorithm. The loss function uses the mean square error to measure the difference between the predicted value and the true value. The activation function of the hidden layer is set to the sigmoid function, and the activation function of the output layer is set to the tanh function. The DeepAR autoregressive recurrent neural network model adopts a grid search algorithm to optimize the model hyperparameters in the hyperparameter space through exhaustive search to obtain the optimal DeepAR autoregressive recurrent neural network model.

4. The method for load prediction and optimized control of a heating station according to claim 1, characterized in that, In step S3, the local heat load prediction network model is trained using local data to obtain a local heat load prediction network model, including: The feature vectors, including heat station load characteristics and time series characteristics, are used as local data and input into the LSTM model in the heat load prediction network model for training to obtain the output h. i,t =h(h i,t-1 ,z i,t-1 ,x i,t Θ); h is the hidden layer function, internally implemented using a multi-layer recurrent neural network, and parameterized by the parameter Θ; during training, at each time step t, h i,t-1 This represents the output state of the heat load prediction network model at the previous time step; z i,t-1 x represents the value at the previous time step from the starting point of the measurement, and x represents the actual observed data value at the last moment; i,t Let be the value of the load sequence i of the heating station at time step t, representing the network input state; The Gaussian distribution parameters μ and σ of the time series at future time steps are calculated and expressed as: and b is the likelihood layer weight matrix; μ and b σ This is the bias vector for the fully connected layer; The Gaussian distribution is determined based on the Gaussian distribution parameters μ and σ. The quartile of the Gaussian distribution is then used as the predicted value z of the heat load sequence of the heating station at time t. i,t .

5. The method for load prediction and optimized control of a heating station according to claim 1, characterized in that, The heating station load prediction and optimization control method further includes: When a new heating station is added, a similar heating station is selected from the existing heating stations, and a transferable heat load prediction network model and a secondary network water supply temperature prediction network model are trained using data from the similar heating stations. Then, the heat load prediction network model and the secondary network water supply temperature prediction network model are further fine-tuned based on the operating data of the new heating station.

6. The method for load prediction and optimized control of a heating station according to claim 5, characterized in that, The selection of similar heating stations takes into account the service targets, location and function of the heating station, the heat medium transported by the connected heating network, and the area supplied by the heating station. The process involves training a transferable heat load prediction network model and a secondary network water supply temperature prediction network model using data from similar heat stations: training a global heat load prediction network model and a secondary network water supply temperature prediction network model using data from similar heat stations, and then transferring the weights and activation threshold vector parameters of the trained models to the edge computing device corresponding to the new heat station. The heat load prediction network model and the secondary network water supply temperature prediction network model are further fine-tuned based on the operating data of the new heating station: the weights and activation threshold vector parameters of the transferred model are used as the initial parameters for training the local federated model, and then the new gradient of the model is calculated using the local operating data of the new heating station to adjust the model parameters, thereby obtaining the local heat load prediction network model and the secondary network water supply temperature prediction network model of the new heating station.

7. The method for load prediction and optimized control of a heating station according to claim 1, characterized in that, When the cloud server and edge computing device transmit data, the sender encrypts the data before transmitting it to the receiver, and the receiver decrypts it to obtain the plaintext data. The cloud server and edge computing device are equipped with a cryptographic unit, which is pre-loaded with encryption and decryption algorithms, including at least symmetric encryption algorithms and asymmetric encryption algorithms.

Citation Information

Patent Citations

  • Federal learning load prediction method based on dynamic weighted aggregation

    CN114707765A

  • Wireless service traffic prediction method based on weighted federated learning

    WO2021169577A1