Application of improved DBN and GRU based on intelligent optimization algorithm in power load identification and prediction

Non intrusive load monitoring belongs to the key technologies of intelligent power management systems, playing a crucial role in smart grids. To achieve accurate identification and prediction of electricity load, intelligent optimization algorithms are introduced into deep learning optimization for improvement. A load recognition model combining sparrow search algorithm and deep confidence network is designed, as well as a gated recurrent network prediction model on the grounds of particle swarm optimization. The relevant results showed that the sparrow search algorithm used in the study performed well on the solution performance evaluation metrics with a minimum value of 0.209 for the inverse generation distance and a maximum value of 0.814 for the hyper-volume. The accuracy and recall values of the optimized load identification model designed in the study were relatively high. When the accuracy was 0.9, the recall rate could reach 0.94. The recognition accuracy of the model on the basis of the test set could reach up to 0.924. The lowest classification error was only 0.05. The maximum F1 value of the harmonic evaluation index of the bidirectional gated recurrent network optimized by particle swarm optimization converged to 90.06%. The loss function had been optimized by particle swarm optimization, and both the convergence value and convergence speed had been markedly enhanced. The average absolute error and root mean square error of the prediction model were both below 0.3. Compared to the bidirectional gated recurrent model before optimization, the particle swarm optimization strategy had a significant improvement effect on prediction details. In addition, the research method had superior recognition response speed and adaptability in real application environments. This study helps to understand the load demand of the power system, optimize the operation of the power grid, and strengthen the reliability, efficiency, and sustainability of the power system.


Introduction
The Power System (PSY) is a key component of modern social development, and the development of information technology, communication technology, and automation technology has driven the transformation and evolution of the PSY.PSY is developing *Correspondence: dengwenyuan0913@163.com 1 Measurement Center of Guangdong Power Grid Co., Ltd., Guangzhou 510000, China 2 Xiqiao Power Supply Bureau, Guangdong Power Grid Co., Ltd., Foshan 528200, China towards cleanliness, intelligence, flexibility, and sustainability.Implementing energy management and improving energy utilization efficiency through advanced means has become a research hotspot (Rafati et al. 2022;Himeur et al. 2022).Smart grid monitoring technology can achieve real-time monitoring and control of various links in the PSY, ensuring the operational efficiency and reliability of the power grid.Non Intrusive Load Monitoring System (NILM) is a system that utilizes non-invasive sensor technology to monitor and analyze electrical loads and Energy Consumption (EC) without the need for any modifications or contact with equipment.Load identification and prediction are the core components of NILM, and understanding the usage status of electricity loads helps to reasonably dispatch power supply and optimize power distribution.It is also necessary to coordinate the power generation of various power supply departments for ensuring the stable supply of the PSY (Chen and Wang 2022;Lu et al. 2023).However, in the face of complex load electricity environments, changing household electricity habits, and sparse EC data, the existing NILM load identification and prediction still have low accuracy and poor stability (Kaselimi et al. 2022).To achieve accurate and stable load identification and prediction of NILM, the study chooses Deep Learning (DL) with obvious advantages as the technical foundation.On the one hand, the Sparrow Search Algorithm (SSA) in swarm intelligence Optimization Algorithms (OA) is utilized to optimize the traditional Deep Belief Network (DBN) and achieve power load identification.On the other hand, the study utilizes Particle Swarm Optimization (PSO) algorithm to improve the Gated Recurrent Unit (GRU) of Recurrent Neural Network (RNN), and designs a bidirectional weighted PSO-GRU Load Forecasting (LF) model.The design of the research enriches the theoretical research basis as well as the practical application of intelligent OA and DL, which can improve the technical level of DBN and GRU in the field of identification and prediction.Moreover, this study achieves energy conservation, emission reduction, and PSY scheduling by effectively optimizing energy management and adjusting user electricity consumption behavior.
The study mainly includes four parts.First, a review of the current research status of NILM around the world is conducted.Then, the construction of SSA-DBN recognition and bidirectional weighted PSO-GRU prediction model is explained.The performance testing is conducted on the designed recognition and prediction model.Finally, the research experimental results are summarized.

Related work
The construction of smart grids is an essential direction for the digital transformation and reform of the PSY, and NILM is an important approach for the construction of smart grids.Scholars around the world have carried extensive research on it.Current research often interprets NILM tasks as a multi classification problem, which sometimes makes it difficult to effectively identify unknown loads that have not participated in training.Kang et al. designed an adaptive NILM method that utilizes fast Fourier transform to complete harmonic current characteristic analysis.The pre-trained convolutional autoencoder Neural Networks (NN) was used for obtaining voltage current trajectory features.The TOPSIS algorithm compared the similarity of feature vectors to achieve load monitoring.The relevant outcomes verified the recognition accuracy of this method, with a maximum accuracy of 97%, which could achieve load recognition of embedded systems (Kang et al. 2022).Due to the limitations of transmission costs and network bandwidth, NILM often used low-frequency data, which posed significant challenges to the accuracy of monitoring and identification.Yin et al. investigated the correlation between household electricity consumption habits and load state decomposition methods, and presented a non-invasive load identification model on the grounds of Gaussian mixture and hidden Markov model.After validation with the dataset, it had been confirmed that this method significantly improved the accuracy of device recognition (Yin et al. 2022).Laouali et al. designed a NILM framework based on low-frequency power data, using the DL architecture of random approximation convex shell data selection method, hybrid Convolutional Neural Network (CNN), and bidirectional Long Short-Term Memory (LSTM).The experiment showed that the F1 values of the four devices on the test dataset were between 0.95 and 0.99, and the accuracy values were between 0.88 and 0.98 (Laouali et al. 2022).NILM was the process of decomposing individual EC based on the total EC. Lee M H et al. established an energy decomposition model on the grounds of RNN, LSTM, and gated cyclic units.It estimated the performance of the design method using hidden Markov models.The experiment showed that the method had enhanced in indicators such as F1 value, accuracy, Mean Absolute Error (MAE), and Root Mean Square Error (RMSE), and was highly consistent with actual power and electricity consumption (Lee and Moon 2023).
The accuracy of NILM recognition on the grounds of a single feature is relatively low.Chen et al. chose to integrate the advantages of multiple features and used a matrix heatmap to identify loads on the grounds of voltage current trajectory features, odd harmonic phase and amplitude, and fundamental amplitude.The relevant outcomes showed that this method could reach non-invasive monitoring of household load, with a recognition accuracy of 96.24% (Chen et al. 2023).Yin and Ma designed a voltage current representation attention mechanism for NILM tasks.This method improved the classification function of NNs and had been validated by the public dataset plug load instrument recognition dataset, confirming the excellent performance of this method (Yin and Ma 2023).To identify flexible loads, Kianpoor et al. designed an adaptive integrated filtering framework on the grounds of LSTM filtering technology and characterization ability, which learns the long-term dependency relationship of flexible loads through total power and achieves load decomposition.The experiment was on the grounds of a residential example in British Columbia, and the results showed that the maximum reduction in power consumption estimation error for different appliances by this method could reach 57.4% (Kianpoor et al. 2023).Considering that the input features of NILM only include total power, Luo et al. used sliding windows to extract different frequency bands and characterize different sliding windows for multi-dimensional feature input.Then it used a NN composed of convolution and bidirectional LSTM to complete LF.In addition, the study also designed an optimized loss function suitable for binary classification problems to achieve information sharing.Verified by real household energy datasets, it was shown that this method had improved F1 value, MAE, and signal aggregation error indicators by nearly 20%, 25.15%, and 17.83%, respectively (Luo et al. 2023).
Nowadays, NILM is still mostly limited to developing models using regression forms.Kim G et al. identified appliance equipment activation based on historical profiles and converted the NILM results into appropriate information for service utilization to develop pre-trained NILM models (Kim and Park 2023).Djordjevic et al. conducted NILM based on steady-state current harmonic analysis.Firstly, the steady-state changes of current harmonic vectors were used to classify household appliances, and then household appliances were identified based on the current harmonic components.Experimental results showed that this method could accurately distinguish the linear and nonlinear classification of electrical switching power supplies (Djordjevic and Simic 2023).To improve the accuracy of NILM load recognition, Liu Z et al. designed a NILM load recognition model based on adaptive PSO algorithm and CNN.PSO algorithm was used to determine the network layer and convolution kernel of CNN.The experimental results showed that the overall recognition accuracy of the method was 97.26%, and the F-1 value was 96.92% (Liu et al. 2023).Liu J et al. fused an improved clustering algorithm and a three-layer Bayesian network to design a NILM equipment operation state recognition model, and simulation experiments verified the effectiveness of the method (Liu et al. 2024).Existing NILM methods mainly focused on the identification of NILM.Given this, Lu et al. designed a NILM identification model for unknown loads based on Siamese network.This Siamese network contained fixed CNN and retrained Backpropagation NN (BPNN), and the public dataset verified the practicality and scalability of the method (Lu et al. 2024).
In summary, there have been many studies on NILM load identification and prediction, indicating that DL has good application advantages in power load monitoring research.However, facing sparse individual household EC data and various external factors, NILM's load identification and prediction still have shortcomings in stability and accuracy.This study is on the grounds of DL technology and improves the load identification and prediction of electricity by introducing intelligent OAs.

Improvement of DBN and GRU for power load identification and prediction on the grounds of intelligent OAs
The identification and prediction of loads through NILM is meaningful for the operation planning, power generation scheduling, and energy regulation of the power grid.This study conducts research on load recognition and prediction on the grounds of DL and intelligent OAs.

Construction of a power load identification model integrating SSA and DBN
DL is a common machine learning method that can solve complex tasks by simulating the working principles of human brain NNs (Gharehchopogh et al. 2023).DL contains many Hidden Layers (HL) and can learn high-level abstract features.It has the advantage of automatically learning features and has been extensively utilized in many fields, promoting the development of artificial intelligence technology (Abdulhammed 2022; Bhosle and Musande 2023).This study introduces DL into the field of load recognition to deeply explore electrical features and underlying correlations.
The DL framework chosen for the study is DBN.DBN belongs to a multi-layer stacked generative NN structure, which includes multiple Restricted Boltzmann Machines (RBMs).RBM is a probability generation model consisting of independent visible and HLs, including observation data and abstract feature nodes.Different nodes are connected to form a fully connected graph, and RBM is used as part of DBN to extract high-level abstract features and provide input for other tasks.The schematic diagram of RBM structure and its solution method is shown in Fig. 1.
The energy value function E(v, h) of RBM is expressed in Eq. ( 1).In Eq. ( 1), v, h serve as visible and HLs.c and b represent the bias vectors of v, h , respectively, with c ∈ R I and b ∈ R J .W represents the connection weight between v, h and W ji v i b j , as shown in Eq. ( 1).
The learning of RBM is divided into training and generation stages.In the training stage, the distribution of input data is learned by iteratively updating the connection weights, and the probability density distribution is calculated using the Gibbs sampling method of Markov Chain Monte Carlo.The probability density distributions p(v) and p(h) of visible and HLs are shown in Eq. ( 2).
The generation stage of RBM generates new data on the grounds of the learned parameters, that is, by inputting the visible layer node state and sampling the HL for reconstructing the visible layer data in reverse.When a vector of visible or HLs is given, the probability of activation of neurons in the visible or HLs is calculated using Eq.(3).
The traditional method for solving RBM bias and weight gradient requires a large amount of computation, so the Gibbs sampling method's contrast divergence algorithm is used for solving.The weight and bias calculation of RBM is shown in Eq. ( 4), where p 0 = p(h|v ) serves as the expected value of the model at p 0 = p(h|v ) .E k repre- sents the expected value.
(1) During the fine-tuning stage, the backpropagation algorithm is used to fine tune the entire network and optimize its Classification Performance (CP).Overall, DBN has an auto-encoder structure that can automatically learn feature representations, overcoming the gradient vanishing of traditional deep networks through layer by layer pre-training and fine-tuning, and overall performance is good.The calculation of weights for each layer of DBN is completed in a layer by layer recursive process, and a small initial weight value leads to slow training speed of the model in the initial stage.Consequently, the study introduces the intelligent OA, SSA, for optimizing the initial weight assignment of DBN.Firstly, SSA is used to initialize the weights of DBN, and the performance index of DBN is defined as the fitness function.Then, the behaviors of sparrow's foraging, following, chasing and escaping in SSA algorithm are mapped to the adjustment of the DBN structure, and the SSA searching results help DBN to find the appropriate weights with the parameter configurations of each layer of RBM.
SSA is an OA on the grounds of local search, which gradually approaches the global optimal solution by continuously searching for local solutions.The algorithm is easy for implementing, and has significant advantages in solving discretization problems (Gad et al. 2022).Sparrow Population (SP) individuals are usually divided into discoverers and joiners.Discoverers are responsible for searching for food and offering foraging areas and directions for other SPs.Joiners obtain food under the guidance of discoverers.Discoverers and joiners can dynamically change, and usually the Fitness Value (FV) of discoverers is higher than that of joiners.However, joiners can also monitor discoverers competing for food for increasing predation rates.Additionally, SPs also engage in vigilant behavior, abandoning food and flying to safe areas when they become aware of danger.The SSA workflow is shown in Fig. 3.
(4) The Position Update (PU) of the discoverer is shown in Eq. ( 5), where X t i,j represents the position of the i-th sparrow in the j-th dimension at the t-th iteration.iter max represents the iterations' maximum.α and Q represent random constants and stand- ard normal distribution random numbers between 0 and 1, respectively.R 2 and ST serve as the alarm value and alert threshold.As R 2 ≥ ST , sparrows fly from wide area search to safe areas to forage.L represents the matrix of 1 × d.
The PU of followers is shown in Eq. ( 6), where X p serves as the optimal position of the discoverer.X worst serves as the worst global position.A serves as a matrix of 1 × d , with A + = A T AA T −1 .When i > n/2 , the SP is necessary to go to food rich areas for food.Some sparrows are responsible for vigilance, and the PU is shown in Eq. ( 7).In Eq. ( 7), β and K represent constants of control step length and sparrow flight direc- tion.f i represents the FV.f w and f g serve as the global best and worst FVs.ε rep- resents the minimum constant for preventing the denominator from being unique.Introducing SSA into the DBN structure to optimize the initial weights can enhance the DBN model.

Design of bidirectional adaptive power LF model on the grounds of PSO and GRU
The LF of the PSY is on the grounds of historical load data and other related factors, using methods such as time series analysis or machine learning for LF.The prediction of load is influenced by climate, weather, and other factors, which have significant (5) uncertainty.When predicting, historical data, temperature, and date information need to be considered as input data for LF.On the grounds of the predicted load results, appropriate adjustments can be made to the PSY, with the aim of minimizing LF errors and ensuring the accuracy of LF.Artificial Neural Network (ANN) is an autonomous learning model that mimics the information processing of biological neural systems.ANN has strong learning and adaptive abilities.Recurrent ANN has a memory mechanism that can effectively handle the temporal relationships of sequential data.Repeated propagation gradients with time steps can better capture long-term dependencies.The study chooses a recurrent ANN for load prediction, relying on a DL framework called GRU.GRU is a variant of traditional RNN, which has stronger modeling and long-term dependency processing capabilities.GRU includes two gate control functions: an Update Gate (UG) and a Reset Gate (RG).The UG controls the degree to which the Previous Hidden State (PHS) is brought into the current input.The RG determines the degree to which information from the previous state possesses an impact on the current state (ArunKumar et al. 2022).GRU updates the UG and RG on the grounds of the current input and the PHS.The expression for the UG z t is shown in Eq. ( 8).In Eq. ( 8), t m denotes the input information of the UG excitation function.w m and u m represent UG weights.σ represents the activation function.h represents the HL state.t represents the position layer in the model.x t represents the input information at the cur- rent time.
The expression for resetting gate r t is shown in Eq. ( 9).In Eq. ( 9), t n denotes the input information of the RG excitation function.w n and u n are resetting the gate weight.
The final output h t of GRU is calculated using Eq. ( 10).h t represents the updated value, determined by r t , h t−1 , and the current position together. (8)

Fig. 4 Schematic diagram of bidirectional loop GRU structure
However, the traditional GRU model has a low utilization rate of future data information.Therefore, this study has improved the GRU model and designed a bidirectional GRU (BiGRU) model with a network structure shown in Fig. 4.
BiGRU consists of two directional GRU NN models, which predict the entire load information through forward and backward prediction.The forward calculation process is consistent with the GRU model calculation process, while the reverse calculation process is shown in Eq. ( 11).In Eq. ( 11), z a t and r a t represent reverse gating.w a z , u a z , w a r , and u a r represent the corresponding weights.
The bidirectional weighted merging strategy combines the bidirectional HL states, which input information from the past and future time periods of the predicted point.The merging strategy adopted in the study is weighted sum, and the calculation process of the HL state h t is shown in Eq. ( 12).In Eq. ( 12), k serves as the weighted proportion.h f t and h b t represent the forward and backward HL states, respectively.
Finally, the prediction result y t of the BiGRU model is shown in Eq. ( 13), where w y rep- resents the weight from the HL to the OL of the system.
The improvement strategy of the BiGRU model has improved the prediction results, but the BiGRU model has many parameters, including forward and reverse calculation weights, HL to OL weights, and weighting ratio coefficients.The value of the parameters possesses a crucial impact on the model.Therefore, the study introduces the PSO algorithm for global optimization and training the parameters of the BiGRU model.In ( 11) Fig. 5 Workflow diagram of BiGRU model on the grounds of PSO addition, using PSO for optimizing the loss function, the workflow of the BiGRU model on the grounds of PSO optimization is shown in Fig. 5.The first is to initialize the particle swarm and randomly generate a set of particles.Different particles represent different candidate solutions, namely GRU weight parameters.Then, the initial velocity of the particles is randomly generated, and the corresponding fitness value is calculated based on the particle's position.The fitness function is a performance metric of a neural network for training data.Then the individual positions and velocities are updated according to the comparison between the particle positions and the individual optimal positions.The updating process is repeated until the convergence condition is satisfied.PSO can continuously optimize the weights of the GRU model to improve the network performance.
PSO is a biomimetic intelligent OA inspired by the foraging behavior of bird flocks in nature.PSO considers the problem to be optimized as particles in the solution space, simulating collaboration and information exchange between individuals, and searching for the optimal solution.The PSO algorithm is easy for implementing, with fast convergence speed, and is utilized for solving optimization problems (Pradhan et al. 2022;Alsaidy et al. 2022).The working mechanism and process of PSO are shown in Fig. 6.
Each particle is randomly assigned an initial position and velocity, and the position and velocity are adjusted on the grounds of the information of the global and individual optimal positions.The update process of particle position x m i and velocity v m+1 i is shown in Eq. ( 14), where w serves as the inertia weight.c 1 and c 2 serve as the acceleration fac- tors of individuals and populations, respectively.r 1 and r 2 represent random numbers, α represents constraint factors, and m represents iteration times.p i and s represent the optimal particle positions under local and global search, respectively, and determine the individual and global optima, which are the key to the PSO algorithm.
The influence of the update speed of particle position is usually limited to a certain range during the training process.Meanwhile, the inertia weight w possesses a sig- nificant impact on the optimization level of particles.The study adopts a dynamic ( 14) Fig. 6 Working mechanism and flowchart of PSO adjustment strategy to optimize w , and the calculation is shown in Eq. ( 15).In Eq. ( 15), x represents the number of iterations.

Performance testing and effectiveness evaluation of power load identification and prediction models
Aiming at verifying the performance of the SSA-DBN load identification model and the PSO-BiGRU model, a performance test and application analysis experiment were designed, and the results were discussed.

Experimental environment and dataset settings
Experimental environment settings: The DL framework is PaddlePaddle, the operating system is Windows 10, the processor is i9-9900 k, and the algorithm development language is Python 3.6.It chooses publicly available electricity load datasets as experimental datasets, including REDD dataset, Pecan Street dataset, and The Almanac of Minimally Power dataset and survey (AMPds) dataset.The REDD dataset mainly provides electricity load data at the second, minute, or hour level for different types and functions of electrical equipment.The Pecan Street dataset is electricity consumption data for residential and commercial buildings in the Texas area of the United States, including instantaneous power consumption, electricity consumption, and electricity load curve information.The AMPds dataset is a mixed household and commercial electricity load dataset that includes electricity load data for various types of buildings.The dataset contains additional information related to electricity consumption, such as building features, household background, and electricity consumption behavior.It selects data that meets the experimental requirements and divides it into training and testing sets in a 9:1 ratio.The OA selects single peak test functions Sphere and Schwefel, multi-peak test functions Rastigin and Ackley, and rotating multi-peak functions Griewank and Easom for testing and analysis.

Performance testing of SSA-DBN load identification model
The experiment selects common intelligent OAs, Firefly Algorithm (FA), Whale Optimization Algorithm (WOA), and Artificial Bee Colony Algorithm (ABC), for performance comparison.The normalized statistical results of various indicators are shown in Table 1.Table 1 shows that the SSA selected in the study performs better overall in each indicator.The performance of the training and testing sets is superior to other algorithms, and the experimental re-producibility is high.Generation distance and inverse generation distance can measure the average distance and coverage in the approximate solution and the true front, and the smaller the value, the closer the algorithm is to and covers the true front.The minimum distance indicators of SSA are 0.379 and 0.209, respectively, indicating that SSA exhibits good solving performance.The maximum Hyper volume of SSA is 0.814, which covers more real frontier solutions compared to other algorithms.Finally, a comprehensive evaluation is conducted on the distribution of solution sets for different algorithms.As can be seen from the values of the Spacing and  7.In Fig. 7a, the P-R curve of SSA-DBN is situated at the top of the coordinate axis, with high accuracy and recall, balancing the values of conflicting indicators.When the accuracy of SSA-DBN is 0.9, the recall rate can reach the highest level of 0.94.In Fig. 7b, the maximum Area Under the Curve (AUC) value of the ROC curve of SSA-DBN is 0.904, which is 0.180 higher than the traditional DBN model.Overall, SSA-DBN has better accuracy and comprehensiveness in recognition and classification.
The average recognition accuracy, classification error training, and classification results of the model training set are shown in Fig. 8.In Fig. 8a, the SSA-DBN model has a higher accuracy in identifying the load of different categories of household appliances on the grounds of the recognition features set in the study.In Fig. 8b, the classification error of the SSA-DBN model reduces with the increase of fine-tuning times, with a minimum level of around 0.050.In Fig. 8c, the recognition accuracy of the SSA-DBN model can reach up to 0.924, which is superior to other models under the same experimental conditions.

Performance testing of improved PSO-BiGRU LF model
The F1 values and loss function curves of different models are analyzed, and LSTM, traditional GRU, and BiGRU are selected for comparative experiments.The relevant outcomes are shown in Fig. 9. Figure 9a shows that the F1 value of the PSO-BiGRU model is higher than other models, with the maximum value converging to 90.06%, which is significantly better than the lowest model LSTM's 69.08%.There is a nearly 15% numerical improvement compared to the GRU and BiGRU models before optimization.The F1 value is the harmonic mean of accuracy and recall, indicating that the BiGRU model has strong predictive classification ability.In Fig. 9b, the loss function curve of the PSO-BiGRU model converges to a minimum value of around 0.18, with the fastest convergence speed.PSO has a good optimization effect on the loss function and a high degree of model fitting.
Comparing the prediction errors of different LF models, the statistical results of MAE and RMSE for different datasets are shown in Fig. 10.In Fig. 10a, the MAE values of the optimized PSO BiGRU model are lower than those of other models on different datasets, and the BiGRU model is lower than LSTM and GRU models.The bidirectional loop strategy and PSO parameter optimization measures designed in the research have achieved significant results.In Fig. 10b, RMSE is more sensitive to changes in error compared to MAE.In contrast, the median RMSE values of the PSO-BiGRU model are all below 0.30, indicating that the PSO-BiGRU model can exhibit lower errors in LF.
The electricity load data of residents in a certain community has been collected.The collection frequency is half an hour, and the continuous collection period is 30 days.A total of 1379 sets of data are obtained, and the data is divided into training and testing sets in an 8:2 ratio based on the experiment.Joint REDD, Pecan Street, and AMPds datasets are selected for applied analysis.The comparison between predicted values and actual values is in Fig. 11. Figure 11 shows that compared to the BiGRU model, the PSO-BiGRU model has a more fitting prediction curve for real data.Although the approximate trends of the two models differ slightly from the true values, the PSO-BiGRU model performs better in handling the details of the prediction results, and the data direction and numerical errors are more accurate.This indicates that PSO possesses an essential influence on optimizing the weights and combination proportion coefficients of the BiGRU model.
A qualitative analysis of the research-designed method is carried out to measure its effectiveness and performance in practical applications.The results of the recognition response speed and adaptability evaluation are shown in Fig. 12. From Fig. 12a, the computational efficiency and response speed of the research method are optimal, and realtime recognition can be achieved in the practical application session, which facilitates the prediction of the load state.From Fig. 12b, the PSO-BiGRU model is adaptable and suitable for practical application scenarios.

Fig. 10 Comparison of prediction errors of various models
Finally, the analysis of confidence interval estimation for load forecasting is carried out.Given a constant α between 0 and 1, the confidence level of the true load value is set to 1 − α .The confidence interval is determined based on the inverse function of the predicted value and the probability distribution function G(x) , which represents the interval containing the true value with probability 1 − α .Then, the prediction interval coverage is calculated to evaluate the confidence interval estimation effect, as shown in Table 2.In Table 2, the predicted interval coverage is higher than the corresponding confidence level, indicating that the research design is based on the effectiveness of different confidence interval estimates.

Conclusion
Aiming at enhancing the accuracy of load recognition and prediction, this study first designed a DL framework for load recognition by combining SSA and DBN.Then, on the grounds of GRU, the PSO algorithm was introduced to achieve bidirectional weighted improved LF.The relevant outcomes demonstrated that the SSA selected in the study had excellent solving ability in the solution space, and the distribution index values of various solution sets were better than other OAs, which was beneficial for the parameter optimization of deep confidence networks.The accuracy, recall, and AUC value of SSA-DBN were superior to other classification models, with a maximum AUC value of 0.904.SSA-DBN had a high average recognition accuracy for different categories of electrical appliances on the grounds of the training set, with a minimum classification error level of 0.050.The CP of the test set was optimal.The PSO-BiGRU model had been optimized using the PSO algorithm, resulting in better convergence performance and refinement of prediction results.The loss function curve converged to a minimum value of around 0.18.Compared to other models, the F1 value of the PSO-BiGRU model converged to 90.06%, and both MAE and RMSE were below 0.4, indicating the best overall performance.
The successful application of this method can help the PSY achieve effective EC management and optimized use, ensuring the stable operation of the PSY.Accurate load identification and forecasting helps power companies to better plan and manage power networks, adjust generation, optimize transmission lines and prepare for peak loads in advance.It also further promotes the mature application of NILM to realize the automation, intelligence and sustainable development of PSY.However, in the actual smart grid environment, data acquisition and processing still bring uncertain errors to load identification and prediction.NILM involves a large amount of energy data, and its user privacy and data security need to be strengthened.In addition, its high-performance hardware support poses challenges for load recognition and prediction.Load identification involves a large number of electrical appliances, and there are differences in the characteristics of different types of appliances.Different regions and suppliers use different monitoring systems and technical standards.Cross platform data integration and standardization processing, as well as unified recognition of multiple features, will be the future research direction.
Fig. 1 Schematic diagram of RBM structure and solution method

Fig. 2
Fig. 2 Schematic diagram of DBN learning structure and composition max − w max − w min x max * x Spread indicators, the highest SSA values are 0.787 and 0.765, indicating good population diversity and distribution in the solution set.The K-nearest Neighbor algorithm (KNN), BPNN, traditional DBN, and SSA-DBN are used to classify and recognize the same load data.Firstly, it compares the Precision Recall (P-R) and Receiver Operating Characteristic Curve (ROC) of different recognition algorithms.The relevant outcomes are shown in Fig.

8
Fig. 9 F1 values and loss function curves for different models

Fig. 11
Fig. 11 Comparison between predicted and true values

Table 1
Comparison of optimization quality of different intelligent OA