Load forecasting method and device for distribution network, computer program product

By using differential privacy algorithms and model weight update mechanisms in the distribution network, the intelligent power data load is predicted, which solves the problem of achieving accurate load prediction while protecting user privacy, and achieves efficient and accurate load prediction effects.

CN118572674BActive Publication Date: 2025-06-24GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410611639.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-06-24
Estimated Expiration
2044-05-16

AI Technical Summary

Technical Problem

In the distribution network, there is no effective solution to how to accurately and efficiently predict smart power data loads while fully protecting user data privacy.

Method used

The differential privacy algorithm is used to train the original load prediction model in the distribution network, and random model weights are generated through the central server, and the model is updated and aggregated until the convergence conditions are met to obtain the target load prediction model.

Benefits of technology

It realizes the precise prediction of the load after the distribution network's distributed faults is self-healed under the premise of protecting user privacy, which improves the protection ability of user data privacy and does not affect the accuracy of load prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118572674B_ABST
    Figure CN118572674B_ABST
Patent Text Reader

Abstract

The present invention discloses a load forecasting method and device for a distribution network, and a computer program product. Among them, the method includes: obtaining the current power data of the distribution network; based on the power data, using the differential privacy algorithm to train the original load forecasting model in the distribution network according to the model weights to obtain an intermediate load forecasting model; updating the model weights using the target model weights; if it is determined that the intermediate load forecasting model does not meet the convergence condition, updating the intermediate load forecasting model to a new original load forecasting model; repeating the above steps until the intermediate load forecasting model meets the convergence condition to obtain a target load forecasting model; based on the power data, using the target load forecasting model to forecast the load required by the distribution network after fault self-healing. The present invention solves the technical problem of how to accurately and efficiently forecast the load of intelligent power data while fully protecting the privacy of user data in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system control, and in particular, to a load forecasting method and device for a distribution network, and a computer program product. Background Art

[0002] The Smart Grid (SG) introduces advanced communication, control, and intelligent information technologies on the basis of traditional power systems, and pays particular attention to the modernization and intelligence of distribution networks. By integrating these technologies, the Smart Grid endows power systems, especially the distribution network part, with the ability of two-way communication and data sharing. The Smart Grid not only enhances the fault detection and self-healing capabilities of the distribution network, enabling it to automatically detect faults in the distribution network and repair them quickly, but also can timely detect potential faults in the distribution network through continuous data detection and analysis, so as to take corresponding preventive measures. The application of the Smart Grid in the distribution network promotes the better integration of renewable energy such as wind energy and solar energy. Through demand response and advanced energy storage technologies, the Smart Grid can balance the supply and demand relationship at the distribution network level, and further promote the effective utilization of clean energy. In addition, in-depth analysis of these data using technologies such as artificial intelligence and big data modeling analysis can help power grid companies better manage the load of the distribution network, optimize energy distribution, and improve energy utilization efficiency. With the rapid development and application of artificial intelligence and big data analysis technologies, they provide innovative methods and key technical supports for the Smart Grid, especially for data analysis and load forecasting at the distribution network level.

[0003] Tasks such as power load forecasting, load management, and fault detection after a distribution network fails and the fault is self-healed often require in-depth analysis and fine-grained modeling of massive data. However, in the operation process of the distribution network, the user electricity consumption data collected in real time through smart meters and other advanced monitoring devices may contain highly sensitive personal life information, such as daily family activity patterns, household appliance usage, etc. If these data are not properly processed or encrypted, they are easily leaked during transmission and storage, resulting in the infringement of user privacy. Therefore, in view of the characteristics and requirements of distributed fault self-healing of the distribution network, researching how to build an accurate and efficient intelligent power data load forecasting and analysis system while fully protecting user data privacy is of crucial significance for the safe and stable operation of the modern energy industry system.

[0004] Regarding the problem of how to accurately and efficiently forecast the intelligent power data load while fully protecting user data privacy in the above related technologies, no effective solution has been proposed yet. Summary of the Invention

[0005] An embodiment of the present invention provides a load prediction method, device, and computer program product for a distribution network, so as to at least solve the technical problem in the related art of how to accurately and efficiently predict the load of smart power data while fully protecting the privacy of user data.

[0006] According to one aspect of the embodiments of the present invention, a load prediction method for a distribution network is provided, including: a first acquisition step of acquiring the current power data of the distribution network; a second acquisition step of training the original load prediction model in the distribution network based on the power data using a differential privacy algorithm according to model weights to obtain an intermediate load prediction model, where the model weights are generated by a central server through a random function, the original load prediction model is the prediction model currently used in the distribution network, and data interaction is performed between the central server and the distribution network; a first update step of updating the model weights using target model weights, where the target model weights are the model weights regenerated by the central server after aggregating the model parameters of the intermediate load prediction model; a judgment step of judging whether the intermediate load prediction model meets a convergence condition, where the convergence condition is a condition for judging whether the intermediate load prediction model is trained; a second update step of updating the intermediate load prediction model to a new original load prediction model when the intermediate load prediction model does not meet the convergence condition; repeating the first acquisition step, the second acquisition step, the first update step, the judgment step, and the second update step until the intermediate load prediction model meets the convergence condition to obtain a target load prediction model, where the original load prediction model, the intermediate load prediction model, and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing; predicting the load required by the distribution network after fault self-healing based on the power data using the target load prediction model.

[0007] Optionally, the model weights include: an original model weight and a mirror model weight. Before training the original load prediction model in the distribution network based on the power data using a differential privacy algorithm according to model weights to obtain an intermediate load prediction model, the load prediction method of the distribution network further includes: receiving the original model weight required for training the original load prediction model; copying the original model weight to obtain the mirror model weight.

[0008] Optionally, the intermediate load prediction model includes: an aggregated load prediction model and a personalized load prediction model. Based on the power data, the original load prediction model in the distribution network is trained using the differential privacy algorithm according to the model weights to obtain the intermediate load prediction model, including: training the original load prediction model using the differential privacy algorithm according to the original model weights based on the power data to obtain the aggregated load prediction model; training the original load prediction model using a multi-task federated learning framework according to the mirror model weights based on the power data to obtain the personalized load prediction model.

[0009] Optionally, training the original load prediction model using the differential privacy algorithm according to the original model weights based on the power data includes: obtaining the gradient of the aggregated load prediction model using a first formula based on the power data and the first model parameters of the aggregated load prediction model, where the first formula is: i represents the serial number of the power data, x i represents the i-th piece of the power data, g represents the serial number of the smart meter, r represents the first round of training the aggregated load prediction model, represents the gradient of the r-th round of training, represents the first model parameters of the g-th smart meter for the r-th round of training, L Xi represents the loss function; adaptively clipping the gradient using a second formula to obtain the clipped gradient, where the second formula is represents the clipped gradient of the r-th round of training; aggregating and adding noise to the clipped gradient using a third formula to obtain the noisy gradient, where the third formula is: represents the noisy gradient of the g-th smart meter for the r-th round of training, N() represents Gaussian noise, B represents the batch size, and σ represents the standard deviation; obtaining the updated first model parameters using a fourth formula based on the noisy gradient, where the fourth formula is: represents the updated first model parameters of the g-th smart meter, η g represents the global learning rate.

[0010] Optionally, training the original load prediction model using a multi-task federated learning framework according to the mirror model weights based on the power data includes: obtaining the second model parameters of the personalized load prediction model; obtaining the updated second model parameters using a fifth formula based on the first model parameters and the second model parameters, where the fifth formula is: s represents the second round of model training for the personalized load prediction model. represents the updated second model parameter of the g-th smart meter. represents the second model parameter, η l represents the personalized learning rate. represents taking the derivative of the objective function of the g-th smart meter, and λ is a parameter for adjusting the aggregated load prediction model and the personalized load prediction model.

[0011] Optionally, before updating the model weights using the target model weights, the load prediction method for the distribution network further includes: receiving the target model weights sent by the central server, where the target model weights are the model weights regenerated by the central server after aggregating the updated first model parameters and the second model parameters.

[0012] Optionally, predicting the load required by the distribution network after fault self-healing using the target load prediction model based on the power data includes: after determining that the distribution network has a fault and performing fault self-healing, obtaining the current power data of the distribution network; determining the load demand of the distribution network using the target load prediction model based on the current power data.

[0013] Optionally, after determining the load demand of the distribution network using the target load prediction model based on the current power data, the load prediction method for the distribution network further includes: determining the power dispatching strategy for the distribution network according to the load demand; performing power dispatching on the distribution network according to the power dispatching strategy.

[0014] According to another aspect of the embodiments of the present invention, there is also provided a load prediction device for a distribution network, including: a first acquisition unit for acquiring the current power data of the distribution network; a second acquisition unit for training the original load prediction model in the distribution network according to the model weight by using the differential privacy algorithm based on the power data to obtain an intermediate load prediction model, wherein the model weight is generated by a central server through a random function, the original load prediction model is the prediction model currently used in the distribution network, and data interaction is performed between the central server and the distribution network; a first update unit for updating the model weight by using a target model weight, wherein the target model weight is a model weight regenerated after the central server aggregates the model parameters of the intermediate load prediction model; a judgment unit for judging whether the intermediate load prediction model meets the convergence condition, wherein the convergence condition is a condition for judging whether the intermediate load prediction model is trained; a second update unit for updating the intermediate load prediction model to a new original load prediction model when the intermediate load prediction model does not meet the convergence condition; a third acquisition unit for repeatedly executing the first acquisition unit, the second acquisition unit, the first update unit, the judgment unit and the second update unit until the intermediate load prediction model meets the convergence condition to obtain a target load prediction model, wherein the original load prediction model, the intermediate load prediction model and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing; a prediction unit for predicting the load required by the distribution network after fault self-healing by using the target load prediction model based on the power data.

[0015] Optionally, the model weight includes: an original model weight and a mirror model weight. The load prediction device of the distribution network further includes: a first receiving unit for receiving the original model weight required for training the original load prediction model before training the original load prediction model in the distribution network according to the model weight by using the differential privacy algorithm to obtain an intermediate load prediction model; a fourth acquisition unit for copying the original model weight to obtain the mirror model weight.

[0016] Optionally, the intermediate load prediction model includes: an aggregated load prediction model and a personalized load prediction model. The second acquisition unit includes: a first acquisition module for training the original load prediction model according to the original model weight by using the differential privacy algorithm based on the power data to obtain the aggregated load prediction model; a second acquisition module for training the original load prediction model according to the mirror model weight by using a multi-task federated learning framework based on the power data to obtain the personalized load prediction model.

[0017] Optionally, the first acquisition module includes: a first acquisition sub-module, configured to obtain the gradient of the aggregated load prediction model according to the power data and the first model parameters of the aggregated load prediction model by using a first formula, where the first formula is: i represents the serial number of the power data, x i represents the i-th piece of the power data, g represents the serial number of the smart meter, r represents the first round of model training for the aggregated load prediction model, represents the gradient of the r-th round of training, represents the first model parameter of the g-th smart meter in the r-th round of training, represents the loss function; a second acquisition sub-module, configured to adaptively clip the gradient by using a second formula to obtain a clipped gradient, where the second formula is represents the clipped gradient of the r-th round of training; a third acquisition sub-module, configured to aggregate and add noise to the clipped gradient by using a third formula to obtain a noise-added gradient, where the third formula is: represents the noise-added gradient of the g-th smart meter in the r-th round of training, N() represents Gaussian noise, B represents the batch size, and σ represents the standard deviation; a fourth acquisition sub-module, configured to obtain the updated first model parameter according to the noise-added gradient by using a fourth formula, where the fourth formula is: represents the updated first model parameter of the g-th smart meter, η g represents the global learning rate.

[0018] Optionally, the second acquisition module includes: a fifth acquisition sub-module, configured to acquire the second model parameter of the personalized load prediction model; a sixth acquisition sub-module, configured to obtain the updated second model parameter according to the first model parameter and the second model parameter by using a fifth formula, where the fifth formula is: s represents the second round of model training for the personalized load prediction model, represents the updated second model parameter of the g-th smart meter, represents the second model parameter, η l represents the personalized learning rate, represents the derivative of the objective function of the g-th smart meter, and λ is a parameter for adjusting the parameters of the aggregated load prediction model and the personalized load prediction model.

[0019] Optionally, the load prediction device of the distribution network further includes: a second receiving unit, configured to receive the target model weight sent by the central server before updating the model weight using the target model weight, where the target model weight is a model weight regenerated by the central server after aggregating the updated first model parameter and the second model parameter.

[0020] Optionally, the prediction unit includes: a third obtaining module, configured to obtain the current power data of the distribution network after determining that a fault occurs in the distribution network and the fault is self-healed; a first determining module, configured to determine the load demand of the distribution network based on the current power data using the target load prediction model.

[0021] Optionally, the load prediction device of the distribution network further includes: a second determining module, configured to determine a power dispatching strategy for the distribution network according to the load demand after determining the load demand of the distribution network based on the current power data using the target load prediction model; a dispatching module, configured to perform power dispatching on the distribution network according to the power dispatching strategy.

[0022] According to another aspect of the embodiments of the present invention, there is also provided a load prediction system for a distribution network, and the load prediction system for the distribution network uses any one of the above-mentioned load prediction methods for the distribution network.

[0023] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, and the computer-readable storage medium includes a stored program, where the program executes any one of the above-mentioned load prediction methods for the distribution network.

[0024] According to another aspect of the embodiments of the present invention, there is also provided a processor, and the processor is used to run a program, where the program executes any one of the above-mentioned load prediction methods for the distribution network when running.

[0025] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including computer instructions, and the computer instructions execute any one of the above-mentioned load prediction methods for the distribution network when being executed by a processor.

[0026] In an embodiment of the present invention, the current power data of the distribution network can be obtained through a first obtaining step; a second obtaining step, based on the power data, using the differential privacy algorithm to train the original load prediction model in the distribution network according to the model weight to obtain an intermediate load prediction model, where the model weight is generated by the central server through a random function, and the original load prediction model is the prediction model currently used in the distribution network, and data interaction is carried out between the central server and the distribution network; a first updating step, using the target model weight to update the model weight, where the target model weight is the model weight regenerated after the central server aggregates the model parameters of the intermediate load prediction model; a judgment step, judging whether the intermediate load prediction model meets the convergence condition, where the convergence condition is the condition for judging whether the intermediate load prediction model is trained; a second updating step, when the intermediate load prediction model does not meet the convergence condition, updating the intermediate load prediction model to a new original load prediction model; repeating the first obtaining step, the second obtaining step, the first updating step, the judgment step and the second updating step until the intermediate load prediction model meets the convergence condition, obtaining a target load prediction model, where the original load prediction model, the intermediate load prediction model and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing; predicting the load required by the distribution network after fault self-healing by using the target load prediction model based on the power data. Through the above technical solutions, the purpose of protecting user data privacy when the trained target load prediction model predicts the load of the distribution network is achieved by introducing the differential privacy algorithm to train the original load prediction model, and the technical effect of accurately predicting the load of the distributed fault self-healing of the distribution network while protecting user privacy is realized. It not only improves the protection ability of user data privacy but also does not affect the accuracy of load prediction, thus solving the technical problem in the related art of how to accurately and efficiently predict the intelligent power data load while fully protecting user data privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the illustrative embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 is a hardware structure block diagram of a mobile terminal for a load prediction method of a distribution network according to an embodiment of the present invention;

[0029] Figure 2 is a flowchart of a load prediction method of a distribution network according to an embodiment of the present invention;

[0030] Figure 3It is a flowchart of an optional load forecasting method for a distribution network according to an embodiment of the present invention;

[0031] Figure 4 It is a schematic diagram of the interaction between a central server and a distribution network according to an embodiment of the present invention;

[0032] Figure 5 It is a schematic diagram of a load forecasting device for a distribution network according to an embodiment of the present invention. Detailed implementation manners

[0033] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0035] As introduced in the background art, how to accurately and efficiently predict the load of intelligent power data while fully protecting the privacy of user data in the related art. In view of the above defects, in the embodiments of the present invention, a load forecasting method and device for a distribution network, and a computer program product are provided.

[0036] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0037] The method embodiments provided in the embodiments of the present invention can be executed on a mobile terminal, a computer terminal or a similar computing device. Taking the operation on a mobile terminal as an example, Figure 1 It is a hardware structure block diagram of a mobile terminal of a load forecasting method for a distribution network according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1Only one processor 102 is shown (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only schematic and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown in Figure 1 or have a different configuration from that shown.

[0038] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the load forecasting method of the distribution network in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] According to an embodiment of the present invention, a method embodiment of a load forecasting method for a distribution network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0040] Figure 2 is a flowchart of a load forecasting method for a distribution network according to an embodiment of the present invention, as Figure 2 shown, the method includes the following steps:

[0041] Step S202, the first acquisition step, to acquire the current power data of the distribution network.

[0042] In this embodiment, before model training, it is necessary to acquire the power data of the distribution network.

[0043] Generally speaking, after a fault occurs in the distribution network and the fault is self-healed, tasks such as power load forecasting, load management, and fault detection need to be performed. Performing these tasks often requires in-depth analysis and refined modeling of a large amount of power data; during the operation of the distribution network, user power consumption data (i.e., power data) can be collected in real time through smart meters and other advanced detection devices. In the embodiment of the present invention, taking the acquisition of power data of smart meters as an example for description, that is, model training is performed locally on the smart meters, so that the trained model can better protect data privacy when obtaining the user power consumption data recorded by the smart meters subsequently.

[0044] Step S204, the second acquisition step, based on the power data, use the differential privacy algorithm to perform model training on the original load forecasting model in the distribution network according to the model weights, and obtain an intermediate load forecasting model, where the model weights are generated by the central server through a random function, the original load forecasting model is the forecasting model currently used in the distribution network, and data interaction is performed between the central server and the distribution network.

[0045] Optionally, the above model weights may include: the original model weight, the mirror model weight.

[0046] Optionally, the above original load forecasting model is the model currently used in the smart meter, and it will be continuously updated during the training process.

[0047] Optionally, the above intermediate load forecasting model includes: an aggregated load forecasting model, a personalized load forecasting model.

[0048] Regarding the specific functions of the original model weight and the mirror model weight included in the above model weights, and the differences between the aggregated load forecasting model and the personalized load forecasting model included in the intermediate load forecasting model, they will be described in detail in the following content and will not be elaborated here.

[0049] In this embodiment, an adaptive differential privacy algorithm is mainly introduced to perform model training on the smart meter according to the model weights issued by the central server.

[0050] The model weights here are random numbers that conform to a specific distribution generated by the central server through a random function based on the model parameters of the original load prediction model in the smart meter. During the subsequent continuous training process, the model parameters will also be continuously updated. Through the real-time interaction between the central server and the smart meter, the central server will regenerate new model weights in real time according to the updated model parameters.

[0051] The commonly used random functions here usually include a uniform distribution random number generator and a normal distribution random number generator: For the uniform distribution random number generator, a random number generation algorithm for the uniform distribution can be used to generate random numbers to ensure that the generated random numbers are uniformly distributed within a certain range; for the normal distribution random number generator, a random number generation algorithm for the Gaussian distribution can be used to generate random numbers to ensure that the generated random numbers conform to the normal distribution.

[0052] It should be noted that training the model is a continuous iterative process. For the convenience of description, the intermediate load prediction model is used here as an intermediate model during the model training process. Each time it iterates, this intermediate load prediction model will be updated until the model reaches the convergence condition and the training is completed.

[0053] In addition, the original load prediction model, the intermediate load prediction model, and the target load prediction model mentioned in the embodiments of the present invention are essentially the same model, but represent different stages in its training process. Therefore, they essentially both include an aggregated load prediction model and a personalized load prediction model. During the training process, these two models are iteratively trained separately.

[0054] Step S206, the first update step, updates the model weights using the target model weights, where the target model weights are the model weights regenerated by the central server after aggregating the model parameters of the intermediate load prediction model.

[0055] In this embodiment, during the process of training and updating the original load prediction model, the model parameters will also be continuously updated. The smart meter will upload the updated model parameters to the central server so that the central server can regenerate new model weights (target model weights) in real time according to the updated model parameters and send them to the smart meter.

[0056] The target model weights here are also used as an intermediate value during the model training process. Each time it iterates, the value corresponding to the original model weights is replaced with the target model weights to ensure that the latest model weights are used each time.

[0057] Step S208, the judgment step, judges whether the intermediate load prediction model meets the convergence condition, where the convergence condition is the condition for judging whether the intermediate load prediction model is trained.

[0058] In this embodiment, every time an iteration is performed, it can be determined whether the load prediction model (intermediate load prediction model) at this time has reached the convergence condition, so as to determine whether the model has been trained.

[0059] In deep learning, "convergence" means that during the training process, the model gradually learns and improves its performance until it reaches a stable state. The convergence condition here can be a pre-set condition; for example, the number of iterations can be set to a fixed value here. When the number of iterations reaches the set fixed value, it can be considered that the model has tended to be stable; of course, the convergence condition here can also be set according to the actual situation, and no specific limitation is made here.

[0060] Step S210, the second update step, when the intermediate load prediction model does not meet the convergence condition, update the intermediate load prediction model to a new original load prediction model.

[0061] In this embodiment, during the training process, if it is judged that the intermediate load prediction model does not meet the convergence condition, it is used as the prediction model currently used by the smart meter (updated to a new original load prediction model) to continue the model training.

[0062] Step S212, repeatedly execute the first acquisition step, the second acquisition step, the first update step, the judgment step and the second update step until the intermediate load prediction model meets the convergence condition, and obtain the target load prediction model. Among them, the original load prediction model, the intermediate load prediction model and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing.

[0063] In this embodiment, the above steps can be repeatedly executed, continuously iterated until the intermediate load prediction model meets the convergence condition, indicating that the model has reached a stable state. The intermediate load prediction model at this time is used as the target load prediction model (that is, the trained model). Of course, during the subsequent use of the target load prediction model, the real-time power data recorded in the smart meter can also be used to continuously optimize the model according to the above steps.

[0064] Step S214, based on the power data, use the target load prediction model to predict the load required by the distribution network after fault self-healing.

[0065] In this embodiment, by applying the target load prediction model trained in the above embodiments of the present invention to perform tasks such as power load prediction, load management and fault detection after a distribution network failure and fault self-healing, it not only protects user data privacy, but also can provide accurate power load prediction after distributed fault self-healing of the distribution network.

[0066] As can be seen from the above, through the technical solution provided by the above embodiments of the present invention, the current power data of the distribution network can be obtained through the first obtaining step; the second obtaining step, based on the power data, using the differential privacy algorithm to train the original load prediction model in the distribution network according to the model weight to obtain an intermediate load prediction model, where the model weight is generated by the central server through a random function, and the original load prediction model is the prediction model currently used in the distribution network, and data interaction is carried out between the central server and the distribution network; the first updating step, using the target model weight to update the model weight, where the target model weight is the model weight regenerated by the central server after aggregating the model parameters of the intermediate load prediction model; the judging step, judging whether the intermediate load prediction model meets the convergence condition, where the convergence condition is the condition for judging whether the intermediate load prediction model is trained; the second updating step, when the intermediate load prediction model does not meet the convergence condition, updating the intermediate load prediction model to a new original load prediction model; repeating the first obtaining step, the second obtaining step, the first updating step, the judging step and the second updating step until the intermediate load prediction model meets the convergence condition, obtaining a target load prediction model, where the original load prediction model, the intermediate load prediction model and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing; based on the power data, using the target load prediction model to predict the load required by the distribution network after fault self-healing, achieving the purpose of protecting user data privacy when the trained target load prediction model predicts the load of the distribution network, realizing the technical effect of accurately predicting the load of the distributed fault self-healing of the distribution network on the premise of protecting user privacy, improving the protection ability of user data privacy, and not affecting the accuracy of load prediction.

[0067] Therefore, through the technical solution provided by the above embodiments of the present invention, the technical problem of how to accurately and efficiently predict the intelligent power data load while fully protecting user data privacy in the related art is solved.

[0068] The following combines Figure 3 and Figure 4 to further elaborate on the above embodiments of the present invention. Figure 3 is a flowchart of an optional load prediction method for a distribution network according to an embodiment of the present invention. Figure 4 is a schematic diagram of the interaction between the central server and the distribution network according to an embodiment of the present invention.

[0069] It should be noted that in the description of the following content, the aggregated load prediction model and the personalized load prediction model in each stage of the training process will no longer be distinguished by name, and mainly the specific training process will be described in detail.

[0070] According to the above embodiments of the present invention, before training the original load prediction model in the distribution network according to the model weights using the differential privacy algorithm based on power data to obtain an intermediate load prediction model, the load prediction method of the distribution network further includes: receiving the original model weights required for training the original load prediction model; copying the original model weights to obtain mirror model weights.

[0071] As Figure 3 shown, before starting model training, the central server initializes an initial model weight through a random function and distributes it to each smart meter; after obtaining the model weight, the smart meter copies it into two copies, one (referred to as the original model weight here) for initializing the aggregation model (aggregated load prediction model, the same below), and the other (referred to as the mirror model weight here) for initializing the personalized model (personalized load prediction model). The original model weight and the mirror model weight here are essentially the same, but are respectively used for training different models.

[0072] According to the above embodiments of the present invention, training the original load prediction model in the distribution network according to the model weights using the differential privacy algorithm based on power data to obtain an intermediate load prediction model includes: training the original load prediction model according to the original model weights using the differential privacy algorithm based on power data to obtain an aggregated load prediction model; training the original load prediction model according to the mirror model weights using the multi-task federated learning framework based on power data to obtain a personalized load prediction model.

[0073] As Figure 4 shown, the smart meter will train two models: the aggregation model and the personalized model, and adjust the relationship between the two models through a regularization term; the smart meter uses the adaptive differential privacy algorithm to train the aggregation model according to the original model weights, and trains the personalized model according to the mirror model weights based on the multi-task federated learning framework Ditto. The central server collects the noisy gradients after the fault self-healing of each smart meter and obtains the global aggregated gradient through aggregation calculation. After aggregation, it sends a new aggregated gradient to the participating smart meters to start the next round of iteration.

[0074] As above Figure 3 shown, for the training of the aggregation model, in the above embodiments of the present invention, training the original load prediction model according to the original model weights using the differential privacy algorithm based on power data includes: obtaining the gradient of the aggregated load prediction model according to the power data and the first model parameters of the aggregated load prediction model using the first formula, where the first formula is: i represents the serial number of the power data, x iDenote the \(i\)-th power data, \(g\) represents the serial number of the smart meter, and \(r\) represents the first round of model training for the aggregated load prediction model. Denote the gradient of the \(r\)-th training round. Denote the first model parameter of the \(g\)-th smart meter in the \(r\)-th training round. Denote the loss function; use the second formula to perform adaptive clipping on the gradient to obtain the clipped gradient, where the second formula is Denote the clipped gradient of the \(r\)-th training round; use the third formula to aggregate and add noise to the clipped gradient to obtain the noisy gradient, where the third formula is: Denote the noisy gradient of the \(g\)-th smart meter in the \(r\)-th training round, \(N()\) represents Gaussian noise, \(B\) represents the batch size, and \(\sigma\) represents the standard deviation; obtain the updated first model parameter according to the noisy gradient using the fourth formula, where the fourth formula is: Denote the updated first model parameter of the \(g\)-th smart meter, \(\eta\) g Denote the global learning rate.

[0075] The training of the aggregation model can be specifically divided into the following steps:

[0076] 1) Gradient calculation: According to the power data and the first model parameter of the \(r\)-th training round of the aggregation model, use the formula to calculate the gradient, \(i\) represents the serial number of the power data, \(x\) i Denote the \(i\)-th power data, \(g\) represents the serial number of the smart meter, and \(r\) represents the first round of model training for the aggregated load prediction model. Denote the gradient of the \(r\)-th training round. Denote the first model parameter of the \(g\)-th smart meter in the \(r\)-th training round. Denote the loss function;

[0077] 2) Adaptive gradient clipping: Use the formula to perform adaptive clipping on the gradient, where in the formula, Denote the clipped gradient of the \(r\)-th training round; compared with the traditional threshold clipping method, this clipping method is more flexible, and at the same time can improve the utility of the model, making the gradient set within a controllable range and also controlling the differential privacy sensitivity;

[0078] 3) Aggregate gradient and add noise: First, aggregate the clipped gradients calculated for each data according to the batch size \(B\), and then use Gaussian noise to add noise to it according to the formula where in the formula, Denote the noisy gradient of the g-th smart meter in the r-th round of training. N() represents Gaussian noise, B represents the batch size, and σ represents the standard deviation;

[0079] 4) Update of the first model parameters: Use the formula to calculate the first model parameters for the next iteration. In the formula, denotes the updated first model parameters of the g-th smart meter, and η g represents the global learning rate.

[0080] For the training of the personalized model, in the above embodiments of the present invention, based on the power data, the original load prediction model is trained using the multi-task federated learning framework according to the mirror model weights, including: obtaining the second model parameters of the personalized load prediction model; obtaining the updated second model parameters according to the first model parameters and the second model parameters using the fifth formula, where the fifth formula is: s represents the second round of model training for the personalized load prediction model, denotes the updated second model parameters of the g-th smart meter, denotes the second model parameters, and η l represents the personalized learning rate, denotes taking the derivative of the objective function of the g-th smart meter, and λ is a parameter for adjusting the aggregated load prediction model and the personalized load prediction model.

[0081] The personalized model here is implemented based on the multi-task federated learning framework Ditto, which takes into account fairness, accuracy, and personalization at the same time. In this embodiment, the personalized model mainly trains its own personalized model for the smart meter of different users based on the aggregated model to protect user data privacy, so that it can perform more targeted analysis.

[0082] As above Figure 3 shown, during the training of the personalized model, the local objective function F g of the smart meter is introduced to achieve the stability of the distribution network and the personalization of the model; the formula can be used to calculate the second model parameters for the next iteration of the personalized model. In the formula, s represents the second round of model training for the personalized load prediction model, denotes the updated second model parameters of the g-th smart meter, denotes the second model parameters, and η l represents the personalized learning rate, Denote the derivative of the objective function for the \(g\)-th smart meter. \(\lambda\) is the parameter for adjusting the aggregated load prediction model and the personalized load prediction model. Here, a regularization term based on \(\lambda\) is added to the formula. This model does not affect the update of the global aggregation model, but only affects the degree of personalization of the personalized model. When \(\lambda\rightarrow0\), it is approximately training a local model (here, the local model refers to the aggregated model local to the smart meter), and when \(\lambda\rightarrow+\infty\), it is approximately training a global model (here, the global model refers to the aggregated model sent by the smart meter to the central server. Substantially, these two are the same).

[0083] According to the above embodiments of the present invention, before updating the model weights using the target model weights, the load prediction method for the distribution network further includes: receiving the target model weights sent by the central server, where the target model weights are the model weights regenerated by the central server after aggregating the updated first model parameters and second model parameters.

[0084] As above Figure 3 As shown above, after obtaining the updated first model parameters and second model parameters, the smart meter will send them to the central server, and then the central server will re-send the newly generated model weights to the smart meter for the next round of iteration.

[0085] In order to eliminate the influence of dimension, improve the model training speed and enhance the model accuracy, it is first necessary to normalize the data. In the embodiments of the present invention, the Z-Score normalization method is used. Z-Score standardizes the data based on the mean and standard deviation of the data. The specific formula is as follows: Where \(X\) is the value of the power data, \(\mu\) is the mean of the power data set, and \(\sigma\) is the standard deviation of the data set.

[0086] Specifically in implementation, the load after the distributed fault self-healing of the distribution network is constantly changing over time, and it has obvious time series characteristics. For this reason, in the embodiments of the present invention, the bi-LSTM (Bi-directional Long Short-Term Memory) network, which is good at processing sequence data, is selected as the experimental model. The bi-LSTM network has two LSTM layers, one processes the sequence from front to back, and the other processes the sequence from back to front. The bi-LSTM network can effectively express the information in a long time series and can avoid the forgetting of useful information for a long time. The input dimension of the bi-LSTM model is set to 24. In addition, since the load prediction of the smart grid is a regression task, the root mean square error function (RMSE) is selected as the loss function. Its calculation method refers to the formula The settings of other parameters refer to Table 1, and Table 1 shows the specific parameter settings.

[0087] Table 1

[0088]

[0089] As above Figure 3 As shown above, the above process will be continuously iterated until the aggregation model and the personalized model converge.

[0090] According to the above embodiments of the present invention, based on power data, using the target load prediction model to predict the load required by the distribution network after fault self-healing, including: after determining that the distribution network has a fault and performing fault self-healing, obtaining the current power data of the distribution network; based on the current power data, using the target load prediction model to determine the load demand of the distribution network.

[0091] In this embodiment, the trained target load prediction model (including the aggregation model and the personalized model) can be used to predict the load required by the distribution network after fault self-healing, and obtain the load demand of the distribution network within a certain period of time in the future.

[0092] According to the above embodiments of the present invention, after determining the load demand of the distribution network based on the current power data using the target load prediction model, the load prediction method of the distribution network further includes: determining the power dispatching strategy for the distribution network according to the load demand; performing power dispatching on the distribution network according to the power dispatching strategy.

[0093] In this embodiment, by using the trained target load prediction model for load prediction, the load size that the distribution network needs to bear within a certain period of time in the future can be determined, and corresponding strategies can be formulated for reasonable power dispatching and resource allocation, better planning and management of the operation of the distribution network, and improving the reliability and economy of the power grid. This can ensure that the power grid can effectively meet the electricity demand of users after fault self-healing and guarantee the stable operation of the power grid.

[0094] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0095] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0096] According to an embodiment of the present invention, there is also provided a load forecasting device for a distribution network for implementing the load forecasting method for the distribution network described above. Figure 5 It is a schematic diagram of the load forecasting device for a distribution network according to an embodiment of the present invention, as Figure 5 shown. The device includes: a first acquisition unit 501, a second acquisition unit 503, a first update unit 505, a judgment unit 507, a second update unit 509, a third acquisition unit 511, and a forecasting unit 513. The load forecasting device for the distribution network will be described in detail below.

[0097] The first acquisition unit 501 is used to acquire the current power data of the distribution network.

[0098] The second acquisition unit 503 is used to perform model training on the original load forecasting model in the distribution network according to the model weight by using the differential privacy algorithm based on the power data, so as to obtain an intermediate load forecasting model. Among them, the model weight is generated by the central server through a random function. The original load forecasting model is the forecasting model currently used in the distribution network, and data interaction is carried out between the central server and the distribution network.

[0099] The first update unit 505 is used to update the model weight by using the target model weight, where the target model weight is the model weight regenerated after the central server aggregates the model parameters of the intermediate load forecasting model.

[0100] The judgment unit 507 is used to judge whether the intermediate load forecasting model meets the convergence condition, where the convergence condition is the condition for judging whether the intermediate load forecasting model is trained.

[0101] The second update unit 509 is used to update the intermediate load forecasting model to a new original load forecasting model when the intermediate load forecasting model does not meet the convergence condition.

[0102] A third acquisition unit 511, configured to repeatedly execute the first acquisition unit, the second acquisition unit, the first update unit, the judgment unit, and the second update unit until the intermediate load prediction model meets the convergence condition, so as to obtain a target load prediction model, where the original load prediction model, the intermediate load prediction model, and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing.

[0103] A prediction unit 513, configured to predict the load required by the distribution network after fault self-healing by using the target load prediction model based on power data.

[0104] It should be noted here that the above-mentioned first acquisition unit 501, second acquisition unit 503, first update unit 505, judgment unit 507, second update unit 509, third acquisition unit 511, and prediction unit 513 correspond to steps S202 to S214 in the above embodiment. The implementation examples and application scenarios realized by the seven units and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiment.

[0105] As can be seen from the above, in the solution described in the above embodiments of the present invention, the first acquisition unit can be used to acquire the current power data of the distribution network; then, the second acquisition unit can be used to perform model training on the original load prediction model in the distribution network according to the model weight by using the differential privacy algorithm based on the power data, so as to obtain an intermediate load prediction model. Among them, the model weight is generated by the central server through a random function, and the original load prediction model is the prediction model currently used in the distribution network. Data interaction is carried out between the central server and the distribution network; then, the first update unit can be used to update the model weight by using the target model weight, where the target model weight is the model weight regenerated after the central server aggregates the model parameters of the intermediate load prediction model; after that, the judgment unit can be used to judge whether the intermediate load prediction model meets the convergence condition, where the convergence condition is the condition for judging whether the intermediate load prediction model is trained; then, when the intermediate load prediction model does not meet the convergence condition, the second update unit can be used to update the intermediate load prediction model to a new original load prediction model; immediately afterwards, the third acquisition unit can be used to repeatedly execute the first acquisition unit, the second acquisition unit, the first update unit, the judgment unit and the second update unit until the intermediate load prediction model meets the convergence condition, so as to obtain a target load prediction model. Among them, the original load prediction model, the intermediate load prediction model and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing; finally, the prediction unit can be used to predict the load required by the distribution network after fault self-healing by using the target load prediction model based on the power data, achieving the purpose of protecting user data privacy when the trained target load prediction model predicts the load of the distribution network, realizing the technical effect of accurately predicting the load of the distribution network for distributed fault self-healing on the premise of protecting user privacy, improving the protection ability of user data privacy and not affecting the accuracy of load prediction.

[0106] Therefore, through the technical solution provided by the above embodiments of the present invention, the technical problem in the related art of how to accurately and efficiently predict the intelligent power data load while fully protecting user data privacy is solved.

[0107] Optionally, the model weight includes: an original model weight and a mirror model weight. The load prediction device of the distribution network further includes: a first receiving unit, configured to receive the original model weight required for training the original load prediction model before performing model training on the original load prediction model in the distribution network according to the model weight by using the differential privacy algorithm to obtain an intermediate load prediction model; a fourth acquisition unit, configured to copy the original model weight to obtain a mirror model weight.

[0108] Optionally, the intermediate load prediction model includes: an aggregated load prediction model, a personalized load prediction model, and the second acquisition unit includes: a first acquisition module, configured to train the original load prediction model based on power data using the differential privacy algorithm according to the original model weights to obtain the aggregated load prediction model; a second acquisition module, configured to train the original load prediction model based on power data using the multi-task federated learning framework according to the mirror model weights to obtain the personalized load prediction model.

[0109] Optionally, the first acquisition module includes: a first acquisition sub-module, configured to obtain the gradient of the aggregated load prediction model according to the power data and the first model parameters of the aggregated load prediction model using a first formula, where the first formula is: i represents the serial number of the power data, x i represents the i-th power data, g represents the serial number of the smart meter, r represents the first round of training of the aggregated load prediction model, represents the gradient of the r-th round of training, represents the first model parameters of the g-th smart meter in the r-th round of training, represents the loss function; a second acquisition sub-module, configured to adaptively clip the gradient using a second formula to obtain a clipped gradient, where the second formula is represents the clipped gradient of the r-th round of training; a third acquisition sub-module, configured to aggregate and add noise to the clipped gradient using a third formula to obtain a noisy gradient, where the third formula is: represents the noisy gradient of the g-th smart meter in the r-th round of training, N() represents Gaussian noise, B represents the batch size, and σ represents the standard deviation; a fourth acquisition sub-module, configured to obtain the updated first model parameters according to the noisy gradient using a fourth formula, where the fourth formula is: represents the updated first model parameters of the g-th smart meter, η g represents the global learning rate.

[0110] Optionally, the second acquisition module includes: a fifth acquisition sub-module, configured to obtain the second model parameters of the personalized load prediction model; a sixth acquisition sub-module, configured to obtain the updated second model parameters according to the first model parameters and the second model parameters using a fifth formula, where the fifth formula is: s represents the second round of training of the personalized load prediction model, represents the updated second model parameters of the g-th smart meter, represents the second model parameters, η l represents the personalized learning rate, It represents taking the derivative of the objective function for the g-th smart meter, and λ is the parameter for adjusting the aggregated load prediction model and the personalized load prediction model.

[0111] Optionally, the load prediction device of the distribution network further includes: a second receiving unit, configured to receive the target model weights sent by the central server before updating the model weights using the target model weights, where the target model weights are the model weights regenerated by the central server after aggregating the updated first model parameters and second model parameters.

[0112] Optionally, the prediction unit includes: a third obtaining module, configured to obtain the current power data of the distribution network after determining that the distribution network has a fault and performing fault self-healing; a first determining module, configured to determine the load demand of the distribution network based on the current power data using the target load prediction model.

[0113] Optionally, the load prediction device of the distribution network further includes: a second determining module, configured to determine the power dispatching strategy for the distribution network according to the load demand after determining the load demand of the distribution network based on the current power data using the target load prediction model; a dispatching module, configured to perform power dispatching on the distribution network according to the power dispatching strategy.

[0114] According to another aspect of the embodiments of the present invention, there is also provided a load prediction system for a distribution network, and the load prediction system for the distribution network uses any one of the above-mentioned load prediction methods for the distribution network.

[0115] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, and the computer-readable storage medium includes a stored program, where the program executes any one of the above-mentioned load prediction methods for the distribution network.

[0116] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or located in any one of the communication devices in the communication device group.

[0117] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: a first acquisition step of acquiring current power data of the distribution network; a second acquisition step of training the original load prediction model in the distribution network according to the model weight by using the differential privacy algorithm based on the power data to obtain an intermediate load prediction model, where the model weight is generated by the central server through a random function, the original load prediction model is the prediction model currently used in the distribution network, and data interaction is performed between the central server and the distribution network; a first update step of updating the model weight by using the target model weight, where the target model weight is the model weight regenerated after the central server aggregates the model parameters of the intermediate load prediction model; a judgment step of judging whether the intermediate load prediction model meets the convergence condition, where the convergence condition is the condition for judging whether the intermediate load prediction model is trained; a second update step of updating the intermediate load prediction model to a new original load prediction model when the intermediate load prediction model does not meet the convergence condition; repeating the first acquisition step, the second acquisition step, the first update step, the judgment step, and the second update step until the intermediate load prediction model meets the convergence condition to obtain a target load prediction model, where the original load prediction model, the intermediate load prediction model, and the target load prediction model are all used to predict the load required by the distribution network after fault self-healing; predicting the load required by the distribution network after fault self-healing by using the target load prediction model based on the power data.

[0118] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: the original model weight and the mirror model weight. Before training the original load prediction model in the distribution network according to the model weight by using the differential privacy algorithm to obtain an intermediate load prediction model, the load prediction method of the distribution network further includes: receiving the original model weight required for training the original load prediction model; copying the original model weight to obtain the mirror model weight.

[0119] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: training the original load prediction model according to the original model weight by using the differential privacy algorithm based on the power data to obtain an aggregated load prediction model; training the original load prediction model according to the mirror model weight by using the multi-task federated learning framework based on the power data to obtain a personalized load prediction model.

[0120] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining the gradient of the aggregated load prediction model according to the power data and the first model parameter of the aggregated load prediction model by using a first formula, where the first formula is: i represents the serial number of power data, and x i represents the i-th power data, g represents the serial number of the smart meter, and r represents the first round of model training for the aggregated load prediction model. represents the gradient of the r-th round of training. represents the first model parameter of the g-th smart meter for the r-th round of training. represents the loss function; the gradient is adaptively clipped using the second formula to obtain the clipped gradient, where the second formula is represents the clipped gradient of the r-th round of training; the clipped gradient is aggregated and noise-added using the third formula to obtain the noise-added gradient, where the third formula is: represents the noise-added gradient of the g-th smart meter for the r-th round of training, N() represents Gaussian noise, B represents the batch size, and σ represents the standard deviation; the updated first model parameter is obtained using the fourth formula based on the noise-added gradient, where the fourth formula is: represents the updated first model parameter of the g-th smart meter, and η g represents the global learning rate.

[0121] Optionally, in this embodiment, the computer-readable storage medium is set to store program code for performing the following steps: obtaining the second model parameter of the personalized load prediction model; obtaining the updated second model parameter using the fifth formula based on the first model parameter and the second model parameter, where the fifth formula is: s represents the second round of model training for the personalized load prediction model. represents the updated second model parameter of the g-th smart meter. represents the second model parameter, and ηl represents the personalized learning rate. represents taking the derivative of the objective function of the g-th smart meter, and λ is a parameter for adjusting the aggregated load prediction model and the personalized load prediction model.

[0122] Optionally, in this embodiment, the computer-readable storage medium is set to store program code for performing the following steps: receiving the target model weight sent by the central server, where the target model weight is the model weight regenerated by the central server after aggregating the updated first model parameter and the second model parameter.

[0123] Optionally, in this embodiment, the computer-readable storage medium is set to store program code for performing the following steps: after determining that a fault occurs in the distribution network and the fault is self-healed, obtaining the current power data of the distribution network; determining the load demand of the distribution network based on the current power data using the target load prediction model.

[0124] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a power dispatching strategy for the distribution network according to the load demand; and performing power dispatching on the distribution network according to the power dispatching strategy.

[0125] According to another aspect of the embodiments of the present invention, a processor is further provided, and the processor is used to run a program, wherein when the program runs, it executes the load forecasting method for the distribution network in any one of the above.

[0126] According to another aspect of the embodiments of the present invention, a computer program product is further provided, including computer instructions, and when the computer instructions are executed by a processor, they execute the load forecasting method for the distribution network in any one of the above.

[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0129] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in an electrical or other form.

[0130] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0131] In addition, the functional units in the respective embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disc.

[0133] The foregoing are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for load forecasting of a distribution network, characterized in that: include: The first acquisition step is to acquire the current power data of the distribution network; The second acquisition step is to perform model training on the original load forecasting model in the distribution network according to the model weight using the differential privacy algorithm based on the power data to obtain an intermediate load forecasting model, wherein the model weight is generated by the central server through a random function, the original load forecasting model is the forecasting model currently used in the distribution network, the central server and the distribution network perform data interaction, the model weight includes the original model weight and the mirror model weight, the intermediate load forecasting model includes an aggregated load forecasting model and a personalized load forecasting model, wherein the aggregated load forecasting model is obtained at least according to the differential privacy algorithm, and the aggregated load forecasting model is obtained at least according to the multi-task federated learning framework; A first updating step, updating the model weight using a target model weight, wherein the target model weight is a model weight regenerated by the central server after aggregating model parameters of the intermediate load forecasting model; A judging step, judging whether the intermediate load forecasting model satisfies a convergence condition, wherein the convergence condition is a condition for judging whether the intermediate load forecasting model has been trained; A second updating step, when the intermediate load forecasting model does not meet the convergence condition, updating the intermediate load forecasting model to a new original load forecasting model; Repeating the first acquisition step, the second acquisition step, the first update step, the judgment step and the second update step until the intermediate load forecasting model meets the convergence condition, to obtain a target load forecasting model, wherein the original load forecasting model, the intermediate load forecasting model and the target load forecasting model are all used to predict the load required by the distribution network after the fault is self-healed; Based on the power data, the target load prediction model is used to predict the load required by the distribution network after the fault is self-healed; Based on the power data, a multi-task federated learning framework is used to perform model training on the original load forecasting model according to the mirror model weights, including: Obtaining a second model parameter of the personalized load forecasting model; obtaining a first model parameter of the aggregated load forecasting model; The updated second model parameter is obtained by using a fifth formula according to the first model parameter and the second model parameter, wherein the fifth formula is: s represents the second round of model training for the personalized load forecasting model, g represents the serial number of the smart meter, r represents the first round of model training for the aggregated load forecasting model, represents the second model parameter after the g-th smart meter is updated, represents the second model parameter, η l represents the personalized learning rate, ▽F g represents the derivative of the objective function of the g-th smart meter, λ is the parameter for adjusting the aggregated load forecasting model and the personalized load forecasting model, Represents the first model parameters of the g-th smart meter in the r-th round of training.

2. The load forecasting method for a distribution network according to claim 1, characterized in that: Before the original load forecasting model in the distribution network is trained according to the model weights by using a differential privacy algorithm based on the power data to obtain an intermediate load forecasting model, the method further includes: Receiving the original model weights required for training the original load forecasting model; The original model weight is copied to obtain the mirror model weight.

3. The load forecasting method for a distribution network according to claim 2, characterized in that: Based on the power data, a differential privacy algorithm is used to perform model training on the original load forecasting model in the distribution network according to the model weight to obtain an intermediate load forecasting model, including: Based on the power data, the differential privacy algorithm is used to perform model training on the original load prediction model according to the original model weight to obtain the aggregated load prediction model; Based on the power data, a multi-task federated learning framework is used to perform model training on the original load forecasting model according to the mirror model weights to obtain the personalized load forecasting model.

4. The load forecasting method for a distribution network according to claim 3, characterized in that: The method further comprises: performing model training on the original load prediction model based on the power data and using the differential privacy algorithm according to the original model weight, including: The gradient of the aggregated load prediction model is obtained using a first formula according to the power data and the first model parameter of the aggregated load prediction model, wherein the first formula is: i represents the serial number of the power data, x i represents the power data of the ith item, g represents the serial number of the smart meter, r represents the first round of model training for the aggregated load prediction model, represents the gradient of the rth round of training, represents the first model parameter of the g-th smart meter in the r-th round of training, represents the loss function; The gradient is adaptively clipped using the second formula to obtain a clipped gradient, wherein the second formula is represents the clipped gradient of the rth round of training; The clipped gradient is aggregated and denoised using the third formula to obtain a noisy gradient, wherein the third formula is: represents the noisy gradient of the rth round of training of the gth smart meter, N() represents Gaussian noise, B represents batch size, and σ represents standard deviation; The updated first model parameter is obtained by using the fourth formula according to the noise gradient, wherein the fourth formula is: represents the first model parameter after the g-th smart meter is updated, η g Represents the global learning rate.

5. The load forecasting method for a distribution network according to claim 4, characterized in that: Before updating the model weight using the target model weight, the method further includes: The target model weight sent by the central server is received, wherein the target model weight is a model weight regenerated by the central server after aggregating the updated first model parameters and the second model parameters.

6. The load forecasting method for a distribution network according to any one of claims 1 to 5, characterized in that: The target load prediction model is used to predict the load required by the distribution network after the fault is self-healed based on the power data, including: After determining that the distribution network has a fault and performing self-healing of the fault, obtaining current power data of the distribution network; The load demand of the distribution network is determined using the target load prediction model based on the current power data.

7. The load forecasting method for a distribution network according to claim 6, characterized in that: After determining the load demand of the distribution network by using the target load prediction model based on the current power data, the method further includes: Determining a power dispatching strategy for the distribution network according to the load demand; The power distribution network is dispatched according to the power dispatch strategy.

8. A load forecasting device for a distribution network, characterized in that: include: A first acquisition unit, used to acquire current power data of the distribution network; A second acquisition unit is used to perform model training on the original load prediction model in the distribution network according to the model weight based on the power data using a differential privacy algorithm to obtain an intermediate load prediction model, wherein the model weight is generated by a central server through a random function, the original load prediction model is the prediction model currently used in the distribution network, the central server and the distribution network perform data interaction, the model weight includes the original model weight and the mirror model weight, and the intermediate load prediction model includes an aggregated load prediction model and a personalized load prediction model; The second acquisition unit includes a first acquisition module and a second acquisition module, wherein the first acquisition module is used to obtain the aggregate load prediction model at least according to the differential privacy algorithm, and the second acquisition module is used to obtain the aggregate load prediction model at least according to the multi-task federated learning framework; The second acquisition module includes: a fifth acquisition submodule, which is used to acquire the second model parameter of the personalized load prediction model and the first model parameter of the aggregated load prediction model; and a sixth acquisition submodule, which is used to obtain the updated second model parameter according to the first model parameter and the second model parameter using a fifth formula, wherein the fifth formula is: s represents the second round of model training for the personalized load forecasting model, g represents the serial number of the smart meter, r represents the first round of model training for the aggregated load forecasting model, represents the second model parameter after the g-th smart meter is updated, represents the second model parameter, η l represents the personalized learning rate, ▽F g represents the derivative of the objective function of the g-th smart meter, λ is the parameter for adjusting the aggregated load forecasting model and the personalized load forecasting model, represents the first model parameter of the g-th smart meter in the r-th round of training; A first updating unit, configured to update the model weight using a target model weight, wherein the target model weight is a model weight regenerated after the central server aggregates the model parameters of the intermediate load forecasting model; A judging unit, used to judge whether the intermediate load forecasting model satisfies a convergence condition, wherein the convergence condition is a condition for judging whether the intermediate load forecasting model has been trained; A second updating unit, configured to update the intermediate load forecasting model to a new original load forecasting model when the intermediate load forecasting model does not meet the convergence condition; A third acquisition unit is used to repeatedly execute the first acquisition unit, the second acquisition unit, the first update unit, the judgment unit and the second update unit until the intermediate load prediction model satisfies the convergence condition, thereby obtaining a target load prediction model, wherein the original load prediction model, the intermediate load prediction model and the target load prediction model are all used to predict the load required by the distribution network after the fault is self-healed; A prediction unit is used to predict the load required by the distribution network after the fault is self-healed based on the power data using the target load prediction model.

9. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the load forecasting method for a distribution network as described in any one of claims 1 to 7 is performed.

Citation Information

Patent Citations

  • Non-equilibrium data-oriented cost-aware privacy protection federated learning method

    CN115511054A

  • Power load short-term prediction system and method based on privacy protection

    CN116128164A