A spatial interpolation method for temperature data based on gradient boosting regression GBR model
Through the spatial interpolation method of temperature data based on gradient enhancement regression GBR model, combined with the time and spatial consistency screening mechanism, the altitude characteristics are introduced, which solves the problem that the existing technology cannot fit the temperature characteristics and high computing resource consumption, and achieves more accurate and efficient temperature interpolation results.
Patent Information
- Application Number
- CN202011595023.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-12-29
AI Technical Summary
The existing spatial interpolation method in meteorology cannot effectively fit the temperature characteristics under complex atmospheric backgrounds, and the geological statistics method has high requirements for computing resources, making it difficult to apply to practical application scenarios, especially the negative temperature and altitude of temperature are not allowed to be used. Reasonable interpolation calculation is performed for correlation.
The spatial interpolation method of temperature data based on gradient enhancement regression GBR model is adopted. Through temperature data acquisition, data cleaning, feature scaling and gradient enhancement regression training modules, longitude, latitude, and altitude are introduced as feature values, combining time consistency and spatial consistency The screening mechanism trains a more accurate temperature interpolation model.
More accurate temperature interpolation results are achieved, the consumption of hardware resources is reduced, and it is suitable for practical application scenarios. It can effectively learn the correlation between temperature and terrain height and obtain a reasonable interpolation field.
Smart Images

Figure CN112528232B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorology, and in particular to a temperature data spatial interpolation method based on a gradient boosting regression (GBR) model. Background Art
[0002] In meteorology, it is often necessary to perform spatial interpolation on the data of discretely distributed meteorological observation stations to obtain the data distribution characteristics of the entire surface space. Spatial interpolation methods are generally divided into two categories. One is the deterministic method, which fits the applicable model parameters based on a certain model and sample point information, such as inverse distance weighted interpolation (IDW), trend surface method, spline function method, etc.; the other is the geostatistical method, which uses the statistical laws of sample points to quantify the spatial autocorrelation between sample points, thereby constructing a spatial structure model of sample points around the predicted point, such as Kriging interpolation. In fact, the model of the deterministic interpolation method is relatively simple and pursues the smoothness of the entire surface structure. It is not suitable for temperature elements that are greatly affected by terrain and have obvious regional characteristics, resulting in a large difference between the interpolation results and the actual situation; while the geostatistical method requires a large number of modeling operations between points and surfaces, which poses a huge challenge to computing resources in actual application, and the degree of refinement of the final result is also relatively limited. At the same time, there is an obvious negative correlation between temperature and altitude in nature, but the above interpolation method cannot apply this relationship to the model and calculate a reasonable interpolation field.
[0003] Existing spatial interpolation methods, deterministic methods such as inverse distance weighting and spline interpolation, are only based on simple mathematical models and cannot fit the temperature characteristics under the actual complex atmospheric background; and geostatistical methods such as Kriging interpolation have very high requirements for computing resources and are difficult to apply to actual application scenarios. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a spatial interpolation method for temperature data based on a gradient boosting regression GBR model to solve the problems mentioned in the background technology.
[0005] The present invention provides a method for spatial interpolation of temperature data based on a gradient boosting regression GBR model. The method includes a temperature data acquisition module, a data cleaning module, a feature scaling module, a gradient boosting regression GBR training module and a grid application module. The method is specifically performed in the following steps:
[0006] S1: First, the temperature data of the latest time of the ground automatic observation station of the Meteorological Bureau is collected through the temperature data collection module; the maximum frequency of observation of the automatic weather station is 5 minutes, and the data collection module refreshes and collects the latest temperature data every 5 minutes.
[0007] S2: The data cleaning module is responsible for filtering out abnormal data. Specifically, the data cleaning module uses two filtering mechanisms, time consistency and space consistency, based on the characteristics of atmospheric temperature changes.
[0008] S3: Introduce longitude, latitude, and altitude as feature values to train the correlation between temperature and each feature value. Feature scaling is required before training to ensure more accurate model results.
[0009] S4: The characteristic values of the station data and their corresponding temperature data are used as training samples and introduced into the gradient boosting regression training module. After multiple iterations of training, the final model is obtained.
[0010] S5: First, the longitude, latitude, altitude and other fixed information of each grid point are scaled as eigenvalues, and then the temperature value corresponding to the eigenvalue on each grid point is obtained based on the GBR model output in step S4, and finally the gridded temperature data is output.
[0011] Furthermore, the time consistency screening mechanism is used. The latest temperature data obtained will be subtracted from the temperature of the same station at the previous time. If the difference is greater than n times the standard deviation of all samples, it will be eliminated. That is, samples that meet the following conditions will be eliminated, as shown in formula (1):
[0012] abs(x i (t)-x i (t-1))>n*σ x Formula (1)
[0013] Where t represents time, i represents the site number, σ x represents the standard deviation of all samples,
[0014] The spatial consistency screening mechanism will screen out abnormal station data that differs greatly from the surrounding temperature. That is, after collecting the temperature data of a station, first select the k nearest points around it based on the station distribution information, and calculate the average temperature difference between the station and the surrounding k stations. If it is higher than the temperature standard deviation of all samples, the station will be eliminated, as shown in formula (2);
[0015]
[0016] Where i represents the site number, represents the average value of the surrounding k sites, σ x represents the standard deviation of all samples.
[0017] Furthermore, in step S3, longitude, latitude, and altitude are introduced as eigenvalues to train the correlation between temperature and each eigenvalue. The eigenvalues need to be scaled before training. The specific method is as follows. The standardized eigenvalues will help the model in step S4 converge faster, as shown in formula (3).
[0018]
[0019] Where i represents the sample point number, j represents the eigenvalue number, and μ represents the mean value.
[0020] Further, in step S4, the gradient boosting regression algorithm GBR will first give a false initial guess based on the final output form, and then use the characteristic values of the station data and its corresponding temperature data as training samples, and obtain the final model results after multiple iterations on all samples. In each round of iteration, the algorithm first calculates the negative gradient of the current model on all samples, and then trains a new weak regressor with the negative gradient as the target for fitting and calculates the weight of the weak regressor, thereby updating the model. The specific implementation method is as follows:
[0021] S4.1: Initialize the model function as shown in formula (4):
[0022]
[0023] S4.2: Use the negative gradient of the loss function in the current model F m-1 The value on (x) approximates the residual, as shown in formula (5)
[0024]
[0025] S4.3: Use the base learner h(x) to fit the approximate residual value, as shown in formula (6)
[0026]
[0027] S4.4: Calculate the optimal parameter γ, as shown in formula (7);
[0028]
[0029] S4.5: The final updated model is as shown in formula (8);
[0030] F m (x) = F m-1 (x)+γh(x) Formula (8).
[0031] The present invention proposes a gradient boosting regression algorithm, in which the machine learning model autonomously learns the distribution law of site data, thereby obtaining the individual distribution characteristics of each area and obtaining more accurate interpolation results; in addition, the gradient boosting regression model has a fast calculation speed, which greatly reduces the consumption of hardware resources and solves practical application problems. At the same time, introducing terrain height as a characteristic value in the gradient boosting regression model can assist the model to learn the correlation between temperature and terrain height more quickly and obtain a more reasonable interpolation field.
[0032] In addition, the gradient boosting regression algorithm is a strong regression model based on many weak regressors, which can obtain higher accuracy from multiple single and poor models. The present invention adopts the gradient boosting regression algorithm to integrate a strong regression model of multiple weak regressors, which can be applied to the complex distribution characteristics and regional characteristics of temperature in the actual atmospheric environment. At the same time, the algorithm has high computational efficiency, low requirements on hardware resources, and can adapt well to actual application conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of a method for spatial interpolation of temperature data based on a gradient boosting regression GBR model of the present invention;
[0034] Figure 2 It is a schematic diagram of the gradient boosting regression GBR model of the present invention. DETAILED DESCRIPTION
[0035] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0036] In this embodiment, Figure 1-Figure 2 The present invention provides a method for spatial interpolation of temperature data based on a gradient boosting regression GBR model, which includes a temperature data acquisition module, a data cleaning module, a feature scaling module, a gradient boosting regression GBR training module and a grid application module, and is specifically performed in the following steps:
[0037] S1: First, the temperature data of the latest time of the ground automatic observation station of the Meteorological Bureau is collected through the temperature data collection module; the maximum observation frequency of the automatic weather station is 5 minutes, and the data collection module refreshes and collects the latest temperature data every 5 minutes; the automatic observation station is distributed in all provinces and cities in China, and each batch of data contains approximately 60,000 stations.
[0038] S2: The data cleaning module is responsible for filtering out abnormal data. Usually, temperature observation data without human intervention will show abnormal values such as 999999 when the equipment is abnormal. In the data cleaning module, setting a certain threshold for temperature can filter out these abnormal data caused by equipment abnormalities. Specifically, in combination with the characteristics of atmospheric temperature changes, the data cleaning module adopts two screening mechanisms, time consistency and space consistency, respectively, to further ensure the credibility of the samples.
[0039] S3: Introduce longitude, latitude, and altitude as feature values to train the correlation between temperature and each feature value; feature scaling is required before training to ensure that the model results are more accurate;
[0040] S4: The characteristic values of the station data and their corresponding temperature data are used as training samples and introduced into the gradient boosting regression training module. After multiple iterations of training, the final model is obtained.
[0041] S5: First, the longitude, latitude, altitude and other fixed information of each grid point are scaled as eigenvalues, and then the temperature value corresponding to the eigenvalue on each grid point is obtained based on the GBR model output in step S4, and finally the gridded temperature data is output.
[0042] In this embodiment, the time consistency screening mechanism is to obtain the latest temperature data and the temperature of the same station at the previous time. If the difference is greater than n times the standard deviation of all samples, it will be eliminated. That is, samples that meet the following conditions will be eliminated, as shown in formula (1):
[0043] abs(x i (t)-x i (t-1))>n*σ x Formula (1)
[0044] Where t represents time, i represents the site number, σ x represents the standard deviation of all samples,
[0045] The spatial consistency screening mechanism will screen out abnormal station data that differs greatly from the surrounding temperature. That is, after collecting the temperature data of a station, first select the k nearest points around it based on the station distribution information, and calculate the average temperature difference between the station and the surrounding k stations. If it is higher than the temperature standard deviation of all samples, the station will be eliminated, as shown in formula (2);
[0046]
[0047] Where i represents the site number, represents the average value of the surrounding k sites, σ x represents the standard deviation of all samples.
[0048] In this embodiment, in step S3, longitude, latitude, and altitude are introduced as eigenvalues to train the correlation between temperature and each eigenvalue. In order to prevent the weight difference caused by the threshold difference of the eigenvalue itself from being too large, the feature scaling module will standardize several eigenvalues. The specific method is as follows. The eigenvalues after feature scaling will help the model in step S4 to converge faster, as shown in formula (3).
[0049]
[0050] Where i represents the sample point number, j represents the eigenvalue number, and μ represents the mean value.
[0051] In this embodiment, in step S4, the gradient boosting regression algorithm GBR will first give a false initial guess field according to the final output form, and then use the characteristic values of the site data and its corresponding temperature data as training samples, and obtain the final model results after multiple iterations on all samples. In each round of iteration, the algorithm first calculates the negative gradient of the current model on all samples, and then trains a new weak regressor with the negative gradient as the target for fitting and calculates the weight of the weak regressor, thereby updating the model. The specific implementation method is as follows:
[0052] S4.1: Initialize the model function as shown in formula (4):
[0053]
[0054] S4.2: Use the negative gradient of the loss function in the current model F m-1 The value on (x) approximates the residual, as shown in formula (5)
[0055]
[0056] S4.3: Use the base learner h(x) to fit the approximate residual value, as shown in formula (6)
[0057]
[0058] S4.4: Calculate the optimal parameter γ, as shown in formula (7);
[0059]
[0060] S4.5: The final updated model is as shown in formula (8);
[0061] F m (x) = F m-1 (x)+γh(x) Formula (8).
[0062] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention. The techniques, shapes, and structural parts not described in detail in the present invention are all known technologies.
Claims
1. A spatial interpolation method for temperature data based on a gradient boosting regression GBR model, characterized in that: This method includes a temperature data acquisition module, a data cleaning module, a feature scaling module, a gradient boosting regression GBR training module and a grid application module, and is specifically performed in the following steps: S1: First, the temperature data of the latest time of the ground automatic observation station of the Meteorological Bureau is collected through the temperature data collection module; the maximum observation frequency of the automatic weather station is 5 minutes, and the data collection module refreshes and collects the latest temperature data every 5 minutes; S2: Filter out abnormal data through the data cleaning module; Firstly, a certain threshold is set based on the characteristics of atmospheric temperature changes to filter out extremely unreasonable abnormal data. Then, in the data cleaning module, two screening mechanisms, time consistency and space consistency, are used to filter out unreliable samples except extreme values. The time consistency screening mechanism is to obtain the latest temperature data and the temperature of the same station at the previous time. If the difference is greater than n times the standard deviation of all samples, it will be eliminated. That is, samples that meet the following conditions will be eliminated, as shown in formula (1): abs(x i (t)-x i (t - 1))>n*σ x Equation (1) Where t represents time, i represents the site number, σ x represents the standard deviation of all samples, The spatial consistency screening mechanism will screen out abnormal station data that differs greatly from the surrounding temperature. That is, after collecting the temperature data of a station, first select the k nearest points around it based on the station distribution information, and calculate the average temperature difference between the station and the surrounding k stations. If it is higher than the temperature standard deviation of all samples, the station will be eliminated, as shown in formula (2); Where i represents the site number, represents the average value of the surrounding k sites, σ x represents the standard deviation of all samples; S3: Longitude, latitude, and altitude are introduced as eigenvalues to train the correlation between temperature and each eigenvalue. The eigenvalue scaling module scales the eigenvalues. Longitude, latitude, and altitude are introduced as eigenvalues to train the correlation between temperature and each eigenvalue. The eigenvalues need to be scaled before training. The specific method is as follows. The eigenvalues after feature scaling will help the step S4 model converge faster, as shown in formula (3); Where i represents the sample point number, j represents the eigenvalue number, and μ represents the average value; S4: The characteristic values of the station data and their corresponding temperature data are used as training samples and substituted into the gradient boosting regression algorithm. After multiple iterations of training, the final GBR model is obtained. In the gradient boosting regression training module, the gradient boosting regression algorithm GBR will first give a false initial guess field according to the final output form, and then use the characteristic values of the station data and its corresponding temperature data as training samples. After multiple iterations on all samples, the final model result is obtained. In each round of iteration, the algorithm first calculates the negative gradient of the current model on all samples, and then fits a new weak regressor with the negative gradient as the target and calculates the weight of the weak regressor, thereby updating the model. The specific implementation method is as follows: S4.1: Initialize the model function as shown in formula (4): S4.2: Use the negative gradient of the loss function in the current model F m-1 The value on (x) approximates the residual, as shown in formula (5) S4.3: Use the base learner h(x) to fit the approximate residual value, as shown in formula (6) S4.4: Calculate the optimal parameter γ, as shown in formula (7); S4.5: The final updated model is as shown in formula (8); F m F(x) = m-1 F(x)+γh(x) Equation (8); S5: First, the longitude, latitude, and altitude fixed information of each grid point is scaled as the eigenvalue, and then the temperature value corresponding to the eigenvalue on each grid point is obtained based on the GBR model output in step S4, and finally the gridded temperature data is output.
2. According to claim 1, a method for spatial interpolation of temperature data based on a gradient boosting regression GBR model is characterized in that: In the gradient boosting regression training module, multiple weak regressors are generated serially. The goal of each regressor is to fit the negative gradient of the loss function of the previous cumulative model so that the loss function of the cumulative model after adding the weak regressor is reduced.
