Determination method and device of photovoltaic power integrated prediction model, equipment and medium
By constructing a photovoltaic power integrated prediction model based on historical data and the gray wolf optimization algorithm, the problem of low accuracy of photovoltaic power prediction at different time scales in the existing technology is solved, and adaptive high-precision prediction is achieved to meet the dispatch of the power system. need.
Patent Information
- Application Number
- CN202410856766.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-22
AI Technical Summary
Existing photovoltaic power prediction methods have low accuracy at different time scales, making it difficult to meet the dispatching needs of the power system, and a single prediction model cannot adapt to changes in multiple scenarios.
By determining multiple types of sample sets based on historical numerical weather forecasts and historical power data, using the gray wolf optimization algorithm to perform hyperparameter tuning of power prediction models at different time scales, training candidate models, and determining targets based on model evaluation accuracy Prediction model, build a photovoltaic power integrated prediction model.
It realizes adaptive power prediction under different time scale scenarios of photovoltaic stations, improves the accuracy of photovoltaic power prediction, and meets the business needs of multiple time scales.
Smart Images

Figure CN118822015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and medium for determining a photovoltaic power integration prediction model. Background Art
[0002] The proportion of photovoltaic installed capacity in my country continues to increase, and photovoltaic power generation occupies an increasingly important position in the energy field. However, photovoltaic power generation is affected by many factors such as irradiance and solar altitude angle. Photovoltaic power generation has strong uncertainty and volatility. Large-scale photovoltaic access has brought great challenges to the safe and stable operation of the power grid. Accurate photovoltaic power prediction is an effective means to cope with the above challenges.
[0003] At present, the existing photovoltaic power prediction methods mainly build prediction models based on irradiance forecast results to predict photovoltaic power. However, there are many types of photovoltaic site power prediction time scale scenarios, and the performance of photovoltaic site power prediction models under different time scale conditions varies greatly. The accuracy of photovoltaic power prediction using a single prediction model is low, which is difficult to meet the application needs of power system scheduling. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment and medium for determining a photovoltaic power integrated prediction model to achieve adaptive power prediction in photovoltaic stations under different time scale scenarios and improve the accuracy of photovoltaic power prediction.
[0005] In a first aspect, an embodiment of the present invention provides a method for determining a photovoltaic power integration prediction model, the method comprising:
[0006] Based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic station, multiple types of sample sets are determined; wherein the different types of sample sets are used to train power prediction models at different time scales, and the different time scales include: hourly time scale, daily time scale, and time scales above a week;
[0007] For each of the sample sets, based on the current sample set and the Gray Wolf Optimization Algorithm, multiple power prediction models with different model structures are hyper-parameter tuned to obtain multiple power prediction models to be trained associated with the current sample set;
[0008] Training each of the power prediction models to be trained based on the current sample set to obtain a plurality of candidate power prediction models corresponding to the current sample set, and determining a preset number of target power prediction models from the plurality of candidate power prediction models based on the model evaluation accuracy corresponding to each of the candidate power prediction models;
[0009] Based on the target power prediction models corresponding to the sample sets, a photovoltaic power integration prediction model corresponding to the target photovoltaic station is determined.
[0010] In a second aspect, an embodiment of the present invention further provides a device for determining a photovoltaic power integration prediction model, the device comprising:
[0011] A sample set determination module is used to determine multiple types of sample sets based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic site; wherein the different types of sample sets are used to train power prediction models at different time scales, and the different time scales include: hourly time scale, daily time scale and time scale above weekly time scale;
[0012] A model hyperparameter tuning module, used for performing hyperparameter tuning on multiple power prediction models with different model structures for each of the sample sets based on the current sample set and the gray wolf optimization algorithm, to obtain multiple power prediction models to be trained associated with the current sample set;
[0013] A model training module, used to train each of the power prediction models to be trained based on the current sample set to obtain a plurality of candidate power prediction models corresponding to the current sample set, and to determine a preset number of target power prediction models from the plurality of candidate power prediction models based on the model evaluation accuracy corresponding to each of the candidate power prediction models;
[0014] The integrated model determination module is used to determine the photovoltaic power integrated prediction model corresponding to the target photovoltaic site based on the target power prediction models corresponding to the sample sets.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When one or more programs are executed by one or more processors, the one or more processors implement a method for determining a photovoltaic power integration prediction model as described in any one of the embodiments of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a method for determining a photovoltaic power integration prediction model as described in any of the embodiments of the present invention.
[0020] The technical solution of the embodiment of the present invention determines multiple types of sample sets based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic site, wherein different types of sample sets are used to train power prediction models of different time scales, and the different time scales include: hourly time scale, daily time scale and weekly time scale. Thus, for each sample set, multiple power prediction models with different model structures are hyperparameter tuned based on the current sample set and the gray wolf optimization algorithm to obtain multiple power prediction models to be trained associated with the current sample set, and then, each power prediction model to be trained is trained based on the current sample set to obtain multiple candidate power prediction models corresponding to the current sample set, and based on the model evaluation accuracy corresponding to each candidate power prediction model, a preset number of target power prediction models are determined from the multiple candidate power prediction models, and further, based on each target power prediction model corresponding to each sample set, a photovoltaic power integrated prediction model corresponding to the target photovoltaic site is determined. The technical solution of the present invention, the photovoltaic power integrated prediction model obtained realizes adaptive power prediction in different time scale scenarios of photovoltaic sites, and improves the accuracy of photovoltaic power prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic flow chart of a method for determining a photovoltaic power integration prediction model provided by an embodiment of the present invention;
[0023] Figure 2 A schematic flow chart of another method for determining a photovoltaic power integration prediction model provided by an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of implementation steps of another method for determining a photovoltaic power integration prediction model provided by an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of the structure of a device for determining a photovoltaic power integration prediction model provided by an embodiment of the present invention;
[0026] Figure 5 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] 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.
[0028] It should be noted that the terms "first preset condition", "second preset condition", 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.
[0029] Embodiment 1
[0030] Figure 1 A flow chart of a method for determining a photovoltaic power integration prediction model provided by an embodiment of the present invention is provided. This embodiment can be applied to situations where power prediction is performed on photovoltaic stations. The method can be performed by a photovoltaic power integration prediction model determination device, which can be implemented in the form of software and / or hardware, and the hardware can be an electronic device, such as a mobile terminal, a PC, or a server.
[0031] like Figure 1 As shown, the method includes:
[0032] S110 , determining multiple types of sample sets based on historical numerical weather forecasts and historical power corresponding to the target photovoltaic station.
[0033] Among them, numerical weather forecast (NWP) refers to the use of large computers to perform numerical calculations based on the actual atmospheric conditions under certain initial and boundary conditions to solve the fluid mechanics and thermodynamics equations that describe the weather evolution process, predict the atmospheric movement state and weather phenomena in a certain period of time in the future, and thus obtain a series of data values that characterize the weather.
[0034] In this embodiment, any photovoltaic station in the distributed photovoltaic station can be used as the target photovoltaic station. The historical numerical weather forecast is the numerical weather forecast before the current moment. The historical power is the actual power of the target photovoltaic station before the current moment.
[0035] Among them, different types of sample sets are used to train power prediction models of different time scales, including hourly time scale, daily time scale and weekly time scale. Among them, the power prediction model of hourly time scale is applied to the power prediction scenario with a time length of hourly level from the current moment. For example, the current moment is 8 o'clock in the morning of January 1st, and the power prediction model of hourly time scale is used to predict the power at 9 o'clock in the morning of January 1st, 10 o'clock in the morning of January 1st, etc. The power prediction model of daily time scale is applied to the power prediction scenario with a time length of daily level from the current moment. For example, the current moment is 8 o'clock in the morning of January 1st, and the power prediction model of daily time scale is used to predict the power at 8 o'clock in the morning of January 2nd, 8 o'clock in the morning of January 3rd, etc. The power prediction model with a time scale of weeks or longer is applied to power prediction scenarios with a time length of weeks or longer (for example, months, quarters, years, etc.) from the current time. For example, the current time is 8 o'clock in the morning on January 1st. The power prediction model with a time scale of weeks or longer is used to predict the power at 8 o'clock in the morning on January 8th, 8 o'clock in the morning on February 1st, and so on.
[0036] Specifically, the multiple types of sample sets include: a first sample set corresponding to an hourly time scale, a second sample set corresponding to a daily time scale, and a third sample set corresponding to a time scale of more than a week. Based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic station, the specific implementation method of determining the multiple types of sample sets may include the following steps:
[0037] (1) Taking the target historical moment as the collection starting point, multiple collection moments are determined based on the target interval length.
[0038] The target historical moment can be any moment before the historical time period of the current moment. The target interval duration is a preset time length, that is, the interval duration between two adjacent collection moments, for example, the target interval duration is 15 minutes.
[0039] For example, the target interval is 15 minutes, and the current time is 9:00 on March 2, 2020, then 9:00 on March 1, 2020 is taken as the target historical time. 9:00 on March 1, 2020 is taken as the collection starting point, and every 15 minutes is taken as a collection time.
[0040] (2) According to multiple sampling moments, the historical numerical weather forecast and the historical power are sampled and processed respectively to obtain the discrete historical numerical weather forecast and the discrete historical power corresponding to each sampling moment.
[0041] In this embodiment, the historical numerical weather forecast and the historical power are sampled and processed at each collection time, and the discrete historical numerical weather forecast and the discrete historical power corresponding to each collection time can be obtained. Exemplarily, the multiple collection times include: t1, t2, t3, ..., tn, then the historical numerical weather forecast and the historical power can be sampled and processed at time t1 to obtain NWP1 and P1, the historical numerical weather forecast and the historical power can be sampled and processed at time t2 to obtain NWP2 and P2, the historical numerical weather forecast and the historical power can be sampled and processed at time t3 to obtain NWP3 and P3, ..., the historical numerical weather forecast and the historical power can be sampled and processed at time tn to obtain NWPn and Pn, so that the discrete historical numerical weather forecast corresponding to each collection time can be expressed as: NWP1, NWP2, NWP3, ..., NWPn; the discrete historical power corresponding to each collection time can be expressed as: P1, P2, P3, ..., Pn.
[0042] (3) For each collection moment, first sample data is constructed based on the discrete historical numerical weather forecast and discrete historical power corresponding to the collection moment, as well as the discrete historical powers in the target historical time period before the collection moment, so as to determine a first sample set corresponding to the hourly time scale based on the first sample data corresponding to each collection moment.
[0043] In this embodiment, the target historical time period is within a preset time period before the collection time. For example, the target historical time period is within a 4-hour time period before the collection time. The first sample data corresponding to time t1 can be expressed as {NWP1, P1, Ps1, Ps2, Ps3, ..., Psn}, where "Ps1, Ps2, Ps3, ..., Psn" represents each discrete historical power within the target historical time period before the collection time. Similarly, the first sample data corresponding to each collection time can be obtained. Furthermore, the set of first sample data corresponding to each collection time is determined as the first sample set corresponding to the hourly time scale.
[0044] (4) For each collection time, a second sample data is constructed based on the discrete historical numerical weather forecast and discrete historical power corresponding to the collection time, and the neighboring discrete historical numerical weather forecast corresponding to the neighboring location of the target PV station, so as to determine a second sample set corresponding to the daily time scale based on the second sample data corresponding to each collection time.
[0045] The location adjacent to the target photovoltaic station may be a location corresponding to at least one photovoltaic station that is close in spatial distance to the target photovoltaic station. The adjacent discrete historical numerical weather forecast is a historical numerical weather forecast corresponding to at least one photovoltaic station that is close in spatial distance to the target photovoltaic station.
[0046] In this embodiment, the second sample data corresponding to the collection time t1 can be expressed as {NWP1, P1, NWPa, NWPb, NWPc, ...}, where "NWPa, NWPb, NWPc, ..." represent adjacent discrete historical numerical weather forecasts, and the second sample data corresponding to each collection time can be obtained in the same way. Then, the set of second sample data corresponding to each collection time is determined as the second sample set corresponding to the daily time scale.
[0047] (5) For each collection moment, third sample data is constructed based on the discrete historical numerical weather forecast and discrete historical power corresponding to the collection moment, so as to determine a third sample set corresponding to a time scale of more than one week based on the third sample data corresponding to each collection moment.
[0048] In this embodiment, the third sample data corresponding to the collection time t1 can be expressed as {NWP1, P1}, and the third sample data corresponding to each collection time can be obtained in the same way. Then, the set of the third sample data corresponding to each collection time is determined as the third sample set corresponding to the time scale of more than one week.
[0049] S120 . For each sample set, hyperparameter tuning is performed on multiple power prediction models with different model structures based on the current sample set and the Grey Wolf Optimization Algorithm to obtain multiple power prediction models to be trained that are associated with the current sample set.
[0050] Among them, the current sample set is the sample set currently being processed, and any one of the sample sets can be used as the current sample set. Hyperparameters cannot be directly determined from the standard model training process and need to be defined in advance. That is, hyperparameters are parameters whose values are set before the model starts the learning process. In contrast, the values of other parameters are obtained through training. The gray wolf optimization algorithm is an intelligent optimization algorithm that simulates the predation behavior of gray wolf groups. It has strong convergence performance and global search capabilities and can be used to determine the optimal values of model hyperparameters. The power prediction model can be a neural network model, and the power prediction model is an initial model with undefined model parameters and hyperparameters. The power prediction model to be trained is the power prediction model after hyperparameter tuning.
[0051] Specifically, multiple power prediction models of different types can be collected in advance. Since the hyperparameter indicators corresponding to different types of power prediction models are different, each power prediction model can be hyperparameter-tuned through the current sample set and the gray wolf optimization algorithm to obtain the optimal hyperparameters corresponding to each power prediction model, thereby obtaining the power prediction model to be trained after hyperparameter tuning. Any one of the multiple power prediction models of different types is used as the current power prediction model. According to the inherent properties of the current power prediction model, at least one hyperparameter indicator of the current power prediction model can be determined. Then, each hyperparameter indicator of the current power prediction model is tuned through the current sample set and the gray wolf optimization algorithm to obtain the optimal value corresponding to each hyperparameter indicator, and the power prediction model to be trained after the hyperparameter tuning of the current power prediction model can be obtained.
[0052] Exemplarily, multiple power prediction models with different structures may include: LSTM (Long Short-Term Memory), BPNN (Back Propagation Neural Network), GRU (Gate Recurrent Unit), Transformer and other N neural network models with different structures. Based on the first sample set, the gray wolf optimization algorithm is used to perform hyperparameter tuning on the N neural network models with different structures to obtain N power prediction models to be trained associated with the first sample set. Based on the second sample set, the gray wolf optimization algorithm is used to perform hyperparameter tuning on the N neural network models with different structures to obtain N power prediction models to be trained associated with the second sample set. Based on the third sample set, the gray wolf optimization algorithm is used to perform hyperparameter tuning on the N neural network models with different structures to obtain N power prediction models to be trained associated with the third sample set. It can be understood that the power prediction models corresponding to the first sample set, the second sample set and the third sample set can be hyperparameter tuned at the same time by parallel processing to improve the efficiency of model determination.
[0053] S130, training each power prediction model to be trained based on the current sample set to obtain multiple candidate power prediction models corresponding to the current sample set, and determining a preset number of target power prediction models from the multiple candidate power prediction models based on the model evaluation accuracy corresponding to each candidate power prediction model.
[0054] The candidate power prediction model is a model after the power prediction model to be trained is trained. In the subsequent execution process, a target power prediction model that meets the preset conditions can be determined from multiple candidate power prediction models. The target power prediction model is a prediction model that is part of the candidate power prediction model.
[0055] The model evaluation accuracy is used to characterize the accuracy of model prediction. The higher the model evaluation accuracy, the better the performance of the model. For example, the model evaluation accuracy can be determined by calculating the root mean square error (RMSE) and / or the mean absolute error (MAE).
[0056] In this embodiment, the current sample set is input into each power prediction model to be trained, and when the power prediction model to be trained meets the model training completion condition, a candidate power prediction model corresponding to each power prediction model to be trained is obtained. When the training of each candidate power prediction model is completed, the model evaluation accuracy corresponding to each candidate power prediction model is determined, so that a preset number of candidate power prediction models whose model evaluation accuracy values meet the preset screening conditions are determined as target power prediction models.
[0057] Optionally, a preset number of candidate power prediction models ranked in terms of model evaluation accuracy may be determined as target power prediction models.
[0058] Exemplarily, the preset number is 10, and the model evaluation accuracy rates corresponding to the candidate power prediction models can be arranged in descending order according to the size relationship of the model evaluation accuracy rates, so that the candidate power prediction models ranked in the top 10 in terms of model evaluation accuracy rates can be determined as target power prediction models.
[0059] On the basis of the above exemplary embodiment, model training is performed on N power prediction models to be trained based on the first sample set to obtain N candidate power prediction models corresponding to the first sample set, and then, through the model evaluation accuracy rates corresponding to these N candidate power prediction models, 10 first target power prediction models ranked in the top 10 are determined; model training is performed on N power prediction models to be trained based on the second sample set to obtain N candidate power prediction models corresponding to the second sample set, and then, through the model evaluation accuracy rates corresponding to these N candidate power prediction models, 10 second target power prediction models ranked in the top 10 are determined; model training is performed on N power prediction models to be trained based on the third sample set to obtain N candidate power prediction models corresponding to the third sample set, and then, through the model evaluation accuracy rates corresponding to these N candidate power prediction models, 10 third target power prediction models ranked in the top 10 are determined.
[0060] S140. Determine a photovoltaic power integration prediction model corresponding to a target photovoltaic site based on each target power prediction model corresponding to each sample set.
[0061] Among them, the photovoltaic power integrated prediction model is the collection of all target power prediction models corresponding to each sample set.
[0062] In this embodiment, on the basis of obtaining each target power prediction model corresponding to each sample set, all target power models are packaged and integrated to obtain a photovoltaic power integrated prediction model corresponding to the target photovoltaic station.
[0063] Based on the above exemplary embodiment, the photovoltaic power integrated prediction model corresponding to the target photovoltaic site includes 10 first target power prediction models corresponding to the first sample set, 10 second target power prediction models corresponding to the second sample set, and 10 third target power prediction models corresponding to the third sample set.
[0064] Furthermore, based on the above technical solution, after obtaining the photovoltaic power integrated prediction model, the photovoltaic power integrated prediction model can be deployed in the server corresponding to the target photovoltaic site, so that the photovoltaic power integrated prediction model can be applied to meet the business needs of multi-time scale power prediction. The specific implementation method may include the following steps:
[0065] (1) When a power prediction request of a target photovoltaic station is received, each target power prediction model corresponding to the time scale type is determined from the photovoltaic power integrated prediction model according to the time scale type in the power prediction request.
[0066] The time scale type corresponds to the type of the sample set time scale. Specifically, the time scale type includes hourly time scale, daily time scale, and time scale above a week.
[0067] In this embodiment, power prediction controls corresponding to each time scale type can be pre-configured, and edit or select controls corresponding to the prediction moment can be configured, and the user can edit or select the future prediction moment corresponding to the predicted power. When the user triggers the power prediction control corresponding to a time scale type in the server display page of the target photovoltaic station, and operates the edit or select control corresponding to the prediction moment, a power prediction request is generated, and the power prediction request carries the time scale type and future prediction moment selected by the user. Optionally, each target power prediction model corresponding to the time scale type can be determined from the photovoltaic power integrated prediction model according to the identification information corresponding to the time scale type.
[0068] (2) obtaining numerical weather forecast data and / or power data corresponding to the time scale type;
[0069] In this embodiment, if the time scale type is an hourly time scale, the future numerical weather forecast data corresponding to the future prediction moment and the historical prediction power data in the target time period before the future prediction moment are obtained (wherein the historical prediction power data is determined by power prediction based on the numerical weather forecast data in the target time period before the future prediction moment), and the time length of the target time period is consistent with the time length of the target historical time period. If the time scale type is a daily time scale, the future numerical weather forecast data corresponding to the future prediction moment and the adjacent future numerical weather forecast data corresponding to the adjacent position of the target photovoltaic station are obtained. If the time scale type is a time scale of more than a week, the future numerical weather forecast data corresponding to the future prediction moment is obtained.
[0070] (3) Inputting numerical weather forecast data and / or power data into each target power prediction model respectively, and determining the power prediction value output by each target power prediction model.
[0071] In this embodiment, the numerical weather forecast data and / or power data obtained in step (2) are respectively input into each determined target power prediction model to obtain a power prediction value corresponding to each target power prediction model.
[0072] (4) The power prediction values are averaged to obtain the target predicted power value.
[0073] In this embodiment, the power prediction values output by each target power prediction model may be averaged, and the finally obtained power prediction average value may be used as the target prediction power value corresponding to the power prediction request.
[0074] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. For example, network requests are intercepted and processed with the authorization of the user.
[0075] The technical solution of the embodiment of the present invention determines multiple types of sample sets based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic site, wherein different types of sample sets are used to train power prediction models of different time scales, and the different time scales include: hourly time scale, daily time scale and weekly time scale. Thus, for each sample set, multiple power prediction models with different model structures are hyperparameter tuned based on the current sample set and the gray wolf optimization algorithm to obtain multiple power prediction models to be trained associated with the current sample set, and then, each power prediction model to be trained is trained based on the current sample set to obtain multiple candidate power prediction models corresponding to the current sample set, and based on the model evaluation accuracy corresponding to each candidate power prediction model, a preset number of target power prediction models are determined from the multiple candidate power prediction models, and further, based on each target power prediction model corresponding to each sample set, a photovoltaic power integrated prediction model corresponding to the target photovoltaic site is determined. The technical solution of the present invention, the photovoltaic power integrated prediction model obtained realizes adaptive power prediction in different time scale scenarios of photovoltaic sites, and improves the accuracy of photovoltaic power prediction.
[0076] Embodiment 2
[0077] Figure 2 This is a schematic diagram of a method for determining a photovoltaic power integration prediction model provided by an embodiment of the present invention. Based on the above embodiment, S120 is further described. The specific implementation method can refer to the technical solution of this embodiment. The technical terms that are the same or corresponding to the above embodiment are not repeated here.
[0078] like Figure 2 As shown, the method specifically comprises the following steps:
[0079] S210: Determine multiple types of sample sets based on historical numerical weather forecasts and historical power corresponding to the target photovoltaic station.
[0080] S220 . For each sample set, retrieve multiple power prediction models with different structures, and determine a hyperparameter index corresponding to each power prediction model.
[0081] Among them, the number of hyperparameter indicators is at least one.
[0082] In an embodiment, multiple power prediction models with different structures can be collected in advance to form a model database. When it is necessary to determine the photovoltaic power integrated prediction model, these power prediction models are retrieved from the model database. The hyperparameter indicators corresponding to each power prediction model are determined by the original attributes of the model. For example, the hyperparameter indicators may include but are not limited to: learning rate, regularization parameter, number of iterations, etc. Moreover, power prediction models with different structures correspond to different hyperparameter indicators. Based on this, the hyperparameter indicators corresponding to each power prediction model can be considered as determined quantities, that is, when a power prediction model is obtained, the hyperparameter indicators corresponding to it are determined.
[0083] S230: For each power prediction model, based on the current sample set and the Grey Wolf Optimization Algorithm, determine the optimal hyperparameter indicator value corresponding to the power prediction model.
[0084] Among them, the optimal hyperparameter indicator value is the optimal value corresponding to the hyperparameter indicator.
[0085] In the present embodiment, the specific implementation method for determining the optimal hyperparameter index value of each power prediction model is the same, and any one of them is used as an example to illustrate. The power prediction model can correspond to one or more hyperparameter indicators, and each hyperparameter indicator can determine an optimal hyperparameter index value. For any hyperparameter indicator, different hyperparameter index optional values can be determined by the gray wolf optimization algorithm in a loop iteration. When the value of the hyperparameter index of the power prediction model is the hyperparameter index optional value, the current sample set is input into the power prediction model, and the model error value is determined according to the output prediction value and the actual label value of the power prediction model, and the hyperparameter index optional value of the next operation is determined according to the model error value, and the cycle is repeated until the final optimal hyperparameter index value is determined.
[0086] Optionally, a specific implementation method for determining the optimal hyperparameter indicator value corresponding to the power prediction model based on the current sample set and the gray wolf optimization algorithm may include the following steps:
[0087] (1) Configuring the initialization parameters of the gray wolf optimization algorithm; the initialization parameters include: the number of gray wolves in the wolf pack, the maximum number of optimization iterations, and the value range of the hyperparameter indicator.
[0088] In this embodiment, to run the gray wolf optimization algorithm, it is necessary to predetermine the initialization parameters. Among them, the number of gray wolves in the wolf pack is used to characterize how many gray wolves are included in the gray wolf optimization algorithm. This value can be a user-defined value, for example, it can be 10, 15, etc.; the maximum number of optimization iterations is used to characterize the maximum number of runs of the gray wolf optimization algorithm, for example, it can be 100 times, 120 times, etc. The value range of the hyperparameter indicator is the value range corresponding to the hyperparameter indicator of the current power prediction model. For example, the hyperparameter indicator of the current power prediction model is the learning rate. According to practical experience, the learning rate corresponding to this type of power prediction model is usually between 80% and 90%, and the value range of the hyperparameter indicator is 80%-90%. It can be understood that the optimal hyperparameter indicator value finally determined is within the value range of the hyperparameter indicator.
[0089] (2) Based on the value range of the hyperparameter indicator, the chaotic mapping method is used to determine the initial value of the gray wolf corresponding to each gray wolf in the wolf pack.
[0090] In this embodiment, when running the gray wolf optimization algorithm, it is necessary to determine the gray wolf initial value corresponding to each gray wolf. Theoretically, the gray wolf initial value corresponding to each gray wolf can be any value within the value range of the hyperparameter indicator. At present, the probability of each value being taken within the value range of the hyperparameter indicator is usually the same. In this case, it is necessary to configure a larger maximum number of optimization iterations for the gray wolf optimization algorithm to obtain the optimal value. In this embodiment, the gray wolf initial value is determined by chaotic mapping. Within the value range of the hyperparameter indicator, the probability of each value being taken is different, and the probability of the value in the middle of the value range being taken is greater, and the optimal value is usually located in the middle of the value range, thereby reducing the maximum number of optimization iterations of the gray wolf optimization algorithm and quickly and efficiently determining the optimal hyperparameter indicator value.
[0091] (3) Based on the current sample set, initialization parameters and the initial values of the gray wolves corresponding to each gray wolf, the gray wolf optimization algorithm is used to iterate and determine the optimal gray wolf in the wolf pack;
[0092] Among them, the optimal gray wolf is: the gray wolf with the best performance of the power prediction model is taken as the value of the hyperparameter indicator of the power prediction model in the wolf pack.
[0093] In this embodiment, the gray wolf optimization algorithm is a cyclic running algorithm. After setting the gray wolf optimization algorithm initialization parameters and gray wolf initial values, the current sample set is input into the gray wolf optimization algorithm. Each cyclic operation of the gray wolf optimization algorithm can determine the optimal gray wolf corresponding to the current cycle.
[0094] Optionally, based on the current sample set, the initialization parameters and the gray wolf initial values corresponding to each gray wolf, a specific implementation method of using the gray wolf optimization algorithm to iteratively determine the best gray wolf in the wolf pack may include:
[0095] Step 1: For each gray wolf, the gray wolf initial value is used as the value of the hyperparameter indicator of the power prediction model to obtain the power prediction model to be processed corresponding to each gray wolf, and the power prediction model to be processed is trained based on the current sample set. When the training is completed, the gray wolf fitness corresponding to the gray wolf is determined.
[0096] In this embodiment, for each gray wolf, the method of determining the fitness of the gray wolf is the same, and any one of the gray wolves is used as an example for explanation. The gray wolf initial value is used as the value of the hyperparameter index of the power prediction model, and this power prediction model is called the pending power prediction model. The pending power prediction model is trained according to the current sample set, and when the training of the pending power prediction model is completed, the error between the output value of the pending power prediction model and the label value in the current sample set is determined, and the error is calculated, for example, averaging, taking the root mean square, taking the standard deviation, etc., to obtain the gray wolf fitness corresponding to the gray wolf. It can be understood that the smaller the error calculation value, the higher the gray wolf fitness.
[0097] Step 2: Based on the gray wolf fitness corresponding to each gray wolf, determine the leader gray wolf and working gray wolves in the wolf pack; among them, the leader gray wolf includes: the best gray wolf, the second best gray wolf and the third best gray wolf.
[0098] In this embodiment, the gray wolf fitness corresponding to each gray wolf can be arranged in descending order, so that the gray wolf with the highest gray wolf fitness is determined as the optimal gray wolf, the gray wolf with the second highest gray wolf fitness is determined as the second-best gray wolf, the gray wolf with the third-highest gray wolf fitness is determined as the third-best gray wolf, and the remaining gray wolves are determined as migrant gray wolves. Since the optimal gray wolf determined in the current cycle is the basis for updating each migrant gray wolf, on the basis of obtaining the optimal gray wolf, it is necessary to further explain how to update the value of the migrant gray wolf according to the current leading gray wolf, so that the leading gray wolf of the next cycle can be determined according to the updated migrant gray wolf. Therefore, in the next step, how to update the value of the migrant gray wolf according to the leading gray wolf is explained in detail.
[0099] Step 3: Based on the gray wolf fitness of the leading gray wolf and the sum of the gray wolf fitness of all leading gray wolves, determine the reference weight value corresponding to each leading gray wolf.
[0100] In this embodiment, the gray wolf fitness corresponding to the best gray wolf among the leading gray wolves is A1, the gray wolf fitness corresponding to the second best gray wolf is A2, and the gray wolf fitness corresponding to the third best gray wolf is A3. The reference weight value corresponding to the best gray wolf is A1 / (A1+A2+A3), the reference weight value corresponding to the second best gray wolf is A2 / (A1+A2+A3), and the reference weight value corresponding to the third best gray wolf is A3 / (A1+A2+A3).
[0101] Step 4: For each migrant gray wolf, based on the gray wolf initial value of each leading gray wolf, the reference weight value of each leading gray wolf and the gray wolf initial value of the migrant gray wolf, update the gray wolf initial value of the migrant gray wolf to obtain the gray wolf reference value of the migrant gray wolf.
[0102] At present, the initial gray wolf values of the leading gray wolves and the initial gray wolf values of the migrant gray wolves are usually brought into the gray wolf position update formula of the gray wolf optimization algorithm to update the initial gray wolf values of the migrant gray wolves.
[0103] However, in this embodiment, the gray wolf initial value of each leading gray wolf is multiplied by the corresponding reference weight value to obtain the weighted leading gray wolf reference value, and then the weighted leading gray wolf reference value and the gray wolf initial value of the migrant gray wolf are brought into the gray wolf position update formula of the gray wolf optimization algorithm to obtain the gray wolf reference value of the migrant gray wolf, wherein the gray wolf position update formula is a prior art and is not repeated here. In this embodiment, the reference weight of the leading gray wolf is adaptively adjusted through the gray wolf fitness of the leading gray wolf, so that the optimal gray wolf in the wolf pack occupies a greater leadership position, thereby determining each gray wolf reference value closer to the optimal value, and determining a more accurate optimal hyperparameter indicator value.
[0104] Step 5: Based on the updated gray wolf reference value of the working gray wolf, repeatedly determine the gray wolf fitness corresponding to each gray wolf, determine the optimal gray wolf according to the gray wolf fitness, and update the gray wolf reference value corresponding to the working gray wolf according to the leading gray wolf.
[0105] In this embodiment, after the gray wolf reference value of the working gray wolf is updated, Step 1-Step 4 is repeatedly executed.
[0106] (4) When the current number of iterations meets the maximum number of optimization iterations, the gray wolf reference value corresponding to the optimal gray wolf obtained in the last iteration is determined as the optimal hyperparameter indicator value corresponding to the power prediction model.
[0107] Exemplarily, the maximum number of optimization iterations is 120. When the current number of iterations is the 120th, the gray wolf reference value corresponding to the optimal gray wolf obtained for the 120th time is determined as the optimal hyperparameter indicator value corresponding to the power prediction model.
[0108] S240: Taking the optimal hyperparameter index value as the hyperparameter index value of the power prediction model, and obtaining a plurality of power prediction models to be trained that are associated with the current sample set.
[0109] In this embodiment, for each power prediction model, the optimal hyperparameter index value is taken as the value of the hyperparameter index of the power prediction model, and a plurality of power prediction models to be trained associated with the current sample set are obtained.
[0110] S250, training each power prediction model to be trained based on the current sample set to obtain multiple candidate power prediction models corresponding to the current sample set, and determining a preset number of target power prediction models from the multiple candidate power prediction models based on the model evaluation accuracy corresponding to each candidate power prediction model.
[0111] S260: Based on each target power prediction model corresponding to each sample set, determine a photovoltaic power integration prediction model corresponding to the target photovoltaic site.
[0112] The technical solution of the embodiment of the present invention is to perform hyperparameter tuning on multiple power prediction models with different model structures based on the current sample set and the gray wolf optimization algorithm, and obtain multiple power prediction models to be trained associated with the current sample set. When determining the initial value of each gray wolf in the wolf pack in the gray wolf optimization algorithm, the gray wolf initial value is determined by chaotic mapping. Within the value range of the hyperparameter index, the probability of each value being taken is different, and the probability of the value located in the middle of the value range being taken is greater, and the optimal value is usually located in the middle of the value range, so that the maximum optimization iteration number of the gray wolf optimization algorithm can be reduced, and the optimal hyperparameter index value can be determined quickly and efficiently. When the value of the working gray wolf is updated based on the leading gray wolf, the reference weight of the leading gray wolf is adaptively adjusted through the gray wolf fitness of the leading gray wolf, so that the optimal gray wolf in the wolf pack occupies a greater leadership position, so that the determined reference values of each gray wolf are closer to the optimal value, and a more accurate optimal hyperparameter index value can be determined. The performance of hyperparameter tuning of the power prediction model based on the gray wolf optimization algorithm is improved in the above manner.
[0113] Embodiment 3
[0114] In the embodiment of the present invention, a method for determining a photovoltaic power integration prediction model is introduced in a specific implementation manner, see Figure 3 Next, combine Figure 3 Further explanation of this method:
[0115] S1: Collect historical numerical weather forecast data and historical power data of target photovoltaic stations respectively, obtain sample data sets of target photovoltaic stations, and divide the data sets for training (35%), verification (35%) and testing (30%) of prediction models. At the same time, establish a distributed photovoltaic high-dimensional feature mapping power long-term, short-term, and ultra-short-term prediction algorithm library. For example, more than 40 deep learning algorithms such as LSTM (Long Short-Term Memory), BPNN (Back Propagation Neural Network), GRU (Gate Recurrent Unit), and Transformer can be collected and divided according to the time scale to establish a distributed photovoltaic high-dimensional feature mapping power long-term, short-term, and ultra-short-term prediction algorithm library.
[0116] S2: Based on the training data set and prediction algorithm library obtained in S1, the Grey Wolf Optimization algorithm (GWO) is used to tune the hyperparameters of each prediction algorithm to obtain the optimal hyperparameters of each prediction model network.
[0117] S3: Based on the validation data set obtained by S1, the power prediction model to be trained is constructed in combination with the optimal hyperparameters of the network model obtained by S2. According to the time scale, the top ten models with the best prediction performance at each time scale are screened and combined to construct a photovoltaic power integrated prediction model. For example, the time scale can be divided into annual, quarterly, monthly, weekly, day-ahead, and daily time scales, and the adaptability evaluation of the annual-quarterly-monthly-weekly-day-ahead-day rolling distributed prediction algorithm is carried out to screen the top ten models with the best prediction performance at each time scale and combine them to construct a photovoltaic power integrated prediction model.
[0118] The technical solution provided by the embodiment of the present invention constructs a distributed photovoltaic high-dimensional feature mapping power long-term, short-term, and ultra-short-term prediction algorithm library, and combines the Gray Wolf Optimization Algorithm to perform hyperparameter tuning on each prediction model to obtain the optimal network hyperparameters. For different time scale scenarios, an annual-quarterly-monthly-weekly-day-ahead-day rolling distributed prediction algorithm adaptability evaluation is carried out to screen out the top ten models of prediction performance at each time scale, and a photovoltaic power integrated prediction model for multiple time scales of the target photovoltaic site is constructed in combination, so as to realize adaptive power prediction of photovoltaic sites in different time scale scenarios, improve the prediction accuracy of photovoltaic power, and play an important role in photovoltaic power prediction.
[0119] Embodiment 4
[0120] Figure 4A schematic diagram of the structure of a photovoltaic power integrated prediction model determination device provided in an embodiment of the present invention, the device includes: a sample set determination module 310, a model hyperparameter tuning module 320, a model training module 330 and an integrated model determination module 340.
[0121] The sample set determination module 310 is used to determine multiple types of sample sets based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic station; wherein different types of sample sets are used to train power prediction models at different time scales, and the different time scales include: hourly time scale, daily time scale, and time scales above a week;
[0122] A model hyperparameter tuning module 320 is used to perform hyperparameter tuning on multiple power prediction models with different model structures for each sample set based on the current sample set and the gray wolf optimization algorithm to obtain multiple power prediction models to be trained associated with the current sample set;
[0123] A model training module 330 is used to train each power prediction model to be trained based on the current sample set, obtain multiple candidate power prediction models corresponding to the current sample set, and determine a preset number of target power prediction models from the multiple candidate power prediction models based on the model evaluation accuracy corresponding to each candidate power prediction model;
[0124] The integrated model determination module 340 is used to determine the photovoltaic power integrated prediction model corresponding to the target photovoltaic site based on each target power prediction model corresponding to each sample set.
[0125] On the basis of the above device, optionally, the multiple types of sample sets include: a first sample set corresponding to an hourly time scale, a second sample set corresponding to a daily time scale, and a third sample set corresponding to a time scale of more than a week. The sample set determination module 310 includes: a collection time determination unit, a data sampling processing unit, a first sample set determination unit, a second sample set determination unit, and a third sample set determination unit;
[0126] The collection time determination unit is used to determine multiple collection times based on the target interval time, taking the target historical time as the collection starting point;
[0127] A data sampling and processing unit is used to sample and process the historical numerical weather forecast and the historical power according to multiple sampling moments, and obtain the discrete historical numerical weather forecast and discrete historical power corresponding to each sampling moment;
[0128] A first sample set determination unit is used to construct first sample data for each collection moment based on the discrete historical numerical weather forecast and discrete historical power corresponding to the collection moment, and each discrete historical power in a target historical time period before the collection moment, so as to determine a first sample set corresponding to an hourly time scale based on the first sample data corresponding to each collection moment;
[0129] A second sample set determination unit is used to construct second sample data for each collection moment based on the discrete historical numerical weather forecast and discrete historical power corresponding to the collection moment, and the adjacent discrete historical numerical weather forecast corresponding to the adjacent position of the target photovoltaic station, so as to determine a second sample set corresponding to the daily time scale based on the second sample data corresponding to each collection moment;
[0130] The third sample set determination unit is used to construct third sample data for each collection moment based on the discrete historical numerical weather forecast and discrete historical power corresponding to the collection moment, so as to determine the third sample set corresponding to the time scale of more than one week based on the third sample data corresponding to each collection moment.
[0131] On the basis of the above device, optionally, the model hyperparameter tuning module 320 includes: a hyperparameter index determination unit, an index value determination unit and a parameter tuning unit;
[0132] The hyperparameter indicator determination unit is used to retrieve multiple power prediction models with different structures and determine the hyperparameter indicators corresponding to each power prediction model; wherein the number of the hyperparameter indicators is at least one;
[0133] An indicator value determination unit, used to determine the optimal hyperparameter indicator value corresponding to each power prediction model based on the current sample set and the gray wolf optimization algorithm;
[0134] The parameter tuning unit is used to take the optimal hyperparameter index value as the hyperparameter index value of the power prediction model, and obtain multiple power prediction models to be trained associated with the current sample set.
[0135] On the basis of the above device, optionally, the indicator value determination unit includes: a parameter initialization subunit, a gray wolf initial value determination subunit, an optimal gray wolf determination subunit and an indicator value determination subunit;
[0136] The parameter initialization subunit is used to configure the initialization parameters of the gray wolf optimization algorithm; the initialization parameters include: the number of gray wolves in the wolf pack, the maximum number of optimization iterations, and the value range of the hyperparameter indicator;
[0137] A gray wolf initial value determination subunit is used to determine the gray wolf initial value corresponding to each gray wolf in the wolf pack by using a chaotic mapping method based on the value range of the hyperparameter indicator;
[0138] The optimal gray wolf determination subunit is used to determine the optimal gray wolf in the wolf pack by adopting the gray wolf optimization algorithm for cyclic iteration based on the current sample set, initialization parameters and the gray wolf initial values corresponding to each gray wolf;
[0139] The indicator value determination subunit is used to determine the gray wolf reference value corresponding to the optimal gray wolf obtained in the last iteration as the optimal hyperparameter indicator value corresponding to the power prediction model when the current number of iterations meets the maximum number of optimization iterations.
[0140] On the basis of the above device, optionally, an optimal gray wolf determination subunit is specifically used to use the gray wolf initial value as the value of the hyperparameter indicator of the power prediction model for each gray wolf, obtain the power prediction model to be processed corresponding to each gray wolf, train the power prediction model to be processed based on the current sample set, and determine the gray wolf fitness corresponding to the gray wolf when the training is completed;
[0141] Based on the gray wolf fitness corresponding to each gray wolf, the leading gray wolf and the migrant gray wolves in the wolf pack are determined; wherein the leading gray wolves include: the best gray wolf, the second best gray wolf and the third best gray wolf; based on the gray wolf fitness of the leading gray wolf and the sum of the gray wolf fitness of all the leading gray wolves, the reference weight value corresponding to each leading gray wolf is determined; for each migrant gray wolf, based on the gray wolf initial value of each leading gray wolf, the reference weight value of each leading gray wolf and the gray wolf initial value of the migrant gray wolf, the gray wolf initial value of the migrant gray wolf is updated to obtain the gray wolf reference value of the migrant gray wolf; based on the updated gray wolf reference value of the migrant gray wolf, the steps of determining the gray wolf fitness corresponding to each gray wolf, determining the best gray wolf according to the gray wolf fitness, and updating the gray wolf reference value corresponding to the migrant gray wolf according to the leading gray wolf are repeated.
[0142] On the basis of the above-mentioned device, optionally, the model training module 330 is specifically used to determine the candidate power prediction models whose model evaluation accuracy ranks in the front of a preset number as the target power prediction models.
[0143] On the basis of the above device, optionally, the photovoltaic power integrated prediction model determination device further includes: a photovoltaic power integrated prediction model application module;
[0144] The photovoltaic power integrated prediction model application module is specifically used to determine, when receiving a power prediction request from a target photovoltaic site, each target power prediction model corresponding to the time scale type from the photovoltaic power integrated prediction model according to the time scale type in the power prediction request; obtain numerical weather forecast data and / or power data corresponding to the time scale type; input the numerical weather forecast data and / or power data into each target power prediction model respectively, and determine the power prediction value output by each target power prediction model; and average each power prediction value to obtain a target predicted power value.
[0145] The technical solution of the embodiment of the present invention determines multiple types of sample sets based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic site, wherein different types of sample sets are used to train power prediction models of different time scales, and the different time scales include: hourly time scale, daily time scale and weekly time scale. Thus, for each sample set, multiple power prediction models with different model structures are hyperparameter tuned based on the current sample set and the gray wolf optimization algorithm to obtain multiple power prediction models to be trained associated with the current sample set, and then, each power prediction model to be trained is trained based on the current sample set to obtain multiple candidate power prediction models corresponding to the current sample set, and based on the model evaluation accuracy corresponding to each candidate power prediction model, a preset number of target power prediction models are determined from the multiple candidate power prediction models, and further, based on each target power prediction model corresponding to each sample set, a photovoltaic power integrated prediction model corresponding to the target photovoltaic site is determined. The technical solution of the present invention realizes adaptive power prediction in different time scale scenarios of photovoltaic sites and improves the accuracy of photovoltaic power prediction.
[0146] The photovoltaic power integration prediction model determination device provided in the embodiment of the present invention can execute the photovoltaic power integration prediction model determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0147] It is worth noting that the various units and modules included in the above system are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0148] Embodiment 5
[0149] Figure 5 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 5 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0150] like Figure 5 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).
[0151] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0152] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0153] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.
[0154] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.
[0155] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 40, and / or may communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0156] The processing unit 401 executes various functional applications and page processing by running the programs stored in the system memory 402, for example, implementing the method for determining the photovoltaic power integration prediction model provided in the embodiment of the present invention.
[0157] Embodiment 6
[0158] An embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute a method for determining a photovoltaic power integration prediction model when executed by a computer processor, the method comprising:
[0159] Based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic station, multiple types of sample sets are determined; wherein different types of sample sets are used to train power prediction models at different time scales, including hourly time scale, daily time scale and time scale above weekly time scale;
[0160] For each sample set, multiple power prediction models with different model structures are hyperparameter tuned based on the current sample set and the Gray Wolf Optimization Algorithm to obtain multiple power prediction models to be trained associated with the current sample set;
[0161] Based on the current sample set, each power prediction model to be trained is trained to obtain multiple candidate power prediction models corresponding to the current sample set, and based on the model evaluation accuracy corresponding to each candidate power prediction model, a preset number of target power prediction models are determined from the multiple candidate power prediction models;
[0162] Based on each target power prediction model corresponding to each sample set, a photovoltaic power integration prediction model corresponding to the target photovoltaic site is determined.
[0163] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0164] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0165] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0166] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0167] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining a photovoltaic power integration prediction model, It is characterized in that include: Based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic station, multiple types of sample sets are determined; wherein the different types of sample sets are used to train power prediction models at different time scales, and the different time scales include: hourly time scale, daily time scale, and time scales above a week; For each of the sample sets, based on the current sample set and the Gray Wolf Optimization Algorithm, multiple power prediction models with different model structures are hyper-parameter tuned to obtain multiple power prediction models to be trained associated with the current sample set; Training each of the power prediction models to be trained based on the current sample set to obtain a plurality of candidate power prediction models corresponding to the current sample set, and determining a preset number of target power prediction models from the plurality of candidate power prediction models based on the model evaluation accuracy corresponding to each of the candidate power prediction models; Based on the target power prediction models corresponding to the sample sets, a photovoltaic power integration prediction model corresponding to the target photovoltaic station is determined.
2. The method according to claim 1, It is characterized in that The multiple types of sample sets include: a first sample set corresponding to an hourly time scale, a second sample set corresponding to a daily time scale, and a third sample set corresponding to a time scale of more than a week. The multiple types of sample sets are determined based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic station, including: Take the target historical moment as the collection starting point, and determine multiple collection moments according to the target interval length; According to the multiple collection moments, the historical numerical weather forecast and the historical power are sampled and processed respectively to obtain discrete historical numerical weather forecasts and discrete historical powers corresponding to the respective collection moments; For each of the collection moments, first sample data is constructed based on the discrete historical numerical weather forecast and the discrete historical power corresponding to the collection moment, and each discrete historical power in the target historical time period before the collection moment, so as to determine a first sample set corresponding to the hourly time scale based on the first sample data corresponding to each of the collection moments; For each of the collection moments, based on the discrete historical numerical weather forecast and the discrete historical power corresponding to the collection moment, and the adjacent discrete historical numerical weather forecast corresponding to the adjacent location of the target photovoltaic station, construct second sample data, so as to determine a second sample set corresponding to the daily time scale based on the second sample data corresponding to each of the collection moments; For each of the collection moments, third sample data is constructed based on the discrete historical numerical weather forecast and the discrete historical power corresponding to the collection moment, so as to determine a third sample set corresponding to a time scale of more than a week based on the third sample data corresponding to each of the collection moments.
3. The method according to claim 1, It is characterized in that The method of performing hyperparameter tuning on multiple power prediction models with different model structures based on the current sample set and the gray wolf optimization algorithm to obtain multiple power prediction models to be trained associated with the current sample set includes: Retrieving a plurality of power prediction models with different structures, and determining a hyperparameter index corresponding to each of the power prediction models; wherein the number of the hyperparameter index is at least one; For each of the power prediction models, based on the current sample set and the Grey Wolf Optimization Algorithm, determine the optimal hyperparameter indicator value corresponding to the power prediction model; The optimal hyperparameter index value is taken as the hyperparameter index value of the power prediction model to obtain a plurality of power prediction models to be trained that are associated with the current sample set.
4. The method according to claim 3, It is characterized in that The determining, based on the current sample set and the gray wolf optimization algorithm, the optimal hyperparameter indicator value corresponding to the power prediction model includes: Configuring initialization parameters of the gray wolf optimization algorithm; wherein the initialization parameters include: the number of gray wolves in the wolf pack, the maximum number of optimization iterations, and the value range of the hyperparameter indicator; Based on the value range of the hyperparameter indicator, a chaotic mapping method is used to determine the initial value of the gray wolf corresponding to each gray wolf in the wolf pack; Based on the current sample set, the initialization parameters and the gray wolf initial values corresponding to the gray wolves, a gray wolf optimization algorithm is used to iteratively determine the best gray wolf in the wolf pack; When the current number of iterations meets the maximum number of optimization iterations, the gray wolf reference value corresponding to the optimal gray wolf obtained in the last iteration is determined as the optimal hyperparameter indicator value corresponding to the power prediction model.
5. The method according to claim 4, It is characterized in that The method of determining the best gray wolf in the wolf pack by cyclically iterating the gray wolf optimization algorithm based on the current sample set, the initialization parameters and the gray wolf initial values corresponding to each gray wolf comprises: For each of the gray wolves, the gray wolf initial value is used as the value of the hyperparameter indicator of the power prediction model to obtain a power prediction model to be processed corresponding to each of the gray wolves, the power prediction model to be processed is trained based on the current sample set, and when the training is completed, the fitness of the gray wolf corresponding to the gray wolf is determined; Based on the gray wolf fitness corresponding to each gray wolf, determine the leader gray wolf and the working gray wolf in the wolf pack; wherein the leader gray wolf includes: the best gray wolf, the second best gray wolf and the third best gray wolf; Determining a reference weight value corresponding to each of the leading gray wolves based on the gray wolf fitness of the leading gray wolf and the sum of the gray wolf fitness of all leading gray wolves; For each of the migrant gray wolves, based on the gray wolf initial value of each of the leading gray wolves, the reference weight value of each of the leading gray wolves and the gray wolf initial value of the migrant gray wolves, the gray wolf initial value of the migrant gray wolves is updated to obtain the gray wolf reference value of the migrant gray wolves; Based on the updated gray wolf reference value of the working gray wolves, the steps of determining the gray wolf fitness corresponding to each of the gray wolves, determining the optimal gray wolf according to the gray wolf fitness, and updating the gray wolf reference value corresponding to the working gray wolves according to the leading gray wolf are repeated.
6. The method according to claim 1, It is characterized in that The step of determining a preset number of target power prediction models from the plurality of candidate power prediction models based on the model evaluation accuracy corresponding to each of the candidate power prediction models comprises: The candidate power prediction models whose model evaluation accuracy ranks in the top preset number are determined as the target power prediction models.
7. The method according to claim 1, It is characterized in that The method further comprises: When receiving a power prediction request of the target photovoltaic station, determining, according to the time scale type in the power prediction request, each of the target power prediction models corresponding to the time scale type from the photovoltaic power integrated prediction model; Acquiring numerical weather forecast data and / or power data corresponding to the time scale type; Inputting the numerical weather forecast data and / or power data into each of the target power prediction models respectively, and determining the power prediction value output by each of the target power prediction models; The power prediction values are averaged to obtain a target predicted power value.
8. A device for determining a photovoltaic power integration prediction model, It is characterized in that include: A sample set determination module is used to determine multiple types of sample sets based on the historical numerical weather forecast and historical power corresponding to the target photovoltaic site; wherein the different types of sample sets are used to train power prediction models at different time scales, and the different time scales include: hourly time scale, daily time scale and time scale above weekly time scale; A model hyperparameter tuning module, used for performing hyperparameter tuning on multiple power prediction models with different model structures for each of the sample sets based on the current sample set and the gray wolf optimization algorithm, to obtain multiple power prediction models to be trained associated with the current sample set; A model training module, used to train each of the power prediction models to be trained based on the current sample set to obtain a plurality of candidate power prediction models corresponding to the current sample set, and to determine a preset number of target power prediction models from the plurality of candidate power prediction models based on the model evaluation accuracy corresponding to each of the candidate power prediction models; The integrated model determination module is used to determine the photovoltaic power integrated prediction model corresponding to the target photovoltaic site based on the target power prediction models corresponding to the sample sets.
9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining the photovoltaic power integration prediction model according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a photovoltaic power integration prediction model according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Integrally optimized new energy generating capacity prediction method
CN120497917A
An integrated optimization method for new energy power generation prediction
CN120497917B
