A method for calculating similarity of weather history cases and a visual viewing device

By integrating multi-source fused meteorological grid data and calculating the structural similarity index (SSIM), the problem of insufficient accuracy and adaptability in weather similarity recognition in existing technologies is solved, and flexible and accurate weather historical case identification and visual analysis are achieved to support meteorological forecasting and decision-making.

CN120256977BActive Publication Date: 2025-09-05STATE QIXIANG INFORMATION CENT
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing weather similarity recognition technology has shortcomings such as incomplete data utilization, high dependence on specific conditions, one-sided calculation methods, and significant influence from subjective factors and data quality. These shortcomings lead to insufficient accuracy, reliability and adaptability of recognition results, making it difficult to meet the needs of efficient and accurate recognition in diverse scenarios.

Method used

Using multi-source fused meteorological grid data, the similarity of meteorological data is evaluated by dividing the data grid, standardizing the data, and calculating the structural similarity index (SSIM). Combined with a visual viewing device, rapid identification and analysis of historical weather cases can be achieved.

Benefits of technology

It improves the accuracy and efficiency of weather historical case identification, can flexibly identify multiple meteorological elements, adapt to complex weather patterns, and provide scientific meteorological forecasts and decision-making support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256977B_ABST
    Figure CN120256977B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for calculating similarity of weather history cases, the method comprising the following steps: step (1), grid point division: obtaining and parsing weather grid point data, and dividing the area corresponding to the weather grid point data into a plurality of data grid points; step (2), grid point input: inputting two groups of weather grid point data with the same dimension and the same type; step (3), data standardization: performing standardization processing on the two groups of weather grid point data, and outputting standardized processing data for each group of weather 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 the structural similarity index between the two grayscale images; step (5), outputting results: outputting the similarity of the two groups of weather grid point data according to the data calculation results. The method of the present invention can effectively improve the accuracy and efficiency of weather history case recognition.
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 history case similarity analysis, and more particularly to a weather history case similarity calculation method and a visual viewing device. Background Art

[0002] Traditional weather historical case identification relies primarily on forecasters or analysts manually judging weather data based on their experience and ultimately determining whether a forecast is a similar case. This approach offers accurate and detailed analysis, but it is labor-intensive and time-consuming, with long judgment cycles, high costs, and significant personal influence. This makes it difficult to meet the needs of large-scale analysis and analysis of large quantities of historical cases.

[0003] Chinese patent CN 118708983 A discloses a historical weather similarity analysis method based on a dynamic time warping method. This method first converts historical meteorological station data into a time series of precipitation events at a single station. A dynamic time warping algorithm is then used to align and match precipitation events at different stations, generating a similarity measure between different historical weather patterns. Finally, the dynamic time warping method and the similarity measure are combined to establish a similarity analysis model. This similarity analysis of historical precipitation data identifies similar precipitation patterns and patterns. This method has the following drawbacks: The analysis is based on precipitation factors, considering only precipitation-related indicators such as precipitation amount, duration, and interval, while ignoring other important meteorological factors such as temperature, wind speed, direction, and air pressure. However, actual weather conditions are shaped by the interaction of multiple meteorological factors, and precipitation data alone may not fully and accurately reflect the similarity of historical weather patterns. Furthermore, this method relies on historical meteorological station data, which can be unevenly distributed, with some areas having dense stations and others having sparse stations. This can lead to inaccurate characterization of weather patterns in areas with few stations during the analysis process, affecting the accuracy of the overall similarity analysis. Furthermore, the station data itself may contain errors and missing values. Although the patent mentions interpolation for missing values, the interpolation method may also introduce certain errors.

[0004] Chinese patent CN 114882263 A discloses a convective weather similarity identification method based on CNN image patterns. The method preprocesses the acquired convective weather images, extracts the convective weather image model using the VGG16 convolutional neural network, obtains convective weather image features, performs unsupervised clustering on the weather image features, determines the optimal number of clusters, and verifies the identified scenes using visualization methods and actual operational data to determine the characteristics of the identified scenes. This method has the following drawbacks: It relies solely on a single data source, relying solely on specific convective weather image data and ignoring other meteorological data sources such as radar data and numerical forecast products. Different types of data may contain complementary information, and using only image data may result in incomplete information, affecting the accurate identification of convective weather similarities. Secondly, data annotation presents difficulties. Although this method utilizes unsupervised clustering, in actual applications, data annotation may be required to evaluate model performance or for visualization. Annotating convective weather images requires specialized meteorological knowledge and experience, and the annotation process can be subjective and inconsistent, impacting the accuracy and reliability of the model.

[0005] Chinese patent CN 110866630 A discloses a historical similarity weather analysis method. This method obtains historical and current live data, calculates the comprehensive similarity coefficients of each layer using similarity coefficients and Mahalanobis distances, and then assigns weights to the comprehensive similarity coefficients of each layer before calculating the degree of similarity. This method has the following drawbacks: the similarity analysis model established by this method may be effective for specific weather types or regions, but its adaptability may be limited in other situations. Weather characteristics and climatic conditions vary significantly across regions, and a fixed model may not be well adapted to various complex situations. For example, for special geographical areas such as plateaus, coastal areas, or polar regions, the method may require targeted adjustments and improvements for accurate application.

[0006] Chinese patent CN 113268627 A discloses an automatic retrieval method for similar rainstorm weather. The method converts the air pressure data for the forecasted area into a grayscale image Gp, which serves as the forecasted image. The method also converts historical air pressure data from M rainfall events into M historical images. By comparing the images, the similarity between the forecasted image and the M historical images is calculated (the similarity is expressed by calculating the Hamming distance between the hash value Hp of the forecasted image and the hash value of each historical image). The M historical images are then sorted in descending order of similarity to obtain the air pressure comparison results for the forecasted area. This method has the following drawbacks: rainstorms are often influenced by a combination of factors, resulting in complex weather conditions. This method, which simply searches based on the similarity of air pressure images, may not accurately address the complex and ever-changing nature of actual weather conditions. For example, even if the air pressure images are similar, the formation mechanisms and characteristics of rainstorms may differ across different seasons, geographic locations, and climates. 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 method for retrieving similar rainstorm weather based on height fields. The method first obtains grid data for the current real-time weather, including multiple records. Each record includes a one-to-one correspondence between longitude, latitude, height field data, and flow field vectors. The grid data for the current real-time weather is then extracted and segmented to obtain multiple low-pressure vortices associated with the current real-time weather. The similarities between the multiple low-pressure vortices associated with the current real-time weather and the low-pressure vortices associated with each historical weather event are then calculated to obtain the similarities between the multiple historical weather events. The multiple historical weather events are then sorted based on the similarities, and the sorted results are used to represent the search results for similar rainstorm weather. This method determines similar rainstorm weather based solely on the similarities between the low-pressure vortices associated with the current real-time weather and those associated with the historical weather events, making it a relatively one-sided calculation method. Low-pressure vortices are only one factor in the formation of rainstorms; other factors, such as water vapor transport and vertical upward motion, also play a key role in the occurrence and development of rainstorms. Ignoring these factors may result in the retrieved similar weather events not actually being similar rainstorm weather events.

[0008] In summary, existing similar weather recognition technologies suffer from shortcomings such as incomplete data utilization, high dependence on specific conditions, one-sided calculation methods, and significant influence from subjective factors and data quality. These shortcomings result in insufficient accuracy, reliability, and adaptability of the recognition results, making it difficult to efficiently and accurately meet the needs of similar weather recognition in diverse scenarios. Therefore, it is necessary to integrate multi-source meteorological data and develop more universal and comprehensive similar weather recognition models. On the one hand, multiple meteorological factors such as temperature, humidity, air pressure, wind speed and direction should be incorporated into the analysis system, and advanced data fusion techniques should be used to explore the synergistic relationships between these factors to comprehensively reflect weather conditions. On the other hand, more intelligent and adaptive algorithms should be adopted to overcome the problems of traditional algorithms such as sensitivity to local features and neglect of overall semantics, thereby improving the model's ability to understand and recognize 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 current meteorological events can be quickly found to provide a reference for meteorological forecasting and decision-making, and can also provide auxiliary reference when a large number of similar weather historical cases need to be identified.

[0010] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0011] A method for calculating similarity of weather history cases includes the following steps:

[0012] Step (1), grid point division: obtaining and parsing meteorological grid point data, and dividing the area to which the meteorological grid point data corresponds into a number of data grid points; the meteorological grid point data used in the present invention is national meteorological grid point data that has been fused from multiple sources, and there are regional factors in weather history cases. Grid point division can tailor the range of meteorological grid point data according to the region, so that the subsequent comparative analysis of weather history cases is more targeted, and when calculating similarity, it is beneficial to control the occurrence range of two weather cases to be consistent, so that the calculation results are more representative;

[0013] Step (2), input grid points: input two sets of meteorological grid point data with the same dimension and the same type;

[0014] Step (3), standardizing data: according to the data grid points divided in step (1), the two groups of meteorological grid point data are standardized one by one, and each group of meteorological grid point data outputs standardized processed data according to the divided data grid points;

[0015] Step (4), data calculation: convert the two sets of standardized processed data into grayscale images, and calculate the structural similarity index (SSIM) between the two grayscale images; by calculating the structural similarity index between the grayscale images, the structural similarity index between the two sets of meteorological grid data is obtained; SSIM is an indicator used to measure the similarity between two images (or data grids), which is usually used for image quality assessment. Its value ranges from -1 to 1, and the closer the value is to 1, the more similar the two images are;

[0016] Step (5), output result: Based on the data calculation result, output the similarity of the two sets of meteorological grid point data, and determine whether the two sets of meteorological grid point data are similar cases based on the similarity.

[0017] The present invention is a method for calculating the similarity of individual weather history cases. Based on nationwide meteorological grid data obtained through multi-source fusion, the method divides the meteorological grid data into several data grid points, facilitating the range tailoring of the meteorological grid point data by region. This makes the comparative analysis of individual weather history cases more targeted, thereby effectively improving the accuracy and efficiency of weather history case identification. Furthermore, the method of the present invention can identify individual weather history cases using any one of the meteorological grid data types—temperature, humidity, air pressure, wind speed, and wind direction—making it more flexible than existing weather identification methods.

[0018] In the above-mentioned weather history case similarity calculation method, in step (1), the meteorological grid data includes height field data, temperature field data, humidity field data and wind field data.

[0019] In the above-mentioned method for calculating similarity of weather history cases, in step (1), the method for dividing the area corresponding to the meteorological grid data into a number of data grids is:

[0020] Step (1-1), determine the spatial resolution, starting longitude and starting latitude of the meteorological grid data; spatial resolution is the actual spatial range represented by a single pixel (or pixel) in a two-dimensional matrix, reflecting the image's ability to depict details. Since meteorological grid data is the average calculation result of data within a certain range, the impact of its accuracy on the result needs to be considered when using spatial resolution as the basis for calculation; the higher the accuracy of the data used in the calculation, the smaller the impact on the result. Some data will be interpolated during the transition period; in meteorological business, high-resolution meteorological live grid data is mainly 1km×1km, but there are also data with larger spatial resolution, such as 5km×5km, 6.25km×6.25km, etc. For these data with larger spatial resolution, bilinear interpolation is used for interpolation calculation;

[0021] Step (1-2): Calculate the longitude and latitude of the data grid points to be divided, and divide the area corresponding to the meteorological grid data into a number of data grid points based on the calculation results.

[0022] The above-mentioned weather history case similarity calculation method is to divide the data grid Z ij The calculation method of the four-point longitude and latitude is:

[0023] Min loni =lon+(i-1)×r;Max loni =lon+i×r;Min latj =lat+j×r;Max latj =lat+(j-1)×r;

[0024] Where, Min loni The data grid Z to be divided ij The minimum longitude, Max loni The data grid Z to be divided ij The maximum longitude, Min latj The data grid Z to be divided ij The minimum latitude, Max latj is the data to be divided Z ij The maximum latitude; i is the data grid point Z to be divided ij The row number i, j is the data grid Z to be divided ij The number of columns j, 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.

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

[0026] In the above-mentioned weather history case similarity calculation method, 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 normalization formula is:

[0027] grid_normalized = (grid-grid.min()) / (grid.max()-grid.min());

[0028] In the formula, grid_normalized is the normalized meteorological grid data; grid is the original meteorological grid data, which usually represents the value of a certain meteorological field (such as height field, temperature field, etc.); grid.min() is the minimum value in the original meteorological grid data, which represents the minimum value in the data matrix. Through grid.min(), you can find the lowest point or minimum value in the data; grid.max() is the maximum value in the original meteorological grid data, which represents the maximum value in the data matrix. Through grid.max(), you can find the highest point or maximum value in the data.

[0029] In the above formula, grid-grid.min() subtracts the grid's minimum value from each value in the grid; this is done to map the minimum value of the data to 0, ensuring that all data are non-negative. grid.max() - grid.min() represents the data range, representing the difference between the maximum and minimum values. This difference is used to scale the data to between 0 and 1. This formula subtracts the minimum value from each data point and then divides it by the data range; the result is that all data is scaled to between 0 and 1, making the data uniform and facilitating subsequent comparisons or calculations. Normalized data ranges from 0 to 1, facilitating subsequent image processing or similarity calculations. This method normalizes the pixel values ​​of meteorological data to [0, 1], facilitating neural network training. Normalizing a three-channel RGB (each channel pixel value ranges from 0 to 255) color meteorological grid data image to between 0 and 1 allows Python-based calculations to be performed.

[0030] In the above-mentioned weather history case similarity calculation method, in step (4), the normalized data is converted into a grayscale image, and the intensity of each pixel is represented by an integer value from 0 to 255. This is achieved by multiplying the normalized data by 255 and converting it to an unsigned 8-bit integer. The formula for converting the normalized data into a grayscale image is:

[0031] grid_grayscale = np.unit8(grid_normalized*255);

[0032] In the formula, grid_grayscale is the matrix or array of grayscale image data after normalization. The data range is between 0 and 255 and can be used directly to generate grayscale images. grid_normalized * 255 multiplies the normalized data (ranging between 0 and 1) by 255. This is done to map the data from the range of 0 to 1 to the range of 0 to 255, as the pixel values ​​of grayscale images are typically integers between 0 and 255. np.uint8() is a function in the NumPy library that converts data to an 8-bit unsigned integer type. 8-bit unsigned integers range from 0 to 255, which corresponds exactly to the pixel value range of grayscale images. np.uint8() can be used to convert floating-point numbers (such as the result of grid_normalized * 255) to integers to generate grayscale images. grid_normalized is the normalized meteorological grid data, ranging from 0 to 1.

[0033] In the above weather history case similarity calculation method, in step (4), the structural similarity index (SSIM) of two grayscale images is calculated using the SSIM function. The function returns a value between -1 and 1, indicating the structural similarity of the two images. The calculation formula of the structural similarity index is:

[0034] ;

[0035] Where, x and y are pixel matrices or arrays of two grayscale images, representing the two images to be compared, which can be a grayscale image or a channel of a color image. In the present invention, it is a grayscale image array; and Grayscale images x and grayscale images y The average value of pixels; Is a grayscale image x and grayscale images y The covariance of (covariance reflects the structural similarity of the two images, that is, the consistency of the pixel value changes of the two images), For grayscale images x The pixel value variance, For grayscale images y The pixel value variance reflects the contrast information of the image;

[0036] and These are two constants used to avoid the denominator being zero, and they are usually smaller. , ; and is a constant, usually taken as , , L is the dynamic range of pixel values ​​(such as 255). This formula calculates the similarity of 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 brightness, contrast and structure. The present invention uses SSIM to evaluate the similarity of two meteorological grid data maps, which has the following advantages: it takes into account brightness, contrast and structural information at the same time, which is more consistent with human visual perception; high robustness: it has strong robustness to noise and distortion; computational efficiency: it has low computational complexity and is 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, the following are the advantages: Accuracy: SSIM is superior to MSE and PSNR in accuracy and is more consistent with human visual perception. Adaptability: SSIM has good adaptability to noise and distortion, and MI performs better when dealing with nonlinear relationships, but the calculation is complex. Computational speed: SSIM has a faster calculation speed and is suitable for real-time applications, while MI is slower. Therefore, using SSIM to evaluate the similarity between two meteorological grid data maps is both efficient and accurate.

[0037] In the above-mentioned method for calculating the similarity of weather history cases, in step (5), the output result will be expressed 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 history similarity cases. When the value exceeds a certain value, the two weather history processes can be considered similar. When the similarity is greater than or equal to 0.8 and less than 1, the weather history processes represented by the two sets of meteorological grid data are similar.

[0038] A device for visualizing the similarity of weather history cases, comprising the following modules:

[0039] Weather Case Query Module: Provides functions such as spatiotemporal query and detail query of historical weather cases, mainly based on two factors: time and type;

[0040] Weather case display module: Based on the information of individual cases, the meteorological data related to the corresponding cases, such as precipitation, temperature, wind and other data, are displayed on the page in a visual form to achieve an intuitive expression of the individual case situation and impact effects;

[0041] Weather case scene operation module: Perform 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;

[0042] Weather case analysis module: Analyzes the data displayed by the case, counts the meteorological activities during the duration of the case, such as cumulative precipitation, and provides analytical data such as calculation results;

[0043] The module for identifying and calculating historically similar weather cases implements the aforementioned method for calculating historical weather case similarity. Based on historical case data, the module uses an algorithm to calculate similarities between different historical cases, identifies and displays similar cases, and provides data support for statistical analysis and other tasks. The calculation elements for similar cases primarily include altitude, temperature, and wind, using case-averaged data.

[0044] The technical solution of the present invention achieves the following beneficial technical effects:

[0045] This method for calculating the similarity of historical weather cases involves obtaining multiple meteorological grid data, including altitude, temperature, humidity, and wind fields, from two current historical weather processes. The data is then preprocessed and feature extracted. The data is then normalized using one or more of these average processes and fed into an algorithmic model. The structural similarity (SSIM) algorithm is used to calculate the similarity between the two images, and the similarity between the two cases is then calculated. The similarity is then sorted based on the similarity, selecting the most similar historical cases. Finally, the results for the similar cases are output. This method can effectively improve the accuracy and efficiency of historical weather case identification, providing a scientific basis for weather forecasting and decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a flow chart of a method for calculating similarity of weather history cases in an embodiment of the present invention;

[0047] Figure 2 Similarity output result of weather history case similarity calculation in the embodiment of the present invention;

[0048] Figure 3 Visual viewing results of weather history case similarity calculation in an embodiment of the present invention;

[0049] Figure 4 In an embodiment of the present invention, two sets of meteorological grid data of the same dimension and type are provided: 850hPa temperature circulation field images on July 1, 2023 and July 7, 2023;

[0050] Figure 5 In the embodiment of the present invention, the standardized data of the 850hPa temperature field on July 1 and July 7, 2023, which are similar weather history cases, are converted into grayscale images.

[0051] Figure 6A schematic diagram of the structure of a device for visualizing similarity of weather history cases in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The method for calculating similarity of weather history cases in this embodiment includes the following steps:

[0053] Step (1), grid point division: obtain and analyze meteorological grid point data, and divide the area corresponding to the meteorological grid point data into a plurality of data grid points; in this embodiment, the meteorological grid point data is wind field data (circulation field); the method for dividing the area corresponding to the meteorological grid point data into a plurality of data grid points is:

[0054] Step (1-1), determine 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;

[0055] Step (1-2), calculate the longitude and latitude of the data grid to be divided, and divide the area corresponding to the meteorological grid data into several data grids according to the calculation results; the data grid Z to be divided ij The calculation method of the four longitude and latitude is: Min loni =lon+(i-1)×r;Max loni =lon+i×r;Min latj =lat+j×r;Max latj =lat+(j-1)×r;

[0056] Where, Min loni The data grid Z to be divided ij The minimum longitude, Max loni The data grid Z to be divided ij The maximum longitude, Min latj The data grid Z to be divided ij The minimum latitude, Max latj is the data to be divided Z ij The maximum latitude; i is the data grid point Z to be divided ij The row number i, j is the data grid Z to be divided ij The number of columns j, 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.

[0057] Step (2), input grid points: input two sets of meteorological grid point data with the same dimension and type; in this embodiment, the two sets of meteorological grid point data with the same dimension and type are the 850hPa temperature circulation field images on July 1, 2023 and July 7, 2023 (see Figure 4 );

[0058] Step (3), standardize the data: standardize the two groups of meteorological grid data, and output the standardized data of each group of meteorological grid data according to the divided data grids; standardize the meteorological grid data using the normalization method, and scale the meteorological grid data to the range of 0 to 1. The standardization formula is:

[0059] grid_normalized = (grid-grid.min()) / (grid.max()-grid.min());

[0060] Where 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.

[0061] Step (4), data calculation: convert the two sets of standardized data into grayscale images (the images generated after conversion are as follows Figure 5 As shown in the figure), the structural similarity index between the two grayscale images is calculated; the standardized processed data is converted into a grayscale image using the following formula:

[0062] grid_grayscale = np.unit8(grid_normalized*255);

[0063] Where grid_grayscale is the grayscale image data matrix or array after the standardized data conversion; np.uint8() is used to convert the data to an 8-bit unsigned integer type, and grid_normalized is the normalized meteorological grid data;

[0064] The calculation method of the structural similarity index is:

[0065] ;

[0066] Where, x and y are the pixel matrices or arrays of two grayscale images, and Grayscale images x and grayscale images y The average value of Is a grayscale image x and grayscale images y The covariance of For grayscale images x The pixel value variance, For grayscale imagesy The pixel value variance of , ; , , L is the dynamic range of pixel values.

[0067] Step (5), output results: Based on the data calculation results, output the similarity of the two sets of meteorological grid data (such as Figure 2 ), and determine whether the two sets of meteorological grid data are similar cases based on the similarity.

[0068] In this embodiment, the similarity of the circulation field images on July 1, 2023 and July 7, 2023 is 0.89, which is greater than 0.8, so it is considered that the two historical weather processes are similar. Figure 3 This is the visualization result of the weather history case similarity calculation in this embodiment, Figure 3 It can be seen that the two severe convective weather processes on July 1, 2023 and July 7, 2023 are similar, indicating that the similarity calculation method for weather history cases in this embodiment is accurate in judging the similarity between two historical weather processes.

[0069] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the claims of this patent application.

Claims

1. A method for calculating similarity of weather history cases, characterized in that: The steps include: Step (1), grid division: obtain and analyze meteorological grid data, and divide the area corresponding to the meteorological grid data into a number of data grids; the meteorological grid data includes height field data, temperature field data, humidity field data and wind field data; Step (2), input grid points: input two sets of meteorological grid point data with the same dimension and type; Step (3), standardizing data: according to the data grid points divided in step (1), the two groups of meteorological grid point data are standardized one by one, and each group of meteorological grid point data outputs standardized processed data according to the divided data grid points; In step (3), the normalization method is used to normalize the meteorological grid data, and the meteorological grid data is scaled to the range of 0 to 1. The normalization formula is: grid_normalized = (grid-grid.min()) / (grid.max()-grid.min()); Where 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. 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; In step (4), the normalized data is converted into a grayscale image using the following formula: grid_grayscale = np.unit8(grid_normalized*255); Where grid_grayscale is the grayscale image data matrix or array after the standardized data conversion; np.uint8() is used to convert the data to an 8-bit unsigned integer type, and grid_normalized is the normalized meteorological grid data; The calculation method of the structural similarity index is: ; Where, x and y are the pixel matrices or arrays of two grayscale images, and Grayscale images x and grayscale images y The average value of Is a grayscale image x and grayscale images y The covariance of For grayscale images x The pixel value variance, For grayscale images y The pixel value variance of , ; , , L is the dynamic range of pixel values; Step (5), output result: Based on the data calculation result, output the similarity of the two sets of meteorological grid point data, and determine whether the two sets of meteorological grid point data are similar cases based on the similarity; 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 point data are similar.

2. The weather history case similarity calculation method according to claim 1, characterized in that: In step (1), the method for dividing the area corresponding to the meteorological grid data into a number of data grid points is: Step (1-1), determine the spatial resolution, starting longitude and starting latitude of the meteorological grid data; Step (1-2): Calculate the longitude and latitude of the data grid points to be divided, and divide the area corresponding to the meteorological grid data into a number of data grid points based on the calculation results.

3. The weather history case similarity calculation method according to claim 2, characterized in that: Data grid Z to be divided ij The calculation method of the four-point longitude and latitude is: My loni =lon+(i-1)×r; Max loni =lon+i×r; Min latj =lat+j×r; Max latj =lat+(j-1)×r; Where, Min loni The data grid Z to be divided ij The minimum longitude, Max loni The data grid Z to be divided ij The maximum longitude, Min latj The data grid Z to be divided ij The minimum latitude, Max latj is the data to be divided Z ij The maximum latitude of i is the data grid point Z to be divided ij The row number i, j is the data grid Z to be divided ij The number of columns j, 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.

4. The weather history case similarity calculation method according to claim 1, characterized in that: In step (2), the type of meteorological grid data is a two-dimensional array, including an image or a matrix.

5. A device for visualizing the similarity of weather history cases, characterized in that: Includes the following modules: Weather Case Query Module: Provides spatiotemporal query and detail query functions for historical weather cases, mainly based on two factors: time and type; Weather case display module: Based on the information of individual cases, the meteorological data related to the corresponding case, including precipitation, temperature and wind, is displayed on the page in a visual form to achieve intuitive presentation of the individual case; Weather case scene operation module: Perform various basic operations on the case display scene, including panning, dragging, zooming in, zooming out, and centering, making it easier for users to observe and analyze data; Weather case analysis module: analyzes the data displayed by the case, counts the meteorological activities during the duration of the case, and provides calculation and analysis data; Weather history similar case identification and calculation module: Based on the data of historical cases, the similarity between different historical cases is calculated according to the weather historical case similarity calculation method as described in claim 1, and similar cases are identified and displayed; the calculation elements of similar cases include height field, temperature and wind, and the calculation is performed based on the data after the case process is averaged.

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

  • Historical weather similarity analysis method based on dynamic time warping method

    CN118708983A

  • NRIET weather multisource detecting data fusion analysis system

    CN108416031A