Data sample construction, prediction model training, meteorological element prediction method and device
By correcting the weather forecast data based on the weather type, high-quality meteorological data samples are constructed, which solves the problem of insufficient accuracy and robustness of meteorological elements prediction in the prior art, and achieves more accurate and reliable meteorological prediction.
Patent Information
- Application Number
- CN202411750335.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-08
AI Technical Summary
In the prediction of meteorological factors such as solar radiation, the prediction accuracy and robustness are insufficient, especially under complex and rapidly changing meteorological conditions.
By obtaining the meteorological measurement data and original meteorological forecast data under the specified weather type, we determine the meteorological correction data corresponding to the weather type, and use these correction data to correct the original meteorological forecast data to build a meteorological data sample for training the initial prediction model.
The learning effect and prediction accuracy of the prediction model are improved, the consistency and reliability of the meteorological forecast data are enhanced, and the generalization ability of the model under different weather conditions is improved.
Smart Images

Figure CN119782801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorological forecasting, and in particular to a method and device for data sample construction, forecasting model training, and meteorological element forecasting. Background Art
[0002] Photovoltaic power generation has been increasingly widely used due to its advantages of being clean, renewable and easy to distribute. As the proportion of photovoltaic power generation in total power generation increases, accurate and reliable solar photovoltaic power generation forecasting has become one of the important supports for the reliable operation of the power system.
[0003] The related technologies mainly use the technology of fusing numerical weather forecast data and cloud map data to predict meteorological elements such as solar radiation. However, the fusion prediction method in the related technologies has not achieved the ideal effect in terms of prediction accuracy and robustness, and the prediction accuracy needs to be improved. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the present invention proposes a method and device for constructing data samples, training prediction models, and predicting meteorological elements, which can effectively improve the learning effect of the prediction model by correcting the meteorological forecast data based on the weather type to construct a meteorological data sample for training the initial prediction model, thereby improving the prediction accuracy of the prediction model.
[0005] To achieve the above-mentioned purpose, the first aspect of the implementation mode of the present invention proposes a data sample construction method, which includes: obtaining the meteorological measured data and the original meteorological forecast data of a specified historical day; wherein the specified historical day corresponds to a specified weather type; determining the meteorological correction data corresponding to the specified weather type based on the meteorological measured data and the original meteorological forecast data; correcting the original meteorological forecast data using the meteorological correction data to obtain corrected forecast data; constructing a meteorological data sample for training an initial prediction model based on the corrected forecast data; wherein the label of the meteorological data sample is obtained according to the meteorological measured data.
[0006] According to one embodiment of the present invention, the original meteorological forecast data includes meteorological element data of the designated historical day respectively predicted by multiple meteorological forecast sources; the meteorological correction data corresponding to the designated weather type determined based on the meteorological measured data and the original meteorological forecast data includes: performing a ratio operation based on the meteorological measured data and the meteorological element data of the designated historical day predicted by any meteorological forecast source to obtain the correction data corresponding to any meteorological forecast source; wherein the meteorological correction data includes the correction data corresponding to any meteorological forecast source; the correction of the original meteorological forecast data using the meteorological correction data includes: correcting the meteorological element data predicted by the corresponding meteorological forecast source using the correction data corresponding to any meteorological forecast source to obtain the corrected element data of the corresponding meteorological forecast source; wherein the corrected forecast data includes the corrected element data of any meteorological forecast source.
[0007] According to one embodiment of the present invention, the method of correcting the original meteorological forecast data using the meteorological correction data to obtain corrected forecast data includes: correcting the first forecast data corresponding to a specified location using the meteorological correction data to obtain the first corrected data corresponding to the specified location; correcting the second forecast data corresponding to an adjacent location using the meteorological correction data to obtain the second corrected data corresponding to the adjacent location; wherein the adjacent location is adjacent to the specified location; the original meteorological forecast data includes the first forecast data and the second forecast data; the corrected forecast data includes the first corrected data and the second corrected data; the method of constructing a meteorological data sample based on the corrected forecast data includes: performing interpolation processing using the second corrected data to obtain first interpolation result data corresponding to the specified location; obtaining a combined data sample corresponding to the specified location based on the first corrected data and the first interpolation result data; wherein the meteorological data sample includes the combined data sample.
[0008] According to one embodiment of the present invention, before obtaining the combined data sample corresponding to the designated location based on the first corrected data and the first interpolation result data, the method further includes: performing feature extraction based on the first interpolation result data to obtain meteorological characteristic data corresponding to the designated location; obtaining the combined data sample corresponding to the designated location based on the first corrected data and the first interpolation result data includes: combining the first corrected data, the first interpolation result data and the meteorological characteristic data to obtain the combined data sample.
[0009] According to one embodiment of the present invention, the method of correcting the original meteorological forecast data with the meteorological correction data to obtain the corrected forecast data includes: correcting the third forecast data corresponding to the first specified time of the specified location with the meteorological correction data to obtain the third corrected data of the specified location at the first specified time; correcting the fourth forecast data corresponding to the second specified time of the specified location with the meteorological correction data to obtain the fourth corrected data of the specified location at the second specified time; wherein the first specified time is close to the second specified time; the original meteorological forecast data includes the third forecast data and the fourth forecast data; the corrected forecast data includes the third corrected data and the fourth corrected data; the method of constructing the meteorological data sample based on the corrected forecast data includes: performing interpolation processing with the fourth corrected data to obtain the second interpolation result data corresponding to the first specified time; obtaining the data sample corresponding to the first specified time based on the third corrected data and the second interpolation result data; wherein the meteorological data sample includes the data sample corresponding to the first specified time.
[0010] To achieve the above-mentioned purpose, the second aspect of the present invention proposes a prediction model training method, which includes: obtaining meteorological data samples; wherein the meteorological data samples are constructed by any one of the data sample construction methods in the aforementioned implementation modes; inputting the meteorological data samples into the initial prediction model for prediction to obtain meteorological element prediction data; updating the parameters of the initial prediction model according to the meteorological element prediction data and the meteorological measured data corresponding to the meteorological data samples until the model training stop conditions are met, thereby obtaining a trained meteorological element prediction model.
[0011] To achieve the above-mentioned purpose, the third aspect of the present invention proposes a meteorological element prediction method, which includes: obtaining meteorological forecast data for a day to be predicted; wherein the meteorological forecast data includes the forecast weather type for the day to be predicted; obtaining meteorological correction data corresponding to the forecast weather type; using the meteorological correction data to correct the meteorological forecast data to obtain corrected meteorological forecast data; obtaining meteorological data to be input based on the corrected meteorological forecast data; inputting the meteorological data to be input into a meteorological element prediction model to obtain a meteorological element prediction result for the day to be predicted; wherein the meteorological element prediction model is trained by the prediction model training method in the aforementioned embodiment.
[0012] According to one embodiment of the present invention, the meteorological forecast data includes initial meteorological data of the day to be predicted predicted by multiple meteorological forecast sources; the meteorological correction data includes correction data corresponding to each of the multiple meteorological forecast sources; the use of the meteorological correction data to correct the meteorological forecast data to obtain corrected meteorological forecast data includes: using the correction data corresponding to any meteorological forecast source to correct the initial meteorological data forecasted by the corresponding meteorological forecast source to obtain the corrected data of the corresponding meteorological forecast source; wherein the corrected meteorological forecast data includes the corrected data of any meteorological forecast source.
[0013] To achieve the above-mentioned purpose, the fourth aspect of the present invention proposes a data sample construction device, which includes: a meteorological data acquisition module, which is used to acquire the meteorological measured data and original meteorological forecast data of a specified historical day; wherein the specified historical day corresponds to a specified weather type; a correction data determination module, which is used to determine the meteorological correction data corresponding to the specified weather type based on the meteorological measured data and the original meteorological forecast data; a corrected data acquisition module, which is used to correct the original meteorological forecast data using the meteorological correction data to obtain corrected forecast data; a first sample acquisition module, which is used to construct a meteorological data sample for training an initial prediction model based on the corrected forecast data; wherein the label of the meteorological data sample is obtained according to the meteorological measured data.
[0014] To achieve the above-mentioned purpose, the fifth aspect of the present invention proposes a prediction model training device, which includes: a second sample acquisition module, used to obtain meteorological data samples; wherein the meteorological data samples are constructed by any one of the data sample construction methods in the aforementioned embodiments; a prediction data acquisition module, used to input the meteorological data samples into the initial prediction model for prediction, and obtain meteorological element prediction data; a prediction model training module, used to update the parameters of the initial prediction model according to the meteorological element prediction data and the meteorological measured data corresponding to the meteorological data samples, until the model training stop conditions are met, and the trained meteorological element prediction model is obtained.
[0015] To achieve the above-mentioned purpose, the sixth aspect of the present invention proposes a meteorological element prediction device, which includes: a meteorological forecast data acquisition module, used to acquire meteorological forecast data for a day to be predicted; wherein the meteorological forecast data includes the forecast weather type for the day to be predicted; a meteorological correction data acquisition module, used to acquire meteorological correction data corresponding to the forecast weather type; a meteorological forecast data correction module, used to correct the meteorological forecast data using the meteorological correction data to obtain corrected meteorological forecast data; a data acquisition module to be input, used to obtain the meteorological data to be input based on the corrected meteorological forecast data; a prediction result acquisition module, used to input the meteorological data to be input into a meteorological element prediction model, and obtain the meteorological element prediction result for the day to be predicted; wherein the meteorological element prediction model is trained by the prediction model training method in the aforementioned embodiment.
[0016] To achieve the above-mentioned purpose, the seventh aspect of the present invention proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the data sample construction method or the prediction model training method or the meteorological element prediction method in any of the aforementioned embodiments.
[0017] To achieve the above-mentioned objectives, the eighth aspect of the present invention proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data sample construction method or the prediction model training method or the meteorological element prediction method in any of the aforementioned embodiments are implemented.
[0018] According to multiple embodiments provided by the present invention, by obtaining the meteorological measured data and the corresponding original meteorological forecast data under the specified weather type, the meteorological correction data corresponding to the specified weather type is determined. The original meteorological forecast data under the specified weather type is corrected by using the meteorological correction data to reduce the noise of the meteorological forecast data and improve the data quality. The meteorological data samples are constructed based on the corrected meteorological forecast data and used to train the initial prediction model, which can effectively improve the learning effect of the prediction model, thereby improving the prediction accuracy of the prediction model.
[0019] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The present invention is a flowchart of a method for constructing a data sample according to one embodiment of the present invention.
[0021] Figure 2The present invention is a schematic diagram of a process for correcting original weather forecast data according to one embodiment of the present specification.
[0022] Figure 3 The present invention is a schematic diagram of a process for correcting original weather forecast data according to another embodiment of the present specification.
[0023] Figure 4 A flowchart of a prediction model training method provided according to one embodiment of the present specification.
[0024] Figure 5 The present invention is a flowchart of a meteorological element prediction method provided according to one embodiment of the present specification.
[0025] Figure 6a A schematic flow chart of a meteorological element prediction method provided according to another embodiment of the present specification.
[0026] Figure 6b The present invention is a flowchart of data correction according to one embodiment of the present invention. DETAILED DESCRIPTION
[0027] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0028] In view of the growing demand for renewable energy and the decreasing cost of building solar photovoltaic sites, photovoltaic power generation accounts for an increasing proportion of clean energy acquisition methods of renewable energy. Accurate and reliable solar photovoltaic power generation forecasts have become one of the important supports for the reliable operation of power systems.
[0029] In photovoltaic power generation prediction, the relevant technology mainly relies on the technology of using numerical meteorological forecast data and cloud image data fusion to predict meteorological elements such as solar radiation. This prediction method combines meteorological data from ground stations and satellites to predict meteorological elements such as solar radiation and / or temperature at different times of the day. Although this traditional fusion prediction method can estimate solar radiation from multiple angles, it still has some obvious limitations and shortcomings.
[0030] First, numerical weather forecast data usually have certain deviations and noise. In related technologies, directly inputting these numerical weather forecast data as samples into the prediction model will affect the learning effect of the prediction model. Secondly, although cloud map data can provide real-time cloud coverage information, its temporal and spatial resolution may be insufficient and cannot be used to accurately predict short-term fluctuations in solar radiation, etc. In addition, the methods in related technologies fail to effectively integrate the heterogeneous characteristics of multi-source data, resulting in the prediction model being unable to fully utilize the different perspectives and information provided by each data source.
[0031] Therefore, the fusion prediction method in the related technology has not achieved the ideal effect in terms of prediction accuracy and robustness. Especially under complex and rapidly changing meteorological conditions, the prediction accuracy of the prediction method in the related technology is low, which will directly affect the accuracy and reliability of photovoltaic power generation prediction, and further affect the dispatch and management of the power system.
[0032] In order to improve the learning effect of the prediction model of meteorological elements such as solar radiation, thereby improving the accuracy and reliability of meteorological element prediction, it is necessary to propose a method and device for data sample construction, prediction model training, and meteorological element prediction. Considering that in meteorological forecasting, the forecast accuracy of weather types is relatively high, therefore, the data sample construction method provided in this specification obtains the meteorological measured data and the corresponding original meteorological forecast data under the specified weather type to determine the meteorological correction data corresponding to the specified weather type. The original meteorological forecast data under the specified weather type is corrected by using the meteorological correction data to reduce the noise of the meteorological forecast data and improve the data quality. The meteorological data sample is constructed based on the corrected meteorological forecast data and used to train the initial prediction model, which can effectively improve the learning effect of the prediction model and thus improve the prediction accuracy of the prediction model.
[0033] At the same time, the meteorological element prediction method provided in this specification obtains the meteorological correction data corresponding to the forecast weather type according to the forecast weather type of the forecast day to correct the meteorological forecast data of the forecast day. The input feature data of the prediction model is constructed based on the corrected meteorological forecast data. Compared with directly using the uncorrected meteorological forecast data as the input data of the prediction model, the meteorological element prediction method provided in this specification can provide a more accurate prediction.
[0034] This specification provides a method for constructing a data sample. Figure 1 As shown, the data sample construction method may include the following steps.
[0035] S110, obtaining the meteorological measured data and original meteorological forecast data of a designated historical day, wherein the designated historical day corresponds to a designated weather type.
[0036] S120: Determine meteorological correction data corresponding to a specified weather type based on the meteorological measured data and the original meteorological forecast data.
[0037] S130, using the meteorological correction data to correct the original meteorological forecast data to obtain corrected forecast data.
[0038] S140: constructing meteorological data samples for training an initial prediction model based on the corrected forecast data, wherein the labels of the meteorological data samples are obtained based on the actual meteorological data.
[0039] Among them, meteorological measured data refers to meteorological data actually collected or observed, which can be obtained from meteorological observation sites or meteorological data sources. Raw meteorological forecast data refers to forecast information directly output by meteorological models or forecasting systems, which can be obtained from meteorological forecast data sources. Both meteorological measured data and raw meteorological forecast data can include data on meteorological elements such as temperature, humidity, air pressure, wind direction, wind speed, precipitation, and irradiance.
[0040] The specified weather type can be any one of sunny, cloudy, rainy, foggy, snowy, etc.
[0041] Meteorological correction data can be used to reflect the degree of deviation between the meteorological elements in the original meteorological forecast data and the meteorological elements in the corresponding meteorological measured data, and can be used to correct or amend the original meteorological forecast data.
[0042] The initial prediction model is a model that has not been trained and is used to predict meteorological elements.
[0043] Specifically, for a specified weather type, a date with the specified weather type can be determined in historical dates as a specified historical day, and the actual meteorological data and original meteorological forecast data of the specified historical day can be obtained from relevant sites or data sources. By comparing the actual meteorological data and the corresponding original meteorological forecast data, the difference between the original meteorological forecast data and the actual meteorological data can be obtained, and this difference can reflect the accuracy or deviation of the forecast data. Based on these differences, meteorological correction data for the specified weather type can be calculated.
[0044] The meteorological correction data of the specified weather type is used to correct the original meteorological forecast data under the specified weather type, so as to adjust the meteorological forecast data and obtain corrected forecast data that is closer to the actually observed meteorological data.
[0045] The data samples are constructed based on the corrected forecast data to obtain the meteorological data samples under the specified weather type, and the labels of the meteorological data samples are obtained according to the corresponding meteorological measured data. The initial prediction model is trained according to the meteorological data samples and the corresponding labels.
[0046] In some embodiments, the meteorological correction data for a specified weather type may include correction data corresponding to each of a plurality of meteorological elements.
[0047] For example, the designated weather type is sunny. The dates with sunny weather type in the past three years can be used as designated historical days, and for each of these designated historical days, the actual weather data of each day can be obtained from relevant weather stations or weather data sources, and the original weather forecast data of each day can be obtained from relevant weather forecast sources such as weather forecast systems.
[0048] Taking temperature as an example, for each day, the correction data of the forecast temperature of the day can be calculated by comparing the difference between the actual temperature of the day and the original forecast temperature. Thus, the correction data of the forecast temperature of each of these specified historical days can be obtained. The correction data of the temperature of these specified historical days can be further calculated by averaging or other methods selected according to actual application requirements, and the correction data of the forecast temperature corresponding to the sunny weather type can be obtained.
[0049] According to the above method, the correction data of the meteorological elements such as the forecast humidity and the forecast irradiance corresponding to the sunny weather type can be obtained. The temperature in the original meteorological forecast data is corrected by using the correction data of the forecast temperature, the humidity in the original meteorological forecast data is corrected by using the correction data of the humidity, the irradiance in the original meteorological forecast data is corrected by using the correction data of the irradiance, and so on. Thus, the corrected forecast data under the sunny weather type can be obtained.
[0050] Meteorological data samples are constructed based on the corrected forecast data, and at least one of the temperature, humidity, irradiance, etc. in the actual meteorological data can be used as a label of the corresponding meteorological data sample for training the initial prediction model.
[0051] The description of constructing data samples for other weather types is similar to the above description and will not be repeated here.
[0052] Exemplarily, the above-mentioned specified weather type and specified historical day are taken as examples. Taking temperature as an example, the correction data of the forecast temperature under the sunny weather type can be calculated by comparing the difference between the mean of the forecast temperature of these specified historical days and the mean of the actual temperature. Similarly, the correction data corresponding to the meteorological elements such as forecast humidity and forecast irradiance under the sunny weather type can be obtained. The description of correcting the original meteorological forecast data using the correction data is similar to the description of the correction process above, and will not be repeated in detail.
[0053] In other embodiments, the meteorological correction data for a specified weather type may be overall correction data corresponding to a plurality of meteorological elements.
[0054] For example, the designated weather type is cloudy. The dates with cloudy weather type in the past year can be used as designated historical days, and for each of these designated historical days, actual weather data and original weather forecast data for each day can be obtained from relevant weather stations or weather data sources.
[0055] Taking the meteorological elements including temperature, humidity and irradiance as an example, for temperature, the correction data of the forecast temperature under cloudy weather type can be calculated by comparing the difference between the average forecast temperature of these specified historical days and the actual average temperature; the correction data of the forecast humidity under cloudy weather type can be calculated by comparing the difference between the average forecast humidity of these specified historical days and the actual average humidity; the correction data of the forecast irradiance under cloudy weather type can be calculated by comparing the difference between the average forecast irradiance of these specified historical days and the actual average irradiance.
[0056] By performing mean calculation on the correction data of forecast temperature, correction data of forecast humidity and correction data of forecast irradiance, or calculating these correction data in other ways (for example, weighted calculation) according to actual application requirements, the overall meteorological correction data corresponding to various meteorological elements under cloudy weather types can be obtained.
[0057] It is understandable that a meteorological data sample can be constructed based on the original meteorological forecast data and the corrected forecast data.
[0058] It should be noted that the calculation method of the meteorological correction data can be determined according to the actual application requirements, etc., and is not specifically limited in this specification. The original meteorological forecast data can be corrected using the meteorological correction data, and any method such as the linear scaling method or the quantile mapping method can be used according to the actual application situation, etc., and is not specifically limited in this specification.
[0059] The initial prediction model can be a model for predicting a single meteorological element or a model for predicting multiple meteorological elements.
[0060] In the above implementation, by comparing the measured meteorological data and the meteorological forecast data under the specified weather type, and calculating the corresponding correction data, the deviation in the original meteorological forecast data under the specified weather type is adjusted, thereby improving the accuracy of the data samples used to train the prediction model, so that the model can learn more accurate connections between meteorological elements during the training process, and further improve the prediction accuracy of the prediction model. At the same time, using the corrected forecast data to train the prediction model can enable the model to better learn the laws of meteorological changes in the real world, thereby improving the generalization ability of the model under different weather conditions. Compared with the prediction method in the related art that often directly uses the original meteorological forecast data without in-depth data quality control and is prone to introduce errors, the data sample construction method provided in this specification corrects the meteorological forecast data based on the weather type to enhance the consistency and reliability of the meteorological forecast data, and provides higher quality data sample support for the prediction model based on meteorological data, thereby improving the prediction ability and actual application effect of the model.
[0061] In some embodiments, the original meteorological forecast data includes meteorological element data of a specified historical day respectively predicted by multiple meteorological forecast sources. Determining meteorological correction data corresponding to a specified weather type based on the meteorological measured data and the original meteorological forecast data may include: performing a ratio operation based on the meteorological measured data and the meteorological element data of a specified historical day predicted by any meteorological forecast source to obtain correction data corresponding to any meteorological forecast source. The meteorological correction data includes correction data corresponding to any meteorological forecast source.
[0062] Accordingly, using the meteorological correction data to correct the original meteorological forecast data may include: using the correction data corresponding to any meteorological forecast source to correct the meteorological element data predicted by the corresponding meteorological forecast source to obtain the corrected element data of the corresponding meteorological forecast source. The corrected forecast data includes the corrected element data of any meteorological forecast source.
[0063] Among them, the weather forecast source is the source of weather forecast data, which can be a weather forecast system, model, organization, etc.
[0064] Meteorological element data include specific meteorological parameters, such as temperature, humidity, wind speed, wind direction, precipitation, irradiance, air pressure, etc.
[0065] The correction data corresponding to any weather forecast source is the correction data under the specified weather type corresponding to the weather forecast source, and can also be called the correction factor or correction coefficient under the specified weather type corresponding to the weather forecast source.
[0066] Specifically, meteorological element data of a specified historical day are obtained from multiple meteorological forecast sources. For any meteorological forecast source, a ratio operation can be performed on the meteorological measured data of the specified historical day and the meteorological element data of the specified historical day obtained from the meteorological forecast source to analyze and obtain the correction data under the specified weather type corresponding to the meteorological forecast source. In this way, the correction data under the specified weather type corresponding to each of the multiple meteorological forecast sources can be obtained.
[0067] For obtaining meteorological element data of a specified historical day from any meteorological forecast source, the correction data corresponding to the meteorological forecast source obtained by the above calculation can be used to operate with the meteorological element data to correct the meteorological element data and obtain the corrected element data of the meteorological forecast source, so that the corrected forecast data is closer to the actual observation value. In this way, the corrected element data of each of multiple meteorological forecast sources can be obtained.
[0068] Exemplarily, the multiple weather forecast sources may include Windy, ECMWF (European Centre for Medium-Range Weather Forecasts), Meteoblue, Hefeng (Hefeng Weather) and other data sources. Assuming that the specified weather type is sunny, the dates with sunny weather types in the past three years are used as specified historical days. For each of these specified historical days, the actual weather data of each day can be obtained from relevant meteorological observation stations, etc., and the original weather element forecast data of each day can be obtained from the above multiple weather forecast sources.
[0069] Taking meteorological elements including irradiance, temperature and humidity as an example, for the Windy data source, the actual irradiance mean of the above specified historical days can be calculated. The average of the forecast irradiance for these specified historical days obtained from this data source Perform ratio calculation to obtain the correction factor As the correction data of the irradiance data under the sunny weather type corresponding to the Windy data source. Similarly, the correction data of the temperature data under the sunny weather type corresponding to the Windy data source and the correction data of the humidity data can be obtained in the same way.
[0070] The forecast irradiance value of each day obtained from the Windy data source is multiplied by the correction factor, so as to use the correction factor to correct the forecast irradiance value obtained from the Windy data source to obtain the corrected forecast irradiance value. The description of the correction process of the forecast temperature and forecast humidity is similar to the above description, and will not be repeated here.
[0071] In this way, the meteorological element forecast data of each weather forecast source for a specified historical day can be corrected separately.
[0072] It is understandable that the actual irradiance average and the predicted irradiance mean For example, if we perform a ratio operation on it, we get the correction factor: Then, the forecast irradiance value of each day obtained from the corresponding data source can be divided by the correction factor for correction.
[0073] The correction data corresponding to any weather forecast source may include correction data corresponding to each of a plurality of meteorological elements, or may be overall correction data corresponding to a plurality of meteorological elements.
[0074] In the above implementation, by introducing data from multiple weather forecast sources, the error of a single data source can be reduced, and by correcting the data of each weather source, the noise of weather forecast data can be reduced and the data quality can be improved. By fusing data from multiple data sources for sample construction, more comprehensive information can be provided to the model, thereby improving the reliability of the overall forecast.
[0075] In some embodiments, reference Figure 2 As shown, the original meteorological forecast data is corrected by using the meteorological correction data to obtain the corrected forecast data, which may include:
[0076] S210. Correct the first forecast data corresponding to the designated location using the meteorological correction data to obtain first corrected data corresponding to the designated location.
[0077] S220. Correct the second forecast data corresponding to the adjacent location using the meteorological correction data to obtain second corrected data corresponding to the adjacent location.
[0078] Among them, the adjacent position is adjacent to the designated position; the original meteorological forecast data includes first forecast data and second forecast data; and the corrected forecast data includes first corrected data and second corrected data.
[0079] The meteorological data samples constructed based on the corrected forecast data may include:
[0080] S230: Perform interpolation processing using the second corrected data to obtain first interpolation result data corresponding to the specified position.
[0081] S240: Obtain a combined data sample corresponding to the designated location according to the first corrected data and the first interpolation result data, wherein the meteorological data sample includes the combined data sample.
[0082] Among them, the designated location is a specific or designated location with observation or prediction needs within the preset area, and the adjacent location can be other locations with observation or prediction needs within the preset area, or part of the other locations adjacent to the designated location.
[0083] There is a certain correlation between the meteorological data of the neighboring locations and the meteorological data of the specified location.
[0084] The original weather forecast data of the designated historical day includes the weather forecast data of the designated location on the designated historical day (first forecast data) and the weather forecast data of the neighboring location on the designated historical day (second forecast data).
[0085] It can be understood that the meteorological correction data corresponding to the specified weather type can be obtained based on the actual meteorological data and meteorological forecast data of the specified location and neighboring locations.
[0086] Specifically, any location within a preset area can be used as a designated location, and other locations within the area can be used as adjacent locations. The original weather forecast data for a designated historical day includes first forecast data for the designated location and second forecast data for an adjacent location. After obtaining weather correction data corresponding to a designated weather type, the first forecast data for the designated location can be corrected using the weather correction data to obtain corresponding first corrected data, and the second forecast data for an adjacent location can be corrected to obtain corresponding second corrected data.
[0087] The designated location is taken as an unknown data point, and interpolation processing is performed based on the second corrected data of the adjacent location to obtain interpolated meteorological data of the designated location as the first interpolation result data. In this way, interpolation result data of each specific location with observation needs or prediction needs within the preset area can be obtained.
[0088] A combined data sample is constructed based on the first corrected data and the first interpolation result data of the designated location as the data sample of the designated location. Thus, a combined data sample of each location within the preset area can be obtained, and the combined data samples of these locations can be used as meteorological data samples.
[0089] For example, the original weather forecast data of some fixed geographical locations and times within a preset area under a specified weather type can be obtained, which may include basic meteorological element data such as irradiance, temperature, humidity, air pressure, wind speed, etc. Assuming that these fixed geographical locations are the locations of fixed photovoltaic power stations, the locations of these photovoltaic power stations are respectively recorded as l0, l1, ..., l n .
[0090] The location of any photovoltaic power station is taken as the designated location x0, and the locations of other photovoltaic power stations are taken as adjacent locations, which are recorded as x1, x2, ..., x n For each meteorological element, the meteorological correction data corresponding to the specified weather type is used to correct the meteorological forecast data of the specified location x0, and the corrected data of the specified location is obtained, which is recorded as Z(x0). Similarly, the corrected data of each adjacent location can be obtained, which are recorded as Z(x1), Z(x2), ..., Z(x n ).
[0091] Then, taking the specified location as an unknown data point, the corrected data of each neighboring location can be interpolated using Kriging interpolation to obtain the interpolation result data of the specified location. Kriging interpolation is an interpolation method based on spatial autocorrelation, which uses the structure of the original data and the semivariogram function to make unbiased estimates of the unknown sampling points of the regionalized variable. The specific interpolation method can be referred to the following formula:
[0092]
[0093] Among them, P(x0) is the estimated value of the meteorological element at the specified location x0 (interpolation result); Z(x i ) is the neighboring position x i The actual forecast value of the meteorological element at the point; n is the number of location points used for interpolation; ω is the Kriging weight coefficient, which can be determined according to actual application requirements.
[0094] The estimated values of each meteorological element corresponding to each photovoltaic power station location can be obtained by interpolation. According to the corrected data and the interpolated estimated value of each location, the combined data sample of each location can be obtained.
[0095] It should be noted that the above interpolation process may also select other interpolation methods according to actual application requirements, etc., which is not specifically limited in this specification.
[0096] In some embodiments, for a specified position, the first corrected data and the first interpolation result data corresponding to the specified position may be combined to obtain a combined data sample of the specified position.
[0097] In other embodiments, for a specified location, feature extraction, feature screening and other operations can also be performed based on the first corrected data and the first interpolation result data corresponding to the specified location, and a combined data sample can be obtained based on the first forecast data, the first corrected data, the first interpolation result data, the feature extraction and / or feature screening data of the specified location.
[0098] Furthermore, the meteorological correction data includes correction data corresponding to each of the multiple meteorological forecast sources, the first forecast data for the specified location includes forecast data respectively obtained from the multiple meteorological forecast sources, and the second forecast data for the adjacent location also includes forecast data respectively obtained from the multiple meteorological forecast sources.
[0099] Then, using the meteorological correction data to correct the first forecast data corresponding to the designated location includes: using the correction data corresponding to any meteorological forecast source to correct the forecast data of the corresponding meteorological forecast source corresponding to the designated location to obtain the corrected forecast data of the corresponding meteorological forecast source corresponding to the designated location. The first corrected data includes the corrected forecast data under the multiple meteorological forecast sources corresponding to the designated location.
[0100] Correcting the second forecast data corresponding to the adjacent location using the meteorological correction data includes: correcting the forecast data of the corresponding meteorological forecast source corresponding to the adjacent location using the correction data corresponding to any meteorological forecast source to obtain the corrected forecast data of the corresponding meteorological forecast source corresponding to the adjacent location. The second corrected data includes the corrected forecast data under multiple meteorological forecast sources corresponding to the adjacent location.
[0101] Correspondingly, the second corrected data is used for interpolation processing to obtain the first interpolation result data corresponding to the specified position, including: using the corrected forecast data under any meteorological forecast source corresponding to the adjacent position for interpolation processing to obtain the interpolation data under the corresponding meteorological forecast source corresponding to the specified position.
[0102] It should be noted that the designated location and the adjacent location may be included in a fixed location set, and the fixed location set may be determined based on locations with meteorological monitoring needs or meteorological element prediction needs within a preset area.
[0103] The preset area range may be a weather forecast area range, or may include multiple adjacent weather forecast area ranges. The designated location may be a specific or designated geographical location within a weather forecast area range, and the adjacent location may be other geographical locations within the weather forecast area range, or may be geographical locations within other weather forecast areas adjacent to the weather forecast area range.
[0104] For example, if a city area includes several photovoltaic power stations, the designated location may be the location (or geographical location) of any photovoltaic power station, and the adjacent location may be the location (or geographical location) of other photovoltaic power stations in the city area. Alternatively, if a province area includes several city areas, the designated location may be the location of a photovoltaic power station in one of the city areas, and the adjacent location may be the location of photovoltaic power stations in other city areas. The specific definition of location is not specifically limited in this specification.
[0105] In this specification, the process of interpolating the above-mentioned meteorological data based on neighboring locations and using the interpolated data as a type of feature in the sample of the specified location is called the process of embedding meteorological forecasts for neighboring locations (or, embedding meteorological forecasts for adjacent locations / embedding meteorological forecasts for adjacent areas).
[0106] In the above implementation, the feature dimension of the meteorological data is increased by interpolation of the spatial dimension, which helps to improve the feature expression ability of the meteorological forecast data, thereby improving the accuracy and availability of the meteorological forecast data.
[0107] In some embodiments, before obtaining the combined data sample corresponding to the specified location according to the first corrected data and the first interpolation result data, the data sample construction method may further include: performing feature extraction according to the first interpolation result data to obtain meteorological characteristic data corresponding to the specified location. Accordingly, obtaining the combined data sample corresponding to the specified location according to the first corrected data and the first interpolation result data may include: combining the first corrected data, the first interpolation result data and the meteorological characteristic data to obtain the combined data sample.
[0108] Among them, feature extraction is the process of extracting key information or features from raw data.
[0109] Meteorological characteristic data is characteristic data obtained by analyzing and extracting features based on original meteorological element data, and can be used to describe the relationship between meteorological elements, etc.
[0110] Specifically, feature extraction can be performed on the first interpolation result data of the specified location to extract data for describing the connection between meteorological elements from the first interpolation result data as meteorological feature data. The first corrected data, the first interpolation result data and the meteorological feature data of the specified location are combined to form a comprehensive combined data sample. This combined data sample not only contains the original meteorological data, but also includes useful information obtained through feature extraction, making the data sample richer and more meaningful.
[0111] For example, the meteorological characteristic data may be average temperature data within a certain time window, product data of temperature and humidity, etc., which may be obtained by performing statistical analysis on the original meteorological data.
[0112] Further, the first interpolation result data includes interpolation data corresponding to each of the plurality of weather forecast sources, and feature extraction is performed according to the first interpolation result data to obtain weather feature data corresponding to the specified location, including: feature extraction is performed according to the interpolation data of any weather forecast source corresponding to the specified location to obtain feature data of the corresponding weather forecast source corresponding to the specified location. The weather feature data corresponding to the specified location includes the feature data of the corresponding weather forecast source.
[0113] In some embodiments, reference Figure 3 As shown, the original meteorological forecast data is corrected by using the meteorological correction data to obtain the corrected forecast data, which may include:
[0114] S310. Correct the third forecast data corresponding to the first specified time at the specified location using the meteorological correction data to obtain the third corrected data at the specified location at the first specified time.
[0115] S320. Correct the fourth forecast data corresponding to the second specified time at the designated location using the meteorological correction data to obtain fourth corrected data at the designated location at the second specified time.
[0116] The original meteorological forecast data include third forecast data and fourth forecast data; the corrected forecast data include third corrected data and fourth corrected data.
[0117] Accordingly, the meteorological data samples constructed based on the corrected forecast data may include:
[0118] S330: Perform interpolation processing on the fourth corrected data to obtain second interpolation result data corresponding to the first specified time.
[0119] S340: Obtain data samples corresponding to the first specified time based on the third corrected data and the second interpolation result data, wherein the meteorological data samples include data samples corresponding to the first specified time.
[0120] The original weather forecast data includes weather forecast data for a specified location at different time points or time periods, and the corrected forecast data includes corrected forecast data for a specified location at a corresponding time point or time period.
[0121] Specifically, any time (time point or time period) can be used as the first designated time, and the time close to the first designated time can be used as the second designated time. The original weather forecast data of the designated historical day includes the third forecast data of the designated location at the first designated time and the fourth forecast data at the second designated time. After obtaining the weather correction data corresponding to the designated weather type, the third forecast data can be corrected using the weather correction data to obtain the corresponding third corrected data, and the fourth forecast data can be corrected to obtain the corresponding fourth corrected data.
[0122] The first designated time is taken as an unknown data point, and interpolation processing is performed according to the fourth corrected data of the adjacent second designated time, so that the interpolated meteorological data of the designated location at the first designated time can be obtained as the second interpolation result data. Thus, any specific time with a forecast demand can be taken as an unknown data point to obtain the interpolation result data of each specific time.
[0123] The sample is constructed based on the third corrected data and the second interpolation result data at the specified location at the first specified time to obtain the data sample of the specified location at the first specified time. Thus, the data sample of each specific time with prediction requirements can be obtained, and these data samples can be used as meteorological data samples.
[0124] Exemplarily, the original weather forecast data for some fixed geographical locations within a preset area at fixed times under specified weather types can be obtained. For example, 96-point weather forecast data for some fixed geographical locations on each specified historical day can be obtained at intervals of 15 minutes, including basic meteorological element data such as radiation, temperature, humidity, air pressure, and wind speed.
[0125] Any of these fixed geographical locations is used as a designated location, and for any day, any of the 96 time points can be used as the first designated time. Assuming that 14 o'clock is used as the first designated time, 13:30, 13:45, 14:15 and 14:30 can be used as the second designated time, or 13:45 and 14:15 can be used as the second designated time, or 13:00 and 15:00 can be used as the second designated time. For each meteorological element, the meteorological correction data corresponding to the specified weather type is used to correct the meteorological forecast data of the first designated time to obtain the corrected data of the designated location at the first designated time. Similarly, the corrected data of each time point in the second designated time can be obtained.
[0126] Then, the first specified time is used as an unknown data point, and the corrected data of each time point in the second specified time can be interpolated by using the Kriging interpolation method to obtain the interpolation result data of the specified location at the first specified time. For the description of Kriging interpolation, please refer to the description of interpolating the corrected data of the adjacent location by using the Kriging interpolation method in this manual, and the details will not be repeated here.
[0127] The estimated value of each meteorological element at the specified location at each time point can be obtained through interpolation. According to the corrected data corresponding to the specified location at each time point and the estimated value after interpolation, the data sample of the specified location at each time point can be obtained.
[0128] It should be noted that the method for selecting the second designated time can be determined according to actual application requirements, etc., and is not specifically limited in this specification.
[0129] In some embodiments, for a specified position, the third corrected data corresponding to the specified position at the first specified time and the second interpolation result data may be combined to obtain a data sample of the specified position at the first specified time.
[0130] In other embodiments, for a specified location, feature extraction, feature screening and other operations can also be performed based on the third corrected data and the second interpolation result data corresponding to the specified location at the first specified time, and a corresponding data sample can be obtained based on the third forecast data, the third corrected data, the second interpolation result data, the feature extraction and / or feature screening data of the specified location at the first specified time.
[0131] Furthermore, the meteorological correction data includes correction data corresponding to each of the multiple meteorological forecast sources, the third forecast data for the specified location at the first specified time includes forecast data respectively obtained from the multiple meteorological forecast sources, and the fourth forecast data at the second specified time also includes forecast data respectively obtained from the multiple meteorological forecast sources.
[0132] Then, using the meteorological correction data to correct the third forecast data corresponding to the designated location at the first designated time may include: using the meteorological correction data corresponding to any meteorological forecast source to correct the forecast data of the corresponding meteorological forecast source corresponding to the designated location at the first designated time, so as to obtain the corrected forecast data under the corresponding meteorological forecast source corresponding to the designated location at the first designated time.
[0133] Similarly, using meteorological correction data to correct the fourth forecast data corresponding to the designated location at the second designated time may include: using meteorological correction data corresponding to any meteorological forecast source to correct the forecast data of the corresponding meteorological forecast source corresponding to the designated location at the second designated time, so as to obtain the corrected forecast data under the corresponding meteorological forecast source corresponding to the designated location at the second designated time.
[0134] Thus, for each designated time, the corrected forecast data under multiple weather forecast sources corresponding to the designated location can be obtained, so that the corrected forecast data can be obtained.
[0135] Correspondingly, the fourth corrected data is used for interpolation processing to obtain second interpolation result data corresponding to the first specified time, including: using the corrected forecast data of any meteorological forecast source corresponding to the specified location at the second specified time for interpolation processing to obtain the interpolation data of the corresponding meteorological forecast source corresponding to the specified location at the first specified time.
[0136] It should be noted that in this specification, the above-mentioned meteorological data based on nearby time can be interpolated to use the interpolated data as a type of feature in the sample at the specified location. This process is called the process of embedding nearby time meteorological forecasts (or, embedding adjacent time meteorological forecasts).
[0137] In some achievable methods, for a designated location, the first interpolation result data corresponding to the designated location can be obtained by embedding the aforementioned meteorological forecast of the neighboring location, and the second interpolation result data corresponding to the designated location at each time can be obtained by embedding the aforementioned meteorological forecast of the neighboring time. Operations such as feature extraction are performed based on the first interpolation result data and the second interpolation result data to obtain feature data for describing the connection between meteorological elements, and used to construct data samples.
[0138] In the above implementation, the feature dimension of meteorological data is increased by interpolating the time dimension, which helps to further improve the feature expression ability of meteorological forecast data, thereby improving the availability of meteorological data samples and effectively improving the learning effect of the prediction model.
[0139] This specification provides a prediction model training method, referring to Figure 4 As shown, the prediction model training method may include the following steps.
[0140] S410: Obtain meteorological data samples, wherein the meteorological data samples are constructed by the data sample construction method in any of the above-mentioned implementation modes.
[0141] S420: Input the meteorological data samples into the initial prediction model for prediction to obtain meteorological element prediction data.
[0142] S430, updating the parameters of the initial prediction model according to the meteorological element prediction data and the meteorological measured data corresponding to the meteorological data samples until the model training stop condition is met, thereby obtaining a trained meteorological element prediction model.
[0143] Among them, the initial prediction model is a model for predicting meteorological elements that has not been trained.
[0144] The meteorological element prediction data is the predicted meteorological element value output by the initial prediction model based on the input meteorological data sample.
[0145] The label corresponding to the meteorological data sample can be obtained according to the meteorological measured data corresponding to the meteorological data sample, that is, the label corresponding to the meteorological data sample can be part of the corresponding meteorological measured data.
[0146] Specifically, by the aforementioned data sample construction method, meteorological data samples corresponding to different weather types can be constructed. The meteorological data samples are used as training data and input into the initial prediction model to obtain the corresponding meteorological element prediction data output by the initial prediction model.
[0147] The corresponding prediction target data is determined according to the actual meteorological data corresponding to the meteorological data samples, and the parameters of the initial prediction model are trained and adjusted according to the model evaluation criteria such as the accuracy and loss value of the loss function calculated according to the meteorological data samples and the corresponding prediction target data. The training and adjustment are carried out until the accuracy and loss value of the prediction model obtained by the final training meet the conditions, and the trained meteorological element prediction model can be obtained.
[0148] In some embodiments, the initial prediction model may adopt a gradient boosting tree LightGBM model.
[0149] In other embodiments, the initial prediction model may also adopt a Cross Modal Transformer (CMT) model.
[0150] The specific structure of the initial prediction model can be determined according to actual application requirements, etc., and is not specifically limited in this specification.
[0151] The initial prediction model can be a model for predicting a single meteorological element, for example, it can be used to predict a single solar irradiance, temperature, or humidity, etc., or it can be a model for predicting multiple meteorological elements, for example, it can be used to simultaneously predict at least two meteorological elements among solar irradiance, temperature, and humidity.
[0152] This specification provides a method for predicting meteorological elements. Figure 5 As shown, the meteorological element prediction method may include the following steps.
[0153] S510: Obtaining weather forecast data for the day to be predicted, wherein the weather forecast data includes the forecast weather type for the day to be predicted.
[0154] S520: Obtain meteorological correction data corresponding to the forecast weather type.
[0155] S530: Correct the weather forecast data using the weather correction data to obtain corrected weather forecast data.
[0156] S540: Obtaining meteorological data to be input based on the corrected meteorological forecast data.
[0157] S550: Input the meteorological data to be input into the meteorological element prediction model to obtain the meteorological element prediction result of the day to be predicted. The meteorological element prediction model is trained by the above-mentioned prediction model training method.
[0158] The meteorological data to be input is data obtained by constructing features based on the corrected meteorological forecast data, and is used as input features of the meteorological element prediction model.
[0159] The meteorological element prediction result may include a single meteorological element value, such as a single solar irradiance or temperature or humidity, etc., or may include multiple meteorological element values, for example, may include at least two meteorological elements of solar irradiance, temperature, and humidity.
[0160] Specifically, the meteorological forecast data for the day to be predicted can be obtained from the relevant meteorological forecast source, and the corresponding meteorological correction data can be determined according to the forecast weather type in the meteorological forecast data. The meteorological forecast data for the day to be predicted is corrected using the meteorological correction data to obtain the corrected meteorological forecast data, and the meteorological data to be input as the input feature of the meteorological element prediction model is constructed based on the corrected meteorological forecast data. The meteorological data to be input is input into the meteorological element prediction model trained by the aforementioned model training method, so that the meteorological element prediction model outputs the predicted meteorological element prediction result for the day to be predicted.
[0161] It should be noted that for the description of the calculation method of the meteorological correction data corresponding to the forecast weather type in this implementation mode, please refer to the description of the calculation method of the meteorological correction data corresponding to the specified weather type in this specification.
[0162] The meteorological correction data corresponding to the forecast weather type can be obtained from the meteorological correction data corresponding to each weather type calculated and stored in advance, or it can be calculated based on the historical meteorological forecast data under the weather type and its corresponding historical meteorological measured data after the forecast weather type of the forecast day is determined.
[0163] Furthermore, the weather forecast data for the day to be predicted may include weather forecast data corresponding to the position to be predicted and weather forecast data corresponding to the reference position, and correcting the weather forecast data using weather correction data may include: correcting the weather forecast data corresponding to the position to be predicted using weather correction data to obtain corrected weather forecast data corresponding to the position to be predicted, and correcting the weather forecast data corresponding to the reference position using weather correction data to obtain corrected weather forecast data corresponding to the reference position. The corrected weather forecast data includes corrected weather forecast data corresponding to the position to be predicted and corrected weather forecast data corresponding to the reference position. The reference position is adjacent to the position to be predicted.
[0164] Correspondingly, obtaining the meteorological data to be input based on the corrected meteorological forecast data may include: performing interpolation processing using the corrected meteorological forecast data corresponding to the reference position to obtain third interpolation result data corresponding to the position to be predicted; obtaining combined meteorological data corresponding to the position to be predicted based on the corrected meteorological forecast data corresponding to the position to be predicted and the third interpolation result data; wherein the meteorological data to be input includes the combined meteorological data.
[0165] Furthermore, before obtaining the combined meteorological data corresponding to the position to be predicted based on the corrected meteorological forecast data corresponding to the position to be predicted and the third interpolation result data, the meteorological element prediction method in this embodiment may also include: extracting features based on the third interpolation result data to obtain the meteorological element feature data corresponding to the position to be predicted. Accordingly, obtaining the combined meteorological data corresponding to the position to be predicted based on the corrected meteorological forecast data corresponding to the position to be predicted and the third interpolation result data may include: combining the corrected meteorological forecast data, the third interpolation result data and the meteorological element feature data corresponding to the position to be predicted to obtain the combined meteorological data.
[0166] Further, the weather forecast data for the day to be predicted may include weather forecast data corresponding to the third specified time and weather forecast data corresponding to the fourth specified time for the location to be predicted, and correcting the weather forecast data using the weather correction data may include: correcting the weather forecast data corresponding to the third specified time for the location to be predicted using the weather correction data to obtain the corrected weather forecast data corresponding to the third specified time for the location to be predicted, and correcting the weather forecast data corresponding to the fourth specified time for the location to be predicted using the weather correction data to obtain the corrected weather forecast data corresponding to the fourth specified time for the location to be predicted. The third specified time is close to the fourth specified time.
[0167] Accordingly, obtaining the meteorological data to be input based on the corrected meteorological forecast data may include: performing interpolation processing using the corrected meteorological forecast data corresponding to the location to be predicted at the fourth specified time to obtain fourth interpolation result data corresponding to the location to be predicted at the third specified time; obtaining the meteorological data corresponding to the location to be predicted at the third specified time based on the corrected meteorological forecast data corresponding to the location to be predicted and the fourth interpolation result data. The meteorological data to be input includes the meteorological data.
[0168] It should be noted that, for the description of the above-mentioned position to be predicted, please refer to the description of the designated position in this specification; for the description of the reference position, please refer to the description of the adjacent position in this specification; for the description of the third designated time, please refer to the description of the first designated time in this specification; for the description of the fourth designated time, please refer to the description of the second designated time in this specification.
[0169] Regarding the above-mentioned use of meteorological correction data to correct the meteorological forecast data, and the description of obtaining the meteorological data to be input based on the corrected meteorological forecast data, please refer to the data sample construction method in this manual, which includes the use of meteorological correction data to correct the original meteorological forecast data, and the description of constructing a meteorological data sample for training the initial prediction model based on the corrected forecast data. The details will not be repeated here.
[0170] In some embodiments, the meteorological forecast data includes initial meteorological data of a day to be predicted predicted by multiple meteorological forecast sources; the meteorological correction data includes correction data corresponding to each of the multiple meteorological forecast sources. Correcting the meteorological forecast data using the meteorological correction data to obtain corrected meteorological forecast data may include: correcting the initial meteorological data predicted by the corresponding meteorological forecast source using the correction data corresponding to any meteorological forecast source to obtain corrected data of the corresponding meteorological forecast source. The corrected meteorological forecast data includes corrected data of any meteorological forecast source.
[0171] It should be noted that, regarding the description of using the correction data corresponding to any meteorological forecast source to correct the initial meteorological data predicted by the corresponding meteorological forecast source in the present embodiment, please refer to the description of using the correction data corresponding to any meteorological forecast source to correct the meteorological element data predicted by the corresponding meteorological forecast source in the data sample construction method of this specification. The details will not be repeated here.
[0172] Furthermore, based on the corrected data of any weather forecast source, interpolation processing can be performed in the manner of embedding the weather forecast of the adjacent location as described above.
[0173] For example, reference Figure 6a As shown, the process of the meteorological element prediction method that integrates data from multiple meteorological forecast sources (hereinafter referred to as the multi-source meteorological fusion algorithm) may include: first, obtaining forecast data of radiation, humidity and temperature from multiple data sources (such as Windy, ECMWF, Meteoblue, Hefeng).
[0174] Secondly, the meteorological forecast data is corrected by linear scaling method to enhance the consistency and reliability of the data, thereby providing high-quality input for subsequent feature extraction and model training. Specifically, for each data source, the forecast irradiance is corrected using the correction factor 1 corresponding to the irradiance of the data source, the forecast humidity is corrected using the correction factor 2 corresponding to the humidity, and the forecast temperature is corrected using the correction factor 3 corresponding to the temperature. For details, please refer to the following formula:
[0175] radiation_new = correction factor 1*radiation_old
[0176] humidity_new=Correction factor 2*humidity_old
[0177] temperature_new=Correction factor 3*temperature_old
[0178] Among them, radiation_new is the corrected forecast irradiance, radiation_old is the original forecast irradiance; humidity_new is the corrected forecast humidity, humidity_old is the original forecast humidity; temperature_new is the corrected forecast temperature, temperature_old is the original forecast temperature.
[0179] In some optional ways, the quantile mapping method can also be used to correct the weather forecast data.
[0180] Again, feature extraction is performed on the corrected data. Feature extraction is a key step in improving the performance of the prediction model. In this specification, the data input to the model include not only the values of basic meteorological elements such as irradiation, temperature, humidity, air pressure, wind speed, etc. from different weather forecast sources at some fixed geographical locations and times, but also the interpolated weather forecast results of a specific geographical location (any of these fixed geographical locations) obtained by Kriging interpolation, embedding of adjacent regional weather forecasts, and embedding of adjacent time weather forecasts, and the interpolated results are used as the features of the input fusion model. At the same time, it also includes feature data obtained by feature extraction of the interpolated weather forecast results of a specific geographical location by machine learning methods. The meteorological data to be input to the prediction model is constructed based on these data.
[0181] Then, the constructed meteorological data is input into the prediction model for prediction. The model can use the LightGBM model to achieve the output of a single meteorological element prediction, or the fusion output of multiple meteorological element predictions. The model can also use the CrossModal Transformer model.
[0182] Then, the prediction results output by the model are corrected, which may include extreme value truncation and smoothing.
[0183] Finally, the fusion outputs the predicted irradiance, temperature, and humidity data. Considering the inherent correlation between different meteorological elements such as irradiance, temperature, and humidity, a multi-output prediction model can be used to simultaneously predict multiple meteorological elements such as irradiance, temperature, and humidity corresponding to each geographical location at each time in the future. Through this joint feature learning framework, the model can better understand the inherent connection and interaction between different data by jointly learning the characteristics of various meteorological elements. For example, there is a natural physical connection between temperature and irradiance, and the model can capture this connection more accurately by jointly learning the characteristics of these elements.
[0184] The specific process of data calibration may include: for the day to be predicted, calibrating the forecast data of radiation, humidity and temperature from different data sources. Figure 6b As shown, using historical data statistical analysis, for different weather types, the data deviations of each meteorological element of each data source under the corresponding weather type are evaluated. That is, according to the historical meteorological element forecast values (including historical irradiance, temperature, and humidity forecast values) of each data source under the corresponding weather type, and the corresponding historical meteorological element true values (including historical irradiance, temperature, and humidity true values), the correction factors corresponding to each meteorological element of each data source under different weather types are calculated. Then, according to the forecast weather type of the day to be predicted, the irradiance correction factor, humidity correction factor, and temperature correction factor corresponding to each data source are used to correct the original irradiance, temperature, and humidity forecast values in the meteorological forecast data of the day to be predicted respectively through the linear scaling method (Linear Scaling method), and the corrected irradiance, temperature, and humidity forecast values are obtained. Specifically, the meteorological element values in the meteorological forecast data of the day to be predicted can be corrected according to the following formula:
[0185]
[0186] Among them, for a certain meteorological element, R raw (w) is the meteorological element forecast data under a certain weather type w before correction (weather type w can be the forecast weather type of the day to be predicted); R cor (w) is the forecast data of the corresponding meteorological elements under the specific weather type w after correction; is the mean value of the actual meteorological elements observed under weather type w in the reference period (i.e., historical observation period); is the mean value of meteorological elements forecast under weather type w in the reference period.
[0187] The above multi-source meteorological fusion algorithm reduces the noise of meteorological forecast data and improves data quality by correcting the data of each meteorological source. It also improves the prediction effect of the fusion model by introducing different meteorological elements of multi-source meteorological data, combining the interpolation of time and space dimensions, and using multi-source heterogeneous data to improve the feature expression ability. Considering the inherent correlation of different meteorological elements, a multi-output model is used to learn the joint distribution of different meteorological elements to further improve the fusion effect.
[0188] By combining advanced data correction technology, in-depth feature extraction methods and innovative multi-output prediction models, the accuracy and reliability of forecasts of meteorological elements such as solar radiation can be significantly improved. These technical means can not only solve the problems existing in related technologies, but also provide a more scientific and efficient tool for fields such as photovoltaic power generation management.
[0189] Compared with the method of directly fusing numerical weather forecast data and cloud map data in related technologies, the multi-source meteorological fusion algorithm provided in this specification can provide a more comprehensive and detailed data perspective by fusing meteorological forecast data from multiple different numerical meteorological data sources, reducing the deviations and errors that may be introduced by a single data source. At the same time, the use of machine learning technology for in-depth feature extraction and selection can more effectively capture the key factors that affect meteorological elements, thereby improving the accuracy of meteorological element prediction. Therefore, by utilizing multiple data sources and advanced machine learning technology, a more accurate and robust prediction of meteorological elements such as solar radiation can be achieved.
[0190] In addition, the multi-source meteorological fusion algorithm provided in this specification can not only predict a single meteorological element, but also predict multiple elements (such as irradiation, temperature, and humidity) at the same time. Such a multi-task learning architecture enhances the adaptability and robustness of the model to different meteorological conditions, and can more effectively utilize computing resources and reduce processing time and cost. The multi-source meteorological fusion algorithm provided in this specification also performs data correction on meteorological forecast data based on the forecasted weather type. By accurately correcting meteorological forecast data from different sources, the systematic errors between data sources can be eliminated, thereby improving the actual effect of the fusion model.
[0191] Refer to Table 1, which is a comparison between the root mean square error (RMSE) of irradiance prediction based on meteorological forecast data from a single data source obtained in actual evaluation and the root mean square error of irradiance prediction based on the multi-source meteorological fusion algorithm of this specification.
[0192] Table 1 Comparison of RMSE for irradiation prediction
[0193] windy ecmw meteoblue hefeng Fusion of multi-source meteorological data Irradiation prediction RMSE 174.42 183.69 161.06 170.68 122.53
[0194] Refer to Table 2, which shows the comparison between the root mean square error of temperature prediction based on meteorological forecast data from a single data source and the root mean square error of temperature prediction based on a multi-source meteorological fusion algorithm obtained from actual evaluation.
[0195] Table 2 Comparison of RMSE for temperature prediction
[0196] windy ecmw meteoblue hefeng Fusion of multi-source meteorological data Temperature prediction RMSE 1.91 1.68 1.82 1.73 1.20
[0197] Refer to Table 3, which is a comparison between the root mean square error of humidity prediction based on meteorological forecast data from a single data source and the root mean square error of humidity prediction based on a multi-source meteorological fusion algorithm obtained in actual evaluation.
[0198] Table 3 Humidity prediction RMSE comparison
[0199] windy ecmw meteoblue hefeng Fusion of multi-source meteorological data Humidity prediction RMSE 14.75 12.66 10.23 12.90 8.17
[0200] According to the actual evaluation results of the above fusion model, the forecast accuracy of different meteorological elements such as irradiance, temperature, humidity, etc. obtained by the multi-source meteorological fusion algorithm has been effectively improved. Especially for irradiance prediction, compared with the irradiance predicted by the original meteorological forecast data based on a single meteorological source, the irradiance forecast RMSE of the multi-source meteorological fusion algorithm provided in this manual is reduced by 23.92%, which is a significant effect.
[0201] The present specification also provides a data sample construction device, which may include:
[0202] The meteorological data acquisition module is used to obtain the meteorological measured data and original meteorological forecast data of a specified historical day; wherein the specified historical day corresponds to a specified weather type.
[0203] The correction data determination module is used to determine the meteorological correction data corresponding to the specified weather type based on the meteorological measured data and the original meteorological forecast data.
[0204] The corrected data acquisition module is used to correct the original meteorological forecast data using the meteorological correction data to obtain the corrected forecast data.
[0205] The first sample acquisition module is used to construct meteorological data samples for training the initial prediction model based on the corrected forecast data; wherein the labels of the meteorological data samples are obtained according to the actual meteorological data.
[0206] The embodiments of this specification also provide a prediction model training device, which may include:
[0207] The second sample acquisition module is used to acquire meteorological data samples; wherein the meteorological data samples are constructed by any one of the data sample construction methods in the aforementioned implementation manners.
[0208] The forecast data acquisition module is used to input meteorological data samples into the initial forecast model for forecasting and obtain meteorological element forecast data.
[0209] The prediction model training module is used to update the parameters of the initial prediction model according to the meteorological element prediction data and the meteorological measured data corresponding to the meteorological data samples until the model training stop conditions are met to obtain the trained meteorological element prediction model.
[0210] The embodiments of this specification also provide a meteorological element prediction device, which may include:
[0211] The weather forecast data acquisition module is used to acquire the weather forecast data for the day to be predicted; wherein the weather forecast data includes the forecast weather type for the day to be predicted.
[0212] The meteorological correction data acquisition module is used to obtain meteorological correction data corresponding to the forecast weather type.
[0213] The weather forecast data correction module is used to correct the weather forecast data using the weather correction data to obtain corrected weather forecast data.
[0214] The module for acquiring data to be input is used to obtain meteorological data to be input based on the corrected meteorological forecast data.
[0215] The prediction result acquisition module is used to input the meteorological data to be input into the meteorological element prediction model to obtain the meteorological element prediction result of the day to be predicted; wherein the meteorological element prediction model is trained by the prediction model training method in the aforementioned implementation method.
[0216] For specific limitations on the data sample construction device, please refer to the limitations on the data sample construction method above, for specific limitations on the prediction model training device, please refer to the limitations on the prediction model training method above, and for specific limitations on the meteorological element prediction device, please refer to the limitations on the meteorological element prediction method above, which will not be repeated here. Each module in the above-mentioned data sample construction device, prediction model training device, and meteorological element prediction device can be fully or partially implemented by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0217] An embodiment of the present specification also provides a computer device, which may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the data sample construction method or prediction model training method or meteorological element prediction method in any of the aforementioned embodiments.
[0218] The embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data sample construction method or prediction model training method or meteorological element prediction method in any of the aforementioned embodiments.
[0219] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0220] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0221] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0222] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0223] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0224] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A data sample construction method, characterized in that: The method comprises: Obtaining the meteorological measured data and original meteorological forecast data of a specified historical day; wherein the specified historical day corresponds to a specified weather type; Determining meteorological correction data corresponding to the specified weather type based on the meteorological measured data and the original meteorological forecast data; Correcting the original meteorological forecast data using the meteorological correction data to obtain corrected forecast data; Based on the corrected forecast data, meteorological data samples for training an initial prediction model are constructed; wherein the labels of the meteorological data samples are obtained according to the actual meteorological data.
2. The method according to claim 1, characterized in that The original meteorological forecast data includes meteorological element data of the specified historical day respectively predicted by multiple meteorological forecast sources; the meteorological correction data corresponding to the specified weather type is determined based on the meteorological measured data and the original meteorological forecast data, including: Performing a ratio operation based on the measured meteorological data and the meteorological element data of the specified historical day predicted by any meteorological forecast source to obtain correction data corresponding to any meteorological forecast source; wherein the meteorological correction data includes correction data corresponding to any meteorological forecast source; The method of correcting the original weather forecast data by using the weather correction data comprises: The meteorological element data predicted by the corresponding meteorological forecast source are corrected using the correction data corresponding to any of the meteorological forecast sources to obtain the corrected element data of the corresponding meteorological forecast source; wherein the corrected forecast data includes the corrected element data of any of the meteorological forecast sources.
3. The method according to claim 1, characterized in that: The method of correcting the original meteorological forecast data by using the meteorological correction data to obtain the corrected forecast data includes: Correcting first forecast data corresponding to a designated location using the meteorological correction data to obtain first corrected data corresponding to the designated location; Correcting the second forecast data corresponding to the adjacent position using the meteorological correction data to obtain the second corrected data corresponding to the adjacent position; wherein the adjacent position is adjacent to the designated position; the original meteorological forecast data includes the first forecast data and the second forecast data; the corrected forecast data includes the first corrected data and the second corrected data; The step of constructing a meteorological data sample based on the corrected forecast data comprises: Performing interpolation processing using the second corrected data to obtain first interpolation result data corresponding to the designated position; A combined data sample corresponding to the designated location is obtained according to the first corrected data and the first interpolation result data; wherein the meteorological data sample includes the combined data sample.
4. The method according to claim 3, characterized in that Before obtaining the combined data sample corresponding to the designated position according to the first corrected data and the first interpolation result data, the method further includes: Performing feature extraction according to the first interpolation result data to obtain meteorological feature data corresponding to the specified location; The step of obtaining the combined data sample corresponding to the designated position according to the first corrected data and the first interpolation result data includes: The first corrected data, the first interpolation result data and the meteorological characteristic data are combined to obtain the combined data sample.
5. The method according to any one of claims 1 to 4, characterized in that: The method of correcting the original meteorological forecast data by using the meteorological correction data to obtain the corrected forecast data includes: Correcting the third forecast data corresponding to the first specified time at the specified location using the meteorological correction data to obtain third corrected data for the specified location at the first specified time; The fourth forecast data corresponding to the second designated time of the designated location is corrected by using the meteorological correction data to obtain the fourth corrected data of the designated location at the second designated time; wherein the first designated time is close to the second designated time; the original meteorological forecast data includes the third forecast data and the fourth forecast data; the corrected forecast data includes the third corrected data and the fourth corrected data; The step of constructing a meteorological data sample based on the corrected forecast data comprises: Performing interpolation processing using the fourth corrected data to obtain second interpolation result data corresponding to the first specified time; A data sample corresponding to the first specified time is obtained based on the third corrected data and the second interpolation result data; wherein the meteorological data sample includes a data sample corresponding to the first specified time.
6. A prediction model training method, characterized in that: The method comprises: Acquire a meteorological data sample; wherein the meteorological data sample is constructed by any one of the data sample construction methods of claims 1 to 5; Inputting the meteorological data samples into the initial prediction model for prediction to obtain meteorological element prediction data; The parameters of the initial prediction model are updated according to the meteorological element prediction data and the meteorological measured data corresponding to the meteorological data samples until the model training stop condition is met to obtain a trained meteorological element prediction model.
7. A meteorological element prediction method, characterized in that: The method comprises: Acquire weather forecast data for the day to be predicted; wherein the weather forecast data includes the forecast weather type for the day to be predicted; Obtaining meteorological correction data corresponding to the forecast weather type; Correcting the weather forecast data using the weather correction data to obtain corrected weather forecast data; Obtaining meteorological data to be input based on the corrected meteorological forecast data; The meteorological data to be input is input into a meteorological element prediction model to obtain a meteorological element prediction result for the day to be predicted; wherein the meteorological element prediction model is trained by the prediction model training method in claim 6.
8. The method according to claim 7, characterized in that The meteorological forecast data includes initial meteorological data of the to-be-forecasted day forecasted by multiple meteorological forecast sources; the meteorological correction data includes correction data corresponding to each of the multiple meteorological forecast sources; and the meteorological forecast data is corrected by using the meteorological correction data to obtain the corrected meteorological forecast data, including: The initial meteorological data predicted by any meteorological forecast source are corrected using the correction data corresponding to any meteorological forecast source to obtain the corrected data of the corresponding meteorological forecast source; wherein the corrected meteorological forecast data includes the corrected data of any meteorological forecast source.
9. A data sample construction device, characterized in that: The device comprises: A meteorological data acquisition module is used to acquire the meteorological measured data and original meteorological forecast data of a specified historical day; wherein the specified historical day corresponds to a specified weather type; A correction data determination module, used to determine the meteorological correction data corresponding to the specified weather type based on the meteorological measured data and the original meteorological forecast data; A corrected data acquisition module, used to correct the original meteorological forecast data using the meteorological correction data to obtain corrected forecast data; The first sample acquisition module is used to construct a meteorological data sample for training an initial prediction model based on the corrected forecast data; wherein the label of the meteorological data sample is obtained according to the actual meteorological data.
10. A prediction model training device, characterized in that: The device comprises: A second sample acquisition module, used to acquire meteorological data samples; wherein the meteorological data samples are constructed by any one of the data sample construction methods of claims 1 to 5; A forecast data acquisition module is used to input the meteorological data samples into the initial forecast model for forecasting to obtain meteorological element forecast data; The prediction model training module is used to update the parameters of the initial prediction model according to the meteorological element prediction data and the meteorological measured data corresponding to the meteorological data samples until the model training stop conditions are met to obtain the trained meteorological element prediction model.
11. A meteorological element prediction device, characterized in that: The device comprises: A weather forecast data acquisition module, used to acquire weather forecast data for a day to be predicted; wherein the weather forecast data includes the forecast weather type for the day to be predicted; A meteorological correction data acquisition module, used to acquire meteorological correction data corresponding to the forecast weather type; A weather forecast data correction module, used for correcting the weather forecast data using the weather correction data to obtain corrected weather forecast data; A module for acquiring data to be input, used for obtaining meteorological data to be input based on the corrected meteorological forecast data; A prediction result acquisition module is used to input the meteorological data to be input into a meteorological element prediction model to obtain the meteorological element prediction result of the day to be predicted; wherein, the meteorological element prediction model is trained by the prediction model training method in claim 6.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.