Method and device for recovering abnormal load data of power monitoring system
By using the optimized BiLSTM model and GEP algorithm in the power monitoring system for hyperparameter optimization, the uncertainty and dependency problems in the recovery of abnormal load data of the power monitoring system are solved, and an efficient and automated data recovery process is achieved.
Patent Information
- Application Number
- CN202510001963.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-06-03
AI Technical Summary
The existing power monitoring system load abnormal data recovery methods have uncertainty, limitations and dependence on experience in the data recovery process, and it is difficult to accurately capture complex timing characteristics and multi-dimensional, heterogeneous, and dynamically changing data.
The Bidirectional Long Short-term Memory Network (BiLSTM) model is used, and the hyperparameters of the BiLSTM model are globally optimized through the Gene Expression Programming (GEP) algorithm. The optimized model is used to repair load data abnormalities in the power monitoring system.
It realizes an automated processing process from data acquisition, preprocessing, abnormal detection, model optimization to data recovery, which reduces the dependence on experience and the need for manual intervention, and improves the accuracy and efficiency of data recovery.
Smart Images

Figure CN120086209A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of power monitoring system data recovery, and particularly relates to a method and device for recovering abnormal load data in a power monitoring system. Background Art
[0002] Power monitoring systems are an indispensable infrastructure in today's society, with characteristics such as complexity, large scale, and high stability. In a huge and complex power monitoring system, a large amount of telemetry and telecontrol data is extremely crucial for load forecasting. The stable operation of the power monitoring system requires accurate, complete, and effective processing of this data.
[0003] However, in actual operation, factors such as sensor failures, data acquisition errors, or human operation errors can cause abnormal data in the power monitoring system. Abnormal data can affect power grid load forecasting and interfere with the normal operation of the power monitoring system. Therefore, adopting reliable data recovery measures has become the key to addressing this challenge. Data recovery technology can help grid dispatchers accurately predict periodic loads such as daily and weekly loads, and ensure the normal operation of the power monitoring system.
[0004] Currently, the methods for recovering abnormal load data in power monitoring systems face many challenges. On the one hand, the time series characteristics of abnormal data are complex, and a single traditional method is difficult to accurately capture its complex patterns. On the other hand, the abnormal data distribution is random and non-linear, which brings uncertainty to the data recovery process. Some existing recovery methods, such as algorithms based on statistical models or machine learning, can recover abnormal data to a certain extent, but they have limitations in dealing with multi-dimensional, heterogeneous, and dynamically changing data. In addition, the setting and optimization of model parameters often rely on experience or manual tuning, resulting in unstable recovery effects and low efficiency. Summary of the Invention
[0005] To overcome the problems existing in the related art, the embodiments of this application provide a method and device for recovering abnormal load data in a power monitoring system, which can solve the problems of uncertainty, limitations, and dependence on experience in the data recovery process.
[0006] This application is implemented through the following technical solutions:
[0007] In a first aspect, the embodiments of this application provide a method for recovering abnormal load data in a power monitoring system, including:
[0008] Obtain the load data of the power monitoring system;
[0009] Preprocess the load data and determine the abnormal conditions of the load data;
[0010] If there are abnormalities in the load data, the abnormal load data is input into the optimized long short-term memory network model for recovery to obtain the recovered data set; the optimized long short-term memory network model is the long short-term memory network model obtained by optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm; the hyperparameters include the number of network layers, time step, weight, and bias.
[0011] The recovered data set is de-normalized to maintain the same range as the abnormal load data to obtain the finally recovered load data.
[0012] In a possible implementation manner of the first aspect, optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm includes:
[0013] Generating the configuration combination of each chromosome according to the initial parameters of the long short-term memory network model; the initial parameters include the initial number of network layers, initial time step, initial weight, and initial bias.
[0014] Determining the fitness of the chromosome under each configuration combination.
[0015] Comparing the fitness of the chromosome under each configuration combination with the fitness threshold. If the fitness of the chromosome under each configuration combination is less than the fitness threshold, the optimal individual is determined by using the roulette wheel algorithm, and a new population is formed based on the optimal individual.
[0016] Training each individual in the new population and recalculating the fitness of each individual in the new population, iterating a preset number of times until the fitness of each individual in the new population meets the fitness threshold.
[0017] In a possible implementation manner of the first aspect, optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm further includes:
[0018] If the fitness of the chromosome under each configuration combination is greater than or equal to the fitness threshold, the hyperparameters of the long short-term memory network model are no longer optimized; wherein, the current long short-term memory network model is used as the optimized long short-term memory network model.
[0019] In a possible implementation manner of the first aspect, determining the fitness of the chromosome under each configuration combination includes:
[0020] Calculating the loss function corresponding to the chromosome under each configuration combination.
[0021] Calculating the fitness function based on the loss function; the fitness function is used to determine the fitness of the chromosome under each configuration combination.
[0022] In a possible implementation of the first aspect, the fitness threshold includes a first fitness threshold, a second fitness threshold, and a third fitness threshold; the first fitness threshold is greater than the second fitness threshold, and the second fitness threshold is greater than the third fitness threshold.
[0023] In a possible implementation of the first aspect, the first fitness threshold is 50; the second fitness threshold is 20; the third fitness threshold is 10.
[0024] In a possible implementation of the first aspect, the loss function MSE of the number of layers in the optimized long short-term memory network model L is expressed as:
[0025]
[0026] where is the repaired value of the i-th chromosome optimized by the number of layers L; n is the number of samples, and y i is the true value of the i-th chromosome, is the restored value of the i-th chromosome optimized by the number of layers L.
[0027] In a possible implementation of the first aspect, the method for recovering abnormal load data in the power monitoring system further includes;
[0028] If there is no abnormality in the load data, the restored data set is denormalized to keep the same range as the abnormal load data, and the finally restored load data is obtained.
[0029] In a possible implementation of the first aspect, comparing the fitness of the chromosomes under each configuration combination with the fitness threshold includes:
[0030] The data characteristics and weights of the chromosomes under each configuration combination are determined to obtain the fitness threshold; the data characteristics of the chromosomes under each configuration combination include seasonal fluctuation characteristics, short-term load spikes, long-term trend characteristics, and the differences between stable periods and fluctuating periods.
[0031] In a second aspect, the present application provides a device for recovering abnormal load data in a power monitoring system, which implements the method for recovering abnormal load data in the power monitoring system as in the first aspect, including:
[0032] A data acquisition module, configured to acquire load data of the power monitoring system;
[0033] A data processing module, configured to preprocess the load data and determine the abnormality of the load data;
[0034] A data recovery module, which is used to input the abnormal load data into the optimized long short-term memory network model for recovery if the load data is abnormal, and obtain the recovered data set; the optimized long short-term memory network model is a long short-term memory network model obtained by optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm; the hyperparameters include the number of network layers, time step, weight, and bias.
[0035] A data sorting module, which is used to perform denormalization on the recovered data set to keep the same range as the abnormal load data, and obtain the finally recovered load data.
[0036] The beneficial effects of the embodiments of the present application compared with the prior art are as follows:
[0037] In the embodiments of the present application, through the technical architecture of optimizing the parameters of the Bidirectional Long Short-Term Memory (BiLSTM), the GEP (Gene Expression Programming) algorithm is used to globally optimize the hyperparameters of the BiLSTM model to avoid the instability and inefficiency problems caused by manual parameter tuning, and improve the recovery performance of the model. Finally, the optimized BiLSTM model is used to repair the load data of the power monitoring system containing outliers to ensure the integrity and correctness of the data set. This method realizes an automated processing flow from data acquisition, preprocessing, anomaly detection, model optimization to data recovery, reduces the dependence on experience and the need for manual intervention, and improves the processing efficiency.
[0038] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 It is an application scenario diagram of the method for recovering abnormal load data of the power monitoring system provided by an embodiment of the present application;
[0041] Figure 2 It is a flowchart of the method for recovering abnormal load data of the power monitoring system provided by an embodiment of the present application;
[0042] Figure 3It is a schematic flow chart for optimizing hyperparameters of a long short-term memory network model using the GEP algorithm provided by an embodiment of the present application;
[0043] Figure 4 It is a detailed schematic flow chart for optimizing hyperparameters of a long short-term memory network model using the GEP algorithm provided by an embodiment of the present application;
[0044] Figure 5 It is a schematic structural diagram of a load abnormal data recovery device for a power monitoring system provided by an embodiment of the present application. Detailed implementation manners
[0045] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system architectures and technologies are presented to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0046] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0047] It should also be understood that the term "and / or" as used in the specification and appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0048] As used in the specification and appended claims of the present application, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if detecting [the described condition or event]" can be interpreted as meaning "once determined", "in response to determining", "once detecting [the described condition or event]", or "in response to detecting [the described condition or event]" depending on the context.
[0049] In addition, in the description of the specification and appended claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0050] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that specific features, structures or characteristics described in connection with that embodiment are included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0051] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0052] Refer to Figure 1 As shown, it is an application scenario diagram of the method for recovering abnormal load data of the power monitoring system of the present invention. The prediction method runs in the data recovery device 102. The data recovery device 102 obtains load data from the power monitoring system 101, quickly distinguishes normal and abnormal load data in the power monitoring system, performs recovery processing on the load data of the power monitoring system 101 with abnormal conditions, and sends load data without abnormal conditions and load data with abnormal conditions and that have been recovered to the control center 103. The control center 103 plans the allocation of power resources in advance based on the complete and accurate load data to cope with the upcoming peak or trough period of electricity consumption and ensure the normal operation of the power monitoring system.
[0053] Figure 2 It is a schematic flowchart of the method for recovering abnormal load data of the power monitoring system provided by an embodiment of this application. Refer to Figure 2 and the details of the method for recovering abnormal load data of the power monitoring system are as follows:
[0054] An embodiment of this application provides a method for recovering abnormal load data of a power monitoring system, including:
[0055] Step 201, obtain the load data of the power monitoring system.
[0056] Obtaining the load data of the power monitoring system is crucial for the stable operation and effective management of the power monitoring system. These data can be obtained in various ways, for example, by installing metering devices at key nodes of each substation and grid-connected power plant network. The metering device can collect the inflow and outflow of electricity in real time and accurately, and then calculate the real-time load data.
[0057] At the same time, power enterprises can also utilize advanced sensor technologies. These sensors can be deployed at the power transmission lines and the power consumption equipment terminals. They can not only monitor the load data of the power monitoring system, but also collect relevant data such as voltage and current, providing more basis for comprehensively analyzing the characteristics of the load.
[0058] In addition, big data technology also plays an important role in obtaining the load data of the power monitoring system. Power enterprises can integrate the historical power consumption data from different regions and different types of users to establish a large database and directly obtain the load data from the database.
[0059] Step 202: Preprocess the load data and determine the abnormal conditions of the load data.
[0060] Exemplarily, in order to ensure the accuracy and reliability of abnormal data recovery, the load data of the power monitoring system is cleaned, screened and standardized to ensure the accuracy of abnormal data recovery.
[0061] In a complex power monitoring system, due to the huge complexity of the data, it is generally necessary to perform linear normalization on the data so that all samples are between 0 and 1. The linear normalization formula is:
[0062]
[0063] where, X norm is the normalized value, X represents any sample value, X min is the minimum value in the data, and X max is the maximum value in the data.
[0064] Step 203: If there are abnormal load data, input the abnormal load data into the optimized long short-term memory network model for recovery to obtain the recovered data set.
[0065] Among them, the optimized long short-term memory network model is the long short-term memory network model obtained by optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm; the hyperparameters include the number of network layers, time step, weight and bias.
[0066] Exemplarily, before inputting the abnormal load data into the optimized long short-term memory network model for recovery, the GEP algorithm can be used to optimize the hyperparameters of the long short-term memory network model to obtain the optimized long short-term memory network model.
[0067] By introducing the GEP algorithm and using the unique coding method of the GEP algorithm, the complex network structure and parameter search problems are simplified into expression representations to optimize the structure and parameters of the BiLSTM model.
[0068] Exemplarily, the system first determines whether there are outliers in the data set. If outliers are found, the optimized BiLSTM model can effectively recover the outliers in the data. Utilizing the time series data prediction ability of the optimized BiLSTM model, these outliers are recovered based on the context data, thus ensuring the integrity and correctness of the data.
[0069] Step 204, perform inverse normalization on the recovered data set to keep the same range as the load data with outliers, obtaining the finally recovered load data.
[0070] In this embodiment, the load data of the power monitoring system is standardized, and the hyperparameters are optimized through the BiLSTM optimization module to avoid the inefficiency of the model in capturing long-term dependencies in the data due to unreasonable hyperparameter configurations, resulting in overfitting or underfitting; and, the structure and key parameters of the BiLSTM network are optimized and adjusted through the GEP algorithm, effectively improving the accuracy and computational efficiency of the model in complex time series data processing. The optimized model can repair the outliers in the load data, ensuring the integrity and consistency of the data, and thus greatly improving the reliability and robustness of the operation of the power monitoring system.
[0071] In one embodiment, before inputting the load data of the power monitoring system with outliers into the optimized long short-term memory network model for recovery, the bidirectional dependence mechanism of BiLSTM is used to capture the time series characteristics of the data of the power monitoring system, effectively process complex non-linear relationships, and thus better recover the abnormal data. Moreover, the parameters of BiLSTM are automatically globally optimized to avoid the instability and inefficiency problems brought by manual parameter tuning, further improving the effect of data recovery.
[0072] See Figure 3 , the hyperparameters of the long short-term memory network model are optimized using the GEP algorithm, including:
[0073] Step 301, generate the configuration combination of each chromosome according to the initial parameters of the long short-term memory network model.
[0074] Among them, the initial parameters include the initial number of network layers L, the initial time step T, the initial weight W, and the initial bias b. The initial parameters of the BiLSTM model can be represented as the initial vector θ:
[0075] θ = [L, T, W, b] (2)
[0076] During the optimization process, in order to optimize the performance of the BiLSTM model, the GEP algorithm generates an initial chromosome population through random initialization, where each individual represents a possible combination of the initial parameters of the BiLSTM network. Each chromosome θ irepresents a specific parameter combination θ i =[[L i ,[[T i ,[[W i ,[[b i , and the generated initial chromosome population R can be expressed as:
[0077] R = {θ 1 ,[[θ 2 ,...,[[θ m} (3)
[0078] where m is the number of chromosomes in the population, and θ i is the i-th initial vector, representing different BiLSTM model parameter combinations. Through this random initialization method, the diversity of the population can be ensured, providing a wide search space for subsequent model optimization.
[0079] Step 302, determine the fitness of the chromosomes under each configuration combination.
[0080] Exemplarily, determining the fitness of the chromosomes under each configuration combination includes:
[0081] First, calculate the loss function corresponding to the chromosomes under each configuration combination.
[0082] For the BiLSTM model corresponding to each chromosome θ i , use the data to train the model. After each BiLSTM model is trained, it is necessary to evaluate the performance of the model on the dataset, and the prediction effect of the model needs to be measured by calculating the loss function of the model. In this embodiment, MSE is used as the loss function, which can reflect the mean squared error between the restored value and the true value. The formula is as follows:
[0083]
[0084] where q i represents the loss function value of the i-th individual, that is, MSE; n is the number of samples, y i is the true value, is the restored value.
[0085] Considering that the load data of the power monitoring system has the following several significant characteristics: First, seasonal fluctuations, where the load in summer and winter fluctuates significantly with temperature changes. Second, short-term load spikes, where the sudden increase in load (due to weather changes or drastic fluctuations in user behavior) causes the load to increase rapidly within a short period. Third, long-term trends, where the load usually has a long-term growth trend or periodic changes. Fourth, the difference between the stable period and the fluctuating period, where the load fluctuates less during the stable period and more during the fluctuating period. The optimization objectives focus on key parameters such as the number of network layers L, time step T, weight W, and bias b, and optimizing different parameters aims to address different fluctuation situations.
[0086] The optimization of the number of layers L is used to adjust the network depth so that the model can both capture long-term trends and respond to short-term fluctuations. Too few layers will cause the model to be unable to capture complex periodic or trend changes, resulting in low repair accuracy and a high MSE. Too many layers may cause the model to overfit the training data, especially when the training data is insufficient or noisy, which will instead increase the MSE. By adjusting the number of layers L, the optimized model can balance the extraction of long-term and short-term information, thereby improving the fitting degree of the load data of the power monitoring system.
[0087] Exemplarily, when the fitness of each individual in the new population meets the fitness threshold, the optimized long short-term memory network model is obtained, and the MSE of the loss function of the number of layers in the optimized long short-term memory network model L is expressed as:
[0088]
[0089] where is the repaired value of the i-th chromosome obtained by optimizing the number of layers L; n is the number of samples, and y i is the true value of the i-th chromosome, is the restored value of the i-th chromosome obtained by optimizing the number of layers L. Optimizing the number of layers can improve the repair accuracy.
[0090] The time step T determines the size of the historical data window considered by the model each time it is updated: Daily load fluctuations usually require a shorter time step to be effectively captured. For seasonal fluctuations and annual load changes, a longer time step is required to capture the overall trend. If the time step T is set too short, the model may only focus on local short-term fluctuations and ignore long-term trends; if set too long, it will introduce too much irrelevant information and affect the repair accuracy. By optimizing the time step T, the model can pay more attention to the historical data most relevant to the current load change, accurately capture periodic changes, and thus improve the repair accuracy. The MSE of the loss function of the time step in the optimized long short-term memory network model T is expressed as:
[0091]
[0092] Among them, is the recovery value of the i-th chromosome optimized by the time step T. When optimizing T, the repair accuracy of the model on periodic load fluctuations can be improved.
[0093] In the load data of the power monitoring system, the feature importance varies in different time periods. Especially, the load peak period has the greatest impact on the stable operation of the power monitoring system. If the weight W is set improperly, the model may pay too much attention to daily fluctuations and ignore the key load peaks, resulting in an unsatisfactory repair effect. By optimizing the weight W, the model can flexibly adjust the degree of attention to different features, ensuring sufficient attention to the most important data (load peaks and sudden events) in the power monitoring system. The loss function MSE of the weight in the optimized long short-term memory network model W is expressed as:
[0094]
[0095] Among them, is the recovery value of the i-th chromosome optimized by the weight W. The optimized weight can make the repair model focus on the data that has a key impact on the scheduling of the power monitoring system.
[0096] The load data of the power monitoring system usually shows seasonal fluctuations, mainly due to the impact of seasonal changes on electricity demand. The loads in winter and summer are usually higher than those in spring and autumn. This kind of fluctuation is periodic and is closely related to factors such as weather and temperature changes. This kind of seasonal fluctuation often has strong regularity and is an important feature in the power monitoring system. In order to accurately repair or predict the load data, the model needs to be able to fully consider these long-term trends and seasonal fluctuations. Otherwise, the model may mistake the seasonal fluctuations for random noise, thus affecting the repair effect. The loss function MSE of the bias in the optimized long short-term memory network model b is expressed as:
[0097]
[0098] Among them, is the recovery value of the i-th chromosome optimized by the bias b. By optimizing the bias b, the model can better align the long-term trends and seasonal changes of the load data.
[0099] Secondly, the fitness function is calculated based on the loss function. The fitness function is used to determine the fitness of the chromosome under each configuration combination.
[0100] To evaluate the relative merits of each BiLSTM model parameter, a fitness function is used to measure the performance of each parameter combination. The fitness function can be defined by an inverse relationship with the loss, and the higher the fitness value, the better the model performance. The fitness function F i The calculation formula is as follows:
[0101]
[0102] where F i is the fitness value of the i-th chromosome (i.e., the i-th BiLSTM model parameter combination); ε is a very small positive number used to prevent the denominator from being zero; MSE can be the mean of MSE L , MSE T , MSE W and MSE b , or the mean of MSE L , MSE T , MSE W and MSE b . If the fitness of a certain chromosome reaches the preset condition, the optimal parameter combination of the BiLSTM is obtained.
[0103] Step 303: Compare the fitness of the chromosomes under each configuration combination with the fitness threshold. If the fitness of the chromosomes under each configuration combination is less than the fitness threshold, the optimal individual is determined by using the roulette wheel algorithm, and a new population is formed based on the optimal individual.
[0104] Exemplarily, the fitness threshold includes a first fitness threshold, a second fitness threshold, and a third fitness threshold; the first fitness threshold is greater than the second fitness threshold, and the second fitness threshold is greater than the third fitness threshold.
[0105] Exemplarily, when there are abnormal spikes or sudden events in the load, the accuracy requirement for load anomaly data recovery is higher, and the model needs to be able to accurately recover the data after sudden load changes. The first fitness threshold is 50 to ensure a higher recovery accuracy during these critical periods; under normal circumstances, the load data fluctuates less, and the impact of outliers is not particularly severe, but the repair accuracy still needs to reach a certain level. The second fitness threshold is 20. In this case, it is usually to handle ordinary missing data or minor outliers (sensor fluctuations, minor data loss), and when the fitness value reaches this threshold, it is considered that the recovery effect is good; during periods of low load or stable load fluctuations, the accuracy requirement for abnormal data recovery is lower, and a certain recovery error can be tolerated. The third fitness threshold is 10, reflecting that the accuracy requirement for recovery during this stable period is relatively loose. During periods of small load fluctuations, the recovery error has little impact on the system, and the accuracy requirement for recovery is lower, but the continuity and integrity of the recovered data still need to be ensured.
[0106] Exemplarily, in step 203, comparing the fitness of the chromosomes under each configuration combination with the fitness threshold includes:
[0107] The data characteristics and weights of the chromosomes under each configuration combination are used to determine the fitness threshold; the data characteristics of the chromosomes under each configuration combination include seasonal fluctuation characteristics, short-term load spikes, long-term trend characteristics, and the differences between stable periods and fluctuating periods.
[0108] Step 304, training each individual in the new population and recalculating the fitness of each individual in the new population, iterating a preset number of times until the fitness of each individual in the new population meets the fitness threshold, as Figure 4 shown.
[0109] First, a selection operation is performed. The selection operation can ensure that chromosomes with high fitness have a greater probability of being retained in the next generation. The present invention uses the roulette wheel selection method and performs proportional selection based on the fitness values of each chromosome. The probability P i of a chromosome being selected is:
[0110]
[0111] where F i is the fitness of the i-th chromosome; m is the number of individuals in the population.
[0112] In each generation, individuals with higher fitness values have a greater probability of being selected as parents for subsequent operations. The selected chromosomes are copied into the next generation, and their original gene structures are retained to ensure the transmission of excellent characteristics.
[0113] However, in order to prevent the model from falling into a local optimal solution, it is necessary to introduce the diversity of the population, and a mutation operation is also required for the selected chromosome genes. The number of layers L of the BiLSTM determines the depth of the network. During the mutation process, the expression ability of the model can be adjusted by increasing or decreasing the number of network layers. The mutation formula for the number of layers is:
[0114] L' = L ± ΔL (11)
[0115] where L' is the number of layers after mutation, L is the number of layers before mutation, and ΔL is an integer step size used to adjust the number of layers, representing the increase or decrease amplitude of the number of layers.
[0116] The time step T determines the time window size of the BiLSTM model in time series data. During the mutation process, the ability of the model to capture time series dependencies can be adjusted by increasing or decreasing the time step. The mutation formula for the time step is:
[0117] T' = T ± ΔT (12)
[0118] Among them, T' is the mutated time step, T is the time step before mutation, and ΔT is a small step used to adjust the time step, representing the increase or decrease of the time step.
[0119] The weight W is a very important parameter in the BiLSTM model. During the mutation process, the weight is adjusted by adding random noise from a normal distribution. The mutation formula for the weight is:
[0120]
[0121] where W′ is the mutated weight and W is the weight before mutation. is the normal distribution noise used to introduce randomness.
[0122] The bias b is another important parameter in the neural network, which affects the activation function of the network. By randomly fine-tuning the bias, the expressiveness of the network can be further enhanced. The mutation formula for the bias vector is:
[0123] b' = b ± Δb (14)
[0124] where b' is the mutated bias, b is the bias before mutation, and Δb is the random perturbation used to adjust the bias, similar to the way of weight adjustment.
[0125] Through the above mutation steps, the newly generated chromosome is:
[0126] θ' = [L', T', W', b'] (15)
[0127] After the mutation operation is completed, the genes of the parent individuals are further recombined to generate new offspring individuals. This operation, while maintaining the excellent characteristics of the parent, introduces new parameter combinations through gene recombination, further enhancing the diversity of the population and significantly adjusting the model structure and parameters. The recombination operation first selects a crossover point and then generates new offspring by exchanging the parameters (i.e., the number of layers L, the time step T, the weight W, and the bias b) of the parent individuals. Suppose two parents are selected:
[0128] θ old1 = [L 1 , T 1 , W 1 , b 1 (16)
[0129] θ old2 = [L 2 , T 2 , W 2 , b 2 (17)
[0130] In the recombination operation, parts of the genes of two parents are exchanged to generate new offspring. Assuming the recombination operation is performed on the weight W and the bias b, the gene combination of the new offspring is as follows:
[0131] θ new =[L 1 ,T 1 ,W 2 ,b 2 (18)
[0132] This recombination operation generates offspring with new characteristics by exchanging different gene parts, further exploring different model parameter configurations, thereby improving the ability of the model to search for the global optimal solution.
[0133] After performing the mutation and recombination operations, the fitness of each chromosome in the new population is re-evaluated to measure the performance of each new chromosome. This process is iterated until the fitness value converges to obtain the optimal vector θ of the BiLSTM network parameters best Combination:
[0134] θ best =[L best ,T best ,W best ,b best (19)
[0135] Exemplarily, optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm further includes:
[0136] Step 305, if the fitness of the chromosome under each configuration combination is greater than or equal to the fitness threshold, the hyperparameters of the long short-term memory network model are no longer optimized.
[0137] Wherein, the current long short-term memory network model is used as the optimized long short-term memory network model.
[0138] In the process of optimizing BiLSTM based on the GEP algorithm in this embodiment, the main optimization objectives focus on key parameters such as the number of network layers L, time step T, weight W, and bias b. By optimizing these parameters, the overall performance of the model in processing complex time-series data can be improved. The number of network layers L directly affects the depth of the network. Excessive depth may lead to overfitting of the model, while too shallow depth may result in insufficient expressive ability of the model. The GEP algorithm optimizes the number of layers to achieve the best balance between capturing data features and model complexity. The optimization of the time step T can ensure that the model can extract useful information within a reasonable time window and avoid noise or information loss caused by inappropriate step selection. For the BiLSTM network, the initial value of the weight W is crucial for the convergence speed and stability of the network. Reasonable weight initialization can effectively accelerate the training process of the model and reduce the local optimum problem caused by inappropriate initial weight selection. The tuning of the bias b further enhances the performance of the activation function of the network in the state without input, making the model more stable in the initial stage of training. Through the optimization of these parameters, the GEP algorithm can reduce the overfitting phenomenon of the model, enhance the generalization ability and training efficiency of the model, and thus ensure good performance within a short training time.
[0139] In one implementation, in step 103, once abnormal load data is detected, this load data will be input into the optimized BiLSTM network for processing. The optimized BiLSTM network uses its bidirectional long short-term memory unit structure to process time-series data simultaneously from the forward and backward directions, capture the dependencies in the data, and recover these outliers based on historical data. Inputting the load data of the power monitoring system with anomalies into the optimized long short-term memory network model for recovery includes:
[0140] First, input the abnormal load data x t into the network and process it according to the optimal time step T best (denoted as t later) to ensure that the most useful time-series information is captured within an appropriate time window. Subsequently, the data is processed through multiple BiLSTM layers in sequence. Here, the number of layers L best is the optimal parameter determined by optimizing through the GEP algorithm, which is used to balance the complexity and expressive ability of the model and ensure that the network has sufficient depth to process complex time-series data.
[0141] In the forward LSTM, the input gate, forget gate, and output gate control the flow of data. The weight W best and bias b best optimized by the GEP algorithm will ensure that the flow of data at each step conforms to the best state of the network.
[0142] Input gate: it represents the activation value of the input gate in the forward LSTM, and σ() is the activation function; W i best and are the input gate parameters optimized by GEP, and h t-1 is the hidden state at the previous moment.
[0143] Forget gate: f t represents the activation value of the forget gate, and the optimized forget gate weights and biases can determine the degree of retention or forgetting of the memory state at the previous moment at the current moment; U f is the forget gate weight.
[0144] Output gate: o t is the activation value of the output gate, and the output gate controls the output of the current hidden state h t The optimization of the weights and biases can help the output result to accurately reflect the characteristics of the current data; U o is the output gate weight.
[0145] Memory state update: Through the combined action of the input gate and the forget gate, the memory state c t is updated at each time step t, and the formula is: c t-1 is the memory state at the previous moment, U c is the output gate weight, ⊙ is the Hadamard product, and W c best and are the optimized memory state parameters, which are used to ensure the accuracy and stability in the memory update process.
[0146] Hidden state update: The hidden state h t is updated through the output gate and the memory state, and its formula is: h t = o t ⊙ tanh(c t ), where o t and c t ensure that during the recovery process, the output of the hidden state can accurately reflect the characteristics of the input data.
[0147] The calculation of the reverse LSTM is similar to that of the forward LSTM, but the direction of processing the sequence is opposite, processing data from the end point to the start point of the sequence. The formula form is the same as that of the forward LSTM, but only the order of data processing is different.
[0148] After the calculations of the forward and reverse LSTMs are completed, the hidden states output by the network at each time step t are concatenated to obtain the final bidirectional output. Among them is the hidden state of the forward LSTM, is the hidden state of the reverse LSTM. Through this concatenation, the BiLSTM network can capture both forward and reverse temporal dependency information, thus more comprehensively understanding the data features. Next, the output layer of the network passes the hidden state h of the bidirectional LSTM t to the fully connected layer. After being processed by the fully connected layer, the network generates the final recovery result.
[0149] In this embodiment, the optimized BiLSTM network is used to process the outliers in the dataset to ensure the integrity and accuracy of the data. When the dataset is input into the system, it is first detected to determine whether there are outliers. If no outliers are detected, the data will directly enter the subsequent normal processing flow; if the system detects outliers, the recovery process will be triggered.
[0150] In one embodiment, the method for recovering abnormal load data in a power monitoring system further includes;
[0151] Step 105, if there is no abnormality in the load data, the recovered dataset is denormalized to the same range as the load data with abnormalities to obtain the finally recovered load data.
[0152] Exemplarily, the recovered data is denormalized back to the original range for integration with other normal data:
[0153] X orig = X norm × (X max - X min ) + X min (20)
[0154] The recovered dataset is sent to the data control center for further analysis and application.
[0155] In this embodiment, the parameters of the BiLSTM are optimized by GEP to achieve the efficient recovery of abnormal load data in the power monitoring system, significantly improving the robustness and accuracy of data processing. This method utilizes the advantage of the BiLSTM's bidirectional temporal modeling to effectively capture the complex temporal characteristics of the load data, and through the global optimization of the GEP algorithm, adaptively adjusts the model parameters to better handle the non-linearity and random distribution problems of abnormal data, thereby improving the stability and accuracy of data recovery and ensuring the reliability and continuity of the operation of the power monitoring system.
[0156] The load abnormal data recovery method of the power monitoring system in the embodiment of the present application adopts a power monitoring system load abnormal data recovery method based on the parameter optimization of the bidirectional long short-term memory network (BiLSTM).
[0157] To ensure the accuracy and reliability of the abnormal data recovery model, this patent comprehensively processes and analyzes the load data. This process covers data cleaning, screening, and normalization processing to ensure the stability and consistency of the input data.
[0158] In terms of model optimization, this module introduces the GEP algorithm to optimize the structure and key parameters of the BiLSTM. GEP is a powerful evolutionary computing method that simplifies the complex network structure search and parameter optimization problems into the combinatorial representation of expressions. Compared with traditional network optimization algorithms, GEP can not only optimize the structure and parameters simultaneously but also find a model configuration with better performance in a larger search space.
[0159] In the specific optimization process, GEP first generates an initial population. Each chromosome represents a possible BiLSTM network configuration, and the genes of these individuals include the key initialization parameters of the network, namely the number of layers L, the time step T, the weight matrix W, and the bias vector b. GEP gradually optimizes these parameters to improve the performance of the BiLSTM in processing time series data. Through parameter adjustment, this patent ensures that the model obtains the optimal performance in a shorter time, not only improving the convergence speed of the model but also making it more robust and accurate in processing complex time series data.
[0160] When an abnormal value is detected, the optimized BiLSTM network is used to recover it. The bidirectional structure of the BiLSTM can make full use of the context information of the time series data to accurately predict the correct value of the abnormal data. The recovered data undergoes anti-normalization processing to restore its value to the original range, and the final result is sent to the control center for subsequent analysis and decision-making applications.
[0161] See Figure 5 , the embodiment of the present application provides a device for recovering load abnormal data of a power monitoring system, which executes the power monitoring system load abnormal data recovery method as described in the above embodiment, including a data acquisition module 401, a data processing module 402, a data recovery module 403, and a data sorting module 404.
[0162] The data acquisition module 401 is used to acquire the load data of the power monitoring system.
[0163] The data processing module 402 is used to preprocess the load data and determine the abnormal situation of the load data.
[0164] A data recovery module 403, which is configured to, if there is an abnormality in the load data, input the abnormal load data into an optimized long short-term memory network model for recovery to obtain a recovered data set; the optimized long short-term memory network model is a long short-term memory network model obtained by optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm; the hyperparameters include the number of network layers, time step, weight, and bias.
[0165] A data sorting module 404, which is configured to denormalize the recovered data set to keep the same range as the abnormal load data to obtain the finally recovered load data.
[0166] Exemplarily, the power monitoring system load abnormal data recovery device further includes a model optimization module, and the model optimization module is specifically configured to optimize the hyperparameters of the long short-term memory network model using the GEP algorithm.
[0167] Optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm includes:
[0168] Generating a configuration combination for each chromosome according to the initial parameters of the long short-term memory network model; the initial parameters include the initial number of network layers, initial time step, initial weight, and initial bias;
[0169] Determining the fitness of the chromosome under each configuration combination;
[0170] Comparing the fitness of the chromosome under each configuration combination with the fitness threshold, if the fitness of the chromosome under each configuration combination is less than the fitness threshold, then determining the optimal individual by using the roulette wheel algorithm and forming a new population based on the optimal individual;
[0171] Training each individual in the new population and recalculating the fitness of each individual in the new population, iterating a preset number of times until the fitness of each individual in the new population meets the fitness threshold.
[0172] Exemplarily, optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm further includes:
[0173] If the fitness of the chromosome under each configuration combination is greater than or equal to the fitness threshold, then no longer optimize the hyperparameters of the long short-term memory network model; wherein, the current long short-term memory network model is used as the optimized long short-term memory network model.
[0174] Exemplarily, determining the fitness of the chromosome under each configuration combination includes:
[0175] Calculating the loss function corresponding to the chromosome under each configuration combination;
[0176] Calculate the fitness function based on the loss function; the fitness function is used to determine the fitness of the chromosome under each configuration combination.
[0177] Exemplarily, the fitness thresholds include a first fitness threshold, a second fitness threshold, and a third fitness threshold; the first fitness threshold is greater than the second fitness threshold, and the second fitness threshold is greater than the third fitness threshold.
[0178] Exemplarily, the first fitness threshold is 50; the second fitness threshold is 20; the third fitness threshold is 10.
[0179] Exemplarily, the mean squared error (MSE) of the number of layers in the optimized long short-term memory network model L is expressed as:
[0180]
[0181] where is the i-th chromosome repair value optimized through the number of layers L; n is the number of samples, and y i is the true value of the i-th chromosome, is the recovery value of the i-th chromosome optimized through the number of layers L.
[0182] Exemplarily, the data collation module 404 is further configured to:
[0183] If there is no abnormality in the load data, denormalize the recovered data set to keep the same range as the load data with abnormalities, and obtain the finally recovered load data.
[0184] Exemplarily, comparing the fitness of the chromosome under each configuration combination with the fitness threshold includes:
[0185] Determine the fitness threshold based on the data characteristics and weights of the chromosome under each configuration combination; the data characteristics of the chromosome under each configuration combination include seasonal fluctuation characteristics, short-term load spikes, long-term trend characteristics, and the differences between the stable period and the fluctuating period.
[0186] For the beneficial effects of a load abnormal data recovery device of a power monitoring system, refer to the beneficial effects of a load abnormal data recovery method of a power monitoring system.
[0187] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0188] It should be noted that although several units / modules or sub-units / modules of the power monitoring system load abnormal data recovery device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / modules. Conversely, the features and functions of one unit / modules described above can be further divided and embodied by multiple units / modules.
[0189] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0190] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, the power monitoring system load abnormal data recovery method provided in the above embodiments of the present application is implemented.
[0191] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0192] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for recovering abnormal load data of a power monitoring system, characterized in that: include: Obtain load data from the power monitoring system; Preprocessing the load data and determining abnormal conditions of the load data; If the load data is abnormal, the abnormal load data is input into the optimized long short-term memory network model for recovery to obtain a recovered data set; the optimized long short-term memory network model is a long short-term memory network model obtained by optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm; the hyperparameters include the number of network layers, time step, weight and bias; The restored data set is denormalized to maintain the same range as the load data with the abnormality, so as to obtain the load data that is finally restored.
2. The method for recovering abnormal load data of a power monitoring system according to claim 1, characterized in that: The method of optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm includes: Generate a configuration combination of each chromosome according to initial parameters of the long short-term memory network model; the initial parameters include an initial number of network layers, an initial time step, an initial weight, and an initial bias; Determine the fitness of the chromosome under each configuration combination; Comparing the fitness of the chromosome under each configuration combination with the fitness threshold, if the fitness of the chromosome under each configuration combination is less than the fitness threshold, determining the optimal individual by using a roulette algorithm, and forming a new population based on the optimal individual; Each individual in the new population is trained and the fitness of each individual in the new population is recalculated, and the training is repeated for a preset number of times until the fitness of each individual in the new population meets the fitness threshold.
3. The method for recovering abnormal load data of a power monitoring system according to claim 2, characterized in that: The method of optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm also includes: If the fitness of the chromosome under each configuration combination is greater than or equal to the fitness threshold, the hyperparameters of the long short-term memory network model are no longer optimized; wherein the current long short-term memory network model is used as the optimized long short-term memory network model.
4. The method for recovering abnormal load data of a power monitoring system according to claim 2, characterized in that: Determining the fitness of the chromosome under each configuration combination includes: Calculate the loss function corresponding to the chromosome under each configuration combination; A fitness function is calculated based on the loss function; the fitness function is used to determine the fitness of the chromosome under each configuration combination.
5. The method for recovering abnormal load data of a power monitoring system according to claim 2, characterized in that: The fitness threshold includes a first fitness threshold, a second fitness threshold and a third fitness threshold; the first fitness threshold is greater than the second fitness threshold, and the second fitness threshold is greater than the third fitness threshold.
6. The method for recovering abnormal load data of a power monitoring system according to claim 5, characterized in that: The first fitness threshold is 50; the second fitness threshold is 20; and the third fitness threshold is 10.
7. The method for recovering abnormal load data of a power monitoring system according to any one of claims 1 to 6, characterized in that: The loss function MSE of the number of layers in the optimized long short-term memory network model L It is expressed as: in, is the repair value of the i-th chromosome obtained by optimizing the number of layers L; n is the number of samples, y i is the true value of the ith chromosome, is the recovery value of the i-th chromosome obtained by optimizing the number of layers L.
8. The method for recovering abnormal load data of a power monitoring system according to any one of claims 1 to 6, characterized in that: Also includes; If the load data does not have an abnormality, the restored data set is denormalized to maintain the same range as the load data with the abnormality, so as to obtain the load data that is finally restored.
9. The method for recovering abnormal load data of a power monitoring system according to claim 2, characterized in that: The comparing the fitness and fitness threshold of the chromosome under each configuration combination comprises: The data characteristics of the chromosomes under each configuration combination and the weight determine the fitness threshold; the data characteristics of the chromosomes under each configuration combination include seasonal fluctuation characteristics, short-term load spikes, long-term trend characteristics and the difference between the stable period and the fluctuating period.
10. A device for recovering abnormal load data of a power monitoring system, characterized in that: Implementing the method for recovering abnormal load data of a power monitoring system according to any one of claims 1 to 9, comprising: A data acquisition module, used to acquire load data of a power monitoring system; A data processing module, used for preprocessing the load data and determining abnormal conditions of the load data; A data recovery module, for inputting the abnormal load data into the optimized long short-term memory network model for recovery if the load data is abnormal, so as to obtain a recovered data set; the optimized long short-term memory network model is a long short-term memory network model obtained by optimizing the hyperparameters of the long short-term memory network model using the GEP algorithm; the hyperparameters include the number of network layers, time step, weight and bias; The data sorting module is used to denormalize the restored data set to keep it in the same range as the load data with the abnormality, so as to obtain the load data that is finally restored.