Atmospheric numerical mode correction method based on sample addition technology
By generating sample generator to expand the training set, the model overfitting problem caused by insufficient training set samples in deep learning methods is solved, and the accuracy of atmospheric numerical mode correction is improved.
Patent Information
- Application Number
- CN202510578317.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-07
AI Technical Summary
In the prior art, when using deep learning methods to train atmospheric numerical modes, due to insufficient training set samples, the problem of overfitting the model is prone to occur, resulting in poor correction effect.
By generating a sample generator, expand the number of samples in the training set to avoid overfitting. The specific steps include building a deep learning model, training a benchmark model, generating multiple sub-models, augmenting the training set, and finally using the expanded training set to train the revised model.
It effectively avoids the model overfitting problem caused by insufficient sample size, and improves the accuracy and effect of atmospheric numerical mode correction.
Smart Images

Figure CN120106164A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of atmospheric science and computer information technology, and specifically relates to an atmospheric numerical model correction method based on sample augmentation technology. Background Art
[0002] Atmospheric numerical models are core tools for simulating and predicting atmospheric states and their changing processes. They are widely used in weather forecasting, climate research, environmental monitoring, and disaster warning. The basic principle is to obtain the atmospheric state at a certain moment in the future by discretizing the atmospheric dynamics and thermodynamics equations and solving these equations at a limited number of grid points. Although significant progress has been made in atmospheric numerical models, there are errors between the results output by atmospheric numerical models and the actual situation, and model error correction is needed.
[0003] Traditional model error methods include statistical methods such as univariate linear regression and multivariate linear regression. These linear error correction methods can correct systematic errors very well, but they are less effective in correcting nonlinear errors in model results.
[0004] With the growing popularity of deep learning methods, methods such as convolutional neural networks and residual neural networks have also been used in the field of atmospheric science. However, deep learning methods require a large number of samples as training sets to achieve good correction effects. Insufficient sample size can easily lead to problems such as model overfitting. Summary of the invention
[0005] Purpose of the invention / technical problem: The present invention aims at the technical problems existing in the prior art. The present invention proposes an atmospheric numerical model correction method based on sample augmentation technology, aiming to solve the overfitting phenomenon caused by insufficient training set samples when training atmospheric numerical models using deep learning methods.
[0006] Technical solution: To achieve the above technical objectives, the present invention is implemented through the following technical solution: a method for correcting an atmospheric numerical model based on sample augmentation technology, comprising the following steps: S1, data matching and processing: The actual data Y, Y = [Q, time, lat, lon] and the model data X, X = [Q, time, lat, lon] output by the atmospheric numerical model are obtained, and the actual data are processed by the neighbor interpolation method to match the model data space. After standardization preprocessing, the actual data and the model data are paired to construct a data set D, and the data set D is divided into a training set D - train, validation set D - val and test set D - test, complete the data set construction; S2, training and convergence detection of sample generation benchmark model: construct a deep learning model, and obtain the benchmark model and the corresponding minimum loss value through data set training - min; S3, training of the sample generation sub-model: reinitialize the deep learning model with the minimum loss value obtained in step S2 - min is used as the convergence reference point, and several sub-models are obtained through multiple rounds of training on the data set; S4, training set expansion: training set D - The pattern data X in train are respectively input into the sub-models to obtain the corresponding prediction results as new actual data Y, and the pattern data X and the new actual data Y are paired to obtain the expanded training set D - train - new; and further the original training set D - train and training set D - train - new merged to form a new training set D - train - all; S5, using the training set D expanded in step S4 - train - all trains the deep learning model to obtain a corrected model.
[0007] Furthermore, the data acquisition and processing in step S1 includes the following steps: S11, obtaining the forecast data output by the atmospheric numerical model, and arranging them into model data X according to the order of meteorological element values, time, latitude and longitude, where X=[Q, time, lat, lon], Q represents the value of the meteorological element, time represents time, lat represents latitude, and lon represents longitude; S12, obtaining real-time data, and arranging it into an array Y0 according to the order of meteorological element values, time, latitude and longitude, Y0=[Q, time, lat, lon], where Q represents the value of the meteorological element, time represents time, lat represents latitude, and lon represents longitude; S13, the actual data array Y0 is processed by interpolation method to make the model result and the actual data match in space, and the actual data Y is obtained according to the order of meteorological element value, time, latitude and longitude, Y=[Q, time, lat, lon]; S14, pairing the model data X and the actual data Y to construct a data set D, D={X,Y}; S15, divide the first 10 / 15 time steps of data set D into training set D -train, divide the middle 3 / 15 time steps of dataset D into validation set D - val, divide the last 2 / 15 time steps of the dataset D into the test set D - test.
[0008] Furthermore, the atmospheric numerical model includes CPSv3 and / or CFSv2; the meteorological elements include precipitation, temperature, wind speed, and air pressure.
[0009] Furthermore, the specific process of training and convergence detection of the sample generation benchmark model in step S2 is as follows: S21, build a deep learning model and define the loss function L; S22, through the training set D - train trains the deep learning model, saves the deep learning model of the current training round, and passes the validation set D - val calculates the corresponding loss function value val - loss; S23, through the training set D - Train trains the deep learning model through multiple rounds. In the first round of training, the loss function value is directly used as the minimum loss function value loss - min; in subsequent training rounds, if the loss value of the validation set is less than the current loss-min, the loss is updated - min is a new smaller value; otherwise, keep loss - min remains unchanged; S24: If the loss function value of the Nth training round is less than the loss function value of the subsequent P consecutive training rounds, the deep learning model of the Nth training round is saved as the benchmark model, and the corresponding loss function value is used as the minimum loss function value loss - min; If the training round reaches the maximum number of times, the current minimum loss function value loss - The deep learning model corresponding to min is used as the benchmark model.
[0010] Furthermore, the deep learning model adopts CNN or Resnet; the value of P is 10; and the number of training rounds is set to 50-200.
[0011] Furthermore, the specific process of step S3 is as follows: S31, reinitialize the deep learning model, through the training set D - train trains the deep learning model and passes it through the validation set D - val calculates the corresponding loss function value val -loss; S32, if val - loss <loss - min*K, K∈[1.001,1.5], then save the current deep learning model and record it as model - {N - save}, N - save=1,2,3…; S33, continue to repeat steps S31 and S32, when N - When the value of save reaches the set value R, R sub-models are obtained.
[0012] Furthermore, the specific process of step S5 is as follows: S51, constructing a deep learning model, initializing the deep learning model, and defining a loss function and an optimizer; S52, using the training set D expanded in step S4 - train - all trains the model to obtain the optimized corrected model model - best - new.
[0013] Beneficial effect: Compared with the prior art, the present invention uses a deep learning model to generate a sample generator, and then uses the sample generator to generate training set samples, thereby increasing the number of training set samples and avoiding overfitting caused by insufficient sample size when training the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 The present invention is a flowchart of the atmospheric numerical model correction method based on the sample augmentation technology. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means a limitation on the present invention and its application or use. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise specified, the relative arrangement, expressions and numerical values of the components and steps described in these embodiments do not limit the scope of the present invention. At the same time, it should be understood that for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The techniques, methods and devices known to ordinary technicians in the relevant fields may not be discussed in detail, but where appropriate, the techniques, methods and devices should be regarded as part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values.
[0016] Step S1: Data acquisition and dataset construction
[0017] S11, obtain the forecast results of the cumulative precipitation in the next 30 days (this method can also be used for other time scales, such as daily / 6 hours / 3 hours, etc.) and precipitation elements (this method can also be used for other meteorological elements such as temperature and wind speed) output daily by the atmospheric numerical model (this method can be used for multiple atmospheric numerical models, such as CPSv3\CFSv2, etc.), and organize them into an array X[Q, time, lat, lon] in the order of time, latitude and longitude.
[0018] S12, obtain the actual data of 30-day cumulative precipitation, and organize it into an array Y0[Q, time, lat, lon] in the order of time, latitude and longitude.
[0019] S13, the actual data is combined with bilinear interpolation and nearest neighbor interpolation to make the model result and the actual situation match in space, and is sorted into an array Y[Q, time, lat, lon] in the order of time, latitude and longitude.
[0020] S14, construct the data set, (1) pair array X and array Y to form sample pairs (X[i, :, :], Y[i, :, :]); (2) combine all sample pairs into a data set D = { (X[i, :, :], Y[i, :, :])}, where i traverses all time; (3) divide the data set D into training set, validation set and test set, where the first 10 / 15 time steps are used as the training set D- train, the middle 3 / 15 time steps are used as the validation set D - val, the last 2 / 15 time steps as the test set D - test. (The proportion can be adjusted according to actual conditions).
[0021] S2, training of sample generation benchmark model
[0022] S21, construct a deep learning model (this method can be used in multiple deep learning frameworks, such as CNN, Resnet, etc.). Initialize the deep learning model and define the loss function and optimizer.
[0023] Defining loss - min, used to record the minimum loss value of the validation set. In the first training round, the loss value of the validation set is directly recorded as loss - min, in subsequent training rounds, if the loss value of the validation set is less than the current loss - min, then update loss - min is a new smaller value; otherwise, keep loss - min remains unchanged.
[0024] Definition N - patience, used to record the number of rounds during which the validation set loss function does not decrease. The initial value is 0.
[0025] Definition N - save, used to record the saving mode model - 1 to model - The counter of 30 has an initial value of 0. (Here, 30 sample generators are taken, and the number of generated sample generators can be adjusted according to actual conditions).
[0026] S22, train the model and record the model - The best corresponding loss - min. In the first stage, the number of training cycles is set to 100 (the specific number of cycles can be adjusted according to actual conditions), and each cycle includes the following steps: (1) Use D - Train performs forward propagation, calculates loss function, back propagates, and updates model parameters using D - val calculates the loss function value val - loss.
[0027] (2) If val - loss <loss - min, update loss - min=val- loss, reset N - patience = 0, If val - loss>=loss - min,N - patience=N - patience+1, if N - patience>=10, terminate the first stage of training and record the loss at this time - min.
[0028] (3) If the number of cycles reaches 100, terminate the first stage of training and record the loss at this time - min.
[0029] S3, generate multiple sample generators and conduct the second stage of training. Each cycle includes the following steps: (1) Use D - Train performs forward propagation, calculates loss function, back propagates, and updates model parameters using D - val calculates the loss function value val - loss; (2) If val - loss <loss - min*K, K=1.05 (the specific coefficient can be adjusted according to the actual situation), N - save=N - save+1, save the current model as model - {N - save} (e.g. model - 1. Model - 2, ..., model - 30); (3) If val - loss>=loss - min*1.05 continues training; (4) When N - save=30, terminate the second stage training.
[0030] S4, increase training set samples
[0031] S41, input X[i, :, :] in the training set D-train into the saved model model - 1. Model -2, ..., model-30 obtains the corresponding prediction results Y1[i, :, :], Y2[i, :, :], ..., Y30[i, :, :]. Traverse the training set D - For i in train, generate the complete set {Yk[i, :, :]}.
[0032] S42, construct new training samples, pair X[i, :, :] in the training set D-train with the newly generated Yk[i, :, :] to form new samples (X[i, :, :], Y[i, :, :]), and combine all the newly generated samples into a new training set D - train - new. The original training set D - train and the newly added training set D - train - new merged to form a new training set D - train - all.
[0033] S5, new training set training deep learning model
[0034] S51, construct a deep learning model (this method can be used in multiple deep learning frameworks, such as CNN, Resnet, etc.), initialize the deep learning model, and define the loss function and optimizer.
[0035] Defining loss - min, used to record the minimum loss value of the validation set. In the first training round, the loss value of the validation set is directly recorded as loss - min, in subsequent training rounds, if the loss value of the validation set is less than the current loss - min, then update loss - min is a new smaller value; otherwise, keep loss - min remains unchanged.
[0036] Definition N - patience, used to record the number of rounds during which the validation set loss function does not decrease. The initial value is 0.
[0037] S52, train the model and save the model - best - new, set the number of training cycles to 100 (the specific number of cycles can be adjusted according to actual conditions), each cycle includes the following steps: (1) Use D - train -All performs forward propagation, calculates loss function, back propagates, updates model parameters, and uses D - val calculates the loss function value val - loss; (2) If val - loss <loss - min, update loss - min=val - loss, reset N - patience = 0; If val - loss>=loss - min,N - patience=N - patience+1, if N - patience>=10, terminate the training and record the loss at this time - min, and save the model model - best - new; (3) If the number of cycles reaches 100, terminate the training; (4) The model-best-new model obtained at this time is the new revised model finally obtained.
[0038] S6, Correction effect evaluation
[0039] S61, data source: The actual data uses the daily precipitation observation data of 70 meteorological observation stations in Jiangsu Province from 2008 to 2023 compiled by the Jiangsu Meteorological Information Center. The forecast data uses the precipitation back-calculated data of the CMA-CPSv3 model from 2008 to 2022. The horizontal resolution of the model is 0.45° 0.45°, the time resolution is daily, and the forecast period is 30 days in the future.
[0040] S62, Evaluation method: During the evaluation and verification process, a combination of linear interpolation and nearest neighbor interpolation is used to interpolate the actual data and the predicted data to a grid with a horizontal resolution of 0.25° from 29.75°N to 36.25°N, 115.75°E to 122.25°E. The actual data and the predicted data are converted from daily precipitation to 30-day cumulative precipitation, where the value on day t represents the cumulative precipitation from day t+1 to day t+30 reported since day t.
[0041] S63, deep learning framework: the parameters of each module are set as shown in Table 1 below.
[0042] Table 1 CNN correction model framework
[0043] S64, Model Evaluation
[0044] The objects of comparison are the correction effects of the baseline model in step S2 of the present invention and the new correction model in step S5, and the evaluation index is the root mean square error (RMSE). Input X in D_test into the baseline model in step S2 to obtain Y_dz_old. Input X in D_test into the new correction model in S5 to obtain Y_dz_new.
[0045] Get the Y in D_test.
[0046] Calculate the root mean square error RMSE_dz_old of the baseline model on the test set.
[0047] For time=i, Y_dz_old[i] and Y[i], assuming there are m longitude grid points and n latitude grid points, the total number of spatial grid points is m X n=N, calculate the root mean square error RMSE_dz_old[i].
[0048] The specific calculation formula is as follows: , In the formula, and They represent the model predicted precipitation and the actual precipitation at the kth grid point, respectively, and N represents the total number of grid points. RMSE_dz_old[i] reflects the difference between the model predicted value and the actual value. The smaller its value, the higher the prediction skill.
[0049] Calculate the average of all RMSE_dz_old[i] as the root mean square error RMSE_dz_old of the benchmark model on the test set. Assuming there are T samples in total, the specific formula is as follows: ,
[0050] Calculate the root mean square error RMSE_dz_new of the new revised model on the test set.
[0051] For time=i, Y_dz_new[i] and Y[i], assuming that there are m longitude grid points and n latitude grid points, the total number of spatial grid points is m X n=N. The specific calculation formula for calculating the root mean square error RMSE_dz_new[i] is as follows: , In the formula, and They represent the model predicted precipitation and the actual precipitation at the kth grid point, respectively, and N represents the total number of grid points. RMSE_dz_new[i] reflects the difference between the model predicted value and the actual value. The smaller its value, the higher the prediction skill.
[0052] Calculate the average of all RMSE_dz_new[i] as the root mean square error RMSE_dz_new of the benchmark model on the test set. Assuming there are T samples in total, the specific formula is as follows: , Compare RMSE_dz_old and RMSE_dz_new. If the RMSE_dz_new value is smaller than RMSE_dz_old, it indicates that the correction effect of the new revised model in S5 is better than the baseline model in S2.
[0053] S65, Evaluation Results The RMSE without correction is 75.88, the RMSE of the baseline model after correction is 59.86, and the RMSE of the new corrected model trained with the sample-added training set is 58.78, which is 21.1% higher than the result before correction and 1.8% higher than the baseline model. This shows that the new corrected model can further improve the correction effect on the baseline model. In addition, when the baseline model is trained with the original training set, the loss function on the validation set no longer decreases after 3 rounds, while when the new corrected model is trained with the new training set, the loss function on the validation set no longer decreases after 25 rounds. This shows that the new training set can solve the data overfitting phenomenon caused by the small amount of data to a certain extent.
[0054] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for correcting atmospheric numerical models based on sample augmentation technology, characterized in that The following steps are involved: S1, data matching and processing: Get live data Y,Y= [ Q,time,lat,lon ] and model data output by atmospheric numerical models X,X= [ Q,time, lat,lon ], Q Indicates the numerical value of the meteorological element. time Indicates time, lat Indicates latitude, lon Indicates longitude; and the actual data is processed by interpolation method to match the model data space, and the actual data and model data are paired to construct a data set D , and the dataset D Divide into training set D - train , validation set D - val and test set D - test , complete the data set construction; S2, training of sample generation benchmark model: construct a deep learning model and obtain the benchmark model and the corresponding minimum loss value through data set training loss - min ; S3, training of the sample generation sub-model: reinitialize the deep learning model with the minimum loss value obtained in step S2 loss - min As a convergence reference point, several sub-models are obtained by multiple rounds of training through the dataset; S4, training set expansion: the training set D - train Pattern data in X Input them into the sub-models respectively, and obtain the corresponding prediction results as new actual data Y , and the pattern data X and new live data Y Pairing to get the expanded training set D - train - new ; And further the original training set D - train With training set D - train - new Merge to form a new training set D - train - all; S5, using the training set expanded in step S4 D - train-all The deep learning model is trained to obtain a new revised model.
2. The atmospheric numerical model correction method based on sample augmentation technology according to claim 1, characterized in that: The data acquisition and processing in step S1 includes the following steps: S11, obtain the forecast data output by the atmospheric numerical model, and organize it into model data in the order of meteorological element values, time, latitude and longitude X , X =[ Q,time,lat,lon ], Q Indicates the numerical value of the meteorological element. time Indicates time, lat Indicates latitude, lon Indicates longitude; S12, obtain the real-time data and organize it into an array according to the order of meteorological element values, time, latitude and longitude Y0 , Y0 =[ Q,time,lat,lon ], Q Indicates the numerical value of the meteorological element. time Indicates time, lat Indicates latitude, lon Indicates longitude; S13, the live data array Y0 Through interpolation processing, the model results and the actual data are spatially matched, and the actual data are sorted according to the meteorological element values, time, latitude and longitude. Y,Y= [ Q,time,lat,lon ]; S14, the mode data X and live data Y Pairing and building a data set D , D ={ X,Y }; S15, the data set D The first 10 / 15 time steps of D - train , the dataset D The middle 3 / 15 time steps of D - val , divide the last 2 / 15 time steps of the dataset D into the test set D - test .
3. The atmospheric numerical model correction method based on sample augmentation technology according to claim 1, characterized in that: The atmospheric numerical model includes CPSv3 and / or CFSv2; the meteorological elements include precipitation, temperature, wind speed, and air pressure.
4. The atmospheric numerical model correction method based on sample augmentation technology according to claim 1, characterized in that: The specific process of training the sample generation benchmark model in step S2 is as follows: S21, build a deep learning model and define the loss function and optimizer; S22, through the training set D - train Train the deep learning model, save the deep learning model of the current training round, and pass the validation set D - val Calculate the corresponding loss function value val - loss ; S23, through the training set D - train After multiple rounds of training for the deep learning model, in the first round of training, the loss function value is directly used as the minimum loss function value loss - min ; In subsequent training rounds, if the loss value of the validation set is less than the current loss - min , then update loss - min is a new smaller value; otherwise, keep loss - min constant; S24, if the N When the training rounds are completed, the loss function value is smaller than that of the following P The loss function value in consecutive training rounds is saved N The deep learning model with training rounds is used as the baseline model, and the corresponding loss function value is used as the minimum loss function value. loss - min ; If the training round reaches the maximum number of times, the current minimum loss function value is loss - min The corresponding deep learning model is used as the benchmark model.
5. The atmospheric numerical model correction method based on sample augmentation technology according to claim 4 is characterized by: The deep learning model adopts CNN or Resnet; P The value of is 10; the number of training rounds is set to 50-200.
6. The atmospheric numerical model correction method based on sample augmentation technology according to claim 1, characterized in that: The specific process of step S3 is as follows: S31, reinitialize the deep learning model through the training set D - train Train the deep learning model and pass the validation set D - val Calculate the corresponding loss function value val - loss ; S32, if val - loss < loss - min * K , K ∈[1.001,1.5], then save the current deep learning model and record it as model - {N - save} , N - save =1,2,3…; S33, continue to repeat steps S31 and S32. N - save The value reaches the set value R When R Sub-model.
7. The atmospheric numerical model correction method based on sample augmentation technology according to claim 1, characterized in that: The specific process of step S5 is as follows: S51, constructing a deep learning model, initializing the deep learning model, and defining a loss function and an optimizer; S52, using the training set expanded in step S4 D - train - all Train the model to obtain the optimized revised model model-best-new .
Citation Information
Patent Citations
Medical image intelligent diagnosis method based on multi-network integration
CN112466461A
Sudden congestion discrimination method and system based on multi-source traffic big data fusion
CN112489421A
Data enhancement method and system
CN113254435A
Air quality mode forecasting machine learning integration correction method
CN116702926A
Target detection method and device based on integrated model
CN119251653A