Power load prediction method and system
Through the improved Kingfisher optimization algorithm, the hyperparameter optimization of the power load prediction model is solved, and the problem of low accuracy of power load prediction in the existing technology is improved, the accuracy and reliability of power load prediction are met, and the power system is satisfied. optimization requirements.
Patent Information
- Application Number
- CN202411398943.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-10
AI Technical Summary
The existing power load prediction methods have low accuracy in dynamic and highly variable environments, making it difficult to meet the requirements of optimized power generation scheduling, grid stability and planning of power systems.
The improved Kingfisher optimization algorithm is used to optimize the hyperparameters of the feature extraction model and prediction model. By simulating the kingfisher's habitat, hovering, diving and predation behavior, combined with Sobol sequence and Tent mapping, the algorithm's global search ability is enhanced. Reduce the risk of local optimal solutions.
It improves the accuracy and generalization of power load prediction, improves the reliability of the model in the actual environment, and enhances the prediction ability of power load.
Smart Images

Figure CN119298008A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power, and in particular to a method and system for predicting electric power load. Background Art
[0002] Power load forecasting refers to the process of predicting power demand in the future time period. It estimates the power consumption at a certain point in time or time period in the future through historical power data and other relevant data. Power load forecasting plays a vital role in the operation and planning of power systems, mainly including the following aspects: optimizing power generation scheduling, ensuring grid stability, assisting grid planning, etc.
[0003] At present, power load forecasting mostly adopts statistical learning, machine learning methods, real-time prediction and other methods. However, in a dynamic and highly changing environment, the accuracy of power forecasting by the above methods is low. Summary of the invention
[0004] The present invention aims at solving the problem of low accuracy of power prediction in the prior art and proposes a power load prediction method and system.
[0005] In a first aspect, an embodiment of the present invention provides a method for predicting power load, the method comprising:
[0006] Obtain historical power data;
[0007] Input the historical power data into the trained feature extraction model to obtain feature data corresponding to the historical power data;
[0008] Input the characteristic data into the trained prediction model to obtain the predicted load data corresponding to the characteristic data;
[0009] The feature extraction model and prediction model were obtained by optimizing hyperparameters based on the improved Pied Kingfisher optimization algorithm;
[0010] The optimization steps to improve the Pied Kingfisher algorithm include:
[0011] For the hyperparameter set of the model, set the population corresponding to the hyperparameter set;
[0012] iterating the position of each individual in the population by simulating at least one of changes in the kingfisher's perching and hovering behavior, diving behavior, and predation efficiency;
[0013] When the fitness of the population meets the iteration stopping condition, the population is determined as the solution set of the hyperparameter set.
[0014] In one embodiment, for a hyperparameter set of a model, setting a population corresponding to the hyperparameter set includes:
[0015] By randomly generating a population corresponding to a set of hyperparameters from the search space;
[0016] The formula used to generate the population is as follows:
[0017] X i,j =LB+(UB-LB)×rand
[0018] i=1,2,...,N
[0019] j=1,2,...,Dim;
[0020] Among them, X i,j refers to the position of the i-th individual in the j-th dimension, rand represents a random value between 0 and 1, and UB and LB refer to the upper and lower bounds of the search range.
[0021] In one embodiment, the position of each individual in the population is iterated by simulating the perching and hovering behavior of kingfishers, including:
[0022] X t (t+1)=X i (t)+a·T×(X j (t)-X i (t))
[0023] i,j=1,2,...,N
[0024] j≠i;
[0025] Among them, X t (t+1) represents the position of the next iteration, X i (t) indicates the position of the current iteration;
[0026] Parameter a includes:
[0027] 2×randn(1,Dim)-1;
[0028] Among them, randn represents a random number in a normal distribution, N represents the overall size, and Dim represents the dimension of the problem under consideration;
[0029] Under perching behavior, the T parameter calculation formula is as follows:
[0030]
[0031] Crest a ngles = 2·π·rand;
[0032] Among them, the maximum number of iterations is Max I ter specifies that the constant value BF (beat factor) is set to 8, and rand is a random value between 0 and 1;
[0033] Under the hover policy behavior, the calculation formula of the T parameter is:
[0034]
[0035]
[0036] Among them, the fitness of the i-th and j-th Pied Kingfisher is expressed by PKO F itness(j) and PKO F itness(i) indicates that a constant value BF (beat factor) is set to 8.
[0037] In one embodiment, the position of each individual in the population is iterated by simulating the diving behavior of kingfishers, including:
[0038] X i (t+1)=X i (t)+HA·o·a·(bX best (t))
[0039] i=1,2,...,N;
[0040] Among them, the fitness value of the i-th Pied Kingfisher is recorded as PKO F itness(i), the best fitness represents the best fitness value obtained from all iterations; A is the control parameter, o and HA represent the hunting ability, which can be calculated by the following formula:
[0041]
[0042] b=X i (t)+o 2 ·randn·X best (t).
[0043] In one embodiment, the position of each individual in the population is iterated by simulating the change of the predation efficiency of the kingfisher, including:
[0044]
[0045] Select at least 2 individuals in the population, X m and X n Indicates its position; the predation efficiency of the Pied Kingfisher is represented by PE, PE MAX and PE MIN Fixed values are 0.5 and 0 respectively.
[0046] In one embodiment, the position of each individual in the population is iterated by simulating at least one of the perching and hovering behavior, diving behavior, and changes in predation efficiency of the kingfisher, including:
[0047] In the iterative process, the position of each individual in the population is adjusted through adaptive feature weights;
[0048] Adaptive feature weights include:
[0049]
[0050] Where t is the current iteration number; T is the total number of iterations; w(t) is the dynamic weight at the tth iteration.
[0051] In one embodiment, for a hyperparameter set of a model, setting a population corresponding to the hyperparameter set includes:
[0052] For the hyperparameter set, Sobol sequence and Tent are combined to map it into the population corresponding to the hyperparameter set;
[0053] Sobol sequences and Tent maps include:
[0054] S = SobolSequence(n,d)
[0055]
[0056] P = LB + (UB - LB) x';
[0057] Among them, n is the number of individuals in the population; d is the parameter dimension;
[0058] Apply Tent mapping to each Sobol sequence sample x to obtain the transformed sample x′; LB and UB are the lower and upper bounds of the parameters respectively, and P is the initialized population.
[0059] In one embodiment, the optimization step of improving the Pied Kingfisher algorithm further includes:
[0060] In the iterative process, by combining Cauchy distribution and Gaussian distribution, the position of each individual in the population is mutated to enhance the algorithm's ability to escape from the local optimum;
[0061] Cauchy distribution sample generation:
[0062] C = Cauchy (size = x.shape);
[0063] Gaussian distribution sample generation:
[0064] G=Gaussian(size=x.shape);
[0065] Mutation operation:
[0066]
[0067] Among them, x is the current individual of the population, t is the current iteration number, T is the total iteration number, and the new individual after mutation is Mutation(x,t).
[0068] In one embodiment, the feature extraction model is a one-dimensional convolutional neural network;
[0069] And / or, the prediction model is a bidirectional long short-term memory network.
[0070] In a second aspect, an embodiment of the present invention provides a power load forecasting system, the system comprising:
[0071] An acquisition module, used to acquire historical power data;
[0072] A feature extraction module is used to input historical power data into a trained feature extraction model to obtain feature data corresponding to the historical power data;
[0073] An output module is used to input the characteristic data into the trained prediction model to obtain the predicted load data corresponding to the characteristic data;
[0074] The feature extraction model and prediction model were obtained by optimizing hyperparameters based on the improved Pied Kingfisher optimization algorithm;
[0075] The power load forecasting system also includes an optimization module to improve the Pied Kingfisher algorithm;
[0076] The optimization modules include:
[0077] For the hyperparameter set of the model, set the population corresponding to the hyperparameter set;
[0078] iterating the position of each individual in the population by simulating at least one of changes in the kingfisher's perching and hovering behavior, diving behavior, and predation efficiency;
[0079] When the fitness of the population meets the iteration stopping condition, the population is determined as the solution set of the hyperparameter set.
[0080] The present invention provides a method and system for predicting power load, which has the following technical effects:
[0081] The feature extraction model is used to extract features from historical power data, and then the prediction model is used to obtain the predicted load data that characterizes the power load prediction. Among them, the feature extraction model and the prediction model are optimized by the improved Pied Kingfisher algorithm. The improved Pied Kingfisher algorithm has good global search capabilities. By simulating the predation behavior of the Pied Kingfisher, etc., it can find the optimal solution in a wider search space and reduce the risk of local optimality, so that the model can be generalized and reliable in actual environment applications, thereby improving the accuracy of power load prediction.
[0082] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0084] Figure 1 A first flow chart of a method for predicting power load provided by an exemplary embodiment of the present invention;
[0085] Figure 2 A second flow chart of a method for predicting power load provided by an exemplary embodiment of the present invention;
[0086] Figure 3 A structural diagram of a power load forecasting system provided by an exemplary embodiment of the present invention;
[0087] Figure 4 A structural diagram of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0088] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0089] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.
[0090] Power load forecasting refers to the process of predicting power demand in the future. It uses historical data, real-time data, and other relevant information to estimate the power consumption at a certain point in time or time period in the future. Power load forecasting plays a vital role in the operation and planning of power systems, and mainly includes the following aspects:
[0091] Used to optimize power generation scheduling, predicting future electricity demand helps power companies optimize the scheduling of power generation resources, ensuring sufficient power generation capacity during peak demand periods while avoiding waste of resources caused by excessive power generation.
[0092] Used to ensure grid stability, accurate load forecasting can help maintain grid stability and prevent power system overload or power shortages.
[0093] Used to assist grid planning and provide data support on future load demand in order to plan and expand grid infrastructure and improve the reliability and efficiency of the power system.
[0094] Used to reduce operating costs by reducing the need for backup generating capacity, optimizing fuel usage and maintenance costs, and lowering overall operating costs.
[0095] Used to support demand response, forecast data helps implement demand response strategies, balance supply and demand by adjusting users' electricity consumption behavior, and improve the economy and reliability of the power system.
[0096] Based on this, an exemplary embodiment of the present invention provides a method for predicting power load. Figure 1 , methods include:
[0097] S11. Obtain historical power data.
[0098] The historical power data includes historical load data collected by the power system, environmental data that affects power consumption, time-related data, etc. The historical power data is data that is relevant to the power load forecast. The historical power data can affect the future power load to a certain extent. The accuracy of the power load forecast is closely related to the historical power data. In this embodiment, at least one set of historical power data can be obtained. The more types of historical power data, the higher the accuracy of the obtained power load forecast.
[0099] S12. Input the historical power data into a trained feature extraction model to obtain feature data corresponding to the historical power data.
[0100] Among them, the feature extraction model is obtained by hyperparameter optimization based on the improved piebald kingfisher optimizer (IPKO).
[0101] In one embodiment, the feature extraction model is a one-dimensional convolutional neural network (1D-CNN), which is a deep learning model mainly used to process time series or other one-dimensional data. It extracts local features and captures patterns in the data by applying a one-dimensional convolution kernel to slide on the input data. The advantage of 1D-CNN is that it can effectively identify local dependencies in the data and gradually extract higher-level features through the stacking of multiple convolutional layers. This model is often used in fields such as signal processing and natural language processing. It can process the temporal and local features of data and is a powerful tool for classifying, regressing or predicting data.
[0102] S13. Input the characteristic data into the trained prediction model to obtain the predicted load data corresponding to the characteristic data.
[0103] Among them, the prediction model is obtained by hyperparameter optimization based on the improved Pied Kingfisher optimization algorithm.
[0104] In one embodiment, the prediction model is a bidirectional long short-term memory network (BiLSTM), which is an improved recurrent neural network (RNN) specifically designed to process sequence data. By combining two LSTM networks, forward and backward, it can simultaneously consider the information in the sequence in both the forward and backward directions, thereby capturing richer contextual dependencies. BiLSTM has the ability to memorize long-term dependency information and can effectively avoid the gradient vanishing problem common in traditional RNNs. Therefore, BiLSTM performs well in tasks such as natural language processing and time series analysis that require consideration of contextual relationships, and is often used in fields such as text classification, sequence labeling, and machine translation.
[0105] In one implementation, the model is optimized by improving the Pied Kingfisher algorithm, as described in detail in Figure 2 , specifically including:
[0106] S21. For a hyperparameter set of the model, set a population corresponding to the hyperparameter set.
[0107] Specifically, a population corresponding to a set of hyperparameters is randomly generated from the search space.
[0108] Similar to many other population-based methods, PKO starts the search process by randomly generating a set of starting solutions from the search space as the first trial. The formula for generating the population is as follows:
[0109] X i,j =LB+(UB-LB)×rand (1)
[0110] i=1,2,...,N (2)
[0111] j=1,2,...,Dim (3)
[0112] Among them, X i,j refers to the position of the i-th individual in the j-th dimension, rand represents a random value between 0 and 1, and UB and LB refer to the upper and lower bounds of the search range.
[0113] In one embodiment, in order to ensure that the initial population is evenly distributed in the search space, by combining the Sobol sequence and the Tent mapping, the population can cover the search space more evenly and effectively, thereby reducing the risk of the algorithm falling into a local optimal solution too early.
[0114] The Sobol sequence generates quasi-random low-discrepancy sequences that cover the search space more evenly than pure random initialization, while the Tent mapping enhances the exploration ability of the algorithm in the early stages by transforming the Sobol sequence using a piecewise linear chaotic map.
[0115] In step S21, for a hyperparameter set, the Sobol sequence and Tent are combined to map the hyperparameter set into a population corresponding to the hyperparameter set.
[0116] Sobol sequences and Tent maps include:
[0117] S=SobolSequence(n,d) (4)
[0118]
[0119] P=LB+(UB-LB)·x′ (6)
[0120] Where n is the number of individuals in the population; d is the parameter dimension. Apply the Tent mapping to each Sobol sequence sample x to obtain the transformed sample x′; LB and UB are the lower and upper bounds of the parameters respectively, and P is the initialized population.
[0121] S22. Iterate the position of each individual in the population by simulating at least one of the kingfisher's perching and circling behavior, diving behavior, and changes in predation efficiency.
[0122] In one embodiment, the exploration phase of IPKO is inspired by the perching and hovering behavior of kingfishers. Observations of kingfishers in their natural habitats show that they alternate between perched and hovering positions for attack based on a variety of factors. In IPKO, the location of the search agent is determined based on the foraging activity of the kingfisher.
[0123] In step S22, the position of each individual in the population is iterated by simulating the perching and circling behavior of the kingfisher, including:
[0124] X t (t+1)=X i(t)+a·T×(X j (t)-X i (t)) (7)
[0125] i,j=1,2,...,N (8)
[0126] j≠i (9)
[0127] Among them, X t (t+1) represents the position of the next iteration, X i (t) indicates the position of the current iteration.
[0128] Parameter a includes:
[0129] 2×randn(1,Dim)-1 (10)
[0130] Among them, randn represents a random number in the normal distribution, N represents the population size, and Dim represents the dimension of the problem under consideration.
[0131] The parameter T plays a key role in this approach, and its value is determined dynamically based on the current strategy, which can be either "perched" or "hovering". The calculation of T is tailored for each strategy, ensuring the best performance in different operating modes.
[0132] When searching for prey in the water, Pied Kingfishers typically hold their crests at a vertical angle. This helps expand their field of vision, allowing them to detect movement from greater distances, helping them find fish even if they are hiding in vegetation or debris in the water. Once the Pied Kingfisher has spotted potential prey, it lowers its crest, uses binocular vision to focus on the prey, and makes precise movements to capture it. The perching strategy can be mathematically modeled using the previous formula.
[0133] Under perching behavior, the T parameter calculation formula is as follows:
[0134]
[0135] Crest a ngles=2·π·rand (12)
[0136] Among them, the maximum number of iterations is Max I ter specifies that the constant value BF (beat factor) is set to 8, and rand is a random value between 0 and 1;
[0137] Under the hover policy behavior, the calculation formula of the T parameter is:
[0138]
[0139] Among them, the fitness of the i-th and j-th Pied Kingfisher is expressed by PKO F itness(j) and PKO F itness(i) indicates that a constant value BF (beat factor) is set to 8.
[0140] The Pied Kingfisher is known for its rapid flapping of its wings while hovering in the air. Its wings are relatively short and wide, allowing it to flap efficiently and quickly. By flapping its wings at a high frequency, this bird can maintain a stable position in the air. The Pied Kingfisher's wings are particularly well suited for hovering because their wings are long and pointed, which creates lift that allows them to maintain their position. The wings are relatively stiff, allowing the bird to flap its wings quickly and maintain a stable hover.
[0141] In one example, the Pied Kingfisher is well known for its diving behavior, which it uses to catch fish. Typically, the bird perches from a high point overlooking the water, such as a branch or rock, to observe the presence of fish. Once a fish is spotted, the Pied Kingfisher quickly dives into the water from a height of several meters and captures the prey with its beak, with quick and precise movements. The bird can reach depths of several meters before returning to its perch with the fish firmly in its beak.
[0142] The Pied Kingfisher's diving behavior makes it an efficient hunter, which is one of the reasons why the species is so successful in its habitat. The bird's ability to dive quickly and accurately, combined with its sharp beak and excellent eyesight, make it an effective predator in aquatic environments.
[0143] In step S22, the position of each individual in the population is iterated by simulating the diving behavior of the kingfisher, including:
[0144] X i (t+1)=X i (t)+HA·o·a·(bX best (t)) (15)
[0145] i=1,2,...,N (16)
[0146] Among them, the fitness value of the i-th Pied Kingfisher is recorded as PKO F itness(i), the best fitness represents the best fitness value obtained from all iterations; A is the control parameter, o and HA represent the hunting ability, which can be calculated by the following formula:
[0147]
[0148] b=X i (t)+o 2 ·randn·X best (t) (19)
[0149] In one example, the hunting efficiency of a Pied Kingfisher can be affected by a variety of factors, such as the availability of prey, the hunting skills of an individual bird, and the presence of competitors or predators in the area.
[0150] In step S22, the position of each individual in the population is iterated by simulating the change of the predation efficiency of the kingfisher, including:
[0151]
[0152] Select at least 2 individuals in the population, X m and X n Indicates its position; the predation efficiency of the Pied Kingfisher is represented by PE, PE MAX and PE MIN Fixed values are 0.5 and 0 respectively.
[0153] In one embodiment, as the number of iterations increases, the differences between individuals in the population are automatically adjusted to enhance the global search capability of the algorithm in the later stages.
[0154] Therefore, step S22 further includes:
[0155] In the iterative process, the position of each individual in the population is adjusted through adaptive feature weights;
[0156] Adaptive feature weights include:
[0157]
[0158] Where t is the current iteration number; T is the total number of iterations; w(t) is the dynamic weight at the tth iteration.
[0159] Based on the adaptive feature weights, the model is iteratively trained. In the early stages, lower weights are used to encourage the algorithm to focus more on exploration and avoid premature convergence. At the same time, in the later stages of iteration, the weights are gradually increased to enhance the global search capability, allowing the algorithm to more effectively approach the global optimal solution.
[0160] S23. When the fitness of the population satisfies the iteration stopping condition, the population is determined as the solution set of the hyperparameter set.
[0161] In one embodiment, random disturbances of Cauchy distribution and Gaussian distribution are combined to cause mutations in the optimal individuals in the population, thereby improving the ability of the algorithm to escape from the local optimal solution. Therefore, the Cauchy-Gaussian mutation strategy is also introduced in this embodiment.
[0162] Specifically, the optimization steps of improving the Pied Kingfisher algorithm include:
[0163] During the iteration process, the position of each individual in the population is mutated by combining Cauchy distribution and Gaussian distribution, which enhances the algorithm's ability to escape from local optimality.
[0164] Among them, the Cauchy distribution has a large tail, so it can produce large jumps, which helps individuals jump out of the local optimal solution. The Gaussian distribution provides subtle adjustment capabilities, allowing individuals to search the nearby solution space more accurately. By combining the Cauchy distribution and the Gaussian distribution, the algorithm can maintain the accuracy of local search while effectively jumping out of the local optimal solution, improving the global search capability.
[0165] Cauchy distribution sample generation:
[0166] C=Cauchy(size=x.shape)(22)
[0167] Gaussian distribution sample generation:
[0168] G=Gaussian(size=x.shape)(23)
[0169] Mutation operation:
[0170]
[0171] Among them, x is the current individual of the population, t is the current iteration number, T is the total iteration number, and the new individual after mutation is Mutation(x,t).
[0172] For the power load forecasting method provided in this embodiment, a simulation verification analysis is performed on a local resident load data set, and the forecasting effect is determined according to the forecasting load data output by the forecasting model and the actual load data. The forecasting effect can be specifically expressed by any one of the root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and determination coefficient (r-squared, R2). Among them, RMSE is 0.668, MAE is 0.5, MAPE is 1.476%, and R 2 It is 0.995, which proves the generalization and reliability of the power load forecasting method provided in this embodiment in practical application scenarios.
[0173] An exemplary embodiment of the present invention provides a power load forecasting system, see Figure 3 , the system includes:
[0174] The acquisition module 31 is used to acquire historical power data.
[0175] The feature extraction module 32 is used to input the historical power data into a trained feature extraction model to obtain feature data corresponding to the historical power data.
[0176] The output module 33 is used to input the characteristic data into the trained prediction model to obtain the predicted load data corresponding to the characteristic data.
[0177] The feature extraction model and prediction model were obtained by hyperparameter optimization based on the improved Pied Kingfisher optimization algorithm.
[0178] The power load forecasting system also includes an optimization module to improve the Pied Kingfisher algorithm;
[0179] The optimization modules include:
[0180] The generation unit is used to set the population corresponding to the hyperparameter set of the model.
[0181] The iteration unit is used to iterate the position of each individual in the population by simulating at least one of the changes in the kingfisher's perching and hovering behavior, diving behavior, and predation efficiency.
[0182] The determination unit is used to determine the population as a solution set of the hyperparameter set when the fitness of the population meets the iteration stopping condition.
[0183] In one embodiment, for a hyperparameter set of a model, generating a population corresponding to the hyperparameter set includes:
[0184] By randomly generating a population corresponding to a set of hyperparameters from the search space;
[0185] The formula used to generate the population is as follows:
[0186] X i,j =LB+(UB-LB)×rand
[0187] i=1,2,...,N
[0188] j=1,2,...,Dim;
[0189] Among them, X i,j refers to the position of the i-th individual in the j-th dimension, rand represents a random value between 0 and 1, and UB and LB refer to the upper and lower bounds of the search range.
[0190] In one embodiment, the iteration unit is further configured to:
[0191] X t (t+1)=X i (t)+a·T×(X j (t)-X i (t))
[0192] i,j=1,2,...,N
[0193] j≠i;
[0194] Among them, X t (t+1) represents the position of the next iteration, X i (t) indicates the position of the current iteration;
[0195] Parameter a includes:
[0196] 2×randn(1,Dim)-1;
[0197] Among them, randn represents a random number in a normal distribution, N represents the overall size, and Dim represents the dimension of the problem under consideration;
[0198] Under perching behavior, the T parameter calculation formula is as follows:
[0199]
[0200] Crest a ngles = 2·π·rand;
[0201] Among them, the maximum number of iterations is Max I ter specifies that the constant value BF (beat factor) is set to 8, and rand is a random value between 0 and 1;
[0202] Under the hover policy behavior, the calculation formula of the T parameter is:
[0203]
[0204] Among them, the fitness of the i-th and j-th Pied Kingfisher is expressed by PKO F itness(j) and PKO F itness(i) indicates that a constant value BF (beat factor) is set to 8.
[0205] In one embodiment, the iteration unit is further configured to
[0206] X i (t+1)=X i (t)+HA·o·a·(bX best (t))
[0207] i=1,2,...,N;
[0208] Among them, the fitness value of the i-th Pied Kingfisher is recorded as PKO Fitness(i), the best fitness represents the best fitness value obtained from all iterations; A is the control parameter, o and HA represent the hunting ability, which can be calculated by the following formula:
[0209]
[0210] b=X i (t)+o 2 ·randn·X best (t).
[0211] In one embodiment, the iteration unit is further configured to
[0212]
[0213] Select at least 2 individuals in the population, X m and X n Indicates its position; the predation efficiency of the Pied Kingfisher is represented by PE, PE MAX and PE MIN Fixed values are 0.5 and 0 respectively.
[0214] In one embodiment, the iteration unit is further used to adjust the position of each individual in the population by adaptive feature weights during the iteration process;
[0215] Adaptive feature weights include:
[0216]
[0217] Where t is the current iteration number; T is the total number of iterations; w(t) is the dynamic weight at the tth iteration.
[0218] In one embodiment, the generating unit is further used to map the hyperparameter set into a population corresponding to the hyperparameter set by combining the Sobol sequence and the Tent;
[0219] Sobol sequences and Tent maps include:
[0220] S = SobolSequence(n,d)
[0221]
[0222] P = LB + (UB - LB) x';
[0223] Among them, n is the number of individuals in the population; d is the parameter dimension;
[0224] Apply Tent mapping to each Sobol sequence sample x to obtain the transformed sample x′; LB and UB are the lower and upper bounds of the parameters respectively, and P is the initialized population.
[0225] In one embodiment, the optimization module further includes:
[0226] The mutation unit is used to mutate the position of each individual in the population by combining Cauchy distribution and Gaussian distribution during the iteration process, thereby enhancing the algorithm's ability to escape from the local optimum;
[0227] Cauchy distribution sample generation:
[0228] C = Cauchy (size = x.shape);
[0229] Gaussian distribution sample generation:
[0230] G=Gaussian(size=x.shape);
[0231] Mutation operation:
[0232]
[0233] Among them, x is the current individual of the population, t is the current iteration number, T is the total iteration number, and the new individual after mutation is Mutation(x,t).
[0234] In one embodiment, the feature extraction model is a one-dimensional convolutional neural network;
[0235] And / or, the prediction model is a bidirectional long short-term memory network.
[0236] An exemplary embodiment of the present invention further provides an electronic device, see Figure 4 The electronic device 400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 410 (the processor 410 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic battery FPGA), a memory 430 for storing data, and one or more storage media 420 (such as one or more mass storage devices) for storing application programs 423 or data 422. Among them, the memory 430 and the storage medium 420 can be short-term storage or permanent storage. The storage medium 420 stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the above method.
[0237] Furthermore, the CPU 410 may be configured to communicate with the storage medium 420 to execute a series of instruction operations in the storage medium 420 on the electronic device 400. The electronic device 400 may also include one or more power supplies 460, one or more wired or wireless network interfaces 40, one or more input and output interfaces 430, and / or one or more operating systems 421, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0238] The input / output interface 430 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the electronic device 400. In one example, the input / output interface 430 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 430 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0239] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations shown.
[0240] An embodiment of the present invention also provides a computer-readable storage medium, which can be set in a server to store at least one instruction, at least one program, code set or instruction set related to implementing a method in a method embodiment. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the above method.
[0241] Optionally, in this embodiment, the storage medium may be located in a network server among multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0242] It is known from common technical knowledge that the present invention can be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the embodiments of the above invention are only illustrative in all respects and are not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are included in the present invention.
[0243] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0244] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0245] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0246] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0247] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for predicting power load, characterized in that: The method comprises: Obtain historical power data; Inputting the historical power data into a trained feature extraction model to obtain feature data corresponding to the historical power data; Inputting the characteristic data into a trained prediction model to obtain predicted load data corresponding to the characteristic data; The feature extraction model and the prediction model are obtained by performing hyperparameter optimization according to the improved Pied Kingfisher optimization algorithm; The optimization steps of the improved Kingfisher algorithm include: For a hyperparameter set of a model, setting a population corresponding to the hyperparameter set; iterating the position of each individual in the population by simulating at least one of changes in perching and hovering behavior, diving behavior, and predation efficiency of the kingfisher; When the fitness of the population satisfies an iteration stopping condition, the population is determined as a solution set of a hyperparameter set.
2. The power load forecasting method according to claim 1, characterized in that: The step of setting a population corresponding to a hyperparameter set for a model includes: By randomly generating a population corresponding to the hyperparameter set from the search space; The formula used to generate the population is as follows: X i,j =LB+(UB-LB)×rand i=1,2,...,N j=1,2,...,Dim; Among them, X i,j refers to the position of the i-th individual in the j-th dimension, rand represents a random value between 0 and 1, and UB and LB refer to the upper and lower bounds of the search range.
3. The power load forecasting method according to claim 1, characterized in that: The method of iterating the position of each individual in the population by simulating the perching and hovering behavior of the kingfisher comprises: X t (t+1)=X i (t)+a·T×(X j (t)-X i (t)) i,j=1,2,...,N j≠i; Among them, X t (t+1) represents the position of the next iteration, X i (t) indicates the position of the current iteration; Parameter a includes: 2×randn(1,Dim)-1; Among them, randn represents a random number in a normal distribution, N represents the overall size, and Dim represents the dimension of the problem under consideration; Under perching behavior, the T parameter calculation formula is as follows: Crest a ngles=2·π·rand; Among them, the maximum number of iterations is Max I ter specifies that the constant value BF (beatfactor) is set to 8, and rand is a random value between 0 and 1; Under the hover policy behavior, the calculation formula of the T parameter is: Among them, the fitness of the i-th and j-th Pied Kingfisher is expressed by PKO F itness(j) and PKO F itness(i) indicates that a constant value BF (beatfactor) is set to 8.
4. The power load forecasting method according to claim 1, characterized in that: The method of iterating the position of each individual in the population by simulating the diving behavior of the kingfisher comprises: X i (t+1)=X i (t)+HA·o·a·(b-X best (t)) i=1,2,...,N; Among them, the fitness value of the i-th Pied Kingfisher is recorded as PKO F itness(i), the best fitness represents the best fitness value obtained from all iterations; A is the control parameter, o and HA represent the hunting ability, which can be calculated by the following formula: b=X i (t)+o 2 ·randn·X best (t)。 5. The power load forecasting method according to claim 1, characterized in that: The method of iterating the position of each individual in the population by simulating the change of the predation efficiency of the kingfisher comprises: Select at least 2 individuals from the population, X m and X n Indicates its position; the predation efficiency of the Pied Kingfisher is represented by PE, PE MAX and PE MIN Fixed values are 0.5 and 0 respectively.
6. The power load forecasting method according to claim 1, characterized in that: The iterating of the position of each individual in the population by simulating at least one of the perching and circling behaviors, diving behaviors, and changes in predation efficiency of the kingfisher comprises: In the iterative process, the position of each individual in the population is adjusted by adaptive feature weights; The adaptive feature weights include: Where t is the current iteration number; T is the total number of iterations; w(t) is the dynamic weight at the tth iteration.
7. The power load forecasting method according to claim 1, characterized in that: The step of setting a population corresponding to a hyperparameter set for a model includes: For a hyperparameter set, a population corresponding to the hyperparameter set is mapped by combining the Sobol sequence and Tent; The Sobol sequence and Tent mapping include: S = SobolSequence(n,d) P = LB + (UB - LB) x'; Among them, n is the number of individuals in the population; d is the parameter dimension; Apply Tent mapping to each Sobol sequence sample x to obtain the transformed sample x′; LB and UB are the lower and upper bounds of the parameters respectively, and P is the initialized population.
8. The power load forecasting method according to claim 1, characterized in that: The optimization step of the improved Kingfisher algorithm further comprises: In the iterative process, by combining the Cauchy distribution and the Gaussian distribution, the position of each individual in the population is mutated, thereby enhancing the ability of the algorithm to escape from the local optimum; Cauchy distribution sample generation: C = Cauchy (size = x.shape); Gaussian distribution sample generation: G=Gaussian(size=x.shape); Mutation operation: Wherein, x is the current individual of the population, t is the current iteration number, T is the total iteration number, and the new individual after mutation is Mutation(x,t).
9. The power load forecasting method according to claim 1, characterized in that: The feature extraction model is a one-dimensional convolutional neural network; And / or, the prediction model is a bidirectional long short-term memory network.
10. A power load forecasting system, characterized in that: The system comprises: An acquisition module, used to acquire historical power data; A feature extraction module, used for inputting the historical power data into a trained feature extraction model to obtain feature data corresponding to the historical power data; An output module, used for inputting the characteristic data into a trained prediction model to obtain predicted load data corresponding to the characteristic data; The feature extraction model and the prediction model are obtained by performing hyperparameter optimization according to the improved Pied Kingfisher optimization algorithm; The power load forecasting system also includes an optimization module to improve the Pied Kingfisher algorithm; The optimization module includes: For a hyperparameter set of a model, setting a population corresponding to the hyperparameter set; iterating the position of each individual in the population by simulating at least one of changes in perching and hovering behavior, diving behavior, and predation efficiency of the kingfisher; When the fitness of the population satisfies an iteration stopping condition, the population is determined as a solution set of a hyperparameter set.
Citation Information
Cited By
SD-MANET multi-controller deployment method based on improved piebald algorithm
CN120321664A