Personalized carbon emission prediction method and device based on federal learning
The personalized carbon emission prediction method through federated learning uses collaborative modeling and peer-to-peer network architecture to solve the privacy leakage and personalized model problems in traditional carbon emission prediction, and achieve personalized and accurate carbon emission prediction.
Patent Information
- Application Number
- CN202410656423.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-08-23
AI Technical Summary
Traditional carbon emission prediction methods require centralized collection of private data of organizations and enterprises, leading to privacy leakage issues, and it is difficult to establish personalized carbon emission prediction models to adapt to the energy conservation and emission reduction processes of different organizations and enterprises.
Adopt a personalized carbon emission prediction method based on federated learning, protect the sensitive data of participants through collaborative modeling and peer-to-peer network architecture, use parameter sharing and attention mechanisms to perform model updates and personalized adjustments, and build personalized carbon emissions Predictive model.
It realizes personalized carbon emission prediction on the basis of protecting privacy, improves the accuracy and robustness of prediction, and adapts to the energy saving and emission reduction needs of different organizations and enterprises.
Smart Images

Figure CN118536662A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information processing technology, and specifically relates to a personalized carbon emission prediction method and device based on federated learning. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Accurate prediction of carbon emissions is an important task for energy conservation and emission reduction. Based on the information of carbon emissions of organizations and enterprises, accurate prediction of carbon emissions of organizations and enterprises can assist energy conservation and emission reduction work and orderly scheduling of resources, further improving work efficiency.
[0004] However, carbon emission prediction faces some problems and challenges. First, using traditional data mining methods to predict carbon emissions requires collecting carbon emission data from different organizations and enterprises and using a centralized method to mine data. However, the carbon emission-related data of organizations and enterprises are private. This method leaks the privacy of organizations and enterprises and is not conducive to more organizations and enterprises participating in dual carbon work. Secondly, different organizations and enterprises have different energy conservation and emission reduction processes. It is extremely challenging to establish a unified carbon emission prediction model for all organizations and enterprises. It is more practical and effective to build a personalized carbon emission prediction model for the energy conservation and emission reduction processes of different organizations and enterprises, but it is also more difficult. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes a personalized carbon emission prediction method and device based on federated learning. The present invention uses a federated learning framework for collaborative modeling to protect the sensitive data of each participant from being leaked and ensure the privacy security of each participant. At the same time, carbon emission prediction is performed according to the personalized situation of each participant.
[0006] According to some embodiments, the present invention adopts the following technical solutions:
[0007] A personalized carbon emission prediction method based on federated learning includes the following steps:
[0008] Participants in collaborative modeling negotiate to build an initialization model and pre-process local data;
[0009] Based on the pre-processed local data, the corresponding participants in the collaborative modeling conduct multiple rounds of collaborative training through a federated learning framework based on a peer-to-peer network architecture, and continuously update the parameters of the initialization model by sharing parameters between participants. Combined with their own carbon emission data characteristics, the updated model parameters are adjusted individually to determine the final model parameters and obtain the prediction model.
[0010] Based on the carbon emission change sequence data of the participant to be predicted, the prediction model is used to obtain the predicted carbon emission value of the participant to be predicted in the next stage.
[0011] As an optional implementation method, the specific process of the participants participating in the collaborative modeling negotiating and constructing the initialization model includes: the participants negotiate the learning model and initialization parameters based on the federated learning framework, and perform the initial configuration of the personalized carbon emission prediction based on the federated learning framework, specifically including:
[0012] (1) Participant i selects the model to be collaboratively trained through the federated learning architecture, denoted as M i ;
[0013] (2) Participants negotiate the initial configuration of various parameters of the learning model to be collaboratively modeled. Each participant i corresponds to model M i The personalized parameter is denoted as P i,t , where t represents the number of training rounds, and the initialization parameters of the training model of each participant are P i,0 ;
[0014] (3) Each participant uses the method of random initialization of model parameters, namely:
[0015] P i,0 =RAND(M i ,P)
[0016] Among them, P represents the parameter set of the model M to be trained, RAND(M i ,P) is for model M i The parameter set P in sets the initialization parameters.
[0017] As an optional implementation method, the specific process of preprocessing local data includes: preprocessing the participant's own profile information and local carbon emission data, wherein the participant's profile information includes the participant's region and field; the carbon emission data is a set of serial data collected by the participant within a set time interval that characterizes the dynamic changes in the participant's carbon emissions.
[0018] As an optional implementation, the specific process of continuously updating the parameters of the initialization model by using parameter sharing among participants includes:
[0019] In the tth round of training, participant i uses local carbon emission data Data i , based on the model M at the beginning of this iteration i,t-1 Parameter P i,t-1 After training, the initial parameter P after this round of update is obtained i,t ;
[0020] Participant i uses the latest parameter P obtained in this round of training i,t Send to other participants in collaborative modeling, and receive updated model parameters from other participants in collaborative modeling;
[0021] Participant i uses the latest parameters of other participants and its own latest parameters P i,t .
[0022] As an optional implementation method, the specific process of personalizing the updated model parameters in combination with the characteristics of its own carbon emission data includes:
[0023] The model parameters obtained from other participants are aggregated by common global parameters, aggregated by participant-selected Dropout parameters, aggregated by personalized global parameters, and personalized adjustments are made to local model parameters to achieve different adjustments to local parameters.
[0024] Using the attention mechanism, the different adjustments of the local parameters obtained above are aggregated to obtain the updated parameters;
[0025] During the parameter aggregation process, exception handling is performed on the model parameters received from various participants.
[0026] As a further implementation, the specific process of implementing different adjustments to local parameters includes:
[0027] General global parameter aggregation, which aggregates the parameters of each participant by averaging;
[0028] Participants select Dropout parameter aggregation. When aggregating participants’ parameters, some participants’ parameters are randomly selected for aggregation in each round.
[0029] Personalized parameter aggregation: participants set personalized aggregation strategies based on their preferences to aggregate model parameters of other participants;
[0030] Personalized adjustment of local model parameters, introducing adjustment factors for the parameters P of local participant i i,t Make fine adjustments. Among them, Θ is the adjustment factor, and local participant i sets the adjustment factor Θ according to its personalized needs.
[0031] As a further implementation, during the parameter aggregation process, the specific process of performing exception processing on the model parameters received from each participant includes:
[0032] By comparing the two dimensions horizontally and vertically, we detect possible abnormal parameters and participants from the differences in parameter update patterns between participants and those of the participants themselves, and take the intersection of the detection results of the two dimensions as the abnormal object.
[0033] As a further implementation method, the process of anomaly detection through horizontal comparison includes: the horizontal dimension is that the model parameters updated by the local participant i for other participants participating in the tth round of collaborative modeling are subjected to anomaly detection using a clustering-based method, outliers are regarded as abnormal objects, and the participants of the abnormal objects are regarded as potential abnormal participants.
[0034] As a further implementation, the process of anomaly detection by longitudinal comparison includes: the longitudinal dimension is that the local participant i performs anomaly detection on the training parameters of other participants received in the tth round and previous training rounds, and for another participant m, all training parameters P from the 1st round to the current tth round are compared. m,1 , P m,2 …P m,t , anomaly detection is performed on it using a clustering-based method, and outliers are regarded as abnormal objects, participants of abnormal objects and potential abnormal participants.
[0035] As a further implementation method, for the detected abnormal parameters and participants, their influence in personalized aggregation is analyzed, and the parameters after this round of update are corrected. In the subsequent personalized modeling process, the updated parameters of the abnormal participants are shielded.
[0036] A personalized carbon emission prediction device based on federated learning, comprising:
[0037] The initialization module is configured to negotiate with the participants in the collaborative modeling to build an initialization model and pre-process the local data;
[0038] The update module of federated learning is configured to conduct multiple rounds of collaborative training based on the pre-processed local data through the federated learning framework based on the peer-to-peer network architecture. The parameters of the initialization model are continuously updated by using the parameter sharing between the participants. The updated model parameters are personalized and adjusted in combination with their own carbon emission data characteristics to determine the final model parameters and obtain the prediction model.
[0039] The prediction module is configured to obtain the predicted carbon emission value of the participant to be predicted in the next stage by using the prediction model based on the carbon emission change sequence data of the participant to be predicted.
[0040] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.
[0041] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The present invention adopts a personalized carbon emission prediction method based on federated learning. In a peer-to-peer network federated learning architecture, participants can implement personalized aggregation based on the attention mechanism by receiving updated parameters from other participants and combining their own actual conditions, thereby providing support for personalized prediction.
[0044] Through exception handling, anomalies in the update parameters of other participants are discovered, the adverse effects of their abnormal parameters on local personalized modeling are eliminated, and the accuracy and robustness of personalized modeling are further improved.
[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0047] Figure 1 A schematic diagram of a personalized carbon emission prediction method based on federated learning provided in this embodiment;
[0048] Figure 2 A schematic diagram of the process of personalized carbon emission prediction based on federated learning provided in this embodiment;
[0049] Figure 3 A schematic diagram of the structure of a personalized carbon emission prediction device based on federated learning provided in this embodiment. DETAILED DESCRIPTION
[0050] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0051] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0052] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0053] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.
[0054] Embodiment 1
[0055] like Figure 1 As shown, this embodiment discloses a personalized carbon emission prediction method based on federated learning. First, each participant in the collaborative modeling initializes the model and parameters constructed by it. At the same time, the participant preprocesses and normalizes the data involved in the training.
[0056] Each participant in the collaborative modeling conducts collaborative training through a federated learning framework based on a peer-to-peer network architecture. By sharing parameters among participants and combining their own actual conditions, personalized modeling of carbon emission prediction is achieved.
[0057] The carbon emission change sequence data of the participant to be predicted is input into the trained personalized prediction model, and the predicted carbon emission value of the participant to be predicted in the next stage is output.
[0058] The specific steps include:
[0059] 1. Initialization of personalized carbon emission prediction model: The participants in the collaborative modeling negotiate to build the initialization model M. The personalized model to be built for each participant i is called M i Participants conduct federated learning training based on a peer-to-peer network architecture to obtain personalized models.
[0060] The specific steps include:
[0061] 1.1 Participants negotiate the learning model and various initialization parameters based on the federated learning framework to achieve the initial configuration of personalized carbon emission prediction based on the federated learning framework. The specific steps include:
[0062] 1.1.1 Participants select the model to be collaboratively trained through the federated learning architecture, denoted as M.
[0063] 1.1.2 Participants negotiate the initial configuration of various parameters of the learning model to be collaboratively modeled. Participants can choose a unified initial parameter configuration or a random initial parameter configuration. Each participant i corresponds to model M iThe personalized parameter is denoted as P i,t , where t represents the number of training rounds, and the initialization parameters of the training model of each participant are P i,0 .
[0064] 1.1.3 To prevent overfitting of personalized modeling based on federated learning, each participant can use the method of random initialization of model parameters, that is,
[0065] P i,0 =RAND(M i ,P)
[0066] Among them, P represents the parameter set of the model M to be trained, RAND(M i ,P) is for model M i The parameter set P in sets the initialization parameters.
[0067] 1.2 Participants pre-process their local data, including the participants’ own archival information and local carbon emission data, to prepare for subsequent training based on the federated learning framework.
[0068] The participant profile information includes attributes that characterize specific aspects of the participant, such as the region and field to which the participant belongs. The carbon emission data is a set of serial data collected by the participant within a certain time period that characterizes the dynamic changes in the participant's carbon emissions.
[0069] Preprocess the data such as the participant's profile information, and normalize the participant's profile information; preprocess the sequence data set that represents the dynamic changes in the participant's carbon emissions, and normalize the sequence data set of dynamic changes in carbon emissions. The training data of participant i after normalization is recorded as Data i .
[0070] 2. Modeling of personalized carbon emission prediction model: Each participant in the collaborative modeling conducts multiple rounds of collaborative training through a federated learning framework based on a peer-to-peer network architecture. By sharing parameters among participants and combining the actual conditions of the participants themselves, personalized modeling of carbon emission prediction is achieved.
[0071] 2.1 In the tth round of training, participant i uses local carbon emission data Data i , based on the model M at the beginning of this iteration i,t-1 Parameter P i,t-1 After training, the initial parameter P after this round of update is obtained i,t .
[0072] 2.2 Participant i takes the latest parameter P obtained in this round of training i,tSend to other participants in the collaborative modeling (participants 1, 2, ...i-1, i+1, ..., n), and at the same time, receive the updated model parameters P from other participants in the collaborative modeling 1,t , P 2,t ,…,P i-1,t , P i+1,t ,…,P n,t .
[0073] 2.3 Participant i uses the latest parameters P obtained from other participants 1,t , P 2,t ,…,P i-1,t , P i+1,t ,…,P n,t And the latest parameter P obtained by itself i,t , based on the actual situation, the local model parameters are adjusted individually to obtain updated parameters that are consistent with local carbon emission data
[0074] The process for participants to personalize parameters is:
[0075] 2.3.1 Model parameters P obtained from other participants 1,t , P 2,t ,…,P i-1,t , P i+1,t ,…,P n,t Perform various operations, including general global parameter aggregation, participant selection Dropout parameter aggregation, personalized global parameter aggregation, local model parameter personalized adjustment, etc., to obtain different adjustments to local parameters. Specific different parameter personalized adjustments include the following:
[0076] 2.3.1.1 General global parameter aggregation, that is, using a general aggregation method to aggregate the parameters of each participant, the present invention performs this in an averaging manner.
[0077]
[0078] Among them, n m The carbon emission data of the mth participant m The amount of data in, n sum is the sum of all the data involved in the combined carbon emission data, P m,t are the model parameters obtained by the mth participant in the tth round.
[0079] 2.3.1.2 Participant Selection Dropout Parameter Aggregation. When performing participant parameter aggregation, the parameters of some participants are selected for aggregation with a certain probability. The present invention selects participants by random selection. Specifically, in the tth round, the participant sets a random value for each other participant and randomly sets a selection threshold, and all those greater than the threshold are selected to participate in parameter aggregation.
[0080]
[0081] Where I() is the indicator function. When the random value Pr assigned to user m is m,t Greater than a given threshold Pr threshold,t When the indicator function I() returns 1, it means that the user m is selected and the parameter P provided by the user m is m,t Participant aggregation. In this way, in each round of parameter aggregation, a part of other participants is randomly selected for parameter aggregation to prevent local optimality due to the participation of some participants and prevent overfitting.
[0082] 2.3.1.3 Personalized parameter aggregation. Participants can set personalized aggregation strategies based on their preferences to aggregate the model parameters of other participants.
[0083]
[0084] Among them, S i,m Indicates the personalization degree of local participant i and other participants m, and its value range is [0,1]. In the personalization parameter aggregation, the similarity between participant i and participant m can be used as S i,m .
[0085] 2.3.1.4 Personalized Adjustment of Local Model Parameters: The local model parameters can be fine-tuned to prevent entering the local optimal solution. i,t Make fine adjustments as follows:
[0086]
[0087] Among them, Θ is the adjustment factor, and local participant i can set the adjustment factor Θ according to its personalized needs.
[0088] 2.3.2 Using the attention mechanism, the different adjustments of the local parameters obtained above are aggregated to obtain the updated parameters. Based on the diversified aggregation of the attention mechanism, the various aggregated parameters obtained above are effectively aggregated to improve the diversity of parameter sources in the modeling process and prevent the modeling from falling into the local optimal solution. The diversified aggregation based on the attention mechanism is shown below:
[0089]
[0090] 2.3.3 During the parameter aggregation process, the model parameters received from each participant are processed for exceptions, including exception mining and exception compensation, to mine malicious participants and eliminate their adverse effects on the personalized modeling of local participants.
[0091] 2.3.3.1 Through horizontal and vertical comparisons, we can detect possible abnormal parameters and participants from the differences in parameter update patterns between participants and the differences in parameter update patterns of participants themselves.
[0092] 2.3.3.1.1 Anomaly Detection Based on Horizontal Dimension Comparison
[0093] The horizontal dimension is the model parameter P updated by the local participant i for other participants (participants 1, 2, ...i-1, i+1, ..., n) participating in the collaborative modeling in round t. 1,t , P 2,t ,…,P i-1,t , P i+1,t ,…,P n,t , using clustering-based methods to detect anomalies, taking outliers as abnormal objects, participants of abnormal objects and potential abnormal participants. The potential abnormal objects compared in the horizontal dimension in round t are:
[0094] Potential Anomaly h,t =OutlierDetection(P 1,t ,P 2,t ,…,P i-1,t , P i+1,t ,…,P n,t )
[0095] Among them, OutlierDetection() is an outlier detection method.
[0096] 2.3.3.1.2 Anomaly Detection Based on Vertical Dimension Comparison
[0097] The vertical dimension is that the local participant i performs anomaly detection on the training parameters of other participants received in the tth round and previous training rounds. For another participant m, all training parameters P from the 1st round to the current tth round are compared. m,1 , P m,2 …P m,t . We use clustering-based methods to detect anomalies, taking outliers as abnormal objects, participants of abnormal objects and potential abnormal participants. In the tth round, we make a longitudinal comparison of participant m to detect potential abnormal objects:
[0098] Potential Anomaly b,m,t=OutlierDetection(P m,1 , P m,2 …P m,t )
[0099] All other participants need to be subjected to anomaly detection in the longitudinal dimension.
[0100] 2.3.3.1.3 Potentially abnormal object detection
[0101] To further improve the detection efficiency of anomaly detection based on horizontal dimension comparison and vertical dimension comparison, the intersection of the two can be taken as the anomaly object, that is, the set of anomaly objects detected in the current round t is:
[0102]
[0103] 2.3.3.2 For the detected abnormal parameters and participants, analyze their influence in personalized aggregation, and correct the parameters after this round of update. In the subsequent personalized modeling process, the updated parameters of the abnormal participants are blocked.
[0104] For Potential Anomaly t The abnormal participant m in the set pa , calculate the sum of the parameters of each abnormal participant participating in the federated learning calculation in the first t rounds:
[0105]
[0106] For Potential Anomaly t The sum of the parameters of all abnormal participants in the set participating in the federated learning calculation in the first t rounds is:
[0107]
[0108] use Modify the parameters in the current training round of the current federated learning to obtain personalized aggregation parameters
[0109]
[0110] 2.4 Participants use the updated parameters to train local carbon emission data to obtain new parameters.
[0111] Local participant i passes model M i and personalized aggregation parameters Utilize local carbon emission data from participants i Perform training to obtain the next round of parameters P i,t+1 .
[0112] 2.5 Continue iterating until the local model of the participant converges or the maximum number of training times is reached, and the training model M obtained by participant i is obtained i .
[0113] 3. Personalized prediction of carbon emissions: Input the carbon emission change sequence data of the participants to be predicted into the trained personalized prediction model, and output the predicted carbon emission value of the participants to be predicted in the next stage. The participants use the parameters obtained by training as P i Personalized prediction model Input carbon emission series data carbonemission , obtain the predicted carbon emission value P for the next stage after prediction prediction ,Right now:
[0114]
[0115] Embodiment 2
[0116] A personalized carbon emission prediction device based on federated learning, comprising:
[0117] The initialization module is configured to negotiate with the participants in the collaborative modeling to build an initialization model and pre-process the local data;
[0118] The update module of federated learning is configured to conduct multiple rounds of collaborative training based on the pre-processed local data through the federated learning framework based on the peer-to-peer network architecture. The parameters of the initialization model are continuously updated by using the parameter sharing between the participants. The updated model parameters are personalized and adjusted in combination with their own carbon emission data characteristics to determine the final model parameters and obtain the prediction model.
[0119] The prediction module is configured to obtain the predicted carbon emission value of the participant to be predicted in the next stage by using the prediction model based on the carbon emission change sequence data of the participant to be predicted.
[0120] Among them, the update modules of federated learning include:
[0121] The personalized training module is configured to: implement personalized modeling based on federated learning, including a personalized aggregation module and an exception handling module;
[0122] The personalized aggregation module is configured to: perform personalized aggregation of updated parameters received by a participant from other participants during the training process based on its own situation, including a general global parameter aggregation module, a participant-selected Dropout parameter aggregation module, a personalized global parameter aggregation module, a local model parameter personalized adjustment module, and a diversified aggregation module based on the attention mechanism;
[0123] The general global parameter aggregation module is configured to: average and aggregate the parameters from the training processes of other participants;
[0124] The participant selection Dropout parameter aggregation module is configured to: when aggregating participant parameters, select some participants’ parameters for aggregation with a certain probability to improve the robustness of modeling and prevent overfitting;
[0125] The personalized global parameter aggregation module is configured to: the participants aggregate the model parameters of other participants according to the personalized aggregation strategy set by the participants according to their preferences;
[0126] The local model parameter personalized adjustment module is configured to: perform personalized fine-tuning on the local model parameters to prevent entering a local optimal solution;
[0127] The attention mechanism-based diversified aggregation module is configured to: aggregate the different adjustments of the local parameters obtained above using the attention mechanism to obtain updated parameters;
[0128] The exception handling module is configured to: detect the update parameters received from other participants during the training process, mine the abnormal parameters, and eliminate the adverse effects brought by them as much as possible, including an exception mining module and an exception compensation module;
[0129] The anomaly detection module is configured to: detect possible abnormal parameters and participants through horizontal comparison and vertical comparison, respectively from the differences in updating parameters between participants and the updating parameter patterns of participants themselves;
[0130] The abnormal compensation module is configured to: analyze the impact of detected abnormal parameters and participants in personalized aggregation, correct the parameters after this round of update, and shield the updated parameters of the abnormal participants in the subsequent personalized modeling process.
[0131] Embodiment 3
[0132] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the program.
[0133] Embodiment 4
[0134] The purpose of this embodiment is to provide a computer-readable storage medium.
[0135] A computer-readable storage medium stores a computer program, which executes the steps of the above method when executed by a processor.
[0136] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may 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.
[0137] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.
Claims
1. A personalized carbon emission prediction method based on federated learning, characterized in that: The following steps are involved: Participants in collaborative modeling negotiate to build an initialization model and pre-process local data; Based on the pre-processed local data, the corresponding participants in the collaborative modeling conduct multiple rounds of collaborative training through a federated learning framework based on a peer-to-peer network architecture, and continuously update the parameters of the initialization model by sharing parameters between participants. Combined with their own carbon emission data characteristics, the updated model parameters are adjusted individually to determine the final model parameters and obtain the prediction model. Based on the carbon emission change sequence data of the participant to be predicted, the prediction model is used to obtain the predicted carbon emission value of the participant to be predicted in the next stage.
2. The personalized carbon emission prediction method based on federated learning as claimed in claim 1, characterized in that: The specific process of the participants in the collaborative modeling negotiating and constructing the initialization model includes: the participants negotiate the learning model and initialization parameters based on the federated learning framework, and perform the initial configuration of the personalized carbon emission prediction based on the federated learning framework, including: (1) Participant i selects the model to be collaboratively trained through the federated learning architecture, denoted as M i ; (2) Participants negotiate the initial configuration of various parameters of the learning model to be collaboratively modeled. Each participant i corresponds to model M i The personalized parameter is denoted as P i,t , where t represents the number of training rounds, and the initialization parameters of the training model of each participant are P i,0 ; (3) Each participant uses the method of random initialization of model parameters, namely: P i,0 =RAND(M i ,P) Among them, P represents the parameter set of the model M to be trained, RAND(M i ,P) is for model M i The parameter set P in sets the initialization parameters.
3. The personalized carbon emission prediction method based on federated learning as claimed in claim 1, characterized in that: The specific process of preprocessing local data includes: preprocessing the participant's own file information and local carbon emission data. The participant's file information includes the participant's region and field; the carbon emission data is a set of serial data collected by the participant within a set time interval that characterizes the dynamic changes in the participant's carbon emissions.
4. The personalized carbon emission prediction method based on federated learning as claimed in claim 1, characterized in that: The specific process of continuously updating the parameters of the initialization model by using parameter sharing among participants includes: In the tth round of training, participant i uses local carbon emission data Data i , based on the model M at the beginning of this iteration i,t-1 Parameter P i,t-1 After training, the initial parameter P after this round of update is obtained i,t ; Participant i uses the latest parameter P obtained in this round of training i,t Send to other participants in collaborative modeling, and receive updated model parameters from other participants in collaborative modeling; Participant i uses the latest parameters of other participants and its own latest parameters P i,t .
5. The personalized carbon emission prediction method based on federated learning as claimed in claim 1, characterized in that: The specific process of personalizing the updated model parameters based on the characteristics of its own carbon emission data includes: The model parameters obtained from other participants are aggregated by common global parameters, aggregated by participant-selected Dropout parameters, aggregated by personalized global parameters, and personalized adjustments are made to local model parameters to achieve different adjustments to local parameters. Using the attention mechanism, the different adjustments of the local parameters obtained above are aggregated to obtain the updated parameters; During the parameter aggregation process, exception handling is performed on the model parameters received from various participants.
6. The personalized carbon emission prediction method based on federated learning as claimed in claim 5, characterized in that: The specific process of achieving different adjustments to local parameters includes: General global parameter aggregation, which aggregates the parameters of each participant by averaging; Participants select Dropout parameter aggregation. When aggregating participants’ parameters, some participants’ parameters are randomly selected for aggregation in each round. Personalized parameter aggregation: participants set personalized aggregation strategies based on their preferences to aggregate model parameters of other participants; Personalized adjustment of local model parameters, introducing adjustment factors for the parameters P of local participant i i,t Make fine adjustments. Among them, Θ is the adjustment factor, and local participant i sets the adjustment factor Θ according to its personalized needs.
7. The personalized carbon emission prediction method based on federated learning as claimed in claim 5, characterized in that: During the parameter aggregation process, the specific process of handling exceptions to the model parameters received from each participant includes: By comparing the two dimensions horizontally and vertically, we detect possible abnormal parameters and participants from the differences in parameter update patterns between participants and those of the participants themselves, and take the intersection of the detection results of the two dimensions as the abnormal object.
8. The personalized carbon emission prediction method based on federated learning as claimed in claim 7, characterized in that: The process of anomaly detection through horizontal comparison includes: the horizontal dimension is that the local participant i uses a clustering-based method to detect anomalies on the model parameters updated by other participants in the tth round of collaborative modeling, and outliers are regarded as abnormal objects, participants of abnormal objects and potential abnormal participants.
9. The personalized carbon emission prediction method based on federated learning as claimed in claim 7, characterized in that: The process of anomaly detection by longitudinal comparison includes: the longitudinal dimension is that the local participant i performs anomaly detection on the training parameters of other participants received in the tth round and previous training rounds. For another participant m, all training parameters P from the 1st round to the current tth round are compared. m,1 , P m,2 …P m,t , anomaly detection is performed on it using a clustering-based method, and outliers are regarded as abnormal objects, participants of abnormal objects and potential abnormal participants.
10. The personalized carbon emission prediction method based on federated learning as claimed in claim 7, characterized in that: For the detected abnormal parameters and participants, their influence in personalized aggregation is analyzed, and the parameters after this round of update are corrected. In the subsequent personalized modeling process, the updated parameters of the abnormal participants are blocked.
11. A personalized carbon emission prediction device based on federated learning, characterized by comprising: The initialization module is configured to negotiate with the participants in the collaborative modeling to build an initialization model and pre-process the local data; The update module of federated learning is configured to conduct multiple rounds of collaborative training based on the pre-processed local data through the federated learning framework based on the peer-to-peer network architecture. The parameters of the initialization model are continuously updated by using the parameter sharing between the participants. The updated model parameters are personalized and adjusted in combination with their own carbon emission data characteristics to determine the final model parameters and obtain the prediction model. The prediction module is configured to obtain the predicted carbon emission value of the participant to be predicted in the next stage by using the prediction model based on the carbon emission change sequence data of the participant to be predicted.
12. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of the method according to any one of claims 1 to 10.
13. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps in the method according to any one of claims 1 to 10 are completed.
Citation Information
Cited By
Carbon transaction data prediction method and system based on big data
CN119740715A
A carbon trading data prediction method and system based on big data
CN119740715B
Carbon emission prediction method and related equipment
CN120235321A
Federal learning-based multi-region transformer substation carbon emission collaborative prediction method and system
CN121071481A
Regional carbon emission prediction method and device based on multi-source data privacy protection
CN122596302A
