Method and device for correcting forecast meteorological data, equipment and storage medium
By integrating the actual data of meteorological stations and the CFSv2 forecast data into a model training, a forecast data correction model was generated, which solved the problem that the CFSv2 model could not take location differences into account and achieved more accurate weather forecasts.
Patent Information
- Application Number
- CN202510817120.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-12
AI Technical Summary
Existing weather forecasting methods, such as the CFSv2 model, cannot fully consider the differences in meteorological conditions at different locations, resulting in large deviations between the predicted meteorological data and the actual observation data, reducing the accuracy of the forecast results.
By obtaining the actual meteorological data and CFSv2 forecast data from the meteorological station, an integrated model is used to train different regression models with multiple parameters, perform linear interpolation and loss calculation, generate a forecast data correction model, and correct the real-time forecast meteorological data.
It improves the accuracy of forecast meteorological data, can more accurately reflect the actual meteorological conditions of meteorological stations, reduces forecast errors, and improves the accuracy of forecast results.
Smart Images

Figure CN120632464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of meteorological forecasting technology, and in particular to a correction method and device, equipment and storage medium for forecast meteorological data. Background Art
[0002] Improving the accuracy of forecast data has always been a key technical issue in the field of weather forecasting. Existing weather forecasting methods primarily rely on numerical models, such as the Climate Forecast System Version 2 (CFSv2). The CFSv2 model is a globally coupled climate prediction system that provides long-term climate forecasts by integrating the interactions between the atmosphere, ocean, land, and sea ice.
[0003] However, the forecast data of the CFSv2 model is usually presented in a grid format, which cannot fully consider the differences in meteorological conditions at different locations. This leads to a large deviation between the forecast meteorological data of the meteorological station and the actual observation data, thus limiting the accuracy of the forecast results. Summary of the Invention
[0004] Based on this, it is necessary to propose a correction method, device, equipment and storage medium for forecast meteorological data to address the above problems in order to improve the accuracy of forecast meteorological data.
[0005] To achieve the above-mentioned objectives, the present application provides, in a first aspect, a method for correcting forecast meteorological data, the method comprising:
[0006] Obtaining actual meteorological data for all meteorological stations in the area to be forecasted within a preset historical time period, as well as CFSv2 forecast data for the area to be forecasted within the historical time period, wherein the CFSv2 forecast data is grid data, and the grid data includes first forecast meteorological data at all grid points in the area to be forecasted;
[0007] Training an integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of a plurality of regression models with different parameter configurations;
[0008] The real-time forecast meteorological data is corrected according to the forecast data correction model to obtain corrected real-time forecast meteorological data.
[0009] Furthermore, the training of the integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model specifically includes:
[0010] Performing linear interpolation processing on the first forecast meteorological data at all grid points in the forecast area within the historical time period and the location information of the meteorological station to obtain second forecast meteorological data of the meteorological station within the historical time period;
[0011] The integrated model is trained according to the second forecast meteorological data of the meteorological station within the historical time period and the actual meteorological data to obtain a trained forecast data correction model.
[0012] Furthermore, performing linear interpolation processing on the first forecast meteorological data at all grid points in the forecast area within the historical time period and the location information of the meteorological station to obtain the second forecast meteorological data of the meteorological station within the historical time period specifically includes:
[0013] Obtaining the coordinates of the weather station;
[0014] Searching within the area to be forecasted based on the coordinates of the meteorological station to obtain a minimum grid where the meteorological station is located, and acquiring the grid point coordinates of the minimum grid;
[0015] Obtaining third forecast meteorological data for the grid points of the minimum grid based on the first forecast meteorological data for all grid points in the area to be forecasted within the historical time period and the grid point coordinates of the minimum grid;
[0016] Linear interpolation is performed based on the grid point coordinates of the minimum grid, the third forecast meteorological data, and the coordinates of the meteorological station to obtain the second forecast meteorological data of the meteorological station.
[0017] Furthermore, the forecast weather data of the weather station is calculated by the following formula:
[0018]
[0019] Where (x, y) is the coordinate of the meteorological station, f(x, y) is the second forecast meteorological data of the meteorological station, (x1, y1), (x1, y2), (x2, y1) and (x2, y2) are the grid coordinates of the minimum grid, and f 11 、f 21 、f 12 and f 22 The third forecast meteorological data on the grid point coordinates of the minimum grid.
[0020] Furthermore, the integrated model is trained based on the second forecast meteorological data and the actual meteorological data of the meteorological station within the historical time period to obtain a trained forecast data correction model, specifically comprising:
[0021] generating a plurality of training samples based on the second forecast meteorological data and the actual meteorological data of the meteorological station within the historical time period, and dividing all the training samples into at least a training set and a validation set, wherein each training sample includes the second forecast meteorological data and the actual meteorological data of a certain meteorological station at a certain historical moment;
[0022] Using the second forecast meteorological data of the meteorological station in the training set within the historical time period as input features and the actual meteorological data of the meteorological station in the training set within the historical time period as output features, training each regression model in the integrated model to obtain a target regression model;
[0023] Calculating the loss of the target regression model based on the validation set;
[0024] Determining the weight of each target regression model according to the loss of each target regression model;
[0025] Determining a forecast data correction formula based on the weights of each target regression model;
[0026] Based on the target regression model and the forecast data correction formula, a trained forecast data correction model is obtained.
[0027] Furthermore, the weight of the target regression model is calculated by the following formula:
[0028]
[0029] Where w m is the weight of the mth target regression model, 0≤m≤M, M is the total number of target regression models, L m is the loss of the mth target regression model on the validation set, L k is the loss of the k-th target regression model on the validation set.
[0030] Furthermore, the training forecast data correction model is obtained based on the target regression model and the forecast data correction formula, specifically including:
[0031] forming an initial forecast data correction model based on the target regression model and the forecast data correction formula;
[0032] Performing a performance test on the initial forecast data correction model using the test set to obtain a performance index;
[0033] The performance indicator is compared with a preset performance indicator standard. If the performance indicator does not meet the performance indicator standard, the hyperparameters of the target regression model are adjusted, and the steps of using the second forecast meteorological data of the meteorological station in the training set within the historical time period as input features and the actual meteorological data of the meteorological station in the training set within the historical time period as output features, training each regression model in the integrated model, and obtaining a target regression model are repeatedly performed until the performance indicator meets the performance indicator standard.
[0034] If the performance indicator meets the performance indicator standard, the initial forecast data correction model is used as the trained forecast data correction model.
[0035] To achieve the above-mentioned purpose, the second aspect of the present application provides a device for correcting forecast meteorological data, the device comprising: a data acquisition unit, a model training unit and a data correction unit;
[0036] The data acquisition unit is configured to acquire actual meteorological data of all meteorological stations in the area to be forecasted within a preset historical time period, and CFSv2 forecast data of the area to be forecasted within the historical time period, wherein the CFSv2 forecast data is grid data, and the grid data includes first forecast meteorological data at all grid points in the area to be forecasted;
[0037] The model training unit is used to train the integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of a plurality of regression models with different parameter configurations;
[0038] The data correction unit is used to correct the real-time forecast meteorological data according to the forecast data correction model to obtain corrected real-time forecast meteorological data.
[0039] To achieve the above-mentioned objectives, the third aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the method described in the first aspect.
[0040] To achieve the above-mentioned objectives, the fourth aspect of the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method described in the first aspect.
[0041] The embodiments of the present invention have the following beneficial effects:
[0042] An embodiment of the present invention proposes a method for correcting forecast meteorological data, the method comprising: obtaining actual meteorological data of all meteorological stations in the area to be forecasted within a preset historical time period, and CFSv2 forecast data of the area to be forecasted within the historical time period, the CFSv2 forecast data being grid data, the grid data containing first forecast meteorological data on all grid points in the area to be forecasted; training an integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of several regression models with different parameter configurations; correcting the real-time forecast meteorological data based on the forecast data correction model to obtain corrected real-time forecast meteorological data. The present invention trains the integrated model based on historical forecast meteorological data and actual meteorological data to obtain a forecast data correction model, and utilizes regression models with different fitting capabilities and generalization capabilities to form the integrated model, which can model the nonlinear relationship between the predicted meteorological data and the actual meteorological data from different dimensions, thereby reducing the error of the forecast data correction model and improving the accuracy of the corrected forecast meteorological data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] in:
[0045] Figure 1 Schematic diagram of a flow chart of a method for correcting forecast weather data in an embodiment of the present invention;
[0046] Figure 2 1 is a structural block diagram of a device for correcting forecast weather data in an embodiment of the present invention;
[0047] Figure 3 2 is a diagram showing the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0049] Most existing meteorological data forecasting methods use linear methods, which are insufficient to capture the nonlinear characteristics hidden in meteorological element variations, resulting in large errors in the resulting forecast data. One embodiment of the present invention proposes a method for correcting forecast meteorological data. By revising the meteorological element grid forecast model, more accurate meteorological station forecast results are obtained. The meteorological element point forecast model is an algorithm model that uses a grid-based meteorological data forecast, such as the CFSv2 model.
[0050] Please refer to the following for details: Figure 1 , Figure 1 : is a flow chart of a method for correcting forecast weather data in an embodiment of the present invention, the method comprising:
[0051] Step 100: Obtain the actual meteorological data of all meteorological stations in the area to be forecasted within a preset historical time period, as well as the CFSv2 forecast data of the area to be forecasted within the historical time period. The CFSv2 forecast data is grid data, and the grid data includes the first forecast meteorological data at all grid points in the area to be forecasted.
[0052] In an embodiment of the present invention, the historical time period may be any time period in the past, for example, the historical time period from January 1, 2020 to December 31, 2022.
[0053] In this embodiment, the area requiring weather forecast is taken as the area to be forecasted, so that the forecast weather data of the area to be forecasted can be corrected.
[0054] There are multiple meteorological stations within the forecast area. These are fixed locations used to collect current weather data. Equipped with various meteorological observation instruments and equipment, they monitor and record various elements of atmospheric conditions. Therefore, actual weather data from each station over a historical period can be collected for each station within the forecast area.
[0055] The Climate Forecast System Version 2 (CFSv2) model is a globally coupled climate prediction system that provides long-term climate forecasts by integrating the interactions between the atmosphere, ocean, land, and sea ice. CFSv2 forecast data is typically presented in a gridded format, meaning that the model provides meteorological data for every grid point in the forecast area. The CFSv2 model generates forecasts for the future at 00:00 each day, each month, and each year. Therefore, the first forecast for the forecast area over a historical period can be obtained from the CFSv2-generated forecast data.
[0056] In one embodiment, the actual meteorological data includes data on actual daily precipitation, temperature, wind speed, relative humidity, etc., and the forecast meteorological data includes data on forecast daily precipitation, temperature, wind speed, relative humidity, etc.
[0057] In one embodiment, after the actual meteorological data and the first forecast meteorological data are acquired, data preprocessing may be performed on the actual meteorological data and the first forecast meteorological data.
[0058] Specifically, strict quality control is carried out on the actual meteorological data and the first forecast meteorological data, and any abnormal codes that may exist therein are effectively identified and rationally processed.
[0059] Abnormal coding refers to the possibility of missing data in the original data. Missing data will be replaced with values such as -9999, thus affecting the accuracy of data analysis. Therefore, abnormal coding is required for both the actual meteorological data and the first forecast meteorological data. If abnormal coding is found in either the actual meteorological data or the first forecast meteorological data, the missing data needs to be rationalized. If missing data is present, interpolation is used to supplement the data if the missing data is small. If the missing data is large, the data for that station or meteorological element is not considered for use. This embodiment improves the accuracy of the correction by eliminating correction errors caused by data anomalies.
[0060] Step 200: Train the integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of several regression models with different parameter configurations.
[0061] After preprocessing the meteorological data, the actual meteorological data and the first forecast meteorological data are divided into training sets, validation sets, and test sets in chronological order. Using the first forecast meteorological data as the model input and the actual meteorological data as the output variable, various regression models are constructed to revise future forecast meteorological data.
[0062] In one embodiment, the regression models used include support vector regression, random forest, multivariate linear regression, and AdaBoost regression algorithms. These models each have different fitting capabilities and generalization characteristics, and can model the nonlinear relationship between meteorological elements and observations from different dimensions. During the training phase, each regression model parameter is trained separately, and its prediction performance is evaluated to obtain the regression model with the best prediction performance.
[0063] On this basis, a voting ensemble strategy is introduced to integrate the prediction results of multiple models. By comparing the prediction performance of each regression model and determining the contribution of each model's prediction results to the ensemble results, the adaptability and robustness of the forecast data correction model to different meteorological conditions are enhanced, thereby achieving intelligent correction of forecast meteorological data.
[0064] Step 300: Correct the real-time forecast meteorological data according to the forecast data correction model to obtain corrected real-time forecast meteorological data.
[0065] After the training is completed and the forecast data correction model is obtained, the real-time forecast meteorological data obtained by the CFSv2 model is obtained and input into the forecast data correction model. The forecast data correction model will make corrections and predictions on the real-time forecast meteorological data to obtain more accurate real-time forecast meteorological data.
[0066] The embodiments of the present invention achieve intelligent correction of medium-term meteorological data forecast results through an intelligent integration mechanism of data quality control and collaborative modeling of multiple regression models, with good adaptability. Specifically, an integrated model composed of multiple regression models effectively captures the nonlinear characteristics of meteorological element changes, making up for the shortcomings of traditional linear methods in processing complex meteorological data. By analyzing the relationship between CFSv2 forecast data and actual observation data through the integrated model, a forecast data correction model is trained and applied to the correction of real-time forecast data, which can provide more accurate weather forecasts in a timely manner. This is of great value to fields that require real-time meteorological information, such as disaster prevention and mitigation, and agricultural planning.
[0067] In one embodiment of the present invention, step 200, training the integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, specifically includes:
[0068] Step 210: Perform linear interpolation processing based on the first forecast meteorological data at all grid points in the forecast area within the historical time period and the location information of the meteorological station to obtain the second forecast meteorological data of the meteorological station within the historical time period.
[0069] Since the spatial resolution of the grid data predicted by the CFSv2 model is different from the spatial resolution of the actual meteorological data measured at the meteorological station, in order to refine the two meteorological data and make them at the same spatial resolution, the first forecast meteorological data under the CFSv2 model needs to be interpolated to the meteorological station using the linear interpolation method, so that the interpolated forecast meteorological data and the actual meteorological data are at the same spatial resolution, thereby improving the accuracy of the forecast data correction model trained based on the interpolated meteorological data.
[0070] Specifically, Step 210 performs linear interpolation processing on the first forecast meteorological data at all grid points in the forecast area within the historical time period and the location information of the meteorological station to obtain the second forecast meteorological data of the meteorological station within the historical time period, specifically including:
[0071] Step 211. Get the coordinates of the weather station.
[0072] In this embodiment, a point is preset as the coordinate origin, and the coordinate information of all meteorological stations in the area to be forecasted relative to the coordinate origin is obtained. The coordinates of the meteorological stations are (x, y).
[0073] Step 212: Search within the forecast area based on the coordinates of the meteorological station to obtain the minimum grid where the meteorological station is located, and obtain the grid point coordinates of the minimum grid.
[0074] In this embodiment, the weather stations are not necessarily located completely on the grid points. In order to obtain more accurate forecast weather data for the weather stations, a search can be performed in the grid of the forecast area to find the minimum grid position of each weather station. It can be understood that each minimum grid has four grid points. Furthermore, the grid coordinates of the four grid points relative to the coordinate origin can be obtained. The grid coordinates of the minimum grid are Q 11 (x1, y1), Q 12 (x1, y2), Q 21 (x2, y1) and Q 22 (x2, y2).
[0075] Step 213: Obtain third forecast meteorological data for the grid points of the smallest grid based on the first forecast meteorological data for all grid points in the forecast area within the historical time period and the grid point coordinates of the smallest grid.
[0076] In this embodiment, after the coordinates of the grid points of the minimum grid are determined, a search is performed in the first forecast meteorological data of all grid points in the forecast area within the historical time period to obtain the third forecast meteorological data of the grid points of the minimum grid within the historical time period.
[0077] Step 214: Perform linear interpolation based on the grid point coordinates of the minimum grid, the third forecast meteorological data, and the coordinates of the meteorological station to obtain the second forecast meteorological data of the meteorological station.
[0078] In this embodiment, linear interpolation is first performed on two x-direction line segments to obtain the value of the midpoint:
[0079]
[0080]
[0081] Among them, f11 、f 21 、f 12 and f 22 The third forecast meteorological data at the grid coordinates of the smallest grid.
[0082] Secondly, perform linear interpolation on the two intermediate values obtained in the x direction to obtain the final result:
[0083]
[0084] Substituting formulas (1) and (2) into formula (3), we get formula (4). The forecast meteorological data of the meteorological station is calculated by formula (4):
[0085]
[0086] Where (x, y) is the coordinate of the meteorological station, f(x, y) is the second forecast meteorological data of the meteorological station, (x1, y1), (x1, y2), (x2, y1) and (x2, y2) are the grid coordinates of the minimum grid, and f 11 、f 21 、f 12 and f 22 The third forecast meteorological data at the grid coordinates of the smallest grid.
[0087] This embodiment of the present invention uses linear interpolation to interpolate the grid data of the CFSv2 model to the location of the meteorological station, ensuring that the forecast data and the actual observation data have the same spatial resolution. This helps improve the comparability and consistency of the data and provides more accurate basic data for subsequent model training. The interpolated data can more accurately reflect the actual meteorological conditions at the meteorological station, thereby improving the accuracy of the forecast data correction model trained based on this data. The model can better capture the changing characteristics of meteorological elements, especially nonlinear characteristics, thereby improving the accuracy of the forecast.
[0088] Step 220: Train the integrated model based on the second forecast meteorological data and actual meteorological data of the meteorological station in the historical time period to obtain a trained forecast data correction model.
[0089] In this embodiment, the second forecast meteorological data and the actual meteorological data are divided into a training set, a validation set and a test set, and the training set, the validation set and the test set are input into the integrated model for model training to obtain a trained forecast data correction model.
[0090] In one embodiment of the present invention, modeling is performed using methods such as support vector machine (SVM), random forest (RF), multiple regression (MR) and AdaBoost. The integrated model can intelligently correct high-dimensional meteorological factors by integrating multiple regression algorithms, and is particularly suitable for forecast correction of continuous factors such as wind speed, temperature, and relative humidity. The multi-output regression mechanism in the integrated model constructs a trainer based on multiple factors (maximum temperature, minimum temperature, wind speed) and introduces a multi-output regression classifier, so that each target meteorological factor can be fitted independently and accurately. With the support of the multi-factor basic trainer, the integrated model further integrates four nested algorithms: support vector machine, multiple regression, AdaBoost and random forest, to construct a powerful time series classifier. By continuously modeling the forecast meteorological data and actual meteorological data, the prediction results of different algorithms are integrated in real time, and the intelligent and accurate correction of the forecast results is achieved, thereby reducing the impact of the pattern error on the forecast accuracy.
[0091] Specifically, Step 220, training the integrated model based on the second forecast meteorological data and actual meteorological data of the meteorological station in the historical time period to obtain a trained forecast data correction model, specifically includes:
[0092] Step 221. Generate several training samples based on the second forecast meteorological data and actual meteorological data of the meteorological station in the historical time period, and divide all training samples into at least a training set and a validation set, wherein each training sample contains the second forecast meteorological data and actual meteorological data of a certain meteorological station at a certain historical moment.
[0093] In this embodiment, a training sample is generated by the second forecast meteorological data and the actual meteorological data of each meteorological station at the same time, and a training set, a validation set and a test set are generated from all training samples according to a preset ratio, so that the integrated model can be trained based on the training set, validation set and test set to obtain the optimal forecast data correction model.
[0094] Step 222: Use the second forecast meteorological data of the meteorological stations in the training set within the historical time period as input features, and use the actual meteorological data of the meteorological stations in the training set within the historical time period as output features to train each regression model in the integrated model to obtain a target regression model.
[0095] In this embodiment, each regression model is trained using the training samples in the training set to obtain all trained target regression models. The input of the target regression model is the second forecast meteorological data, and the output is the actual meteorological data. The relationship between the second forecast meteorological data and the actual meteorological data is modeled by each regression model, generating target regression models with different prediction advantages.
[0096] Step 223. Calculate the loss of the target regression model based on the validation set.
[0097] After each target regression model is constructed, a hyperparameter search range is set for each target regression model through cross-validation, several sets of hyperparameter combinations are generated, and the error under each set of hyperparameter combinations is calculated. The hyperparameter combination with the smallest error is selected as the optimal hyperparameter configuration of the target regression model.
[0098] After debugging is completed, the loss of the target regression model is calculated using the validation set. Specifically, the loss of the target regression model can be calculated using formula (5):
[0099]
[0100] Where, L k is the loss of the kth target regression model on the validation set, N is the number of samples in the validation set, y true,i Input the actual meteorological data in the kth target regression model for the i-th training sample in the validation set, The second forecast meteorological data in the kth target regression model is input for the i-th training sample in the validation set.
[0101] Step 224: Determine the weight of each target regression model based on the loss of each target regression model.
[0102] In this embodiment, the weight of each target regression model is determined based on the loss of each target regression model on the validation set, and finally a multi-model integration structure with optimal performance is achieved to save the weight of the best model.
[0103] In one embodiment, the weight of the target regression model is calculated by the following formula:
[0104]
[0105] Where w m is the weight of the mth target regression model, 0≤m≤M, M is the total number of target regression models, L m is the loss of the mth target regression model on the validation set, L k is the loss of the k-th target regression model on the validation set.
[0106] Step 225: Determine the forecast data correction formula based on the weights of each target regression model.
[0107] In this embodiment, the prediction results of different target regression models are combined through the Vote multi-model integration strategy to generate a forecast data correction formula to improve the accuracy of the forecast.
[0108] In one embodiment, the forecast data correction formula is expressed by the following formula:
[0109]
[0110] Among them, w m is the weight of the mth target regression model, 0≤m≤M, M is the total number of target regression models, is the final revised forecast meteorological data, y m is the revised forecast meteorological data output by the mth target regression model.
[0111] Step 226: Based on the target regression model and the forecast data correction formula, a trained forecast data correction model is obtained.
[0112] In this embodiment, the trained forecast data correction model is based on the target regression model and the forecast data correction formula. By substituting the output of each target regression model into the forecast data correction formula, the corrected forecast meteorological data can be output.
[0113] In one embodiment, Step 226, obtaining a trained forecast data correction model based on the target regression model and the forecast data correction formula, specifically includes:
[0114] Step 2261: Construct an initial forecast data correction model based on the target regression model and the forecast data correction formula; perform a performance test on the initial forecast data correction model using a test set to obtain performance indicators.
[0115] In this embodiment, the initial forecast data correction model is optimized and the performance of the initial forecast data correction model is tested using training samples in the test set to obtain performance indicators. The performance indicators may include one or more indicators such as root mean square error, mean absolute error, and mean deviation.
[0116] Step 2262. Compare the performance index with the preset performance index standard. If the performance index does not meet the performance index standard, adjust the hyperparameters of the target regression model, and repeat the steps of using the second forecast meteorological data of the meteorological stations in the training set within the historical time period as input features and the actual meteorological data of the meteorological stations in the training set within the historical time period as output features, train each regression model in the integrated model, and obtain the target regression model until the performance index meets the performance index standard.
[0117] In this embodiment, if the error obtained by the initial forecast data correction model in the performance test of the test set is too large, it is necessary to readjust the hyperparameter range of the target regression model, regenerate several sets of hyperparameter combinations, calculate the error under each set of hyperparameter combinations, and select the hyperparameter combination with the smallest error as the optimal hyperparameter configuration of the target regression model. Steps 222-226 are repeatedly executed until the error obtained by the initial forecast data correction model in the performance test of the test set is negligible.
[0118] Step 2264: If the performance index meets the performance index standard, the initial forecast data correction model is used as the trained forecast data correction model.
[0119] If model performance falls short of expectations, the hyperparameters of the target regression model are automatically adjusted, the hyperparameter combinations are regenerated, and the errors are calculated until the optimal hyperparameter configuration is found. By repeating the training and testing steps until the model performance meets the preset standards, the forecast accuracy of the forecast data correction model can be continuously improved. This iterative optimization process helps the model gradually approximate the changing patterns of actual meteorological data, thereby increasing the credibility of the forecast results.
[0120] By using a test set to perform performance testing on the initial forecast data correction model, this paper objectively evaluates the model's predictive capabilities and ensures its reliability and accuracy in practical applications. Performance metrics such as root mean square error, mean absolute error, and mean deviation provide clear guidance for model optimization.
[0121] In one embodiment of the present invention, a correction device for forecast weather data is also provided. Figure 2 , Figure 2 2 is a structural block diagram of a device for correcting forecast meteorological data in an embodiment of the present invention. The device includes: a data acquisition unit 201 , a model training unit 202 , and a data correction unit 203 .
[0122] The data acquisition unit 201 is configured to acquire actual meteorological data for all meteorological stations within the forecast area within a preset historical time period, as well as CFSv2 forecast data for the forecast area within the historical time period. The CFSv2 forecast data is grid data, and the grid data includes first forecast meteorological data at all grid points within the forecast area.
[0123] A model training unit 202 is configured to train an integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of a plurality of regression models with different parameter configurations;
[0124] The data correction unit 203 is used to correct the real-time forecast meteorological data according to the forecast data correction model to obtain corrected real-time forecast meteorological data.
[0125] The forecast meteorological data correction device proposed in an embodiment of the present invention achieves intelligent correction of medium-term meteorological data forecast results through an intelligent integrated mechanism of data quality control and multi-regression model collaborative modeling, and has good adaptability. Specifically, it utilizes an integrated model composed of multiple regression models to effectively capture the nonlinear characteristics of meteorological element changes, making up for the shortcomings of traditional linear methods in processing complex meteorological data. By analyzing the relationship between CFSv2 forecast data and actual observation data through the integrated model, a forecast data correction model is trained and applied to the correction of real-time forecast data. It can provide more accurate weather forecasts in a timely manner, which is of great value to fields that require real-time meteorological information, such as disaster prevention and mitigation, and agricultural planning.
[0126] Figure 3 FIG1 shows the internal structure of a computer device in one embodiment of the present invention. The computer device can be a terminal or a system. Figure 3 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the various steps in the above method embodiment. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the various steps in the above method embodiment. It will be understood by those skilled in the art that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0127] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes each step in the above method embodiment.
[0128] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps in the above method embodiment.
[0129] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0130] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for correcting forecast meteorological data, characterized in that: The method comprises: Obtaining actual meteorological data for all meteorological stations in the area to be forecasted within a preset historical time period, as well as CFSv2 forecast data for the area to be forecasted within the historical time period, wherein the CFSv2 forecast data is grid data, and the grid data includes first forecast meteorological data at all grid points in the area to be forecasted; Training an integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of a plurality of regression models with different parameter configurations; The real-time forecast meteorological data is corrected according to the forecast data correction model to obtain corrected real-time forecast meteorological data.
2. The method according to claim 1, wherein The step of training the integrated model according to the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model specifically includes: Performing linear interpolation processing on the first forecast meteorological data at all grid points in the forecast area within the historical time period and the location information of the meteorological station to obtain second forecast meteorological data of the meteorological station within the historical time period; The integrated model is trained according to the second forecast meteorological data of the meteorological station within the historical time period and the actual meteorological data to obtain a trained forecast data correction model.
3. The method according to claim 2, wherein The step of performing linear interpolation processing on the first forecast meteorological data at all grid points in the forecast area within the historical time period and the location information of the meteorological station to obtain the second forecast meteorological data of the meteorological station within the historical time period specifically includes: Obtaining the coordinates of the weather station; Searching within the area to be forecasted based on the coordinates of the meteorological station to obtain a minimum grid where the meteorological station is located, and acquiring the grid point coordinates of the minimum grid; Obtaining third forecast meteorological data for the grid points of the minimum grid based on the first forecast meteorological data for all grid points in the area to be forecasted within the historical time period and the grid point coordinates of the minimum grid; Linear interpolation is performed based on the grid point coordinates of the minimum grid, the third forecast meteorological data, and the coordinates of the meteorological station to obtain the second forecast meteorological data of the meteorological station.
4. The method according to claim 3, wherein The forecast weather data of the weather station is calculated by the following formula: Where (x, y) is the coordinate of the meteorological station, f(x, y) is the second forecast meteorological data of the meteorological station, (x1, y1), (x1, y2), (x2, y1) and (x2, y2) are the grid coordinates of the minimum grid, and f 11 、f 21 、f 12 and f 22 The third forecast meteorological data on the grid point coordinates of the minimum grid.
5. The method according to claim 2, wherein The training of the integrated model based on the second forecast meteorological data of the meteorological station within the historical time period and the actual meteorological data to obtain a trained forecast data correction model specifically includes: generating a plurality of training samples based on the second forecast meteorological data and the actual meteorological data of the meteorological station within the historical time period, and dividing all the training samples into at least a training set and a validation set, wherein each training sample includes the second forecast meteorological data and the actual meteorological data of a certain meteorological station at a certain historical moment; Using the second forecast meteorological data of the meteorological station in the training set within the historical time period as input features and the actual meteorological data of the meteorological station in the training set within the historical time period as output features, training each regression model in the integrated model to obtain a target regression model; Calculating the loss of the target regression model based on the validation set; Determining the weight of each target regression model according to the loss of each target regression model; Determining a forecast data correction formula based on the weights of each target regression model; Based on the target regression model and the forecast data correction formula, a trained forecast data correction model is obtained.
6. The method according to claim 5, wherein The weight of the target regression model is calculated by the following formula: Where w m is the weight of the mth target regression model, 0≤m≤M, M is the total number of target regression models, L m is the loss of the mth target regression model on the validation set, L k is the loss of the k-th target regression model on the validation set.
7. The method according to claim 5, wherein The step of obtaining a trained forecast data correction model based on the target regression model and the forecast data correction formula specifically includes: forming an initial forecast data correction model based on the target regression model and the forecast data correction formula; Performing a performance test on the initial forecast data correction model using the test set to obtain a performance index; The performance indicator is compared with a preset performance indicator standard. If the performance indicator does not meet the performance indicator standard, the hyperparameters of the target regression model are adjusted, and the steps of using the second forecast meteorological data of the meteorological station in the training set within the historical time period as input features and the actual meteorological data of the meteorological station in the training set within the historical time period as output features, training each regression model in the integrated model, and obtaining a target regression model are repeatedly performed until the performance indicator meets the performance indicator standard. If the performance indicator meets the performance indicator standard, the initial forecast data correction model is used as the trained forecast data correction model.
8. A device for correcting forecast meteorological data, characterized in that: The device comprises: a data acquisition unit, a model training unit and a data correction unit; The data acquisition unit is configured to acquire actual meteorological data of all meteorological stations in the area to be forecasted within a preset historical time period, and CFSv2 forecast data of the area to be forecasted within the historical time period, wherein the CFSv2 forecast data is grid data, and the grid data includes first forecast meteorological data at all grid points in the area to be forecasted; The model training unit is used to train the integrated model based on the first forecast meteorological data and the actual meteorological data to obtain a trained forecast data correction model, wherein the integrated model is composed of a plurality of regression models with different parameter configurations; The data correction unit is used to correct the real-time forecast meteorological data according to the forecast data correction model to obtain corrected real-time forecast meteorological data.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
CFSv2 ground solar radiation correction method and system based on quantile regression
CN121302322A