Weather history case-oriented similarity calculation method and visual viewing device

Through multi-source fusion meteorological grid point data and structural similarity index (SSIM) calculation, the problem of insufficient accuracy and adaptability of weather history similarity recognition in the prior art is solved, and more efficient and accurate weather history individual cases are achieved.

CN120256977AActive Publication Date: 2025-07-04STATE QIXIANG INFORMATION CENT
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510593204.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-07-04
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

The existing weather historical similarity recognition technology has the disadvantages of incomplete data utilization, high dependence on specific conditions, one-sided calculation methods, and largely affected by subjective factors and data quality, which leads to insufficient accuracy, reliability and adaptability of identification results, making it difficult to efficiently and accurately meet the identification needs of similar weather in diverse scenarios.

Method used

Multi-source fusion meteorological grid data is used to evaluate the similarity of meteorological data by dividing data grid points, standardizing processing and calculating structural similarity index (SSIM), and combined with a visual viewing device, it can quickly identify and analyze weather history individual cases.

Benefits of technology

It improves the accuracy and efficiency of identifying individual weather cases, can reflect weather conditions more comprehensively, adapt to diverse scenarios, and provide scientific meteorological prediction and decision-making references.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256977A_ABST
    Figure CN120256977A_ABST
Patent Text Reader

Abstract

The invention discloses a similarity calculation method and device for weather history examples, and the method comprises the following steps: (1) dividing grid points: obtaining and analyzing meteorological grid point data, and dividing a region corresponding to the meteorological grid point data into a plurality of data grid points; step (2), inputting grid points: inputting two groups of meteorological grid point data with the same dimension and the same type; (3) standardizing the data: standardizing the two groups of meteorological grid point data, and outputting the standardized data of each group of meteorological grid point data according to the divided data grid points; step (4), data calculation: converting the two groups of standardized processing data into grayscale images, and calculating a structural similarity index between the two grayscale images; and (5) outputting a result: according to the data calculation result, outputting the similarity of the two groups of meteorological grid point data. The method provided by the invention can effectively improve the accuracy and efficiency of weather history case identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of weather historical case similarity analysis. Specifically, it is a method for calculating the similarity of weather historical cases and a visualization viewing device. Background Art

[0002] Traditional weather historical case recognition mainly relies on forecasters or analysts to make manual judgments based on weather condition data and experience, and finally infer whether they are similar cases. This method is accurate and detailed in judgment, but it requires a large amount of manpower and time, and has problems such as long judgment cycles, high judgment costs, and large personal influence factors, making it difficult to meet the needs of large-scale analysis and a large number of historical case analyses.

[0003] Chinese Patent CN 118708983 A discloses a method for analyzing the similarity of historical weather based on the dynamic time warping method. First, the historical meteorological station data is formed into time series data of single-station precipitation time, and then the dynamic time warping algorithm is used to align and match the precipitation times of different stations to obtain the similarity metric values between different historical weather patterns; finally, the dynamic time warping method and the similarity metric values are combined to establish a similarity analysis model, and by analyzing the similarity of historical precipitation data, similar precipitation patterns and rules are identified. This method has the following defects: it analyzes based on precipitation elements, only considering indicators related to precipitation such as precipitation amount, precipitation duration, and precipitation interval, and ignoring other important meteorological elements such as temperature, wind speed, wind direction, and air pressure. However, the actual weather conditions are formed by the combined action of multiple meteorological elements, and relying solely on precipitation data may not comprehensively and accurately reflect the similarity of historical weather patterns. Secondly, this method relies on historical meteorological station data, and the distribution of stations may be uneven, with some areas having dense stations and some areas having sparse stations. This may lead to inaccurate characterization of weather patterns in areas with sparse stations during the analysis process, affecting the accuracy of the overall similarity analysis. In addition, there may be problems such as errors and missing values in the station data itself. Although the patent mentions interpolation processing for missing values, the interpolation method may also introduce certain errors.

[0004] Chinese Patent CN 114882263 A discloses a method for identifying the similarity of convective weather based on the CNN image pattern. First, the obtained convective weather images are preprocessed, and the VGG16 convolutional neural network is used to extract models for the convective weather images to obtain the features of the convective weather images. Then, the weather image features are subjected to unsupervised clustering to determine the optimal number of clustering clusters. The visualization method and actual operation data are used to verify the recognition scenarios and determine the characteristics of the recognized scenarios. This method has the following defects: The data source is single, relying only on specific convective weather image data and not considering other meteorological data sources, such as radar data, numerical forecast products, etc. Different types of data may contain complementary information. Using only image data may lead to incomplete information and affect the accurate recognition of the similarity of convective weather. Secondly, data annotation is difficult. Although this method is unsupervised clustering, in practical applications, it may be necessary to annotate the data to evaluate the performance of the model or for visualization. The annotation of convective weather images requires professional meteorological knowledge and experience, and the annotation process may be subjective and inconsistent, thus affecting the accuracy and reliability of the model.

[0005] Chinese Patent CN 110866630 A discloses a method for analyzing historical similarity weather. By obtaining historical actual data and current actual data, and using the similarity coefficient and Mahalanobis distance to calculate the comprehensive similarity coefficient of each layer, the similarity degree is calculated after assigning weights to the comprehensive similarity coefficients of each layer. This method has the following defects: The similarity analysis model established by this method may have good effects on specific weather types or regions, but in other cases, its adaptability may be limited. The weather characteristics and climate conditions vary greatly in different regions, and a fixed model may not be able to adapt well to various complex situations. For example, for special geographical regions such as plateau regions, coastal regions or polar regions, this method may need to be adjusted and improved specifically to be accurately applied.

[0006] Chinese Patent CN 113268627 A discloses an automatic retrieval method for similar rainstorm weather. By converting the barometric pressure data of the area to be forecast into a grayscale image Gp as the image to be forecast, and converting the historical barometric pressure data of M rainfall weather conditions into M historical images respectively. By comparing the images, the similarity between the image to be forecast and the M historical images is calculated (the similarity is represented by calculating the Hamming distance between the hash value Hp of the image to be forecast and the hash value of each historical image). Sort the M historical images in descending order of similarity to obtain the comparison result of the barometric pressure in the area to be forecast. This method has the following defects: Rainstorm weather is often affected by a variety of factors comprehensively, and the weather conditions are relatively complex. This method simply retrieves based on the similarity of barometric pressure images and may not be able to accurately handle the complex and changeable actual weather conditions. For example, in different seasons, geographical locations, and climate backgrounds, even if the barometric pressure images are similar, the formation mechanisms and characteristics of rainstorms may be different. This method may not be able to effectively distinguish these differences, thus affecting the reliability of the retrieval results.

[0007] Chinese Patent CN 115080803 A discloses a retrieval method for similar rainstorm weather based on the height field. First, obtain the grid data of the current real-time weather, including multiple records, and each record includes the corresponding longitude, latitude, height field data, and flow field vector; then extract and segment the grid data of the current real-time weather to obtain multiple low-pressure vortices of the current real-time weather; then calculate the similarity between the multiple low-pressure vortices of the current real-time weather and the low-pressure vortices of each historical weather to obtain the similarities of multiple historical weathers. Sort the multiple historical weathers according to the similarity size, and the sorting result is used to represent the retrieval result of similar rainstorm weather. This method determines similar rainstorm weather only by calculating the similarity between the low-pressure vortices of the current real-time weather and the low-pressure vortices of historical weather. This calculation method is relatively one-sided. The low-pressure vortex is only one factor in the formation of rainstorms, and other factors such as water vapor transportation and vertical upward movement also play key roles in the occurrence and development of rainstorms. Ignoring these factors may lead to the retrieved similar weather not being the real similar rainstorm weather in actual situations.

[0008] In summary, the existing similar weather recognition technologies have the following disadvantages: incomplete data utilization, high dependence on specific conditions, one-sided calculation methods, and being greatly affected by subjective factors and data quality. These disadvantages lead to insufficient accuracy, reliability, and adaptability of the recognition results, making it difficult to meet the requirements of similar weather recognition in diverse scenarios efficiently and accurately. Therefore, it is necessary to integrate multi-source meteorological data and develop a more universal and comprehensive similar weather recognition model. On the one hand, various meteorological elements such as temperature, humidity, air pressure, wind speed, and wind direction should be incorporated into the analysis system, and advanced data fusion technologies should be used to explore the synergistic relationships among the elements and comprehensively reflect the weather conditions. On the other hand, more intelligent and adaptive algorithms should be adopted to overcome the problems of traditional algorithms being sensitive to local features and ignoring overall semantics, and improve the model's understanding and recognition capabilities of complex weather patterns. Summary of the Invention

[0009] To this end, the technical problem to be solved by the present invention is to provide a method for calculating the similarity of weather historical cases and a visualization viewing device. By analyzing historical meteorological data images, historical cases similar to the current meteorological event can be quickly found, providing a reference for meteorological prediction and decision-making, and also providing an auxiliary reference when a large number of weather historical similar cases need to be identified.

[0010] To solve the above technical problems, the present invention provides the following technical solutions: A method for calculating the similarity of weather historical cases includes the following steps: Step (1), dividing grid points: obtaining and parsing meteorological grid data, and dividing the area corresponding to the meteorological grid data into several data grid points; the meteorological grid data used in the present invention is the national meteorological grid data after multi-source fusion. Since there are regional factors in weather historical cases, dividing grid points can crop the range of meteorological grid data according to the region, making the subsequent comparative analysis of weather historical cases more targeted. Moreover, when calculating the similarity, it is beneficial to control the occurrence ranges of the two weather cases to be the same, so that the calculation results are more representative; Step (2), inputting grid points: inputting two sets of meteorological grid data with the same dimension and the same type; Step (3), standardizing data: according to the data grid points divided in step (1), standardizing the two sets of meteorological grid data one by one, and outputting the standardized data for each set of meteorological grid data according to the divided data grid points; Step (4), data calculation: Convert the two sets of standardized data into grayscale images, and calculate the structural similarity index (SSIM) between the two grayscale images; obtain the structural similarity index between the two sets of meteorological grid data by calculating the structural similarity index between the grayscale images; SSIM is an index used to measure the similarity between two images (or data grids), usually used for image quality assessment, and its value ranges from -1 to 1. The closer the value is to 1, the more similar the two images are. Step (5), output result: According to the data calculation result, output the similarity of the two sets of meteorological grid data, and determine whether the two sets of meteorological grid data are similar cases based on the similarity.

[0011] The present invention is directed to a method for calculating the similarity of weather historical cases. Based on the national meteorological grid data after multi-source fusion, by dividing the meteorological grid data into several data grid points, it is beneficial to crop the range of meteorological grid data according to regions, making the comparative analysis of weather historical cases more targeted, thereby effectively improving the accuracy and efficiency of weather historical case recognition. In addition, the method of the present invention can realize the recognition of weather historical cases using any one of the meteorological grid data of temperature, humidity, air pressure, wind speed, and wind direction, which is more flexible than the existing weather recognition methods.

[0012] In the above method for calculating the similarity of weather historical cases, in step (1), the meteorological grid data includes height field data, temperature field data, humidity field data, and wind field data.

[0013] In the above method for calculating the similarity of weather historical cases, in step (1), the method for dividing the area corresponding to the meteorological grid data into several data grid points is as follows: Step (1-1), determine the spatial resolution, starting longitude, and starting latitude of the meteorological grid data; the spatial resolution is the actual spatial range represented by a single pixel (or cell) in a two-dimensional matrix, reflecting the ability of the image to depict details. Since the meteorological grid data is the average calculation result of the data within a certain range, the influence of its accuracy on the result needs to be considered when using the spatial resolution as the calculation basis; the higher the data accuracy used in the calculation, the smaller the influence on the result. For some data during the transition period, interpolation calculation methods are adopted; in meteorological operations, most of the high-resolution meteorological real-time grid data is mainly 1km×1km, but there are also data with larger spatial resolutions, such as 5km×5km, 6.25km×6.25km, etc. For these data with larger spatial resolutions, the bilinear interpolation method is used for interpolation calculation. Step (1-2), calculate the four-corner longitudes and latitudes of the data grid points to be divided, and divide the area corresponding to the meteorological grid data into several data grid points according to the calculation result.

[0014] For the above method for calculating the similarity of weather historical cases, the data grid point Z to be divided ij The calculation method of the four corner longitudes and latitudes is as follows: Min loni = lon+(i - 1)×r; Max loni = lon + i×r; Min latj = lat + j×r; Max latj = lat+(j - 1)×r; In the formula, Min loni is the minimum longitude of the data grid point Z ij to be divided, Max loni is the maximum longitude of the data grid point Z ij to be divided, Min latj is the minimum latitude of the data grid point Z ij to be divided, Max latj is the maximum latitude of the data Z ij to be divided; i is the row number i of the data grid point Z ij to be divided, j is the column number j of the data grid point Z ij to be divided, r is the spatial resolution of the two-dimensional matrix of meteorological grid data, lon is the starting longitude of the meteorological grid data, and lat is the starting latitude of the meteorological grid data.

[0015] For the above method for calculating the similarity of weather historical cases, in step (2), the type of meteorological grid data is a two-dimensional array, including an image or a matrix.

[0016] For the above method for calculating the similarity of weather historical cases, in step (3), the normalization method is used to standardize the meteorological grid data, and the meteorological grid data is scaled to the range of 0 to 1. The standardization formula is: grid_normalized = (grid - grid.min()) / (grid.max() - grid.min()); In the formula, grid_normalized is the normalized meteorological grid data; grid is the original meteorological grid data, usually representing the values of a certain meteorological field (such as height field, temperature field, etc.); grid.min() is the minimum value in the original meteorological grid data, representing the minimum value in the data matrix. By grid.min(), the lowest point or minimum value in the data can be found; grid.max() is the maximum value in the original meteorological grid data, representing the maximum value in the data matrix. By grid.max(), the highest point or maximum value in the data can be found.

[0017] In the above formula, grid-grid.min() subtracts the minimum value of grid from each value in grid; the purpose of this is to map the minimum value of the data to 0, ensuring that all data becomes non-negative. grid.max()-grid.min() is the range of the data, representing the difference between the maximum and minimum values of the data, and this difference is used to scale the data between 0 and 1. This formula subtracts the minimum value from each data point and then divides by the range of the data; the result of this is to scale all the data between 0 and 1, making the data have the same scale, which is convenient for subsequent comparison or calculation. The range of the normalized data is between 0 and 1, which is convenient for subsequent image processing or similarity calculation. This processing method can normalize the pixel values of meteorological data to [0, 1], which is convenient for neural network training. Normalize the RGB three-channel (with pixel value range of 0~255 for each channel) color meteorological grid data image to between 0 and 1. By standardizing the color meteorological grid data, calculations based on python can be achieved.

[0018] In the above method for calculating the similarity of weather historical cases, in step (4), the standardized data is converted into a grayscale image, and integer values from 0 to 255 are used to represent the intensity of each pixel. This is achieved by multiplying the standardized data by 255 and converting it to an unsigned 8-bit integer; the formula for converting the standardized data into a grayscale image is: grid_grayscale = np.unit8(grid_normalized*255); In the formula, grid_grayscale is the grayscale image data matrix or array after the conversion of the standardized data, with a data range between 0 and 255, which can be directly used to generate a grayscale image; grid_normalized * 255 is to multiply the normalized data (with a range between 0 and 1) by 255; the purpose of this is to map the data from the range of 0 to 1 to the range of 0 to 255, because the pixel values of a grayscale image are usually integers between 0 and 255. np.uint8() is a function in the NumPy library used to convert data to the unsigned 8-bit integer type; the range of an unsigned 8-bit integer is 0 to 255, which exactly corresponds to the pixel value range of a grayscale image. Through np.uint8(), the floating-point number (such as the result of grid_normalized * 255) can be converted into an integer for generating a grayscale image. grid_normalized is the normalized meteorological grid data, with a range between 0 and 1.

[0019] In the above method for calculating the similarity of weather historical cases, in step (4), the SSIM function is used to calculate the structural similarity index (SSIM) of two grayscale images. This function returns a value between -1 and 1, indicating the structural similarity of the two images. The calculation formula for the structural similarity index is as follows: ; In the formula, x and y are the pixel matrices or arrays of the two grayscale images respectively, representing the two images to be compared, which can be a certain channel of a grayscale image or a color image. In the present invention, they are grayscale image arrays; and are the average pixel values of the grayscale images x and the grayscale image y respectively; is the covariance of the grayscale images x and the grayscale image y (the covariance reflects the structural similarity of the two images, that is, the consistency in the change of pixel values of the two images), is the variance of the pixel values of the grayscale image x , is the variance of the pixel values of the grayscale image y . The variance of pixel values reflects the contrast information of the image; and are two constants used to avoid the denominator being zero, usually taking relatively small values. , ; and are constants, usually taking , , where L is the dynamic range of pixel values (e.g., 255). This formula calculates the similarity between two images by comparing their brightness (mean), contrast (variance), and structure (covariance); the closer the SSIM value is to 1, the more similar the two images are in terms of brightness, contrast, and structure. The present invention uses SSIM to evaluate the similarity of two meteorological grid data maps, and has the following advantages: it takes into account brightness, contrast, and structural information simultaneously, which is more in line with human visual perception; high robustness: it has strong robustness to noise and distortion; computational efficiency: the computational complexity is low, suitable for real-time applications; other image comparison methods include root mean square error MSE, peak signal-to-noise ratio PNSR, and mutual information MI. In comparison: accuracy: SSIM is superior to MSE and PSNR in terms of accuracy and is more in line with human visual perception. Adaptability: SSIM has good adaptability to noise and distortion, and MI performs better in dealing with non-linear relationships, but the calculation is complex. Computational speed: SSIM has a faster computational speed and is suitable for real-time applications, while MI is computationally slower. Therefore, using SSIM to evaluate the similarity of two meteorological grid data maps combines efficiency and accuracy.

[0020] In the above method for calculating the similarity of weather historical cases, in step (5), the output result will be represented as a number between -1 and 1. The closer the value is to 1, the more similar the two sets of data are, and the more the two weather processes meet the requirements of weather historical similar cases. If it exceeds a certain value, it can be considered that the two weather historical processes are similar; when the similarity is greater than or equal to 0.8 and less than 1, the weather historical processes represented by the two sets of meteorological grid data are similar.

[0021] A device for visualizing and viewing the similarity of weather historical cases includes the following modules: Weather case query module: Provides functions such as spatio-temporal query and detailed query of weather historical cases, mainly querying based on two elements: time and type; Weather case situation display module: According to the information of the case, the meteorological data involved in the corresponding case, such as precipitation, temperature, wind, etc., are displayed on the page, and the case data is displayed on the page in a visual form to achieve an intuitive display of the situation, impact effect, etc. of the case; Weather case scene operation module: Performs various basic operations on the case display scene, including panning, dragging, zooming in, zooming out, centering, etc., to facilitate users to observe and analyze data; Weather case analysis module: Analyzes the data displayed in the case, statistics the meteorological activities during the duration of the case, such as data like cumulative precipitation, etc., and provides analysis data such as calculation results; Weather historical similar case recognition and calculation module: It is used to implement the above-mentioned method for calculating the similarity of weather historical cases. According to the data of historical cases, it calculates the similarity between different historical cases according to the algorithm, identifies and displays the similar cases, and provides data support for statistical analysis and other work. The calculation elements of similar cases mainly include the height field, temperature, and wind, and the calculation is carried out with the data averaged over the case process.

[0022] The technical solution of the present invention has achieved the following beneficial technical effects: The method for calculating the similarity of weather historical cases of the present invention obtains a variety of meteorological grid data such as the height field, temperature field, humidity field, and wind field of two current historical weather processes, preprocesses and extracts features from the data; standardizes the data results of one or several of the average processes, and inputs the standardized data into the algorithm model; uses the structural similarity (SSIM) algorithm to calculate the similarity of two pictures, and thus calculates the similarity between two cases; sorts according to the similarity, and screens out the most similar historical cases; outputs the results of similar cases. This method can effectively improve the accuracy and efficiency of weather historical case recognition, and provide a scientific basis for meteorological prediction and decision-making. Brief Description of the Drawings

[0023] Figure 1 Flow schematic diagram of the method for calculating the similarity of weather historical cases in the embodiment of the present invention; Figure 2 Similarity output result of the calculation of the similarity of weather historical cases in the embodiment of the present invention; Figure 3 Visualization view result of the calculation of the similarity of weather historical cases in the embodiment of the present invention; Figure 4 850hPa temperature circulation field images of two groups of meteorological grid data with the same dimension and the same type on July 1, 2023 and July 7, 2023 in the embodiment of the present invention; Figure 5 In the embodiment of the present invention, the standardized data of the 850hPa temperature field of the weather historical similar cases on July 1 and July 7, 2023 is converted into a grayscale image.

[0024] Figure 6 Structural schematic diagram of the device for visualizing and viewing the similarity of weather historical cases in the embodiment of the present invention. Detailed Embodiment

[0025] The method for calculating the similarity of weather historical cases in this embodiment includes the following steps: Step (1), dividing grid points: Obtain and parse meteorological grid data, and divide the area corresponding to the meteorological grid data into several data grid points; in this embodiment, the meteorological grid data is wind field data (circulation field); the method of dividing the area corresponding to the meteorological grid data into several data grid points is as follows: Step (1-1), determining the spatial resolution, starting longitude, and starting latitude of the meteorological grid data; in this embodiment, the spatial resolution of the meteorological grid data is 1 km, the starting longitude is 0-60N, and the starting latitude is 70-140E; Step (1-2), calculating the four corner longitudes and latitudes of the data grid points to be divided, and dividing the area corresponding to the meteorological grid data into several data grid points according to the calculation results; the calculation method of the four corner longitudes and latitudes of the data grid points Z ij is as follows: Min loni = lon + (i - 1) × r; Max loni = lon + i × r; Min latj = lat + j × r; Max latj = lat + (j - 1) × r; In the formula, Min loni is the minimum longitude of the data grid points Z ij to be divided, Max loni is the maximum longitude of the data grid points Z ij to be divided, Min latj is the minimum latitude of the data grid points Z ij to be divided, Max latj is the maximum latitude of the data Z ij to be divided; i is the row number i of the data grid points Z ij to be divided, j is the column number j of the data grid points Z ij to be divided, r is the spatial resolution of the two-dimensional matrix of the meteorological grid data, lon is the starting longitude of the meteorological grid data, and lat is the starting latitude of the meteorological grid data.

[0026] Step (2), inputting grid points: Input two sets of meteorological grid data with the same dimension and the same type; in this embodiment, the two sets of meteorological grid data with the same dimension and the same type input are the 850 hPa temperature circulation field images on July 1, 2023, and July 7, 2023 (see Figure 4 ); Step (3), standardizing data: Perform standardization processing on the two sets of meteorological grid data, and output the standardized processing data for each set of meteorological grid data according to the divided data grid points; The normalization method is used to standardize the meteorological grid data, and the meteorological grid data is scaled to the range of 0 to 1. The standardization formula is: grid_normalized = (grid-grid.min()) / (grid.max()-grid.min()); In the formula, grid_normalized is the normalized meteorological grid data, grid is the original meteorological grid data, grid.min() is the minimum value in the original meteorological grid data, and grid.max() is the maximum value in the original meteorological grid data.

[0027] Step (4), data calculation: Convert the two sets of standardized data into grayscale images (the generated images after conversion are as Figure 5 shown), and calculate the structural similarity index between the two grayscale images; Use the following formula to convert the standardized data into grayscale images: grid_grayscale = np.unit8(grid_normalized*255); In the formula, grid_grayscale is the grayscale image data matrix or array after conversion of the standardized data; np.uint8() is used to convert the data into 8-bit unsigned integer type, and grid_normalized is the normalized meteorological grid data; The calculation method of the structural similarity index is: ; In the formula, x and y are respectively the pixel matrices or arrays of the two grayscale images, and are respectively the averages of the grayscale images x and the grayscale image y ; is the covariance of the grayscale image x and the grayscale image y , is the variance of the pixel values of the grayscale image x , is the variance of the pixel values of the grayscale image y ; , ; , , and L is the dynamic range of the pixel values.

[0028] Step (5), output result: According to the data calculation result, output the similarity of the two sets of meteorological grid data (as Figure 2 shown), and determine whether the two sets of meteorological grid data are similar cases according to the similarity.

[0029] The similarity between the circulation field images on July 1, 2023 and July 7, 2023 in this embodiment is 0.89, which is greater than 0.8. Therefore, these two historical weather processes are considered similar. Figure 3 This is the visual inspection result for calculating the similarity of weather historical cases in this embodiment. It can be seen from Figure 3 that the severe convective weather processes on July 1, 2023 and July 7, 2023 are similar, indicating that the method for calculating the similarity of weather historical cases in this embodiment has good accuracy in judging the similarity of two historical weather processes.

[0030] Obviously, the above embodiments are only examples clearly described and not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to list all implementation manners here. And the obvious changes or variations derived therefrom are still within the protection scope of the claims of this patent application.

Claims

1. A method for calculating the similarity of weather historical cases, characterized in that, It includes the following steps: Step (1), dividing grid points: Obtain and parse meteorological grid data, and divide the area corresponding to the meteorological grid data into several data grid points; Step (2), inputting grid points: Input two sets of meteorological grid data with the same dimension and the same type; Step (3), standardizing data: According to the data grid points divided in step (1), perform standardization processing on the two sets of meteorological grid data one by one, and each set of meteorological grid data outputs standardized processed data according to the divided data grid points; Step (4), data calculation: Convert the two sets of standardized processed data into grayscale images, and calculate the structural similarity index between the two grayscale images; Step (5), outputting results: According to the data calculation results, output the similarity of the two sets of meteorological grid data, and determine whether the two sets of meteorological grid data are similar cases according to the similarity.

2. The method for calculating the similarity of weather historical cases according to claim 1, wherein In step (1), the meteorological grid data includes height field data, temperature field data, humidity field data and wind field data.

3. The method for calculating the similarity of weather historical cases according to claim 1, wherein In step (1), the method of dividing the area corresponding to the meteorological grid data into several data grid points is as follows: Step (1-1), determining the spatial resolution, starting longitude and starting latitude of the meteorological grid data; Step (1-2), calculating the four corner longitudes and latitudes of the data grid points to be divided, and dividing the area corresponding to the meteorological grid data into several data grid points according to the calculation results.

4. The method for calculating the similarity of weather historical cases according to claim 3, wherein Calculation method for the four boundary longitudes and latitudes of the data grid point Z to be divided ij is as follows: Min loni = lon + (i - 1) × r; Max loni = lon + i × r; Min latj =lat + j × r; Max latj =lat+(j-1)×r; Where, Min loni is the minimum longitude of the data grid point Z ij ; Max loni is the maximum longitude of the data grid point Z ij ; Min latj is the minimum latitude of the data grid point Z ij ; Max latj is the maximum latitude of the data Z ij ; i is the row number of the data grid point Z to be divided, and j is the column number of the data grid point Z to be divided ij ; r is the spatial resolution of the two-dimensional matrix of meteorological grid data, lon is the starting longitude of the meteorological grid data, and lat is the starting latitude of the meteorological grid data ij ​ 5. The method for calculating the similarity of weather historical cases according to claim 1, characterized in that In step (2), the type of the meteorological grid data is a two-dimensional array, including an image or a matrix.

6. The method for calculating the similarity of weather historical cases according to claim 1, wherein In step (3), the normalization method is used to perform standardization processing on the meteorological grid data, and the meteorological grid data is scaled to the range of 0 to 1. The standardization formula is: grid_normalized = (grid-grid.min()) / (grid.max()-grid.min()); In the formula, grid_normalized is the normalized meteorological grid data, grid is the original meteorological grid data, grid.min() is the minimum value in the original meteorological grid data, and grid.max() is the maximum value in the original meteorological grid data.

7. The method for calculating the similarity of weather historical cases according to claim 1, characterized in that In step (4), the following formula is used to convert the standardized processed data into a grayscale image: grid_grayscale = np.unit8(grid_normalized*255); In the formula, grid_grayscale is the grayscale image data matrix or array after the conversion of the standardized processed data; np.uint8() is used to convert the data into an 8-bit unsigned integer type, and grid_normalized is the normalized meteorological grid data.

8. The method for calculating the similarity of weather historical cases according to claim 1, characterized in that In step (4), the calculation method of the structural similarity index is as follows: ; In the formula, x and y are the pixel matrices or arrays of two grayscale images respectively, and are the average values of the grayscale images x and the grayscale image y respectively; is the covariance of the grayscale image x and the grayscale image y ; is the variance of the pixel values of the grayscale image x ; is the variance of the pixel values of the grayscale image y ; , ; , , where L is the dynamic range of the pixel values.

9. The method for calculating the similarity of weather historical cases according to claim 1, characterized in that, In step (5), when the similarity is greater than or equal to 0.8 and less than 1, the weather historical processes represented by the two sets of meteorological grid data are similar.

10. A device for visually viewing the similarity of weather historical cases, characterized in that, It includes the following modules: Weather case query module: Provide functions such as spatio-temporal query and detail query of weather historical cases, and mainly query according to two elements: time and type; Weather case display module: According to the information of the case, display the meteorological data involved in the corresponding case, such as precipitation, temperature and wind, on the page, and display the case data in a visual form on the page to achieve an intuitive representation of the case; Weather case scenario operation module: Perform various basic operations on the case display scenario, including translation, dragging, zooming in, zooming out and centering, to facilitate users to observe and analyze data; Weather case analysis module: Analyze the data displayed in the case, count the meteorological activities during the duration of the case, and provide calculation and analysis data; Weather historical similar case identification and calculation module: According to the data of historical cases, calculate the similarity between different historical cases according to the similarity calculation method for weather historical cases described in claim 1, identify and display the similar cases; The calculation elements of similar cases include height field, temperature and wind, and the calculation is performed with the data averaged over the case process.

Citation Information

Patent Citations

  • Historical similarity weather analysis method

    CN110866630A

  • Convection weather similarity identification method based on CNN image mode

    CN114882263A

  • Rainstorm similar weather retrieval method based on height field

    CN115080803A

  • NRIET weather multisource detecting data fusion analysis system

    CN108416031A

  • Rainstorm similar weather automatic retrieval method

    CN113268627A