A statistical driving multi-scale fusion attention non-stationary load non-intrusive identification method

By constructing a statistically driven multi-scale fusion attention mechanism, the problem of insufficient robustness of traditional non-intrusive load identification methods in non-stationary and high-noise scenarios is solved. This mechanism enables multi-scale feature capture and long-term dependency modeling of load sequences, thereby improving the accuracy and stability of appliance identification.

CN121659039BActive Publication Date: 2026-05-26CHINA JILIANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA JILIANG UNIV
Filing Date
2026-02-05
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional non-invasive load identification methods lack accuracy and robustness in handling non-stationary, high-noise scenarios, and struggle to effectively capture multi-scale local features and long-term dependencies in load sequences.

Method used

A statistically driven multi-scale fusion attention mechanism is adopted. Through a multi-scale temporal feature extraction module, a feature enhancement channel attention module, and a statistically enhanced temporal coding module, combined with a multi-layer Transformer encoder, a non-stationary load non-intrusive recognition model is constructed to capture local dynamic change patterns and enhance the ability to express channel features and model long-term dependencies.

Benefits of technology

It significantly improves the robustness and accuracy of the model in identifying non-stationary load signals, effectively handles appliance identification in complex power consumption scenarios, reduces noise interference, and improves the practical usability and accuracy of the identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659039B_ABST
    Figure CN121659039B_ABST
Patent Text Reader

Abstract

The application provides a non-stationary load non-intrusive identification method based on statistical driving multi-scale fusion attention, which combines multi-scale feature fusion and attention mechanism, and effectively deals with complex changes and noise interference in a non-stationary load signal through a statistical information driven feature extraction module. The method mainly comprises a multi-scale time sequence feature extraction module, a feature enhancement channel attention module, a statistical enhancement time sequence coding module and a load identification output module, and the best model obtained after training is used to obtain a load identification result. The method extracts multi-level load features through multi-scale convolution and dilated residual units, improves the feature representation capability by combining the channel attention mechanism, and enhances the modeling of long-time dependent features by using the Transformer encoder structure, so that the accurate identification of the non-stationary load is effectively realized. The application realizes high-precision identification and decomposition of historical load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of non-intrusive load monitoring and identification technology, specifically relating to a non-intrusive load identification method based on a statistically driven multi-scale fusion attention mechanism. Background Technology

[0002] Non-intrusive load identification is a core technology in intelligent electricity consumption analysis. It decomposes and identifies electrical equipment by analyzing total user load data, which is crucial for energy efficiency management, demand response, and fault diagnosis. With the increasing diversification of electrical equipment and the growing complexity of electricity consumption behavior, load signals exhibit strong non-stationarity, multi-scale fluctuations, and high noise interference, posing a significant challenge to traditional identification methods. Currently, mainstream load identification methods mainly include steady-state feature matching-based methods, event detection-based methods, and the end-to-end identification models based on deep learning that have emerged in recent years. Steady-state feature matching methods rely on steady-state power changes during appliance start-up and shutdown, but they are poorly adapted to power overlap, transient processes, and non-stationary loads. Event detection methods are sensitive to noise, and their identification performance is limited when low-power appliances are running concurrently. While deep learning models (such as CNN, LSTM, and Seq2Seq) can automatically extract load features, they still suffer from insufficient capture of multi-scale local features, inadequate modeling of long-term dependencies, and insufficient utilization of channel feature interactions when processing non-stationary load sequences. For example, convolutional neural networks (CNNs) can effectively extract local features, but their ability to model global dependencies in long sequences is limited; recurrent neural networks (RNNs), while capable of handling sequence dependencies, are susceptible to gradient vanishing or exploding and lack sensitivity to high-frequency transient features; and while the Transformer architecture has advantages in long-range dependency modeling, it still does not fully utilize local multi-scale patterns and inter-channel correlations in load sequences. Furthermore, most existing methods neglect the enhancing representation effect of temporal statistical properties (such as mean and variance) in load sequences on load patterns, leading to decreased recognition accuracy and robustness in non-stationary, high-noise scenarios. Summary of the Invention

[0003] The purpose of this invention is to provide a non-intrusive non-stationary load identification method driven by statistical multi-scale fusion attention, in order to solve the technical problem of insufficient robustness in traditional non-intrusive load identification methods.

[0004] To address the aforementioned technical problems, the specific technical solution of the non-stationary load non-intrusive recognition method of statistically driven multi-scale fusion attention according to the present invention is as follows:

[0005] A non-intrusive recognition method for non-stationary loads driven by statistical multi-scale fusion attention includes the following steps:

[0006] Step 1: Obtain the user load dataset containing the total load power sequence, corresponding timestamp information, and independent load data for each appliance;

[0007] Step 2: Preprocess the acquired dataset, construct the total load sequence and periodic time embedding features, and divide it into training set, validation set and test set according to the user;

[0008] Step 3: Build a non-stationary, non-intrusive recognition model with statistically driven multi-scale fusion attention;

[0009] Step 4: Use the training set and validation set obtained in Step 2 to train the non-stationary load non-intrusive recognition network, select the model with the minimum validation loss on the validation set as the best model, and use the test set to evaluate its recognition performance.

[0010] Step 5: Input the historical total load sequence of the user to be identified into the completed load identification model, and output the time-step load power identification result of the target home appliance.

[0011] Furthermore, the dataset in step 2 includes the total load power sequence and its timestamps collected at a uniform sampling interval, and constructs sine and cosine periodic time embedding features generated at different time scales based on the timestamps.

[0012] Furthermore, the recognition model described in step 3 includes a multi-scale temporal feature extraction module, a feature enhancement channel attention module, a statistical enhancement temporal coding module, and a load recognition output module. Each module is used to perform the following steps:

[0013] Step 3.1: The input total load sequence is normalized by the multi-scale temporal feature extraction module, and the feature extraction network composed of multi-scale convolution module and dilated residual unit is used to mine the local change pattern of load signal at different time scales. At the same time, the periodic time embedding generated by the timestamp is mapped to the same feature dimension and fused with the convolution feature to obtain an enhanced temporal feature expression.

[0014] Step 3.2: Multi-scale temporal features are weighted by channel through the feature enhancement channel attention module, global average pooling is used to extract global channel information, a fully connected layer is used to realize the interaction between channels, channel attention weights are generated, and the features are enhanced by weighting.

[0015] Step 3.3: Construct a statistical information encoding vector obtained by mapping normalized mean and standard deviation through the statistically enhanced temporal coding module, and concatenate it with the weighted feature sequence obtained in Step 3.2. At the same time, learnable positional encoding is added. Then, a multi-layer Transformer encoder is used to perform global correlation modeling on the sequence, capture long-term dependent features and generate a deep load representation.

[0016] Step 3.4: Input the time-series deep features output in Step 3.3 into the load identification output module, use one-dimensional convolution to predict the load power of the target appliance at each time step, and use the inverse normalization parameters generated by the statistical information token to restore the prediction results to obtain the final load identification output.

[0017] Furthermore, step 3.1 includes the following steps:

[0018] Step 3.1.1: Process the input total load power sequence Instance-level normalization is performed, and the sequence mean μ and standard deviation σ are calculated to convert the original sequence into a normalized sequence. ;

[0019] Step 3.1.2: Normalize the sequence The input multi-scale feature extraction unit consists of a four-level cascaded structure, with each level including a multi-scale convolutional submodule. and an expansion residual submodule First, the multi-scale convolutional submodule uses convolutional kernels with kernel sizes of 3, 5, and 7 to extract temporal features at different scales in parallel.

[0020] Step 3.1.3: The obtained multi-scale temporal features are input into the dilated residual submodule. This module introduces dilation rate in the convolution to expand the receptive field and uses residual connections to stabilize training.

[0021] Furthermore, step 3.1 also includes the following steps:

[0022] Step 3.1.4: In the four-level cascaded structure, the output of the second level is projected through one-dimensional convolution and then residually connected with the output of the fourth level to achieve cross-group feature fusion and obtain multi-scale load features;

[0023] Step 3.1.5: Map the timestamp information to the feature space to obtain the temporal embedding features; Step 3.1.6: Concatenate the multi-scale load features with the temporal embedding features, and obtain the multi-scale temporal features through residual connections. .

[0024] Furthermore, step 3.2 includes the following steps:

[0025] Step 3.2.1: Adjust the input features into a four-dimensional tensor ;

[0026] Step 3.2.2: Calculate the L2 norm of each channel across the entire spatial dimension as the global context representation of that channel, and correlate it with the learnable channel embedding weights. Multiplying them together yields the channel-level context vector. ;

[0027] Step 3.2.3: Analyze the global context vector Perform L2 normalization across channels to generate a weight vector representing the relative importance of each channel. Step 3.2.4: Perform an affine transformation on the normalized channel weights, constrain them to a smooth range using an activation function, and obtain the gating coefficients for each channel through residual connections. Step 3.2.5: Obtain the gating coefficients Compared with the original input features Perform channel-by-channel multiplication to obtain the enhanced output features. Finally, output features The dimensions are restored to match the input. Consistent.

[0028] Furthermore, step 3.3 includes the following steps:

[0029] Step 3.3.1: Output features of the channel attention module With periodic feature encoding By performing fusion, fusion characteristics are obtained. Furthermore, it supplements temporal position information through shape transformation and position encoding;

[0030] Step 3.3.2: Take the mean of the sequence obtained in step 3.1.1. and standard deviation Row concatenation, followed by linear projection encoding, results in a statistical feature encoding vector. , splice to the end of the enhanced feature;

[0031] Step 3.3.3: Enhance the temporal features Input a multi-layer Transformer encoder, perform layer normalization on the input features to stabilize the training process, and project the normalized features into query Q, key K, and value V through a learnable matrix;

[0032] Step 3.3.4: Calculate the similarity between Q and K to obtain the attention score. Diagonal masks are applied to enhance the capture of temporal local dependencies. After normalization, the input features are weighted and summed with V to obtain the attention output, which is then fused with the input features through residual connections.

[0033] Step 3.3.5: Output of the attention layer Secondary normalization is performed to prepare for subsequent residual attention score accumulation and gating mechanism.

[0034] Furthermore, step 3.3 also includes the following steps:

[0035] Step 3.3.6: Perform Q, K, V projection on the normalized features again and calculate the attention score of the current layer;

[0036] Step 3.3.7: Add the attention score of the current layer to the historical accumulated attention score to enhance the ability to model long-term dependencies. Finally, obtain the residual attention output through weighted summation. ;

[0037] Step 3.3.8: The gated features are segmented into a gated signal G and a control signal C through a linear layer. The control signal is activated by a Sigmoid function and then multiplied element-wise with the gated signal to achieve adaptive selection and enhancement of features. Finally, the features are fused to the attention output through residual connections and Dropout.

[0038] Step 3.3.9: Expand the dimensionality of the gated output features to match the dimensionality of the residual attention output features, and fuse the gated features by element-wise addition. The residual attention features output from step 3.3.7 The final output of the statistically enhanced temporal coding module is obtained. ;

[0039] Step 3.3.10: From the final output tensor Extract the statistical feature encoding vector after the last layer of encoding. This is used for subsequent inverse normalization parameter generation.

[0040] Furthermore, step 3.4 includes the following steps:

[0041] Step 3.4.1: From the output features of the Transformer encoder, remove the statistical feature encoding vectors at the end, retaining the deep features of the pure temporal dimension. ;

[0042] Step 3.4.2: Perform dimensionality rearrangement on the pure temporal deep features, input them into a one-dimensional convolutional layer, and use mirror padding to maintain the sequence length consistent with the input, mapping them to the normalized power sequence of the target appliance; Step 3.4.3: For the feature encoding vector output by the statistically enhanced temporal coding module... The inverse normalization parameters are obtained through linear transformation. Then extract the true mean from them. and true standard deviation And restore the normalized power to the actual power value of the appliance. ;

[0043] Furthermore, step 4 includes the following steps:

[0044] The prediction model is trained using the training set, and then used to perform inference on the validation set. The model performance is verified using two evaluation metrics: mean absolute error (MAE) and match rate (MR). The model that performs best on the validation set is selected as the best model, and the performance of the best model is evaluated using the test set.

[0045] The non-stationary load non-invasive recognition method of statistically driven multi-scale fusion attention proposed in this invention has the following advantages:

[0046] (1) By constructing a multi-scale temporal feature extraction module and combining parallel multi-scale convolution and dilated residual units, this invention can effectively capture the local dynamic change patterns of non-stationary load signals at different time granularities, and significantly improve the model's ability to jointly perceive short-term mutations and long-term steady-state features.

[0047] (2) The present invention introduces a feature enhancement channel attention module, which enhances the expressive power of key feature channels by performing channel-level global context modeling and adaptive weighting on multi-scale features, suppresses the interference of noise and redundant information, and thus improves the robustness of the model in complex power consumption scenarios.

[0048] (3) The present invention designs a statistical enhancement time series coding module, which encodes the statistical information (mean, standard deviation) of the sequence into a feature vector and deeply integrates it with the time series features, providing important distribution prior knowledge for the model, enhancing the model's ability to model the overall fluctuation characteristics of the load, and improving the recognition stability under non-stationary and high noise conditions.

[0049] (4) The present invention integrates an improved Transformer structure into the statistically enhanced temporal coding module. Through residual attention score accumulation and gating mechanism, it enhances the model’s ability to model long-term dependencies, while avoiding the problem of local information fading that may exist in traditional self-attention mechanism in load sequence modeling.

[0050] (5) This invention adopts a progressive fusion architecture from multi-scale local feature extraction to channel attention enhancement and then to global temporal coding, realizing hierarchical information processing from details to the whole and from feature selection to dependency modeling, effectively improving the discriminative power of the load feature representation. (6) In the decoding output stage, this invention uses the statistical feature vectors saved in the encoding process to dynamically generate inverse normalization parameters, realizing end-to-end adaptive power restoration, avoiding the dependence on manual parameter setting, and improving the actual usability and accuracy of the recognition results. Attached Figure Description

[0051] Figure 1 This is a flowchart of a non-stationary, non-intrusive recognition method for statistically driven multi-scale fusion attention;

[0052] Figure 2 This is a structural diagram of a non-stationary load non-intrusive identification network model;

[0053] Figure 3 This is a structural diagram of the multi-scale temporal feature extraction module;

[0054] Figure 4 This is a structural diagram of the feature enhancement channel attention module;

[0055] Figure 5 This is a structural diagram of the statistically enhanced temporal coding module;

[0056] Figure 6 This is a structural diagram of the load identification output module. Detailed Implementation

[0057] To better understand the purpose, structure, and function of this invention, the following detailed description, in conjunction with the accompanying drawings, provides a non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention.

[0058] like Figure 1 As shown, the present invention provides a non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention, comprising the following steps:

[0059] Step 1: Obtain the user load dataset containing the total load power sequence, corresponding timestamp information, and independent load data for each appliance;

[0060] Step 2: Preprocess the acquired dataset, construct the total load sequence and periodic time embedding features, and divide it into training set, validation set and test set according to the user; the dataset includes the total load power sequence and its timestamps collected under a uniform sampling interval, and constructs sine and cosine periodic time embedding features generated by different time scales based on the timestamps.

[0061] Step 3: Build a non-stationary, non-intrusive recognition model with statistically driven multi-scale fusion attention;

[0062] like Figure 2 As shown, the statistically driven multi-scale fusion attention non-stationary load non-intrusive recognition network model includes a multi-scale temporal feature extraction module, a feature enhancement channel attention module, a statistically enhanced temporal coding module, and a load recognition output module. Each module is used to perform the following steps:

[0063] Step 3.1: As Figure 3As shown, the input total load sequence is normalized by a multi-scale temporal feature extraction module, and the local variation patterns of the load signal at different time scales are mined by a feature extraction network composed of a multi-scale convolution module and a dilated residual unit. At the same time, the periodic time embedding generated by the timestamp is mapped to the same feature dimension and fused with the convolutional features to obtain an enhanced temporal feature expression.

[0064] Step 3.1.1: Process the input total load power sequence Perform instance-level normalization and calculate the sequence mean. and standard deviation Convert the original sequence into a normalized sequence. The specific expression is as follows:

[0065]

[0066]

[0067]

[0068] in, For sequence length, It is a very small constant to prevent division by zero errors.

[0069] Step 3.1.2: Normalize the sequence The input multi-scale feature extraction unit consists of a four-level cascaded structure, with each level including a multi-scale convolutional submodule. and an expansion residual submodule ,in First, the multi-scale convolutional submodule uses convolutional kernels with kernel sizes of 3, 5, and 7 to extract temporal features at different scales in parallel. The specific expression is as follows:

[0070]

[0071] in, Indicates the first In the multi-scale convolutional submodule, local temporal features are extracted using a convolutional kernel of size k. This indicates a splicing operation. It is an activation function. This indicates a batch normalization operation. This represents a one-dimensional convolution operation with a kernel size of k.

[0072] Step 3.1.3: Input the obtained multi-scale temporal feature into the dilated residual submodule This module introduces dilation in convolution. Expand the receptive field and use residual connections to stabilize training. The specific expression is as follows:

[0073]

[0074] in, Indicates the expansion rate One-dimensional convolution, It is an activation function.

[0075] Step 3.1.4: In the four-level cascaded structure, the output of the second level is projected through one-dimensional convolution and then residually connected with the output of the fourth level to achieve cross-group feature fusion and obtain multi-scale load features. The specific expression is as follows:

[0076]

[0077] Step 3.1.5: Map the timestamp information to the feature space to obtain the time embedding features. The specific expression is as follows:

[0078]

[0079] in, It is the original timestamp information.

[0080] Step 3.1.6: Concatenate the multi-scale load features with the temporal embedding features, and obtain the multi-scale temporal features through residual connections. The specific expression is as follows:

[0081]

[0082] in, It is an activation function. It is the normalized initial input.

[0083] Step 3.2: As Figure 4 As shown, the feature enhancement channel attention module performs channel weighting on multi-scale temporal features, global average pooling extracts global channel information, and a fully connected layer realizes the interaction between channels, generates channel attention weights, and enhances the features through weighting.

[0084] Step 3.2.1: Adjust the input features into a four-dimensional tensor The specific expression is as follows:

[0085]

[0086] in, Dimension adjustment operation.

[0087] Step 3.2.2: Calculate the L2 norm of each channel across the entire spatial dimension as the global context representation of that channel, and correlate it with the learnable channel embedding weights. Multiplying them together yields the channel-level context vector. The specific expression is as follows:

[0088] in, This indicates that the sub-tensor corresponding to the c-th channel is extracted. It is an L2 norm calculation. The time step dimension of the subtensor. It is the feature dimension length.

[0089] Step 3.2.3: Analyze the global context vector Perform L2 normalization across channels to generate a weight vector representing the relative importance of each channel. The specific expression is as follows:

[0090]

[0091] Step 3.2.4: Perform an affine transformation on the normalized channel weights, constrain them to a smooth range using an activation function, and obtain the gating coefficients for each channel through residual connections. The specific expression is as follows:

[0092]

[0093] in, For activation function, This represents element-wise multiplication. and It consists of learnable gating weights and gating biases.

[0094] Step 3.2.5: Obtain the gating coefficients Compared with the original input features Perform channel-by-channel multiplication to obtain the enhanced output features. Finally, output features The dimensions are restored to match the input. Consistency, specifically expressed as follows:

[0095]

[0096]

[0097] Step 3.3: As Figure 5As shown, a statistical information encoding vector obtained by mapping normalized mean and standard deviation is constructed through the statistical enhancement temporal coding module, and concatenated with the weighted feature sequence obtained in step 3.2. At the same time, a learnable positional encoding is added. Then, a multi-layer Transformer encoder is used to perform global correlation modeling on the sequence, capture long-term dependent features, and generate a deep load representation.

[0098] The proposed statistically enhanced temporal coding module performs the following steps:

[0099] Step 3.3.1: Convert the output features of the channel attention module With periodic feature encoding By performing fusion, fusion characteristics are obtained. Furthermore, temporal position information is supplemented through shape transformation and position encoding, as specifically expressed below:

[0100]

[0101] in, Encoding the periodic features after projection, , These are the parameters of the projection layer. It is a periodic feature. This indicates a dimension rearrangement operation. It is a learnable positional encoding.

[0102] Step 3.3.2: Take the mean of the sequence obtained in step 3.1.1. and standard deviation The vectors are concatenated and encoded into statistical feature codes via linear projection. This is concatenated to the end of the enhanced feature, as shown in the following specific expression:

[0103]

[0104] in, , For weights and biases.

[0105] Step 3.3.3: Enhance the temporal features The input features are normalized layer by layer to stabilize the training process by inputting a multi-layer Transformer encoder. The normalized features are then projected into query Q, key K, and value V using a learnable matrix, as shown below:

[0106]

[0107]

[0108]

[0109] in, The number of layers in the Transformer encoder. It is a layer normalization operation. , , It is the first The learnable projection matrix of the layer encoder.

[0110] Step 3.3.4: Calculate the similarity between Q and K to obtain the attention score. Diagonal masks are applied to enhance the capture of temporal local dependencies. After normalization, the input features are weighted and summed with V to obtain the attention output. Then, the input features are fused through residual connections. The specific expression is as follows:

[0111]

[0112] in, It is the feature dimension of the key vector q in multi-head attention, and T is the matrix transpose. It is a diagonal mask matrix, with 1s on the main diagonal and 0s on the rest. For activation function, It is the encoder number Attention output of the layer It is a very large positive number. This is equivalent to imposing a very large negative penalty on the mask position, causing the attention weight at the corresponding position to approach 0 after the Softmax operation. It is a regularization operation.

[0113] Step 3.3.5: Output of the attention layer A second normalization is performed to prepare for the subsequent accumulation of residual attention scores and gating mechanisms. The specific expression is as follows:

[0114]

[0115] Step 3.3.6: Perform Q, K, V projections again on the normalized features and calculate the attention score for the current layer, as shown in the following expression:

[0116]

[0117]

[0118]

[0119] in, , , It is the first Q, K, and V projections of layer residual attention.

[0120] Step 3.3.7: Add the attention score of the current layer to the historical accumulated attention score to enhance the ability to model long-term dependencies. Finally, obtain the residual attention output through weighted summation. The specific expression is as follows:

[0121]

[0122] in, It is the historical cumulative attention score, and its value is 0 when f is 0.

[0123] Step 3.3.8: The gated features are segmented into a gated signal (G) and a control signal (C) through a linear layer. The control signal is activated by a sigmoid function and then multiplied element-wise with the gated signal to achieve adaptive feature selection and enhancement. Finally, the features are fused to the attention output through residual connections and Dropout. The specific expression is as follows:

[0124]

[0125]

[0126] in, This represents the operation of splitting the data into two parts along the feature dimension. It is a learnable linear matrix of the f-th layer gating mechanism. , They are the first Layer gating signals and control signals, For activation function, These are enhanced features after gating and filtering. It is the output feature of the (f+1)th layer encoder.

[0127] Step 3.3.9: Expand the dimensionality of the gated output features to match the dimensionality of the residual attention output features, and fuse the gated features by element-wise addition. Residual attention features of the output in section 3.3.7 The final output of the statistically enhanced temporal coding module is obtained. The specific expression is as follows:

[0128] in, It is a learnable linear matrix used for gating output dimension expansion.

[0129] Step 3.3.10: From the final output tensor Extract the statistical feature encoding vector after the last layer of encoding. This is used for subsequent inverse normalization parameter generation, and its specific expression is as follows:

[0130]

[0131] in, This represents the statistical feature encoding vector extracted from the last layer of encoding in x.

[0132] Step 3.4: Input the time-series deep features output in Step 3.3 into the load identification output module, use one-dimensional convolution to predict the load power of the target appliance at each time step, and use the inverse normalization parameters generated by the statistical information token to restore the prediction results to obtain the final load identification output.

[0133] The proposed load identification output module is used to perform the following steps:

[0134] Step 3.4.1: From the output features of the Transformer encoder, remove the statistical feature encoding vectors at the end, retaining the deep features of the pure temporal dimension. The specific expression is as follows:

[0135] in, This means removing the second parameter from the first parameter.

[0136] Step 3.4.2: Perform dimensionality rearrangement on the pure temporal deep features, input them into a one-dimensional convolutional layer, and use mirror padding to maintain the sequence length consistent with the input, mapping them to the normalized power sequence of the target electrical appliance. The specific expression is as follows:

[0137]

[0138] in, This indicates that the convolution uses mirror padding.

[0139] Step 3.4.3: For the feature coding vector output by the statistically enhanced temporal coding module The inverse normalization parameters are obtained through linear transformation. Then extract the true mean from them. and true standard deviation And restore the normalized power to the actual power value of the appliance. .

[0140]

[0141]

[0142] in, It is a linear transformation operation. This represents extracting the feature of the d-th dimension from tensor X. and These are the true mean and true standard deviation of the b-th sequence obtained from decoding.

[0143] Step 4: Use the training set and validation set obtained in Step 2 to train the load recognition network, select the model with the minimum validation loss on the validation set as the best model, and use the test set to evaluate its recognition performance.

[0144] Step 4 uses the training set to train the built prediction model, and then uses the trained model to perform inference on the validation set. The model performance is verified using two evaluation metrics: Mean Absolute Error (MAE) and Match Rate (MR). The model that performs best on the validation set is selected as the optimal model, and the performance of the optimal model is evaluated using the test set. The specific expression is as follows:

[0145]

[0146]

[0147] Where N is the number of samples in the test set. This is the actual power value of the target appliance for the b-th sample at time step t. It is the model predicted power value of the b-th sample at time step t. and These are used to take the smaller and larger values ​​of the predicted power and the actual power of the b-th sample at time step t, respectively.

[0148] Step 5: Input the historical total load sequence of the user to be identified into the completed load identification model, and output the time-step load power identification result of the target home appliance.

[0149] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention, characterized in that, Includes the following steps: Step 1: Obtain the user load dataset containing the total load power sequence, corresponding timestamp information, and independent load data for each appliance; Step 2: Preprocess the acquired dataset, construct the total load sequence and periodic time embedding features, and divide it into training set, validation set and test set according to the user; Step 3: Construct a non-stationary load non-intrusive recognition model driven by statistical multi-scale fusion attention; the recognition model includes a multi-scale temporal feature extraction module, a feature enhancement channel attention module, a statistical enhancement temporal coding module, and a load recognition output module. Each module is used to perform the following steps: Step 3.1: The input total load sequence is normalized by the multi-scale temporal feature extraction module, and the feature extraction network composed of multi-scale convolutional modules and dilated residual units is used to mine the local change patterns of the load signal at different time scales. At the same time, the periodic time embedding generated by the timestamp is mapped to the same feature dimension and fused with the convolutional features to obtain an enhanced temporal feature expression. Step 3.2: Multi-scale temporal features are weighted by channel through the feature enhancement channel attention module, global average pooling is used to extract global channel information, a fully connected layer is used to realize the interaction between channels, channel attention weights are generated, and the features are enhanced by weighting. Step 3.3: Construct a statistical information encoding vector obtained by mapping normalized mean and standard deviation through the statistically enhanced temporal coding module, and concatenate it with the weighted feature sequence obtained in Step 3.

2. At the same time, learnable positional encoding is added. Then, a multi-layer Transformer encoder is used to perform global correlation modeling on the sequence, capture long-term dependent features and generate a deep load representation. Step 3.4: Input the time-series deep features output in Step 3.3 into the load identification output module, and use one-dimensional convolution to predict the load power of the target electrical appliance at each time step. Then, use the inverse normalization parameters generated by the statistical information token to restore the prediction results and obtain the final load identification output. Step 4: Use the training set and validation set obtained in Step 2 to train the non-stationary load non-intrusive recognition network, select the model with the minimum validation loss on the validation set as the best model, and use the test set to evaluate its recognition performance. Step 5: Input the historical total load sequence of the user to be identified into the completed load identification model, and output the time-step load power identification result of the target home appliance.

2. The non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention according to claim 1, characterized in that, The dataset in step 2 includes the total load power sequence and its timestamps collected at a uniform sampling interval, and constructs sine and cosine periodic time embedding features generated at different time scales based on the timestamps.

3. The non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention according to claim 1, characterized in that, Step 3.1 includes the following steps: Step 3.1.1: Process the input total load power sequence Instance-level normalization is performed, and the sequence mean μ and standard deviation σ are calculated to convert the original sequence into a normalized sequence. ; Step 3.1.2: Normalize the sequence The input multi-scale feature extraction unit consists of a four-level cascaded structure, with each level including a multi-scale convolutional submodule. and an expansion residual submodule First, the multi-scale convolutional submodule uses convolutional kernels with kernel sizes of 3, 5, and 7 to extract temporal features at different scales in parallel. Step 3.1.3: The obtained multi-scale temporal features are input into the dilated residual submodule. This module introduces dilation rate in the convolution to expand the receptive field and uses residual connections to stabilize training.

4. The non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention according to claim 3, characterized in that, Step 3.1 further includes the following steps: Step 3.1.4: In the four-level cascaded structure, the output of the second level is projected through one-dimensional convolution and then residually connected with the output of the fourth level to achieve cross-group feature fusion and obtain multi-scale load features; Step 3.1.5: Map the timestamp information to the feature space to obtain the time embedding features; Step 3.1.6: Concatenate the multi-scale load features with the temporal embedding features, and obtain the multi-scale temporal features through residual connections. .

5. The non-stationary load non-invasive recognition method for statistically driven multi-scale fusion attention according to claim 1, characterized in that, Step 3.2 includes the following steps: Step 3.2.1: Adjust the input features into a four-dimensional tensor ; Step 3.2.2: Calculate the L2 norm of each channel across the entire spatial dimension as the global context representation of that channel, and correlate it with the learnable channel embedding weights. Multiplying them together yields the channel-level context vector. ; Step 3.2.3: Analyze the global context vector Perform L2 normalization across channels to generate a weight vector representing the relative importance of each channel. ; Step 3.2.4: Perform an affine transformation on the normalized channel weights, constrain them to a smooth range using an activation function, and obtain the gating coefficients for each channel through residual connections. ; Step 3.2.5: Obtain the gating coefficients Compared with the original input features Perform channel-by-channel multiplication to obtain the enhanced output features. Finally, output features The dimensions are restored to match the input. Consistent.

6. The non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention according to claim 1, characterized in that, Step 3.3 includes the following steps: Step 3.3.1: Output features of the channel attention module With periodic feature encoding By performing fusion, fusion characteristics are obtained. Furthermore, it supplements temporal position information through shape transformation and position encoding; Step 3.3.2: Take the mean of the sequence obtained in step 3.1.

1. and standard deviation Row concatenation, followed by linear projection encoding, results in a statistical feature encoding vector. , splice to the end of the enhanced feature; Step 3.3.3: Enhance the temporal features Input a multi-layer Transformer encoder, perform layer normalization on the input features to stabilize the training process, and project the normalized features into query Q, key K, and value V through a learnable matrix; Step 3.3.4: Calculate the similarity between Q and K to obtain the attention score. Diagonal masks are applied to enhance the capture of temporal local dependencies. After normalization, the input features are weighted and summed with V to obtain the attention output, which is then fused with the input features through residual connections. Step 3.3.5: Output of the attention layer Secondary normalization is performed to prepare for subsequent residual attention score accumulation and gating mechanism.

7. The non-stationary load non-invasive recognition method for statistically driven multi-scale fusion attention according to claim 6, characterized in that, Step 3.3 further includes the following steps: Step 3.3.6: Perform Q, K, V projection on the normalized features again and calculate the attention score of the current layer; Step 3.3.7: Add the attention score of the current layer to the historical accumulated attention score to enhance the ability to model long-term dependencies. Finally, obtain the residual attention output through weighted summation. ; Step 3.3.8: The gated features are segmented into a gated signal G and a control signal C through a linear layer. The control signal is activated by a Sigmoid function and then multiplied element-wise with the gated signal to achieve adaptive selection and enhancement of features. Finally, the features are fused to the attention output through residual connections and Dropout. Step 3.3.9: Expand the dimensionality of the gated output features to match the dimensionality of the residual attention output features, and fuse the gated features by element-wise addition. The residual attention features output from step 3.3.7 The final output of the statistically enhanced temporal coding module is obtained. ; Step 3.3.10: From the final output tensor Extract the statistical feature encoding vector after the last layer of encoding. This is used for subsequent inverse normalization parameter generation.

8. The non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention according to claim 1, characterized in that, Step 3.4 includes the following steps: Step 3.4.1: From the output features of the Transformer encoder, remove the statistical feature encoding vectors at the end, retaining the deep features of the pure temporal dimension. ; Step 3.4.2: Perform dimensionality rearrangement on the pure temporal deep features, input them into a one-dimensional convolutional layer, and maintain the sequence length consistent with the input through mirror padding, mapping them to the normalized power sequence of the target electrical appliance; Step 3.4.3: For the feature coding vector output by the statistically enhanced temporal coding module The inverse normalization parameters are obtained through linear transformation. Then extract the true mean from them. and true standard deviation And restore the normalized power to the actual power value of the appliance. .

9. The non-stationary load non-intrusive recognition method for statistically driven multi-scale fusion attention according to claim 1, characterized in that, Step 4 includes the following steps: The prediction model is trained using the training set, and then used to perform inference on the validation set. The model performance is verified using two evaluation metrics: mean absolute error (MAE) and match rate (MR). The model that performs best on the validation set is selected as the best model, and the performance of the best model is evaluated using the test set.