Virtual power plant data interaction method, equipment and medium based on federated learning
Through the virtual power plant data interaction method based on federated learning, the virtual power plant terminal cluster collects and processes local power operation information, and sends the encrypted model weight information to the cloud server for convergence and update, solving the problem that data sharing cannot be performed between virtual power plants, realizing data sharing and model training, and improving the robustness and adaptability of the model.
Patent Information
- Application Number
- CN202410743881.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-06-11
AI Technical Summary
When using machine learning methods to predict the marginal cost of virtual power plants, data sharing cannot be performed between virtual power plants due to data privacy issues, resulting in the model being unable to adapt to multiple scenarios and causing waste of resources.
Using a virtual power plant data interaction method based on federated learning, local power operation information is collected and processed through each virtual power plant terminal in the virtual power plant terminal cluster, and the encrypted model weight information is sent to the cloud server for convergence and update, realizing data sharing and model training.
On the premise of ensuring that user data is invisible, data sharing between virtual power plants can be realized, the robustness of the model will be improved, the data silo effect will be broken, and the adaptability and accuracy of the model will be improved.
Smart Images

Figure CN118747538B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a virtual power plant data interaction method, device and medium based on federated learning. Background Art
[0002] As a system that integrates multiple distributed energy resources (such as wind power, solar energy, energy storage facilities, etc.), virtual power plants require efficient operation strategies to optimize resource allocation, reduce operating costs, and improve market competitiveness. Marginal cost prediction plays a key role in this, directly affecting the quotation strategy and profitability of virtual power plants. For the prediction of marginal costs on the virtual power plant side, with the explosive growth of hardware computing power, machine learning methods are mostly used.
[0003] However, in existing machine learning, since electricity-related data is relatively sensitive privacy data, the models are trained using local data. Different virtual power plants cannot share data, which makes the models unable to adapt to various scenarios and causes waste of resources.
[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a virtual power plant data interaction method, device, electronic device and computer-readable medium based on federated learning to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a virtual power plant data interaction method based on federated learning, the method comprising: each virtual power plant terminal in the virtual power plant terminal cluster executes the following steps in response to receiving a model update instruction: collecting local power operation information, wherein the local power operation information comprises: a power operation data set; performing outlier processing and time granularity processing on the local power operation information to obtain the processed local power operation information as target power operation information; obtaining network model structure information and initial model weight information of a corresponding local power marginal value prediction model from an associated cloud server; training the local power marginal value prediction model according to the target power operation information to obtain a trained power marginal value prediction model. The target power marginal value prediction model is used as the target power marginal value prediction model; the model weight information of the target power marginal value prediction model is encrypted to generate encrypted model weight information; the encrypted model weight information is sent to the cloud server; the cloud server responds to receiving each encrypted model weight information by decrypting each encrypted model weight information to obtain each decrypted model weight information; the cloud server fuses each decrypted model weight information to generate fused model weight information, and updates the model weight of the original power marginal value prediction model locally on the server according to the fused model weight information; the cloud server verifies the updated power marginal value prediction model according to the verification data set.
[0008] In a second aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0009] In a third aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.
[0010] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the virtual power plant data interaction method based on federated learning of some embodiments of the present disclosure, the data of different virtual power plants are aggregated through federated learning, and distributed model training is performed, so as to realize data sharing under the premise of ensuring that user data is invisible, improve the robustness of the model, and break the data island effect. First, each virtual power plant terminal in the virtual power plant terminal cluster responds to receiving the model update instruction and performs the following steps: collecting local power operation information, wherein the local power operation information includes: power operation data set; performing abnormal value processing and time granularity processing on the local power operation information to obtain the processed local power operation information as the target power operation information; obtaining the network model structure information and initial model weight information of the corresponding local power marginal value prediction model from the associated cloud server; training the local power marginal value prediction model according to the target power operation information to obtain the trained power marginal value prediction model as the target power marginal value prediction model; encrypting the model weight information of the target power marginal value prediction model to generate encrypted model weight information; sending the encrypted model weight information to the cloud server. Therefore, different virtual power plants can use local data to train the model respectively. Then, in response to receiving each encrypted model weight information, the cloud server decrypts each encrypted model weight information to obtain each decrypted model weight information; the cloud server fuses each decrypted model weight information to generate fused model weight information, and updates the model weight of the original local power marginal value prediction model of the server according to the fused model weight information. Therefore, by aggregating the previous data of different virtual power plants through federated learning, distributed model training is carried out, data sharing is realized under the premise of ensuring that user data is invisible, the robustness of the model is improved, and the data island effect is broken. Finally, the cloud server verifies the updated power marginal value prediction model based on the verification data set. Therefore, it can be judged whether the accuracy of the model has reached the standard. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0012] Figure 1 is a flowchart of some embodiments of a virtual power plant data interaction method based on federated learning according to the present disclosure;
[0013] Figure 2It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0014] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0015] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0016] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0017] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0019] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0020] Figure 1 1 is a flowchart of some embodiments of the virtual power plant data interaction method based on federated learning according to the present disclosure. 100 of some embodiments of the virtual power plant data interaction method based on federated learning according to the present disclosure is shown. The virtual power plant data interaction method based on federated learning includes the following steps:
[0021] Step 101: In response to receiving a model update instruction, each virtual power plant terminal in the virtual power plant terminal cluster executes the following steps:
[0022] Step 1011, collecting local power operation information.
[0023] In some embodiments, the virtual power plant terminal can collect local power operation information of the virtual power plant terminal. Among them, the above-mentioned local power operation information includes: power operation data set. The power operation data may include: power production, power demand, power generation cost, power market transaction price, and transaction data. Among them, each power operation data corresponds to a time granularity. That is, the various power operation data in the power operation data set have a sequence. The virtual power plant terminal may be a terminal device for controlling / monitoring a virtual power plant. For example, the time granularity may be 7 days. Power production may represent the total power production within 7 days. Power demand may represent the total demand for power within 7 days. Power generation cost may refer to the cost of producing power within 7 days. The power market transaction price may represent the unit transaction price per kilowatt-hour of electricity within 7 days. Transaction data may refer to the circulation data of power within 7 days (for example, daily transaction power, total transaction price). The model update instruction may refer to an instruction sent by a cloud server to train and update the power marginal value prediction model.
[0024] Step 1012, performing abnormal value processing and time granularity processing on the above local power operation information to obtain processed local power operation information as target power operation information.
[0025] In some embodiments, the virtual power plant terminal may perform outlier processing and time granularity processing on the above-mentioned local power operation information to obtain the processed local power operation information as the target power operation information. Outlier processing may refer to removing outliers in the power operation data set included in the above-mentioned local power operation information. For example, remove null values and values that do not conform to the curve logic in the power operation data set, such as very high or very low discrete values. Time granularity processing may refer to performing time granularity processing on the power operation data set after outlier processing, which may include: resampling and downsampling. Resampling may use cubic spline interpolation, and downsampling may use the method of averaging several values.
[0026] Step 1013, obtaining network model structure information and initial model weight information corresponding to the local power marginal value prediction model from the associated cloud server.
[0027] In some embodiments, the above-mentioned virtual power plant terminal can obtain the network model structure information and initial model weight information of the corresponding local power marginal value prediction model from the associated cloud server. Each virtual power plant terminal is pre-set with a power marginal value prediction model. The power marginal value prediction model can be an LSTM (Long Short-Term Memory) network model or other neural network models. For example, the power marginal value prediction model can also be a DCN (Deep & Cross Network) or a transformer model. The network model structure information may include the network hierarchical structure of the model (power marginal value prediction model), the number of nodes in each layer, the activation function type and other information. The initial model weight information may include the weight set of each node in the network model (power marginal value prediction model).
[0028] Step 1014: train the local power marginal value prediction model based on the target power operation information to obtain a trained power marginal value prediction model as the target power marginal value prediction model.
[0029] In some embodiments, the virtual power plant terminal can train the local power marginal value prediction model according to the target power operation information to obtain a trained power marginal value prediction model as the target power marginal value prediction model. For example, the virtual power plant terminal can use the power operation data set included in the target power operation information as the model input, and train the local power marginal value prediction model through the training method of the deep neural network model.
[0030] In practice, the above-mentioned execution entity can train the above-mentioned local electricity marginal value prediction model through the following steps:
[0031] The first step is to train a power behavior label classification model and a power feedback label classification model according to the power operation data set included in the above-mentioned target power operation information. Among them, the above-mentioned power behavior label classification model and the above-mentioned power feedback label classification model both correspond to power feature sequences, and the power operation data in the power operation data set include: power behavior labels, power feedback labels and power feature information sets. Power behavior labels may refer to behavior labels made for power production matters. For example, power behavior labels may be setting a threshold for daily power production, setting the time for daily power production, the number of machine operations, etc. Power feedback labels may refer to labels that remind or modify feedback for each behavior in the power behavior label. For example. The power feedback label may be to increase the threshold for daily power production or reduce the time for daily power production. The power feature information set may include: feature information such as the maximum operating power of the virtual power plant, the maximum unit production power, the maximum transmission power, and the cost of power generation.
[0032] For example, first, the above-mentioned execution subject can use the power behavior labels included in each power operation data in the power operation data set as sample labels, and use the power feedback labels and power feature information sets included in each power operation data set in the power operation data set as input features, and train the power behavior label classification model according to the above-mentioned power operation data set. For example, the power behavior label classification model can be LightGBM. There is no limitation on the model type of the power behavior label classification model. Then, the various power features used for judgment in the classification process of the power behavior label classification model can be combined in sequence to obtain a power feature sequence corresponding to the above-mentioned power behavior label classification model.
[0033] For another example, the power feedback labels included in each power operation data in the power operation data set can be used as sample labels, and the power feedback labels and power feature information sets included in each power operation data set in the power operation data set can be used as input features, and the power feedback label classification model can be obtained by training according to the above power operation data set. For example, the power feedback label classification model can be LightGBM. There is no limitation on the model type of the power feedback label classification model. Then, the various power features used for judgment in the classification process of the power feedback label classification model can be combined in sequence to obtain a power feature sequence corresponding to the above power feedback label classification model.
[0034] The second step is to generate a power behavior associated feature set based on the power feature sequence corresponding to the power behavior label classification model and the power feature sequence corresponding to the power feedback label classification model. For example, the execution subject may determine the intersection of the power feature sequence corresponding to the power behavior label classification model and the power feature sequence corresponding to the power feedback label classification model as the power behavior associated feature set.
[0035] The third step is to train the local power marginal value prediction model based on the above power behavior associated feature set and the above power operation data set to obtain a trained power marginal value prediction model.
[0036] The third step may include the following sub-steps:
[0037] The first sub-step is to add the power feedback feature to the power behavior associated feature set to update the power behavior associated feature set. The power feedback feature may be a feature corresponding to the power feedback tag.
[0038] The second sub-step is to generate a power operation data training sample set according to the training set corresponding to the above power operation data set and the updated power behavior associated feature set. Each power operation data training sample in the above power operation data training sample set includes a power behavior label and each power feature information of the corresponding power behavior associated feature set, and the power feature information corresponding to the power feedback feature is the power feedback label. For example, for each verification data in the training set, the above execution subject can remove each power feature information in the above verification data except for each power feature information of the corresponding updated power behavior associated feature set to obtain the power operation data training sample.
[0039] The third sub-step is to perform the following training steps based on the power operation data training sample set:
[0040] In the first training step, each power operation data training sample in at least one power operation data training sample in the power operation data training sample set is input into the embedding layer included in the local power marginal value prediction model to obtain each word vector of the power behavior associated feature set corresponding to each power operation data training sample in the at least one power operation data training sample. The above embedding layer can be used to generate a word vector (Embedding) of power feature information. One power behavior associated feature can correspond to one word vector.
[0041] The second training step is to generate a predicted power behavior label corresponding to each power operation data training sample in at least one power operation data training sample according to each word vector corresponding to each power operation data training sample in at least one power operation data training sample and the local power marginal value prediction model. The above-mentioned execution subject can input the above-mentioned each word vector into the model structure layer after the embedding layer in the local power marginal value prediction model to obtain the predicted power behavior label corresponding to the above-mentioned power operation data training sample. Here, there is no limitation on the model structure layer after the embedding layer in the local power marginal value prediction model.
[0042] The third training step is to compare the predicted power behavior label and the power behavior label corresponding to each power operation data training sample in at least one power operation data training sample to obtain a comparison result. The execution subject can determine whether the predicted power behavior label and the power behavior label corresponding to each power operation data training sample are the same, so as to generate the accuracy of each predicted power behavior label corresponding to each power operation data training sample as the comparison result.
[0043] In the fourth training step, in response to determining that the comparison result meets the optimization condition, the local power marginal value prediction model is determined as the trained power marginal value prediction model. The optimization condition may be that the accuracy is greater than a preset value.
[0044] The fourth sub-step is to generate a first label loss value according to the predicted power behavior label and the power behavior label corresponding to each power operation data training sample in at least one power operation data training sample. In practice, for each power operation data training sample in at least one power operation data training sample, the above-mentioned execution subject can generate a sample loss value based on the predicted power behavior label and the power behavior label corresponding to the above-mentioned wall appearance image training sample. Here, the sample loss value can be determined by a cross entropy loss function. Then, the sum of the generated sample loss values can be determined as the first loss value.
[0045] The fifth sub-step is to generate a second label loss value according to each word vector of the above-mentioned power behavior associated feature set corresponding to each power operation data training sample in at least one power operation data training sample. The power behavior associated features in the power behavior associated feature set correspond to feature domains. The feature domain may be the category to which the power feature belongs. A feature domain may contain at least one power feature. Here, the feature domain of the power feature may be pre-divided. For example, for each feature domain, the Euclidean distance between each two word vectors corresponding to the feature domain may be determined. Afterwards, the sum of the determined Euclidean distances may be determined as the second label loss value.
[0046] In a sixth sub-step, a model loss value is generated according to the first label loss value and the second label loss value. The sum of the first label loss value and the second label loss value may be determined as the model loss value.
[0047] In the seventh sub-step, in response to determining that the comparison result does not meet the optimization condition, the network parameters of the local power marginal value prediction model are adjusted according to the model loss value, the unused power operation data training samples are used to form a power operation data training sample set, and the adjusted local power marginal value prediction model is used as the local power marginal value prediction model to perform the above training step again. The above execution subject can use the gradient descent method to adjust the network parameters of the local power marginal value prediction model according to the model loss value.
[0048] In this way, existing real data can be used without any assumptions, which reduces the complexity of the model and the risk of overfitting and improves the accuracy of the model.
[0049] Step 1015: encrypt the model weight information of the target electricity marginal value prediction model to generate encrypted model weight information.
[0050] In some embodiments, the virtual power plant terminal may encrypt the model weight information of the target power marginal value prediction model to generate encrypted model weight information. For example, the model weight information of the target power marginal value prediction model may be encrypted by an encryption algorithm to generate encrypted model weight information. Encryption algorithms include: RSA, ECC (elliptic curve cryptography), DSA (digital signature algorithm), etc.
[0051] Step 1016, sending the encrypted model weight information to the cloud server.
[0052] In some embodiments, the virtual power plant terminal may send the encrypted model weight information to the cloud server.
[0053] Step 102: In response to receiving each encrypted model weight information, the cloud server decrypts each encrypted model weight information to obtain each decrypted model weight information.
[0054] In some embodiments, the cloud server may, in response to receiving each encrypted model weight information, decrypt each encrypted model weight information to obtain each decrypted model weight information. For example, the cloud server may decrypt each encrypted model weight information using a pre-stored private key to obtain each decrypted model weight information. Each encrypted model weight information corresponds to a virtual power plant terminal.
[0055] Step 103: the cloud server fuses the above-mentioned decrypted model weight information to generate fused model weight information, and updates the model weight of the original electricity marginal value prediction model local to the server according to the above-mentioned fused model weight information.
[0056] In some embodiments, the cloud server may fuse the above-mentioned decrypted model weight information to generate fused model weight information, and update the model weight of the original local electricity marginal value prediction model of the server according to the fused model weight information. For example, the weights in the decrypted model weight information may be fused through FedAvg (federated average algorithm) to generate fused model weight information. The fused model weight information contains the weight set of each node after fusion in the network model. Afterwards, the cloud server may replace the weights of each node in each network layer of the local original electricity marginal value prediction model with the weights contained in the above-mentioned combined model weight information.
[0057] Step 104: the cloud server verifies the updated electricity marginal value prediction model based on the verification data set.
[0058] In some embodiments, the cloud server can verify the updated power marginal value prediction model based on the verification data set. The verification data in the verification data set includes: power behavior labels, power feedback labels, and power feature information sets. For example, the cloud server can use the verification data set to verify the updated power marginal value prediction model to determine whether the accuracy of the model has reached the standard. If it reaches the standard, the training ends.
[0059] In practice, the cloud server can verify the updated electricity marginal value prediction model through the following steps:
[0060] In the first step, based on the above verification data set, a power behavior label classification model and a power feedback label classification model are trained, wherein the above power behavior label classification model and the above power feedback label classification model both correspond to power feature sequences.
[0061] For example, first, the above-mentioned execution entity can use the power behavior labels included in each verification data in the verification data set as sample labels, and the power feedback labels and power feature information sets included in each verification data set in the verification data set as input features, and train the power behavior label classification model according to the above-mentioned verification data set. For example, the power behavior label classification model can be LightGBM. There is no limitation on the model type of the power behavior label classification model. Then, the various power features used for judgment in the classification process of the power behavior label classification model can be combined in sequence to obtain the power feature sequence corresponding to the above-mentioned power behavior label classification model.
[0062] For another example, the power feedback labels included in each verification data in the verification data set can be used as sample labels, and the power feedback labels and power feature information sets included in each verification data set in the verification data set can be used as input features, and a power feedback label classification model can be obtained by training according to the above verification data set. For example, the power feedback label classification model can be LightGBM. There is no limitation on the model type of the power feedback label classification model. Then, the various power features used for judgment in the classification process of the power feedback label classification model can be combined in sequence to obtain a power feature sequence corresponding to the above power feedback label classification model.
[0063] In the second step, a power behavior associated feature set is generated according to the power feature sequence corresponding to the power behavior label classification model and the power feature sequence corresponding to the power feedback label classification model.
[0064] The second step may include the following sub-steps:
[0065] In the first sub-step, each power feature that satisfies a preset feature condition in the power feature sequence corresponding to the power behavior label classification model is determined as a first power feature group. The preset feature condition may be that the power feature is a preset number of power features arranged in front.
[0066] In the second sub-step, each power feature satisfying a preset feature condition in the power feature sequence corresponding to the power feedback label classification model is determined as a second power feature group.
[0067] The third sub-step is to determine the intersection of the first power feature group and the second power feature group as a power behavior associated feature set.
[0068] The third step is to verify the updated electricity marginal value prediction model based on the above-mentioned electricity behavior association feature set and the above-mentioned verification data set to obtain the model verification result.
[0069] The third step may include the following sub-steps:
[0070] The first sub-step is to add the power feedback feature to the power behavior associated feature set to update the power behavior associated feature set. The power feedback feature may be a feature corresponding to the power feedback tag.
[0071] The second sub-step is to generate a power data verification sample set according to the training set corresponding to the above verification data set and the updated power behavior associated feature set. Each power data verification sample in the above power data verification sample set includes a power behavior label and each power feature information of the corresponding power behavior associated feature set, and the power feature information corresponding to the power feedback feature is the power feedback label. For example, for each verification data in the training set, the above execution subject can remove each power feature information in the above verification data except for each power feature information of the corresponding updated power behavior associated feature set to obtain a power data verification sample.
[0072] The third sub-step is to perform the following verification steps based on the power data verification sample set:
[0073] In the first verification step, each power data verification sample in at least one power data verification sample in the power data verification sample set is input into the embedding layer included in the updated power marginal value prediction model to obtain each word vector of the power behavior associated feature set corresponding to each power data verification sample in the at least one power data verification sample. The above embedding layer can be used to generate a word vector (Embedding) of power feature information. One power behavior associated feature can correspond to one word vector.
[0074] The second verification step is to generate a predicted power behavior label corresponding to each power data verification sample in at least one power data verification sample according to each word vector corresponding to each power data verification sample in at least one power data verification sample and the updated power marginal value prediction model. The above-mentioned execution subject can input the above-mentioned each word vector into the model structure layer after the embedding layer in the updated power marginal value prediction model to obtain the predicted power behavior label corresponding to the above-mentioned power data verification sample. Here, there is no limitation on the model structure layer after the embedding layer in the updated power marginal value prediction model.
[0075] The third verification step is to compare the predicted power behavior label and the power behavior label corresponding to each power data verification sample in at least one power data verification sample to obtain a comparison result. The above-mentioned execution subject can determine whether the predicted power behavior label and the power behavior label corresponding to each power data verification sample are the same, so as to generate the accuracy of each predicted power behavior label corresponding to each power data verification sample as the comparison result.
[0076] In a fourth verification step, in response to determining that the comparison result does not meet the optimization condition, a model verification result indicating that the model does not meet the standard is generated. The above-mentioned optimization condition may be that the accuracy is greater than a preset value.
[0077] Optionally, in response to determining that the model verification has failed, the cloud server sends the fusion model weight information to the virtual power plant terminal cluster, and instructs the virtual power plant terminal cluster to re-train the local electricity marginal value prediction model based on the fusion model weight information.
[0078] In some embodiments, in response to determining that the model verification has not passed, the cloud server may send the fusion model weight information to the virtual power plant terminal cluster, and instruct the virtual power plant terminal cluster to retrain the local power marginal value prediction model according to the fusion model weight information. That is, after receiving the fusion model weight information, each virtual power plant terminal replaces each weight in the local power marginal value prediction model with each weight included in the fusion model weight information. Afterwards, the local power marginal value prediction model is trained again using unused training samples.
[0079] Reference below Figure 2, which shows a schematic diagram of the structure of an electronic device (e.g., a computing device) 200 suitable for implementing some embodiments of the present disclosure. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 2 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0080] like Figure 2 As shown, the electronic device 200 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 202 or a program loaded from a storage device 208 into a random access memory (RAM) 203. In the RAM 203, various programs and task data required for the operation of the electronic device 200 are also stored. The processing device 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0081] Typically, the following devices may be connected to the I / O interface 205: an input device 206 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 209. The communication device 209 may allow the electronic device 200 to communicate with other devices wirelessly or by wire to exchange task data. Although Figure 2 The electronic device 200 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 2 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0082] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 209, or installed from the storage device 208, or installed from the ROM 202. When the computer program is executed by the processing device 201, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0083] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a mission data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated mission data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0084] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital task data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0085] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: each virtual power plant terminal in the virtual power plant terminal cluster responds to receiving the model update instruction and executes the following steps: collecting local power operation information, wherein the above-mentioned local power operation information includes: power operation data set; performing outlier processing and time granularity processing on the above-mentioned local power operation information to obtain the processed local power operation information as the target power operation information; obtaining the network model structure information and initial model weight information of the corresponding local power marginal value prediction model from the associated cloud server; training the above-mentioned local power marginal value prediction model according to the above-mentioned target power operation information to obtain the trained power marginal value prediction model. A marginal value prediction model is used as a target power marginal value prediction model; the model weight information of the target power marginal value prediction model is encrypted to generate encrypted model weight information; the encrypted model weight information is sent to the cloud server; the cloud server responds to receiving each encrypted model weight information by decrypting each encrypted model weight information to obtain each decrypted model weight information; the cloud server fuses each decrypted model weight information to generate fused model weight information, and updates the model weight of the original power marginal value prediction model locally on the server according to the fused model weight information; the cloud server verifies the updated power marginal value prediction model according to the verification data set.
[0086] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including product-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0087] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0088] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0089] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A virtual power plant data interaction method based on federated learning, comprising: In response to receiving the model update instruction, each virtual power plant terminal in the virtual power plant terminal cluster performs the following steps: Collecting local power operation information, wherein the local power operation information includes: a power operation data set; Performing abnormal value processing and time granularity processing on the local power operation information to obtain processed local power operation information as target power operation information; Obtaining network model structure information and initial model weight information corresponding to the local power marginal value prediction model from the associated cloud server; According to the target power operation information, the local power marginal value prediction model is trained to obtain a trained power marginal value prediction model as the target power marginal value prediction model; Encrypting the model weight information of the target electricity marginal value prediction model to generate encrypted model weight information; Sending the encrypted model weight information to the cloud server; In response to receiving each encrypted model weight information, the cloud server decrypts each encrypted model weight information to obtain each decrypted model weight information; The cloud server performs fusion processing on the weight information of each decrypted model to generate fusion model weight information, and updates the model weight of the original power marginal value prediction model of the server locally according to the fusion model weight information; The cloud server verifies the updated power marginal value prediction model according to the verification data set, wherein the verification data in the verification data set includes: power behavior labels, power feedback labels and power feature information sets; In response to determining that the model verification has not passed, the cloud server sends the fusion model weight information to the virtual power plant terminal cluster, and instructs the virtual power plant terminal cluster to retrain the local power marginal value prediction model according to the fusion model weight information; The verification process of updating the power marginal value prediction model according to the verification data set includes: According to the verification data set, training a power behavior label classification model and a power feedback label classification model, wherein the power behavior label classification model and the power feedback label classification model both correspond to a power feature sequence; generating a power behavior associated feature set according to the power feature sequence corresponding to the power behavior label classification model and the power feature sequence corresponding to the power feedback label classification model; According to the power behavior associated feature set and the verification data set, verifying the updated power marginal value prediction model to obtain a model verification result; The step of generating a power behavior associated feature set according to the power feature sequence corresponding to the power behavior label classification model and the power feature sequence corresponding to the power feedback label classification model includes: Determine each power feature that meets a preset feature condition in the power feature sequence corresponding to the power behavior label classification model as a first power feature group; Determine each power feature that meets a preset feature condition in the power feature sequence corresponding to the power feedback label classification model as a second power feature group; determining an intersection of the first power feature group and the second power feature group as a power behavior associated feature set; The updating of the power marginal value prediction model is verified according to the power behavior associated feature set and the verification data set to obtain the model verification result, including: Adding the power feedback feature to the power behavior associated feature set to update the power behavior associated feature set; Generate a power data verification sample set according to the training set corresponding to the verification data set and the updated power behavior associated feature set, wherein each power data verification sample in the power data verification sample set includes a power behavior label and each power feature information of the corresponding power behavior associated feature set, and the power feature information corresponding to the power feedback feature is the power feedback label; Based on the power data verification sample set, the following verification steps are performed: Inputting each power data verification sample of at least one power data verification sample in the power data verification sample set into the embedding layer included in the updated power marginal value prediction model to obtain each word vector of each power data verification sample in the at least one power data verification sample corresponding to the power behavior associated feature set; Generate a predicted power behavior label corresponding to each power data verification sample in at least one power data verification sample according to each word vector corresponding to each power data verification sample in at least one power data verification sample and update the power marginal value prediction model; Comparing the predicted power behavior label and the power behavior label corresponding to each power data verification sample in at least one power data verification sample to obtain a comparison result; In response to determining that the comparison result does not meet the optimization condition, generating a model validation result indicating that the model does not meet the condition; The method of training the local power marginal value prediction model according to the target power operation information to obtain the trained power marginal value prediction model includes: According to the power operation data set included in the target power operation information, a power behavior label classification model and a power feedback label classification model are trained, wherein the power behavior label classification model and the power feedback label classification model both correspond to power feature sequences, and the power operation data in the power operation data set include: power behavior labels, power feedback labels and power feature information sets; generating a power behavior associated feature set according to the power feature sequence corresponding to the power behavior label classification model and the power feature sequence corresponding to the power feedback label classification model; Training a local power marginal value prediction model according to the power behavior associated feature set and the power operation data set to obtain a trained power marginal value prediction model; The training of the local power marginal value prediction model according to the power behavior associated feature set and the power operation data set to obtain the trained power marginal value prediction model includes: Adding the power feedback feature to the power behavior associated feature set to update the power behavior associated feature set; Generate a power operation data training sample set according to the training set corresponding to the power operation data set and the updated power behavior associated feature set, wherein each power operation data training sample in the power operation data training sample set includes a power behavior label and each power feature information of the corresponding power behavior associated feature set, and the power feature information corresponding to the power feedback feature is the power feedback label; Based on the power operation data training sample set, the following training steps are performed: Inputting each power operation data training sample in at least one power operation data training sample in the power operation data training sample set into an embedding layer included in the local power marginal value prediction model to obtain each word vector corresponding to the power behavior associated feature set for each power operation data training sample in the at least one power operation data training sample; Generate a predicted power behavior label corresponding to each power operation data training sample in at least one power operation data training sample according to each word vector corresponding to each power operation data training sample in at least one power operation data training sample and a local power marginal value prediction model; Comparing the predicted power behavior label and the power behavior label corresponding to each power operation data training sample in at least one power operation data training sample to obtain a comparison result; In response to determining that the comparison result reaches the optimization condition, the local electricity marginal value prediction model is determined as a trained electricity marginal value prediction model.
2. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in claim 1.
3. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to claim 1 is implemented.
Citation Information
Patent Citations
Power terminal multi-task federal learning method for power internet of things
CN115049522A
Power data sharing method based on transverse federated learning
CN115775010A