A non-intrusive load monitoring data repair method and device
By using a combination method of a non-negative tensor decomposition model and a PID controller in a non-invasive load monitoring system, the problem of low repair efficiency and low accuracy when data is missing is solved, and efficient and high-accuracy repair of building energy use is achieved.
Patent Information
- Application Number
- CN202410904120.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-07-08
AI Technical Summary
The existing non-invasive load monitoring system has low repair efficiency and low accuracy when facing data loss, which affects a comprehensive understanding of building energy use.
A non-negative tensor decomposition model is used to define the objective function (mean square loss) to measure the difference between the observed data and the repair value, and the objective function is updated using the stochastic gradient descent method during the optimization process, and the PID controller is introduced to dynamically adjust the instance error to accelerate the convergence of the model and improve the accuracy of repair.
It improves the accuracy and efficiency of non-invasive load monitoring data repair, ensures a comprehensive understanding of building energy use, and improves the practicality and reliability of non-invasive load monitoring systems.
Smart Images

Figure CN118885741B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of non-intrusive load monitoring, and in particular to a non-intrusive load monitoring data repair method and device. Background Art
[0002] Residential power load monitoring and decomposition technology is a new technology for monitoring load power consumption details. Residential power consumption detail monitoring is of great significance in optimizing power grid planning, operation and management by power companies, saving power consumption and electricity bills by power users, and providing household power safety to the society.
[0003] The current load monitoring systems can be roughly divided into two categories: intrusive and non-intrusive. The traditional intrusive load monitoring system installs sensors at each load to monitor the operation of each load. A notable feature of this method is that it usually has complex hardware and simple software. Non-intrusive load monitoring refers to installing monitoring equipment at the power entrance. By monitoring the voltage, current and other signals at this location, the type and operation status of a single load in the load cluster can be analyzed.
[0004] Current non-intrusive load monitoring systems rely on collecting and analyzing overall power signals to identify and monitor the usage of different appliances without installing sensors directly on each appliance. However, in practical applications, non-intrusive load monitoring data is often missing due to various reasons, including sensor failure, signal interference, or data transmission problems. These missing data may lead to incomplete or inaccurate monitoring results, affecting the comprehensive understanding of building energy usage. Therefore, solving the problem of missing non-intrusive load data has become a challenge that needs to be urgently addressed to improve the reliability and practicality of non-intrusive load systems.
[0005] Currently, traditional numerical interpolation methods are usually used to deal with missing data in non-intrusive load monitoring. However, these traditional methods may be powerless when faced with large-scale missing data. In contrast, latent factor tensor decomposition models have been shown to be very effective in data completion, usually implemented by stochastic gradient descent solvers. However, the latent factor tensor decomposition model based on stochastic gradient descent converges slowly, which limits the efficiency of repair on large-scale non-intrusive load monitoring data. Summary of the invention
[0006] Based on this, in view of the problems of low efficiency and low accuracy of non-intrusive load monitoring data repair in the prior art, the present invention proposes a non-intrusive load monitoring data repair method and device. The method uses non-intrusive load monitoring data to construct a non-negative tensor decomposition model, and defines an objective function (mean square loss) to measure the difference between the observed non-intrusive load monitoring data and the repair value. During the optimization process, the stochastic gradient descent method is used to update the objective function, and a PID controller is introduced to dynamically adjust the instance error, thereby accelerating the convergence process of the model and improving the accuracy of the repair.
[0007] In a first aspect, an embodiment of the present application provides a non-intrusive load monitoring data repair method, the method comprising:
[0008] receiving missing data repair instructions for non-intrusive load monitoring data;
[0009] Based on the missing data repair instruction, collecting and storing current non-intrusive load monitoring data;
[0010] Constructing a non-intrusive load monitoring tensor according to the current non-intrusive load monitoring data;
[0011] Based on the non-intrusive load monitoring tensor, a target loss function is constructed and iteratively optimized, and the non-intrusive load monitoring data is repaired based on the iteratively optimized target loss function to obtain a non-intrusive load monitoring data repair value.
[0012] Preferably, the current non-intrusive load monitoring data is stored in the form of a quaternary group, and the quaternary group is represented by G=(d, s, m, v);
[0013] Where G represents non-intrusive load monitoring data, d represents the date of sensor monitoring, s represents a time of day, m represents a meter for recording the energy consumption of electrical appliances, and v represents the energy consumption of appliance m at time s on the dth day.
[0014] Preferably, constructing a non-intrusive load monitoring tensor according to the current non-intrusive load monitoring data comprises the following steps:
[0015] According to date d, the quaternary group G = (d, s, m, v) is divided into K time periods, and based on the quaternary group G = (1, s, m, v) with d = 1, G is obtained. (1) The data (s,m,v) and according to G (1) Construct an I×J slice matrix X with date d=1 (1) ;
[0016] According to the remaining dates d, build the slice matrix X based on the above steps in turn. (2) , X (3) …X(K) ;
[0017] Arrange the K slice matrices from front to back in the order of the divided time periods to construct a non-intrusive load monitoring tensor
[0018] Where I is the number of sampling points of the sensor in one day, J is the number of meters recording the energy consumption of electrical appliances, Represents the set of real numbers.
[0019] Preferably, constructing a target loss function based on the non-intrusive load monitoring tensor and performing iterative optimization to obtain the iteratively optimized target loss function comprises the following steps:
[0020] Initialize process parameters involved in non-intrusive load monitoring data repair process;
[0021] Constructing an initial target loss function for non-intrusive load monitoring data restoration according to the non-intrusive load monitoring tensor and the process parameter;
[0022] Iteratively optimizing the initial objective loss function to obtain an intermediate objective loss function;
[0023] Determine whether the intermediate target loss function satisfies the iteration termination condition. If so, terminate the iteration and output the intermediate target loss function as the target loss function after iterative optimization; if not, continue the iteration;
[0024] The non-intrusive load monitoring data is repaired based on the iteratively optimized target loss function to obtain the non-intrusive load monitoring data repair value.
[0025] Preferably, the process parameters include: non-intrusive load monitoring tensor T, latent feature matrices O, U, P, latent feature matrix dimension R, learning rate η, control coefficients C of proportional, integral and differential terms P , C I and C D , an auxiliary array A used to cache the integral and differential terms at each instance I and A D , regularization coefficients λ1, λ2, λ3, and final convergence threshold τ;
[0026] Among them, the sizes of the latent feature matrices O, U, and P are determined by each dimension value of the non-intrusive load monitoring tensor T and the latent feature dimension R. O is a latent feature matrix with I rows and R columns, U is a latent feature matrix with J rows and R columns, and P is a latent feature matrix with K rows and R columns.
[0027] Preferably, the initial target loss function of non-intrusive load monitoring data restoration is constructed according to formula (1):
[0028]
[0029] Among them, t ijk ∈Λ represents the known elements contained in the tensor T, and Λ represents the set of all data of the monitored non-intrusive load monitoring data; t ijk represents the known entity in the non-intrusive load monitoring tensor T, which is the power of a certain appliance j at a certain time i on a date k; ir represents the value of the i-th row and r-th column in the latent feature matrix O; u jr represents the value of the jth row and rth column in the latent feature matrix U; p kr Represents the value of the kth row and rth column in the latent feature matrix P; It is part of the L2 regularization term, which controls the complexity of the latent feature matrices O, U, and P respectively; λ1, λ2, and λ3 represent the L2 regularization control coefficients of the three latent feature matrices O, U, and P respectively.
[0030] Preferably, the initial objective loss function is iteratively optimized according to formula (2):
[0031]
[0032] Where n is a natural number, indicating the number of iterations; Represents the instance error on the current element, where represents the actual value of the observed non-intrusive load monitoring data; represents the repair value of non-intrusive load monitoring data calculated according to the latent feature matrix; represents the value of the i-th row and r-th column in the latent feature matrix O, represents the value of the jth row and rth column in the latent feature matrix U, represents the value of the kth row and rth column in the latent feature matrix P; C P , C I , C D They represent the control coefficients of the proportional, integral and differential terms in the PID controller respectively.
[0033] Preferably, the non-intrusive load monitoring data repair value is obtained according to formula (3):
[0034]
[0035] In a second aspect, an embodiment of the present application provides a non-intrusive load monitoring data repair device, comprising:
[0036] A data receiving module, used for receiving missing data repair instructions of non-intrusive load monitoring data;
[0037] A data storage module, used for collecting and storing current non-intrusive load monitoring data based on the missing data repair instruction;
[0038] A tensor construction module, configured to construct a non-intrusive load monitoring tensor according to the current non-intrusive load monitoring data;
[0039] The data repair module is used to construct a target loss function based on the non-intrusive load monitoring tensor and perform iterative optimization, and repair the non-intrusive load monitoring data based on the target loss function after iterative optimization to obtain a non-intrusive load monitoring data repair value.
[0040] Compared with the prior art, the present invention has the following beneficial effects: The present invention uses non-intrusive load monitoring data to construct a non-negative tensor decomposition model, and defines an objective function (mean square loss) to measure the difference between the observed non-intrusive load monitoring data and the repair value. During the optimization process, the stochastic gradient descent method is used to update the objective function, and the instance error is dynamically adjusted by introducing a PID controller, thereby accelerating the convergence process of the model and improving the accuracy of the repair. The solution of the present invention focuses on processing missing conditions in non-intrusive load monitoring data to achieve efficient and high-accuracy repair of irregular missing data, effectively solving data missing caused by sensor failure, signal interference or data transmission problems, ensuring a comprehensive understanding of building energy usage, and thereby improving the practicality and reliability of the non-intrusive load monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] By referring to the following drawings, the exemplary embodiments of the present invention can be more completely understood. The drawings are used to provide a further understanding of the embodiments of the present application, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present invention and do not constitute a limitation of the present invention. In the drawings, the same reference numerals generally represent the same parts or steps.
[0042] Figure 1 A flowchart of a non-intrusive load monitoring data repair method provided according to an exemplary embodiment of the present application;
[0043] Figure 2 A schematic diagram of the structure of a non-intrusive load monitoring data repair device provided according to an exemplary embodiment of the present application;
[0044] Figure 3 A schematic diagram of a data storage module structure provided by an exemplary embodiment of the present application;
[0045] Figure 4 A schematic diagram of the data repair module structure provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0046] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0047] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0048] In addition, the terms "first" and "second" etc. are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0049] Example 1
[0050] The present invention provides a non-intrusive load monitoring data repair method, comprising the following steps:
[0051] S101: receiving a missing data repair instruction for non-intrusive load monitoring data,
[0052] In this embodiment, the server sends instructions in various forms, such as sending repair instructions regularly, or sending instructions according to the notification of the device.
[0053] S102: Based on the missing data repair instruction, collect and store current non-intrusive load monitoring data;
[0054] Specifically, current non-intrusive load monitoring data includes power parameters such as voltage, current, and active power.
[0055] In this embodiment, the received current non-intrusive load monitoring data is stored in the form of a quaternary group, which is represented by G = (d, s, m, v); wherein G represents the non-intrusive load monitoring data, d represents the date monitored by the sensor, s represents a time of the day, m represents a meter for recording the energy consumption of electrical appliances, and v represents the energy consumption of electrical appliance m at time s on the dth day.
[0056] S103: constructing a non-intrusive load monitoring tensor according to current non-intrusive load monitoring data;
[0057] Specifically, step S103 includes the following steps:
[0058] According to date d, the quaternary group G = (d, s, m, v) is divided into K time periods, and based on the quaternary group G = (1, s, m, v) with d = 1, G is obtained. (1) The data (s,m,v) and according to G (1) Construct an I×J slice matrix X with date d=1 (1) ;
[0059] According to the remaining dates d, build the slice matrix X based on the above steps in turn. (2) , X (3) …X (K) ;
[0060] Arrange the K slice matrices in a three-dimensional space array from front to back according to the divided time period sequence to construct a non-intrusive load monitoring tensor Where I is the number of sampling points of the sensor in one day, J is the number of meters recording the energy consumption of electrical appliances, Represents the set of real numbers.
[0061] Since the energy consumption in some time segments returned by the sensor of each meter in a specific day is positive, the constructed non-intrusive load monitoring tensor T is a non-negative sparse tensor. The known data set Λ represents the set of all data of the non-intrusive load monitoring tensor T (including the number of sampling time segments I of the sensor in one day, the number of meter sensors J, the number of slice matrices K, d represents the specific date, s represents the time, m represents a specific meter, and v represents the current power consumption of meter m monitored at time s on the dth day).
[0062] S104: Based on the non-intrusive load monitoring tensor, a target loss function is constructed and iteratively optimized, and the non-intrusive load monitoring data is repaired based on the iteratively optimized target loss function to obtain a non-intrusive load monitoring data repair value.
[0063] Specifically, step S104 includes the following steps:
[0064] Initialize process parameters involved in non-intrusive load monitoring data repair process;
[0065] Preferably, the process parameters include: non-intrusive load monitoring tensor T, latent feature matrices O, U, P, latent feature matrix dimension R, learning rate η, control coefficients C of proportional, integral and differential terms P , C I and C D , an auxiliary array A used to cache the integral and differential terms at each instance I and A D, regularization coefficients λ1, λ2, λ3, and the final convergence threshold τ(10-6); wherein the sizes of the latent feature matrices O, U, and P are determined by each dimension value of the non-intrusive load monitoring tensor T and the latent feature dimension R, O is an latent feature matrix with I rows and R columns, U is an latent feature matrix with J rows and R columns, and P is an latent feature matrix with K rows and R columns.
[0066] According to the non-intrusive load monitoring tensor and process parameters, an initial target loss function for non-intrusive load monitoring data restoration is constructed;
[0067] In this embodiment, the initial target loss function f of non-intrusive load monitoring data restoration is constructed according to formula (1) (mean square loss), and L2 regularization is introduced to prevent model overfitting and improve generalization ability:
[0068]
[0069] Among them, t ijk ∈Λ represents the known elements contained in the tensor T, and Λ represents the set of all data of the monitored non-intrusive load monitoring data; t ijk represents the known entity in the non-intrusive load monitoring tensor T, which is the power of a certain appliance j at a certain time i on a date k; ir represents the value of the i-th row and r-th column in the latent feature matrix O; u jr represents the value of the jth row and rth column in the latent feature matrix U; p kr Represents the value of the kth row and rth column in the latent feature matrix P; It is part of the L2 regularization term, which controls the complexity of the latent feature matrices O, U, and P respectively; λ1, λ2, and λ3 represent the L2 regularization control coefficients of the three latent feature matrices O, U, and P respectively.
[0070] Iteratively optimize the initial target loss function to obtain the intermediate target loss function;
[0071] In this embodiment, stochastic gradient descent optimization is used, and a PID controller is applied to dynamically adjust the instance error, that is, the initial target loss function is iteratively optimized through the training iteration formula (2):
[0072]
[0073] Where n is a natural number, indicating the number of iterations; Represents the instance error on the current element, where represents the actual value of the observed non-intrusive load monitoring data; represents the repair value of non-intrusive load monitoring data calculated according to the latent feature matrix; represents the value of the i-th row and r-th column in the latent feature matrix O, represents the value of the jth row and rth column in the latent feature matrix U, represents the value of the kth row and rth column in the latent feature matrix P; C P , C I , C D They represent the control coefficients of the proportional, integral and differential terms in the PID controller respectively.
[0074] Determine whether the intermediate target loss function meets the iteration termination condition. If so, terminate the iteration and output the intermediate target loss function as the target loss function after iterative optimization; if not, continue the iteration.
[0075] In this embodiment, the iteration termination conditions include: the number of training iterations reaches the maximum number of training iterations, or the absolute value of the difference between the value of the target loss function calculated after the end of this round of iterations and the value of the target loss function of the previous round is less than the final convergence threshold τ.
[0076] The non-intrusive load monitoring data is repaired based on the iteratively optimized target loss function to obtain the non-intrusive load monitoring data repair value.
[0077] When the target loss function is iterated to the end, the hidden feature matrix O, U, P obtained by training when the target loss function reaches the minimum value is used to calculate the power repair value of a certain appliance j at a certain time i on date k. The non-intrusive load monitoring data repair value is obtained by formula (3):
[0078]
[0079] In formula (3), Represents the repair value of a specific instance of non-intrusive load monitoring data.
[0080] The present invention focuses on non-intrusive load monitoring data and uses tensors to describe it to retain more potential information. Furthermore, the difference between the observed non-intrusive load monitoring data and the repaired value is measured by constructing a target loss function using mean square loss. During the optimization process, the stochastic gradient descent method is used to update the objective function, and a PID controller is introduced to dynamically adjust the instance error to solve the problem of slow model convergence.
[0081] Example 2
[0082] In the above embodiment, a method is provided, and correspondingly, the present application also provides a device. The device provided in the embodiment of the present application can implement the above method, and the device can be implemented by software, hardware, or a combination of software and hardware. For example, the device may include integrated or separate functional modules or units to perform the corresponding steps in the above methods.
[0083] In some implementations of the embodiments of the present application, the device 20 provided in the embodiments of the present application is based on the same inventive concept as the method provided in the aforementioned embodiments of the present application and has the same beneficial effects.
[0084] Please refer to Figure 2 , which shows a schematic diagram of a device provided by some embodiments of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0085] like Figure 2 As shown, the device 20 may include:
[0086] A data receiving module 201 is used to receive missing data repair instructions for non-intrusive load monitoring data;
[0087] The data storage module 202 is used to collect and store the current non-intrusive load monitoring data based on the missing data repair instruction;
[0088] A tensor construction module 203, used to construct a non-intrusive load monitoring tensor according to current non-intrusive load monitoring data;
[0089] The data repair module 204 is used to construct a target loss function based on the non-intrusive load monitoring tensor and perform iterative optimization, and repair the non-intrusive load monitoring data based on the iteratively optimized target loss function to obtain a non-intrusive load monitoring data repair value.
[0090] In this embodiment, Figure 3 As shown, the data storage module includes a first storage unit and a second storage unit.
[0091] The first storage unit is used to store the received non-intrusive load monitoring data in the form of a four-tuple, and the four-tuple representation is G=(d, s, m, v); wherein G represents the non-intrusive load monitoring data, d represents the date of sensor monitoring, s represents the number of sampling time segments of the sensor in one day, m represents the number of sensors recording the energy consumption of electrical appliances, and v represents the energy consumption of electrical appliance m at a certain time s on the dth day.
[0092] The second storage unit is used to store the non-intrusive load monitoring missing data repair value output by the repair module, and the non-intrusive load monitoring missing data repair value is also stored in the form of a quadruple.
[0093] In this embodiment, Figure 4 As shown, the repair module includes an initialization unit, a training unit and a calculation unit;
[0094] An initialization unit, used for initializing process parameters and corresponding auxiliary variables involved in the non-intrusive load monitoring missing data repair process;
[0095] A training unit, used for building a non-intrusive load monitoring missing data repair objective function by combining the constructed non-intrusive load monitoring tensor and the initialized process parameters and performing iterative training;
[0096] The calculation unit is used to calculate the non-intrusive load monitoring missing data repair value according to the iteration parameter of the objective function.
[0097] The device can be deployed in an existing server, or in a separate server dedicated to performing non-intrusive load monitoring missing data repair.
[0098] It should be noted that the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0100] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0103] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application.
Claims
1. A non-intrusive load monitoring data repair method, characterized in that: The steps include: receiving missing data repair instructions for non-intrusive load monitoring data; Based on the missing data repair instruction, collecting and storing current non-intrusive load monitoring data; Constructing a non-intrusive load monitoring tensor according to the current non-intrusive load monitoring data; Based on the non-intrusive load monitoring tensor, a target loss function is constructed and iteratively optimized, and the non-intrusive load monitoring data is repaired based on the iteratively optimized target loss function to obtain a non-intrusive load monitoring data repair value; The current non-intrusive load monitoring data is stored in the form of a quaternary group, which is represented by G=(d, s, m, v); G represents the non-intrusive load monitoring data, d represents the date of sensor monitoring, s represents a certain time of the day, m represents a meter for recording the energy consumption of the electrical appliance, and v represents the energy consumption of the electrical appliance m at time s on the dth day; According to the current non-intrusive load monitoring data, constructing a non-intrusive load monitoring tensor comprises the following steps: According to date d, the quadruple G = (d, s, m, v) is divided into K time periods, and based on the quadruple G = (1, s, m, v) with d = 1, G is obtained. (1) The data (s,m,v) and according to G (1) Construct an I×J slice matrix X with date d=1 (1) ; According to the remaining dates d, build the slice matrix X based on the above steps in turn. (2) , X (3) …X (K) ; Arrange the K slice matrices from front to back in the order of the divided time periods to construct a non-intrusive load monitoring tensor The method of constructing a target loss function based on the non-intrusive load monitoring tensor and performing iterative optimization, and repairing the non-intrusive load monitoring data based on the iteratively optimized target loss function to obtain a non-intrusive load monitoring data repair value comprises the following steps: Initialize process parameters involved in non-intrusive load monitoring data repair process; Constructing an initial target loss function for non-intrusive load monitoring data restoration according to the non-intrusive load monitoring tensor and the process parameter; Iteratively optimizing the initial objective loss function to obtain an intermediate objective loss function; Determine whether the intermediate target loss function satisfies the iteration termination condition. If so, terminate the iteration and output the intermediate target loss function as the target loss function after iterative optimization; if not, continue the iteration; The non-intrusive load monitoring data is repaired based on the target loss function after iterative optimization to obtain the repair value of the non-intrusive load monitoring data; The process parameters include: non-intrusive load monitoring tensor T, latent feature matrix O, U, P, latent feature matrix dimension R, learning rate η, control coefficients C of proportional, integral and differential terms P , C I and C D , an auxiliary array A used to cache the integral and differential terms at each instance I and A D , regularization coefficients λ1, λ2, λ3, and final convergence threshold τ; Among them, the sizes of the latent feature matrices O, U, and P are determined by each dimension value of the non-intrusive load monitoring tensor T and the latent feature dimension R. O is an I-row and R-column latent feature matrix, U is an J-row and R-column latent feature matrix, and P is an K-row and R-column latent feature matrix. Among them, the initial target loss function of non-intrusive load monitoring data repair is constructed according to formula (1): The initial objective loss function is iteratively optimized according to formula (2): Where I is the number of sampling points of the sensor in one day, J is the number of meters recording the energy consumption of electrical appliances, represents the set of real numbers; Among them, t ijk ∈Λ represents the known elements contained in the tensor T, and Λ represents the set of all data of the monitored non-intrusive load monitoring data; t ijk represents the known entity in the non-intrusive load monitoring tensor T, which is the power of a certain appliance j at a certain time i on a date k; ir represents the value of the i-th row and r-th column in the latent feature matrix O; u jr represents the value of the jth row and rth column in the latent feature matrix U; p kr Represents the value of the kth row and rth column in the latent feature matrix P; It is a part of the L2 regularization term, which controls the complexity of the latent feature matrices O, U, and P respectively; λ1, λ2, and λ3 represent the L2 regularization control coefficients of the three latent feature matrices O, U, and P respectively; Where n is a natural number, indicating the number of iterations; Represents the instance error on the current element, where represents the actual value of the observed non-intrusive load monitoring data; represents the repair value of non-intrusive load monitoring data calculated according to the latent feature matrix; represents the value of the i-th row and r-th column in the latent feature matrix O, represents the value of the jth row and rth column in the latent feature matrix U, Represents the value of the kth row and rth column in the latent feature matrix P.
2. The method according to claim 1, characterized in that According to formula (3), the non-intrusive load monitoring data repair value is obtained:
3. A non-intrusive load monitoring data repair device implemented by the method according to any one of claims 1-2, characterized in that: include: A data receiving module, used for receiving missing data repair instructions of non-intrusive load monitoring data; A data storage module, used for collecting and storing current non-intrusive load monitoring data based on the missing data repair instruction; A tensor construction module, configured to construct a non-intrusive load monitoring tensor according to the current non-intrusive load monitoring data; The data repair module is used to construct a target loss function based on the non-intrusive load monitoring tensor and perform iterative optimization, and repair the non-intrusive load monitoring data based on the target loss function after iterative optimization to obtain a non-intrusive load monitoring data repair value.
Citation Information
Patent Citations
Video restoration method and device based on expansion bias tensor hidden feature decomposition
CN117274090A
Video data restoration method and device based on beta divergence tensor decomposition
CN117274091A