Weather map feature type recognition and similarity matching system and method
By designing a weather map feature type recognition and similarity matching system, using artificial intelligence technology and microservice architecture, the problem of insufficient automation of the automation monitoring station is solved, and fast and accurate weather map recognition and matching is achieved, reducing human participation is reduced, and supporting Measures for air pollution prevention and control.
Patent Information
- Application Number
- CN202210016445.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-07
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-01-07
AI Technical Summary
The existing automated atmospheric environment monitoring stations are not very automated and cannot achieve unmanned monitoring 24 hours a day, resulting in the inability to achieve full automation and continuous monitoring, especially when there are bad weather or when there are many image data, it is necessary to process manually and cannot deal with it by itself.
A weather map feature type recognition and similarity matching system was designed, including weather map upload module, identification module, similarity matching module and result display module. Using microservice architecture and artificial intelligence technology, weather is used to deal with the weather through the TensorFlow model and OpenCv algorithm. The graphs are identified and matched, reducing human participation, and achieving fast and accurate weather type identification and matching.
It realizes the rapid and accurate identification and matching of weather map types in the atmosphere-related systems, provides weather type information and matching scores, reduces human identification work, supports air pollution prevention, control and emission reduction measures, and has high scalability and flexible micro-service calling capabilities.
Smart Images

Figure CN114359696B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a weather map feature type recognition and similarity matching system and method. Background Art
[0002] Atmospheric environment monitoring is an arduous and complex task that requires 24-hour continuous and close monitoring. Existing automated monitoring stations often require manual monitoring due to their low degree of automation. They can only detect and identify weather types based on collected images within a short period of time. If they encounter unexpected situations, such as bad weather or a large amount of image data, they cannot respond on their own and need manual processing. This makes it impossible to conduct fully automated continuous monitoring.
[0003] In view of the current situation of the atmospheric environment industry, how to use big data and artificial intelligence technology to identify weather types through images and match them with historical cases at the time, so as to call historical cases and adjust parameters for pollution prevention and control is an urgent problem that needs to be solved. Summary of the invention
[0004] In response to the above-mentioned deficiencies, the purpose of the embodiments of the present invention is to provide a system and method specifically suitable for weather map feature type identification and similarity matching, which will facilitate atmosphere-related systems to quickly and accurately identify and match weather types on weather maps, obtain corresponding weather map weather type information and matching scores, and provide reference for atmospheric pollution prevention and emission reduction measures; this system and method can be flexibly called by related business systems, greatly reducing the heavy work brought about by human participation in weather map identification.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, in an embodiment provided by the present invention, a weather map feature type recognition and similarity matching system is provided, the system comprising:
[0007] Weather map upload module, used to upload imported current weather maps and historical weather maps;
[0008] The weather map recognition module is used to identify the type of the uploaded current weather map and obtain the weather type recognition result corresponding to the weather map;
[0009] A similarity matching module is used to perform similarity matching between the identified current weather map and the historical weather map to obtain the optimal solution weather map after matching; and
[0010] The result display module is used to output the weather map weather type recognition results and the optimal solution weather map with the highest historical matching similarity.
[0011] The weather map feature type recognition and similarity matching system of the present invention facilitates the atmosphere-related systems to quickly and accurately recognize and match the weather types of weather maps, obtain the corresponding weather map weather type information and matching scores, and provide reference for air pollution prevention and emission reduction measures; the present invention can be flexibly called by related business systems, greatly reducing the heavy work brought about by human participation in weather map recognition.
[0012] In some embodiments provided by the present invention, the weather map feature type identification and similarity matching system also includes a microservice module, which is separately connected to the weather map upload module, weather map identification module, similarity matching module and result display module through an interface.
[0013] The weather map feature type recognition and similarity matching system of the present invention uses the architecture of the microservice module to manage related interfaces. The modules connected to each interface of the microservice module exist independently and can be deployed separately, without having to go through a full service release every time a certain function is released; following the single function principle, the modules connected to the microservice module interface can be called through RESTFUL or RPC, and the functions are decoupled; with "fine-grained" high scalability, each module connected to the interface can be expanded and load balanced separately; microservices can be flexibly called by related business systems to meet the functional requirements of the business systems.
[0014] In some embodiments provided by the present invention, the weather map feature type identification and similarity matching system is also connected to the atmospheric forecast and warning system through a microservice module, and the atmospheric forecast and warning system includes an atmospheric pollution prevention and control module and a case library; the atmospheric pollution prevention and control module is used to receive the current pollution weather map uploaded by the microservice module, and return the current weather type to the microservice module after identifying and processing the current pollution weather map. The case library is used to upload the corresponding weather map in the case to the microservice module. After the microservice module performs similarity matching, it returns the weather map with the highest similarity to the atmospheric pollution prevention and control module, and the atmospheric pollution prevention and control module generates a big data case library by forming the results data into typical cases.
[0015] In some embodiments provided by the present invention, the weather map recognition module is used to identify weather pictures of two different pressures, 500hpa and surface_pres. The 500hpa pressure is used to identify westerly airflows, high-altitude ridges and subtropical high weather in weather pictures, and the surface_pres pressure is used to identify high pressure, average pressure and typhoon weather in weather pictures.
[0016] In some embodiments provided by the present invention, the similarity matching module is used to match the most similar picture between the current weather type weather map and the historical weather map, and the matching rule of the similarity matching module is to judge the overall similarity of the picture from the picture weather type, picture visual similarity, air pressure size and distribution, temperature size and distribution, wind direction and distribution, and rainfall size and distribution.
[0017] In some embodiments provided by the present invention, the weather map feature type recognition and similarity matching system also includes a model training module, which is used to input the meteorological image into the TensorFlow model for training to generate a meteorological model, and use the TensorFlow meteorological model to identify the weather type in the meteorological image.
[0018] In some embodiments provided by the present invention, the weather map feature type recognition and similarity matching system further includes an AI module, and the AI module includes:
[0019] An image processing and computer vision processing unit, wherein the image processing and computer vision processing unit uses an OpenCV algorithm to process weather images; and
[0020] The optical character recognition unit is an OCR image recognition based on Tesseract, which is used to recognize image files in various formats and convert them into text.
[0021] In some embodiments provided by the present invention, the weather map feature type recognition and similarity matching system further includes: a data storage service module for storing and managing weather pictures.
[0022] In a second aspect, in an embodiment provided by the present invention, a method for identifying weather map feature types and similarity matching is provided, comprising the following steps:
[0023] Obtain an uploaded weather picture dataset, wherein the weather picture dataset includes a current weather picture dataset and a historical weather picture dataset;
[0024] Traversing all the pictures in the weather picture data set, classifying the pictures in the weather picture data set, processing the pictures of different categories after classification separately, and obtaining the weather type recognition result corresponding to the weather map;
[0025] Traverse the historical weather map data set, perform similarity matching on the current weather map, and obtain the optimal solution weather map with the highest historical matching similarity to the current weather map;
[0026] Output the weather map weather type recognition result and the optimal solution weather map with the highest similarity to the historical matching.
[0027] In some embodiments provided by the present invention, before obtaining the uploaded weather picture dataset, the method further includes:
[0028] Get weather picture upload request;
[0029] Responding to the weather picture upload request, and receiving data compressed files of the current weather map and the historical weather map;
[0030] Decompress the compressed files of historical pollution event weather maps and current pollution event weather maps in the uploaded current weather maps and historical weather map data;
[0031] The decompressed weather map is distributed through the Gateway and matched with the routing to the corresponding image recognition service module for recognition and processing to identify the corresponding weather type.
[0032] In some embodiments provided by the present invention, when classifying the pictures in the weather picture dataset, it also includes: judging the type of weather pictures in the weather picture dataset; the types of weather pictures include 500hpa and surface_pres, copying the classified weather pictures to the folders of the corresponding types, and performing different color extractions to obtain new pictures.
[0033] In some embodiments provided by the present invention, a new image of the 500hpa type is processed by an OpenCv training model to extract feature information in the new image, wherein the feature information includes one or more of the curve angle profile, wind direction angle, air pressure size and similarity in the new image; a new image of the surface_pres type is identified as a typhoon type by a pre-trained TensorFlow weather model.
[0034] In a third aspect, in an embodiment provided by the present invention, a method for identifying weather map feature types and similarity matching is provided, comprising the following steps:
[0035] Get the front-end weather picture upload request, and distribute the matching routing information to the corresponding image recognition service module for processing through the Gateway;
[0036] The weather pictures are classified into 500hpa and surface_pres and processed separately, and the colors in each classified weather picture are extracted to generate new pictures;
[0037] The 500hpa image is processed by the OpenCV algorithm to extract the curve angle contour, wind direction angle, air pressure size and similarity information in the image and save it to the feature text data; the surface_pres image is identified as the typhoon type by the TensorFlow meteorological model and saved in the type text data;
[0038] Get the text data of the two types of pictures, 500hpa and surface_pres, to determine the picture type, calculate the score and sort it based on the data, and return the final result to the browser to display the result data.
[0039] The technical solution provided by the present invention has the following beneficial effects:
[0040] 1. The present invention facilitates the atmosphere-related systems to quickly and accurately identify and match the weather types on the weather map, obtain the corresponding weather type information on the weather map and the matching score, and provide a reference for air pollution prevention and emission reduction measures; the present invention can be flexibly called by the relevant business systems, greatly reducing the heavy work brought about by human participation in weather map identification.
[0041] 2. The weather map feature type recognition and similarity matching system of the present invention uses the architecture of the microservice module to manage related interfaces. The modules connected to each interface of the microservice module exist independently and can be deployed separately. There is no need to go through a full service release every time a certain function is released. Following the single function principle, the modules connected to the microservice module interface can be called through RESTFUL or RPC, and the functions are decoupled; with "fine-grained" high scalability, each module connected to the interface can be expanded and load balanced separately; microservices can be flexibly called by related business systems to meet the functional requirements of the business system.
[0042] 3. The present invention automatically identifies cases of severe air pollution and major weather events and their key characteristics through pollution prevention and control image recognition technology, uses artificial intelligence technologies such as intelligent image recognition to match the similarity of historical pollution events, and analyzes the pollution process and elements of the current pollution process and historical cases to achieve rapid retrieval of emission reduction measures. Thus, the optimal control technology solution and engineering measures are obtained according to the actual emission reduction situation to achieve the regional atmospheric environment quality control goals.
[0043] These and other aspects of the present invention will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following briefly introduces the drawings required for use in the exemplary embodiments or related technical descriptions. The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0045] Figure 1A schematic diagram of the overall framework of a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0046] Figure 2 A system functional module diagram of a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0047] Figure 3 A schematic diagram of a weather map upload interface in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0048] Figure 4 A schematic diagram of an identification operation interface in a weather map feature type identification and similarity matching system provided in an embodiment of the present invention.
[0049] Figure 5 A schematic diagram of the current weather map recognition result in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0050] Figure 6 A schematic diagram of historical weather map recognition results in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0051] Figure 7 Another schematic diagram of historical weather map recognition results in a weather map feature type recognition and similarity matching system provided by an embodiment of the present invention.
[0052] Figure 8 A logical architecture diagram of a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0053] Fig. 9 A schematic diagram of westerly airflow weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0054] Fig.10 A schematic diagram of a weather vane for extracting westerly airflow weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0055] Fig.11 A schematic diagram of westerly airflow weather vane wind direction in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0056] Fig.12 A schematic diagram of high altitude ridge weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0057] Fig.13 A schematic diagram of isobars extracted from a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0058] Fig.14 A schematic diagram of isobaric directions in a weather map feature type recognition and similarity matching system provided by an embodiment of the present invention.
[0059] Fig.15 A schematic diagram of subtropical high weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0060] Fig.16 A schematic diagram of typhoon weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0061] Fig.17 A schematic diagram of typhoon weather identified in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0062] Fig.18 A schematic diagram of high pressure weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0063] Fig.19 A schematic diagram of average pressure weather in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0064] Fig. 20 A schematic diagram of a similarity matching process in a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention.
[0065] Fig.21 A flow chart of a method for identifying weather map feature types and similarity matching provided by an embodiment of the present invention.
[0066] Fig. 22 A data processing flow chart of a weather map feature type recognition and similarity matching system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0068] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0069] The following will be combined with the drawings in the exemplary embodiments of the present invention to clearly and completely describe the technical solutions in the exemplary embodiments of the present invention. Obviously, the exemplary embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0070] In view of the current situation of the atmospheric environment industry, how to use big data and artificial intelligence technology to identify weather types through images and match them with historical cases at that time, so as to call historical cases and adjust parameters for pollution prevention and control, is an urgent problem to be solved.
[0071] To solve the above problems, an embodiment of the present invention provides a system and method specifically for weather map weather type identification and similarity matching, which facilitates the atmosphere-related system to quickly and accurately identify and match the weather types on the weather map, obtain the corresponding weather map weather type information and matching score, and provide reference for air pollution prevention and emission reduction measures; this general component can be flexibly called by related business systems, greatly reducing the heavy work brought about by human participation in weather map identification.
[0072] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0073] See also Figure 1 As shown, Figure 1 A schematic diagram of the overall framework of a weather map feature type recognition and similarity matching system provided by the present invention. An embodiment of the present invention provides a weather map feature type recognition and similarity matching system, which mainly includes a microservice module, and a weather map upload module, a weather map recognition module, a similarity matching module and a result display module that are separately connected to the interface of the microservice module.
[0074] In this embodiment, the weather map uploading module is used to upload the imported current weather map and historical weather map. The weather map identification module is used to identify the type of the uploaded current weather map and obtain the weather type identification result corresponding to the weather map. The similarity matching module is used to perform similarity matching on the identified current weather map and historical weather map to obtain the optimal solution weather map after matching. The result display module is used to output the weather map weather type identification result and the optimal solution weather map with the highest historical matching similarity.
[0075] The weather map feature type recognition and similarity matching system of the embodiment of the present invention facilitates the atmosphere-related system to quickly and accurately recognize and match the weather type of the weather map, obtain the corresponding weather map weather type information and matching score, and provide reference for air pollution prevention and emission reduction measures; the present invention can be flexibly called by related business systems, greatly reducing the heavy work brought about by human participation in weather map recognition.
[0076] Among them, the microservice module is separately connected to the weather map upload module, weather map recognition module, similarity matching module and result display module through an interface. The weather map feature type recognition and similarity matching system of the embodiment of the present invention uses the architecture of the microservice module to manage related interfaces. The modules connected to each interface of the microservice module exist independently and can be deployed separately, without having to go through a full service release every time a certain function is released; following the single function principle, the modules connected to the microservice module interface can be called through RESTFUL or RPC, and the functions are decoupled; "fine-grained" high scalability, each module connected to the interface can be expanded and load balanced separately; microservices can be flexibly called by related business systems to meet the functional requirements of business systems.
[0077] The weather map feature type identification and similarity matching system is also connected to the atmospheric forecast and warning system through a microservice module. The atmospheric forecast and warning system includes an atmospheric pollution prevention and control module and a case library; the atmospheric pollution prevention and control module is used to receive the current pollution weather map uploaded by the microservice module, and return the current weather type to the microservice module after identifying and processing the current pollution weather map. The case library is used to upload the corresponding weather map in the case to the microservice module. After the microservice module performs similarity matching, it returns the weather map with the highest similarity to the atmospheric pollution prevention and control module, and the atmospheric pollution prevention and control module generates a big data case library by forming the results data into typical cases.
[0078] See also Figure 1As shown, when performing weather map feature type recognition and similarity matching, the current weather map and historical weather maps are first imported into the weather map upload module of the weather map feature type recognition and similarity matching system, and then the weather type of the weather map is recognized in the weather map recognition module. The current weather map after recognition is similarly matched with the historical weather map, and finally the optimal solution after matching is obtained; the relevant operation interface is uniformly managed by the microservice module, and the microservice can be called by other business systems.
[0079] In this embodiment, the atmospheric forecast and warning system can directly call the interface of the microservice module deployed by the module for business logic processing of the atmospheric pollution prevention and control module; the results data can form typical cases to generate a big data case library.
[0080] In the embodiment of the present invention, the functional modules of the weather map feature type recognition and similarity matching system are shown in Figure 2 As shown, the functional modules include a weather map upload module, a weather map recognition module, a similarity matching module and a result display module, which are respectively used for weather map upload, weather map recognition, similarity matching and result display. The weather map upload module is responsible for uploading the current weather map and the historical weather map; the weather map recognition module is responsible for identifying weather pictures of two different pressures, 500hpa and surface_pres. 500hpa can identify westerly airflow, high altitude ridges and subtropical high weather, and surface_pres can identify high pressure, average pressure and typhoon weather; the similarity matching module is responsible for matching the most similar picture to the current weather map from the historical weather map; the result display module can return the weather map weather type recognition result and the most similar weather map in the history match.
[0081] In one embodiment of the present invention, the weather map upload module includes a weather map upload interface, and the weather map upload interface mainly consists of three buttons: upload historical weather map, upload current weather map and start matching.
[0082] See also Figure 3 As shown, the Upload Historical Weather Map button is used to upload the historical weather atlas (including 500hpa and surface_pres two types of pictures) to match the picture most similar to the current weather map. The Upload Current Weather Map button is used to upload the current weather map (including 500hpa and surface_pres two types of pictures). The Start Matching button is used to click the Start Matching button to first decompress the historical pollution event weather map compressed file and the current pollution event weather map compressed file; then identify the decompressed weather map and identify the corresponding weather type; finally, perform similarity matching on the identified current weather and historical event weather maps to find the most similar weather map.
[0083] In one embodiment of the present invention, the weather map recognition module is used for weather map recognition. The weather map recognition part mainly recognizes the decompressed weather map and identifies the corresponding weather type. The intelligent recognition interface display result of the weather map recognition module can be found in Figure 4 As shown, preferably, in an embodiment of the present invention, the weather types used for identification include westerly airflow, high-altitude ridge, subtropical high, high pressure, average pressure and typhoon weather.
[0084] In one embodiment of the present invention, a similarity matching module is used to match the most similar picture between the current weather type weather map and the historical weather map; the matching rules mainly judge the overall similarity of the pictures based on the weather type of the pictures, the visual similarity of the pictures, the size and distribution of air pressure, the size and distribution of temperature, the size and distribution of wind direction and distribution, and the size and distribution of rainfall.
[0085] In one embodiment of the present invention, the result display module's main display result interface is mainly composed of a current weather map display interface, a historical weather map display interface, and a historical weather map switch button. Figure 5 As shown, the current weather map display interface area is used to display the weather type recognition result of the current weather map. The left side of the current weather map display interface is the 500hpa part, and the right side of the current weather map display interface is the surface_pres part; the weather type recognition result and the current weather map recognition result are displayed above the picture in the current weather map display interface.
[0086] See also Figure 6 and Figure 7 As shown, the historical weather map display interface area is used to display the weather type recognition results of the historical weather map. The left side of the historical weather map display interface is the 500hpa part, and the right side of the historical weather map display interface is the surface_pres part; the weather type recognition results and ranking scores are displayed above the picture in the historical weather map display interface, and the displayed results are sorted from high to low by score.
[0087] See also Figure 8 As shown, the weather map feature type recognition and similarity matching system also includes a model training module, an AI module and a data storage service module.
[0088] The model training module is used to input the meteorological picture image into the TensorFlow model for training to generate a meteorological model, and use the TensorFlow meteorological model to identify the weather type in the meteorological picture.
[0089] The AI module includes:
[0090] An image processing and computer vision processing unit, wherein the image processing and computer vision processing unit uses an OpenCV algorithm to process weather images; and
[0091] The optical character recognition unit is an OCR image recognition based on Tesseract, which is used to recognize image files in various formats and convert them into text.
[0092] The data storage service module is used to store and manage weather pictures.
[0093] In this embodiment, the TensorFlow framework used by the model training module is based on the SSD algorithm training model. Since target detection is an important application of AI, the target detection model can detect target objects such as people, animals, cars, and airplanes in the image, and even depict the outline of the object, just like the following set of pictures, which identify the typhoon as a target detection object.
[0094] In this embodiment, the target detection model is trained based on the data generated by the SSD (Single Shot MultiBox Detector) algorithm, which can be used to identify typhoons in images, etc. The method for training the target detection model based on the SSD algorithm includes: installing a labeling tool, labeling data, configuring SSD, downloading a pre-trained model, training the model, and using the model.
[0095] Among them, when installing the annotation tool, use sample data to train the model. First, perform data annotation, annotate the objects in the image, and the location information of the objects as sample data for training the model; after annotating the data, configure the SSD parameters, and then download the pre-trained model. SSD-Tensorflow provides a pre-trained model based on the VGG model. The model is trained according to the annotation file and the SSD model, and the batch_size value is set. The larger the value, the larger the number of batches processed and the higher the requirements for machine performance. Among them, the learning rate learning_rate is adjusted according to the actual situation. The smaller the learning rate, the more accurate it is and the longer the training time is. The larger the learning rate, the shorter the training time and the lower the accuracy. After the SSD model training is completed, the model is used to perform target recognition. Through the above steps, the target detection model is trained using sample data.
[0096] In the embodiment of the present invention, when the OpenCv algorithm is used to process the image, the OpenCv algorithm provides a set of intelligent algorithms to process the image, such as image similarity, contour detection, direction detection, straight line detection and other algorithms to process the image. Among them:
[0097] When measuring image similarity, the OpenCV algorithm provides five image similarity algorithms, namely hash algorithm, difference hash algorithm, perceptual hash algorithm, three-histogram and single-channel histogram. The hash algorithm, difference hash algorithm and perceptual hash algorithm are all the smaller the value, the higher the similarity, the value is 0-64, that is, in the Hamming distance, how many different 64-bit hash values. The value of the three-histogram and single-channel histogram is 0-1, the larger the value, the higher the similarity.
[0098] During contour detection, the OpenCV algorithm binarizes the binary image, so contour detection includes the following steps: loading the image, graying, binarization, and contour detection.
[0099] During direction detection, the contour of each workpiece is obtained separately; each contour is processed, and the PCA (principal component analysis) method is used to obtain the midpoint of the set of all contour points, the main direction and other information; the drawing is drawn and the result is returned.
[0100] When detecting lines: Hough Transform Hough Transform is one of the basic methods for identifying geometric shapes from images in image processing. It is widely used and has many improved algorithms. It is mainly used to separate geometric shapes with certain common features from images (such as straight lines, curves, lines, circles, etc.). The most basic Hough Transform is to detect lines (curves) from black and white images.
[0101] In the embodiment of the present invention, when OCR image recognition is based on Tesseract, Tesseract is an open source OCR (Optical Character Recognition) engine developed by HP Labs and maintained by Google. It is open source, free, supports multiple languages and platforms, and can recognize image files in various formats and convert them into text.
[0102] In the embodiment of the present invention, when the 500hp weather map is identified, the 500hpa can identify the westerly airflow, the high altitude ridge and the subtropical high weather. Fig. 9 As shown in the figure, for example, the wind direction passing through Zhejiang starts from the leftmost side of the picture and goes from west to east. The isotherms, isobars and wind direction are parallel, and the overall trend is horizontal. Fig. 9 As shown, the wind vane from west to east through Zhejiang is extracted, see Fig.10 As shown, the wind direction of each wind vane is calculated using the OpenCV direction detection algorithm, see Fig.11 As shown, finally, based on the wind direction of each wind vane, a comprehensive assessment is made as to whether the weather chart belongs to westerly airflow weather.
[0103] When identifying high altitude ridges, see Fig.12As shown, the wind direction is from northwest to southeast, and the isotherms, isobars and wind direction are parallel; the isobar closest to Zhejiang opens downward, and the opening angle is greater than 180° and less than 360°. Fig.12 As shown, extract the isobars, see Fig.13 As shown, the direction of each isobar is calculated using the OpenCV line detection algorithm, see Fig.14 As shown, finally, based on the direction of each isobar, a comprehensive assessment is made as to whether the weather map belongs to high-altitude ridge weather.
[0104] When identifying subtropical high weather, refer to Fig.15 As shown, for example, the 500hPa isobar in Zhejiang is greater than or equal to 588. The recognition method is to extract the isobar value in the weather map, identify the pressure value based on Tesseract's OCR character recognition technology, and finally the pressure value and distribution information to comprehensively evaluate whether the weather map belongs to subtropical high weather.
[0105] In the embodiment of the invention, when surface_pres recognizes the weather map, surface_pres can recognize high pressure, average pressure and typhoon weather. When recognizing typhoon weather, refer to Fig.16 As shown, there is usually rainfall in a typhoon; the wind arrow is relatively long, and from the direction of the arrow, it is distributed counterclockwise around the contour lines; the number of lines is dense and compact, with the smallest central value, which gradually increases outward; for example, the center of the typhoon is east of Anhui and south of Shandong, excluding Japan.
[0106] The method to identify typhoon weather is: see Fig.17 As shown in the figure, due to the obvious characteristics of typhoons, target detection technology can be used for identification; the TensorFlow framework is used to detect typhoons based on the SSD algorithm training model, and finally, based on the recognition results and typhoon location information, a comprehensive assessment is made as to whether the weather map belongs to typhoon weather within the influence area of Zhejiang.
[0107] When identifying high pressure, refer to Fig.18 As shown, for example, Zhejiang is in the center of high pressure (isobaric values are greater than 1012 and increase in sequence) or there is a high pressure center near Zhejiang. The method of identifying high pressure is: extract the isobaric value, identify the pressure value based on Tesseract's OCR character recognition technology, and finally comprehensively evaluate whether the weather map belongs to high-altitude ridge weather according to each isobaric direction.
[0108] When identifying the pressure balance, see Fig.19 As shown in the figure, for example, there are sparse isobars near Zhejiang, with no or only one isobar. Extract the pressure lines within Zhejiang, use the OpenCV contour detection algorithm to calculate the number and distribution of contours, and finally comprehensively evaluate whether the weather map belongs to isobaric weather based on the contour data within Zhejiang.
[0109] In the embodiment of the present invention, when performing similarity intelligent matching, refer to Fig. 20 As shown, first determine whether the two compared pictures are of the same weather type, then use the Opencv similarity algorithm to match the picture similarity, score the westerly airflow, high altitude ridge, subtropical high, high pressure, mean pressure and typhoon, and then score them according to the rules of different weather maps. The rules of different weather maps are:
[0110] Westerly airflow: the number of wind directions from west to east.
[0111] High-altitude ridge: The opening angle is greater than 180° and less than 360°.
[0112] Subtropical high: The 500hPa isobar near Zhejiang is greater than 584.
[0113] High pressure: high pressure center position.
[0114] Average pressure: the number of equal pressure lines within Zhejiang.
[0115] Typhoon: typhoon similarity, typhoon intensity, typhoon location.
[0116] Finally, the highest score is obtained by ranking the scores as the image with the highest matching degree.
[0117] Therefore, the weather map feature type recognition and similarity matching system of the embodiment of the present invention uses a microservice architecture to manage related interfaces. The microservice can be independently deployed and run, and can be flexibly called by related business systems. TensorFlow is used to train a deep learning model on a historical weather map dataset. The model can identify future weather map weather types (such as typhoon weather). The AI intelligent algorithm provided by OpenCv is used to process the weather map image and obtain important parameter information of the weather map (such as wind direction, isothermal isobars, and rainfall). The open source framework Tesseract is used for optical character recognition (OCR), which can identify the temperature and air pressure values of the weather map.
[0118] Moreover, in the weather map feature type recognition and similarity matching system of the present embodiment, the relevant service interfaces are respectively published as four microservices, namely, image upload service, weather recognition service, intelligent matching service, and result acquisition service. The microservices can be called by the atmospheric system; each microservice exists independently and can be deployed, expanded, and load balanced separately, making it easy to call.
[0119] The system of the embodiment of the present invention can identify westerly airflow, high-altitude ridges, subtropical highs, high pressure, average pressure and typhoon weather, etc.
[0120] In a preferred embodiment of the present invention, a method for identifying weather map feature types and similarity matching comprises the following steps:
[0121] Step 1: Obtain an uploaded weather picture dataset, wherein the weather picture dataset includes a current weather picture dataset and a historical weather picture dataset;
[0122] Step 2: traverse all the pictures in the weather picture data set, classify the pictures in the weather picture data set, process the pictures of different categories after classification separately, and obtain the weather type recognition result corresponding to the weather map;
[0123] Step 3: traverse the historical weather map data set, perform similarity matching on the current weather map, and obtain the optimal solution weather map with the highest historical matching similarity with the current weather map;
[0124] Step 4: Output the weather map weather type recognition result and the optimal solution weather map with the highest similarity to the historical matching.
[0125] In this embodiment, before obtaining the uploaded weather picture data set, the method further includes:
[0126] Get weather picture upload request;
[0127] Responding to the weather picture upload request, and receiving data compressed files of the current weather map and the historical weather map;
[0128] Decompress the compressed files of historical pollution event weather maps and current pollution event weather maps in the uploaded current weather maps and historical weather map data;
[0129] The decompressed weather map is distributed through the Gateway and matched with the routing to the corresponding image recognition service module for recognition and processing to identify the corresponding weather type.
[0130] Among them, when classifying the pictures in the weather picture data set, it also includes: judging the type of weather pictures in the weather picture data set; the types of weather pictures include 500hpa and surface_pres, copying the classified weather pictures to the folders of the corresponding types, and performing different color extractions to obtain new pictures.
[0131] New images of the 500hpa type are processed through the OpenCv training model to extract feature information in the new images, and the feature information includes one or more of the curve angle profile, wind direction angle, air pressure size and similarity in the new images; new images of the surface_pres type are identified as typhoon types through the pre-trained TensorFlow weather model.
[0132] In one embodiment provided by the present invention, see Fig.21As shown, a method for weather map feature type recognition and similarity matching is provided, comprising the following steps:
[0133] Get the front-end weather picture upload request, and distribute the matching routing information to the corresponding image recognition service module for processing through the Gateway;
[0134] The weather pictures are classified into 500hpa and surface_pres and processed separately, and the colors in each classified weather picture are extracted to generate new pictures;
[0135] The 500hpa image is processed by the OpenCV algorithm to extract the curve angle contour, wind direction angle, air pressure size and similarity information in the image and save it to the feature text data; the surface_pres image is identified as the typhoon type by the TensorFlow meteorological model and saved in the type text data;
[0136] Get the text data of the two types of pictures, 500hpa and surface_pres, to determine the picture type, calculate the score and sort it based on the data, and return the final result to the browser to display the result data.
[0137] In this embodiment, the front-end weather picture upload request is distributed and matched by the Gateway to the corresponding image recognition service for processing; then the picture is classified into 500hpa and surface_pres and processed separately, and various colors are extracted to generate new pictures; 500hpa is processed by OpenCV to extract the curve angle contour, wind direction angle, air pressure size, similarity and other information in the picture and save the text; the surface_pres picture is identified as the typhoon type by running the weather model trained by TensorFlow; the two types of pictures judge the picture type according to the text data, calculate the score and sort it through the data, and return the final result to the browser.
[0138] See the data processing flow for Fig. 22 As shown in the figure, after the weather map is uploaded, it is traversed and classified into two types: 500hpa and surface_pres. New pictures (isobaric map, isothermal map, wind direction map, etc.) are extracted according to the different colors in the picture; the extracted new pictures use OpenCv, Tesserac and Tensorflow training models to identify the picture type and parameter information (wind direction, pressure, position, etc.); finally, the similarity matching ranking is performed according to the type and parameter information, and the result data is returned for display.
[0139] When the weather map feature type recognition and similarity matching system of the present invention is applied, it includes the following methods:
[0140] 1. Weather type identification.
[0141] The atmospheric system will generate pollution events based on information such as factor exceeding the standard, and obtain the weather map during the current pollution event time period. The system weather map generates the corresponding weather type and displays it.
[0142] 2. Weather type as an evaluation parameter for air pollution events.
[0143] Weather type is an important evaluation parameter for air pollution events and is used in the prevention and control of air pollution events.
[0144] 3. Case matching obtains the best historical similar events.
[0145] The current pollution event evaluation parameters are compared and scored with the historical pollution event evaluation parameters in the case, among which weather type is an important evaluation indicator.
[0146] 4. Adjust parameters for pollution prevention and control based on historical events.
[0147] The corresponding historical emission reduction arrangements can be obtained from the pollution event cases in the historical matching, and the emission reduction plan can be optimized and adjusted. Then the model is called to simulate the plan after emission reduction to obtain the future trend of factor concentration; the optimal emission reduction plan is obtained by continuously adjusting parameters and simulating.
[0148] 5. Case library.
[0149] After completion, the current pollution incident emission reduction plan can be stored in the case library as a typical case, which can be used as a reference for emission reduction of similar pollution incidents in the future. The cases in the case library can be viewed in detail, including the weather map at the time of the pollution incident and the identified weather type.
[0150] In this embodiment, the weather map feature type recognition and similarity matching method implements the feature type recognition and similarity matching process of a weather map feature type recognition and similarity matching system as in the above-mentioned embodiment. Therefore, the operation process of the weather map feature type recognition and similarity matching method in this embodiment will not be described in detail.
[0151] In summary, the technical solution provided by the present invention has the following advantages:
[0152] 1. The present invention facilitates the atmosphere-related systems to quickly and accurately identify and match the weather types on the weather map, obtain the corresponding weather type information on the weather map and the matching score, and provide a reference for air pollution prevention and emission reduction measures; the present invention can be flexibly called by the relevant business systems, greatly reducing the heavy work brought about by human participation in weather map identification.
[0153] 2. The weather map feature type recognition and similarity matching system of the present invention uses the architecture of the microservice management module to manage related interfaces. The modules connected to each interface of the microservice management module exist independently and can be deployed separately, without having to go through a full service release every time a certain function is released; following the single function principle, the modules connected to the interface of the microservice management module can be called through RESTFUL or RPC, and the functions are decoupled; with "fine-grained" high scalability, each module connected to the interface can be expanded and load balanced separately; microservices can be flexibly called by related business systems to meet the functional requirements of the business systems.
[0154] 3. The present invention automatically identifies cases of severe air pollution and major weather events and their key characteristics through pollution prevention and control image recognition technology, uses artificial intelligence technologies such as intelligent image recognition to match the similarity of historical pollution events, and analyzes the pollution process and elements of the current pollution process and historical cases to achieve rapid retrieval of emission reduction measures. Thus, the optimal control technology solution and engineering measures are obtained according to the actual emission reduction situation to achieve the regional atmospheric environment quality control goals.
[0155] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A weather map feature type recognition and similarity matching system, characterized in that: The system includes: a weather map uploading module for uploading imported current weather maps and historical weather maps; The weather map recognition module is used to identify the type of the uploaded current weather map and obtain the weather type recognition result corresponding to the weather map; A similarity matching module is used to perform similarity matching between the current weather map after identification and the historical weather map to obtain the optimal solution weather map after matching; and a result display module is used to output the weather map weather type recognition result and the optimal solution weather map with the highest historical matching similarity; The weather map recognition module is used to recognize weather pictures of two different pressures, 500hpa and surface_pres. The 500hpa pressure is used to recognize westerly airflow, high-altitude ridges and subtropical high weather in weather pictures, and the surface_pres pressure is used to recognize high pressure, average pressure and typhoon weather in weather pictures. The similarity matching module is used to match the most similar picture between the current weather type weather map and the historical weather map. The matching rule of the similarity matching module is to judge the overall similarity of the picture based on the picture weather type, picture visual similarity, air pressure size and distribution, temperature size and distribution, wind direction and distribution, and rainfall size and distribution.
2. The weather map feature type recognition and similarity matching system according to claim 1, characterized in that: The weather map feature type identification and similarity matching system also includes a microservice module, which is separately connected to the weather map uploading module, the weather map identification module, the similarity matching module and the result display module through an interface.
3. The weather map feature type recognition and similarity matching system according to claim 2, characterized in that: The weather map feature type identification and similarity matching system is also connected to the atmospheric forecast and warning system through a microservice module. The atmospheric forecast and warning system includes an atmospheric pollution prevention and control module and a case library; the atmospheric pollution prevention and control module is used to receive the current pollution weather map uploaded by the microservice module, and return the current weather type to the microservice module after identifying and processing the current pollution weather map. The case library is used to upload the corresponding weather map in the case to the microservice module. After the microservice module performs similarity matching, it returns the weather map with the highest similarity to the atmospheric pollution prevention and control module, and the atmospheric pollution prevention and control module generates a big data case library by forming the results data into typical cases.
4. The weather map feature type recognition and similarity matching system according to claim 1, characterized in that: The weather map feature type recognition and similarity matching system also includes a model training module, which is used to input the weather picture image into the TensorFlow model for training to generate a weather model, and use the TensorFlow meteorological model to identify the weather type in the weather picture.
5. The weather map feature type recognition and similarity matching system according to claim 1, characterized in that: The weather map feature type recognition and similarity matching system also includes an AI module, which includes: an image processing and computer vision processing unit, which uses the OpenCV algorithm to process weather images; and an optical character recognition unit, which is an OCR image recognition based on Tesseract, used to recognize image files in various formats and convert them into text.
6. The weather map feature type recognition and similarity matching system according to claim 5, characterized in that: The weather map feature type recognition and similarity matching system also includes: a data storage service module, which is used to store and manage weather pictures.
7. A method for identifying weather map feature types and similarity matching, characterized in that: The weather map feature type recognition and similarity matching method is used to implement feature type recognition and similarity matching in the weather map feature type recognition and similarity matching system described in any one of claims 1 to 6; the weather map feature type recognition and similarity matching method comprises the following steps: Obtain an uploaded weather picture dataset, wherein the weather picture dataset includes a current weather picture dataset and a historical weather picture dataset; Traversing all the pictures in the weather picture data set, classifying the pictures in the weather picture data set, processing the pictures of different categories after classification separately, and obtaining the weather type recognition result corresponding to the weather map; Traverse the historical weather map data set, perform similarity matching on the current weather map, and obtain the optimal solution weather map with the highest historical matching similarity to the current weather map; Output the weather map weather type recognition result and the optimal solution weather map with the highest similarity to the historical match; Before obtaining the uploaded weather picture dataset, the following steps are also included: 1) Obtain the front-end weather image upload request and distribute the matching routing information to the corresponding image recognition service module for processing through the Gateway; 2) The weather pictures are classified into 500hpa and surface_pres and processed separately, and the colors in each classified weather picture are extracted to generate new pictures; the specific method is as follows: The 500hpa image is processed by the OpenCV algorithm to extract the curve angle contour, wind direction angle, air pressure size and similarity information in the image and save it into the feature text data; When using the OpenCV algorithm to process images, the OpenCV algorithm provides a set of intelligent algorithms to process images, including image similarity, contour detection, direction detection, and straight line detection to process images; among them: When measuring image similarity, the OpenCV algorithm provides five image similarity algorithms, namely, hash algorithm, difference hash algorithm, perceptual hash algorithm, three-histogram and single-channel histogram. The smaller the value of the hash algorithm, difference hash algorithm and perceptual hash algorithm, the higher the similarity, and the value is 0-64, that is, how different the 64-bit hash value is in the Hamming distance; the value of the three-histogram and single-channel histogram is 0-1, and the larger the value, the higher the similarity; When performing contour detection, the OpenCV algorithm performs binarization on binary images, so contour detection includes the following steps: loading images, grayscale conversion, binarization, and contour detection; When detecting the direction, obtain the contour of each workpiece separately; process each contour, use the PCA method to obtain the midpoint and main direction of the set of all contour points; draw the graph and return the result; When detecting lines: separate geometric shapes with certain common features from the image; the most basic Hough transform is to detect lines from a black and white image; The surface_pres picture is identified as a typhoon type by the TensorFlow meteorological model and saved in the type text data; 3) The text data of the two types of pictures, 500hpa and surface_pres, are obtained to determine the picture type, the score is calculated and sorted through the data, and the final result is returned to the browser to display the result data.
