Microgrid load prediction method and device, storage medium and electronic equipment

By optimizing the hyperparameters of the microgrid load forecasting model using the improved Northern Eagle algorithm, and combining the Golden Sine and Cauchy mutation algorithms, the problem of low accuracy in microgrid load forecasting was solved, achieving more efficient load forecasting and improving the stability and energy utilization efficiency of the power system.

CN118920472APending Publication Date: 2024-11-08GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411034235.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In existing technologies, the hyperparameters of the neural network models used in microgrid load forecasting are randomly determined during the training process, resulting in poor prediction performance and low accuracy.

Method used

An improved Northern Eagle algorithm is used to determine the hyperparameters of the initial prediction model. The Northern Eagle algorithm is improved by using the Golden Sine Algorithm and Cauchy Mutation Algorithm to optimize the hyperparameters. The chaotic mapping algorithm is combined to initialize the eagle population, the Golden Sine Algorithm is used to update the position, and the Cauchy Mutation Algorithm is used to perturb the model, thereby improving the convergence speed and prediction accuracy of the model training.

Benefits of technology

This improves the accuracy of microgrid load forecasting, enhances model training, ensures that forecast results are more closely aligned with actual load data, and improves the stability and energy efficiency of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118920472A_ABST
    Figure CN118920472A_ABST
Patent Text Reader

Abstract

The invention discloses a load prediction method and device of a microgrid, a storage medium and electronic equipment. The method comprises the following steps: acquiring historical load data of a micro-grid group; the historical load data is input to a target prediction model, load prediction is carried out through the target prediction model, predicted load data of the microgrid group is obtained, the target prediction model is obtained by training an initial prediction model, and hyper-parameters used by the initial prediction model are determined according to an improved northern eagle algorithm. The improved northern eagle algorithm is obtained by improving the northern eagle algorithm according to at least one of a golden sine algorithm and a Cauchy mutation algorithm. According to the invention, the technical problem of low accuracy of micro-grid load data prediction in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microgrids, and in particular to a load prediction method, device, storage medium and electronic equipment for a microgrid. Background Art

[0002] With the development of clean energy technology, more and more distributed energy is connected to the power system, and microgrids are an effective way to absorb distributed energy. In addition, multiple geographically adjacent microgrids can be interconnected to form a microgrid group, which can operate in coordination to further improve the absorption capacity. The establishment of a microgrid group can effectively solve the problems of energy shortage, load fluctuation and system instability faced by microgrids when they operate alone, and at the same time improve the economy, sustainability and intelligence level of microgrid systems. Load forecasting is one of the important means to ensure the stable operation of the power system. If there is a lack of load forecasting, the power system will not be able to effectively adjust the supply and demand balance, which may lead to problems such as grid overload or insufficient power supply. Therefore, it is very important to conduct load forecasting for microgrid groups, which can not only improve energy utilization efficiency, but also enhance the reliability of system operation, promote the integration and absorption of renewable energy, and achieve sustainable development.

[0003] At present, the relevant technology usually predicts the load of microgrids based on neural network models. However, the initial hyperparameters selected by the neural network model during the training process are random, which leads to poor prediction effect of the trained neural network model and low accuracy of predicting microgrid load data.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, storage medium and electronic device for load prediction of a microgrid, so as to at least solve the technical problem of low accuracy in predicting microgrid load data in the related art.

[0006] According to one aspect of an embodiment of the present invention, a load forecasting method for a microgrid is provided, comprising: obtaining historical load data of a microgrid group; inputting the historical load data into a target forecasting model, performing load forecasting through the target forecasting model, and obtaining forecast load data of the microgrid group, wherein the target forecasting model is obtained by training an initial forecasting model, and the hyperparameters used in the initial forecasting model are determined based on an improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm based on at least one of a golden sine algorithm and a Cauchy mutation algorithm.

[0007] Furthermore, the load prediction method of the microgrid also includes: initializing a goshawk population based on chaotic mapping, wherein the goshawk population includes the positions of multiple northern goshawks, and the position of each northern goshawk is a set of hyperparameter values ​​corresponding to the initial prediction model; in the first stage of the northern goshawk algorithm, the golden sine algorithm is used to determine the target position of each northern goshawk in the goshawk population in the first stage to update the goshawk population; in the second stage of the northern goshawk algorithm, the Cauchy mutation algorithm is used to update the optimal position of the northern goshawk obtained in the second stage; when the number of iterations does not reach the preset number of iterations, the first stage and the second stage of the northern goshawk algorithm are repeatedly executed until the number of iterations reaches the preset number of iterations, and the position of the optimal northern goshawk in the second stage of the northern goshawk algorithm is determined as the hyperparameter used by the initial prediction model.

[0008] Furthermore, the load prediction method of the microgrid also includes: for each northern goshawk in the goshawk population, determining the prey of the northern goshawk from the goshawk population; calculating the fitness value of the current position of the northern goshawk to obtain a first fitness value, and calculating the fitness value of the position of the northern goshawk's prey to obtain a second fitness value; determining the first position corresponding to the northern goshawk according to the golden sine algorithm and the numerical relationship between the first fitness value and the second fitness value; calculating the third fitness value of the first position of the northern goshawk, and determining the target position of the northern goshawk in the first stage from the first position and current position of the northern goshawk according to the numerical relationship between the third fitness value and the first fitness value.

[0009] Furthermore, the load prediction method of the microgrid also includes: when the second fitness value is less than the first fitness value, a first value is calculated based on the position of the northern goshawk's prey and the first golden section coefficient, and a second value is calculated based on the current position of the northern goshawk and the second golden section coefficient; a first position corresponding to the northern goshawk is determined based on the first value, the second value and a sine function; when the second fitness value is greater than or equal to the first fitness value, a third value is calculated based on the current position of the northern goshawk and the first golden section coefficient, and a fourth value is calculated based on the position of the northern goshawk's prey and the second golden section coefficient; the first position corresponding to the northern goshawk is determined based on the third value, the fourth value and the sine function.

[0010] Furthermore, the load prediction method of the microgrid also includes: determining the goshawk population obtained in the first stage as the first goshawk population; updating the position of the northern goshawk in the first goshawk population through the second stage of the northern goshawk algorithm to obtain the second goshawk population; calculating the fitness value of the position of each northern goshawk in the second goshawk population; determining the position of the optimal northern goshawk from the second goshawk population according to the fitness value of the position of each northern goshawk in the second goshawk population, and using the Cauchy mutation algorithm to update the position of the optimal northern goshawk.

[0011] Furthermore, the load forecasting method of the microgrid also includes: obtaining a disturbance term based on the position of the optimal northern goshawk and the standard Cauchy random distribution; and determining an updated position of the optimal northern goshawk based on the disturbance term and the position of the optimal northern goshawk.

[0012] Furthermore, the load prediction method of the microgrid also includes: for each northern goshawk in the first goshawk population, determining the corresponding second position of the northern goshawk according to the current number of iterations and the position of the northern goshawk in the first goshawk population; calculating the fitness value of the position of the northern goshawk in the first goshawk population to obtain a fourth fitness value, and calculating the fitness value of the second position corresponding to the northern goshawk to obtain a fifth fitness value; according to the numerical relationship between the fourth fitness value and the fifth fitness value, determining the target position of the northern goshawk in the second stage from the position of the northern goshawk in the first goshawk population and the second position of the northern goshawk; according to the target positions of each northern goshawk in the first goshawk population in the second stage, updating the first goshawk population to obtain the second goshawk population.

[0013] According to another aspect of an embodiment of the present invention, a load prediction device for a microgrid is also provided, including: an acquisition module, used to obtain historical load data of a microgrid group; a first processing module, used to input the historical load data into a target prediction model, perform load prediction through the target prediction model, and obtain predicted load data of the microgrid group, wherein the target prediction model is obtained by training an initial prediction model, and the hyperparameters used in the initial prediction model are determined based on an improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm based on at least one of the golden sine algorithm and the Cauchy mutation algorithm.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned load prediction method for a microgrid when running.

[0015] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned microgrid load forecasting method when running.

[0016] In an embodiment of the present invention, a method is adopted in which the hyperparameters of the initial prediction model are determined based on the improved Northern Goshawk algorithm, and then the load data of the microgrid group is predicted based on the trained prediction model. The historical load data of the microgrid group is obtained, and the historical load data is input into the target prediction model. The load prediction is performed through the target prediction model to obtain the predicted load data of the microgrid group, wherein the target prediction model is obtained by training the initial prediction model, and the hyperparameters used in the initial prediction model are determined according to the improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm according to at least one of the golden sine algorithm and the Cauchy mutation algorithm.

[0017] In the above process, by determining the hyperparameters used in the initial prediction model based on the improved Northern Goshawk algorithm, the hyperparameters of the initial prediction model are effectively optimized, avoiding the random determination of the model hyperparameters in the related technology, thereby effectively improving the convergence speed of the initial prediction model during the training process and improving the prediction effect of the target prediction model obtained by training. Furthermore, by inputting historical load data into the target prediction model, using the target prediction model to perform load prediction, and obtaining the predicted load data of the microgrid group, the accuracy of the predicted microgrid load data can be effectively improved. In addition, the Northern Goshawk algorithm is improved according to at least one of the golden sine algorithm and the Cauchy mutation algorithm, so that the improved Northern Goshawk algorithm can determine relatively better hyperparameters, thereby further improving the accuracy of the predicted microgrid load data.

[0018] It can be seen that the solution provided in the present application achieves the purpose of determining the hyperparameters of the initial prediction model based on the improved Northern Goshawk algorithm, and then predicting the load data of the microgrid group based on the trained prediction model, thereby achieving the technical effect of improving the accuracy of predicting microgrid load data, and further solving the technical problem of low accuracy of predicting microgrid load data in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. 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 drawings:

[0020] Figure 1is a schematic diagram of an optional load forecasting method for a microgrid according to an embodiment of the present invention;

[0021] Figure 2 is a comparison diagram of load forecasting results using different optional forecasting models according to an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of an optional load prediction device for a microgrid according to an embodiment of the present invention;

[0023] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0027] Example 1

[0028] According to an embodiment of the present invention, an embodiment of a load forecasting method for a microgrid is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0029] Figure 1 is a schematic diagram of an optional load forecasting method for a microgrid according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0030] Step S101, obtaining historical load data of the microgrid group.

[0031] Optionally, electronic devices, application systems, servers and other devices may be used as the execution subject of the present application. In this embodiment, the target processing system is used as the execution subject to execute the load prediction method of the microgrid.

[0032] In some embodiments, the microgrid group includes multiple microgrids, and the historical load data of the microgrid group includes historical load sub-data of the multiple microgrids.

[0033] In some embodiments, the historical load sub-data includes but is not limited to the information that can be associated with the microgrid load, such as device output power, device output current, device output voltage, power factor, etc. within the target historical time range.

[0034] Step S102, inputting historical load data into a target prediction model, performing load prediction through the target prediction model, and obtaining predicted load data of the microgrid group, wherein the target prediction model is obtained by training the initial prediction model, and the hyperparameters used in the initial prediction model are determined according to the improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm according to at least one of the golden sine algorithm and the Cauchy mutation algorithm.

[0035] In some embodiments, the historical load data input to the target prediction model is normalized historical load data.

[0036] In some embodiments, the predicted load data includes predicted load sub-data of multiple microgrids in a microgrid group, and the predicted load sub-data includes but is not limited to information that can be associated with the microgrid load, such as device output power, device output current, device output voltage, power factor, etc. within a target time range.

[0037] In some embodiments, the target prediction model predicts the predicted load sub-data of a microgrid in the microgrid group based on the historical load sub-data of the microgrid.

[0038] For example, the target processing system can input the load data (equivalent to historical load data) of the microgrid group from 13:00 to 14:00 on June 1, 2023 (i.e., the target historical time range) into the target prediction model, so as to predict the load data (equivalent to predicted load data) of the microgrid group from 13:00 to 14:00 on June 2, 2023 (i.e., the target time range) through the target prediction model.

[0039] Optionally, the training process of the target prediction model is described. The target processing system can construct a sample data set, and train the above-mentioned initial prediction model based on the sample data set to obtain the target prediction model. In some embodiments, the sample data set consists of multiple sample data and true labels corresponding to each sample data, and one sample data includes sample historical load data of a sample microgrid group, and the true label is the sample true load data corresponding to the sample microgrid group in the sample data. The sample historical load data of the sample microgrid group includes sample historical load sub-data of multiple sample microgrids in the sample microgrid group, and the sample true load data of the sample microgrid group includes sample true load sub-data of multiple sample microgrids in the sample microgrid group. In some embodiments, the sample data set can be divided into a training set and a test set.

[0040] In some embodiments, the sample historical load data of the sample microgrid group is obtained by normalizing the initial sample historical load data of the sample microgrid group to ensure that all sample data are in the same interval to facilitate model calculation. For example, the target processing system can be normalized by the following formula:

[0041]

[0042] In the formula, x i is the value of a certain dimension in the initial sample historical load data, x min is the minimum value of this dimension in all initial sample historical load data, x max is the maximum value of this dimension in all initial sample historical load data, x * It is the value of this dimension in the sample historical load data.

[0043] In some embodiments, the initial prediction model and the target prediction model may be BP (Back Propagation) neural network models. The hyperparameters used in the initial prediction model are determined according to an improved Northern Goshawk algorithm, which is obtained by improving the Northern Goshawk Optimization (NGO) algorithm according to at least one of the golden sine algorithm and the Cauchy mutation algorithm.

[0044] Optionally, the hyperparameters of the initial prediction model include but are not limited to weights and thresholds of the initial prediction model.

[0045] For example, the target processing system can improve the position update strategy of the Northern Goshawk algorithm based on the golden sine algorithm to reduce the probability of the Northern Goshawk algorithm falling into the local optimal solution, use the Cauchy mutation algorithm to improve the diversity construction method of the population in the Northern Goshawk algorithm, and improve the global search ability of the NGO algorithm, thereby obtaining an improved Northern Goshawk algorithm. Afterwards, the hyperparameters used in the initial prediction model are determined based on the improved Northern Goshawk algorithm.

[0046] Based on the scheme defined by the above steps S101 to S102, it can be known that in an embodiment of the present invention, the hyperparameters of the initial prediction model are determined based on the improved Northern Goshawk algorithm, and then the load data of the microgrid group is predicted based on the trained prediction model. The historical load data of the microgrid group is obtained, and the historical load data is input into the target prediction model. The load prediction is performed through the target prediction model to obtain the predicted load data of the microgrid group, wherein the target prediction model is obtained by training the initial prediction model, and the hyperparameters used in the initial prediction model are determined according to the improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is improved according to at least one of the golden sine algorithm and the Cauchy mutation algorithm.

[0047] It is easy to notice that in the above process, by determining the hyperparameters used in the initial prediction model based on the improved Northern Goshawk algorithm, the hyperparameters of the initial prediction model are effectively optimized, avoiding the random determination of the model hyperparameters in the related technology, thereby effectively improving the convergence speed of the initial prediction model during the training process and improving the prediction effect of the target prediction model obtained by training. Furthermore, by inputting historical load data into the target prediction model, using the target prediction model to perform load prediction, and obtaining the predicted load data of the microgrid group, the accuracy of the predicted microgrid load data can be effectively improved. In addition, the Northern Goshawk algorithm is improved according to at least one of the golden sine algorithm and the Cauchy mutation algorithm, so that the improved Northern Goshawk algorithm can determine relatively better hyperparameters, thereby further improving the accuracy of the predicted microgrid load data.

[0048] It can be seen that the solution provided in the present application achieves the purpose of determining the hyperparameters of the initial prediction model based on the improved Northern Goshawk algorithm, and then predicting the load data of the microgrid group based on the trained prediction model, thereby achieving the technical effect of improving the accuracy of predicting microgrid load data, and further solving the technical problem of low accuracy of predicting microgrid load data in related technologies.

[0049] In an optional embodiment, the target processing system can determine the hyperparameters used by the initial prediction model in the following manner: initialize the goshawk population based on chaotic mapping, wherein the goshawk population includes the positions of multiple northern goshawks, and the position of each northern goshawk is a set of hyperparameter values ​​corresponding to the initial prediction model; in the first stage of the northern goshawk algorithm, use the golden sine algorithm to determine the target position of each northern goshawk in the goshawk population in the first stage to update the goshawk population; in the second stage of the northern goshawk algorithm, use the Cauchy mutation algorithm to update the optimal northern goshawk position obtained in the second stage; if the number of iterations does not reach the preset number of iterations, repeat the first and second stages of the northern goshawk algorithm until the number of iterations reaches the preset number of iterations, and then determine the position of the optimal northern goshawk in the second stage of the northern goshawk algorithm as the hyperparameters used by the initial prediction model.

[0050] In the northern goshawk algorithm, each individual in the goshawk population represents a feasible solution, that is, a set of feasible hyperparameters of the initial prediction model. At the beginning of the algorithm, the population is randomly initialized in the search space. The initialized goshawk population X can be expressed as:

[0051]

[0052] Where, X i is the current position of the i-th northern goshawk; x i,j is the current position of the jth dimension of the i-th northern goshawk; N is the population size of the northern goshawk; m is the dimension of the problem to be solved, that is, the number of hyperparameters in a set of hyperparameters.

[0053] However, the method of randomly generating the initial population is prone to uneven population distribution and low population quality, which affects the convergence speed of the algorithm. Therefore, in this embodiment, the population can be initialized based on the Circle chaotic mapping algorithm, so that the initial position distribution of the population is more uniform, effectively expanding the search range of the population in space, and to a certain extent improving the defect that the algorithm is prone to fall into the local optimum, thereby improving the optimization efficiency of the algorithm. The initialization of the goshawk population based on the Circle chaotic mapping algorithm can be expressed as the following formula:

[0054]

[0055] In the formula, x i+1,j is the j-th dimension position of the i+1th northern goshawk, mod represents the remainder function, and parameters a and b are preset parameters, which can be 0.5 and 0.2 respectively. For example, the position of the first northern goshawk in the goshawk population is randomly determined, and the positions of the remaining northern goshawks are determined based on the above-mentioned Circle chaos mapping algorithm.

[0056] In the first stage of the Northern Goshawk algorithm (i.e., the stage of identifying prey and attacking prey), each dimension of the individual goshawk is reduced, gradually narrowing the search space, making the algorithm easily fall into the local space. Therefore, in this embodiment, the position (i.e., the target position) of the first stage of the Northern Goshawk algorithm is determined based on the golden sine algorithm. The golden sine algorithm is inspired by the sine function and uses the sine function in mathematics to iteratively search for the best, and has a strong global search capability. At the same time, the golden section coefficient is introduced in the position update process to enable the algorithm to fully search the local area, so that the global search and local development capabilities reach a good balance, thereby increasing the search diversity and improving the convergence speed.

[0057] In the second stage (i.e., the chasing and escaping stage) of the northern goshawk algorithm, the search speed is very fast and it is easy to fall into the local optimal solution. Therefore, in this embodiment, the second stage of the northern goshawk algorithm is improved based on the Cauchy mutation algorithm, and the global search ability of the algorithm is improved by disturbing the current optimal individual (i.e., the position of the optimal northern goshawk) in the second stage, so as to help the algorithm to smoothly jump out of the local optimal value.

[0058] Optionally, the Northern Goshawk algorithm has multiple rounds of iterations, and the aforementioned first stage and second stage are executed in each round of iteration. When the number of iterations does not reach the preset number of iterations, the Northern Goshawk algorithm will repeatedly execute the aforementioned first stage and second stage until the number of iterations reaches the preset number of iterations, and the position of the optimal Northern Goshawk in the second stage of the Northern Goshawk algorithm is determined as the hyperparameter used in the initial prediction model. For example, when the number of iterations reaches the preset number of iterations, the optimal position of the Northern Goshawk obtained by updating the position of the optimal Northern Goshawk obtained in the second stage using the Cauchy mutation algorithm is determined as the hyperparameter used in the initial prediction model.

[0059] It should be noted that, through the above process, the mapping algorithm is used to improve the quality of the initialized goshawk population, the golden sine algorithm is used to increase the search diversity in the first stage of the northern goshawk algorithm and improve the convergence speed, and the Cauchy mutation algorithm is used to perform perturbations in the second stage of the northern goshawk algorithm to improve the global search ability of the algorithm, thereby effectively improving the accuracy of the hyperparameters used in the final initial prediction model.

[0060] In an optional embodiment, in the first stage of the northern goshawk algorithm, in the process of using the golden sine algorithm to determine the target position of each northern goshawk in the goshawk population in the first stage, the target processing system can determine the northern goshawk's prey from the goshawk population for each northern goshawk in the goshawk population, calculate the fitness value of the northern goshawk's current position to obtain a first fitness value, and calculate the fitness value of the position of the northern goshawk's prey to obtain a second fitness value, and then determine the first position corresponding to the northern goshawk according to the golden sine algorithm, the numerical relationship between the first fitness value and the second fitness value, calculate the third fitness value of the first position of the northern goshawk, and determine the target position of the northern goshawk in the first stage from the first position and current position of the northern goshawk according to the numerical relationship between the third fitness value and the first fitness value.

[0061] In some embodiments, in the first stage of the northern goshawk algorithm, each northern goshawk will determine a prey and then quickly attack it, by comparing the fitness value of the prey's position (i.e., the first fitness value) and the fitness value of the current northern goshawk's position (i.e., the second fitness value), and calculating the new position of the northern goshawk individual (i.e., the first position) according to the golden sine algorithm. Then, the fitness value of the new position of the northern goshawk (i.e., the third fitness value) and the fitness value of the current northern goshawk's position are compared to determine whether to update the position of the northern goshawk, that is, determine the target position of the northern goshawk in the first stage.

[0062] In some embodiments, the fitness value of each position of the northern goshawk in the goshawk population can be expressed as follows:

[0063]

[0064] Among them, F1, F i 、F N They respectively represent the fitness values ​​of the current positions of the 1st northern goshawk, the i-th northern goshawk and the N-th northern goshawk. In this embodiment, the loss function of the initial prediction model is used as the fitness function, and the fitness value is calculated based on the error between the actual output of the initial prediction model and the true value.

[0065] For example, when it is necessary to calculate the fitness value of the position of a northern goshawk, the position of the northern goshawk is substituted into the initial prediction model, that is, a set of hyperparameter values ​​corresponding to the northern goshawk is substituted into the initial prediction model, and then the initial prediction model is trained using a sample data set, the loss function value corresponding to the trained initial prediction model is calculated, and the loss function value corresponding to the trained initial prediction model is determined as the fitness value of the position of the northern goshawk.

[0066] In some embodiments, in the first iteration, the prey of the northern goshawk is randomly selected from the goshawk population, which can be expressed by the following formula:

[0067] P i =X k ,i=1,2,…,N;k=1,2,…i-1,…,N

[0068] Where: P i The location of the prey selected for the i-th northern goshawk. Optionally, the prey in the northern goshawk algorithm is not a real creature, but represents a potential solution. In the first stage, the individual goshawks randomly search the solution space and find relatively good locations. These locations are regarded as prey, that is, candidates for the potential to become the optimal solution. The second stage conducts a more detailed search for the better locations found in the first stage by gradually narrowing the goshawk's search range.

[0069] In some embodiments, in the Mth iteration, the prey position is not randomly selected, but is the goshawk position output in the previous iteration, so each iteration is further optimized on the basis of the previous iteration. Wherein, M is a positive integer greater than 1.

[0070] In some embodiments, the target processing system can substitute the current position of the northern goshawk and the position of the northern goshawk's prey into different positions in the golden sine algorithm when the second fitness value is less than the first fitness value and when the second fitness value is greater than or equal to the first fitness value, thereby determining different first positions.

[0071] After determining the first position, the target processing system can calculate the third fitness value of the first position of the northern goshawk, and thus determine the target position of the northern goshawk in the first stage from the first position and the current position of the northern goshawk according to the numerical relationship between the third fitness value and the first fitness value. For example, the target processing system can determine the target position according to the following formula:

[0072]

[0073] Among them, X i ′ represents the target position of the i-th northern goshawk, F i is the fitness value of the current position of the i-th northern goshawk, which is equivalent to the first fitness value in this formula; is the fitness value of the first position of the i-th northern goshawk, that is, the third fitness value, is the first position of the i-th northern goshawk obtained in the first stage.

[0074] In the first stage of the northern goshawk algorithm, its goal is to explore the solution space as much as possible and find a better solution. In the first stage, each goshawk individual will decide whether to update its position based on the judgment result. If the updated fitness is better than the current fitness, it will accept the new position; otherwise, it will keep the current position. The position update process of each goshawk individual ensures that each solution in the population has potential, that is, they all have the possibility of becoming a better solution, avoiding the algorithm from converging to the local optimal solution too early.

[0075] It should be noted that, through the above process, the target position is accurately determined, thereby further improving the accuracy of model prediction.

[0076] In an optional embodiment, in the process of determining the first position corresponding to the northern goshawk according to the golden sine algorithm, the numerical relationship between the first fitness value and the second fitness value, the target processing system can, when the second fitness value is less than the first fitness value, calculate the first value based on the position of the northern goshawk's prey and the first golden section coefficient, and calculate the second value based on the current position of the northern goshawk and the second golden section coefficient, thereby determining the first position corresponding to the northern goshawk according to the first value, the second value and the sine function, and when the second fitness value is greater than or equal to the first fitness value, calculate the third value based on the current position of the northern goshawk and the first golden section coefficient, and calculate the fourth value based on the position of the northern goshawk's prey and the second golden section coefficient, thereby determining the first position corresponding to the northern goshawk according to the third value, the fourth value and the sine function.

[0077] In some embodiments, the target processing system calculates a plurality of first values, second values, third values, and fourth values, and the number of first values, second values, third values, and fourth values ​​is equal to the number of dimensions in the position of the northern goshawk, that is, equal to the number of parameters in a set of hyperparameters.

[0078] For example, in the process of calculating the first value according to the position of the northern goshawk's prey and the first golden section coefficient, the target processing system calculates the first value corresponding to the position of the dimension according to the position of each dimension in the position of the northern goshawk's prey and the first golden section coefficient. In the process of calculating the second value according to the current position of the northern goshawk and the second golden section coefficient, the target processing system calculates the second value corresponding to the position of the dimension according to the position of each dimension in the current position of the northern goshawk and the first golden section coefficient. Thus, the first position corresponding to the northern goshawk is determined according to the first value corresponding to the position of each dimension in the position of the northern goshawk's prey, the second value of the position of each dimension in the current position of the northern goshawk, and the sine function. Optionally, the method of calculating multiple third values, multiple fourth values, and the method of determining the first position according to the third value, the fourth value, and the sine function are the same as the above method, so they are not repeated here.

[0079] Optionally, the above process can be expressed as the following formula:

[0080]

[0081] in, is the new position of the ith goshawk in the jth dimension, that is, the position of the ith goshawk in the first position corresponding to the jth dimension; r1 is a random number in the range [0,2π]; r2 is a random number in the range [0,π]; x i,j is the position corresponding to the jth dimension in the current position of the i-th goshawk; p i,j is the position of the prey corresponding to the i-th goshawk in the j-dimension; is the fitness value of the prey's position, that is, the second fitness value; c1 is the first golden section coefficient, c2 is the second golden section coefficient, and the expression is:

[0082]

[0083] in, is the golden section number; f and g are the initial values ​​for searching the golden section ratio, where f can be -π and g can be π. i,j Equivalent to the first value, c2x i,j Equivalent to the second value, c1x i,j Equivalent to the third value, c2p i,j Equivalent to the fourth value.

[0084] It should be noted that, through the above process, it is achieved that under different numerical relationships between the second fitness value and the first fitness value, the current position of the northern goshawk and the position of the northern goshawk's prey are substituted into different positions in the golden sine algorithm respectively, so as to determine different first positions, thereby further improving the accuracy of the determined first position.

[0085] In an optional embodiment, in the process of updating the position of the optimal northern goshawk obtained in the second stage using the Cauchy mutation algorithm, the target processing system can determine the goshawk population obtained in the first stage as the first goshawk population, update the position of the northern goshawk in the first goshawk population through the second stage of the Northern Goshawk algorithm to obtain the second goshawk population, calculate the fitness value of the position of each northern goshawk in the second goshawk population, and then determine the position of the optimal northern goshawk from the second goshawk population based on the fitness value of the position of each northern goshawk in the second goshawk population, and update the position of the optimal northern goshawk using the Cauchy mutation algorithm.

[0086] In some embodiments, in the second stage of the Northern Goshawk algorithm, after the Northern Goshawk attacks the prey, the prey will try to escape, and the Northern Goshawk continues to chase the prey, simulating a local search process. In this stage, the Northern Goshawk updates its position based on a dynamically decreasing pursuit radius and a random disturbance term. The pursuit radius gradually decreases with the number of iterations, which reflects the Northern Goshawk's gradual narrowing of the search range. The random disturbance term represents the uncertainty when the prey escapes.

[0087] Optionally, in this embodiment, in the second stage of the northern goshawk algorithm, the positions of the northern goshawks in the first goshawk population are updated according to the pursuit radius to obtain the second goshawk population. Thereafter, the fitness values ​​of the positions of the northern goshawks in the second goshawk population are calculated.

[0088] Furthermore, the target processing system can determine the position of the best northern goshawk from the second goshawk population according to the fitness values ​​of the positions of the northern goshawks in the second goshawk population. For example, the position of the northern goshawk with the lowest fitness value is determined as the position of the best northern goshawk.

[0089] Afterwards, the target processing system can use the Cauchy mutation algorithm to update the position of the optimal northern goshawk, that is, use the Cauchy mutation algorithm to determine the interference term, thereby interfering with the position of the optimal northern goshawk to obtain the updated position of the optimal northern goshawk.

[0090] It should be noted that by first using the second stage of the Northern Goshawk algorithm to update the position of the northern goshawk in the first goshawk population to obtain the second goshawk population, and then using the Cauchy mutation algorithm to update the position of the optimal northern goshawk in the second goshawk population, effective interference with the optimal individual in the second stage is achieved, thereby effectively improving the global search capability of the algorithm, ensuring that the algorithm can successfully jump out of the local optimal value, avoiding the algorithm from falling into the local optimal value, and thereby improving the accuracy of the determined hyperparameters.

[0091] In an optional embodiment, in the second stage of the Northern Goshawk algorithm, while using the Cauchy mutation algorithm to update the position of the optimal Northern Goshawk, the target processing system can calculate the disturbance term based on the position of the optimal Northern Goshawk and the standard Cauchy random distribution, thereby determining the updated position of the optimal Northern Goshawk based on the disturbance term and the position of the optimal Northern Goshawk.

[0092] For example, the target processing system can determine the updated position of the optimal northern goshawk by the following formula:

[0093] X b ' est =X best +X best Cauchy(0,1)

[0094] Among them, X best is the optimal position of the northern goshawk, X′ best The updated position of the optimal northern goshawk, Cauchy(0,1) is the standard Cauchy random distribution at t = 1, X′ best Cauchy(0,1) is equivalent to the disturbance term.

[0095] It should be noted that, through the above process, the uncertainty of the prey's escape is effectively added, thereby achieving effective interference with the position of the optimal northern goshawk, thereby effectively improving the global search capability of the algorithm.

[0096] In an optional embodiment, in the process of updating the position of the northern goshawk in the first goshawk population through the second stage of the northern goshawk algorithm to obtain the second goshawk population, the target processing system can determine the second position corresponding to the northern goshawk for each northern goshawk in the first goshawk population according to the current number of iterations and the position of the northern goshawk in the first goshawk population, and then calculate the fitness value of the position of the northern goshawk in the first goshawk population to obtain the fourth fitness value, and calculate the fitness value of the second position corresponding to the northern goshawk to obtain the fifth fitness value, and then determine the target position of the northern goshawk in the second stage from the position of the northern goshawk in the first goshawk population and the second position of the northern goshawk according to the numerical relationship between the fourth fitness value and the fifth fitness value, thereby updating the first goshawk population according to the target positions of each northern goshawk in the first goshawk population in the second stage to obtain the second goshawk population.

[0097] Optionally, the target processing system may determine the target position of the northern goshawk in the second phase using the following formula:

[0098]

[0099]

[0100]

[0101] in, represents the position of the i-th northern goshawk after the j-th dimension is updated in the second stage, that is, the position of the i-th northern goshawk corresponding to the j-th dimension in the second position; x i,j is the current position of the ith goshawk in the jth dimension, which is equivalent to the position of the ith goshawk in the jth dimension of the first goshawk population in this formula, R is the pursuit radius; r is a random number in the range of [0,1]; t is the current iteration number, and T is the preset iteration number; is the fitness value of the second position corresponding to the northern goshawk, that is, the fifth fitness value, F i is the fitness value of the current position of the i-th northern goshawk, which is equivalent to the fourth fitness value in this formula. i ″ is equivalent to the target position of the i-th northern goshawk in the second stage.

[0102] It should be noted that, through the above process, the first goshawk population obtained in the first stage is effectively processed, thereby effectively improving the accuracy of the optimal northern goshawk finally determined.

[0103] In some embodiments, an optional load forecasting method for a microgrid is described. The target processing system may perform the following steps:

[0104] Step 1: Obtain some historical load data of the microgrid group as a sample set and initialize the parameters of the Northern Goshawk algorithm, including population location, maximum number of iterations, etc.

[0105] Step 2: Initialize the BP neural network (i.e., the initial prediction model), including 7 input layers, 5 hidden layers, and 1 output layer. The sigmoid function is used as the neuron activation function.

[0106] Step 3: Assign the position of the northern goshawk to the weight and threshold (equivalent to hyperparameters) of the BP neural network, then train the BP neural network to obtain the error value as the fitness value of the individual goshawk, and use the improved northern goshawk algorithm to update the position of the northern goshawk in the population according to the fitness value;

[0107] Step 4: Determine whether the maximum number of iterations has been reached. If so, output the optimal position of the northern goshawk, that is, output the optimal initial weight and threshold. Otherwise, repeat step 3.

[0108] Step 5: Bring the optimal initial weight and threshold into the BP neural network for training to obtain the target prediction model;

[0109] Step 6: Use the target prediction model to perform load forecasting for the microgrid group.

[0110] Optional, Figure 2 1 is a comparison chart of load forecasting results using different optional forecasting models according to an embodiment of the present invention. Figure 2 As shown, compared with the traditional BP prediction model, the improved BP prediction model (ie, the target prediction model) proposed in this embodiment can better fit the real load data, and the curve change is basically consistent with the real load curve. In addition, Table 1 shown below is a performance comparison of different optimization methods.

[0111] Table 1

[0112]

[0113] In Table 1, three schemes are compared to verify the rationality of the method proposed in this embodiment. Scheme 1: Microgrid group load prediction method based on BP neural network; Scheme 2: Microgrid group load prediction method based on PSO (Particle Swarm Optimization) algorithm to improve BP neural network; Scheme 3: Microgrid group load prediction method based on the target prediction model in this embodiment. Among them, the MAE of Scheme 3 is 3.95, which is 44% and 29% lower than that of Schemes 1 and 2 respectively; the RMSE of Scheme 3 is 5.84, which is 41% and 25% lower than that of Schemes 1 and 2 respectively; the MAPE of Scheme 3 is 0.0261, which is 43% and 24% lower than that of Schemes 1 and 2 respectively. That is, the target prediction model in this embodiment has better prediction accuracy and better prediction effect.

[0114] It can be seen that the solution provided in the present application achieves the purpose of determining the hyperparameters of the initial prediction model based on the improved Northern Goshawk algorithm, and then predicting the load data of the microgrid group based on the trained prediction model, thereby achieving the technical effect of improving the accuracy of predicting microgrid load data, and further solving the technical problem of low accuracy of predicting microgrid load data in related technologies.

[0115] Example 2

[0116] According to an embodiment of the present invention, an embodiment of a load prediction device for a microgrid is provided, wherein: Figure 3 is a schematic diagram of an optional load prediction device for a microgrid according to an embodiment of the present invention, such as Figure 3 As shown, the device comprises:

[0117] An acquisition module 301 is used to acquire historical load data of a microgrid group;

[0118] The first processing module 302 is used to input historical load data into a target prediction model, perform load prediction through the target prediction model, and obtain predicted load data of the microgrid group, wherein the target prediction model is obtained by training the initial prediction model, and the hyperparameters used in the initial prediction model are determined based on an improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm based on at least one of the golden sine algorithm and the Cauchy mutation algorithm.

[0119] It should be noted that the acquisition module 301 and the first processing module 302 correspond to steps S101 to S102 in the above embodiment. The examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment 1.

[0120] Optionally, the load prediction device of the microgrid also includes: a second processing module, used to initialize the goshawk population based on chaotic mapping, wherein the goshawk population includes the positions of multiple northern goshawks, and the position of each northern goshawk is a set of hyperparameter values ​​corresponding to the initial prediction model; a determination module, used to determine the target position of each northern goshawk in the goshawk population in the first stage of the northern goshawk algorithm using the golden sine algorithm to update the goshawk population; an updating module, used to update the position of the optimal northern goshawk obtained in the second stage using the Cauchy mutation algorithm in the second stage of the northern goshawk algorithm; a third processing module, used to repeatedly execute the first stage and the second stage of the northern goshawk algorithm when the number of iterations does not reach the preset number of iterations, until the number of iterations reaches the preset number of iterations, and the position of the optimal northern goshawk in the second stage of the northern goshawk algorithm is determined as the hyperparameter used by the initial prediction model.

[0121] Optionally, the determination module also includes: a first determination submodule, used to determine the prey of the northern goshawk from the goshawk population for each northern goshawk in the goshawk population; a first calculation submodule, used to calculate the fitness value of the current position of the northern goshawk to obtain a first fitness value, and calculate the fitness value of the position of the northern goshawk's prey to obtain a second fitness value; a second determination submodule, used to determine the first position corresponding to the northern goshawk according to the golden sine algorithm, the numerical relationship between the first fitness value and the second fitness value; a second calculation submodule, used to calculate the third fitness value of the first position of the northern goshawk, and determine the target position of the northern goshawk in the first stage from the first position and current position of the northern goshawk according to the numerical relationship between the third fitness value and the first fitness value.

[0122] Optionally, the second determination submodule also includes: a first calculation unit, used to calculate the first value based on the position of the northern goshawk's prey and the first golden section coefficient when the second fitness value is less than the first fitness value, and calculate the second value based on the current position of the northern goshawk and the second golden section coefficient; a first determination unit, used to determine the first position corresponding to the northern goshawk based on the first value, the second value and the sine function; a second calculation unit, used to calculate the third value based on the current position of the northern goshawk and the first golden section coefficient when the second fitness value is greater than or equal to the first fitness value, and calculate the fourth value based on the position of the northern goshawk's prey and the second golden section coefficient; a second determination unit, used to determine the first position corresponding to the northern goshawk based on the third value, the fourth value and the sine function.

[0123] Optionally, the update module also includes: a third determination submodule, used to determine the goshawk population obtained in the first stage as the first goshawk population; a first update submodule, used to update the position of the northern goshawk in the first goshawk population through the second stage of the northern goshawk algorithm to obtain the second goshawk population; a third calculation submodule, used to calculate the fitness value of the position of each northern goshawk in the second goshawk population; a second update submodule, used to determine the position of the optimal northern goshawk from the second goshawk population based on the fitness value of the position of each northern goshawk in the second goshawk population, and update the position of the optimal northern goshawk using the Cauchy mutation algorithm.

[0124] Optionally, the second updating submodule also includes: a third calculation unit, used to calculate the disturbance term based on the position of the optimal northern goshawk and the standard Cauchy random distribution; a third determination unit, used to determine the updated position of the optimal northern goshawk based on the disturbance term and the position of the optimal northern goshawk.

[0125] Optionally, the first updating submodule also includes: a fourth determination unit, used to determine, for each northern goshawk in the first goshawk population, the corresponding second position of the northern goshawk according to the current number of iterations and the position of the northern goshawk in the first goshawk population; a fourth calculation unit, used to calculate the fitness value of the position of the northern goshawk in the first goshawk population to obtain a fourth fitness value, and calculate the fitness value of the second position corresponding to the northern goshawk to obtain a fifth fitness value; a fifth determination unit, used to determine the target position of the northern goshawk in the second stage from the position of the northern goshawk in the first goshawk population and the second position of the northern goshawk according to the numerical relationship between the fourth fitness value and the fifth fitness value; an updating unit, used to update the first goshawk population according to the target positions of each northern goshawk in the first goshawk population in the second stage to obtain the second goshawk population.

[0126] Example 3

[0127] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned load prediction method for a microgrid when running.

[0128] Example 4

[0129] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 4As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned microgrid load forecasting method when running.

[0130] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0131] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0132] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0134] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0136] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A load forecasting method for a microgrid, It is characterized in that include: Obtain historical load data of microgrid groups; The historical load data is input into a target prediction model, and load prediction is performed through the target prediction model to obtain predicted load data of the microgrid group, wherein the target prediction model is obtained by training an initial prediction model, and the hyperparameters used in the initial prediction model are determined according to an improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm according to at least one of the golden sine algorithm and the Cauchy mutation algorithm.

2. The method according to claim 1, It is characterized in that The hyperparameters used by the initial prediction model are determined in the following way: Initializing a goshawk population based on chaotic mapping, wherein the goshawk population includes a plurality of positions of northern goshawks, and the position of each northern goshawk is a set of hyperparameter values ​​corresponding to the initial prediction model; In the first stage of the northern goshawk algorithm, the golden sine algorithm is used to determine the target position of each northern goshawk in the goshawk population in the first stage to update the goshawk population; In the second stage of the northern goshawk algorithm, the position of the optimal northern goshawk obtained in the second stage is updated using the Cauchy mutation algorithm; When the number of iterations does not reach the preset number of iterations, the first stage and the second stage of the Northern Goshawk algorithm are repeatedly executed until the number of iterations reaches the preset number of iterations, and the position of the optimal Northern Goshawk in the second stage of the Northern Goshawk algorithm is determined as the hyperparameter used by the initial prediction model.

3. The method according to claim 2, It is characterized in that In the first stage of the northern goshawk algorithm, the golden sine algorithm is used to determine the target position of each northern goshawk in the goshawk population in the first stage, including: For each northern goshawk in the goshawk population, determining prey for the northern goshawk from the goshawk population; Calculating the fitness value of the current position of the northern goshawk to obtain a first fitness value, and calculating the fitness value of the position of the prey of the northern goshawk to obtain a second fitness value; Determine a first position corresponding to the northern goshawk according to the golden sine algorithm, a numerical relationship between the first fitness value and the second fitness value; The third fitness value of the first position of the northern goshawk is calculated, and according to the numerical relationship between the third fitness value and the first fitness value, the target position of the northern goshawk in the first stage is determined from the first position and the current position of the northern goshawk.

4. The method according to claim 3, It is characterized in that Determining a first position corresponding to the northern goshawk according to the golden sine algorithm and a numerical relationship between the first fitness value and the second fitness value includes: When the second fitness value is less than the first fitness value, a first value is calculated based on the position of the prey of the northern goshawk and a first golden section coefficient, and a second value is calculated based on the current position of the northern goshawk and a second golden section coefficient; Determine a first position corresponding to the northern goshawk according to the first value, the second value and a sine function; When the second fitness value is greater than or equal to the first fitness value, a third value is calculated according to the current position of the northern goshawk and the first golden section coefficient, and a fourth value is calculated according to the position of the prey of the northern goshawk and the second golden section coefficient; The first position corresponding to the northern goshawk is determined according to the third value, the fourth value and the sine function.

5. The method according to claim 2, It is characterized in that In the second stage of the northern goshawk algorithm, the position of the optimal northern goshawk obtained in the second stage is updated using the Cauchy mutation algorithm, including: Determine the goshawk population obtained in the first stage as the first goshawk population; The positions of the northern goshawks in the first goshawk population are updated through the second stage of the northern goshawk algorithm to obtain a second goshawk population; Calculating the fitness value of the position of each northern goshawk in the second goshawk population; According to the fitness value of the position of each northern goshawk in the second goshawk population, the position of the optimal northern goshawk is determined from the second goshawk population, and the position of the optimal northern goshawk is updated using the Cauchy mutation algorithm.

6. The method according to claim 5, It is characterized in that The Cauchy mutation algorithm is used to update the position of the optimal northern goshawk, including: A disturbance term is calculated based on the position of the optimal northern goshawk and a standard Cauchy random distribution; The updated position of the optimal northern goshawk is determined according to the disturbance term and the position of the optimal northern goshawk.

7. The method according to claim 5, It is characterized in that The positions of the northern goshawks in the first goshawk population are updated through the second stage of the northern goshawk algorithm to obtain a second goshawk population, including: For each northern goshawk in the first goshawk population, determining a second position corresponding to the northern goshawk according to the current iteration number and the position of the northern goshawk in the first goshawk population; Calculating the fitness value of the position of the northern goshawk in the first goshawk population to obtain a fourth fitness value, and calculating the fitness value of the second position corresponding to the northern goshawk to obtain a fifth fitness value; According to the numerical relationship between the fourth fitness value and the fifth fitness value, determining the target position of the northern goshawk in the second stage from the position of the northern goshawk in the first goshawk population and the second position of the northern goshawk; According to the target position of each northern goshawk in the first goshawk population in the second stage, the first goshawk population is updated to obtain the second goshawk population.

8. A load prediction device for a microgrid, It is characterized in that include: An acquisition module is used to obtain historical load data of a microgrid group; The first processing module is used to input the historical load data into a target prediction model, perform load prediction through the target prediction model, and obtain predicted load data of the microgrid group, wherein the target prediction model is obtained by training an initial prediction model, and the hyperparameters used in the initial prediction model are determined according to an improved Northern Goshawk algorithm, and the improved Northern Goshawk algorithm is obtained by improving the Northern Goshawk algorithm according to at least one of the golden sine algorithm and the Cauchy mutation algorithm.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the load forecasting method for the microgrid described in any one of claims 1 to 7 when running.

10. An electronic device, It is characterized in that The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the load forecasting method for the microgrid described in any one of claims 1 to 7 when running.

Citation Information

Cited By

  • Construction method and device of rock mass condition prediction model, equipment and storage medium

    CN120106252A