A non-intrusive load decomposition method based on bidirectional cross-attention multi-modal fusion

By employing a bidirectional cross-attention multimodal fusion method, and utilizing discrete wavelet decomposition and physical consistency constraints, the problem of insufficient feature representation and physical constraint mismatch in load decomposition in existing technologies is solved, thus achieving high-precision electrical power decomposition.

CN122863475BActive Publication Date: 2026-11-24NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611375671.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-24
Estimated Expiration
2046-09-07

AI Technical Summary

Technical Problem

Existing non-intrusive load decomposition technology struggles to simultaneously consider trend information, detailed disturbance information, and structural correlation information in complex scenarios. It lacks a two-way dependency modeling mechanism and constraints on rated power boundaries and total power conservation laws, resulting in large errors and unreasonable physical meanings in the decomposition results.

Method used

A method based on bidirectional cross-attention multimodal fusion is adopted. Multi-channel temporal representation is constructed through discrete wavelet decomposition. Combined with a two-dimensional wavelet cross-scale event coupling relationship graph, a physical consistency constraint loss function is introduced to achieve collaborative modeling and feature fusion of temporal and image modes.

Benefits of technology

It improves the numerical accuracy and physical rationality of load decomposition results, enhances the ability to express features in complex scenarios, and ensures that the decomposition results conform to the physical boundaries of electrical appliance operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122863475B_ABST
    Figure CN122863475B_ABST
Patent Text Reader

Abstract

This invention discloses a non-intrusive load decomposition method based on bidirectional cross-attention multimodal fusion. The method acquires aggregated total power time-series data and performs preprocessing; it then performs discrete wavelet decomposition and reconstruction on the samples to obtain the original power sequence, approximate components, and multi-level detail components, forming a multi-channel time-series representation; based on the approximate components, detail components, and temporal position relationships, it constructs a two-dimensional wavelet cross-scale event coupling relationship graph describing steady-state trends, transient coupling, and temporal proximity relationships; it extracts temporal modal features through a one-dimensional time-series branch and extracts event relationship modal features through a two-dimensional relationship branch; it utilizes an event saliency bias matrix to guide bidirectional cross-attention to achieve deep interaction between the two types of modes, and performs gated fusion based on event saliency and aggregated power conditions to output the decomposed power of the target electrical appliance; this invention significantly improves decomposition accuracy and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power information processing and intelligent sensing technology, and in particular to a non-intrusive load decomposition method based on bidirectional cross-attention multimodal fusion. Background Technology

[0002] With the continuous development of smart grids, home energy management, and refined energy consumption analysis technologies, accurate perception and in-depth analysis of user-side load information have become crucial for improving power system operating efficiency and supporting demand-side response. Non-intrusive load monitoring (NIH) technology collects and aggregates signals such as power, current, and voltage at the user's main inlet line, and uses algorithms to analyze the total load, thereby identifying or separating the operating status and power changes of various electrical devices. Compared to invasive monitoring methods that deploy sensors at each appliance, NHI offers advantages such as low installation costs, convenient deployment, and wide applicability, making it highly valuable for applications in residential buildings, commercial buildings, park energy management, and smart electricity scenarios.

[0003] In non-intrusive load monitoring research, load decomposition is a crucial step, aiming to recover the individual power curve of a target appliance from the total power signal generated by the aggregation of multiple devices. Obtaining device-level power information not only provides users with more granular energy consumption feedback but also offers reliable data support for applications such as abnormal power consumption detection, equipment health assessment, energy-saving strategy formulation, and load forecasting. Especially in real-world scenarios involving frequent start-stop cycles of various appliances, complex power fluctuations, and intertwined operating modes, accurately separating the true power of different appliances from the aggregated load has become a critical technical challenge that urgently needs to be addressed in this field.

[0004] Existing non-intrusive load decomposition techniques have the following shortcomings: First, single time-series modeling or single image modeling cannot simultaneously take into account trend information, detailed perturbation information, and structural correlation information, resulting in insufficient feature representation in complex superimposed scenarios; Second, there is a lack of effective bidirectional dependency modeling mechanisms between different modalities, making it difficult to fully leverage the complementary effects of heterogeneous features; Third, existing data-driven methods generally lack constraints on rated power boundaries and total power conservation laws, which can easily lead to prediction results with unreasonable physical meaning. Summary of the Invention

[0005] The purpose of this invention is to provide a non-intrusive load power decomposition method based on multimodal fusion networks. It constructs a load decomposition framework for collaborative modeling of temporal and image modalities. While enhancing feature representation capabilities, it introduces prior physical laws to constrain the model training process and solves the problems of multiple electrical loads superimposed, frequency components intertwined, power boundaries mutually occluding, and start-stop transients that are difficult to identify in the total power signal. Existing methods cannot simultaneously take into account temporal dynamic information and spatial structural information, which leads to problems such as insufficient feature extraction, large errors, and physical constraint mismatch in decomposition results in complex scenarios.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] The present invention discloses a non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion, comprising the following steps:

[0008] Step 1: Obtain the aggregated total power time series data and segment it according to the sliding window to form samples to be processed;

[0009] Step 2: Perform discrete wavelet decomposition and reconstruction on the sample to be processed to obtain the original power sequence, approximate components and multiple levels of detail components, which constitute a multi-channel time series representation;

[0010] Step 3: Based on the approximate components, detail components, and temporal position relationships, construct a two-dimensional wavelet cross-scale event coupling relationship diagram that describes the steady-state trend similarity, transient directional coupling relationship, and temporal proximity relationship between different moments;

[0011] Step 4: Utilize the one-dimensional time series feature extraction branch to perform scale gating and time-series dependency modeling on the multi-channel time series representation to obtain time modal features; utilize the two-dimensional image sequence feature extraction branch to perform relation aggregation on the two-dimensional wavelet cross-scale event coupling relationship graph to obtain event relation modal features;

[0012] Step 5: Construct an event saliency bias matrix based on the energy and temporal location of detail components, and realize information interaction between temporal modal features and event relationship modal features through a bidirectional cross-attention mechanism;

[0013] Step 6: Generate modal fusion gating weights based on event saliency and aggregated power conditions, fuse the two types of modal features after bidirectional enhancement, obtain fused features, and output the decomposed power of the target appliance; during the model training phase, construct a physical consistency constraint loss function using the rated maximum power of the target appliance and the aggregated total power measurement value at the corresponding time position, and impose penalties on cases where the predicted power exceeds the rated maximum value or exceeds the aggregated total power.

[0014] Furthermore, in step 1, for the sequence-to-point decomposition task, the fusion features at the center time position of the sliding window are selected for power mapping; for the sequence-to-sequence decomposition task, the fusion features at each time position are respectively subjected to power mapping, and the output is the target electrical power sequence with the same length as the input window.

[0015] Furthermore, in step 2, the total number of discrete wavelet decomposition layers is set according to the sliding window length, and the reconstructed approximate components and detail components of each layer, together with the original power sequence, serve as the input channels for multi-channel time series representation.

[0016] Furthermore, in step 3, steady-state trend similarity and directional relationships are constructed based on the approximate component differences between any two time positions; transient unidirectional coupling and change direction relationships are constructed based on the product and directed difference of the same-layer detail components; time proximity and directed time relationships are constructed based on the time interval; and multiple relationships are combined along the channel to form a multi-channel two-dimensional relationship diagram.

[0017] Furthermore, in step 4, the one-dimensional time series feature extraction branch extracts multi-receptive field local features by using one-dimensional convolution with different dilation factors for the original power sequence, approximate components, and detail components of each layer. Based on the local energy of each component at each time position, scale-gated weights are generated, and the convolution features are weighted and fused. Then, the features are input into the bidirectional long short-term memory network to obtain temporal modal features.

[0018] Furthermore, in step 4, the two-dimensional image sequence feature extraction branch calculates the event saliency based on the energy of the detail components at each time position, constructs a relation mask composed of a local neighborhood mask and a long-distance event association mask, aggregates the outward relation features pointing from each time position to other positions and the inward relation features pointing from other positions to each time position under the mask constraint, and obtains the event relation modal features through relation direction gating fusion.

[0019] Furthermore, in step 5, the first direction attention output is obtained by querying the relational modality features with the temporal modality features, and the second direction attention output is obtained by querying the temporal modality features with the relational modality features. The event saliency bias matrix is ​​added to the attention scores of the two directions respectively. Then, the attention output is concatenated with the original feature residuals and normalized to achieve bidirectional enhancement of the two modalities.

[0020] Furthermore, in step 6, the modal fusion gating weights are generated based on the event saliency and the normalized power condition of the aggregated total power relative to the rated maximum power of the target electrical appliance at the current time position, so as to adaptively adjust the contribution ratio of time mode and event relationship mode in the fusion features.

[0021] Furthermore, in step 6, the physical consistency constraint loss function includes a basic error term, a rated power out-of-bounds penalty term, and a aggregated power out-of-bounds penalty term; the rated power out-of-bounds penalty term penalizes the predicted power for exceeding the rated maximum power of the target appliance, and the aggregated power out-of-bounds penalty term penalizes the predicted power for exceeding the aggregated total power measurement value at the corresponding time position.

[0022] Furthermore, in step 6, gradient clipping and early stopping strategies are employed during model training to enhance training stability and prevent overfitting.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] This invention divides the aggregated total power signal into low-frequency trend components and detail components at multiple scales through discrete wavelet decomposition, and dynamically adjusts the characteristic contribution of each component according to the local energy at different times, so that the model can select information at different scales for steady-state operation intervals and start-stop transient intervals.

[0025] This invention constructs a two-dimensional wavelet cross-scale event coupling relationship diagram with directional information based on approximate components, detail components, and temporal position relationships. This gives each element in the two-dimensional relationship diagram a clear temporal position and signal scale meaning, and can simultaneously characterize local continuous relationships, long-distance event correlations, and directional differences between opening and closing processes.

[0026] This invention enables bidirectional information exchange between temporal modal features and event relational modal features while maintaining the correspondence between time and position through an event saliency biased bidirectional cross-attention mechanism; furthermore, it generates gating weights based on event saliency and aggregation power conditions to achieve adaptive adjustment of the contributions of the two modalities under different operating states.

[0027] This invention imposes penalties on prediction results that do not conform to the physical boundaries of load operation by constraining the rated maximum power of the target electrical appliances and the aggregated total power, thereby improving the numerical accuracy, physical rationality and engineering reliability of the load decomposition results. Attached Figure Description

[0028] Figure 1 This is an overall flowchart of the present invention;

[0029] Figure 2 This is a schematic diagram comparing the decomposition results on the global dataset of the present invention; wherein, Figure 2 (a) Figure 2 (b) and Figure 2 (c) in the table corresponds to the same total power sequence with 1750 sampling points, showing the load power decomposition results of the washing machine, refrigerator and kettle respectively; Figure 2 (d) Figure 2 (e) and Figure 2 (f) in the table corresponds to the total power sequence of the same segment of 2000 sampling points, showing the load power decomposition results of dishwasher, refrigerator and kettle respectively. Detailed Implementation

[0030] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are only used to explain the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Equivalent transformations, parameter adjustments, or structural substitutions made by those skilled in the art based on this specification without departing from the technical concept of the present invention should all fall within the scope of protection of the present invention.

[0031] This invention uses data on washing machines, kettles, dishwashers, and refrigerators commonly found in the REFIT public dataset as input.

[0032] Step 1: Input data and preprocessing.

[0033] To improve the model's adaptability under conditions of concurrent operation of multiple electrical appliances, superposition of multiple instances of similar equipment, and mutual power masking, a unified data preprocessing is performed on the original power sequence before inputting it into the network. Specifically, to address situations where different devices have inconsistent sampling frequencies or sampling time jitter, the power signal undergoes time granularity alignment and resampling to form a continuous sequence of data from different time periods at a unified sampling interval, thus facilitating subsequent windowed modeling. Furthermore, to reduce noise interference and improve model convergence stability, missing points are repaired using interpolation or forward padding, and abnormal peaks and outliers are replaced or removed using sliding filtering and statistical discrimination criteria. Finally, power values ​​are scaled uniformly using linear normalization or Z-score standardization. Through these steps, the effectiveness and robustness of the input data can be improved while preserving the main load evolution patterns.

[0034] To avoid dimensional inconsistencies between data standardization during feature extraction and subsequent physical power constraints, this embodiment retains both the original physical-scale power sequence and the standardized power sequence. Let the original aggregated total power sequence in watts within the sliding window be:

[0035] ;

[0036] in, This is the sequence of total aggregation power at the original physical scale. The original total aggregate power sequence at time position The power value at that location, This is the length of the sliding window.

[0037] The original aggregated total power sequence is standardized to obtain a standardized power sequence for wavelet decomposition and network feature extraction:

[0038] ;

[0039] In the formula, To standardize the polymerization power sequence at time positions The value at that location, and These are the power mean and standard deviation determined based on the training data, respectively. A positive number set to prevent the denominator from being zero.

[0040] Normalized power sequence Used for discrete wavelet decomposition, temporal feature extraction, and event relation construction; original power sequence Used to generate aggregated power conditional features and calculate physical consistency constraints. Both the actual power of the target appliance and the model-predicted power are calculated using the same original physical scale. If the model output is standardized power, the prediction results are restored to the original power units according to the corresponding standardized parameters before calculating the physical consistency constraints.

[0041] Step 2: Input multidimensional features based on wavelet transform.

[0042] In non-intrusive load decomposition tasks, the total power signal is typically formed by the superposition of multiple electrical appliance power components. The operating states of different devices intersect and overlap on the time axis, leading to frequency component coupling, mixed edge changes, and the masking of detailed features. To improve the model's ability to analyze complex load waveforms, this embodiment uses discrete wavelet transform to construct multi-dimensional time-frequency feature input. The core idea is to decompose the original power sequence into approximate components and detail components at different scales, allowing low-frequency trend information and high-frequency fluctuation information to be expressed hierarchically. The reconstructed result is then used as a multi-channel input to subsequent time-series branches for learning.

[0043] In this embodiment, a three-level wavelet decomposition and reconstruction strategy is preferably adopted, and the db2 wavelet basis function is selected to process the total power curve. The original sequence is first decomposed into approximate components and detail components, and then feature curves at different scales are obtained through layer-by-layer reconstruction. Since the first-level reconstruction result can more clearly highlight the instantaneous start-up and shutdown and local abrupt changes of the electrical appliances while maintaining the original contour information, it is preferable to combine the first-level reconstruction approximate components, the first-level reconstruction detail components, and the original power sequence to form a multi-dimensional input feature. Compared with using only a single time series sequence, this design can simultaneously retain trend information, edge information, and disturbance information in a unified representation space, thereby enhancing the model's ability to distinguish complex load patterns. Discrete wavelet transform coefficient (DWT) calculation: Assuming a continuous signal The DWT coefficients of the sampled values ​​are calculated as follows:

[0044]

[0045]

[0046] ;

[0047] in, and These represent the approximation coefficients and wavelet coefficients, respectively. and 𝜓( These represent scaling functions and wavelet functions at different scales and locations, respectively. Parameters This represents the number of samples to be transformed, usually chosen as . ,in Indicates the number of transformation layers. This represents the scale or hierarchy index of the discrete wavelet decomposition. This represents the wavelet scaling function and the translation position index of the wavelet function. With... As the magnitude increases, the scale decreases, the corresponding frequency increases, and the signal becomes closer to its detailed components. This indicates the offset of the signal in position.

[0048] Step 3: Design of multimodal fusion model.

[0049] To fully utilize the temporal evolution features, cross-scale transient features, and operational correlations between different times in the aggregated power signal, this embodiment constructs a bidirectional cross-attention multimodal fusion network BCA-MFN based on wavelet cross-scale event coupling relationships.

[0050] The BCA-MFN includes a one-dimensional time series feature extraction branch BCA-MFN-1D, a two-dimensional image sequence feature extraction branch BCA-MFN-2D, and a multimodal fusion module based on an event saliency bias bidirectional cross-attention mechanism.

[0051] Among them, BCA-MFN-1D is used to extract sequence features that maintain the correspondence between time and position from the original power components, wavelet approximation components, and wavelet detail components at different levels; BCA-MFN-2D is used to construct a two-dimensional event coupling relationship graph from the wavelet decomposition results and extract the steady-state trend similarity relationship, transient directional coupling relationship, and temporal proximity relationship between different times; BCA-MFN is used to perform bidirectional information interaction between time tokens and relationship tokens, and adaptively adjust the contributions of the two types of modes according to the event salience and the current available power, and finally output the decomposed power of the target appliance.

[0052] (1) 1D Time Series Feature Extraction Branch (BCA-MFN-1D): Suppose that after performing discrete wavelet decomposition and reconstruction on the aggregated power sequence within the sliding window, the resulting multi-channel time series input is... for:

[0053] ;

[0054] In the formula, The original aggregated power sequence within the sliding window; For the first Layer reconstruction approximation components are used to characterize the low-frequency trend changes of the aggregated power signal; For the first Layer reconstruction detail components are used to characterize local perturbations and start-stop transients at the corresponding scale; The length of the sliding window; The number of channels for multi-channel timing input. The input matrix is ​​represented by the symbol. have Each time location and One input channel.

[0055] BCA-MFN-1D first performs multi-scale one-dimensional dilated convolution on each input channel to obtain local temporal features under different receptive fields. For the first... One input channel, which has an expansion factor Convolution output Represented as:

[0056] ;

[0057] In the formula, Indicates the expansion factor as One-dimensional dilated convolution operation, Represents a non-linear activation function. Represents the first of the multi-channel inputs X Each time series channel. The expansion factor can be preferably set to 1, 2, and 4 to extract short-term mutation features, local fluctuation features, and runtime dependency features over a longer time range, respectively.

[0058] The convolution results corresponding to different dilation factors are concatenated and mapped along the feature dimension to obtain the first... Local features of each input channel :

[0059] ;

[0060] In the formula, This represents a one-dimensional convolution or linear mapping operation used to unify feature dimensions. Indicates the first Each channel passes through the expansion factor. The local features obtained after one-dimensional convolution This represents the feature concatenation operation, used to combine convolution results corresponding to different dilation factors.

[0061] Considering the varying effectiveness of the original power component, approximate component, and different levels of detail components at different operational stages, this embodiment further incorporates a scale gating mechanism. For time position... and input channel Calculate the local energy of the channel based on the corresponding local features. :

[0062] ;

[0063] in, For the first Each channel in time position The corresponding local feature vector, This is an average pooling operation used to convert local feature vectors into energy statistics.

[0064] Based on the time position of each channel in the local energy generation Scale gating weights at the location :

[0065] ;

[0066] In the formula, For the first Trainable scaling parameters for each input channel, with the weights of each channel satisfying:

[0067] ;

[0068] Based on the scale-gated weights, local features from different input channels are weighted and fused to obtain the time position. Corresponding scale-gated temporal features :

[0069] ;

[0070] Through the above processing, in the range where the aggregated power changes relatively steadily, the model can improve the feature contribution of the approximate component and the original power component; in the range where the appliance is turned on or off or the power changes rapidly, the model can improve the feature contribution of the corresponding detail component, thereby realizing the dynamic selection of information at different wavelet scales.

[0071] The temporal features after scale gating retain their original temporal dimension and are input into a bidirectional long short-term memory network to simultaneously learn forward and backward temporal dependencies:

[0072] ;

[0073] in:

[0074] ;

[0075] In the formula, This represents the time modal characteristics of the BCA-MFN-1D output. Indicates time position The corresponding time token, To unify feature dimensions, Indicates that the feature sequence contains There are 10 time tokens, each with a dimension of 1. .

[0076] No flattening operation is performed on temporal features before inputting them into the bidirectional long short-term memory network to preserve the temporal order and correspondence between sampling locations. Pooling, center time step extraction, or output mapping operations are performed after cross-modal fusion is completed.

[0077] (2) 2D image sequence feature extraction branch (BCA-MFN-2D): BCA-MFN-2D no longer converts the original power sequence into a traditional Gram corner field texture image. Instead, it uses wavelet approximation components, detail components and temporal position relationships to construct a two-dimensional wavelet cross-scale event coupling relationship diagram with clear physical meaning.

[0078] For any two time positions in the sliding window and First, according to the first Layer reconstruction approximate components construct steady-state trend similarity relationships :

[0079] ;

[0080] In the formula, The scale parameter is the approximate component. A positive number is set to prevent the denominator from being zero. For the first Layer reconstruction approximate components at time location The values ​​at those points. The closer the low-frequency power trends are at two different time points, the better. The closer to 1, the more significant the difference in low-frequency trends between the two time points. The closer it is to 0.

[0081] Furthermore, for the first Layer reconstruction of detail components, establishing transient direction and strength coupling relationships. :

[0082] ;

[0083] In the formula, For the first The scale parameters corresponding to the layer detail components. Indicates the first Layer reconstruction detail components in time position The value at that location, It is a hyperbolic tangent function. When two time points have power abrupt changes in the same direction, For positive, Take a positive value; when the two time positions correspond to the power increase and power decrease processes respectively, Negative, Take a negative value to preserve the directional difference between the target appliance's turn-on and turn-off events.

[0084] To characterize the temporal distance relationship between different time locations, a temporal proximity relationship is constructed based on the sampling point interval. :

[0085] ;

[0086] In the formula, Here, represents the time decay coefficient, and i and j represent different time positions. The closer the time positions are, the lower the decay coefficient. The larger; the farther the time interval, The smaller.

[0087] By combining the steady-state trend similarity matrix, the transient coupling matrix at each level, and the temporal proximity matrix along the channel dimension, we obtain the wavelet cross-scale event coupling tensor. :

[0088] ;

[0089] in:

[0090]

[0091] The horizontal and vertical axes of the relation tensor correspond to the time positions within the sliding window, respectively. Each feature channel is used to characterize low-frequency trend similarity, transient coupling at different wavelet scales, and temporal proximity. This represents the operation of stacking multiple two-dimensional relation matrices along the relation channel dimension. To indicate that by all The directed time relation matrix formed, The two spatial dimensions of the relation tensor correspond to time positions, and the third dimension represents the relation channel. The length of the sliding window. This represents the total number of levels in the discrete wavelet decomposition. Each relation element obtained thus corresponds to a signal correlation between two specific time locations, rather than a texture pixel without clear physical meaning in the general sense.

[0092] To extract local correlations and long-distance event correspondences in the two-dimensional event coupling graph, the event saliency is first calculated based on the energy of different detail components at each time position:

[0093] ;

[0094] In the formula, For the first The scale weights corresponding to the layer detail components can be preset values ​​or obtained through model training; Indicates time position The salience of the event at that location.

[0095] Construct a sparse relation mask based on temporal distance and event saliency:

[0096] ;

[0097] In the formula, The radius of the local time neighborhood. This is the threshold for event association.

[0098] Through the sparse relation mask, BCA-MFN-2D preserves both the local continuity between adjacent time positions and the long-distance correlation between time positions with a long time interval but both having obvious start-stop or abrupt change characteristics.

[0099] Under the constraint of the sparse relation mask, relation features are aggregated along the row and column directions of the event coupling relation tensor respectively:

[0100] ;

[0101] Among them, row direction feature aggregation Used to extract correlation patterns between fixed time locations and other time locations, column-oriented feature aggregation. Used to extract event response features from the reverse perspective of the correspondence.

[0102] Gating fusion of row and column relationship features :

[0103] ;

[0104] In the formula, Indicates feature splicing, This represents the Sigmoid activation function. Represents element-wise product. For relational direction gating weights, Let be the trainable weight matrix of the relational direction-gated network. The trainable scale weight parameters corresponding to the detail components of the representation layer.

[0105] Subsequently, for each time location Regarding its other time locations Weighted aggregation of relational features:

[0106] ;

[0107] Among them, relation aggregation weight It can be determined based on the salience of the event and its temporal proximity:

[0108] ;

[0109] In the formula, The final composite relationship mask is composed of a local neighborhood mask and a continuous event association mask. and These are the adjustment parameters corresponding to event significance and temporal proximity, respectively, and they satisfy the following:

[0110] ;

[0111] Finally, the relational modal features of the BCA-MFN-2D output are obtained:

[0112] ;

[0113] In the formula, Indicates time position The corresponding cross-scale event relationship tokens. Through the above processing, the row and column associations in the two-dimensional relationship graph are mapped to a sequence of relationship modes that correspond one-to-one with the original sliding window time positions, providing a unified data structure for subsequent cross-modal fusion with time modes.

[0114] (3) Multimodal Fusion Network Based on Bidirectional Cross-Attention Mechanism (BCA-MFN): Obtaining the temporal modal features of the BCA-MFN-1D output Modal characteristics related to BCA-MFN-2D output Then, an event saliency biased bidirectional cross-attention mechanism is used to fuse the two types of heterogeneous features.

[0115] Before fusion, both modalities maintain the token sequence form corresponding to the sliding window time position:

[0116] ;

[0117] Temporal modal features Relational modal features Perform a linear mapping to obtain the corresponding query matrix, key matrix, and value matrix:

[0118] ;

[0119] In the formula, , , , , and All of them are trainable linear mapping matrices.

[0120] To prioritize cross-modal attention on appliance start-up and shutdown, power surges, and locations with strong temporal correlations, an attention bias matrix is ​​constructed based on event saliency and temporal proximity. :

[0121] ;

[0122] In the formula, and These are the adjustment coefficients corresponding to event significance bias and time proximity bias, respectively.

[0123] Using temporal modality features as queries and relational modality features as keys and values, calculate the enhancement effect of relational modality on temporal modality:

[0124] ;

[0125] In the formula, The dimension of the key vector. This indicates supplementary information obtained by the temporal modality from the relational modality.

[0126] Symmetrically, using relational modality features as queries and temporal modality features as keys and values, the enhancement of relational modality by temporal modality is calculated:

[0127] ;

[0128] in, This represents the cross-modal enhancement result obtained from querying the event relationship modality and the time modality.

[0129] The cross-attention outputs in both directions are respectively residually connected to and normalized with the corresponding original modal features:

[0130] ;

[0131] In the formula, These are the temporal modal features after event-relation modality enhancement. These are the event relationship modal features after time modality enhancement.

[0132] Through the aforementioned bidirectional cross-attention, the temporal modality can utilize the steady-state correlation, transient coupling, and long-distance event correspondence information reflected in the two-dimensional event relationship graph, while the relational modality can also utilize the continuous evolution information in the one-dimensional time series to correct the relational features.

[0133] Furthermore, modal fusion gating coefficients are generated based on the significance of the event and the available power range at the current time location.

[0134] Set time position The total polymerization power at the point is The rated maximum power of the target electrical appliance is Define the normalized available power characteristics:

[0135] ;

[0136] The normalized available power characteristic is used to reflect whether the current aggregated power meets the power conditions required for the operation of the target electrical appliance.

[0137] By inputting temporal modality enhancement features, relational modality enhancement features, event saliency, and normalized available power features into a gating network, the temporal location is obtained. Modal fusion gating coefficient at the location :

[0138] ;

[0139] in, Indicates time position Enhanced temporal modal features at the location, Indicates time position Enhanced event relationship modal features at the location.

[0140] The final fusion features are obtained based on the modality fusion gating coefficients. :

[0141] ;

[0142] In the formula, For time location Modality fusion gating vector.

[0143] When the time position When obvious start-stop transients occur, the gating network can increase the modal contribution containing cross-scale event relationship information based on the saliency of the event; when the aggregated power is in a relatively stable operating range, the gating network can increase the contribution of continuous time-series evolution characteristics; when the current aggregated total power is significantly lower than the typical operating power of the target appliance, the normalized available power characteristics can suppress modal responses that do not conform to actual operating conditions.

[0144] For sequence-to-point non-intrusive load decomposition tasks, the center time position of the sliding window is selected. Corresponding fusion features :

[0145] ;

[0146] The predicted power of the target appliance at the center time position is obtained through the power regression output layer. :

[0147] ;

[0148] In the formula, and These are the weight matrix and bias parameters of the power regression output layer, respectively. The Softplus function is used to restrict the output to non-negative values.

[0149] For sequence-to-sequence load decomposition tasks, power mapping can be performed on the fusion features at each time point. :

[0150] ;

[0151] This yields the target appliance predicted power sequence with the same length as the input sliding window.

[0152] If the predicted power exceeds the rated maximum power of the target appliance, or if the predicted power exceeds the aggregated total power at the corresponding time location, a penalty is applied during subsequent training using physical consistency constraint loss, so that the output of BCA-MFN simultaneously meets the data fitting accuracy requirements and the physical boundary requirements of the load power.

[0153] Step 4: Domain knowledge constraint loss function.

[0154] To ensure that the model predictions conform to the physical constraints of electrical appliance operation, the MAE loss function... Introducing constraint penalty terms based on Specifically, penalties are imposed on two types of situations that may violate physical laws: first, the predicted power of the target appliance exceeds its rated maximum power; second, the sum of the decomposed power exceeds the measured total power value during the same period. This design applies an additional penalty to illegal predictions in the loss function, thereby guiding the model to follow the principles of power upper limits and total power conservation during training, improving the physical rationality and reliability of the prediction results. The final loss function balances prediction accuracy and physical consistency, providing constraints and guidance for appliance power decomposition. The specific formula is as follows:

[0155] ;

[0156] ;

[0157] ;

[0158] In the formula, The penalty coefficient is set to 0.02. For the sample The true value of the target electrical appliance. The power value of the target electrical appliance. This represents the total number of samples in the training batch. For the sample The midpoint of the total power during that time period. This penalty item is based on the maximum power of the target electrical appliance. Only in more than It only takes effect when the time is right; otherwise, the loss is zero. The function is a linear rectifier function.

[0159] In this embodiment, target appliance load decomposition models are established for washing machines, kettles, dishwashers, and refrigerators respectively, and the Adam optimizer is used to iteratively update the model parameters. The first-order moment estimation coefficients of the Adam optimizer are set to... The second-order moment estimation coefficients are set as follows: The numerical stability parameter is set to The initial learning rate of the model is preferably set to... If the validation set loss does not decrease for five consecutive training epochs, multiply the current learning rate by 0.5, and the learning rate should decrease to a minimum of [missing value]. This allows for a faster parameter update rate in the early stages of training and reduces parameter oscillations in the later stages, thus improving model convergence stability. Each parameter update is performed according to the total loss function. Calculate the gradient. The total loss consists of the mean absolute error term and the physical consistency penalty term, with the penalty coefficient preferably set to 0.02.

[0160] The optimal batch size for model training is 64, meaning that 64 sliding window samples are selected from the training dataset each time to calculate the gradient and update the model parameters. When the image window size is large or there is insufficient video memory, the batch size can be set to 32. The training data is randomly shuffled before each training epoch to reduce the impact of sample order on the parameter update process. The maximum number of training epochs is set to 100, and an early stopping strategy is implemented based on the total loss of the validation set: training terminates when the total loss of the validation set fails to improve for 15 consecutive epochs, while saving the model parameters corresponding to the lowest total loss in the validation set to prevent overfitting on the training set. To address the potential issue of excessively large gradients during Bi-LSTM and cross-attention module training, the upper limit of the gradient norm can be set to 5; gradient clipping is performed when the gradient norm exceeds this threshold.

[0161] Regarding network weight initialization, for one-dimensional convolutional layers, two-dimensional convolutional layers, and intermediate fully connected layers using the ReLU activation function, He normal initialization is preferred, allowing the weights of each layer to be randomly assigned according to the variance related to the number of input neurons. For the query, key-value linear mapping matrix in the bidirectional cross-attention module and the model output layer, Glorot uniform initialization is used. The input weight matrix of Bi-LSTM is initialized uniformly using Glorot, the cyclic state weight matrix is ​​initialized orthogonally, and the bias parameters are initially set to 0, with the forget gate bias preferably set to 1 to enhance the model's ability to retain long-term temporal information in the early stages of training. Other bias parameters of convolutional and fully connected layers are initialized to 0. Through the above training parameter settings, the multimodal fusion network can maintain convergence speed while reducing the risks of gradient vanishing, gradient exploding, and unstable training results.

[0162] Examples and experimental results.

[0163] Dataset and Evaluation Metrics. The publicly available REFIT (Real Energy Disaggregation Dataset) load dataset was used for model training and testing. To evaluate the model's decomposition performance on different types of appliances, power data from four appliances with typical operating patterns—washing machines, kettles, dishwashers, and refrigerators—were selected for experiments. The total power sequence was truncated according to a preset window length to construct the sample set. The preprocessed power sequences of the washing machine, kettle, dishwasher, and refrigerator were used as the target appliance labels, and the power of other devices was superimposed with the total power to form the aggregated input for single-target appliance decomposition experiments. The experiments used mean absolute error (MAE), signal aggregation error (SAE), and F1 score as evaluation metrics to determine the model's performance. The test results are shown in Table 1.

[0164] Comparative experiments. The model performance was compared with three methods: BCA-MFN-1D (one-dimensional bidirectional cross-attention multimodal fusion network), BCA-MFN-2D (two-dimensional bidirectional cross-attention multimodal fusion network), and BCA-MFN* (simplified bidirectional cross-attention multimodal fusion network). The performance was comprehensively evaluated using three metrics: mean absolute error (MAE), signal aggregation error (SAE), and F1 score. The results of the comparative experiments are shown in Table 2.

[0165] Comparison of key modules. The comparison results of the two key modules in the 1D time series feature extraction branch are shown in Table 3.

[0166] To verify the decomposition effect of the method of the present invention in complex power consumption scenarios, the following is combined with Figure 2 The present invention will be further described below. To verify the decomposition effect of the method of the present invention in complex power consumption scenarios, the following is combined with... Figure 2 The present invention will be further described. Figure 2 This is a schematic diagram comparing the decomposition results on the global dataset of this invention; Figure 2 (a) in Figure 2 Each graph in (f) corresponds to a different appliance or a different time period, comparing and presenting the aggregated total power, the actual power of the target appliance, and the decomposed power curve output by the model of this invention. Figure 2 As can be seen, the decomposed power curve of the method of the present invention is highly consistent with the real power in terms of waveform trend, amplitude change and start-stop transient. Compared with the traditional method, it can more accurately restore the independent power trajectory of the target electrical appliance, verifying the effectiveness and superiority of the present invention in complex load superposition scenarios.

[0167] Table 1. Test results of families in the global dataset. ;

[0168] Table 2 Ablation results of the multimodal fusion network ;

[0169] Table 3 Ablation results on the time series extraction branch .

Claims

1. A non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion, characterized in that, Includes the following steps: Step 1: Obtain the aggregated total power time series data and segment it according to the sliding window to form samples to be processed; Step 2: Perform discrete wavelet decomposition and reconstruction on the sample to be processed to obtain the original power sequence, approximate components and multiple levels of detail components, which constitute a multi-channel time series representation; Step 3: Based on the approximate components, detail components, and temporal position relationships, construct a two-dimensional wavelet cross-scale event coupling relationship diagram describing the steady-state trend similarity, transient directional coupling, and temporal proximity relationships between different time points; construct steady-state trend similarity and directional relationships based on the differences in approximate components between any two time points; construct transient unidirectional coupling and change direction relationships based on the product and directed difference of detail components at the same level; construct temporal proximity and directed temporal relationships based on time intervals. Multiple relationships are combined along the channels to form a multi-channel two-dimensional relationship diagram; Step 4: Utilize the one-dimensional time series feature extraction branch to perform scale gating and time-series dependency modeling on the multi-channel time series representation to obtain time modal features; utilize the two-dimensional image sequence feature extraction branch to perform relation aggregation on the two-dimensional wavelet cross-scale event coupling relationship graph to obtain event relation modal features; Step 5: Construct an event saliency bias matrix based on the energy and temporal location of detail components, and realize information interaction between temporal modal features and event relationship modal features through a bidirectional cross-attention mechanism; Step 6: Generate modal fusion gating weights based on event saliency and aggregated power conditions, fuse the two types of modal features after bidirectional enhancement, obtain fused features, and output the decomposed power of the target appliance; during the model training phase, construct a physical consistency constraint loss function using the rated maximum power of the target appliance and the aggregated total power measurement value at the corresponding time position, and impose penalties on cases where the predicted power exceeds the rated maximum value or exceeds the aggregated total power.

2. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 1, for the sequence-to-point decomposition task, the fusion feature at the center time position of the sliding window is selected for power mapping; for the sequence-to-sequence decomposition task, the fusion feature at each time position is mapped for power respectively, and the output is the target electrical power sequence with the same length as the input window.

3. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 2, the total number of discrete wavelet decomposition layers is set according to the sliding window length. The reconstructed approximate components and detail components of each layer, together with the original power sequence, serve as the input channels for multi-channel time series representation.

4. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 4, the one-dimensional time series feature extraction branch extracts multi-receptive field local features by using one-dimensional convolution with different dilation factors for the original power sequence, approximate components and detail components of each layer. The scale-gated weights are generated based on the local energy of each component at each time position, and the convolution features are weighted and fused. Then, the features are input into the bidirectional long short-term memory network to obtain the temporal modality features.

5. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 4, the two-dimensional image sequence feature extraction branch calculates the event saliency based on the energy of the detail components at each time position, constructs a relation mask composed of a local neighborhood mask and a long-distance event association mask, aggregates the outward relation features pointing from each time position to other positions and the inward relation features pointing from other positions to each time position under the mask constraint, and obtains the event relation modal features through relation direction gating fusion.

6. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 5, the first direction attention output is obtained by querying the relational modality features with the temporal modality features, and the second direction attention output is obtained by querying the temporal modality features with the relational modality features. The event saliency bias matrix is ​​added to the attention scores of the two directions respectively. Then, the attention output is concatenated with the original feature residuals and normalized to achieve bidirectional enhancement of the two modalities.

7. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 6, the modal fusion gating weights are generated based on the event saliency and the normalized power condition of the aggregated total power at the current time position relative to the rated maximum power of the target electrical appliance, so as to adaptively adjust the contribution ratio of time mode and event relationship mode in the fusion features.

8. The non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 6, the physical consistency constraint loss function includes a basic error term, a rated power out-of-bounds penalty term, and a aggregated power out-of-bounds penalty term. The rated power out-of-bounds penalty term penalizes the predicted power for exceeding the rated maximum power of the target appliance, and the aggregated power out-of-bounds penalty term penalizes the predicted power for exceeding the measured aggregated total power value at the corresponding time position.

9. A non-invasive load decomposition method based on bidirectional cross-attention multimodal fusion according to claim 1, characterized in that, In step 6, gradient clipping and early stopping strategies are used during model training to enhance training stability and prevent overfitting.

Citation Information

Patent Citations

  • Active power distribution network intelligent soft switch planning system based on generative adversarial network

    CN121689193A

  • Method and system for predicting the power load of an energy storage system

    JP7832407B1