Search

CN-121981849-A - Energy management method, device, equipment and medium based on federal learning

CN121981849ACN 121981849 ACN121981849 ACN 121981849ACN-121981849-A

Abstract

The invention relates to the technical field of energy management and discloses an energy management method, device, equipment and medium based on federal learning, wherein the method comprises the steps of presetting a prediction model in a cloud according to an energy management scene, and training an adaptive selection model; selecting a prediction model by using the self-adaptive selection model, and finely adjusting the selected prediction model by using the locally cached multidimensional characteristic data; updating the finely tuned prediction model by utilizing a federal learning algorithm; the invention utilizes the self-adaptive selection model to select the prediction model, breaks the limitation of the traditional use of a fixed prediction model, enhances scene expansibility, fine-adjusts the prediction model, improves the suitability of the model and data characteristics, introduces a federal learning algorithm to update the prediction model, aggregates different node parameters, and improves the reasoning efficiency on edge equipment by the quantization model.

Inventors

  • FEI JUNBO

Assignees

  • 紫光数能(海南)技术有限公司

Dates

Publication Date
20260505
Application Date
20251226

Claims (10)

  1. 1. A federal learning-based energy management method, the method comprising: presetting a prediction model in a cloud according to an energy management scene, and training a self-adaptive selection model; selecting a prediction model by using the self-adaptive selection model, and finely adjusting the selected prediction model by using the locally cached multidimensional characteristic data; updating the finely tuned prediction model by utilizing a federal learning algorithm; quantifying the updated prediction model; and performing energy management by using the quantized prediction model.
  2. 2. The method of claim 1, wherein the training an adaptive selection model comprises: acquiring a data set, and carrying out feature vectorization on feature data in the data set to obtain a first feature vector; inputting the first feature vector into a prediction model to obtain a first predicted value; Inputting the first feature vector into a selection model to obtain a weighted prediction value; Calculating the difference value between the first predicted value and the weighted predicted value by using a loss function, updating the parameters of the selection model by using a gradient descent algorithm, and keeping the parameters of the prediction model unchanged; And carrying out iterative training on the selected model until the selected model converges to obtain the self-adaptive selected model.
  3. 3. The method of claim 1, wherein the fine-tuning the selected predictive model using locally cached multidimensional feature data comprises: Acquiring locally cached multidimensional feature data, and carrying out feature vectorization on the locally cached multidimensional feature data to obtain a second feature vector; Inputting the second feature vector into a selection model, and outputting a weight vector; Selecting the model with the largest weight as a prediction model; Inputting the locally cached multidimensional feature data into a prediction model to obtain a second predicted value; Calculating the loss of the second predicted value and the actual real value by using a loss function, and updating parameters of the predicted model by using a gradient descent algorithm; and fine-tuning the prediction model based on the updated parameters of the prediction model.
  4. 4. A method according to claim 3, characterized in that the method further comprises: If the prediction model is a single-node uploading parameter, the prediction model is directly updated by using the updated parameter of the prediction model.
  5. 5. The method of claim 4, wherein updating the trimmed prediction model using a federal learning algorithm comprises: if the prediction model is a non-single node uploading parameter, adopting a federal average algorithm for aggregation, and calculating an aggregation parameter; And updating the prediction model by using the calculated aggregation parameters.
  6. 6. The method of claim 1, wherein quantizing the updated predictive model comprises: Converting the FP32 model into an INT8 model; The INT8 model is issued to each edge compute node.
  7. 7. An energy management device based on federal learning, the device comprising: the model training module is used for presetting a prediction model in the cloud according to the energy management scene and training a self-adaptive selection model; The model fine tuning module is used for selecting a prediction model by utilizing the self-adaptive selection model and fine tuning the selected prediction model by utilizing the locally cached multidimensional characteristic data; the model updating module is used for updating the finely tuned prediction model by utilizing a federal learning algorithm; the model quantization module is used for quantizing the updated prediction model; and the management module is used for carrying out energy management by utilizing the quantized prediction model.
  8. 8. An electronic device, comprising: A memory and a processor in communication with each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the federal learning-based energy management method according to any one of claims 1 to 6.
  9. 9. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the federal learning-based energy management method according to any one of claims 1 to 6.
  10. 10. A computer program product comprising computer instructions for causing a computer to perform the federal learning-based energy management method of any one of claims 1 to 6.

Description

Energy management method, device, equipment and medium based on federal learning Technical Field The invention relates to the technical field of energy management, in particular to an energy management method, device, equipment and medium based on federal learning. Background The modern industrial park, factory and the like break through the traditional energy management mode, and the production, storage, conversion and consumption of multiple energy sources such as electricity, gas, cold, heat and the like are cooperatively optimized, so that the purposes of improving the energy utilization efficiency, reducing the energy consumption cost and improving the renewable energy consumption capability are achieved. At present, how to realize comprehensive energy management on parks and factories becomes a problem to be solved urgently. Disclosure of Invention The invention provides an energy management method, device, equipment and medium based on federal learning, which are used for solving the problem of how to realize comprehensive energy management on parks and factories. In a first aspect, the present invention provides a federal learning-based energy management method, the method comprising: presetting a prediction model in a cloud according to an energy management scene, and training a self-adaptive selection model; selecting a prediction model by using the self-adaptive selection model, and finely adjusting the selected prediction model by using the locally cached multidimensional characteristic data; updating the finely tuned prediction model by utilizing a federal learning algorithm; quantifying the updated prediction model; and performing energy management by using the quantized prediction model. According to the invention, the adaptive selection model is trained to select the prediction model, so that the limitation of the traditional use of the fixed prediction model is broken, the scene expansibility is enhanced, the prediction model is finely adjusted by locally cached multidimensional feature data, the suitability between the model and the data features is improved, the federal learning algorithm is introduced to update the prediction model, different node parameters are aggregated, the model is quantized, the reasoning efficiency on the edge equipment is improved, and the prediction model is utilized to conduct energy management, so that comprehensive energy management is realized. In an alternative embodiment, training the adaptive selection model includes: acquiring a data set, and carrying out feature vectorization on feature data in the data set to obtain a first feature vector; inputting the first feature vector into a prediction model to obtain a first predicted value; inputting the first feature vector into a selection model to obtain a weighted prediction value; Calculating the difference value between the first predicted value and the weighted predicted value by using a loss function, updating the parameters of the selection model by using a gradient descent algorithm, and keeping the parameters of the prediction model unchanged; And carrying out iterative training on the selected model until the selected model converges to obtain the self-adaptive selected model. According to the invention, the parameters of the selection model are updated by combining the predicted value output by the prediction model and the weighted predicted value output by the selection model until the selection model converges, so that the training of the self-adaptive selection model is completed, and a model foundation is provided for the subsequent selection of the prediction model. In an alternative embodiment, fine tuning the selected predictive model using locally cached multidimensional feature data includes: Acquiring locally cached multidimensional feature data, and carrying out feature vectorization on the locally cached multidimensional feature data to obtain a second feature vector; inputting the second feature vector into the selection model, and outputting a weight vector; Selecting the model with the largest weight as a prediction model; Inputting the locally cached multidimensional feature data into a prediction model to obtain a second predicted value; Calculating the loss of the second predicted value and the actual real value by using a loss function, and updating parameters of the predicted model by using a gradient descent algorithm; and fine-tuning the prediction model based on the updated parameters of the prediction model. According to the invention, the final prediction model is selected by combining the weight vector output by the selection model, and the parameters of the prediction model are updated by adopting a gradient descent algorithm, so that the fine adjustment of the prediction model is realized, the prediction model adopting fixed parameters is replaced, and the prediction deviation of the universal model in a local scene is avoided. In an alternative embodiment, the method fu