Load identification method and system based on knowledge distillation, medium and equipment

By applying knowledge distillation and incremental update algorithms on edge devices, the imbalance between accuracy and efficiency of load identification on resource-constrained devices is solved, efficient and adaptive load identification is achieved, and the adaptability and real-time performance of the model to dynamic power consumption scenarios are improved.

CN120611273AActive Publication Date: 2025-09-09GUANGDONG ELECTRIC POWER SCI RES INST ENERGY TECH CO LTD

Patent Information

Application Number
CN202510792547.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-09
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

Existing non-intrusive load monitoring technologies have difficulty achieving efficient and adaptive load identification on resource-constrained edge devices. Static models cannot dynamically adapt to the connection of new appliances or changes in user power usage patterns. The feature extraction capabilities of lightweight models are weakened, and cloud communication bandwidth limitations lead to a surge in latency.

Method used

Through knowledge distillation, the load classification knowledge of the cloud-based load identification model is migrated to the edge device. Combined with quantization processing and incremental update algorithm, a lightweight load identification model is generated and optimized on the edge device. Cross-entropy loss and MAS regularization are used to balance the new and old task parameters to achieve localized load identification.

Benefits of technology

While ensuring recognition accuracy, the model parameters and computational complexity are reduced, the model's adaptability and real-time performance to dynamic power consumption scenarios are improved, the imbalance between accuracy and efficiency of resource-constrained devices is resolved, and data transmission delays are eliminated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611273A_ABST
    Figure CN120611273A_ABST
Patent Text Reader

Abstract

The invention discloses a load identification method and system based on knowledge distillation, a medium and equipment, and belongs to the field of electric power metrology, and the method comprises the steps: transferring the load classification knowledge of a cloud load identification model to an original load identification model through knowledge distillation, and obtaining a first load identification model; quantifying the first load identification model to obtain a second load identification model and issuing the second load identification model to the edge device; and sending the incremental update data set to the edge device, so that the edge device optimizes the second load identification model according to an incremental update algorithm in combination with dynamic constraints of cross entropy loss and historical task key parameters to obtain a third load identification model, and after optimization, obtaining a third load identification model. And according to the third load identification model, carrying out load identification on the power data collected by the edge device in real time and outputting a result. Therefore, by implementing the method, the device and the system, the problem that efficient and adaptive non-intrusive load monitoring is difficult to realize on resource-limited edge equipment in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power metering and relates to a load identification method, system, medium and equipment based on knowledge distillation. Background Art

[0002] With the continued growth of global energy demand and the increasingly urgent need to improve energy efficiency, smart grids, as a core development direction of modern power systems, rely on non-intrusive load monitoring technology to achieve refined analysis of user electricity usage behavior. This technology replaces traditional intrusive monitoring solutions by collecting characteristic data such as total voltage, current, and harmonics at the home entrance in real time, significantly reducing equipment deployment and maintenance costs and becoming a key means of large-scale promotion. Existing methods mainly rely on machine learning algorithms (such as support vector machines and random forests), deep learning models (such as CNNs and Transformers), and centralized cloud processing to achieve load identification. Some solutions use static models deployed locally on smart meters to perform inference to circumvent communication bandwidth limitations.

[0003] However, although existing methods have achieved non-intrusive load monitoring to a certain extent, their limitations significantly restrict the actual application effect: statically deployed models cannot dynamically adapt to the connection of new appliances or changes in users' electricity consumption patterns, and need to rely on cloud-based retraining and deployment, resulting in delayed updates and insufficient flexibility; although complex models (such as deep residual networks) can improve recognition accuracy, their computing resource requirements far exceed the processing capabilities of edge devices such as smart meters, and lightweight models (such as simple CNNs) have weakened feature extraction capabilities due to their simplified structure, making it difficult to balance accuracy and efficiency; in addition, centralized cloud processing relies on narrowband communication (such as NB-IoT) to transmit high-frequency sampling data. Bandwidth limitations will cause a surge in communication delays, making it difficult to meet real-time monitoring needs. Summary of the Invention

[0004] The present application provides a load identification method, system, medium and device based on knowledge distillation, which can solve the problem that the existing technology is difficult to achieve efficient, adaptive and non-intrusive load monitoring on resource-constrained edge devices.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a load identification method based on knowledge distillation, comprising:

[0006] Based on a preset cloud load identification model, the load classification knowledge of the cloud load identification model is transferred to the preset original load identification model through knowledge distillation to obtain a first load identification model;

[0007] quantizing the first load identification model to obtain a lightweight second load identification model, and delivering the second load identification model to the edge device;

[0008] Send an incremental update data set to the edge device so that the edge device optimizes the second load identification model according to a preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model. After optimization, the edge device performs load identification on the power data collected in real time by the edge device according to the third load identification model, and outputs the identification result.

[0009] Compared with the prior art, the embodiments of the present application have the following beneficial effects: based on the cloud load identification model, the load classification knowledge is migrated to the original load identification model through knowledge distillation, and the model parameter quantity and computational complexity are reduced through quantization. While compressing the model parameter quantity, the classification capability of the cloud load identification model is inherited, directly solving the problem of imbalance between accuracy and efficiency of resource-constrained equipment; further optimizing the adaptability of the model to new data through the cross-entropy loss in the incremental update algorithm, and balancing the update of new and old task parameters through dynamic constraints (such as MAS regularization) to prevent catastrophic forgetting and improve the adaptability of the model to dynamic power consumption scenarios; finally, by locally executing load identification, there is no need to rely on cloud communication, eliminating data transmission delays and significantly improving real-time performance. The overall solution solves the core technical problem that static edge models cannot dynamically adapt to load changes through the synergistic combination of "knowledge distillation-dynamic incremental update-edge reasoning", while ensuring recognition accuracy while achieving low resource consumption and real-time response.

[0010] In some embodiments of the first aspect of the present application, the first load identification model is obtained by migrating load classification knowledge of the cloud-based load identification model to a preset original load identification model through knowledge distillation, including:

[0011] Obtain a distillation data set; wherein each load data in the distillation data set is configured with a corresponding true type label;

[0012] Identify the load type of the distilled dataset according to the cloud load identification model, and output a corresponding first predicted probability distribution;

[0013] According to the original load identification model, load type identification is performed on the distilled dataset, a corresponding second predicted probability distribution is output, and a first cross entropy loss is calculated based on the second predicted probability distribution and the one-hot distribution of the true type label;

[0014] Calculating a corresponding weighted Kullback-Leibler divergence according to the first predicted probability distribution and the second predicted probability distribution;

[0015] A loss function is constructed according to the first cross entropy loss and the weighted Kullback-Leibler divergence, and parameters of the original load identification model are iteratively updated according to the loss function until the model converges, thereby obtaining the first load identification model.

[0016] Compared with the prior art, the above embodiment has the following beneficial effects: by introducing the supervision of real type labels, it ensures that the original load recognition model always retains the direct learning ability of the original task objectives during the distillation process; uses the first predicted probability distribution output by the cloud-based load recognition model as a soft target to guide the original load recognition model to understand the potential semantic similarity of the samples and enhance the generalization ability of complex features; calculates the cross-entropy loss in combination with the second predicted probability distribution of the original load recognition model, strengthens the supervision role of the real labels, and provides a clear optimization direction for the original load recognition model; further integrates the cloud-based load recognition model knowledge through weighted KL divergence and performs iterative training, and jointly optimizes the cross-entropy loss and weighted KL divergence to form complementary supervision, dynamically adjust the difference weights of the output distributions of the two models, balance the "imitation intensity" of knowledge distillation, avoid overfitting or underfitting caused by simple forced distribution alignment, and achieve fine control of knowledge transfer.

[0017] In some embodiments of the first aspect of the present application, calculating the corresponding weighted Kullback-Leibler divergence according to the first predicted probability distribution and the second predicted probability distribution includes:

[0018] The weighted Kullback-Leibler divergence is calculated based on the proportion of the power consumption of each load category in the total power consumption in the distilled data set as the corresponding first importance weight; wherein the calculation formula is as follows:

[0019] Among them, L KL represents the weighted Kullback-Leibler divergence, ω i represents the first importance weight of the i-th type of load, P T (i) represents the predicted probability of the cloud load identification model for the i-th load category, P S (i) represents the predicted probability of the original load identification model for the i-th load category, and N represents the total number of load categories.

[0020] Compared with the existing technology, the above embodiment has the following beneficial effects: the electricity consumption ratio is introduced as the first importance weight in the weighted KL divergence formula, the load energy consumption difference in the business scenario is quantified as the model training weight, and the prediction error of high-energy consumption equipment (such as air conditioners and refrigerators) is amplified in the loss function, which directly improves the model's recognition priority for critical loads.

[0021] In some embodiments of the first aspect of the present application, the second load identification model is optimized according to a preset incremental update algorithm in combination with a cross entropy loss and dynamic constraints of key parameters of historical tasks to generate a third load identification model, including:

[0022] Acquire the incremental update data set; wherein the incremental update data set includes error sample data obtained by the edge device performing load identification on the historically collected power data through the second load identification model;

[0023] Performing reasoning on the incremental update data set according to the second load identification model to calculate a corresponding second cross entropy loss;

[0024] Clustering and grouping the weight matrix of the fully connected layer of the second load identification model according to load categories to obtain several groups of classification parameters;

[0025] Calculating a corresponding second importance weight based on each set of classification parameters, and constructing a MAS regularization term according to each of the second importance weights;

[0026] According to the preset penalty coefficient, the second cross entropy loss and the MAS regularization term are weightedly fused to generate an objective function. According to the objective function, the weight matrix and bias vector of the fully connected layer of the second load identification model are iteratively updated until the model converges to obtain a third load identification model.

[0027] Compared with the existing technology, the above embodiment has the following beneficial effects: triggering iterative optimization of the model by incrementally updating the data set to ensure the continuous learning ability of new load types, and focusing on the weak links of the model by screening out error samples to improve the efficiency of incremental learning; clustering the weight matrix by load category, and explicitly encoding the correlation of classification parameters of the same category into a group structure. This parameter grouping mechanism can identify and strengthen the core discriminant dimension of the model for different category features, reduce redundant parameter interference, and improve the model's sensitivity to category-specific features; the MAS regularization term calculated based on the second importance weight of the parameter group can quantify the importance of different parameter groups to historical tasks. The third load recognition model is based on the weighted fusion of cross-entropy loss and MAS regularization, which automatically distinguishes between adjustable and solidified parameter areas during parameter updates. Ultimately, the third load recognition model inherits the core capabilities of the second load recognition model and stably integrates the knowledge of incremental data to achieve balanced optimization of new and old task objectives.

[0028] In some embodiments of the first aspect of the present application, calculating the corresponding second importance weight based on each group of classification parameters, and constructing a MAS regularization term according to each second importance weight, includes:

[0029] The second importance weight is calculated separately for each set of classification parameters, and the calculation method is as follows:

[0030] in, Represents the kth group classification parameter θ calculated at the tth iteration k The second importance weight of , α represents the balance parameter, D k represents the incremental update dataset corresponding to the kth group of classification parameters, x i represents the data sample, N(D k ) means D k The number of data samples in , represents the output of the second load identification model relative to the classification parameter θ k The gradient size;

[0031] According to each of the second importance weights, a MAS regularization term is constructed, and the algorithm is as follows:

[0032] Among them, L MAS represents the MAS constraint, K represents the number of groups of classification parameters, Represents the optimal classification parameter value obtained by training on historical data.

[0033] Compared with the existing technology, the above embodiment has the following beneficial effects: the second importance weight is dynamically calculated by the gradient size, and the contribution of the parameter to the model output can be quantified by using the gradient sensitivity, thereby ensuring the objectivity of the importance evaluation; the balance parameter is used to control the time impact during training, so that the parameter importance evaluation takes into account both long-term stability and short-term data changes; the MAS regularization term is constructed, and the key parameters of the historical task can be constrained by the parameter offset penalty, thereby maintaining the model's recognition stability for the old load and solving the problem of catastrophic forgetting.

[0034] In some embodiments of the first aspect of the present application, the weighted fusion of the second cross entropy loss and the MAS regularization term according to a preset penalty coefficient to generate an objective function includes:

[0035] The penalty coefficient is constructed by the feature similarity of the new and old training tasks. The algorithm is as follows:

[0036] Among them, λ(x) represents the penalty coefficient, Sim() represents the feature similarity, η is the hyperparameter that controls the decay rate, and f new is the current new training task data, f oldis the old training task data, λ max Indicates the upper limit of the penalty coefficient;

[0037] According to the penalty coefficient, the second cross entropy loss and the MAS regularization term are weighted and fused to generate the objective function, which is expressed as follows: L e =L new +λ·L MAS ;L e represents the objective function, L new represents the second cross entropy loss.

[0038] Compared with the existing technology, the above embodiment has the following beneficial effects: the dynamic penalty coefficient maps the task similarity into a coefficient attenuation curve through an exponential function, strengthens the regularization constraint when the difference between the new and old tasks is large, and weakens the constraint when the difference is small, avoiding over-constraint or under-constraint caused by fixed coefficients; the objective function dynamically adjusts the learning intensity of the new and old tasks through the penalty coefficient, so that the model remains stable when the load characteristics suddenly change.

[0039] In some embodiments of the first aspect of the present application, performing load identification on the power data collected in real time by the edge device according to the third load identification model and outputting the identification result includes:

[0040] Collecting current current and voltage waveform data, and performing feature extraction on the current and voltage waveform data based on a preset sliding window mechanism to obtain corresponding original power features;

[0041] The original power characteristics are normalized to obtain power characteristic data, which is input into the third load identification model for identification, and an identification result is output.

[0042] Compared with the existing technology, the above embodiment has the following beneficial effects: the original power features are converted into standardized inputs of unified dimensions through normalization processing, the differences in numerical ranges between features are eliminated, the model's ability to evenly analyze multidimensional power data is improved, and the stability and accuracy of the recognition results are enhanced.

[0043] In a second aspect, the present invention further provides a load identification system based on knowledge distillation, comprising: a distillation module, a quantification module, and an optimization identification module;

[0044] The distillation module is configured to transfer the load classification knowledge of the cloud load identification model to the preset original load identification model through knowledge distillation based on the preset cloud load identification model, thereby obtaining a first load identification model.

[0045] The quantization module is configured to quantize the first load identification model to obtain a lightweight second load identification model, and send the second load identification model to the edge device;

[0046] The optimization and identification module is used to send an incremental update data set to the edge device, so that the edge device optimizes the second load identification model according to a preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model. After optimization, the edge device performs load identification on the power data collected in real time by the edge device according to the third load identification model and outputs the identification result.

[0047] Compared with the prior art, the above embodiments of the present application have the following beneficial effects: based on the cloud load identification model, the load classification knowledge is migrated to the original load identification model through knowledge distillation, and the model parameter quantity and computational complexity are reduced through quantization. While compressing the model parameter quantity, the classification capability of the cloud load identification model is inherited, directly solving the problem of imbalance between accuracy and efficiency of resource-constrained equipment; further optimizing the adaptability of the model to new data through the cross-entropy loss in the incremental update algorithm, and balancing the update of new and old task parameters through dynamic constraints (such as MAS regularization) to prevent catastrophic forgetting and improve the adaptability of the model to dynamic power consumption scenarios; finally, load identification is performed locally through the third load identification model without relying on cloud communication, eliminating data transmission delays and significantly improving real-time performance. The overall solution solves the core technical problem that static edge models cannot dynamically adapt to load changes through the synergistic combination of "knowledge distillation-dynamic incremental update-edge inference", while ensuring recognition accuracy while achieving low resource consumption and real-time response.

[0048] In a third aspect, the present invention also provides a load identification device based on knowledge distillation, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, it implements the steps of any one of the load identification methods based on knowledge distillation of the present invention.

[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of any one of the load identification methods based on knowledge distillation of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 : A flow chart of a load identification method based on knowledge distillation provided in some embodiments of the present invention.

[0051] Figure 2 : A structural diagram of a load identification system based on knowledge distillation provided in some embodiments of the present invention.

[0052] Figure 3: A structural diagram of a load identification device based on knowledge distillation provided in some embodiments of the present invention.

[0053] Figure 4 : A system architecture diagram of load identification provided in some embodiments of the present invention.

[0054] Figure 5 : A structural diagram of a load identification model on an edge device provided in some embodiments of the present invention. DETAILED DESCRIPTION

[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0056] Example 1:

[0057] Please refer to Figure 1 To address the problem that existing technologies are difficult to implement efficient, adaptive, and non-intrusive load monitoring on resource-constrained edge devices, an embodiment of the present invention provides a load identification method based on knowledge distillation, including steps S1 to S3:

[0058] Step S1: Based on a preset cloud load identification model, the load classification knowledge of the cloud load identification model is transferred to a preset original load identification model through knowledge distillation to obtain a first load identification model.

[0059] Furthermore, step S1 can be implemented by the following preferred implementation, including steps S11-S15, as follows:

[0060] S11: Acquire a distillation dataset; wherein each load data in the distillation dataset is configured with a corresponding true type label;

[0061] S12: Identify the load type of the distilled dataset according to the cloud load identification model, and output a corresponding first predicted probability distribution;

[0062] S13: Perform load type identification on the distilled dataset according to the original load identification model, output a corresponding second predicted probability distribution, and calculate a first cross entropy loss based on the second predicted probability distribution and the one-hot distribution of the true type label;

[0063] S14: Calculate the corresponding weighted Kullback-Leibler divergence according to the first predicted probability distribution and the second predicted probability distribution;

[0064] S15: Constructing a loss function according to the first cross entropy loss and the weighted Kullback-Leibler divergence, and iteratively updating the parameters of the original load identification model according to the loss function until the model converges, thereby obtaining the first load identification model.

[0065] In this preferred embodiment, by introducing the supervision of real type labels, it is ensured that the original load recognition model always retains the direct learning ability of the original task objectives during the distillation process; the first predicted probability distribution output by the cloud-based load recognition model is used as a soft target to guide the original load recognition model to understand the potential semantic similarity of the samples and enhance the generalization ability of complex features; the cross-entropy loss is calculated in combination with the second predicted probability distribution of the original load recognition model to strengthen the supervision role of the real labels and provide a clear optimization direction for the original load recognition model; further, the cloud-based load recognition model knowledge is integrated through weighted KL divergence and iterative training is performed, and the cross-entropy loss and weighted KL divergence are jointly optimized to form complementary supervision, dynamically adjust the difference weights of the output distributions of the two models, balance the "imitation intensity" of knowledge distillation, avoid overfitting or underfitting caused by simple forced distribution alignment, and achieve fine control of knowledge transfer.

[0066] In specific implementation, Figure 4 The system architecture diagram of load identification shown in FIG. 1 includes a metering automation master station (cloud), smart meters (edge ​​devices) and smart substation terminals. Among them, the metering automation master station is used to orchestrate system-wide data utilization, operation strategies, model iteration and propagation. In the cloud, the bandwidth utilization and packet loss rate of data transmission of each substation can be monitored in real time, and data collection commands can be issued to obtain training samples. After training a high-precision cloud model (i.e., the cloud-based load identification model in this application), knowledge distillation and model compression techniques are applied to transfer rich knowledge from the cloud model to a lightweight student model (i.e., the original load identification model in this application) and send it to the edge device. In addition, a big data analysis platform can be used to analyze changes in load characteristics between different substations, thereby dynamically adjusting the model parameter propagation strategy.

[0067] The smart substation terminal serves as a key data processing node within the system, implementing key functions such as data aggregation, transmission, and model update dissemination. It connects to the cloud platform and runs several key components delivered from the cloud. These include a device management component for centrally managing smart meters, enabling coordinated data collection across edge devices; a local data cache component for temporarily storing collected data for subsequent processing; and an application management component that oversees the lifecycle of various edge applications to ensure stable operation and iterative updates.

[0068] The smart meter acts as the system's data acquisition and preliminary processing unit. It integrates an extended computing module based on the Arm Cortex-M4F core, supporting the local deployment of lightweight neural network models. The meter samples current and voltage waveforms at an 8kHz rate and uses its own load identification model to extract load characteristics and identify the operating status of the equipment load. To alleviate communication bandwidth limitations, the identification results are compressed and transmitted to the smart substation terminal according to the DL / T645-2007 communication protocol.

[0069] like Figure 5 The structure diagram of a load identification model on an edge device is shown. In this application, the model sent from the cloud and deployed on the smart meter can adopt a lightweight architecture that combines 1D-CNN, BiGRU, and Attention mechanism. The network includes a CNN-based feature extraction layer, a BiGRU time layer, an attention mechanism, and a fully connected classification layer, as shown below:

[0070] (1) CNN layer: Two convolutional layers are used, with 32 and 64 filters respectively. Each convolution uses a 1×3 kernel size and ReLU activation function for local feature extraction;

[0071] (2) BiGRU layer: A single bidirectional GRU layer with 64 units is used;

[0072] (3) Attention layer: The attention mechanism is used to enhance the focus on key features and improve classification accuracy.

[0073] (4) Fully connected classification layer: A single fully connected layer is used, the number of neurons of which is equal to the number of load categories, and the Softmax activation function is used to output the probability distribution of each category.

[0074] During knowledge distillation, soft target distillation is used to enable the original load identification model to learn the predicted probability distribution of the cloud load identification model instead of relying solely on discrete hard labels. The overall loss function is defined as follows: Loss = αL CE +(1-α)L KL , where L KL represents the weighted Kullback-Leibler divergence, L CE represents the first cross entropy loss, α represents the balance parameter;

[0075] Furthermore, the calculation of the first cross entropy loss is expressed as follows:

[0076] Among them, C is the number of categories in the classification task, y i is the one-hot encoding of the true type label of the distilled dataset, P S(i) is the predicted probability of the original load identification model for the i-th load category.

[0077] Furthermore, in step S14, the calculation of the weighted Kullback-Leibler divergence can be implemented by the following preferred implementations, specifically as follows:

[0078] The weighted Kullback-Leibler divergence is calculated based on the proportion of the power consumption of each load category in the total power consumption in the distilled data set as the corresponding first importance weight; wherein the calculation formula is as follows:

[0079] Among them, L KL represents the weighted Kullback-Leibler divergence, ω i represents the first importance weight of the i-th type of load, P T (i) represents the predicted probability of the cloud load identification model for the i-th load category, P S (i) represents the predicted probability of the original load identification model for the i-th load category, and N represents the total number of load categories.

[0080] In this preferred embodiment, the proportion of electricity consumption is introduced as the first importance weight in the weighted KL divergence formula, and the load energy consumption differences in business scenarios are quantified as model training weights, so that the prediction error of high-energy-consuming equipment (such as air conditioners and refrigerators) is amplified in the loss function, directly improving the model's recognition priority for critical loads.

[0081] Step S2: quantize the first load identification model to obtain a lightweight second load identification model, and send the second load identification model to the edge device.

[0082] In practice, the model can be quantized using the INT8 quantization method, converting the model's original floating-point calculations into 8-bit integer operations, thereby reducing computing resource consumption and improving inference speed. After quantization, when the model is delivered to edge devices (i.e., smart meters), it can be deployed using TensorFlow Lite.

[0083] In this embodiment, the model is quantized and then pushed to the smart meter, so as to meet the low-power real-time inference requirement of the smart meter as an embedded device.

[0084] Step S3: Send the incremental update data set to the edge device, so that the edge device optimizes the second load identification model according to the preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model. After optimization, the power data collected in real time by the edge device is subjected to load identification according to the third load identification model, and the identification result is output.

[0085] Furthermore, in step S3, the optimization of the second load identification model can be achieved through the following preferred implementation, including steps S31-S35, as follows:

[0086] S31: Acquire the incremental update data set; wherein the incremental update data set includes error sample data obtained by the edge device performing load identification on historically collected power data through the second load identification model;

[0087] S32: performing reasoning on the incremental update data set according to the second load identification model to calculate a corresponding second cross entropy loss;

[0088] S33: Clustering and grouping the weight matrix of the fully connected layer of the second load identification model according to load categories to obtain several groups of classification parameters;

[0089] S34: Calculating a corresponding second importance weight based on each set of classification parameters, and constructing a MAS regularization term according to each second importance weight;

[0090] S35: According to the preset penalty coefficient, the second cross entropy loss and the MAS regularization term are weightedly fused to generate an objective function, and according to the objective function, the weight matrix and bias vector of the fully connected layer of the second load identification model are iteratively updated until the model converges to obtain a third load identification model.

[0091] In this preferred embodiment, the iterative optimization of the model is triggered by incrementally updating the data set to ensure the continuous learning ability of new load types. At the same time, the weak links of the model are focused on by screening out error samples, thereby improving the efficiency of incremental learning. The weight matrix is ​​clustered according to the load category, and the correlation of classification parameters of the same category is explicitly encoded as a group structure. This parameter grouping mechanism can identify and strengthen the core discriminant dimension of the model for different category features, reduce redundant parameter interference, and improve the model's sensitivity to category-specific features. The MAS regularization term calculated based on the second importance weight of the parameter group can quantify the importance of different parameter groups to historical tasks. The update amplitude of important parameter groups is bound, and the key classification knowledge that has been learned is protected first to avoid catastrophic forgetting in incremental training, while allowing non-important parameter groups to be flexibly adjusted for new tasks; the cross-entropy loss drives the model to learn new features of incremental data, while MAS regularization suppresses destructive updates to historically important parameters. The cross-entropy loss and MAS regularization terms are weighted by the penalty coefficient. This mechanism automatically distinguishes between adjustable and solidified parameter areas during parameter updates. Ultimately, the third load recognition model, while inheriting the core capabilities of the second load recognition model, stably integrates the knowledge of incremental data and achieves balanced optimization of new and old task objectives.

[0092] In specific implementation, after the edge device uses the second load identification model to perform load identification on the historically collected power data, the sample data with identification errors can be uploaded to the cloud for identification and correction of data labels, which will serve as the data source for subsequent incremental updates.

[0093] In step S32, the second cross entropy loss is calculated, assuming that the incremental update dataset is:

[0094] where x i represents the i-th input feature (such as active power, reactive power and harmonic characteristics), y i It represents the true label corresponding to the input feature, N o is the sample size. Then, the calculation of the second cross entropy loss can be expressed as: Among them, N o is the sample size of the input data, C is the number of classification categories, and y i,c is the true label of sample i for category c, is the predicted probability of sample i for category c output by the second load recognition model.

[0095] Furthermore, in step S33, when clustering and grouping, based on cluster analysis, the weights W of the fully connected layer are grouped by load type, assuming they are divided into K groups, D kThe dataset is updated incrementally for each group. Specifically, the K-Means algorithm can be used to calculate the inertia of load characteristics (such as normalized data of active power, reactive power, and harmonic characteristics) for different K values, that is, the sum of the squared distances from the sample to the cluster center. The K value at which the inertia decreases sharply, i.e., the elbow point, is then selected as the number of groups to ensure reasonable grouping and avoid overfitting or underfitting.

[0096] After the groups are divided, further, in step S34, constructing the MAS regularization term can be implemented by the following preferred implementation, including steps S341-342, as follows:

[0097] S341: Calculate the second importance weight for each group of classification parameters separately, and the calculation method is as follows:

[0098] in, Represents the kth group classification parameter θ calculated at the tth iteration k The second importance weight of , α represents the balance parameter, D k represents the incremental update dataset corresponding to the kth group of classification parameters, x i represents the data sample, N(D k ) means D k The number of data samples in , represents the output of the second load identification model relative to the classification parameter θ k The gradient size;

[0099] S342: Construct a MAS regularization term based on each of the second importance weights. The algorithm is as follows:

[0100] Among them, L MAS represents the MAS constraint, K represents the number of groups of classification parameters, Represents the best classification parameter value obtained by training historical data. If Ω k is very large, indicating that the parameter is very important to the old task. Will be punished more severely, forcing θ k Stay close If Ω k is very small, indicating that the parameter is not important for the old task, then θ is allowed k Major adjustments to adapt to new tasks.

[0101] In this preferred embodiment, the second importance weight is dynamically calculated by the gradient size, and the contribution of the parameter to the model output can be quantified by using the gradient sensitivity to ensure the objectivity of the importance assessment; the balance parameter is used to control the time impact during training, so that the parameter importance assessment takes into account both long-term stability and short-term data changes; the MAS regularization term is constructed, and the key parameters of the historical task can be constrained by the parameter offset penalty, so as to maintain the recognition stability of the model for the old load and solve the problem of catastrophic forgetting.

[0102] Furthermore, in order to achieve a dynamic balance between knowledge retention and new knowledge learning when the similarity between tasks is different, this application also introduces an adaptive λ mechanism when constructing the incremental update objective function, as follows:

[0103] In step S35, the generation of the objective function can be achieved by the following preferred implementation, including steps S351-S352, as follows:

[0104] S351: Construct the penalty coefficient based on the feature similarity between the new and old training tasks. The algorithm is as follows:

[0105] Among them, λ(x) represents the penalty coefficient, Sim() represents the feature similarity, η is the hyperparameter that controls the decay rate, and f new is the current new training task data, f old is the old training task data, λ max Represents the upper limit of the penalty coefficient; when the similarity between the previous and subsequent tasks is high, λ automatically decreases to weaken the restriction of MAS on the old parameters, while when the task difference is large, λ increases to strengthen the old knowledge and avoid catastrophic forgetting.

[0106] S352: According to the penalty coefficient, the second cross entropy loss and the MAS regularization term are weighted and fused to generate an objective function, which is expressed as follows: L e =L new +λ·L MAS ;L e represents the objective function, L new represents the second cross entropy loss.

[0107] In specific implementation, the feature similarity in step S351 can be measured by cosine similarity. For two data vectors and The cosine similarity CS between them is:

[0108] in is the dot product (inner product) of the vectors, and Respectively represent the norm (Euclidean norm) of two vectors.

[0109] In addition, when using the objective function for incremental updates, a small batch update strategy specifically for the classification layer is adopted. Specifically, during the update, only the weights W and bias vectors b of the fully connected layer are fine-tuned, keeping the entire model architecture unchanged. The update is expressed as follows:

[0110] Among them, η′ is the learning rate, which controls the step size of each update; and They are loss functions L e Gradients with respect to W and b.

[0111] In this preferred embodiment, the dynamic penalty coefficient maps the task similarity to a coefficient attenuation curve through an exponential function. When the difference between the new and old tasks is large, the regularization constraint is strengthened, and when the difference is small, the constraint is weakened to avoid over-constraint or under-constraint caused by fixed coefficients. The objective function dynamically adjusts the learning intensity of the new and old tasks through the penalty coefficient, so that the model remains stable when the load characteristics suddenly change.

[0112] Furthermore, in step S3, load identification is performed on the power data collected in real time by the edge device according to the third load identification model, and the identification result is outputted. This can be achieved by the following preferred implementation, including steps S36-S37, as follows:

[0113] S36: collecting current current and voltage waveform data, and performing feature extraction on the current and voltage waveform data based on a preset sliding window mechanism to obtain corresponding original power features;

[0114] S37: Normalize the original power characteristics to obtain power characteristic data, input the data into the third load identification model for identification, and output the identification result.

[0115] In practice, active power P and reactive power Q are the primary effective features for identifying the operating status of various electrical appliances. Active power can distinguish between devices with different power levels, while reactive power can distinguish between loads of different natures, such as inductance, capacitance, and resistance. The definitions of P and Q are as follows:

[0116] Where T represents the number of sampling points in one cycle, U(t) and I(t) represent the voltage and current values ​​at the t-th sampling point, respectively.

[0117] In addition, the widespread use of various nonlinear electrical devices in power systems can cause current distortion, thereby generating harmonics. Different devices generate harmonics with different components and amplitudes. Therefore, harmonic components are also a key characteristic. Harmonic characteristics are expressed as follows:

[0118] Where k′=0,1,…,N c -1, N c is the total number of sampling points, k′ represents the order of harmonics, I k′ represents the amplitude of the k′th harmonic of the current, and j represents an imaginary unit.

[0119] When collecting data, the smart meter collects the user's current and voltage waveforms at a sampling rate of 8kHz, then uses a sliding window to segment the time series data and uses the above formula to calculate features P, Q, I1, I3, I5 and I7 to form a time feature sequence: X = {X1, X2, ..., X i}; where X i is the load characteristic of the i-th time window, and then normalized: Among them, X i ′ is the normalized load characteristic of the i-th time window, μ is the mean value, and σ is the standard deviation.

[0120] After collecting the data, the data is input into the model for recognition, which is represented as follows: Where F(X′) represents the load identification model on the smart meter, Represents the model output.

[0121] During recognition, the model generates a predicted probability distribution based on the input data That is, the probability of each type of load pattern. For multi-classification problems, this probability distribution is usually obtained through the Softmax activation function, which is expressed as follows:

[0122] Among them, z i is the unnormalized output of the model for the i-th category load, and C is the number of categories.

[0123] After the recognition is completed, in the predicted probability distribution, we can extract the maximum predicted probability in, is the student model's predicted probability for the c-th load, which is the most confident prediction result of the model. If the maximum prediction probability Below the set threshold T c , then the sample is considered uncertain, recorded as an error sample and pushed to the metering master station for review. Later, during incremental updates, these error samples can be used to review and correct the labels in the cloud and then sent back to the smart meter for incremental update and optimization of the local model, i.e., D in step S3 above. local .

[0124] In this preferred embodiment, the original power features are converted into standardized inputs of unified dimensions through normalization processing, eliminating the differences in the numerical ranges between features, improving the model's ability to evenly analyze multidimensional power data, and enhancing the stability and accuracy of the recognition results.

[0125] In summary, compared with the prior art, the above embodiments of the present application have the following beneficial effects: based on the cloud load identification model, the load classification knowledge is migrated to the original load identification model through knowledge distillation, and the model parameter quantity and computational complexity are reduced through quantization. While compressing the model parameter quantity, the classification capability of the cloud load identification model is inherited, directly solving the problem of imbalance between accuracy and efficiency of resource-constrained equipment; further optimizing the adaptability of the model to new data through the cross-entropy loss in the incremental update algorithm, and balancing the update of new and old task parameters through dynamic constraints (such as MAS regularization) to prevent catastrophic forgetting and improve the adaptability of the model to dynamic power consumption scenarios; finally, load identification is performed locally through the third load identification model without relying on cloud communication, eliminating data transmission delays and significantly improving real-time performance. The overall solution solves the core technical problem that static edge models cannot dynamically adapt to load changes through the synergistic combination of "knowledge distillation-dynamic incremental update-edge reasoning", while ensuring recognition accuracy while achieving low resource consumption and real-time response.

[0126] Example 2:

[0127] Please refer to Figure 2 Based on the same inventive concept, an embodiment of the present invention discloses a load identification system based on knowledge distillation, including: a distillation module M1, a quantification module M2 and an optimization identification module M3;

[0128] The distillation module M1 is configured to transfer the load classification knowledge of the cloud load identification model to the preset original load identification model through knowledge distillation based on the preset cloud load identification model, thereby obtaining a first load identification model.

[0129] Furthermore, the distillation module M1 includes: a distillation data acquisition unit, a first load identification unit, a first cross entropy loss calculation unit, a weighted Kullback-Leibler divergence calculation unit and a first iteration unit;

[0130] The distillation data acquisition unit is used to acquire a distillation data set; wherein each load data in the distillation data set is configured with a corresponding true type label;

[0131] The first load identification unit is configured to identify a load type of the distilled data set according to the cloud load identification model, and output a corresponding first predicted probability distribution;

[0132] The first cross entropy loss calculation unit is configured to perform load type identification on the distilled dataset according to the original load identification model, output a corresponding second predicted probability distribution, and calculate a first cross entropy loss based on the second predicted probability distribution and a one-hot distribution of the true type label;

[0133] The weighted Kullback-Leibler divergence calculation unit is used to calculate the corresponding weighted Kullback-Leibler divergence according to the first predicted probability distribution and the second predicted probability distribution;

[0134] The first iterative unit is used to construct a loss function according to the first cross entropy loss and the weighted Kullback-Leibler divergence, and iteratively update the parameters of the original load identification model according to the loss function until the model converges, thereby obtaining the first load identification model.

[0135] In this preferred embodiment, by introducing the supervision of real type labels, it is ensured that the original load recognition model always retains the direct learning ability of the original task objectives during the distillation process; the first predicted probability distribution output by the cloud-based load recognition model is used as a soft target to guide the original load recognition model to understand the potential semantic similarity of the samples and enhance the generalization ability of complex features; the cross-entropy loss is calculated in combination with the second predicted probability distribution of the original load recognition model to strengthen the supervision role of the real labels and provide a clear optimization direction for the original load recognition model; further, the cloud-based load recognition model knowledge is integrated through weighted KL divergence and iterative training is performed, and the cross-entropy loss and weighted KL divergence are jointly optimized to form complementary supervision, dynamically adjust the difference weights of the output distributions of the two models, balance the "imitation intensity" of knowledge distillation, avoid overfitting or underfitting caused by simple forced distribution alignment, and achieve fine control of knowledge transfer.

[0136] Furthermore, the weighted Kullback-Leibler divergence calculation unit can be implemented by the following preferred implementations, specifically as follows:

[0137] The weighted Kullback-Leibler divergence is calculated based on the proportion of the power consumption of each load category in the total power consumption in the distilled data set as the corresponding first importance weight; wherein the calculation formula is as follows:

[0138] Among them, L KL represents the weighted Kullback-Leibler divergence, ω i represents the first importance weight of the i-th type of load, P T (i) represents the predicted probability of the cloud load identification model for the i-th load category, P S(i) represents the predicted probability of the original load identification model for the i-th load category, and N represents the total number of load categories.

[0139] In this preferred embodiment, the proportion of electricity consumption is introduced as the first importance weight in the weighted KL divergence formula, and the load energy consumption differences in business scenarios are quantified as model training weights, so that the prediction error of high-energy-consuming equipment (such as air conditioners and refrigerators) is amplified in the loss function, directly improving the model's recognition priority for critical loads.

[0140] The quantization module M2 is configured to quantize the first load identification model to obtain a lightweight second load identification model, and send the second load identification model to the edge device.

[0141] The optimization and identification module M3 is used to send an incremental update data set to the edge device, so that the edge device optimizes the second load identification model according to a preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model. After optimization, the edge device performs load identification on the power data collected in real time by the edge device according to the third load identification model, and outputs the identification result.

[0142] Furthermore, the optimization identification module M3 includes: an incremental data acquisition unit, a second cross entropy loss calculation unit, a grouping unit, a regularization term construction unit and a second iteration unit;

[0143] The incremental data acquisition unit is configured to acquire the incremental update data set; wherein the incremental update data set includes error sample data obtained by the edge device performing load identification on the historically collected power data through the second load identification model;

[0144] The second cross entropy loss calculation unit is configured to perform inference on the incremental update data set according to the second load identification model to calculate a corresponding second cross entropy loss;

[0145] The grouping unit is used to cluster and group the weight matrix of the fully connected layer of the second load identification model according to load categories to obtain a plurality of groups of classification parameters;

[0146] The regularization term construction unit is configured to calculate a corresponding second importance weight based on each set of classification parameters, and construct a MAS regularization term according to each second importance weight;

[0147] The second iterative unit is used to weightedly fuse the second cross entropy loss and the MAS regularization term according to a preset penalty coefficient to generate an objective function, and iteratively update the weight matrix and bias vector of the fully connected layer of the second load identification model according to the objective function until the model converges to obtain a third load identification model.

[0148] In this preferred embodiment, the iterative optimization of the model is triggered by incrementally updating the data set to ensure the continuous learning ability of new load types. At the same time, the weak links of the model are focused on by screening out error samples, thereby improving the efficiency of incremental learning. The weight matrix is ​​clustered according to the load category, and the correlation of classification parameters of the same category is explicitly encoded as a group structure. This parameter grouping mechanism can identify and strengthen the core discriminant dimension of the model for different category features, reduce redundant parameter interference, and improve the model's sensitivity to category-specific features. The MAS regularization term calculated based on the second importance weight of the parameter group can quantify the importance of different parameter groups to historical tasks. The update amplitude of important parameter groups is bound, and the key classification knowledge that has been learned is protected first to avoid catastrophic forgetting in incremental training, while allowing non-important parameter groups to be flexibly adjusted for new tasks; the cross-entropy loss drives the model to learn new features of incremental data, while MAS regularization suppresses destructive updates to historically important parameters. The cross-entropy loss and MAS regularization terms are weighted by the penalty coefficient. This mechanism automatically distinguishes between adjustable and solidified parameter areas during parameter updates. Ultimately, the third load recognition model, while inheriting the core capabilities of the second load recognition model, stably integrates the knowledge of incremental data and achieves balanced optimization of new and old task objectives.

[0149] Furthermore, the regularization term construction unit includes: a weight calculation subunit and a construction subunit;

[0150] The weight calculation subunit is used to calculate the second importance weight for each group of classification parameters separately, and the calculation method is as follows:

[0151] in, Represents the kth group classification parameter θ calculated at the tth iteration k The second importance weight of , α represents the balance parameter, D k represents the incremental update dataset corresponding to the kth group of classification parameters, x i represents the data sample, N(D k ) means D k The number of data samples in , represents the output of the second load identification model relative to the classification parameter θ k The gradient size;

[0152] The construction subunit is used to construct a MAS regularization term according to each of the second importance weights, and the algorithm is as follows:

[0153] Among them, L MAS represents the MAS constraint, K represents the number of groups of classification parameters, Represents the optimal classification parameter value obtained by training on historical data.

[0154] In this preferred embodiment, the second importance weight is dynamically calculated by the gradient size, and the contribution of the parameter to the model output can be quantified by using the gradient sensitivity to ensure the objectivity of the importance assessment; the balance parameter is used to control the time impact during training, so that the parameter importance assessment takes into account both long-term stability and short-term data changes; the MAS regularization term is constructed, and the key parameters of the historical task can be constrained by the parameter offset penalty, so as to maintain the recognition stability of the model for the old load and solve the problem of catastrophic forgetting.

[0155] Furthermore, the second iteration unit includes: a penalty coefficient construction subunit and a fusion subunit;

[0156] The penalty coefficient construction subunit is used to construct the penalty coefficient according to the feature similarity of the new and old training tasks. The algorithm is as follows:

[0157] Among them, λ(x) represents the penalty coefficient, Sim() represents the feature similarity, η is the hyperparameter that controls the decay rate, and f new is the current new training task data, f old is the old training task data, λ max Indicates the upper limit of the penalty coefficient;

[0158] The fusion subunit is used to weightedly fuse the second cross entropy loss and the MAS regularization term according to the penalty coefficient to generate an objective function, which is expressed as follows: L e =L new +λ·L MAS ;L e represents the objective function, L new represents the second cross entropy loss.

[0159] In this preferred embodiment, the dynamic penalty coefficient maps the task similarity to a coefficient attenuation curve through an exponential function. When the difference between the new and old tasks is large, the regularization constraint is strengthened, and when the difference is small, the constraint is weakened to avoid over-constraint or under-constraint caused by fixed coefficients. The objective function dynamically adjusts the learning intensity of the new and old tasks through the penalty coefficient, so that the model remains stable when the load characteristics suddenly change.

[0160] Furthermore, the optimization identification module M3 further includes: a real-time data acquisition unit and an output unit;

[0161] The real-time data acquisition unit is used to collect current current and voltage waveform data, and perform feature extraction on the current and voltage waveform data based on a preset sliding window mechanism to obtain corresponding original power features;

[0162] The output unit is used to perform normalization processing on the original power characteristics to obtain power characteristic data, input the data into the third load identification model for identification, and output the identification result.

[0163] In this preferred embodiment, the original power features are converted into standardized inputs of unified dimensions through normalization processing, eliminating the differences in the numerical ranges between features, improving the model's ability to evenly analyze multidimensional power data, and enhancing the stability and accuracy of the recognition results.

[0164] In summary, compared with the prior art, the embodiments of the present application have the following beneficial effects: based on the cloud load identification model, the load classification knowledge is migrated to the original load identification model through knowledge distillation, and the model parameter quantity and computational complexity are reduced through quantization. While compressing the model parameter quantity, the classification capability of the cloud load identification model is inherited, directly solving the problem of imbalance between accuracy and efficiency of resource-constrained equipment; further optimizing the adaptability of the model to new data through the cross-entropy loss in the incremental update algorithm, and balancing the update of new and old task parameters through dynamic constraints (such as MAS regularization) to prevent catastrophic forgetting and improve the adaptability of the model to dynamic power consumption scenarios; finally, load identification is performed locally through the third load identification model without relying on cloud communication, eliminating data transmission delays and significantly improving real-time performance. The overall solution solves the core technical problem that static edge models cannot dynamically adapt to load changes through the synergistic combination of "knowledge distillation-dynamic incremental update-edge reasoning", while ensuring recognition accuracy while achieving low resource consumption and real-time response.

[0165] Example 3:

[0166] Figure 3 The structure diagram of a load identification device based on knowledge distillation is presented. Figure 3 As shown, the load identification device based on knowledge distillation may include: a processor N1, a memory N2, a data interface N3 and a communication bus N4.

[0167] Among them: the processor N1, the memory N2, and the data interface N3 communicate with each other through the communication bus N4; the data interface N3 is used for data communication with other devices such as input devices or output devices; the processor N1 is used to execute the program N5, which can specifically execute the relevant steps of any of the above-mentioned load identification method embodiments based on knowledge distillation.

[0168] Specifically, the program N5 may include program code, which includes computer-executable instructions.

[0169] Processor N1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the knowledge distillation-based load identification device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0170] The memory N2 is used to store the program N5. The memory N2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0171] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, the embodiments of the present application are not directed to any particular programming language.

[0172] Example 4:

[0173] An embodiment of the present invention also provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is run on a load identification device / system based on knowledge distillation, the load identification device / system based on knowledge distillation executes a load identification method based on knowledge distillation in any of the above method embodiments.

[0174] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. Similarly, in order to streamline the application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the application, the various features of the embodiments of the application are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby clearly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the application.

[0175] Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and installed in one or more devices different from the embodiments. The modules, units, or components in the embodiments can be combined into one module, unit, or component, and furthermore, they can be divided into multiple submodules, subunits, or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.

Claims

1. A load identification method based on knowledge distillation, characterized in that: include: Based on a preset cloud load identification model, the load classification knowledge of the cloud load identification model is transferred to the preset original load identification model through knowledge distillation to obtain a first load identification model; quantizing the first load identification model to obtain a lightweight second load identification model, and delivering the second load identification model to the edge device; Send an incremental update data set to the edge device so that the edge device optimizes the second load identification model according to a preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model. After optimization, the edge device performs load identification on the power data collected in real time by the edge device according to the third load identification model, and outputs the identification result.

2. The load identification method based on knowledge distillation according to claim 1, characterized in that: The load classification knowledge of the cloud-based load identification model is transferred to the preset original load identification model through knowledge distillation to obtain a first load identification model, including: Obtain a distillation data set; wherein each load data in the distillation data set is configured with a corresponding true type label; Identify the load type of the distilled dataset according to the cloud load identification model, and output a corresponding first predicted probability distribution; According to the original load identification model, load type identification is performed on the distilled dataset, a corresponding second predicted probability distribution is output, and a first cross entropy loss is calculated based on the second predicted probability distribution and the one-hot distribution of the true type label; Calculating a corresponding weighted Kullback-Leibler divergence according to the first predicted probability distribution and the second predicted probability distribution; A loss function is constructed according to the first cross entropy loss and the weighted Kullback-Leibler divergence, and parameters of the original load identification model are iteratively updated according to the loss function until the model converges, thereby obtaining the first load identification model.

3. The load identification method based on knowledge distillation according to claim 2, characterized in that: The calculating, according to the first predicted probability distribution and the second predicted probability distribution, corresponding weighted Kullback-Leibler divergence includes: The weighted Kullback-Leibler divergence is calculated based on the proportion of the power consumption of each load category in the total power consumption in the distilled data set as the corresponding first importance weight; wherein the calculation formula is as follows: Among them, L KL represents the weighted Kullback-Leibler divergence, ω i represents the first importance weight of the i-th type of load, P T (i) represents the predicted probability of the cloud load identification model for the i-th load category, P S (i) represents the predicted probability of the original load identification model for the i-th load category, and N represents the total number of load categories.

4. The load identification method based on knowledge distillation according to claim 1, characterized in that: The second load identification model is optimized according to a preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model, including: Acquire the incremental update data set; wherein the incremental update data set includes error sample data obtained by the edge device performing load identification on the historically collected power data through the second load identification model; Performing reasoning on the incremental update data set according to the second load identification model to calculate a corresponding second cross entropy loss; Clustering and grouping the weight matrix of the fully connected layer of the second load identification model according to load categories to obtain several groups of classification parameters; Calculating the corresponding second importance weight based on each set of classification parameters, and constructing a MAS regularization term according to each of the second importance weights; According to the preset penalty coefficient, the second cross entropy loss and the MAS regularization term are weightedly fused to generate an objective function. According to the objective function, the weight matrix and bias vector of the fully connected layer of the second load identification model are iteratively updated until the model converges to obtain a third load identification model.

5. The load identification method based on knowledge distillation according to claim 4, characterized in that: The calculating of the corresponding second importance weight based on each group of classification parameters and constructing the MAS regularization term according to each second importance weight includes: The second importance weight is calculated separately for each set of classification parameters, and the calculation method is as follows: in, Represents the kth group classification parameter θ calculated at the tth iteration k The second importance weight of , α represents the balance parameter, D k represents the incremental update dataset corresponding to the kth group of classification parameters, x i represents the data sample, N(D k ) indicates D k The number of data samples in , represents the output of the second load identification model relative to the classification parameter θ k The gradient size; According to each of the second importance weights, a MAS regularization term is constructed, and the algorithm is as follows: Among them, L MAS represents the MAS constraint, K represents the number of groups of classification parameters, Represents the optimal classification parameter value obtained by training on historical data.

6. The load identification method based on knowledge distillation according to claim 4, characterized in that: The weighted fusion of the second cross entropy loss and the MAS regularization term according to the preset penalty coefficient to generate the objective function includes: The penalty coefficient is constructed by the feature similarity of the new and old training tasks. The algorithm is as follows: Among them, λ(x) represents the penalty coefficient, Sim() represents the feature similarity, η is the hyperparameter that controls the decay rate, and f new is the current new training task data, f old is the old training task data, λ max Indicates the upper limit of the penalty coefficient; According to the penalty coefficient, the second cross entropy loss and the MAS regularization term are weighted and fused to generate the objective function, which is expressed as follows: L e =L new +λ·L MAS ;L e represents the objective function, L new represents the second cross entropy loss.

7. The load identification method based on knowledge distillation according to any one of claims 1 to 6, characterized in that: The step of performing load identification on the power data collected in real time by the edge device according to the third load identification model and outputting the identification result includes: Collecting current current and voltage waveform data, and performing feature extraction on the current and voltage waveform data based on a preset sliding window mechanism to obtain corresponding original power features; The original power characteristics are normalized to obtain power characteristic data, which is input into the third load identification model for identification, and an identification result is output.

8. A load identification system based on knowledge distillation, characterized in that: include: Distillation module, quantification module and optimization recognition module; The distillation module is configured to transfer the load classification knowledge of the cloud load identification model to the preset original load identification model through knowledge distillation based on the preset cloud load identification model, thereby obtaining a first load identification model. The quantization module is configured to quantize the first load identification model to obtain a lightweight second load identification model, and send the second load identification model to the edge device; The optimization and identification module is used to send an incremental update data set to the edge device, so that the edge device optimizes the second load identification model according to a preset incremental update algorithm, combined with the cross entropy loss and the dynamic constraints of the key parameters of the historical tasks, to generate a third load identification model. After optimization, the edge device performs load identification on the power data collected in real time by the edge device according to the third load identification model and outputs the identification result.

9. A load identification device based on knowledge distillation, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the steps of a load identification method based on knowledge distillation according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a load identification method based on knowledge distillation according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Electric power visual knowledge distillation method and system

    CN119130711A

  • Non-intrusive load monitoring method and system based on knowledge distillation algorithm

    CN119830999A

Cited By

  • Method and device for identifying embedded load of electric energy meter and electric energy meter

    CN120993038A

  • An embedded load identification method and device for an electric energy meter and the electric energy meter

    CN120993038B

  • Unknown load identification and incremental learning method based on feature space multi-objective optimization

    CN122346734A