Lightweight cascade load identification method of adaptive equipment and time sequence characteristics
Through the CNN-ELM model combined with convolutional layer and attention mechanism, the efficiency and accuracy problems of decomposing complex power data in non-invasive load monitoring technology are solved, efficient load recognition and lightweight prediction are achieved, and the generalization ability and adaptability of the model are improved.
Patent Information
- Application Number
- CN202510502987.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-05
AI Technical Summary
When the types and quantities of electrical appliances increase, the efficiency and accuracy of decomposing complex power data is limited, and the complexity of the model increases, resulting in poor scalability. The deep learning model faces the problem of gradient disappearance when processing long-sequence data, which affects the decomposition performance.
A non-invasive load monitoring model based on CNN-ELM is used, combined with convolutional layer, attention mechanism and extreme learning machine (ELM) for pre-training and optimization. Features are extracted through convolutional layer, attention mechanism is used to strengthen the expression of key features, and lightweight prediction is performed through the ELM layer.
It improves the accuracy and efficiency of the model, reduces the computational burden, improves the generalization ability and adaptability of the model, and is suitable for non-invasive load decomposition tasks, meeting the needs of real-time and resource-constrained environments.
Smart Images

Figure CN120429686A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems and load detection, and in particular to a lightweight cascade load identification method based on adaptation equipment and timing characteristics. Background Art
[0002] The continued development of smart grids is driving the widespread adoption of interactive, intelligent electricity consumption models. Load monitoring, as a key technology, plays a vital role in the implementation of smart grids. However, while intrusive load monitoring technology can provide highly accurate and reliable data, its complex hardware circuitry and high cost have limited its widespread adoption, resulting in relatively low user acceptance and, to a certain extent, restricting its widespread application.
[0003] Non-Intrusive Load Monitoring (NILM) is a technology that uses blind decomposition of bus power signals to estimate the energy consumption of individual appliances in a home using a single sensor. Due to its ease of installation and low cost, NILM has become the preferred technology for home load monitoring.
[0004] Non-intrusive load monitoring currently faces many challenges. First, with the increase in the number and variety of electrical appliances, the efficiency and accuracy of existing methods in decomposing complex power data are limited. Appliances with small state changes and power fluctuations have an adverse effect on decomposition accuracy, and the complexity of the model increases significantly with the increase in the number of appliances, resulting in poor scalability and low processing efficiency. Second, existing deep learning models often face the problem of vanishing gradients when processing long sequences of data, which affects the decomposition performance. At the same time, although the introduction of methods such as the attention mechanism has improved some results, there are still problems such as sensitivity to input order and difficulty in capturing the temporal correlation between different operating states of appliances.
[0005] Therefore, how to improve the generalization ability and adaptability of the model while ensuring accuracy and efficiency remains a key issue that needs to be solved in the NILM field. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a lightweight cascade load identification method that adapts to equipment and timing characteristics, so as to solve the problems of low prediction accuracy, poor model generalization and high computational burden of current non-invasive load monitoring technology.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A lightweight cascade load identification method adapted to equipment and timing characteristics includes the following steps:
[0009] S1. Preprocessing the collected user load data;
[0010] S2. Establish a non-intrusive load monitoring model based on CNN-ELM, and use the non-intrusive load monitoring model based on CNN-ELM to pre-train the power of a certain load;
[0011] In the pre-training phase, the convolutional layer adjusts its weights through back-propagation. Each convolutional layer extracts features through a sliding window, and uses the ReLU activation function to perform nonlinear transformation on the convolutional layer output. The trained CNN convolutional layer weights and the parameters of the attention mechanism are set as the initial weights of the entire network.
[0012] S3. Optimizing the prediction performance of the CNN-ELM-based non-intrusive load monitoring model for different load powers using an attention mechanism to obtain non-intrusive load monitoring results.
[0013] The non-intrusive load monitoring model based on CNN-ELM takes as input a normalized bus power sequence and aims to predict the power of a load in the bus power sequence. It includes a convolutional layer, an attention module, and an ELM layer.
[0014] The normalized bus power sequence extracts multi-level feature representations through the convolution layer. Then, the channel attention mechanism improves the expression of key feature channels by weighting different channels. The spatial attention mechanism helps the model focus on features at key moments by weighting the importance of different positions. Finally, the features after convolution and attention processing are linearly transformed through the ELM layer to generate the final prediction results.
[0015] A further improvement of the technical solution of the present invention is that in S1, the preprocessing method includes normalizing the user load data, specifically:
[0016]
[0017] Where: p norm is the normalized power value, and p norm ∈[-1,1];P t 、 σ are the power value, total power mean and standard deviation at time t respectively.
[0018] A further improvement of the technical solution of the present invention is that: in S2, the convolution layer is pre-trained. Specifically, in a one-dimensional convolution layer, a series of convolution kernels are convolved along the input sequence data, and then the bias is appended to the output, and a nonlinear activation function is applied to the result; each convolution kernel slides on the input sequence and calculates the local weighted sum, and the output result is a feature map processed by the activation function:
[0019]
[0020] Among them, b ij represents the bias term of the j-th feature map of the i-th layer, Represents the weight value of the j-th feature map in the i-th layer in the convolution kernel, It represents the activation value of the δth feature map of the previous layer at position m+p, and is trained using the backpropagation algorithm. The convolution kernel weights and biases in the network are updated by the gradient descent method. The convolution layer adjusts its weights through backpropagation. Each convolution layer extracts features through a sliding window, and uses the ReLU activation function to perform a nonlinear transformation on the convolution layer output. The trained CNN convolution layer weights and the parameters of the attention mechanism are set as the initial weights of the entire network.
[0021] A further improvement of the technical solution of the present invention is that S3 specifically includes the following steps:
[0022] S31 attention mechanism optimization;
[0023] Attention mechanism optimization includes two parts: channel attention mechanism and spatial attention mechanism;
[0024] S32 performs linear transformation through the ELM layer to generate the final prediction result.
[0025] A further improvement of the technical solution of the present invention is that S31 specifically includes the following steps:
[0026] S311 channel attention mechanism optimization;
[0027] The channel attention module first extracts the statistical features of each channel through global average pooling and global maximum pooling; next, it uses a shared fully connected layer to map this extracted information to generate corresponding channel weights; finally, it uses the Sigmoid activation function to normalize the weights and apply them to each channel of the input feature map;
[0028] The calculation process of the channel attention mechanism is as follows:
[0029] CA(x)=σ(W2·ReLU(W1·(AvgPool(x)+MaxPool(x))))
[0030] Where x represents the input feature map, AvgPool and MaxPool represent global average pooling and maximum pooling operations respectively, W1 and W2 are the weight matrices of channel mapping, ReLU represents the activation function, and σ is the Sigmoid function used to normalize the channel weight to the range [0,1].
[0031] S312 spatial attention mechanism optimization;
[0032] The spatial attention module first calculates the average and maximum values of the feature maps in the channel dimension to generate two single-channel feature maps. Then, these two feature maps are concatenated and a one-dimensional convolution operation is performed through a convolution kernel to obtain a spatial attention weight map. Finally, the generated weights are normalized using the Sigmoid activation function and multiplied element-wise with the original feature map to complete the calculation of the spatial attention mechanism.
[0033] The calculation process of the spatial attention mechanism is as follows:
[0034] SA(x)=σ(Conv1d([Avg(x),Max(x)]))
[0035] Among them, Avg(x) and Max(x) represent the average pooling and maximum pooling operations in the channel dimension respectively, Conv1d is a convolution operation used to generate spatial attention weights, and σ is the Sigmoid function that normalizes the weights to [0, 1].
[0036] In the S313 attention mechanism, the channel attention and spatial attention modules are serially combined to first enhance the features in the channel dimension and then distribute the weights in the spatial dimension. The specific implementation is as follows:
[0037] x′=SA(CA(x)·x)·x
[0038] Among them, CA(x) represents the channel attention weighting of the input feature map, and SA(·)·x represents the further spatial attention weighting on the weighted result.
[0039] A further improvement of the technical solution of the present invention is that S32 specifically includes the following steps:
[0040] S321 uses the ELM network to replace the traditional fully connected layer for linear changes, inputs the features optimized by the attention mechanism into the ELM layer, generates the hidden layer output, and calculates the hidden layer output matrix:
[0041] H: H=σ(Wx+b)
[0042] Where W is the random weight matrix of ELM, x is the feature vector extracted by CNN, b is the bias term, and σ is the activation function;
[0043] S322 calculates the output weight β:
[0044]
[0045] Among them, H + is the pseudo-inverse of the hidden layer output matrix H, and Y is the target label;
[0046] S323 calculates the final prediction result:
[0047]
[0048] Among them, H is the hidden layer output matrix, is the output weight calculated by the least squares method.
[0049] A further improvement of the technical solution of the present invention is that the mean absolute error is used as a performance indicator to measure the accuracy of the model in the power decomposition of each appliance. The mean absolute error represents the average deviation between the predicted power value and the actual power value:
[0050]
[0051] Among them, E MA is MAE, T is the total number of moments in the corresponding time period of the decomposition sequence, y a (t), are the real power and estimated power of appliance a at time t respectively.
[0052] Due to the adoption of the above technical solution, the technical advancements achieved by the present invention are:
[0053] 1. The present invention extracts rich local features through CNN, combines channel and spatial attention mechanisms to strengthen attention to important features, and then implements fast and efficient learning through the ELM layer, so that the network can efficiently process large-scale data while ensuring accuracy.
[0054] 2. The attention mechanism in this invention automatically weights key features, while ELM helps the network converge quickly, reducing the workload of manual tuning and improving the performance and efficiency of the model.
[0055] 3. By combining ELM with CNN, the present invention enables lightweight predictions to be performed directly after feature extraction, reducing the large number of training parameters required for traditional fully connected layers. This improves the network's resistance to noise interference, significantly enhancing the model's computational efficiency and deployment adaptability. This invention can be widely applied to non-invasive load decomposition tasks, meeting the real-time requirements of tasks and resource-constrained environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is a schematic diagram of non-intrusive load monitoring in the present invention;
[0057] Figure 2 This is a flow chart of the lightweight non-invasive load monitoring method based on the CNN-ELM model and attention mechanism in the present invention;
[0058] Figure 3Schematic diagram of the convolutional layer structure in the NILM model based on CNN-ELM in the present invention;
[0059] Figure 4 This is a schematic diagram of the attention mechanism structure in the NILM model based on CNN-ELM in the present invention;
[0060] Figure 5 It is a schematic diagram of the data structure in the NILM model based on CNN-ELM in the present invention. DETAILED DESCRIPTION
[0061] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments:
[0062] like Figure 1 As shown, non-intrusive load monitoring includes non-intrusive load monitoring equipment installed between the neutral wire and the live wire and other living electrical equipment;
[0063] like Figure 2 As shown, a lightweight cascade load identification method based on device and timing characteristics includes the following steps:
[0064] S1. Preprocessing the collected user load data;
[0065] The preprocessing method includes normalizing the user load data, specifically:
[0066]
[0067] Where: p norm is the normalized power value, and p norm ∈[-1,1];P t 、 σ are the power value, total power mean and standard deviation at time t respectively;
[0068] S2. Establishing a NILM model based on CNN-ELM, and using the NILM model based on CNN-ELM to pre-train the power of a certain load;
[0069] The training phase adjusts the weights of the convolutional layers through backpropagation. Each convolutional layer extracts features through a sliding window, uses a ReLU activation function to perform a nonlinear transformation on the convolutional layer output, and sets the trained CNN convolutional layer weights and attention mechanism parameters as the initial weights of the entire network.
[0070] In S2, the convolution layer is pre-trained. Specifically, in a one-dimensional convolution layer, a series of convolution kernels are convolved along the input sequence data, and then the bias is appended to the output, and a nonlinear activation function is applied to the result; each convolution kernel slides on the input sequence and calculates the local weighted sum, and the output result is a feature map processed by the activation function:
[0071]
[0072] Among them, b ij represents the bias term of the j-th feature map of the i-th layer, Represents the weight value of the j-th feature map in the i-th layer in the convolution kernel, It represents the activation value of the δth feature map of the previous layer at position m+p, and is trained using the backpropagation algorithm. The convolution kernel weights and biases in the network are updated by the gradient descent method. The convolution layer adjusts its weights through backpropagation. Each convolution layer extracts features through a sliding window, and uses the ReLU activation function to perform a nonlinear transformation on the convolution layer output. The trained CNN convolution layer weights and the parameters of the attention mechanism are set as the initial weights of the entire network.
[0073] S3. Optimizing the prediction performance of the CNN-ELM-based NILM model for different load powers using the attention mechanism to obtain non-intrusive load monitoring results.
[0074] The input of the CNN-ELM based NILM model is the normalized bus power sequence p norm ,The purpose is to predict the power of a certain load in the bus power sequence, which includes ,convolutional layers, attention modules and ELM layers;
[0075] The normalized bus power sequence p norm Multi-level feature representations are extracted through the convolutional layer. Then, the channel attention mechanism improves the expression of key feature channels by weighting different channels. The spatial attention mechanism helps the model focus on features at critical moments by weighting the importance of different positions. Finally, the features after convolution and attention processing are linearly transformed through the ELM layer to generate the final prediction results.
[0076] S3 specifically includes the following steps:
[0077] S31 attention mechanism optimization;
[0078] Attention mechanism optimization includes two parts: channel attention mechanism and spatial attention mechanism;
[0079] S311 channel attention mechanism optimization;
[0080] The channel attention module first extracts the statistical features of each channel through global average pooling and global maximum pooling; next, it uses a shared fully connected layer to map this extracted information to generate corresponding channel weights; finally, it uses the Sigmoid activation function to normalize the weights and apply them to each channel of the input feature map;
[0081] The calculation process of the channel attention mechanism is as follows:
[0082] CA(x)=σ(W2·ReLU(W1·(AvgPool(x)+MaxPool(x))))
[0083] Where x represents the input feature map, AvgPool and MaxPool represent global average pooling and maximum pooling operations respectively, W1 and W2 are the weight matrices of channel mapping, ReLU represents the activation function, and σ is the Sigmoid function used to normalize the channel weight to the range [0,1].
[0084] S312 spatial attention mechanism optimization;
[0085] The spatial attention module first calculates the average and maximum values of the feature maps in the channel dimension to generate two single-channel feature maps. Then, these two feature maps are concatenated and a one-dimensional convolution operation is performed through a convolution kernel to obtain a spatial attention weight map. Finally, the generated weights are normalized using the Sigmoid activation function and multiplied element-wise with the original feature map to complete the calculation of the spatial attention mechanism.
[0086] The calculation process of the spatial attention mechanism is as follows:
[0087] SA(x)=σ(Conv1d([Avg(x),Max(x)]))
[0088] Among them, Avg(x) and Max(x) represent the average pooling and maximum pooling operations in the channel dimension respectively, Conv1d is a convolution operation used to generate spatial attention weights, and σ is the Sigmoid function that normalizes the weights to [0, 1].
[0089] In the S313 attention mechanism, the channel attention and spatial attention modules are serially combined to first enhance the features in the channel dimension and then distribute the weights in the spatial dimension. The specific implementation is as follows:
[0090] x′=SA(CA(x)·x)·x
[0091] Among them, CA(x) represents the channel attention weighting of the input feature map, and SA(·)·x represents the further spatial attention weighting on the weighted result.
[0092] S32 performs linear transformation through the ELM layer to generate the final prediction result, which specifically includes the following steps:
[0093] S321 uses the ELM network to replace the traditional fully connected layer for linear changes, inputs the features optimized by the attention mechanism into the ELM layer, generates the hidden layer output, and calculates the hidden layer output matrix:
[0094] H: H=σ(Wx+b)
[0095] Where W is the random weight matrix of ELM, x is the feature vector extracted by CNN, b is the bias term, and σ is the activation function;
[0096] S322 calculates the output weight β:
[0097]
[0098] Among them, H + is the pseudo-inverse of the hidden layer output matrix H, and Y is the target label;
[0099] S323 calculates the final prediction result:
[0100]
[0101] Among them, H is the hidden layer output matrix, is the output weight calculated by the least squares method.
[0102] Example
[0103] This paper uses the UK-DALE dataset as a test dataset to validate the hybrid model. This dataset is a publicly available household electricity data set, covering total power consumption data for five UK households between November 2012 and January 2015, as well as energy consumption data for more than ten common household appliances. The power sampling frequency for all appliances is 1 / 6 Hz. To construct the dataset, this study selected 10 months of data and partitioned the data into training, validation, and test sets in an 8:1:1 ratio. Missing value processing and data normalization were also performed.
[0104] The convolution layer designed in this invention is composed of multiple convolution modules stacked together, each module contains a one-dimensional convolution layer, a normalization layer and an activation function layer, such as Figure 3As shown. The one-dimensional convolution layer captures the continuous correlation in time series data by extracting local features. The specific settings are that the number of input channels is 1, the number of output channels is 30, the convolution kernel size is 10, and the sequence length is ensured to be consistent by padding (4,5) on the left and right. Subsequently, the convolution layer gradually increases the number of output channels to enhance the feature expression capability. Each convolution layer is followed by a batch normalization layer to reduce internal covariate shift and stabilize the data distribution, thereby accelerating the convergence of network training and improving generalization performance. The activation function uses ReLU, which can introduce nonlinear transformations, solve the gradient disappearance problem, and improve feature expression capabilities. Finally, the network globally aggregates the feature map through the adaptive average pooling layer and converts it into an output vector, thereby completing the entire process of feature extraction and mapping.
[0105] This paper uses channel-wise and spatial-wise attention mechanisms to enhance the network's ability to focus on key information within input features. These two attention mechanisms, while lightweight, effectively enhance the model's ability to express features, making them particularly suitable for accurate modeling of load decomposition tasks in time series data.
[0106] In this invention, the channel attention and spatial attention modules are serially combined, such as Figure 4 As shown in Figure 1, the feature enhancement of the channel dimension is performed first, and then the weight distribution of the spatial dimension is performed.
[0107] In the pre-training stage of the present invention, the convolutional layer adjusts its weight through back propagation, each convolutional layer extracts features through a sliding window, uses the ReLU activation function to perform nonlinear transformation on the convolutional layer output, and sets the trained CNN convolutional layer weights and the parameters of the attention mechanism as the initial weights of the entire network.
[0108] Based on the feature extraction of convolutional layer, this paper uses extreme learning machine as a lightweight output layer to replace the traditional fully connected layer. The data structure in the overall process is as follows: Figure 5 As shown in the figure, the key feature of the ELM layer is that its input weights and hidden layer biases are determined by random initialization and remain unchanged during training, so the output weights only need to be calculated through a one-time optimization. This feature significantly reduces the computational complexity of the ELM layer compared to traditional fully connected layers while also avoiding the risk of overfitting caused by repeated iterations of the backpropagation algorithm. Furthermore, the ELM demonstrates excellent robustness and generalization capabilities when processing high-dimensional convolutional features, allowing it to more efficiently extract key information related to the target load from the features.
[0109] To evaluate the performance of the model in load monitoring, this paper uses Mean Absolute Error (MAE) as the main performance indicator. This indicator is used to measure the accuracy of the model in decomposing the power of each appliance. MAE represents the average deviation between the predicted power value and the actual power value. The smaller the value, the higher the decomposition accuracy of the model:
[0110]
[0111] Where: E MA is MAE, T is the total number of moments in the corresponding time period of the decomposition sequence, y a (t), are the real power and estimated power of appliance a at time t respectively.
[0112] To evaluate the model's performance in identifying appliance switch states, this paper uses the F1 score and Accuracy (Acc) as classification metrics. The F1 score combines precision and recall, effectively measuring the model's overall performance when faced with unbalanced appliance switch state data; while Accuracy is used to assess the model's overall ability to make correct judgments. The calculation formulas for each metric are as follows:
[0113]
[0114] Among them: A CC T is the accuracy of electrical appliance status recognition; P 、F P 、T N 、F N are the number of positive samples identified as positive, the number of negative samples identified as positive, the number of negative samples identified as negative, and the number of positive samples identified as negative; P and R are the precision and recall rates of appliance status recognition, respectively.
[0115] In order to evaluate the CNN-ELM-based NILM model proposed in this paper, several state-of-the-art architectures were used for comparison, including sequence-to-sequence convolutional neural network (S2S), sequence-to-point convolutional neural network (S2P), CNN-LSTM method, BERT4NILM method and Informer+ method.
[0116] 1. Sequence-to-Sequence Convolutional Neural Network (S2S): An S2S model typically consists of an encoder and a decoder. The encoder extracts features from the input power data sequence, while the decoder converts these features into load decomposition results. In the CNN-based S2S model, convolutional layers are used to extract local features, effectively capturing temporal relationships in power data and performing feature learning at multiple levels.
[0117] 2. Sequence-to-Point Convolutional Neural Network (S2P): The S2P model uses the convolutional layers of a CNN to extract local features from power data, effectively identifying the operating status and power mode of appliances. This model typically has good time compression capabilities and can directly extract key features using a small number of convolutional layers, simplifying the processing.
[0118] 3. CNN-LSTM Method: In this model, CNN is primarily used to extract local features from power data, particularly effectively capturing the spatiotemporal information in power series. Through multiple convolutional layers, CNN can identify the power patterns and operating states of appliances. The extracted features are then fed into an LSTM network. Using its memory cells to process time series data, LSTM can capture long-term dependencies and dynamic changes in power data, enabling more accurate prediction of appliance load changes.
[0119] 4. BERT4NILM Method: BERT is a model based on the Transformer architecture that captures contextual information at each position in a sequence through a bidirectional encoder. In non-intrusive load monitoring (NILM), BERT4NILM applies this contextual understanding capability to power series data, effectively extracting important features from electrical load series through a self-attention mechanism.
[0120] 5. Informer+ method: This method combines multi-scale convolution with the informer network. By using multi-scale convolution kernels, it extracts power features from different time scales and adaptively generates a multi-dimensional feature matrix. The probabilistic sparse self-attention mechanism in the informer network can capture long-term dependencies in high-dimensional space, thereby improving prediction accuracy.
[0121] The five networks were modified to have consistent hyperparameters with the CNN-ELM model proposed in this application. The six models were then trained until convergence. The general hyperparameter settings for the algorithm are shown in Table 1.
[0122] Table 1
[0123] Hyperparameter settings Numerical Sequence length 129 Maximum number of training rounds 100 Minimum number of early stopping training rounds 10 Patience parameter in early stopping mechanism 10 Learning rate 0.001
[0124] Table 2 shows the comparison results of different algorithms and the CNN-ELM model proposed in this invention (the best results in the experiment are marked in black bold font). As can be seen from Table 2, the average values of the indicators of the five electrical appliances proposed by the method of this invention are all better than the comparison methods.
[0125] Table 2
[0126]
[0127]
[0128] In order to evaluate the feasibility of the CNN-ELM-based NILM model proposed in this paper, Tables 3 and 4 respectively compare the model network time consumption and parameter count. Table 3 shows the time consumption comparison results of training and testing different algorithms and the CNN-ELM model proposed in this paper on the UK-DALE dataset, and Table 4 shows the parameter count comparison results of training and testing different algorithms and the CNN-ELM model proposed in this paper on the UK-DALE dataset. The method of the present invention demonstrates its efficient computing performance with a time consumption of 5.8 minutes, which is suitable for the real-time deployment requirements of non-invasive load decomposition tasks. Compared with other complex models, the method of the present invention achieves a good balance between performance and efficiency while maintaining significant operational advantages. In terms of parameter count and memory consumption, the method of the present invention not only reduces the model complexity but also significantly reduces the runtime resource requirements through the efficient combination of the attention mechanism and ELM, reflecting its actual deployment advantages in NILM tasks.
[0129] Table 3
[0130]
[0131]
[0132] Table 4
[0133]
[0134] In summary, the present invention can solve the problems of low prediction accuracy, poor model generalization and high computational burden in current non-intrusive load monitoring technology.
Claims
1. A lightweight cascade load identification method adapted to equipment and timing characteristics, characterized by: The following steps are involved: S1. Preprocessing the collected user load data; S2. Establish a non-intrusive load monitoring model based on CNN-ELM, and use the non-intrusive load monitoring model based on CNN-ELM to pre-train the power of a certain load; In the pre-training phase, the convolutional layer adjusts its weights through back-propagation. Each convolutional layer extracts features through a sliding window, and uses the ReLU activation function to perform nonlinear transformation on the convolutional layer output. The trained CNN convolutional layer weights and the parameters of the attention mechanism are set as the initial weights of the entire network. S3. Optimizing the prediction performance of the CNN-ELM-based non-intrusive load monitoring model for different load powers using an attention mechanism to obtain non-intrusive load monitoring results. The non-intrusive load monitoring model based on CNN-ELM takes as input a normalized bus power sequence and aims to predict the power of a load in the bus power sequence. It includes a convolutional layer, an attention module, and an ELM layer. The normalized bus power sequence is passed through a convolutional layer to extract multi-level feature representations. Next, the channel attention mechanism improves the expression of key feature channels by weighting different channels. The spatial attention mechanism helps the model focus on features at critical moments by weighting the importance of different positions. Finally, the features processed by convolution and attention are linearly transformed through the ELM layer to generate the final prediction results.
2. The lightweight cascade load identification method based on the adaptation device and timing characteristics according to claim 1 is characterized in that: In S1, the preprocessing method includes normalizing the user load data, specifically: Where: p norm is the normalized power value, and p norm ∈[-1,1];P t 、 σ are the power value, total power mean and standard deviation at time t respectively.
3. The lightweight cascade load identification method based on the adaptation device and timing characteristics according to claim 1 is characterized in that: In S2, the convolution layer is pre-trained. Specifically, in a one-dimensional convolution layer, a series of convolution kernels are convolved along the input sequence data, and then the bias is appended to the output, and a nonlinear activation function is applied to the result; each convolution kernel slides on the input sequence and calculates the local weighted sum, and the output result is a feature map processed by the activation function: Among them, b ij represents the bias term of the j-th feature map of the i-th layer, Represents the weight value of the j-th feature map in the i-th layer in the convolution kernel, It represents the activation value of the δth feature map of the previous layer at position m+p, and is trained using the backpropagation algorithm. The convolution kernel weights and biases in the network are updated by the gradient descent method. The convolution layer adjusts its weights through backpropagation. Each convolution layer extracts features through a sliding window, and uses the ReLU activation function to perform a nonlinear transformation on the convolution layer output. The trained CNN convolution layer weights and the parameters of the attention mechanism are set as the initial weights of the entire network.
4. The lightweight cascade load identification method based on the adaptation device and timing characteristics according to claim 1 is characterized in that: S3 specifically includes the following steps: S31 attention mechanism optimization; Attention mechanism optimization includes two parts: channel attention mechanism and spatial attention mechanism; S32 performs linear transformation through the ELM layer to generate the final prediction result.
5. The lightweight cascade load identification method based on the adaptation device and timing characteristics according to claim 4 is characterized in that: S31 specifically includes the following steps: S311 channel attention mechanism optimization; The channel attention module first extracts the statistical features of each channel through global average pooling and global maximum pooling; next, it uses a shared fully connected layer to map this extracted information to generate corresponding channel weights; finally, it uses the Sigmoid activation function to normalize the weights and apply them to each channel of the input feature map; The calculation process of the channel attention mechanism is as follows: CA(x)=σ(W2·ReLU(W1·(AvgPool(x)+MaxPool(x)))) Where x represents the input feature map, AvgPool and MaxPool represent global average pooling and maximum pooling operations respectively, W1 and W2 are the weight matrices of channel mapping, ReLU represents the activation function, and σ is the Sigmoid function used to normalize the channel weight to the range [0,1]. S312 spatial attention mechanism optimization; The spatial attention module first calculates the average and maximum values of the feature maps in the channel dimension to generate two single-channel feature maps. Then, these two feature maps are concatenated and a one-dimensional convolution operation is performed through a convolution kernel to obtain a spatial attention weight map. Finally, the generated weights are normalized using the Sigmoid activation function and multiplied element-wise with the original feature map to complete the calculation of the spatial attention mechanism. The calculation process of the spatial attention mechanism is as follows: SA(x)=σ(Conv1d([Avg(x),Max(x)])) Among them, Avg(x) and Max(x) represent the average pooling and maximum pooling operations in the channel dimension respectively, Conv1d is a convolution operation used to generate spatial attention weights, and σ is the Sigmoid function that normalizes the weights to [0, 1]. In the S313 attention mechanism, the channel attention and spatial attention modules are serially combined to first enhance the features in the channel dimension and then distribute the weights in the spatial dimension. The specific implementation is as follows: x′=SA(CA(x)·x)·x Among them, CA(x) represents the channel attention weighting of the input feature map, and SA(·)·x represents the further spatial attention weighting on the weighted result.
6. The lightweight cascade load identification method based on the adaptation device and timing characteristics according to claim 4 is characterized in that: S32 specifically includes the following steps: S321 uses the ELM network to replace the traditional fully connected layer for linear changes, inputs the features optimized by the attention mechanism into the ELM layer, generates the hidden layer output, and calculates the hidden layer output matrix: H: H=σ(Wx+b) Where W is the random weight matrix of ELM, x is the feature vector extracted by CNN, b is the bias term, and σ is the activation function; S322 calculates the output weight β: Among them, H + is the pseudo-inverse of the hidden layer output matrix H, and Y is the target label; S323 calculates the final prediction result: Among them, H is the hidden layer output matrix, is the output weight calculated by the least squares method.
7. The lightweight cascade load identification method based on the adaptation device and timing characteristics according to claim 1 is characterized in that: The mean absolute error (MAE) is used as a performance metric to measure the accuracy of the model in decomposing the power of each appliance. The MAE represents the average deviation between the predicted power value and the actual power value: Among them, E MA is MAE, T is the total number of moments in the corresponding time period of the decomposition sequence, y a (t), are the real power and estimated power of appliance a at time t respectively.