Load identification method and device based on feature restoration

By constructing a conditional diffusion and load identification model under scenarios with and without electrical noise interference, the problem of low load identification accuracy in complex power consumption scenarios is solved, achieving high-precision and high-robust load identification, which is suitable for edge deployment.

CN120822137AActive Publication Date: 2025-10-21ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing load identification methods suffer from a significant drop in accuracy under real-world, complex power consumption scenarios with large-scale aliasing of multiple loads and significant fluctuations in background noise, making it difficult to balance high accuracy and high robustness.

Method used

By acquiring load disturbance feature datasets under power consumption scenarios with and without electrical noise interference, a conditional diffusion model and a load identification model are constructed. The models are then trained using the training dataset and fine-tuned by pruning to improve the accuracy of load feature repair and identification.

Benefits of technology

It improves load identification accuracy in complex scenarios and reduces the number of model parameters and computational complexity, making it easier to deploy lightweight devices at the edge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822137A_ABST
    Figure CN120822137A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of load identification, in particular to a load identification method and device based on feature restoration. The method comprises the following steps: respectively acquiring noise-free current data, current data and power frequency voltage data when various types of load monomers operate in a power utilization scene without / with electrical noise interference so as to construct a load disturbed characteristic data set and base data, calculating a difference value between the current data and the noise-free current data to obtain current noise, and calculating the noise-free current data and the base data to obtain a load disturbed characteristic data set. Amplifying the current noise of the current data in the load disturbed characteristic data set, and adding Gaussian noise to obtain a noise adding sequence; and constructing a training data set based on the noise adding sequence, the noise adding step length, the condition information, the load disturbed characteristic data set and the label, training a condition diffusion model and a load identification model by using the training data set, pruning the model when a total loss function meets a set requirement, then carrying out fine tuning training, and carrying out real-time identification by using the trained model. By adopting the method, the load identification precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of load identification, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for load identification based on feature repair. Background Art

[0002] With the continuous development of the power industry, improving energy efficiency, reducing carbon emissions, and promoting the green and low-carbon transformation of the energy system have become the current development themes of the power industry. Fully tapping and leveraging the adjustable potential of massive flexible resources on the demand side and designing effective load management and regulation strategies are important means to improve user electricity efficiency and reduce energy waste on the power side. Load identification, as a key link in demand-side resource management, monitors and analyzes user electricity data to accurately grasp the electricity usage information and energy consumption of users' internal loads, understand their electricity usage behavior and electricity demand, and provide strong data support for the formulation of user energy management or load regulation strategies.

[0003] Currently, there are existing load identification methods. While these methods achieve high recognition accuracy in laboratory scenarios with a small number of aliased loads and low electrical background noise, in complex real-world scenarios with large-scale aliasing of multiple loads and large background noise fluctuations, the extracted load features often become significantly distorted, leading to a significant decrease in identification accuracy. Therefore, improving load identification accuracy has become a key issue that needs to be addressed urgently. Summary of the Invention

[0004] Based on this, it is necessary to provide a load identification method, device, computer equipment, computer-readable storage medium and computer program product based on feature repair that can improve load identification accuracy in response to the above technical problems.

[0005] In a first aspect, the present application provides a load identification method based on feature repair, comprising:

[0006] In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells during operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event time, and obtain current data and power frequency voltage data of the corresponding type of load cells to construct a load disturbance feature dataset; obtain bus current data for a given period before the load event time as base data;

[0007] calculating a difference between current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplifying the current noise of the current data in the load disturbance feature data set and adding Gaussian noise to obtain a noisy sequence; constructing a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load;

[0008] Constructing a conditional diffusion model and a load identification model; using the training data set to train the conditional diffusion model and the load identification model, inputting the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimation value; using the noise estimation value to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, inputting the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, pruning the conditional diffusion model and the load identification model, and re-fine-tuning the training until the training is completed, the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model;

[0009] The actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information are obtained in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0010] In one embodiment, the obtaining of current data and power frequency voltage data of a corresponding type of load cell includes: obtaining current data of the power grid line for multiple cycles before the load event, and current data of the power grid line for the same number of cycles after the load event; extracting current data of the power grid line at the same sampling point position in each cycle, and aligning and subtracting the extracted current data of the power grid line to obtain current data of the corresponding type of load cell; obtaining power frequency voltage data of the power grid line for multiple cycles after the load event to obtain power frequency voltage data of the corresponding type of load cell.

[0011] In one embodiment, the load event includes a transient event and a long transient event, and the analysis of the power change of the power grid line to locate the load event time includes: obtaining a line power difference value corresponding to a target time of the test period and two adjacent times of the target time, if the absolute value of the line power difference value at the target time is greater than a first threshold, and the absolute value of the line power difference value at the target time is greater than the absolute value of the line power difference value at the two adjacent times, then the generated load event is a transient event, and the target time is the load event time when the transient event is generated; obtaining a line power difference sequence of the test period, and filtering the line power difference sequence to obtain a target line power difference sequence; if the test period is If the absolute value of the target line power differential value at the first moment in the measuring period is greater than or equal to the second threshold, and the absolute value of the target line power differential value at the moment before the first moment is less than the second threshold, then the first moment is the start moment of the event; if the absolute value of the target line power differential value at the second moment in the measuring period is less than the second threshold, and the absolute value of the target line power differential value at the moment before the second moment is greater than or equal to the second threshold, then the second moment is the end moment of the event; if the absolute value of the difference between the abnormal power corresponding to the moment before the first moment and the abnormal power corresponding to the moment after the second moment is greater than the third threshold, then the generated load event is a long transient event, and the load event moment includes the first moment and the second moment.

[0012] In one embodiment, the first threshold is an adaptive threshold, and the adaptive process of the first threshold includes: obtaining a maximum power differential threshold and a minimum power differential threshold; calculating the standard deviation of the line power differential sequence in the test period; selecting a maximum value from the standard deviation and the minimum power differential threshold, and selecting a minimum value from the maximum value and the maximum power differential threshold to obtain the first threshold.

[0013] In one embodiment, constructing a training data set includes: after obtaining condition information, masking the condition information and using it as first condition information, and using the condition information directly obtained as second condition information; the noise-added sequence, noise-added step length and first condition information constitute a first sample set, the noise-added sequence, noise-added step length and second condition information constitute a second sample set, and the first sample set and the second sample set constitute a training set of a conditional diffusion model; the load disturbance feature data set and labels constitute a training set of a load identification model; the training set of the conditional diffusion model and the training set of the load identification model constitute a training data set.

[0014] In one embodiment, the total loss function is obtained by weighting the loss function of the conditional diffusion model and the loss function of the load identification model respectively, wherein the loss function of the conditional diffusion model includes an unconditional noise estimation loss function and a conditional noise estimation loss function.

[0015] In a second aspect, the present application further provides a load identification device based on feature repair, comprising:

[0016] The data acquisition module is used to obtain noise-free current data of multiple types of load cells when they are operating in a power usage scenario without electrical noise interference; in a power usage scenario with electrical noise interference, it randomly generates load events of multiple types of load cells, analyzes the power changes of the power grid lines to locate the load event moments, and obtains current data and power frequency voltage data of the corresponding types of load cells to construct a load disturbance feature dataset; and obtains bus current data for a given period before the load event moment as base data;

[0017] a training data set construction module, configured to calculate the difference between the current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplify the current noise of the current data in the load disturbance feature data set and add Gaussian noise to obtain a noisy sequence; and construct a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load;

[0018] A modeling module is configured to construct a conditional diffusion model and a load identification model; the conditional diffusion model and the load identification model are trained using the training data set, a noise sequence, a noise step size, and condition information are input into the conditional diffusion model to output a noise estimation value; the load disturbance feature data set is denoised using the noise estimation value to obtain a target load disturbance feature data set, and the target load disturbance feature data set is input into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, the conditional diffusion model and the load identification model are pruned and then fine-tuned again until the training is completed, wherein the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model;

[0019] The identification module is used to obtain the actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, and the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0020] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0021] In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells during operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event time, and obtain current data and power frequency voltage data of the corresponding type of load cells to construct a load disturbance feature dataset; obtain bus current data for a given period before the load event time as base data;

[0022] calculating a difference between current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplifying the current noise of the current data in the load disturbance feature data set and adding Gaussian noise to obtain a noisy sequence; constructing a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load;

[0023] Constructing a conditional diffusion model and a load identification model; using the training data set to train the conditional diffusion model and the load identification model, inputting the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimation value; using the noise estimation value to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, inputting the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, pruning the conditional diffusion model and the load identification model, and re-fine-tuning the training until the training is completed, the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model;

[0024] The actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information are obtained in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0025] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0026] In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells during operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event time, and obtain current data and power frequency voltage data of the corresponding type of load cells to construct a load disturbance feature dataset; obtain bus current data for a given period before the load event time as base data;

[0027] calculating a difference between current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplifying the current noise of the current data in the load disturbance feature data set and adding Gaussian noise to obtain a noisy sequence; constructing a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load;

[0028] Constructing a conditional diffusion model and a load identification model; using the training data set to train the conditional diffusion model and the load identification model, inputting the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimation value; using the noise estimation value to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, inputting the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, pruning the conditional diffusion model and the load identification model, and re-fine-tuning the training until the training is completed, the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model;

[0029] The actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information are obtained in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0030] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0031] In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells during operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event time, and obtain current data and power frequency voltage data of the corresponding type of load cells to construct a load disturbance feature dataset; obtain bus current data for a given period before the load event time as base data;

[0032] calculating a difference between current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplifying the current noise of the current data in the load disturbance feature data set and adding Gaussian noise to obtain a noisy sequence; constructing a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load;

[0033] Constructing a conditional diffusion model and a load identification model; using the training data set to train the conditional diffusion model and the load identification model, inputting the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimation value; using the noise estimation value to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, inputting the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, pruning the conditional diffusion model and the load identification model, and re-fine-tuning the training until the training is completed, the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model;

[0034] The actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information are obtained in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0035] The above-mentioned feature-repair-based load identification method, device, computer equipment, computer-readable storage medium and computer program product obtain noise-free current data, current data and power frequency voltage data of various types of load cells when operating in power consumption scenarios with / without electrical noise interference to construct a load disturbance feature data set; obtain bus current data for a given period before the load event as base data; in this case, a load disturbance feature data set is obtained for complex scenarios with electrical noise interference to prepare for the training data set to be constructed, which is conducive to subsequently improving the model's load identification accuracy in complex scenarios. The difference between the current data and the noise-free current data in the load disturbed feature data set is calculated to obtain the current noise. The current noise of the current data in the load disturbed feature data set is amplified and Gaussian noise is added to obtain a noisy sequence. A training data set is constructed based on the noisy sequence, the noisy step size, the conditional information, the load disturbed feature data set and the label. The conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load. Thus, by setting the conditional information to guide the reverse diffusion process of the conditional diffusion model, the conditional diffusion model can fully learn the ability to analyze the current noise, thereby improving the repair accuracy of the load current data, so that the target load disturbed feature data set obtained after denoising is closer to the noise-free current data, thereby improving the prediction accuracy of the subsequent load identification model. A conditional diffusion model and a load identification model are constructed. The conditional diffusion model and the load identification model are trained using a training dataset. The noise sequence, noise step size, and conditional information are input into the conditional diffusion model to output a noise estimate. The noise estimate is used to denoise the load disturbance feature dataset to obtain a target load disturbance feature dataset. This target load disturbance feature dataset is input into the load identification model to output a load type and operating status prediction result. When the total loss function meets the set requirements, the conditional diffusion model and the load identification model are pruned and retrained for fine-tuning until training is complete. The total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model. Thus, the conditional diffusion model and the load identification model can better extract deep load features and improve the model's recognition accuracy of load type and operating status in complex scenarios. Pruning can reduce the number of parameters and computational complexity of the conditional diffusion model and the load identification model, facilitating lightweight deployment of the model on the edge. Compared to existing prediction methods, the present invention uses the trained load identification model to obtain corresponding load type and operating status prediction results, achieving better load identification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 1 is a flow chart of a load identification method based on feature repair in one embodiment;

[0038] Figure 2 is a structural block diagram of a load identification device based on feature repair in one embodiment;

[0039] Figure 3 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0041] Although existing load identification methods have achieved high recognition accuracy in laboratory scenarios with a small amount of load aliasing and low electrical background noise, when faced with real complex power consumption scenarios with large-scale aliasing of multiple loads and large background noise fluctuations, the extracted load characteristics often produce a large degree of distortion, which in turn leads to a significant decrease in identification accuracy.

[0042] The paper "Near-real-time plug load identification using low-frequency power data" extracts power characteristics during load operation and uses machine learning methods to perform online identification of individual loads, achieving an identification accuracy of 93.5%. However, this method cannot be applied to power consumption scenarios with multiple loads. The papers "Integrated non-invasive load identification method based on Shannon entropy weighted voting algorithm" and "A novel current signal feature and its application in noninvasive load monitoring" both extract high-order current harmonic characteristics or load voltage and current waveform characteristics as the basis for identification. However, these characteristics are significantly affected by current noise fluctuations. In scenarios with complex power consumption and large load operation fluctuations, abnormal harmonic distortion and waveform distortion are easily generated, affecting identification accuracy. To address this problem, the papers "Load identification based on multi-scale feature fusion and its interpretable interactive enhancement method" and "Multi-time-scale shapelet-based feature extraction for non-intrusive load monitoring" introduce multi-time-scale load characteristics. By complementing the short-term waveform characteristics and long-term operation characteristics of the load, the extracted features are able to represent the load type. However, the extraction of long-term and short-term features places higher demands on the acquisition and computing performance of the measurement terminal device, and the introduction of long-term features inevitably reduces the real-time performance of recognition, which undoubtedly affects the precise management and regulation of the load.

[0043] In summary, the existing load identification methods have the following problems: the robustness of the existing load identification methods is not high, and the identification accuracy will be significantly reduced in complex power consumption scenarios with load aliasing operation and large background noise fluctuations; the existing load identification methods are difficult to balance identification accuracy and real-time performance, and there are still difficulties in achieving high-precision, high-robustness, and high-real-time load online identification; the existing artificial intelligence-based load identification models have the problems of high complexity and large number of parameters, and are highly dependent on hardware resources, making it difficult to achieve large-scale deployment, application, and expansion at the edge.

[0044] To address the above problems, the present invention proposes a load identification method based on feature restoration to improve the load identification accuracy in complex scenarios.

[0045] In an exemplary embodiment, Figure 1As shown, a load identification method based on feature repair is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0046] Step 102: In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells when they are in operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event moments, and obtain current data and power frequency voltage data of corresponding types of load cells to construct a load disturbance feature data set; obtain bus current data for a given period before the load event moment as base data.

[0047] A power usage scenario without electrical noise interference refers to a scenario where no loads other than the target load are operating. A power usage scenario with electrical noise interference refers to a scenario where other loads are operating. A target load refers to any of the various types of loads for which noise-free current data collection is required. A load event refers to a change in the operating state of a power load on a line, such as when it is connected, disconnected, or switches between operating modes. The load event time refers to the time when the load event occurs.

[0048] Exemplarily, multiple types of load cells are determined, and in a power usage scenario without electrical noise interference, noise-free current data of each type of load cell during operation is obtained; in a power usage scenario with electrical noise interference, load events such as connection, disconnection, and working mode switching of each type of load cell are randomly generated, and the power changes of the power grid lines are analyzed to determine the load event time when the load event occurs, and the current data and power frequency voltage data of the corresponding type of load cell are obtained to construct a load disturbance feature data set; in addition, the bus current data of a given time period before the load event time is obtained as the base data.

[0049] Step 104: Calculate the difference between the current data in the load disturbed feature data set and the noise-free current data to obtain the current noise, amplify the current noise of the current data in the load disturbed feature data set and add Gaussian noise to obtain a noisy sequence; construct a training data set based on the noisy sequence, the noisy step size, the conditional information, the load disturbed feature data set, and the label, where the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load.

[0050] Current noise refers to the noise carried in the current data. Gaussian noise refers to noise whose probability density function follows a Gaussian distribution (i.e., a normal distribution). The noise addition step size is an important parameter in the conditional diffusion model, determining the proportion of noise added at each time step.

[0051] Exemplarily, for the same type of load cell, the difference between the current data in the load disturbed characteristic data set and the noise-free current data is calculated to obtain the current noise of this type of load cell. The current noise of the current data in the load disturbed characteristic data set is first amplified, and then Gaussian noise is added to the amplified current data to obtain a noisy sequence; a training data set is constructed using the noisy sequence, noisy step size, conditional information, load disturbed characteristic data set and label, wherein the conditional information includes base data and power frequency voltage data, and the label includes the type and operating status of the load.

[0052] Step 106, construct a conditional diffusion model and a load identification model; use the training data set to train the conditional diffusion model and the load identification model, input the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimate; use the noise estimate to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, input the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, prune the conditional diffusion model and the load identification model, and re-fine-tune the training until the training is completed. The total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model.

[0053] The conditional diffusion model is a generative model that introduces additional conditional information based on the standard diffusion model. The load identification model is a neural network model used to predict load type and operating status. The total loss function is used to measure the training level of the conditional diffusion model and the load identification model. Pruning refers to removing unnecessary connections or nodes from a trained neural network.

[0054] Exemplarily, a conditional diffusion model and a load identification model are constructed, and a total loss function is set for training the conditional diffusion model and the load identification model, wherein the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model; the conditional diffusion model and the load identification model are trained using a training data set, wherein the noise sequence, noise step size and conditional information in the training data set are input into the conditional diffusion model to output a noise estimation value; the load disturbed feature data set in the training data set is denoised using the noise estimation value to obtain a target load disturbed feature data set, and the load identification model is trained using the target load disturbed feature data set and the labels in the training data set; when the total loss function meets the set requirements, the conditional diffusion model and the load identification model are pruned, and then fine-tuned again until the training is completed.

[0055] Step 108: Obtain the actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length, and the actual condition information in real time; input the actual noise addition sequence, the actual noise addition step length, and the actual condition information into the trained conditional diffusion model to obtain the actual noise estimation value; use the actual noise estimation value to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data; input the actual target load disturbance characteristic data into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0056] The actual load event time refers to the load event time in the actual scenario. The actual load disturbance characteristic data refers to the load disturbance characteristic data in the actual scenario. The actual noise sequence refers to the noise sequence in the actual scenario. The actual noise step length refers to the noise step length in the actual scenario. The actual condition information refers to the condition information in the actual scenario.

[0057] Exemplarily, for the actual power consumption scenario that needs to be identified, the actual power of the power grid line is obtained in real time, and the corresponding positioning actual load event time, actual load disturbance characteristic data, actual noise addition sequence, actual noise addition step length and actual condition information are obtained by referring to the above steps; then the actual noise addition sequence, actual noise addition step length and actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual load disturbance characteristic data is subtracted from the actual noise estimation value to obtain the actual target load disturbance characteristic data, and the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0058] In the above-mentioned load identification method based on feature repair, the noise-free current data, current data and power frequency voltage data of various types of load units are obtained when they are operating in power consumption scenarios with / without electrical noise interference to construct a load disturbance feature data set; the bus current data of a given period before the load event is obtained as the base data; in this case, the load disturbance feature data set is obtained for complex scenarios with electrical noise interference to prepare for the training data set to be constructed, which is conducive to the subsequent improvement of the model's load identification accuracy in complex scenarios. The difference between the current data and the noise-free current data in the load disturbed feature data set is calculated to obtain the current noise. The current noise of the current data in the load disturbed feature data set is amplified and Gaussian noise is added to obtain a noisy sequence. A training data set is constructed based on the noisy sequence, the noisy step size, the conditional information, the load disturbed feature data set and the label. The conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load. Thus, by setting the conditional information to guide the reverse diffusion process of the conditional diffusion model, the conditional diffusion model can fully learn the ability to analyze the current noise, thereby improving the repair accuracy of the load current data, so that the target load disturbed feature data set obtained after denoising is closer to the noise-free current data, thereby improving the prediction accuracy of the subsequent load identification model. A conditional diffusion model and a load identification model are constructed. The conditional diffusion model and the load identification model are trained using a training dataset. The noise sequence, noise step size, and conditional information are input into the conditional diffusion model to output a noise estimate. The noise estimate is used to denoise the load disturbance feature dataset to obtain a target load disturbance feature dataset. This target load disturbance feature dataset is input into the load identification model to output a load type and operating status prediction result. When the total loss function meets the set requirements, the conditional diffusion model and the load identification model are pruned and retrained for fine-tuning until training is complete. The total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model. Thus, the conditional diffusion model and the load identification model can better extract deep load features and improve the model's recognition accuracy of load type and operating status in complex scenarios. Pruning can reduce the number of parameters and computational complexity of the conditional diffusion model and the load identification model, facilitating lightweight deployment of the model on the edge. Compared to existing prediction methods, the present invention uses the trained load identification model to obtain corresponding load type and operating status prediction results, achieving better load identification accuracy.

[0059] In an exemplary embodiment, current data and power frequency voltage data of a corresponding type of load cell are obtained, including: obtaining current data of the power grid line for multiple cycles before the load event moment, and current data of the power grid line for the same number of cycles after the load event moment; extracting current data of the power grid line at the same sampling point position in each cycle, aligning and subtracting the extracted current data of the power grid line to obtain current data of the corresponding type of load cell; obtaining power frequency voltage data of the power grid line for multiple cycles after the load event moment to obtain power frequency voltage data of the corresponding type of load cell.

[0060] The period is determined based on the acquisition frequency, and alignment refers to phase consistency.

[0061] In this embodiment, the current data of the power grid lines for multiple cycles before the load event and the current data of the power grid lines for the same number of cycles after the load event are obtained; after the current data of the power grid lines at the same sampling point position in each cycle are extracted, the extracted current data of the power grid lines are aligned and subtracted to obtain the current data of the corresponding type of load cells. In this way, the impact of power grid fluctuations on the current data can be reduced, and the accuracy of the current data of the load cells is improved.

[0062] In an exemplary embodiment, load events include transient events and long transient events. Analyzing power changes in power grid lines to locate the load event time includes: obtaining a target time in a test period and a line power difference value corresponding to two adjacent time points of the target time; if the absolute value of the line power difference value at the target time is greater than a first threshold, and the absolute value of the line power difference value at the target time is greater than the absolute values ​​of the line power difference values ​​at the two adjacent time points, then the generated load event is a transient event, and the target time is the load event time when the transient event occurs; obtaining a line power difference sequence in the test period, and filtering the line power difference sequence to obtain a target line power difference sequence; If the absolute value of the target line power differential value at the first moment in the test period is greater than or equal to the second threshold, and the absolute value of the target line power differential value at the moment before the first moment is less than the second threshold, then the first moment is the start moment of the event; if the absolute value of the target line power differential value at the second moment in the test period is less than the second threshold, and the absolute value of the target line power differential value at the moment before the second moment is greater than or equal to the second threshold, then the second moment is the end moment of the event; if the absolute value of the difference between the abnormal power corresponding to the moment before the first moment and the abnormal power corresponding to the moment after the second moment is greater than the third threshold, then the generated load event is a long transient event, and the load event moments include the first moment and the second moment.

[0063] The test period is the time interval that includes the load event. A transient event is an event that meets the corresponding detection conditions at a certain point in time; a long transient event is an event that meets the corresponding detection conditions over a certain time interval.

[0064] In this embodiment, since the load event times corresponding to short-term events and long-term transient events are different, by judging short-term events and long-term transient events, the time interval of the current data to be collected can be determined more accurately, thereby making the constructed load disturbance characteristic data set and the collected base data more accurate, which is beneficial to improving the accuracy of subsequent models.

[0065] In an exemplary embodiment, the first threshold is an adaptive threshold, and the adaptive process of the first threshold includes: obtaining a maximum power differential threshold and a minimum power differential threshold; calculating the standard deviation of the line power differential sequence in the test period; selecting the maximum value from the standard deviation and the minimum power differential threshold, and selecting the minimum value from the maximum value and the maximum power differential threshold to obtain the first threshold.

[0066] In this embodiment, by setting an adaptive threshold, the judgment of transient events can be adapted to a wider range of scenarios, which is beneficial to improving the judgment accuracy in complex power usage scenarios.

[0067] In an exemplary embodiment, a training data set is constructed, including: after obtaining condition information, the condition information is masked and used as the first condition information, and the directly obtained condition information is used as the second condition information; the noise sequence, the noise step and the first condition information constitute a first sample set, the noise sequence, the noise step and the second condition information constitute a second sample set, and the first sample set and the second sample set constitute a training set of a conditional diffusion model; the load disturbance feature data set and the label constitute a training set of a load identification model; the training set of the conditional diffusion model and the training set of the load identification model constitute a training data set.

[0068] Among them, masking is a technology for covering data.

[0069] In this embodiment, the conditional information is masked and used as the first conditional information, and the directly obtained conditional information is used as the second conditional information. The noise-added sequence, noise-added step length, and the first conditional information constitute the first sample set, and the noise-added sequence, noise-added step length, and the second conditional information constitute the second sample set. The first sample set and the second sample set constitute the training set of the conditional diffusion model. Thus, the first sample set can be used to train the conditional diffusion model to predict artificially added Gaussian noise under unconditional guidance. The second sample set can be used to train the conditional diffusion model to predict artificially added Gaussian noise and self-carried noise under conditional guidance.

[0070] In an exemplary embodiment, the total loss function is obtained by weighting the loss function of the conditional diffusion model and the loss function of the load identification model respectively, wherein the loss function of the conditional diffusion model includes an unconditional noise estimation loss function and a conditional noise estimation loss function.

[0071] In this embodiment, by setting multiple target loss functions (including the loss function of the conditional diffusion model and the loss function of the load identification model) to obtain the total loss function, compared with the existing single loss function, the optimization directions of different objectives can be weightedly combined to enable the conditional diffusion model and the load identification model to take into account multiple task requirements at the same time, thereby improving the robustness of each model.

[0072] Exemplarily, the load identification method based on feature restoration specifically includes:

[0073] Step 202: In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells when they are in operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event moments, and obtain current data and power frequency voltage data of corresponding types of load cells to construct a load disturbance feature data set; obtain bus current data for a given period before the load event moment as base data.

[0074] Specifically, the data acquisition module includes an electrical data acquisition module and an event detection and increment extraction module.

[0075] The electrical data acquisition module is used to collect and store the power frequency voltage and current waveforms of various load units during operation in a scenario without electrical noise interference, and a load pure feature dataset is constructed. Among them, the current waveform in the load pure feature dataset is noise-free current data.

[0076] Using the event detection and incremental extraction module, load events such as switching on, switching off, or adjusting operating gears are randomly generated in power consumption environments with base load operation or significant noise fluctuations. Using a dual-tower framework, event detection methods are used to locate the load event timing. Bus current data for a given period of time before the event is extracted as base data. An incremental method is then used to extract power frequency voltage data and current waveforms (i.e., current data) for various loads from the electrical bus to construct a load disturbance feature dataset. Base load refers to the load operating on the grid before the load event. Significant noise fluctuations can occur when base load is present.

[0077] The electrical data acquisition module is required to sample line power data at a frequency of 1 Hz or higher, with a continuous sampling and storage period of at least 5 minutes. It is also required to sample line voltage (voltage collected at this frequency is high-frequency voltage) and current data at a frequency of 6.4 kHz or higher, with a continuous sampling and storage period of at least 0.02 seconds. Load events refer to changes in the operating status of power loads on a line, such as when they are connected, disconnected, or switch between operating modes.

[0078] The event detection method for the dual-tower framework specifically refers to the use of a parallel detection approach, based on the peak-valley detection method and the trend value accumulation method, to detect and analyze changes in the line power sequence to identify short-term and long-term transient events; and to design a post-processing method to filter out false detection events.

[0079] Among them, if the target time is At this moment, the detection conditions of the peak-valley detection method for transient event points are as follows:

[0080] ;

[0081] Where, To obtain The line power difference value at the time point, is the threshold for transient event detection (i.e., the first threshold), for The line power difference value at the previous adjacent time point, for The line power difference value at the next adjacent time point after time, It is the time period to be tested (referred to as the testing period), and the time period length is ≥5 minutes. It means logical AND. In order to make the event detection threshold widely adaptable to different scenarios, combined with engineering experience and actual sequence fluctuations, Use adaptive thresholding:

[0082] ;

[0083] Where, is the maximum power difference threshold set based on experience; is the minimum power difference threshold set based on experience; It is the standard deviation of the power difference sequence in the time period to be detected after outliers are filtered out by the 3sigma method.

[0084] Among them, if the first moment is moment, the second moment is At the moment, the detection process of the trend value accumulation method for the long transient event interval is as follows. First, the power difference sequence is processed using the mean filter method. :

[0085] ;

[0086] Where, is the power difference sequence The power difference value at the jth time point in , for The power difference value after filtering, is the filter window length. When the following conditions are met, it is considered Time is the starting time of the long transient event:

[0087] ;

[0088] When the following conditions are met, it is considered Time is the end time of the long transient event:

[0089] ;

[0090] When the following conditions are met, it is considered [ t s , t e ] The long transient event in the interval is established:

[0091] ;

[0092] Where, is the abnormal power segment sequence; is the threshold for long transient event detection (i.e., the second threshold), is the long transient event power discrimination threshold (i.e., the third threshold). In the abnormal power segment sequence Abnormal power at a moment (i.e., the moment before the first moment); In the abnormal power segment sequence Abnormal power at a moment (i.e., the moment after the second moment);

[0093] The post-processing method for filtering out missed events is to first remove transient events within a long transient period. Then, the transient events and long transient events identified above are distinguished according to the following conditions. When the following conditions are met, the load event is considered to be established:

[0094] ;

[0095] ;

[0096] Where, is the power discrimination threshold for transient events. is the power discrimination threshold for long transient events.

[0097] The incremental method is used to extract the power frequency voltage and current waveforms of various loads from the electrical bus. The specific method is as follows: first, the voltage zero crossing point is determined based on the load event time, and the phase of each current cycle is aligned using the voltage zero crossing point. The current at the t-th sampling point in each cycle of the N cycles before the event is extracted. , the current at the tth sampling point in each cycle in the next N cycles , then align the current before and after the event and subtract them to extract the current waveform of the load corresponding to the event (also called current data), namely:

[0098] ;

[0099] It should be noted that when extracting current, for short transient events, the N cycles before and N cycles after the event occurrence time point are extracted; for long transient events, the N cycles before the event occurrence start time point and N cycles after the event end time point are extracted.

[0100] Load voltage waveform (also known as power frequency voltage data) is equal to the voltage waveform within N cycles after the event ; Among them, for short-term events, the extracted time is N cycles after the event occurrence time point; for long-term transient events, the extracted time is N cycles after the event occurrence end time point.

[0101] Step 204: Calculate the difference between the current data in the load disturbance feature data set and the noise-free current data to obtain the current noise, amplify the current noise of the current data in the load disturbance feature data set and add Gaussian noise to obtain a noisy sequence; construct a training data set based on the noisy sequence, the noisy step size, the conditional information, the load disturbance feature data set, and the label, where the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load.

[0102] Step 206, construct a conditional diffusion model and a load identification model; use the training data set to train the conditional diffusion model and the load identification model, input the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimate; use the noise estimate to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, input the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, prune the conditional diffusion model and the load identification model, and re-fine-tune the training until the training is completed. The total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model.

[0103] For steps 204 and 206, a modeling module is designed. The modeling module includes a load feature repair module and a load deep feature extraction and identification module. The load feature adaptive repair module first gradually adds Gaussian noise to the disturbed load feature (in this embodiment, the current data in the load disturbed feature dataset, i.e., the disturbed load current waveform feature) to fully destroy its original feature information. A conditional diffusion model is constructed, and conditionally guided and unconditionally guided reverse diffusion processes are designed to recover the load pure current sequence (i.e., noise-free current data) and the disturbed load current waveform feature after noise amplification from the noisy data, respectively. A load deep feature extraction and identification module is designed, in which a lightweight load identification neural network based on multi-scale feature extraction is constructed to achieve mapping learning from load features to real-time operating status. A multi-objective loss function is designed based on the GradNorm weighting strategy to synchronously train the load feature adaptive repair module and the load deep feature extraction and identification module.

[0104] Specifically, the current waveform characteristics of the disturbed load Gaussian noise is gradually added to the Gradually add noise to the disturbed load current waveform characteristics extracted from the line, where t is the noise addition step. b is the total number of steps. , is the noise intensity at the t-th noise adding step. Then the load characteristic sequence at the t-th noise adding step is It can be written as:

[0105] ;

[0106] Where, is the load characteristic sequence at the t-1th noise step, is the Gaussian noise added in the t-th step (i.e., the t-th noise adding step), is the Gaussian noise added in step t-1, It is the Gaussian noise added in the whole noise adding process. At the same time, in order to avoid the influence of the conditional diffusion model training effect due to the large difference between the artificial noise intensity and the load noise intensity, the current waveform characteristics of the disturbed load can be After amplifying the self-noise in the load, the noise is added and the waveform characteristics of the disturbed load current after noise amplification are shown. It can be written as:

[0107] ;

[0108] Where n is the noise amplification factor, The waveform characteristics of the disturbed load current after noise amplification are Alternative load signature sequence The waveform characteristics of the disturbed load current in , to obtain the desired noise-added sequence.

[0109] The conditional diffusion model takes as input a noisy sequence, a noise step, and conditional information, and outputs an estimate of the noise in the noisy sequence. The model uses a 1D-UNet (one-dimensional convolutional neural network), which consists of a downsampling path based on convolutional layers and an upsampling path based on deconvolutional layers, connected by jump operations. The conditional information refers to the extracted pre-event base current sequence and load voltage waveform sequence (also known as power frequency voltage data).

[0110] Design the reverse diffusion process of conditional guidance and unconditional guidance, specifically using the conditional diffusion model to estimate the Gaussian noise distribution added at each step, and then Gradually remove noise and finally restore the pure load current sequence The implementation process is as follows:

[0111] (1) Perform masking operation on the conditional information of the input conditional diffusion model, and train the conditional diffusion model to achieve artificial addition of Gaussian noise under unconditional guidance. The prediction of , enables the conditional diffusion model to fully learn the ability to parse unconditional noise from the noisy sequence;

[0112] (2) Introducing conditional information into the input of the conditional diffusion model, training the conditional diffusion model to achieve artificial noise under conditional guidance (i.e. artificially added Gaussian noise) and self-noise The superimposed prediction of the noise carried by the current data enables the conditional diffusion model to fully learn the ability to estimate the conditional noise distribution using conditional information.

[0113] (3) Assume that the conditional information input to the conditional diffusion model is written as , the conditional information after mask operation is written as , the estimation result of artificial noise under unconditional guidance by the conditional diffusion model (also called the noise estimation value under unconditional guidance) is written as , the estimation result of conditional noise under conditional guidance (also called noise estimation under conditional guidance) is written as , then the load current characteristics after repair by the conditional diffusion model are It can be calculated as follows:

[0114] ;

[0115] The lightweight load recognition neural network based on multi-scale feature extraction refers to a neural network composed of a residual network, which includes a convolution layer with multi-size convolution kernels, a pooling layer, a fully connected layer, an activation layer and a residual connection.

[0116] At the same time, in order to facilitate the terminal deployment of models (including conditional diffusion models and load identification models), it is necessary to perform lightweight operations such as pruning on the network. The specific lightweight methods are:

[0117] (1) Group the neurons in the network based on the dependency relationship. The way to determine the dependency relationship is that when the output of neuron i is the only input of neuron j, neuron j is said to be dependent on neuron i; when the input of neuron j is the only output of neuron i, neuron i is said to be dependent on neuron j. After the dependency relationship is determined, the neurons in the network are used as initial nodes in turn, and the transmission is carried out along the direction of the dependency relationship, and the neurons traversed during the transmission process are divided into a group. Neurons belonging to the same group need to be pruned at the same time;

[0118] (2) Determine the importance of each group of neuron parameters. The principle of neuron pruning is to remove the neuron structure that has the least impact on the model. Therefore, the norm of the deviation of the total loss function before and after pruning (the total loss function will be described in detail later) is used as the standard for measuring the importance of the neuron parameters of this group. Take the kth neuron parameter of the i-th group as For example, the impact of the model results (i.e., the importance estimate) It can be written as:

[0119] ;

[0120] Where, Indicates that the model is in the dataset The total loss function value on , Indicates that the k-th neuron of group i is pruned in the dataset The total loss function value on . Performing a second-order Taylor expansion on , and using the Fisher information matrix to approximate the second-order derivative of the expansion, we can obtain the second-order importance estimate of the parameter:

[0121] ;

[0122] Where, Represents the total loss function value of the model, Represents a higher-order infinitesimal.

[0123] After obtaining the estimated value of the influence of each neuron parameter in the group according to the above method, the estimated value of the influence of each neuron is counted according to the sum / product / maximum method as the importance index value of each group.

[0124] (3) Sort the importance index values ​​of each group, and remove the neurons in the corresponding group in descending order according to the parameter pruning rate. For example, if the entire neural network is divided into 10 groups of neurons and the parameter pruning rate is 0.2, then 2 groups of neurons need to be removed. Sort the 10 groups of neurons from high to low according to the importance index value, and remove the 2 groups of neurons with the smallest importance index value. In addition, the optimal parameter pruning rate is determined after multiple tests. Specifically, different parameter pruning rates (such as 0, 0.1, 0.2, 0.4, 0.6, 0.8, etc.) are set to prune the two models respectively, and then the performance of the pruned model is tested using the validation set data. The parameter pruning rate that best balances the model complexity and accuracy is selected as the optimal parameter pruning rate.

[0125] A multi-objective loss function is designed based on the GradNorm weighting strategy. The multi-objective loss function includes the loss function of the conditional diffusion model and the loss function of the load identification model. The loss function of the conditional diffusion model includes the unconditional noise estimation loss function and the conditional noise estimation loss function. The loss function of the load identification model is the load identification loss function. Specifically, it includes:

[0126] (1) Design unconditional noise estimation loss function This loss function requires that the noise estimation results of the conditional diffusion model under unconditional guidance are as close as possible to the artificial noise The loss function can be any regression loss function. Taking the mean square error function as an example, It can be calculated as follows:

[0127] ;

[0128] (2) Design conditional noise estimation loss function This loss function requires that the noise estimation result of the conditional diffusion model under the guidance of conditional information is as close as possible to the conditional noise. The loss function can be any regression loss function. Taking the mean square error function as an example, It can be calculated as follows:

[0129] ;

[0130] (3) Design load identification loss function The training loss function requires that the load operation status classification result of the load identification model is as consistent as possible with the real load label. The loss function can be any classification loss function. Taking the cross entropy loss function as an example, It can be calculated as follows:

[0131] ;

[0132] Where, is the sample size, is the number of sample categories; For 0-1 variables, if the sample The real category and category If they are the same, it is 1, otherwise it is 0; For samples Belong to category The predicted probability of .

[0133] (4) Design a multi-objective loss function (i.e., total loss function) based on the GradNorm strategy In order to avoid the magnitude difference between loss functions affecting the training effect of each task, the GradNorm strategy is used to weight the loss function to balance the importance of each task training. It can be calculated as follows:

[0134] ;

[0135] G W max ( tt ) = max i [ G W i ( tt )] ;

[0136] ;

[0137] Where tt is the training round, For the ttth training round, The adaptive weights of the loss function, is the parameter value of the last layer of the conditional diffusion model network, is the gradient of each loss function at this layer. For the ttth training round, loss functions. The first loss function is the unconditional noise estimation loss function, the second loss function is the conditional noise estimation loss function, and the third loss function is the load identification loss function.

[0138] The load signature adaptive restoration module and the load deep signature extraction and identification module are trained simultaneously. The specific training method involves proportionally dividing the load signature dataset (i.e., the acquired training dataset) into a training set, a validation set, and a test set. The conditional diffusion model and the load identification model are trained using the training set. When the accuracy of the conditional diffusion model and the load identification model on the validation set does not improve for M consecutive rounds, indicating that the total loss function meets the set requirements, training of the conditional diffusion model and the load identification model is terminated, completing the initial training. After pruning the conditional diffusion model and the load identification model in this manner, fine-tuning training is performed. After fine-tuning training is completed, the performance of the conditional diffusion model and the load identification model is tested on the test set. Fine-tuning training is based on the parameters obtained from the initial training, and the optimizer step size for fine-tuning training is smaller than that set in the initial training.

[0139] Step 208: Obtain the actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length, and the actual condition information in real time; input the actual noise addition sequence, the actual noise addition step length, and the actual condition information into the trained conditional diffusion model to obtain the actual noise estimation value; use the actual noise estimation value to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data; input the actual target load disturbance characteristic data into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0140] After each module is trained, the proposed method and device are applied to actual power usage scenarios. The specific application process is as follows: using the electrical data acquisition module to extract line voltage and current signals; using the event detection and incremental extraction module to locate load events and extract load features; using the trained conditional diffusion model to perform feature denoising and restoration; and finally using the trained load identification model to achieve final identification of load type and operating status.

[0141] The method of this embodiment is a method for adaptive repair and online identification of load characteristics based on a conditional diffusion model. First, a dual-tower event detection framework is designed to locate the load event moment and collect and extract the load high-frequency voltage and current data in real time. Then, a conditional diffusion model based on U-Net is constructed. The load voltage waveform sequence and the pre-event base current sequence are used as conditions. A loss function combining unconditional noise estimation and conditional noise estimation is adopted. The conditional information guides the reverse diffusion process of the conditional diffusion model, so that the conditional diffusion model can fully learn the ability to analyze the base noise and realize adaptive repair of the load current characteristics. Finally, a neural network model architecture based on multi-scale feature extraction and a lightweight method are designed to realize deep feature extraction and online type identification of the load.

[0142] The beneficial effects of the method of the present invention include:

[0143] The proposed dual-tower event detection framework and method. To ensure accurate positioning of load events with different transient times and transient characteristics, a dual-tower event detection framework based on adaptive thresholds is proposed. Taking advantage of the sudden change of short-term events and the trend of long-term transient events, a parallel framework is used to locate and filter events step by step, ensuring the robustness and generalization of the detection method. This solves the problem of insufficient detection accuracy and inaccurate positioning of existing event detection methods when facing load events with different transient characteristics.

[0144] The proposed load feature adaptive repair and denoising method. In order to reduce the distortion of load extraction features in complex power consumption scenarios, a load feature adaptive repair based on the conditional diffusion model is designed. After training, this method can be plugged into other load identification models in a plug-and-play manner and is widely applicable to various power consumption scenarios with good versatility and scalability. It solves the problem that in real complex power consumption scenarios with large-scale heterogeneous load aliasing and strong background noise fluctuations, the extracted target load features are easily distorted, thereby affecting the recognition accuracy.

[0145] The proposed load deep feature extraction and identification model architecture and its lightweight method. In order to fully learn and mine the electricity consumption information implicit in load characteristics, a lightweight load identification model network architecture design method based on multi-scale feature extraction is proposed. Multi-scale convolution kernels are used to extract multi-scale load electricity consumption information. Sparse interactions and residual connections are used to improve the learning efficiency of the conditional diffusion model for load characteristics. Structured pruning methods are used to optimize the model structure and parameters, reduce the model's computational complexity and ease the model's terminal deployment. While ensuring the model's accuracy requirements and feature learning efficiency, it has lower parameters and computational complexity than existing advanced load identification models based on artificial intelligence.

[0146] The proposed integrated training method combines load feature restoration, deep feature extraction, and recognition. To reduce the training difficulty of the two models and improve training efficiency, a training function combining noise estimation and load recognition tasks is designed based on the GradNorm weighting strategy to achieve end-to-end model training.

[0147] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0148] Based on the same inventive concept, embodiments of the present application further provide a feature-repair-based load identification device for implementing the feature-repair-based load identification method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more of the following embodiments of the feature-repair-based load identification device can be found in the limitations of the feature-repair-based load identification method described above and will not be repeated here.

[0149] In an exemplary embodiment, Figure 2 As shown, a load identification device based on feature repair is provided, comprising: a data acquisition module, a training data set construction module, a modeling module and an identification module, wherein:

[0150] The data acquisition module is used to obtain noise-free current data of various types of load cells when they are operating in power usage scenarios without electrical noise interference. In power usage scenarios with electrical noise interference, it randomly generates load events for various types of load cells, analyzes power changes in the power grid lines to locate the load event moments, and obtains current data and power frequency voltage data for the corresponding types of load cells to construct a load disturbance feature dataset. The bus current data for a given period before the load event moment is obtained as the base data.

[0151] The training dataset construction module is used to calculate the difference between the current data in the load disturbance feature dataset and the noise-free current data to obtain the current noise, amplify the current noise of the current data in the load disturbance feature dataset, and add Gaussian noise to obtain a noisy sequence. The training dataset is constructed based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature dataset, and labels. The conditional information includes the base data and power frequency voltage data, and the labels include the load type and operating status.

[0152] The modeling module is used to construct a conditional diffusion model and a load identification model. The conditional diffusion model and the load identification model are trained using a training data set, and the noise sequence, noise step size, and conditional information are input into the conditional diffusion model to output a noise estimate. The noise estimate is used to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, and the target load disturbance feature data set is input into the load identification model to output a load type and operating status prediction result. When the total loss function meets the set requirements, the conditional diffusion model and the load identification model are pruned and then fine-tuned again until the training is completed. The total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model.

[0153] The identification module is used to obtain the actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, and the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

[0154] In an exemplary embodiment, in a data acquisition module, current data and power frequency voltage data of a corresponding type of load cell are obtained, including: obtaining current data of the power grid line for multiple cycles before the load event moment, and current data of the power grid line for the same number of cycles after the load event moment; extracting current data of the power grid line at the same sampling point position in each cycle, aligning and subtracting the extracted current data of the power grid line to obtain current data of the corresponding type of load cell; obtaining power frequency voltage data of the power grid line for multiple cycles after the load event moment to obtain power frequency voltage data of the corresponding type of load cell.

[0155] In an exemplary embodiment, in a data acquisition module, load events include transient events and long transient events, and the power change of the power grid line is analyzed to locate the load event time, including: obtaining the line power difference value corresponding to the target time of the test period and the two adjacent time periods of the target time; if the absolute value of the line power difference value at the target time is greater than a first threshold, and the absolute value of the line power difference value at the target time is greater than the absolute value of the line power difference value at the two adjacent time periods, then the generated load event is a transient event, and the target time is the load event time when the transient event is generated; obtaining the line power difference sequence of the test period, and filtering the line power difference sequence to obtain the target line power difference value. A load event is a sequence of events; if the absolute value of the target line power difference value at the first moment in the time period to be measured is greater than or equal to the second threshold, and the absolute value of the target line power difference value at the moment before the first moment is less than the second threshold, then the first moment is the start moment of the event; if the absolute value of the target line power difference value at the second moment in the time period to be measured is less than the second threshold, and the absolute value of the target line power difference value at the moment before the second moment is greater than or equal to the second threshold, then the second moment is the end moment of the event; if the absolute value of the difference between the abnormal power corresponding to the moment before the first moment and the abnormal power corresponding to the moment after the second moment is greater than a third threshold, then the generated load event is a long transient event, and the load event moments include the first moment and the second moment.

[0156] In an exemplary embodiment, in the data acquisition module, the first threshold is an adaptive threshold, and the adaptive process of the first threshold includes: obtaining a maximum power differential threshold and a minimum power differential threshold; calculating the standard deviation of the line power differential sequence in the test period; selecting the maximum value from the standard deviation and the minimum power differential threshold, and selecting the minimum value from the maximum value and the maximum power differential threshold to obtain the first threshold.

[0157] In an exemplary embodiment, in a training data set construction module, a training data set is constructed, including: after obtaining condition information, the condition information is masked and used as the first condition information, and the directly obtained condition information is used as the second condition information; the noise sequence, the noise step and the first condition information constitute the first sample set, the noise sequence, the noise step and the second condition information constitute the second sample set, and the first sample set and the second sample set constitute the training set of the conditional diffusion model; the load disturbance feature data set and the label constitute the training set of the load identification model; the training set of the conditional diffusion model and the training set of the load identification model constitute the training data set.

[0158] In an exemplary embodiment, in the modeling module, the total loss function is obtained by weighting the loss function of the conditional diffusion model and the loss function of the load identification model respectively, wherein the loss function of the conditional diffusion model includes an unconditional noise estimation loss function and a conditional noise estimation loss function.

[0159] Each module in the aforementioned feature-recovery-based load identification device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0160] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 3 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means. The wireless means can be implemented via Wi-Fi, mobile cellular networks, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a load identification method based on feature repair. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse. Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0161] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the above-described method embodiments are implemented. In one embodiment, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the processor executes the computer program, the steps of the above-described method embodiments are implemented. In one embodiment, a computer program product is provided, comprising a computer program, and when the processor executes the computer program, the steps of the above-described method embodiments are implemented.

[0162] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0163] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0164] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application. The above-mentioned embodiments only express several implementation methods of the present application. The description is relatively specific and detailed, but it cannot be understood as a limitation on the scope of the patent of this application. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the attached claims.

Claims

1. A load identification method based on feature repair, characterized in that: The method comprises: In a power usage scenario without electrical noise interference, obtain noise-free current data of multiple types of load cells during operation; in a power usage scenario with electrical noise interference, randomly generate load events of multiple types of load cells, analyze the power changes of the power grid lines to locate the load event time, and obtain current data and power frequency voltage data of the corresponding type of load cells to construct a load disturbance feature dataset; obtain bus current data for a given period before the load event time as base data; calculating a difference between current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplifying the current noise of the current data in the load disturbance feature data set and adding Gaussian noise to obtain a noisy sequence; constructing a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load; Constructing a conditional diffusion model and a load identification model; using the training data set to train the conditional diffusion model and the load identification model, inputting the noise sequence, noise step size and condition information into the conditional diffusion model to output a noise estimation value; using the noise estimation value to denoise the load disturbance feature data set to obtain a target load disturbance feature data set, inputting the target load disturbance feature data set into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, pruning the conditional diffusion model and the load identification model, and re-fine-tuning the training until the training is completed, the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model; The actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information are obtained in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

2. The method according to claim 1, characterized in that The obtaining of current data and power frequency voltage data of a corresponding type of load cell includes: Acquire current data of the power grid line for a plurality of cycles before the load event, and current data of the power grid line for the same number of cycles after the load event; After extracting the current data of the power grid line at the same sampling point position in each cycle, align and subtract the extracted current data of the power grid line to obtain the current data of the corresponding type of load cell; The power frequency voltage data of the power grid line within a plurality of cycles after the load event is acquired to obtain the power frequency voltage data of the corresponding type of load cell.

3. The method according to claim 1, characterized in that The load events include transient events and long transient events. The analyzing the power variation of the power grid lines to locate the load event moments includes: Obtaining a line power difference value corresponding to a target time of a test period and two adjacent times of the target time; if the absolute value of the line power difference value at the target time is greater than a first threshold, and the absolute value of the line power difference value at the target time is greater than the absolute values ​​of the line power difference values ​​at the two adjacent times, then the generated load event is a transient event, and the target time is the load event time at which the transient event is generated; Obtaining a line power difference sequence during a time period to be measured, and filtering the line power difference sequence to obtain a target line power difference sequence; If the absolute value of the target line power differential value at a first moment in the test period is greater than or equal to a second threshold, and the absolute value of the target line power differential value at a moment before the first moment is less than the second threshold, then the first moment is the event start time; If the absolute value of the target line power differential value at the second moment in the test period is less than the second threshold, and the absolute value of the target line power differential value at the moment before the second moment is greater than or equal to the second threshold, then the second moment is the event end time; If the absolute value of the difference between the abnormal power corresponding to the previous moment of the first moment and the abnormal power corresponding to the next moment of the second moment is greater than the third threshold, the generated load event is a long transient event, and the load event moment includes the first moment and the second moment.

4. The method according to claim 3, characterized in that The first threshold is an adaptive threshold, and the adaptive process of the first threshold includes: Get the maximum power difference threshold and the minimum power difference threshold; Calculating the standard deviation of the line power difference sequence during the test period; A maximum value is selected from the standard deviation and the minimum power difference threshold, and a minimum value is selected from the maximum value and the maximum power difference threshold to obtain the first threshold.

5. The method according to claim 1, wherein Construct a training dataset, including: After obtaining the condition information, masking the condition information to use it as the first condition information, and using the directly obtained condition information as the second condition information; the noise-added sequence, the noise-added step length, and the first condition information constitute a first sample set, the noise-added sequence, the noise-added step length, and the second condition information constitute a second sample set, and the first sample set and the second sample set constitute a training set for a conditional diffusion model; The load disturbance feature data set and labels constitute a training set for a load identification model; The training set of the conditional diffusion model and the training set of the load identification model constitute a training data set.

6. The method according to claim 1, characterized in that The total loss function is obtained by weighting the loss function of the conditional diffusion model and the loss function of the load identification model respectively, wherein the loss function of the conditional diffusion model includes an unconditional noise estimation loss function and a conditional noise estimation loss function.

7. A load identification device based on feature repair, characterized in that: The device comprises: The data acquisition module is used to obtain noise-free current data of multiple types of load cells when they are operating in a power usage scenario without electrical noise interference; in a power usage scenario with electrical noise interference, it randomly generates load events of multiple types of load cells, analyzes the power changes of the power grid lines to locate the load event moments, and obtains current data and power frequency voltage data of the corresponding types of load cells to construct a load disturbance feature dataset; and obtains bus current data for a given period before the load event moment as base data; a training data set construction module, configured to calculate the difference between the current data in the load disturbance feature data set and the noise-free current data to obtain current noise, amplify the current noise of the current data in the load disturbance feature data set and add Gaussian noise to obtain a noisy sequence; and construct a training data set based on the noisy sequence, the noisy step size, conditional information, the load disturbance feature data set, and a label, wherein the conditional information includes the base data and the power frequency voltage data, and the label includes the type and operating status of the load; A modeling module is configured to construct a conditional diffusion model and a load identification model; the conditional diffusion model and the load identification model are trained using the training data set, a noise sequence, a noise step size, and condition information are input into the conditional diffusion model to output a noise estimation value; the load disturbance feature data set is denoised using the noise estimation value to obtain a target load disturbance feature data set, and the target load disturbance feature data set is input into the load identification model to output a load type and operating status prediction result; when the total loss function meets the set requirements, the conditional diffusion model and the load identification model are pruned and then fine-tuned again until the training is completed, wherein the total loss function is composed of the loss function of the conditional diffusion model and the loss function of the load identification model; The identification module is used to obtain the actual load disturbance characteristic data, the actual noise addition sequence, the actual noise addition step length and the actual condition information in real time; the actual noise addition sequence, the actual noise addition step length and the actual condition information are input into the trained conditional diffusion model to obtain the actual noise estimation value, the actual noise estimation value is used to denoise the actual load disturbance characteristic data to obtain the actual target load disturbance characteristic data, and the actual target load disturbance characteristic data is input into the trained load identification model to obtain the corresponding load type and operation status prediction result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Non-intrusive load identification method based on feature visualization

    CN114169435A

  • High-fidelity space far-field time-sensitive target optical data set generation method

    CN120105761A

  • Photovoltaic module fault monitoring system and method

    CN120263107A

  • Image processing method, image processor, image processing system, and image processing program

    JP2023179838A