Federal learning model training method applied to heat supply prediction and heat supply prediction method
By using a federated learning training method, a global collaborative prediction model is trained using local data from heating stations. This solves the problems of insufficient data and privacy communication caused by independent modeling of heating stations, and achieves high-precision heating load prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG CLEAN ENERGY RES INST
- Filing Date
- 2026-02-10
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, independent modeling of heating stations results in limited data volume, making it difficult to train models with strong generalization ability. Furthermore, the potential correlation between heating stations is not utilized, leading to low prediction accuracy. At the same time, centralized methods have issues with data privacy and communication overhead.
By employing a federated learning approach, the global model parameters of the initial global collaborative prediction model are sent to local data nodes. Local model parameters are obtained through training on local data, and then the global model is aggregated and updated on the server side to form the target global collaborative prediction model, ensuring data privacy and reducing communication overhead.
It improves the accuracy and generalization ability of heating forecasting models, especially in extreme weather and emergency situations, while protecting data privacy and reducing communication overhead.
Smart Images

Figure CN121920477A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of federated learning technology, and more specifically, to a federated learning model training method and a heating prediction method applied to heating prediction. Background Technology
[0002] Currently, with the expansion of urban centralized heating and the deepening of the smart heating concept, higher demands are being placed on the accuracy and real-time performance of heating load forecasting. A city typically contains dozens or even hundreds of geographically dispersed heating stations with varying building types and user habits. Each heating station usually builds its own forecasting model independently, using only its own historical load and meteorological data for training. This "lone wolf" approach has significant drawbacks: First, the limited data volume of a single heating station makes it difficult to train complex models with strong generalization capabilities, especially when facing extreme weather or special events, where forecast accuracy drops sharply. Second, there are potential spatial and temporal correlations between heating stations (e.g., adjacent areas are affected by similar weather systems), which are completely ignored in independent modeling. Finally, due to data security and commercial competition considerations, different heating stations or their respective heating companies are unwilling to share raw operational data, forming serious "data silos" that hinder the possibility of improving overall forecast accuracy through data fusion.
[0003] Existing technologies mainly consist of centralized prediction methods and single distributed machine learning methods. Centralized prediction methods attempt to aggregate data from all heating stations onto a central server or cloud platform, and then use the massive amount of data to train a unified prediction model. Single distributed machine learning methods simply distribute and store data, but the training process may still require frequent data exchanges, or it may simply split a large model across different nodes for computation, without fundamentally solving the problems of data privacy and communication overhead.
[0004] However, in existing technologies, single distributed methods are difficult to effectively mine and utilize the implicit correlations between data from different heating stations, resulting in limited model improvement and consequently poor accuracy of the trained models. Summary of the Invention
[0005] The purpose of this application is to provide a federated learning model training method and a heating prediction method for predicting heating, so as to solve the above-mentioned problems existing in the prior art and improve the training accuracy of the model applied to predicting heating.
[0006] Firstly, a method for training a federated learning model for predicting heating is provided, the method being applied to a server; the method may include: The global model parameters of the preset initial global collaborative prediction model are sent to each local data node; the global model parameters are used to determine the local model of the local data node. Receive local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data; Based on the local model parameters sent by each local data node, the initial global collaborative prediction model is updated to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; the target model parameters are sent to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node.
[0007] Secondly, a method for training a federated learning model for predicting heating is provided, wherein the method is applied to local data nodes; the method includes: Receive global model parameters of the preset initial global collaborative prediction model sent by the server; determine the local model based on the global model parameters; Based on the local heating data corresponding to the local data node, the local model is trained to obtain local model parameters; the local model parameters are sent to the server; the local model parameters are used to update the initial global collaborative prediction model to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model. The system receives target model parameters sent by the server; these target model parameters are used to predict the heating load forecast value of the local data node.
[0008] Thirdly, a heating forecasting method based on a federated learning model is provided, characterized in that the method is applied to local data nodes; the method includes: Acquire local heating data and input the actual heating data into the target global collaborative prediction model to obtain the predicted heating load value; The target global collaborative prediction model is obtained based on the target model parameters, and both the target global collaborative prediction model and the target model parameters are the target global collaborative prediction model and target model parameters as described in any one of claims 1-6.
[0009] Fourthly, a federated learning model training device for predictive heating is provided, which is applied to a server; the device includes: The sending module is used to send the global model parameters of the preset initial global collaborative prediction model to each local data node; the global model parameters are used to determine the local model of the local data node. The receiving module is used to receive local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data. The update module is used to update the initial global collaborative prediction model according to the local model parameters sent by each local data node, to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; and to send the target model parameters to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node.
[0010] Fifthly, a server is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0011] In a sixth aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.
[0012] This application provides a federated learning model training method and a heating prediction method for predicting heating load. The method involves sending the global model parameters of a preset initial global collaborative prediction model to each local data node; these global model parameters determine the local model of each local data node. The method also receives local model parameters from each local data node; these local model parameters are obtained by training the determined local model based on local heating data. Based on the local model parameters sent by each local data node, the initial global collaborative prediction model is updated to obtain a target global collaborative prediction model and its target model parameters. These target model parameters are then sent to each local data node; they are used to predict the heating load forecast value of each local data node. Compared with existing centralized prediction methods, the greatest advantage of this invention is the protection of data privacy and security, fundamentally solving the barriers to data sharing, and significantly reducing communication overhead. Compared with single distributed methods, this invention uses a federated learning mechanism to integrate knowledge and patterns from multiple stations, enhancing the model's generalization ability and robustness, especially in predicting accuracy under extreme weather and sudden conditions. It can effectively mine and utilize the correlation of multi-station data to collaboratively train a high-precision, highly generalizable global collaborative prediction model, thereby improving prediction accuracy. Attached Figure Description
[0013] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A flowchart illustrating a federated learning model training method for predicting heating, provided as an embodiment of this application; Figure 2 A flowchart illustrating a federated learning model training method for predicting heating, provided as an embodiment of this application; Figure 3 A flowchart illustrating a federated learning model training method for predicting heating provided in this application; Figure 4 This application provides an architecture diagram of a multi-heating station collaborative prediction system based on federated learning. Figure 5 A flowchart of a federated learning collaborative training process is provided for an embodiment of this application; Figure 6 A schematic diagram of a federated learning model training device for predicting heating, provided as an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The words "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are only used to distinguish different components. The words "comprising" or "including," etc., mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but do not exclude other elements or objects. The words "connected," "coupled," or "connected," etc., are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up," "down," "left," "right," etc., are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0016] Currently, with the expansion of urban centralized heating and the deepening of the smart heating concept, higher demands are being placed on the accuracy and real-time performance of heating load forecasting. A city typically contains dozens or even hundreds of geographically dispersed heating stations with varying building types and user habits. Each heating station usually builds its own forecasting model independently, using only its own historical load and meteorological data for training. This "lone wolf" approach has significant drawbacks: First, the limited data volume of a single heating station makes it difficult to train complex models with strong generalization capabilities, especially when facing extreme weather or special events, where forecast accuracy drops sharply. Second, there are potential spatial and temporal correlations between heating stations (e.g., adjacent areas are affected by similar weather systems), which are completely ignored in independent modeling. Finally, due to data security and commercial competition considerations, different heating stations or their respective heating companies are unwilling to share raw operational data, forming serious "data silos" that hinder the possibility of improving overall forecast accuracy through data fusion.
[0017] Existing technologies mainly consist of centralized prediction methods and single distributed machine learning methods. Centralized prediction methods attempt to aggregate data from all heating stations onto a central server or cloud platform, and then use the massive amount of data to train a unified prediction model. Single distributed machine learning methods simply distribute and store data, but the training process may still require frequent data exchanges, or it may simply split a large model across different nodes for computation, without fundamentally solving the problems of data privacy and communication overhead.
[0018] However, in existing technologies, single distributed methods are difficult to effectively mine and utilize the implicit correlations between data from different heating stations, resulting in limited model improvement and consequently poor accuracy of the trained models.
[0019] In one example, the existing technology also has the following technical problems: Data privacy and security risks: The centralized approach requires each heating station to upload sensitive raw data containing user information and operational details, which violates data security regulations and corporate confidentiality principles, resulting in significant obstacles to its adoption.
[0020] High communication bandwidth and cost: The volume of heating data (such as hourly and minutely load, temperature and pressure data) is huge. Uploading all the data continuously to the center requires high network bandwidth and incurs huge communication costs.
[0021] Single point of failure risk: Centralized systems are highly dependent on the central server. If the central server fails or is attacked by the network, the entire prediction system will be paralyzed.
[0022] The federated learning model training method for predicting heating provided in this application embodiment can be applied to a server, which can be a physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0023] For ease of understanding, the terms used in the embodiments of this application are explained below: Federated learning: an encrypted distributed machine learning technique that allows multiple participants to collaboratively train a machine learning model without exchanging their local raw data, thereby achieving data privacy protection.
[0024] Data silos refer to a state in which data is isolated between different departments, systems, or organizations, making it impossible or difficult to share and communicate with each other.
[0025] Global model: The final prediction model formed by the federated learning server aggregating and updating the models from all parties, and incorporating the knowledge of all participants.
[0026] Local model: A copy of the model obtained by training the global model using local data at each heating station.
[0027] The local data node can be an electronic device, a terminal device, a federated learning model training device or device for predicting heating, or other device or device that can execute this embodiment, and there are no limitations on this.
[0028] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0029] Figure 1 This is a flowchart illustrating a federated learning model training method for predicting heating, provided as an embodiment of this application. The method is applied to a server, such as... Figure 1 As shown, the method may include: Step S101: Send the global model parameters of the preset initial global collaborative prediction model to each local data node; the global model parameters are used to determine the local model of the local data node.
[0030] For example, local data nodes can be any one or more of the following: heating stations, substations, water pumping stations, or distributed energy stations, without limitation. This step performs model initialization and distribution. Specifically, the server (i.e., the federated learning coordination server) initializes an initial global collaborative prediction model based on a preset machine learning algorithm (such as LSTM (Long Short-Term Memory Network), Transformer, etc., without limitation). The initial global collaborative prediction model corresponds to global model parameters. At this time, the global model parameters are random or preset based on experience, without limitation. The server distributes the current global model parameters to all participating local data nodes.
[0031] Local data nodes perform localized training and encrypted uploads. Specifically, after receiving the current global model parameters, each local data node replaces its own local model parameters with the current global model parameters, thereby obtaining a local model.
[0032] Step S102: Receive the local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data.
[0033] For example, the local data node trains the local model using local heating data that has never left the local data node. The local heating data includes the local data node's private local time-series dataset, which includes features such as historical load data, corresponding meteorological data, date type, and building information. The training process aims to adjust the local model parameters based on the local heating data, making the local model more consistent with the operating patterns of the local data node, and then uploads the local model parameters to the server.
[0034] Optionally, after local training is complete, each local data node calculates the update amount of its local model parameters (e.g., gradient or weight difference) and uploads the update amount to the server. Not the original data is uploaded, but rather the anonymous, encrypted update amount of the model. This update amount itself does not contain any sensitive user or runtime information, thus achieving data privacy protection. Finally, the server receives the local model parameters sent by each local data node.
[0035] Step S103: Update the initial global collaborative prediction model according to the local model parameters sent by each local data node to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; send the target model parameters to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node.
[0036] For example, after receiving updates from all local data nodes, the server uses a preset aggregation algorithm (such as FedAvg, which is a weighted average based on the data volume of each local data node) to merge these updates and generate a new, better global model parameter. This new, better global model parameter is the target model parameter. For example, the aggregation algorithm is a weighted average algorithm, and the weights can be determined based on the data volume or model quality of each local data node.
[0037] The server updates the initial global collaborative prediction model with the aggregated target model parameters to obtain the target global collaborative prediction model. Then, it determines whether the target global collaborative prediction model has reached convergence, for example, if the prediction accuracy no longer significantly improves on the validation set, or if a preset number of training epochs has been reached. If it has not converged, steps S101-S103 are repeated, and the updated target global collaborative prediction model is redistributed to each local data node for the next round of training. This process is repeated until the final target global collaborative prediction model converges.
[0038] Optionally, prediction and control applications can also be implemented. Specifically, after the final target global collaborative prediction model is trained, the server distributes the target model parameters of the final target global collaborative prediction model to each local data node. Each local data node loads the final target global collaborative prediction model based on the received target model parameters, and combines it with real-time collected meteorological and other data to generate high-precision heating load prediction values for a preset future time period. For control applications, each local data node sends its local prediction results to its own heating control application module. This module can formulate optimized heating scheduling strategies in advance based on the prediction results, such as adjusting boiler output and circulating pump frequency, to achieve on-demand heating and precise heating, thereby achieving the goals of energy conservation, emission reduction, and improved user satisfaction.
[0039] Therefore, in heating regulation, the globally trained model can be used for high-precision load forecasting and guide heating stations in forward-looking and optimized production scheduling. Through the above process, this application cleverly achieves "the model moves while the data remains stationary," ensuring the data sovereignty and privacy of each local data node while pooling collective wisdom. The resulting globally trained model is more powerful and accurate than any single model.
[0040] The method provided in this application sends the global model parameters of a preset initial global collaborative prediction model to each local data node; the global model parameters are used to determine the local model of the local data node. It receives the local model parameters sent by each local data node; the local model parameters are obtained by the local data node training the determined local model based on local heating data. Based on the local model parameters sent by each local data node, the initial global collaborative prediction model is updated to obtain a target global collaborative prediction model and target model parameters of the target global collaborative prediction model; the target model parameters are then sent to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node. Compared with the centralized prediction methods in the prior art, the greatest advantage of this invention is that it protects data privacy and security, fundamentally solves the barriers to data sharing, and significantly reduces communication overhead. Compared with single distributed methods, this invention uses a federated learning mechanism to integrate knowledge and patterns from multiple stations, enhancing the model's generalization ability and robustness, especially in predicting accuracy under extreme weather and sudden conditions. It can effectively mine and utilize the correlation of multi-station data to collaboratively train a high-precision, highly generalizable global collaborative prediction model, thereby improving prediction accuracy.
[0041] Figure 2 A flowchart illustrating a federated learning model training method for predicting heating, as provided in this application, is shown below. Figure 2 As shown, in this embodiment... Figure 1Based on the embodiments, the method is described in detail below, and the method includes: Step S201: Send the global model parameters of the preset initial global collaborative prediction model to each local data node; the global model parameters are used to determine the local model of the local data node.
[0042] In one example, the local data node is any one or more of the following: heating station, substation, water pumping station, or distributed energy station.
[0043] For example, this step is described in step S101, and will not be repeated here.
[0044] Step S202: Receive the local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data.
[0045] In one example, the local heating data is a local time-series dataset, which includes any one or more of the following: load data, meteorological data, date type, and equipment operating parameters.
[0046] For example, the local data node trains the local model using local heating data that has never left the local data node. The local heating data includes the local data node's private local time-series dataset, which includes features such as historical load data, corresponding meteorological data, date type, and building information. The training process aims to adjust the local model parameters based on the local heating data, making the local model more consistent with the operating patterns of the local data node, and then uploads the local model parameters to the server.
[0047] Optionally, differential privacy technology can be introduced into the federated learning framework. Local data nodes add appropriate noise before uploading local model parameter updates, providing stronger mathematical guarantees for privacy protection. Furthermore, the aggregation algorithm can also employ more complex schemes, such as weighted aggregation based on model update quality, or asynchronous federated learning to adapt to heating stations with different computing capabilities; there are no limitations on this.
[0048] Step S203: Update the initial global collaborative prediction model according to the local model parameters sent by each local data node to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; send the target model parameters to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node.
[0049] In one example, S203 includes: aggregating the local model parameters based on the local model parameters sent by each local data node to generate a target global collaborative prediction model and target model parameters of the target global collaborative prediction model; if it is determined that the target global collaborative prediction model has reached the preset convergence condition, then updating the global model parameters to the target model parameters of the target global collaborative prediction model.
[0050] In one example, “based on the local model parameters sent by each local data node, aggregate the local model parameters to generate the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model” includes: based on the local model parameters sent by each local data node, aggregate the local model parameters using a weighted average algorithm to generate the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; wherein, the target model parameters include weights, and the weights are determined according to the amount of data or the quality of model updates of each local data node.
[0051] For example, this step is described in step S103, and will not be repeated here.
[0052] Step S204: If it is determined that the target global collaborative prediction model has reached the preset convergence condition, then the global model parameters are updated to the target model parameters of the target global collaborative prediction model.
[0053] For example, the server determines whether the target global collaborative prediction model has reached a preset convergence condition, such as the prediction accuracy no longer significantly improving on the validation set, or reaching a preset number of training epochs. If it has not converged, steps S201-S204 are repeated to redistribute the updated target global collaborative prediction model to each local data node for the next round of training. This process is repeated until the final target global collaborative prediction model converges.
[0054] Optionally, after training, the server distributes the final target model parameters to each heating station. Each station's local module loads the target model parameters. During daily operation, each heating station's local prediction unit, combined with 24-hour weather data from weather forecasts, uses the final target global collaborative prediction model to predict the heat load curve for the next 24 hours in real time. The prediction results are sent to the heating station's own heating control application module. Based on the heat load curve, the heating control application module optimizes the operating setpoints of each heat source, heat exchange station, and pipeline network, generates scheduling instructions, and adjusts the system's operating status in advance, thereby achieving on-demand heating and energy conservation and emission reduction.
[0055] The method provided in this application sends the global model parameters of a preset initial global collaborative prediction model to each local data node; the global model parameters are used to determine the local model of the local data node. It receives the local model parameters sent by each local data node; the local model parameters are obtained by the local data node training the determined local model based on local heating data. Based on the local model parameters sent by each local data node, the initial global collaborative prediction model is updated to obtain a target global collaborative prediction model and target model parameters of the target global collaborative prediction model; the target model parameters are sent to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node. If it is determined that the target global collaborative prediction model has reached a preset convergence condition, the global model parameters are updated to the target model parameters of the target global collaborative prediction model. Compared with the centralized prediction method in the prior art, the biggest advantage of this invention is that it protects data privacy and security, fundamentally solves the barriers to data sharing, and significantly reduces communication overhead. Compared with single distributed methods, this invention uses a federated learning mechanism to integrate knowledge and patterns from multiple stations, enhancing the model's generalization ability and robustness, especially in predicting accuracy under extreme weather and sudden conditions. It can effectively mine and utilize the correlation of multi-station data to collaboratively train a high-precision, highly generalizable global collaborative prediction model, thereby improving prediction accuracy.
[0056] Figure 3 A flowchart illustrating a federated learning model training method for predicting heating, as provided in this application, is shown below. Figure 3 As shown, this method is applied to local data nodes; the method includes: Step S301: Receive the global model parameters of the preset initial global collaborative prediction model sent by the server; determine the local model based on the initial global collaborative prediction model; Step S302: Based on the local heating data corresponding to the local data node, train the local model to obtain the local model parameters; send the local model parameters to the server; the local model parameters are used to update the initial global collaborative prediction model to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model. Step S303: Receive the target model parameters sent by the server; the target model parameters are used to predict the heating load forecast value of the local data node.
[0057] In one embodiment, this application provides a heating prediction method based on a federated learning model. This embodiment, based on the above embodiments, provides a detailed description of the method, which is applied to a local data node; the method includes: Local heating data is acquired and input into the target global collaborative prediction model to obtain the heating load prediction value; wherein, the target global collaborative prediction model is obtained based on the target model parameters, and the target global collaborative prediction model and the target model parameters are the same as those in the above embodiments.
[0058] Figure 4 This application provides an architecture diagram of a multi-heating station collaborative prediction system based on federated learning, as shown below. Figure 4 As shown, the system mainly includes: multiple geographically dispersed heating stations (e.g., heating station A (1), heating station B (2), heating station C (3)), a local data processing and prediction module (4) deployed in each heating station, a federated learning coordination server (5), and a heating regulation application module (7). A global collaborative prediction model (6) is maintained on the federated learning coordination server (5). The heating regulation application module (7) is used for receiving prediction results and generating scheduling strategies.
[0059] Figure 4 In this system, a federated learning coordination server and multiple local data processing and prediction modules distributed across various heating stations constitute a distributed collaborative training architecture. The federated learning coordination server (5) is used to initialize, distribute, and aggregate the parameters of the global collaborative prediction model, while the local modules of each heating station only use their local private heating data for model training. Heating stations A (1), B (2), and C (3) are independent entities. The local data processing and prediction module (4) within each heating station communicates bidirectionally with the central federated learning coordination server (5) via the Internet / private network. The local data processing and prediction module (4) is used for local private data storage, local model training, and encrypted model update uploading. The federated learning coordination server (5) is responsible for maintaining and updating the global collaborative prediction model (6) to obtain the final target global collaborative prediction model. Finally, the prediction results of each heating station are sent to the heating control application module (7) to guide production. Therefore, by adopting a distributed architecture, single points of failure are avoided, each heating station can operate independently, and the system reliability and robustness are enhanced.
[0060] Figure 5 A flowchart of a federated learning collaborative training process is provided for an embodiment of this application, such as... Figure 5The diagram illustrates the iterative training process of federated learning. It includes: Step S401: Initialize the global model (i.e., the global collaborative prediction model); Step S402: Distribute the global model (i.e., the global collaborative prediction model) to each heating station; Step S403: Each heating station trains its local model; Step S404: Each heating station uploads its model update values (gradients / weights); Step S405: The server aggregates the model update values; Step S406: Determine if convergence has occurred; Step S407: Update the global model and return to Step S402, or terminate training.
[0061] Corresponding to the above method, this application also provides a federated learning model training device for predictive heating, applied to a server; such as Figure 6 As shown, the device includes: The sending module 51 is used to send the global model parameters of the preset initial global collaborative prediction model to each local data node respectively; the global model parameters are used to determine the local model of the local data node. The receiving module 52 is used to receive local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data. The update module 53 is used to update the initial global collaborative prediction model according to the local model parameters sent by each local data node, to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; and to send the target model parameters to each local data node; the target model parameters are used to predict the heating load prediction value of the local data node.
[0062] The functions of each functional unit in the federated learning model training device for predicting heating provided in the above embodiments of this application can be implemented through the above methods and steps. Therefore, the specific working process and beneficial effects of each unit in the federated learning model training device for predicting heating provided in the embodiments of this application will not be repeated here.
[0063] This application also provides a server, such as... Figure 7 As shown, it includes a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540.
[0064] Memory 530 is used to store computer programs; The processor 510 performs the above steps when executing the program stored in the memory 530.
[0065] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0066] The communication interface is used for communication between the aforementioned server and other devices.
[0067] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0068] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0069] The implementation methods and beneficial effects of the server's various components in the above embodiments for solving the problem can be found in [reference needed]. Figure 1 The steps in the illustrated embodiments are used to implement the process. Therefore, the specific working process and beneficial effects of the server provided in this application will not be repeated here.
[0070] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the federated learning model training methods for predicting heating described in the above embodiments.
[0071] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the federated learning model training methods for predicting heating described in the above embodiments.
[0072] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0073] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0076] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0077] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.
Claims
1. A method for training a federated learning model applied to predictive heating, characterized in that, The method is applied to a server; the method includes: The global model parameters of the preset initial global collaborative prediction model are sent to each local data node; the global model parameters are used to determine the local model of the local data node. Receive local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data; Based on the local model parameters sent by each local data node, the initial global collaborative prediction model is updated to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; the target model parameters are sent to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node.
2. The method as described in claim 1, characterized in that, The local heating data is a local time-series dataset, which includes any one or more of the following: Load data, meteorological data, date type, and equipment operating parameters.
3. The method as described in claim 1, characterized in that, Based on the local model parameters sent by each local data node, the initial global collaborative prediction model is updated to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; and the target model parameters are sent to each local data node, including: Based on the local model parameters sent by each local data node, the local model parameters are aggregated to generate a target global collaborative prediction model and target model parameters of the target global collaborative prediction model. If it is determined that the target global collaborative prediction model has reached the preset convergence condition, then the global model parameters are updated to the target model parameters of the target global collaborative prediction model.
4. The method as described in claim 3, characterized in that, Based on the local model parameters sent by each local data node, the local model parameters are aggregated to generate a target global collaborative prediction model, and the target model parameters of the target global collaborative prediction model, including: Based on the local model parameters sent by each local data node, a weighted average algorithm is used to aggregate the local model parameters to generate a target global collaborative prediction model and target model parameters of the target global collaborative prediction model; wherein, the target model parameters include weights, which are determined according to the amount of data or the quality of model updates of each local data node.
5. The method according to any one of claims 1-4, characterized in that, The local data node is any one or more of the following: Heating stations, substations, water pumping stations, or distributed energy stations.
6. A method for training a federated learning model applied to predictive heating, characterized in that, The method is applied to a local data node; the method includes: Receive global model parameters of the preset initial global collaborative prediction model sent by the server; determine the local model based on the global model parameters; Based on the local heating data corresponding to the local data node, the local model is trained to obtain local model parameters; the local model parameters are sent to the server; the local model parameters are used to update the initial global collaborative prediction model to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model. The system receives target model parameters sent by the server; these target model parameters are used to predict the heating load forecast value of the local data node.
7. A heating forecasting method based on a federated learning model, characterized in that, The method is applied to a local data node; the method includes: Acquire local heating data and input the local heating data into the target global collaborative prediction model to obtain the predicted heating load value; The target global collaborative prediction model is obtained based on the target model parameters, and both the target global collaborative prediction model and the target model parameters are the target global collaborative prediction model and target model parameters as described in any one of claims 1-6.
8. A federated learning model training device for predictive heating, characterized in that, Applied to a server; the device includes: The sending module is used to send the global model parameters of the preset initial global collaborative prediction model to each local data node; the global model parameters are used to determine the local model of the local data node. The receiving module is used to receive local model parameters sent by each local data node; the local model parameters are obtained by the local data node training a determined local model based on local heating data. The update module is used to update the initial global collaborative prediction model according to the local model parameters sent by each local data node, to obtain the target global collaborative prediction model and the target model parameters of the target global collaborative prediction model; and to send the target model parameters to each local data node; the target model parameters are used to predict the heating load forecast value of the local data node.
9. A server, characterized in that, The server includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-5, the method of claim 6, or the method of claim 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-5, the method of claim 6, or the method of claim 7.