Meteorological Data Processing Method, Device, and Storage Medium
By expanding the interpolation area in the target area and evaluating the time and error of multiple interpolation algorithms, and selecting appropriate interpolation algorithms, the problem of insufficient interpolation accuracy and efficiency of meteorological data in the prior art is solved, and efficient and accurate meteorological data mapping is achieved.
Patent Information
- Application Number
- CN202510329976.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-03-20
AI Technical Summary
The prior art is difficult to effectively improve the interpolation accuracy and efficiency of local areas in the absence of precise high-resolution meteorological data.
By determining the expanded area of the target area, using multiple interpolation algorithms for interpolation processing, evaluating the interpolation time and error of each algorithm, and selecting a suitable interpolation algorithm to achieve efficient and accurate interpolation.
High-resolution meteorological data mapping without accurate target data is achieved, interpolation accuracy and efficiency are improved, and the needs of meteorological forecasting and analysis are met.
Smart Images

Figure CN119850413B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a meteorological data processing method, device and storage medium. Background Art
[0002] Global Numerical Weather Prediction (NWP) uses computers to simulate atmospheric motion using a combination of physical and mathematical methods to predict weather conditions. While advances in meteorological data acquisition technology have made it increasingly easy to obtain large-scale, low-resolution global meteorological data, obtaining high-resolution data remains difficult. Therefore, interpolating low-resolution data into high-resolution data is essential to meet the precise data needs of local regions.
[0003] Interpolation methods commonly used in meteorological data processing include bilinear interpolation, cubic spline interpolation, and Kriging interpolation. Using these interpolation methods alone cannot improve the interpolation accuracy in local areas. Moreover, in the absence of accurate real data, the accuracy of the interpolation results of these interpolation algorithms is difficult to judge. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a meteorological data processing method, device and storage medium, which obtains the interpolation time and interpolation accuracy of the trade-off interpolation algorithm, improves the interpolation effect in the absence of accurate target data, and realizes the accurate and efficient mapping of low-resolution large-scale regional meteorological observation data to high-resolution data of local simulation areas.
[0005] An embodiment of the present invention provides a method for processing meteorological data, the method comprising:
[0006] Determining, based on the area range of the target area, the first latitude and longitude resolution of the large-scale area, and at least two candidate interpolation algorithms, an interpolation area corresponding to each candidate interpolation algorithm;
[0007] Interpolate the meteorological data of the corresponding area to be interpolated according to the second latitude and longitude resolution and each candidate interpolation algorithm to obtain a candidate interpolation result, a candidate interpolation time, and a candidate interpolation error corresponding to each candidate interpolation algorithm; wherein the second latitude and longitude resolution is greater than the first latitude and longitude resolution;
[0008] A target interpolation algorithm is determined according to the candidate interpolation times and the candidate interpolation errors corresponding to the candidate interpolation algorithms, and the candidate interpolation results corresponding to the target interpolation algorithm are used as the target interpolation results.
[0009] An embodiment of the present invention provides an electronic device, comprising:
[0010] processor and memory;
[0011] The processor is configured to execute the steps of the meteorological data processing method described in any embodiment by calling the program or instruction stored in the memory.
[0012] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of the meteorological data processing method described in any embodiment.
[0013] The embodiments of the present invention have the following technical effects:
[0014] The method determines the interpolation area corresponding to each candidate interpolation algorithm based on the regional range of the target area, the first latitude and longitude resolution of the large-scale area, and at least two candidate interpolation algorithms, that is, selects a suitable area from the large-scale area to facilitate subsequent interpolation processing. The meteorological data of the corresponding interpolation area is interpolated according to the second latitude and longitude resolution and each candidate interpolation algorithm to obtain the candidate interpolation results, candidate interpolation time, and candidate interpolation error corresponding to each candidate interpolation algorithm, so as to facilitate subsequent analysis according to accuracy and rate. The target interpolation algorithm is determined based on the candidate interpolation time and candidate interpolation error corresponding to each candidate interpolation algorithm, and the candidate interpolation result corresponding to the target interpolation algorithm is used as the target interpolation result. The interpolation time and interpolation accuracy of the weighed interpolation algorithm are obtained, the interpolation effect is improved in the absence of accurate target data, and the accurate and efficient mapping of low-resolution large-scale regional meteorological observation data to high-resolution data in the local simulation area is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are 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.
[0016] Figure 1 This is a flow chart of a meteorological data processing method provided by an embodiment of the present invention;
[0017] Figure 2 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention are described clearly and completely below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0019] The meteorological data processing method provided by the embodiment of the present invention is mainly applicable to situations where the time and accuracy of different interpolation algorithms can be measured without the need for target data, and an appropriate interpolation algorithm can be selected for local interpolation processing. The meteorological data processing method provided by the embodiment of the present invention can be executed by an electronic device.
[0020] Example 1
[0021] Figure 1 This is a flow chart of a meteorological data processing method provided by an embodiment of the present invention. Figure 1 , the meteorological data processing method specifically includes:
[0022] S110 : Determine an interpolation region corresponding to each candidate interpolation algorithm according to the region range of the target region, the first latitude and longitude resolution of the large-scale region, and at least two candidate interpolation algorithms.
[0023] Among them, the target area is a small-scale area that needs to be interpolated to obtain high-resolution meteorological data. The large-scale area is an area with low-resolution meteorological data. It should be noted that the scope of the target area is within the scope of the large-scale area. The regional scope is an area determined by the maximum longitude, minimum longitude, maximum latitude and minimum latitude. The first longitude and longitude resolution is the longitude and latitude resolution of the existing meteorological data in the large-scale area, specifically including the first longitude resolution and the first latitude resolution. The selected interpolation algorithm is the algorithm used for interpolation. Subsequently, a suitable algorithm needs to be selected from the selected interpolation algorithms to provide a high-resolution difference result.
[0024] The area to be interpolated is an area expanded on the basis of the target area, and the purpose is to ensure that the edges in the target area can also have a good interpolation result.
[0025] Specifically, since the target area requires high-resolution meteorological data, the data around the target area must also be accurately interpolated. Therefore, a certain degree of expansion is required to ensure that the data around the target area can also be interpolated. Therefore, based on the regional scope of the target area, the target area can be expanded according to the expansion range of the surrounding data required by different candidate interpolation algorithms, combined with the first longitude and latitude resolution of the large-scale area, to obtain the interpolation area corresponding to each candidate interpolation algorithm.
[0026] Based on the above example, the interpolation area corresponding to each candidate interpolation algorithm can be determined according to the area range of the target area, the first latitude and longitude resolution of the large-scale area, and at least two candidate interpolation algorithms in the following manner:
[0027] Determining, according to the area range of the target area, a first upper longitude limit, a first lower longitude limit, a first upper latitude limit, and a first lower latitude limit corresponding to the target area;
[0028] For each candidate interpolation algorithm, determine a second longitude upper limit and a second longitude lower limit based on the first longitude upper limit, the first longitude lower limit, the first longitude resolution in the first longitude and longitude resolution, and the longitude expansion range corresponding to the candidate interpolation algorithm;
[0029] Determining a second latitude upper limit and a second latitude lower limit according to the first latitude upper limit, the first latitude lower limit, the first latitude resolution in the first longitude and latitude resolution, and the latitude expansion range corresponding to the selected interpolation algorithm;
[0030] The to-be-interpolated area corresponding to the to-be-selected interpolation algorithm is determined according to the second longitude upper limit, the second longitude lower limit, the second latitude upper limit, and the second latitude lower limit.
[0031] The first upper longitude limit, the first lower longitude limit, the first upper latitude limit, and the first lower latitude limit represent the longitude and longitude information at the edge of the target area. The first longitude resolution represents the longitude resolution of meteorological data in a large-scale area. The longitude expansion range represents the amount of data (data points) required in the longitude direction for a specific interpolation point by the candidate interpolation algorithm. The first latitude resolution represents the latitude resolution of meteorological data in a large-scale area. The latitude expansion range represents the amount of data (data points) required in the latitude direction for a specific interpolation point by the candidate interpolation algorithm. The second upper longitude limit, the second lower longitude limit, the second upper latitude limit, and the second lower latitude limit represent the longitude and longitude information at the edge of the area to be interpolated.
[0032] Specifically, the area range of the target area is analyzed to obtain the first upper longitude limit, the first lower longitude limit, the first upper latitude limit, and the first lower latitude limit corresponding to the target area. For each interpolation algorithm to be selected, the algorithm can be analyzed to obtain the longitude expansion range and the latitude expansion range corresponding to the interpolation algorithm to be selected. Based on the first upper longitude limit and the first lower longitude limit, the size of the product of the first longitude resolution and the longitude expansion range is expanded along the direction of expanding the longitude range of the target area to obtain the second upper longitude limit and the second lower longitude limit. Based on the first upper latitude limit and the first lower latitude limit, the size of the product of the first latitude resolution and the latitude expansion range is expanded along the direction of expanding the latitude range of the target area to obtain the second upper latitude limit and the second lower latitude limit. The area enclosed by the second upper longitude limit, the second lower longitude limit, the second upper latitude limit, and the second lower latitude limit is used as the interpolation area corresponding to the corresponding interpolation algorithm to be selected.
[0033] The low-resolution meteorological data of a large area is segmented according to the target area to obtain the interpolation area and then interpolation is performed, that is, the appropriate data slices (areas to be interpolated) are selected. This has important theoretical basis and practical significance in the interpolation process, especially in the context of large-scale meteorological data processing. The reasons are as follows: (1) Using data slices for interpolation can reduce computational complexity and improve computational efficiency while avoiding data redundancy. Generally, meteorological data sets are very large and contain multiple regions, time periods and variables. Directly interpolating the entire data set is not only computationally intensive, but also unnecessary in the case of accurate forecasting. Therefore, by selecting data slices, only the data within the target area can be interpolated, reducing unnecessary computational burden and improving the timeliness of actual forecasts; (2) Interpolation after data slicing can improve interpolation accuracy. Interpolation accuracy depends on the quality and density of the original large-scale meteorological data used. Combined with the first fundamental theorem of geography, it can be seen that if the data is too far away from the interpolation point in the target area, the error of the interpolation result will increase significantly. Furthermore, based on the characteristics of meteorological data, and considering that changes in meteorological elements such as temperature, humidity, and air pressure are somewhat localized, appropriate data slicing can ensure that their local characteristics are taken into account during the interpolation process, avoiding cross-regional data mixing that interferes with the interpolation effect. Therefore, before interpolation, selecting an interpolation area (data slice) that is close to and covers the target area can reduce the computational burden, improve interpolation accuracy, address boundary issues, avoid redundant data, and retain the local characteristics of the data, significantly optimizing the interpolation process. A reasonable interpolation area can balance interpolation accuracy and computational cost, especially in scenarios involving large-scale meteorological data processing, ensuring that the interpolation process is both efficient and accurate.
[0034] For example, to obtain a large area of meteorological data held by a user, the specific parameters include: first latitude and longitude resolution , and The first longitude resolution and the first latitude resolution are respectively the resolutions of the meteorological data of the target area. , and The data resolution r refers to the length of the grid edge obtained by uniformly dividing the regional data into grids.
[0035] If the selected interpolation region can determine the characteristics of the boundary problem, the range of nearby points can be directly selected. If the selected interpolation region is not smooth enough with respect to the boundary points of the target region, the possibility of large interpolation errors at the boundary points will be greatly increased. For example, if the selected interpolation region does not take into account the region boundaries during bilinear interpolation, the boundary points will be missing data points, interpolation will not be possible, and the error will be greatly increased.
[0036] The strategy for selecting neighboring points for the interpolation region corresponding to the bilinear algorithm is as follows: bilinear interpolation relies on the four closest grid points to the interpolation point. This means that for interpolation points within the target region, at least four points above, below, and to the left and right of the interpolation point must be selected within the large-scale region. This means that at least one grid point (at the first longitude resolution or the first latitude resolution) is located outside each boundary of the target region. Cubic spline interpolation uses polynomial fitting and requires more neighboring grid points. For example, in two-dimensional data, each interpolation point requires eight nearby grid points (four in each direction). Therefore, when slicing a large-scale region, grid points are selected that extend two rows and two columns beyond the target region. This means that the longitude and latitude extension ranges are 2, resulting in the interpolation region.
[0037] For the bilinear interpolation algorithm, assume that the target area's first longitude and latitude range is (lat_B_min, lon_B_min) to (lat_B_max, lon_B_max), where lat_B_min is the lower limit of the first longitude, lon_B_min is the lower limit of the first latitude, lat_B_max is the upper limit of the first longitude, and lon_B_max is the upper limit of the first latitude. The first longitude and latitude resolutions of large-scale data are Δlat_A and Δlon_A, where Δlat_A and Δlon_A are the first longitude and latitude resolutions, respectively. The interpolation area should be selected within the following ranges: the second latitude range is [lat_B_min-Δlat_A, lat_B_max+Δlat_A]; the second longitude range is [lon_B_min-Δlon_A, lon_B_max+Δlon_A].
[0038] For cubic spline interpolation, in the above case, the area range of the interpolation area to be selected is: second latitude range: [lat_B_min-2Δlat_A,lat_B_max+2Δlat_A]; second longitude range: [lon_B_min-2Δlon_A,lon_B_max+2Δlon_A].
[0039] This ensures that when using the bilinear interpolation algorithm and the cubic spline interpolation algorithm, there is sufficient surrounding grid point data to participate in the interpolation of the edge points of the target area, ensuring the accuracy of the interpolation.
[0040] S120 , interpolating the meteorological data of the corresponding area to be interpolated according to the second latitude and longitude resolution and each candidate interpolation algorithm, to obtain a candidate interpolation result, a candidate interpolation time, and a candidate interpolation error corresponding to each candidate interpolation algorithm.
[0041] The second latitude and longitude resolution is the required latitude and longitude resolution in the target area, and the second latitude and longitude resolution is greater than the first latitude and longitude resolution. It is understood that the first latitude and longitude resolution is the latitude and longitude grid size for a low-resolution large-scale area, while the second latitude and longitude resolution is the latitude and longitude grid size for a high-resolution local area. The candidate interpolation result is the portion of the meteorological data in the target area after interpolation. The candidate interpolation time is the time required to perform the interpolation calculation to obtain the candidate interpolation result. The candidate interpolation error is used to measure the accuracy of the candidate interpolation algorithm during the interpolation operation.
[0042] Specifically, for each candidate interpolation algorithm, the meteorological data of the corresponding candidate interpolation area is interpolated using the candidate interpolation algorithm according to the second latitude and longitude resolution to obtain a candidate interpolation result corresponding to the candidate interpolation algorithm, and the time used for the interpolation processing, that is, the candidate interpolation time, is recorded. Then, the candidate interpolation error corresponding to the candidate interpolation result is calculated and determined.
[0043] Based on the above example, the candidate interpolation algorithms include a bilinear interpolation algorithm and a cubic spline interpolation algorithm. The following method can be used to interpolate the meteorological data of the corresponding interpolation area according to the second latitude and longitude resolution and each candidate interpolation algorithm to obtain the candidate interpolation result, candidate interpolation time, and candidate interpolation error corresponding to each candidate interpolation algorithm:
[0044] Interpolating the meteorological data of the to-be-interpolated area corresponding to the bilinear interpolation algorithm according to the second latitude and longitude resolution using a bilinear interpolation algorithm to obtain a first interpolation result and a first interpolation time;
[0045] Determine a first interpolation error using a maximum gradient error algorithm based on the first interpolation result;
[0046] Interpolating the meteorological data of the interpolation area corresponding to the cubic spline interpolation algorithm according to the second latitude and longitude resolution to obtain a second interpolation result and a second interpolation time;
[0047] According to the second interpolation result and the longitude and latitude information corresponding to the second interpolation result, a second interpolation error is determined through a preset model and K-fold cross validation.
[0048] Among them, the first interpolation result is the result of interpolation processing using the bilinear interpolation algorithm. The first interpolation time is the time required for interpolation processing using the bilinear interpolation algorithm. The first interpolation error is the error data of the first interpolation result, which is used to measure the interpolation accuracy of the bilinear interpolation algorithm. The second interpolation result is the result of interpolation processing using the cubic spline interpolation algorithm. The second interpolation time is the time required for interpolation processing using the cubic spline interpolation algorithm. The second interpolation error is the error data of the second interpolation result, which is used to measure the interpolation accuracy of the cubic spline interpolation algorithm. The longitude and latitude information corresponding to the second interpolation result is the longitude and latitude of each interpolation point in the second interpolation result. The preset model can be a mathematical model trained using the interpolation result of this meteorological data, which is used to calculate the model corresponding to the meteorological data based on the longitude and latitude information.
[0049] Specifically, by using a bilinear interpolation algorithm, the meteorological data of the area to be interpolated corresponding to the bilinear interpolation algorithm is interpolated according to the second longitude and latitude resolution, and a first interpolation result can be obtained, and the time required for the interpolation process is recorded, which is the first interpolation time. By using a maximum gradient error algorithm, the error of the first interpolation result is solved to obtain a first interpolation error. By using a cubic spline interpolation algorithm, the meteorological data of the area to be interpolated corresponding to the cubic spline interpolation algorithm is interpolated according to the second longitude and latitude resolution, a second interpolation result can be obtained, and the time required for the interpolation process is recorded, which is the second interpolation time. Using the second interpolation result and the longitude and latitude information corresponding to the second interpolation result, the data are divided into a test set and a training set multiple times and randomly, and the preset model is trained respectively and the corresponding errors are calculated. The second interpolation error can be obtained by combining these errors.
[0050] Evaluating the accuracy of interpolation results is crucial, especially in the absence of precise, high-resolution data. Error estimation can effectively verify the accuracy of interpolation results and ensure the safety and reliability of interpolated data in practical applications. In meteorological fields such as weather forecasting, error estimation is essential for optimizing numerical forecast models and making decisions. It provides key information on forecast accuracy and helps decision makers assess the credibility of the results. Accurate error assessment helps prevent potential risks, especially when meteorological data is used for critical decisions such as disaster prevention and mitigation, avoiding erroneous decisions and safety issues caused by the use of unreliable data.
[0051] In the absence of accurate target data, the interpolation error corresponding to the geometric features of the interpolation algorithm to be selected is calculated. The specific technical solution is: bilinear interpolation uses the maximum gradient error measurement method, and cubic spline interpolation uses the K-fold cross-validation method to measure the error size. Considering that the core of the bilinear interpolation algorithm uses linear functions to interpolate, when there is no target data for comparison, the geometric features can be used to quantitatively calculate the size of the absolute error. For cubic spline interpolation, nonlinear polynomials are used to fit the interpolation, and the geometric features are not obvious. The K-fold cross-validation method that can achieve the same effect is selected to measure the absolute error. At this time, the error dimension is the same. Finally, the same formula can be used to calculate the average value to quantitatively compare the accuracy of each interpolation result.
[0052] Based on the above example, the first interpolation error can be determined according to the first interpolation result by using the maximum gradient error algorithm in the following manner:
[0053] determining the maximum gradient of each interpolation point according to the meteorological data of each interpolation point in the first interpolation result;
[0054] For each interpolation point, determine the interpolation point error corresponding to the interpolation point based on the maximum gradient of the interpolation point and the area of the interpolation region corresponding to the interpolation point;
[0055] The average value of the errors at each interpolation point is taken as the first interpolation error.
[0056] The interpolation points are newly added data points after interpolation processing at the second longitude and latitude resolution. Each interpolation point corresponds to an interpolated meteorological data point. The maximum gradient is the maximum value of the gradient of the meteorological data at the interpolation point in the direction of increasing longitude, decreasing longitude, increasing latitude, and decreasing latitude. The interpolation region area is the area of the region formed by connecting the points adjacent to the interpolation point in the direction of increasing longitude and decreasing longitude, as well as the points adjacent to the points in the direction of increasing latitude and decreasing latitude. The interpolation point error is used to measure the accuracy of the interpolation point.
[0057] Specifically, for each interpolation point in the first interpolation result, the meteorological data is calculated for the directions of increasing longitude, decreasing longitude, increasing latitude, and decreasing latitude. The maximum of these gradient values is used as the maximum gradient for that interpolation point. For each interpolation point, the area of the region formed by the points adjacent to that interpolation point in the directions of increasing longitude and decreasing longitude, and the points adjacent to that interpolation point in the directions of increasing latitude and decreasing latitude, is determined as the interpolation area. The product of the maximum gradient of that interpolation point and the interpolation area is used as the interpolation point error corresponding to that interpolation point. Furthermore, the average of the errors of each interpolation point is used as the first interpolation error.
[0058] It's understood that using the maximum gradient and the area of a region to estimate the first interpolation error of the first interpolation result corresponding to the bilinear interpolation algorithm is based on the mathematical principle of the rate of change (gradient) of the interpolation function (bilinear) and the size of the interpolation region. In bilinear interpolation, the error is approximately the product of the maximum gradient within the interpolation region and the area of the interpolation region.
[0059] Assume that on a two-dimensional plane, there exists an interpolation function , whose gradient is expressed as , the interpolation point error corresponding to the i-th interpolation point The estimation formula is:
[0060]
[0061] in, is the maximum gradient of the interpolation point in the interpolation area, is the area of the interpolation region. The error at this interpolation point is used as the absolute error. Since there is no accurate target data, the geometric characteristics of the interpolation region are used to estimate the error. The "maximum gradient error" is used as the error between the actual data value and the predicted data value, which is ideally zero error.
[0062] The average value of the interpolation point error of each interpolation point is used as the first interpolation error MAE1, based on which the quality of the first interpolation result can be estimated:
[0063]
[0064] in, is the interpolation point error of the i-th interpolation point, n is the number of interpolation points, is the first interpolation error.
[0065] Based on the above example, the second interpolation error can be determined by the following method based on the second interpolation result and the latitude and longitude information corresponding to the second interpolation result, using a preset model and K-fold cross validation:
[0066] Initialize the current number of times, and randomly divide the meteorological data of each interpolation point in the second interpolation result and the longitude and latitude information corresponding to each interpolation point in the second interpolation result into a training set and a test set according to a preset ratio;
[0067] Train the preset model according to the training set to obtain the target model;
[0068] Input each test longitude and latitude in the test set into the target model to obtain the model output results corresponding to each test longitude and latitude;
[0069] Determine the current error based on the model output results corresponding to each test longitude and latitude and the test interpolation results;
[0070] In response to the current number being less than the preset number, the current number is updated, and the process returns to executing the step of randomly dividing the second interpolation result and the latitude and longitude information corresponding to the second interpolation result into a training set and a test set according to a preset ratio, until the current number is equal to the preset number;
[0071] In response to the current number being equal to the preset number, an average value of the current errors is used as the second interpolation error.
[0072] Among them, the current number is the number of times the current error is solved. The training set includes each training longitude and latitude and the training interpolation result corresponding to each training longitude and latitude. The test set includes each test longitude and latitude and the test interpolation result corresponding to each test longitude and latitude. The training set and the test set can be divided according to a preset ratio, for example, the training set: data set ratio is 8:2. The target model is the model obtained after training using the training set. The target models obtained after training using different training sets may be different. The model output result is the result obtained by processing the test longitude and latitude using the target model. The current error is the error value between the target model solution corresponding to the current number and the interpolation result.
[0073] Specifically, the current number is initialized, that is, the current number is set to 1. Then, the meteorological data of each interpolation point in the second interpolation result and the longitude and latitude information corresponding to each interpolation point in the second interpolation result are randomly divided into a training set and a test set according to a preset ratio. The preset model is trained using the training set to obtain a target model. Each test longitude and latitude in the test set is input into the target model, and the model calculation is performed on each test longitude and latitude by the target model to obtain the model output result corresponding to each test longitude and latitude. The error is solved according to the model output result corresponding to each test longitude and latitude and the test interpolation result to obtain the current error corresponding to the current number. If the current number is less than the preset number, it means that the number of iterative solutions is insufficient and the current error needs to be solved. Therefore, the current number is updated, that is, the current number is increased by one, and the step of randomly dividing the second interpolation result and the longitude and latitude information corresponding to the second interpolation result into a training set and a test set according to a preset ratio is returned to execute, and the current error corresponding to the new current number is solved until the current number is equal to the preset number. If the current number is equal to the preset number, it means that the current number of errors is sufficient. Therefore, the average value of the errors calculated by the preset number of times is used as the second interpolation error. .
[0074] S130 : Determine a target interpolation algorithm according to the candidate interpolation times and the candidate interpolation errors corresponding to the candidate interpolation algorithms, and use the candidate interpolation results corresponding to the target interpolation algorithm as the target interpolation results.
[0075] The target interpolation algorithm is an interpolation algorithm selected based on the interpolation rate and interpolation accuracy to perform the interpolation processing. The target interpolation result is the interpolation result obtained for the target area using the target interpolation algorithm.
[0076] Specifically, according to the preset interpolation requirements, such as accuracy priority, rate priority, both accuracy and rate priority, etc., the candidate interpolation times and candidate interpolation errors corresponding to each candidate interpolation algorithm are compared, and the target interpolation algorithm that meets the preset interpolation requirements is determined, and the candidate interpolation result corresponding to the target interpolation algorithm is used as the target interpolation result.
[0077] Based on the above example, the target interpolation algorithm can be determined according to the candidate interpolation time and the candidate interpolation error corresponding to each candidate interpolation algorithm in the following manner:
[0078] The interpolation algorithm to be selected corresponding to the minimum value among the interpolation times to be selected is used as the first target algorithm;
[0079] The interpolation algorithm to be selected corresponding to the minimum value among the interpolation errors to be selected is used as the second target algorithm;
[0080] In response to the first target algorithm being the same as the second target algorithm, using the first target algorithm as the target interpolation algorithm;
[0081] In response to the first target algorithm being different from the second target algorithm, a target interpolation algorithm is determined from the first target algorithm and the second target algorithm.
[0082] The first target algorithm is a candidate interpolation algorithm with the smallest interpolation time, and the second target algorithm is a candidate interpolation algorithm with the smallest interpolation error.
[0083] Specifically, based on the principle of rate priority, the interpolation algorithm corresponding to the minimum interpolation time among the candidates is selected as the first target algorithm. Based on the principle of accuracy priority, the interpolation algorithm corresponding to the minimum interpolation error among the candidates is selected as the second target algorithm. If the first and second target algorithms are the same, it indicates that they are optimal in terms of both accuracy and rate. Therefore, the first target algorithm is selected as the target interpolation algorithm. If the first and second target algorithms are different, a target interpolation algorithm is selected from the first and second target algorithms based on user requirements. Alternatively, relevant information (interpolation time and interpolation error) of the first and second target algorithms is displayed to the user for user selection, and the user's selection is selected as the target interpolation algorithm.
[0084] Based on the above example, the target interpolation algorithm can be determined from the first target algorithm and the second target algorithm in the following manner:
[0085] The interpolation result to be selected, the interpolation time to be selected, and the interpolation error to be selected corresponding to the first target algorithm are used as first candidate items, and the interpolation result to be selected, the interpolation time to be selected, and the interpolation error to be selected corresponding to the second target algorithm are used as second candidate items;
[0086] On the target terminal, displaying the first candidate item and the second candidate item;
[0087] Receive candidate item confirmation information fed back from the target terminal, determine the target candidate item according to the candidate item confirmation information, and use the candidate interpolation algorithm corresponding to the target candidate item as the target interpolation algorithm.
[0088] The first candidate is the interpolation result, interpolation time, and interpolation error corresponding to the first target algorithm. The second candidate is the interpolation result, interpolation time, and interpolation error corresponding to the second target algorithm. The target terminal is a terminal device provided to the user for viewing and use, and has display and reception functions. The candidate confirmation information is information indicating the user's selection from the first and second candidates. The target candidate is the candidate carried in the candidate confirmation information and is either the first or second candidate.
[0089] Specifically, the candidate interpolation result, candidate interpolation time, and candidate interpolation error corresponding to the first target algorithm are used as the first candidate, and the candidate interpolation result, candidate interpolation time, and candidate interpolation error corresponding to the second target algorithm are used as the second candidate. The first and second candidates are displayed on the target terminal to facilitate user selection of the one that meets their needs. After the user selects the one, candidate confirmation information is fed back. The candidate confirmation information fed back to the target terminal is parsed and the candidate carried in the candidate confirmation information is used as the target candidate. The candidate interpolation algorithm corresponding to the target candidate is used as the target interpolation algorithm.
[0090] It should be noted that if the number of candidate interpolation algorithms exceeds two, the candidate interpolation result, candidate interpolation time and candidate interpolation error corresponding to each candidate interpolation algorithm can be used as candidate items; on the target terminal, each candidate item is displayed, and the candidate item confirmation information fed back on the target terminal is received. Based on the candidate item confirmation information, the target candidate item is determined, and the candidate interpolation algorithm corresponding to the target candidate item is used as the target interpolation algorithm.
[0091] Understandably, bilinear interpolation and cubic spline interpolation, commonly used in meteorology, were selected as candidate interpolation algorithms because they can effectively reduce the randomness and uncertainty associated with a single interpolation method. Comparing interpolation results from different methods can enhance the reliability of the interpolation results. Furthermore, meteorological data is often nonlinear, complex, and highly dependent on spatial location. Therefore, the distribution characteristics of different meteorological data vary. Therefore, different candidate interpolation algorithms may have different performance characteristics for the spatial distribution of data. From an algorithmic perspective, bilinear interpolation can produce large errors in boundary regions because it only considers the linear relationship between adjacent data points. In contrast, cubic spline interpolation, by considering a wider range of neighboring points, can produce smoother boundaries and effectively reduce discontinuities or abrupt changes in boundaries. In terms of accuracy and computational efficiency, bilinear interpolation is relatively simple and fast, making it suitable for large datasets and real-time applications (such as weather forecasting). However, cubic spline interpolation is computationally more complex and likely to increase computation time, especially when processing large-scale meteorological data. Therefore, analyzing the trade-off between computational speed and accuracy for candidate interpolation algorithms is crucial for meteorological forecasting and analysis. Furthermore, some applications, such as short-term weather forecasting, may require rapid results, while others, such as climate change research, require higher accuracy. Therefore, the target interpolation algorithm can be determined based on different requirements.
[0092] Taking the bilinear interpolation algorithm and the cubic spline interpolation algorithm as examples of the candidate interpolation algorithms, by comparing the first interpolation time of the bilinear interpolation algorithm with the second interpolation time of the cubic spline interpolation algorithm, and comparing the first interpolation error of the bilinear interpolation algorithm with the second interpolation error of the cubic spline interpolation algorithm, to measure and judge whether the candidate interpolation method used is reasonable. Among them, the interpolation error is represented by MAE (Mean Absolute Error), and the specific calculation method has been described in the above example and will not be elaborated here. It is often used to evaluate performance, especially in cases where the incremental deviation is more sensitive. It can provide the deviation of the absolute deviation, and its unit is the same as the original data. The time for the bilinear interpolation algorithm and the cubic spline interpolation algorithm to perform the interpolation operation are respectively recorded as the first interpolation time T1 and the second interpolation time T2, and the mean absolute errors are respectively recorded as the first interpolation error e1 and the second interpolation error e2. If T1>T2 and e1>e2, it means that the accuracy and time efficiency of the bilinear interpolation algorithm are both better than those of the cubic spline interpolation algorithm, and it can be concluded that the first interpolation result corresponding to the bilinear interpolation algorithm is comprehensively better than the second interpolation result corresponding to the cubic spline interpolation algorithm. If T1<T2 and e1<e2, it means that the accuracy and time efficiency of the cubic spline interpolation algorithm are both better than those of the bilinear interpolation algorithm, and it can be concluded that the second interpolation result corresponding to the cubic spline interpolation algorithm is comprehensively better than the first interpolation result corresponding to the bilinear interpolation algorithm. In both of these cases, the optimal interpolation scheme, that is, the target interpolation algorithm, can be determined. If neither of the above sets of conditions is satisfied, at this time, the optimal interpolation scheme cannot be directly determined and can be left to the user to choose, making a trade-off between accuracy and computational efficiency, and making a decision based on the specific application scenario (weather forecasting, weather analysis, etc.) or weighing the pros and cons of balancing accuracy and computational efficiency.
[0093] On the basis of the above example, after taking the candidate interpolation result corresponding to the target interpolation algorithm as the target interpolation result, the following method can be used for visual analysis, specifically:
[0094] Determine the type of analysis chart according to the meteorological data type;
[0095] For each type of analysis chart, determine the target analysis chart according to the target interpolation result;
[0096] On the target terminal, display each target analysis chart.
[0097] Among them, the meteorological data type includes temperature, humidity, etc., which are the types of meteorological data. The type of analysis chart is the type of visualization chart, such as a numerical distribution chart, a spatial distribution chart, a line chart, a bar chart, etc. combined with geographical information. The target analysis chart is a visualization chart drawn according to the target interpolation result according to the type of analysis chart.
[0098] Specifically, by analyzing the meteorological data type, a visualization type suitable for representing that meteorological data type can be determined, i.e., an analysis chart type. For each analysis chart type, the target interpolation result is substituted into the plot to generate the target analysis chart corresponding to that analysis chart type. Each target analysis chart is then displayed on the target terminal, allowing the user to intuitively view the interpolated meteorological data within the target area.
[0099] It is understood that after completing the interpolation work and evaluating and selecting the appropriate algorithm and results, the target interpolation results will be visualized and analyzed to provide users with a clearer understanding of the interpolation effect and better interpret the target interpolation results for product use. The meteorological data corresponding to the target interpolation results will be presented as images and pushed to the user-specified path or webpage. Specifically, this can involve determining the input interpolated data file (target interpolation result), obtaining user requirements, and selecting an appropriate image type (analysis chart type) based on the meteorological data type of the target interpolation result. The specific format can be configured using common tools, and then the image (target analysis chart) will be output for analysis. To enable subsequent users to conduct more efficient analysis or apply similar visualization analysis methods to other meteorological data, a corresponding program can be provided. After the data is input, the processed results will be displayed as images.
[0100] The above example achieves dual evaluation and improvement of interpolation accuracy and computational efficiency, providing a complete process for evaluating the performance of various candidate interpolation methods. By utilizing a data slicing method to expand the interpolation area corresponding to the target area, the accuracy of supercomputer-based interpolation of local high-resolution data using wide-area low-resolution data in big data scenarios is improved. An error analysis method is proposed in the absence of accurate target data, providing meteorological decision-makers with a scientific basis for judging the feasibility of interpolation results, thereby meeting the needs of decision-makers and scientists in the fields of weather forecasting and meteorological analysis. Finally, a visualization solution is provided to facilitate product interpretation and further analysis, demonstrating significant practical application value and market prospects.
[0101] The present invention has the following technical effects: by determining the to-be-interpolated area corresponding to each candidate interpolation algorithm based on the regional scope of the target area, the first latitude and longitude resolution of the large-scale area, and at least two candidate interpolation algorithms, that is, selecting a suitable area from the large-scale area to facilitate subsequent interpolation processing, interpolating the meteorological data of the corresponding to-be-interpolated area based on the second latitude and longitude resolution and each candidate interpolation algorithm, obtaining the candidate interpolation results, candidate interpolation time, and candidate interpolation error corresponding to each candidate interpolation algorithm, so as to facilitate subsequent analysis based on accuracy and rate, determining the target interpolation algorithm based on the candidate interpolation time and candidate interpolation error corresponding to each candidate interpolation algorithm, and using the candidate interpolation result corresponding to the target interpolation algorithm as the target interpolation result, obtaining the interpolation time and interpolation accuracy of the weighed interpolation algorithm, improving the interpolation effect in the absence of accurate target data, and realizing accurate and efficient mapping of low-resolution large-scale regional meteorological observation data to high-resolution data in a local simulation area.
[0102] Example 2
[0103] Figure 2 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 2 As shown, the electronic device 200 includes one or more processors 201 and a memory 202 .
[0104] The processor 201 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 200 to perform desired functions.
[0105] Memory 202 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and processor 201 may execute the program instructions to implement the meteorological data processing method of any embodiment of the present invention described above and / or other desired functions. Various contents such as initial external parameters and threshold values may also be stored in the computer-readable storage medium.
[0106] In one example, the electronic device 200 may further include an input device 203 and an output device 204, which are interconnected via a bus system and / or other connection mechanisms (not shown). The input device 203 may include, for example, a keyboard, a mouse, etc. The output device 204 may output various information to the outside, including warning information, braking force, etc. The output device 204 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.
[0107] Of course, to simplify, Figure 2 Only some of the components related to the present invention in the electronic device 200 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device 200 may further include any other appropriate components according to specific application scenarios.
[0108] In addition to the above methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the steps of the meteorological data processing method provided by any embodiment of the present invention.
[0109] The computer program product may be written in any combination of one or more programming languages to implement the operations of embodiments of the present invention, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0110] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps of the meteorological data processing method provided by any embodiment of the present invention.
[0111] The computer-readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0112] It should be noted that the terms used in the present invention are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method or device comprising a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.
[0113] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A meteorological data processing method, characterized in that: include: Determining, based on the area range of the target area, the first latitude and longitude resolution of the large-scale area, and at least two candidate interpolation algorithms, an interpolation area corresponding to each candidate interpolation algorithm; Interpolate the meteorological data of the corresponding area to be interpolated according to the second latitude and longitude resolution and each candidate interpolation algorithm to obtain a candidate interpolation result, a candidate interpolation time, and a candidate interpolation error corresponding to each candidate interpolation algorithm; wherein the second latitude and longitude resolution is greater than the first latitude and longitude resolution; Determine a target interpolation algorithm according to the candidate interpolation times and the candidate interpolation errors corresponding to the candidate interpolation algorithms, and use the candidate interpolation results corresponding to the target interpolation algorithm as the target interpolation results; The step of determining the interpolation area corresponding to each candidate interpolation algorithm according to the area range of the target area, the first latitude and longitude resolution of the large-scale area, and at least two candidate interpolation algorithms includes: Determining, according to the area range of the target area, a first upper longitude limit, a first lower longitude limit, a first upper latitude limit, and a first lower latitude limit corresponding to the target area; For each candidate interpolation algorithm, determine a second longitude upper limit and a second longitude lower limit based on the first longitude upper limit, the first longitude lower limit, the first longitude resolution in the first longitude and longitude resolution, and the longitude expansion range corresponding to the candidate interpolation algorithm; Determining a second latitude upper limit and a second latitude lower limit according to the first latitude upper limit, the first latitude lower limit, the first latitude resolution in the first longitude and latitude resolution, and the latitude expansion range corresponding to the selected interpolation algorithm; The to-be-interpolated area corresponding to the candidate interpolation algorithm is determined according to the second longitude upper limit, the second longitude lower limit, the second latitude upper limit, and the second latitude lower limit.
2. The method according to claim 1, characterized in that The interpolation algorithm to be selected includes a bilinear interpolation algorithm and a cubic spline interpolation algorithm; The interpolation processing is performed on the meteorological data of the corresponding interpolation area according to the second latitude and longitude resolution and each candidate interpolation algorithm to obtain a candidate interpolation result, a candidate interpolation time, and a candidate interpolation error corresponding to each candidate interpolation algorithm, including: interpolating the meteorological data of the to-be-interpolated area corresponding to the bilinear interpolation algorithm according to the second latitude and longitude resolution using a bilinear interpolation algorithm to obtain a first interpolation result and a first interpolation time; Determine a first interpolation error using a maximum gradient error algorithm based on the first interpolation result; interpolating the meteorological data of the interpolation area corresponding to the cubic spline interpolation algorithm according to the second latitude and longitude resolution using a cubic spline interpolation algorithm to obtain a second interpolation result and a second interpolation time; According to the second interpolation result and the longitude and latitude information corresponding to the second interpolation result, a second interpolation error is determined through a preset model and K-fold cross validation.
3. The method according to claim 2, characterized in that Determining the first interpolation error by using a maximum gradient error algorithm according to the first interpolation result includes: determining the maximum gradient of each interpolation point according to the meteorological data of the interpolation point in the first interpolation result; For each interpolation point, determine an interpolation point error corresponding to the interpolation point based on the maximum gradient of the interpolation point and the area of the interpolation region corresponding to the interpolation point; The average value of the errors at each interpolation point is taken as the first interpolation error.
4. The method according to claim 2, characterized in that The determining, based on the second interpolation result and the latitude and longitude information corresponding to the second interpolation result, a second interpolation error through a preset model and K-fold cross validation includes: Initializing the current number of times, randomly dividing the meteorological data of each interpolation point in the second interpolation result and the longitude and latitude information corresponding to each interpolation point in the second interpolation result into a training set and a test set according to a preset ratio; wherein the test set includes each test longitude and latitude and the test interpolation result corresponding to each test longitude and latitude; Training the preset model according to the training set to obtain a target model; Input each test longitude and latitude in the test set into the target model to obtain the model output result corresponding to each test longitude and latitude; Determine the current error based on the model output results corresponding to each test longitude and latitude and the test interpolation results; In response to the current number being less than the preset number, updating the current number and returning to the step of randomly dividing the second interpolation result and the longitude and latitude information corresponding to the second interpolation result into a training set and a test set according to a preset ratio until the current number is equal to the preset number; In response to the current number being equal to the preset number, an average value of the current errors is used as the second interpolation error.
5. The method according to claim 1, wherein The determining of the target interpolation algorithm according to the candidate interpolation time and the candidate interpolation error corresponding to each candidate interpolation algorithm includes: The interpolation algorithm to be selected corresponding to the minimum value among the interpolation times to be selected is used as the first target algorithm; The interpolation algorithm to be selected corresponding to the minimum value among the interpolation errors to be selected is used as the second target algorithm; In response to the first target algorithm being the same as the second target algorithm, using the first target algorithm as a target interpolation algorithm; In response to the first target algorithm being different from the second target algorithm, a target interpolation algorithm is determined from the first target algorithm and the second target algorithm.
6. The method according to claim 5, characterized in that Determining a target interpolation algorithm from the first target algorithm and the second target algorithm includes: The interpolation result to be selected, the interpolation time to be selected, and the interpolation error to be selected corresponding to the first target algorithm are used as first candidate items, and the interpolation result to be selected, the interpolation time to be selected, and the interpolation error to be selected corresponding to the second target algorithm are used as second candidate items; Displaying the first candidate item and the second candidate item on the target terminal; Receive candidate item confirmation information fed back from the target terminal, determine a target candidate item according to the candidate item confirmation information, and use the candidate interpolation algorithm corresponding to the target candidate item as a target interpolation algorithm.
7. The method according to claim 1, characterized in that After the step of using the candidate interpolation result corresponding to the target interpolation algorithm as the target interpolation result, the method further includes: Determine the type of analysis chart based on the type of meteorological data; For each analysis graph type, determining a target analysis graph according to the target interpolation result; On the target terminal, an analysis diagram of each target is displayed.
8. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the meteorological data processing method according to any one of claims 1 to 7 by calling the program or instruction stored in the memory.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the meteorological data processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual terrain modeling method based on linear interpolation
CN107545600A
Meteorological data color spot diagram generation method and device, equipment and storage medium
CN113658292A
Spatial interpolation method, device and equipment for meteorological parameters of power transmission line region
CN113808015A