Self-adaptive load monitoring method for multivariate federal isomerism
Through the adaptive load monitoring method, data is collected using intelligent sensors, combined with adaptive knowledge distillation and asynchronous weighting mechanism, dynamic clustering and cache pooling mechanism, the heterogeneity problem of load monitoring methods in federated learning is solved, and efficient load monitoring and resource utilization is achieved to adapt to the needs of massive users.
Patent Information
- Application Number
- CN202510400567.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-25
AI Technical Summary
The existing load monitoring methods based on federated learning are difficult to effectively coordinate under the limitations of privacy protection when facing the heterogeneity of electricity consumption data, load monitoring models and operating efficiency, resulting in a decrease in synergistic benefits among users and a decrease in resource utilization, making it difficult to promote to massive users.
Adaptive load monitoring method is adopted, data is collected through intelligent sensors, adaptive knowledge distillation and asynchronous weighting mechanisms, dynamic clustering and cache pooling mechanisms are used to adaptively deal with the heterogeneity of power consumption data, load monitoring models and operating efficiency, and realize adaptive updates and optimization of model parameters.
It improves the practicality and synergistic benefits of load monitoring, can effectively utilize wide-area power consumption data, adapt to the load monitoring needs of massive users, and improves overall resource utilization and monitoring performance.
Smart Images

Figure CN120377478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of load monitoring, and in particular to an adaptive load monitoring method for multi-source federated heterogeneity. Background Art
[0002] The electricity consumption information at the device level is beneficial for grid operators to accurately evaluate the flexibility of users, so as to formulate more economical demand response strategies, and also enables users to benefit from services such as energy-saving advice generation, equipment fault monitoring, and elderly activity assessment. Therefore, the load monitoring technology for downstream power consumption equipment only through bus-type electrical data monitoring lines has become a research hotspot.
[0003] To solve the dilemma of the need for rich training data in the current data islands caused by privacy protection in load monitoring, the federated learning method of learning wide-area electricity consumption data through cloud-local iteration while ensuring privacy is highly anticipated, and some researchers have applied it to power plant wiring diagrams. However, the existing load monitoring methods based on federated learning still need to address the following three severe challenges of federated heterogeneity in practical applications:
[0004] 1. Heterogeneity of electricity consumption data. The electricity consumption data consists of personalized electricity consumption behaviors and increasingly diverse electricity consumption equipment, resulting in heterogeneous statistical distributions of electricity consumption data among users. Further, due to the difficulty of aligning the data distributions of each user before federated training under privacy protection constraints, this heterogeneity may lead to a significant deviation between the cloud aggregation model and the local optimal model, resulting in a significant decline in the collaborative benefits among users.
[0005] 2. Heterogeneity of load monitoring models. Due to the diversity of load monitoring models and the different models suitable for local computing resources and electricity consumption data, the assumption of isomorphic user models is difficult to be satisfied in practice. Further, since the model structures of each user may be partially or completely protected by privacy, this heterogeneity not only exacerbates the differences between user models, but may also directly hinder the cloud-local iteration of the models.
[0006] 3. Heterogeneity of operation efficiency. Each user is networked through communication devices with different bandwidths and reliabilities, and the channels are uncertain. In addition, the local computing requirements and computing resources of each user are also different. Therefore, in each cloud-local iteration, the time required by each user varies greatly and is difficult to estimate, resulting in a reduction in overall resource utilization and a decline in load monitoring performance. The impact of this dilemma is more serious when promoting load monitoring based on federated learning to a large number of users. Summary of the Invention
[0007] The object of the present invention is to overcome the disadvantages and deficiencies of the prior art, and a self-adaptive load monitoring method for multi-source federated heterogeneity is proposed. This method can adaptively cope with the heterogeneity in power consumption data, load monitoring models, and operation efficiency in the cloud-local iteration, has strong practicability, helps to fully exploit the potential value of wide-area power consumption data, and promotes load monitoring to a large number of users. It is a key technology for load monitoring based on federated learning.
[0008] To achieve the above object, the technical solution provided by the present invention is: a self-adaptive load monitoring method for multi-source federated heterogeneity, including the following steps:
[0009] 1) Each load monitoring user respectively collects bus active power data and target load active power data based on intelligent sensors, and establishes a local load monitoring data set;
[0010] 2) Each load monitoring user respectively initializes the local proxy model parameters based on the global load monitoring model parameters sent by the cloud server, and then uses the local load monitoring data set in step 1) to train the local proxy model parameters and local load monitoring model parameters based on adaptive knowledge distillation;
[0011] 3) The cloud server collects the local proxy model parameters of each load monitoring user in step 2) based on the cache pool, performs dynamic clustering on the local proxy model parameters in the cache pool, and then aggregates and updates the global load monitoring model parameters by an asynchronous weighted mechanism;
[0012] 4) After iterating steps 2) and 3) until convergence, the local load monitoring model parameters of each load monitoring user are put into practical application.
[0013] Further, in step 1), the bus active power data refers to the active power at the entrance of the user's power line, and the sampling frequency is fre agg ; the target load active power data refers to the active power of only a single load to be monitored, and the sampling time and frequency are the same as those of the bus active power data. The target loads include: washing machines, dishwashers, microwave ovens, refrigerators, air conditioners, and electric vehicles; the local load monitoring data set is composed of segments formed by cutting the bus active power data and the target load active power data in the order from front to back by a sliding window with a width of width and a sliding step of slide, and is expressed as:
[0014]
[0015] In the formula, refers to the local load monitoring data set of the i-th load monitoring user, is the j-th bus active power data segment in the local load monitoring data set of the i-th load monitoring user, is the j-th target load active power data segment in the local load monitoring data set of the i-th load monitoring user, is the total number of segments in the local load monitoring data set of the i-th load monitoring user.
[0016] Furthermore, step 2) includes the following steps:
[0017] 2.1) Initialize the local proxy model. Specifically: By combining the global load monitoring model parameters sent by the cloud server and the local proxy model parameters after the previous round of local training through balanced weight weighted combination, as shown in the following formula:
[0018]
[0019] In the formula, refers to the local proxy model initialization parameters of the i-th load monitoring user before this round of local training, wp t-1 refers to the global load monitoring model parameters sent by the cloud server in this round, refers to the local proxy model parameters of the i-th load monitoring user after the previous round of local training, refers to the balance weight of the i-th load monitoring user in this round;
[0020] For obtaining the balance weight, first randomly extract s% of the local load monitoring data set, and then use the balance weight as the variable to be optimized. Iterate by minimizing the mean square error of the local proxy model initialization parameters in the extracted local load monitoring data set by the gradient descent method, and finally obtain it through threshold clipping, as shown below:
[0021]
[0022]
[0023] In the formula, lr i b refers to the learning rate of the i-th load monitoring user when obtaining the balance weight, L b refers to the mean square error of the local proxy model initialization parameters in the extracted local load monitoring data set, respectively refer to the j-th bus active power data segment and the target load active power data segment randomly extracted by the i-th load monitoring user with s%, f pro refers to the local proxy model, thr b refers to the hyperparameter that controls the balance degree;
[0024] 2.2) Locally train the local proxy model parameters and local load monitoring model parameters based on adaptive knowledge distillation. Specifically: both the local proxy model parameters and the local load monitoring model parameters use the mean squared error in the local load monitoring dataset and the knowledge distillation loss calculated based on the outputs of these two types of models as the objective function, and are optimized through the gradient descent method, as shown in the following formula:
[0025]
[0026] In the formula, respectively refer to the local proxy model parameters and local load monitoring model parameters iteratively obtained by the i-th load monitoring user during training. lr i local refers to the learning rate of the i-th load monitoring user during training, respectively refer to the mean squared errors of the local proxy model parameters and local load monitoring model parameters of the i-th load monitoring user in the local load monitoring dataset, refers to the knowledge distillation loss calculated based on the outputs of the two types of models, as shown below:
[0027]
[0028]
[0029] In the formula, f local refers to the local load monitoring model, respectively refer to the mean squared error and the adaptive weight of the knowledge distillation loss in the local load monitoring dataset of the i-th load monitoring user, and the calculation method is as shown in the following formula:
[0030]
[0031] In the formula, are auxiliary variables for calculating , respectively refer to the mean squared errors of the local proxy model parameters of the i-th load monitoring user in the local load monitoring dataset in the previous round and the two rounds before, respectively refer to the mean squared errors of the local load monitoring model parameters of the i-th load monitoring user in the local load monitoring dataset in the previous round and the two rounds before, respectively refer to the knowledge distillation losses calculated based on the outputs of the two types of models of the i-th load monitoring user in the previous round and the two rounds before. T refers to the hyperparameter that controls the degree of adaptiveness.
[0032] Furthermore, step 3) includes the following steps:
[0033] 3.1) Collect the local proxy model parameters of each load monitoring user in step 2) based on the cache pool. Specifically, according to the local proxy model parameters of each load monitoring user and the training speed of the local load monitoring model parameters, collect the local proxy model parameters of each load monitoring user from fast to slow and add them to the cache pool. When the number of local proxy model parameters in the cache pool reaches δ% of the total number of users, perform the subsequent steps 3.2), 3.3) and 4) on the local proxy model parameters in the cache pool. After execution, clear the cache pool and continue to collect the local proxy model parameters of the remaining load monitoring users;
[0034] 3.2) Perform dynamic clustering on the local proxy model parameters in the cache pool. Specifically: First, perform multi-population detection. If multiple populations are detected, perform hierarchical clustering; otherwise, maintain the original population;
[0035] In multi-population detection, first calculate the difference between each local proxy model parameter in the cache pool and the local proxy model parameter in the previous round. If the following criterion is true, multiple populations exist; otherwise, they do not:
[0036]
[0037] In the formula, C refers to the total number of users, respectively refer to the local proxy model parameter of the r-th load monitoring user in the cache pool and the local proxy model parameter in the previous round, thr max 、thr mean respectively refer to the maximum difference threshold and the average difference threshold;
[0038] In hierarchical clustering, first calculate the cosine similarity between the differences between each local proxy model parameter in the cache pool and the local proxy model parameter in the previous round, as shown in the following formula:
[0039]
[0040] In the formula, respectively refer to the local proxy model parameter of the e-th load monitoring user in the cache pool and the local proxy model parameter in the previous round; respectively refer to the local proxy model parameter of the g-th load monitoring user in the cache pool and the local proxy model parameter in the previous round;
[0041] Then, solve the hierarchical clustering problem of the following formula by the iterative method, and divide the set of load monitoring users in the cache pool into sub-populations with the smallest similarity between two populations, as shown in the following formula:
[0042]
[0043] In the formula, S pool refers to the set of load monitoring users in the cache pool, s 1, s 2 refers to the sub - group with the minimum similarity between two groups;
[0044] In the iterative method for solving, first, the users in each cache pool are regarded as independent groups. After sorting them in descending order of the cosine similarity between the differences of the local proxy model parameters of each local proxy model parameter and the previous - round local proxy model parameter, the cosine similarity values are selected in turn, and the groups where the corresponding users are located are merged until two non - overlapping groups are formed;
[0045] 3.3) Aggregate and update the global load - monitoring model parameters by the asynchronous weighted mechanism. Specifically: calculate the average value of the differences between the local proxy model parameters of the load - monitoring users in the previous round and the local proxy model parameters in the previous two rounds for each sub - group in the cache pool, as shown in the following formula:
[0046]
[0047] In the formula, refers to the average value of the differences between the local proxy model parameters of the load - monitoring users in the previous round and the local proxy model parameters in the previous two rounds in sub - group u, and num u refers to the total number of load - monitoring users in sub - group u, respectively refer to the local proxy model parameters of the h - th load - monitoring user in the previous round and the previous two rounds in the u - th sub - group;
[0048] Then, for each sub - group in each cache pool, calculate the asynchronous weighted weights of the local proxy model parameters of each load - monitoring user in the sub - group one by one, as shown in the following formula:
[0049]
[0050] In the formula, refers to the asynchronous weighted weight of the v - th load - monitoring user in the u - th sub - group in the cache pool, respectively refer to the local proxy model parameters of the v - th load - monitoring user in the u - th sub - group in the cache pool and the local proxy model parameters in the previous round, respectively refer to the local proxy model parameters of the w - th load - monitoring user in the u - th sub - group in the cache pool and the local proxy model parameters in the previous round;
[0051] According to the asynchronous weighted weights, the global load - monitoring model parameters of each sub - group are updated as shown in the following formula:
[0052]
[0053] In the formula, refers to the updated global load - monitoring model parameter of the u - th sub - group in the cache pool, refers to the global load - monitoring model parameter of the u - th sub - group in the cache pool before update, refers to the asynchronous weighted weight of the z-th load monitoring user in the u-th sub-group in the cache pool, which respectively refer to the local proxy model parameters of the z-th load monitoring user in the u-th sub-group in the cache pool and the local proxy model parameters of the previous round.
[0054] Furthermore, in step 4), iterating steps 2) and 3) until convergence means calculating the sum of the mean square error and the knowledge distillation loss in the local load monitoring datasets of each load monitoring user. If this sum does not decrease for consecutive epoch g rounds of iteration, it is judged to be convergent and the iteration stops; otherwise, it is judged to be still not convergent and the iteration continues.
[0055] Putting the local load monitoring model parameters of each load monitoring user into practical application means that the local load monitoring model loads the local load monitoring model parameters, takes the bus active power data collected locally in real time as input, and outputs the target load active power data to the load monitoring user.
[0056] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0057] 1. The present invention adaptively initializes the local load monitoring model through the gradient descent method to balance the global information and the locally accumulated information, and can better utilize the global information with bias due to the heterogeneity of electricity consumption data in the local training of load monitoring users.
[0058] 2. The present invention proposes knowledge distillation with adaptive weights, enabling homogeneous local proxy models to transmit the information required for load monitoring between the cloud server and the local, breaking through the limitation of the heterogeneity of local load monitoring models.
[0059] 3. The present invention adds dynamic clustering in the aggregation of the cloud server to adaptively reduce the bias caused by the heterogeneity of electricity consumption data within the user group, which is beneficial to improving the load monitoring performance of each user.
[0060] 4. The present invention designs an asynchronous weighted mechanism with a cache pool, which can adaptively cope with the heterogeneity of the operation efficiency of each load monitoring user, and at the same time reduce the bias caused by the heterogeneity of electricity consumption data in asynchronous aggregation. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a schematic diagram of the method logic flow of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0062] The present invention will be further described in detail below in conjunction with the embodiments and the drawings, but the embodiments of the present invention are not limited thereto.
[0063] Such as Figure 1As shown in the figure, this embodiment discloses an adaptive load monitoring method for multi-source federated heterogeneity, and the specific situation is as follows:
[0064] 1) Each load monitoring user respectively collects bus-type active power data and target load active power data based on intelligent sensors, and establishes a local load monitoring data set. The bus-type active power data refers to the active power at the user's power line entry point, and the sampling frequency is fre agg ; The target load active power data refers to the active power of only a single load to be monitored. The sampling time and frequency are the same as those of the bus-type active power data. The target loads include: washing machines, dishwashers, microwave ovens, refrigerators, air conditioners, electric vehicles; The local load monitoring data set consists of segments formed by cutting the bus-type active power data and the target load active power data in sequence by a sliding window with a width of width and a sliding step of slide, and is expressed as:
[0065]
[0066] In the formula, refers to the local load monitoring data set of the i-th load monitoring user, is the j-th bus-type active power data segment in the local load monitoring data set of the i-th load monitoring user, is the j-th target load active power data segment in the local load monitoring data set of the i-th load monitoring user, is the total number of segments in the local load monitoring data set of the i-th load monitoring user. Adapted to the sampling frequency of the actual smart meter, fre agg can be selected as 1 / 8Hz.
[0067] 2) Each load monitoring user respectively initializes the local proxy model parameters based on the global load monitoring model parameters issued by the cloud server, and then trains the local proxy model parameters and the local load monitoring model parameters based on the local load monitoring data set in step 1), including the following steps:
[0068] 2.1) Local proxy model initialization, specifically: By combining the global load monitoring model parameters issued by the cloud server and the local proxy model parameters after the previous round of local training through weighted combination with balanced weights, as shown in the following formula:
[0069]
[0070] In the formula, refers to the local proxy model initialization parameters of the i-th load monitoring user before this round of local training, wp t-1 refers to the global load monitoring model parameters issued by the cloud server in this round, Refers to the local proxy model parameters of the i-th load monitoring user after the previous round of local training, Refers to the balancing weight of the i-th load monitoring user in this round;
[0071] For obtaining the balancing weight, first randomly select s% of the local load monitoring dataset, and then, with the balancing weight as the variable to be optimized, use the gradient descent method to minimize the mean square error of the initial parameters of the local proxy model in the selected local load monitoring dataset for iteration, and finally obtain it through threshold clipping, as shown below:
[0072]
[0073] In the formula, lr i b Refers to the learning rate of the i-th load monitoring user when obtaining the balancing weight, L b Refers to the mean square error of the initial parameters of the local proxy model in the selected local load monitoring dataset, Respectively refer to the j-th bus active power data segment and the target load active power data segment randomly selected by the i-th load monitoring user with s%, f pro Refers to the local proxy model, thr b Refers to the hyperparameter controlling the balance degree; in practical applications, lr i b Can both be set to 0.001, s% can be set to 40%, thr b Can be set to 0.95;
[0074] 2.2) Perform local training on the local proxy model parameters and the local load monitoring model parameters based on adaptive knowledge distillation. Specifically: both the local proxy model parameters and the local load monitoring model parameters use the mean square error in the local load monitoring dataset and the knowledge distillation loss calculated according to the outputs of these two types of models as the objective function, and are optimized through the gradient descent method, as shown in the following formula:
[0075]
[0076] In the formula, Respectively refer to the local proxy model parameters and the local load monitoring model parameters iteratively obtained by the i-th load monitoring user during training, lr i local Refers to the learning rate of the i-th load monitoring user during training, Respectively refer to the mean square error of the local proxy model parameters and the local load monitoring model parameters of the i-th load monitoring user in the local load monitoring dataset, Refers to the knowledge distillation loss calculated according to the outputs of the two types of models, as shown below:
[0077]
[0078] In the formula, f local refers to the local load monitoring model, respectively refer to the mean square error and the adaptive weight of the knowledge distillation loss in the local load monitoring dataset of the i-th load monitoring user, and the calculation method is shown in the following formula:
[0079]
[0080]
[0081] In the formula, are respectively auxiliary variables for calculating , respectively refer to the mean square error of the local proxy model parameters of the i-th load monitoring user in the previous round and the previous two rounds in the local load monitoring dataset, respectively refer to the mean square error of the local load monitoring model parameters of the i-th load monitoring user in the previous round and the previous two rounds in the local load monitoring dataset, respectively refer to the knowledge distillation loss calculated from the outputs of two types of models of the i-th load monitoring user in the previous round and the previous two rounds. T refers to the hyperparameter that controls the degree of adaptiveness; in practical applications, lr i local can be set to 0.001, and T can be set to 5.
[0082] 3) The cloud server collects the local proxy model parameters of each load monitoring user in step 2) based on the cache pool. After performing dynamic clustering on the local proxy model parameters in the cache pool, the global load monitoring model parameters are aggregated and updated by the asynchronous weighted mechanism, including the following steps:
[0083] 3.1) Collect the local proxy model parameters of each load monitoring user in step 2) based on the cache pool. Specifically, according to the training speed of the local proxy model parameters and the local load monitoring model parameters of each load monitoring user, the local proxy model parameters of each load monitoring user are collected from fast to slow and added to the cache pool. When the number of local proxy model parameters in the cache pool reaches δ% of the total number of users, the subsequent steps 3.2), 3.3) and 4) are performed on the local proxy model parameters in the cache pool. After execution, the cache pool is emptied and the local proxy model parameters of the remaining load monitoring users are collected; balancing the overall efficiency and load monitoring performance under the dynamic operation efficiency, δ% can be selected as 40%;
[0084] 3.2) Perform dynamic clustering on the local proxy model parameters in the cache pool. Specifically: first perform multi-group detection. If multiple groups are detected, perform hierarchical clustering, otherwise maintain the original group;
[0085] In multi-group detection, first calculate the difference between the local proxy model parameters in the cache pool and the local proxy model parameters in the previous round. If the following criterion is true, there are multiple groups; otherwise, there are not:
[0086]
[0087] In the formula, C refers to the total number of users, respectively refer to the local proxy model parameters of the r-th load monitoring user in the cache pool and the local proxy model parameters in the previous round, thr max 、thr mean respectively refer to the maximum difference threshold and the average difference threshold; in practical applications, thr max 、thr mean can be set to 1.2 and 0.4 respectively;
[0088] In hierarchical clustering, first calculate the cosine similarity between the differences between the local proxy model parameters in the cache pool and the local proxy model parameters in the previous round, as shown in the following formula:
[0089]
[0090] In the formula, respectively refer to the local proxy model parameters of the e-th load monitoring user in the cache pool and the local proxy model parameters in the previous round; respectively refer to the local proxy model parameters of the g-th load monitoring user in the cache pool and the local proxy model parameters in the previous round;
[0091] Then, solve the hierarchical clustering problem of the following formula through the iterative method, and divide the set of load monitoring users in the cache pool into sub-groups with the smallest similarity between two groups, as shown in the following formula:
[0092]
[0093] In the formula, S pool refers to the set of load monitoring users in the cache pool, s 1 、s 2 refer to the sub-groups with the smallest similarity between two groups;
[0094] The iterative method solving process first treats the users in each cache pool as an independent group. After sorting the cosine similarities between the differences of the local proxy model parameters of each local agent and the local proxy model parameters of the previous round from large to small, the cosine similarity values are selected in turn, and the groups where the corresponding users are located are merged until two non-intersecting groups are formed. For example: Users A, B, C, and D are initially each a separate group. After calculating the cosine similarities and sorting them from large to small, it is as follows: The cosine similarity between User A and B is 0.95, the cosine similarity between User B and C is 0.8, and the cosine similarity between User A and D is 0.6. Then, the cosine similarity 0.95 is taken out in turn, and the groups where Users A and B are located are merged to obtain the new group AB; the cosine similarity 0.8 is taken out, and the groups AB and C where Users B and C are located are merged to obtain the new group ABC; at this point, two non-intersecting groups ABC and D have been formed.
[0095] 3.3) Aggregate and update the global load monitoring model parameters by the asynchronous weighted mechanism. Specifically: Calculate the average value of the differences between the local proxy model parameters of the load monitoring users in the previous round and the local proxy model parameters of the previous two rounds for each subgroup in the cache pool, as shown in the following formula:
[0096]
[0097] In the formula, refers to the average value of the differences between the local proxy model parameters of the load monitoring users in the previous round and the local proxy model parameters of the previous two rounds in subgroup u, and num u refers to the total number of load monitoring users in subgroup u, respectively refer to the local proxy model parameters of the h-th load monitoring user in the u-th subgroup in the previous round and the previous two rounds;
[0098] Then, for each subgroup in each cache pool, calculate the asynchronous weighted weights of the local proxy model parameters of each load monitoring user in the subgroup one by one, as shown in the following formula:
[0099]
[0100] In the formula, refers to the asynchronous weighted weight of the v-th load monitoring user in the u-th subgroup in the cache pool, respectively refer to the local proxy model parameters of the v-th load monitoring user in the u-th subgroup in the cache pool and the local proxy model parameters of the previous round, respectively refer to the local proxy model parameters of the w-th load monitoring user in the u-th subgroup in the cache pool and the local proxy model parameters of the previous round;
[0101] According to the asynchronous weighted weights, the global load monitoring model parameters of each subgroup are updated as shown in the following formula:
[0102]
[0103] In the formula, refers to the updated global load monitoring model parameters of the u-th sub-group in the cache pool, refers to the global load monitoring model parameters of the u-th sub-group in the cache pool before update, refers to the asynchronous weighted weight of the z-th load monitoring user in the u-th sub-group in the cache pool, respectively refer to the local proxy model parameters and the previous round of local proxy model parameters of the z-th load monitoring user in the u-th sub-group in the cache pool.
[0104] 4) Iterate steps 2) and 3) until convergence, that is, calculate the sum of the mean square error and the knowledge distillation loss in the local load monitoring dataset of each load monitoring user. If the sum does not decrease for consecutive epoch g rounds of iteration, it is judged to be convergent and the iteration stops. Otherwise, it is judged to be still not convergent and the iteration continues. After convergence, the local load monitoring model parameters of each load monitoring user are put into actual application, that is, the local load monitoring model loads the local load monitoring model parameters, and uses the bus active power data collected in real time locally as the input to output the target load active power data to the load monitoring user.
[0105] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. An adaptive load monitoring method for multi-source federated heterogeneity, characterized in that It includes the following steps: 1) Each load monitoring user respectively collects bus - type active power data and target load active power data based on intelligent sensors, and establishes a local load monitoring data set; 2) Each load monitoring user respectively initializes local proxy model parameters based on the global load monitoring model parameters sent by the cloud server. Then, with the local load monitoring data set in step 1), the local proxy model parameters and local load monitoring model parameters are trained based on adaptive knowledge distillation; 3) The cloud server collects the local proxy model parameters of each load monitoring user in step 2) based on the cache pool. After performing dynamic clustering on the local proxy model parameters in the cache pool, the global load monitoring model parameters are aggregated and updated by the asynchronous weighted mechanism; 4) After iterating steps 2) and 3) until convergence, the local load monitoring model parameters of each load monitoring user are put into actual application.
2. The adaptive load monitoring method for multi-source federated heterogeneity according to claim 1, wherein, In step 1), the bus-type active power data refers to the active power at the user's power line entry point, and the sampling frequency is fre agg ; The target load active power data refers to the active power of only a single load to be monitored, and the sampling time and frequency are the same as those of the bus - type active power data. The target loads include: washing machines, dishwashers, microwave ovens, refrigerators, air conditioners, and electric vehicles. The local load monitoring data set consists of segments formed by cutting the bus - type active power data and target load active power data in sequence by a sliding window with a width of width and a sliding step of slide, and is expressed as: Wherein, refers to the local load monitoring data set of the i-th load monitoring user, is the j-th bus active power data segment in the local load monitoring data set of the i-th load monitoring user, is the j-th target load active power data segment in the local load monitoring data set of the i-th load monitoring user, is the total number of segments in the local load monitoring data set of the i-th load monitoring user.
3. An adaptive load monitoring method for multi-source federated heterogeneity according to claim 2, characterized in that The said step 2) includes the following steps: 2.1) Local proxy model initialization, specifically: by weighted combination of the global load monitoring model parameters sent by the cloud server and the local proxy model parameters after the previous round of local training with balance weights, as shown in the following formula: In the formula, refers to the initialization parameters of the local proxy model of the i-th load monitoring user before this round of local training, wp t-1 refers to the global load monitoring model parameters sent by the cloud server in this round, refers to the parameters of the local proxy model of the i-th load monitoring user after the previous round of local training, refers to the balance weight of the i-th load monitoring user in this round; For obtaining the balance weights, first randomly extract s% of the local load monitoring data set. Then, with the balance weights as variables to be optimized, the mean square error of the local proxy model initialization parameters in the extracted local load monitoring data set is minimized by the gradient descent method for iteration, and finally obtained through threshold clipping, as shown below: where lr i b refers to the learning rate when the i-th load monitoring user calculates the balance weight, and L b refers to the mean square error of the initial parameters of the local proxy model in the extracted local load monitoring dataset. respectively refer to the j-th bus active power data segment and the target load active power data segment randomly extracted by s% by the i-th load monitoring user, and f pro refers to the local proxy model, and thr b refers to the hyperparameter that controls the degree of balance; 2.2) Based on adaptive knowledge distillation, local training of the local proxy model parameters and local load monitoring model parameters is carried out. Specifically: both the local proxy model parameters and local load monitoring model parameters take the mean square error in the local load monitoring data set and the knowledge distillation loss calculated according to the outputs of these two types of models, namely the local proxy model and the local load monitoring model, as the objective function, and are optimized by the gradient descent method, as shown in the following formula: In the formula, respectively refer to the local proxy model parameters and local load monitoring model parameters iteratively obtained by the i-th load monitoring user during training, and lr i local refers to the learning rate of the i-th load monitoring user during training, respectively refer to the mean square errors of the local proxy model parameters and local load monitoring model parameters of the i-th load monitoring user in the local load monitoring dataset, refers to the knowledge distillation loss calculated based on the outputs of the two types of models, as shown below: where, f local refers to the local load monitoring model, respectively refer to the mean square error and the adaptive weight of the knowledge distillation loss in the local load monitoring dataset of the i-th load monitoring user, and the calculation method is shown in the following formula: In the formula, are respectively the auxiliary variables for calculating . respectively refer to the mean square errors of the local proxy model parameters of the i-th load monitoring user in the previous round and the previous two rounds in the local load monitoring dataset, respectively refer to the mean square errors of the local load monitoring model parameters of the i-th load monitoring user in the previous round and the previous two rounds in the local load monitoring dataset, respectively refer to the knowledge distillation losses calculated from the outputs of the two types of models of the i-th load monitoring user in the previous round and the previous two rounds, and T refers to the hyperparameter that controls the degree of adaptability.
4. An adaptive load monitoring method for multi-source federated heterogeneity according to claim 3, characterized in that The said step 3) includes the following steps: 3.1) Based on the cache pool, collect the local proxy model parameters of each load monitoring user in step 2). Specifically, according to the training speeds of the local proxy model parameters and local load monitoring model parameters of each load monitoring user, the local proxy model parameters of each load monitoring user are collected into the cache pool in order from fast to slow. When the number of local proxy model parameters in the cache pool reaches δ% of the total number of users, the subsequent steps 3.2), 3.3), and 4) are performed on the local proxy model parameters in the cache pool. After execution, the cache pool is emptied and the local proxy model parameters of the remaining load monitoring users are collected continuously; 3.2) Perform dynamic clustering on the local proxy model parameters in the cache pool. Specifically: First, conduct multi-group detection. If multiple groups are detected, perform hierarchical clustering; otherwise, maintain the original group. In multi-group detection, first calculate the difference between each local proxy model parameter in the cache pool and the local proxy model parameter in the previous round. If the following criterion is true, multiple groups exist; otherwise, they do not: Where C refers to the total number of users, respectively refer to the local proxy model parameters of the r-th load monitoring user in the cache pool and the local proxy model parameters in the previous round, thr max and thr mean respectively refer to the maximum difference threshold and the average difference threshold; In hierarchical clustering, first calculate the cosine similarity between the differences between each local proxy model parameter in the cache pool and the local proxy model parameter in the previous round, as shown in the following formula: In the formula, respectively refer to the local proxy model parameters of the e-th load monitoring user in the cache pool and the local proxy model parameters of the previous round; respectively refer to the local proxy model parameters of the g-th load monitoring user in the cache pool and the local proxy model parameters of the previous round; Then, solve the hierarchical clustering problem of the following formula through the iterative method, and divide the set of load monitoring users in the cache pool into sub-groups with the smallest similarity between two groups, as shown in the following formula: In the formula, S pool refers to the set of users for load monitoring in the cache pool, s 1 , s 2 refers to the sub-group with the smallest similarity between two groups; The process of solving by the iterative method is to first regard each user in each cache pool as an independent group. After sorting the cosine similarities between the differences between each local proxy model parameter and the local proxy model parameter in the previous round from large to small, select the cosine similarity values in turn and merge the groups where the corresponding users are located until two non-overlapping groups are formed. 3.3) Aggregate and update the global load monitoring model parameters by the asynchronous weighting mechanism. Specifically: Calculate the average value of the differences between the local proxy model parameters of the load monitoring users in the previous round and the local proxy model parameters in the two previous rounds for each sub-group in the cache pool, as shown in the following formula: In the formula, refers to the average value of the difference between the local proxy model parameters of the previous round and the local proxy model parameters of the previous two rounds of the load monitoring users in the sub-group u, and num u refers to the total number of load monitoring users in the sub-group u, respectively refer to the local proxy model parameters of the previous round and the previous two rounds of the h-th load monitoring user in the u-th sub-group; Then, for each sub-group in each cache pool, calculate the asynchronous weighting weights of the local proxy model parameters of each load monitoring user in the sub-group one by one, as shown in the following formula: In the formula, refers to the asynchronous weighted weight of the v-th load monitoring user in the u-th sub-group in the cache pool, respectively refer to the local proxy model parameters of the v-th load monitoring user in the u-th sub-group in the cache pool and the local proxy model parameters of the previous round, respectively refer to the local proxy model parameters of the w-th load monitoring user in the u-th sub-group in the cache pool and the local proxy model parameters of the previous round; According to the asynchronous weighting weights, the global load monitoring model parameters of each sub-group are updated as shown in the following formula: In the formula, refers to the updated global load monitoring model parameters of the u-th sub-group in the cache pool, refers to the global load monitoring model parameters of the u-th sub-group in the cache pool before update, refers to the asynchronous weighted weight of the z-th load monitoring user in the u-th sub-group in the cache pool, respectively refer to the local proxy model parameters and the previous round of local proxy model parameters of the z-th load monitoring user in the u-th sub-group in the cache pool.
5. The adaptive load monitoring method for multi-source federated heterogeneity according to claim 4, characterized in that In step 4), iterating steps 2) and 3) until convergence means calculating the sum of the mean square error and the knowledge distillation loss in the local load monitoring data sets of each load monitoring user. If this sum does not decrease for consecutive epoch g rounds of iteration, it is judged to converge and the iteration stops; otherwise, it is judged to still not converge and the iteration continues; Putting the local load monitoring model parameters of each load monitoring user into actual application means that the local load monitoring model loads the local load monitoring model parameters, uses the bus-type active power data collected locally in real time as input, and outputs the target load active power data to the load monitoring user.