Meteorological disaster weather intelligent identification method based on AI image identification

By generating high-quality datasets using the Transformer visual recognition model and GAN network, and combining transfer learning, the problems of insufficient accuracy and insufficient datasets in meteorological disaster weather recognition are solved, achieving higher recognition accuracy and stability.

CN121010802APending Publication Date: 2025-11-25ZHONGKEXING TUWEI TIANXIN TECH CO LTD +1

Patent Information

Application Number
CN202511053326.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing technologies lack sufficient accuracy in identifying meteorological disasters and weather conditions, and datasets are inadequate. Traditional models struggle to meet the demands for high accuracy and generalization capabilities.

Method used

We employ a Transformer visual recognition model combined with GAN networks and transfer learning. By unifying multi-source datasets and generating high-quality synthetic samples, we enhance the quality and diversity of the dataset. We also utilize a self-attention mechanism to capture long-distance dependencies in meteorological images and perform deep learning and feature extraction.

Benefits of technology

It significantly improved the accuracy of meteorological disaster weather identification, reduced scene-specific identification errors, expanded the dataset coverage, and improved the model's identification stability and generalization ability under extreme disasters and unseen scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010802A_ABST
    Figure CN121010802A_ABST
Patent Text Reader

Abstract

The invention discloses a meteorological disaster weather intelligent identification method based on AI image identification, and the method comprises the steps: unifying the sizes of a plurality of data sets, carrying out the fusion to obtain a comprehensive data set, enhancing the quality and diversity of the comprehensive data set through a GAN network, generating a weather identification data set, and carrying out the recognition of the weather through a Transform visual recognition model. And carrying out deep analysis and learning on the generated weather identification data set, completing weather identification and outputting an identification result. According to the method, the GAN and the Transform visual recognition model are adopted, and the global features and the long-distance dependency relationship in the meteorological image are captured through a self-attention mechanism, so that the problem of insufficient complex meteorological mode recognition caused by local sensing field limitation of a traditional model is solved, feature extraction of disaster weather is more comprehensive, and the recognition accuracy is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent weather identification technology for meteorological disasters, and in particular to an intelligent weather identification method based on AI image recognition. Background Technology

[0002] Identifying severe weather is crucial for protecting people's lives and property. Severe weather events, such as torrential rains and floods, typhoons and storms, extreme heat waves, severe cold waves, and tornadoes, are often accompanied by intense destructiveness and danger. Timely and accurate identification of these weather events allows people to take preventative and emergency response measures early, reducing losses and damage caused by disasters. Furthermore, severe weather can lead to floods, landslides, building collapses, and transportation disruptions, causing significant damage to urban and rural infrastructure, transportation, and crops, and severely impacting people's lives and livelihoods. Through timely identification and early warning of severe weather, government departments and relevant agencies can initiate emergency rescue operations, evacuate residents, and relocate property, minimizing the adverse socio-economic impact of disasters.

[0003] There are many ways to identify severe weather, but traditional methods have significant drawbacks. Weather information released by meteorological departments provides real-time weather data, but this often covers large areas and may not be timely in detecting sudden severe weather events. Monitoring localized weather conditions using meteorological sensors is expensive, and different sensor types are required for different weather conditions. With the rapid development of computer vision, vision-based weather monitoring methods have gained increasing attention. Researchers use various smart terminals to acquire videos and images of the weather and then use algorithms to identify weather conditions. With the development of convolutional neural networks, deep learning has become a major advantage due to its powerful feature extraction capabilities; therefore, convolutional neural network-based identification methods have become mainstream in weather recognition research.

[0004] For example, in the article "Research and Application of Image Recognition Technology for Severe Weather Events in Hebei Province" published in the Journal of Tropical Meteorology (2024, 40(06):983-992) with DOI number DOI:10.16032 / j.issn.1004-4965.2024.087, such as... Figure 1As shown, Wei Tiexin et al. mentioned that by collecting existing weather image data and manually analyzing its shallow features such as average gradient, contrast, saturation, and dark channels, they identified weather types such as sunny, foggy, sandstorm, and rainy weather using algorithms such as VGG-16, Res-Net, and random forest, or by using image processing algorithms. Their method used images of severe weather events released by the public as the training set and constructed image recognition models for eight types of severe weather events based on the ResNet50 residual network.

[0005] For example, in the paper "Outdoor Image Weather Recognition Based on Image Segmentation and Feature Fusion" published in Computer Science (2022, 49(03):197-203), Zuo Jiege et al. selected some images that met the research requirements from Image2Weather dataset and MWD, and collected some publicly available images to construct a weather image dataset, which includes four types of weather: fog, rain, snow and clear. Each type has 1,000 images, for a total of 4,000 images. They manually analyzed the shallow features and fused the deep features extracted by the VGG-16 network to identify the weather type.

[0006] The aforementioned intelligent meteorological disaster weather identification methods have the following problems: 1) Identification accuracy needs improvement. Due to differences in image sources and various factors, manually constructed identification features are not entirely conducive to meteorological weather identification. This algorithm design does not fully utilize the end-to-end high-precision identification characteristics of deep learning, and the structure of algorithms such as VGG-16, Res-Net, and Random Forest severely limits identification accuracy when facing multi-source image data. If the network depth is too deep, the amount of data is insufficient to support training; if the network depth is too shallow, it is difficult to achieve high accuracy and generalization ability. 2) The intelligent identification dataset is insufficient. Previous technologies have aggregated meteorological weather data from multiple sources and screened to obtain self-made datasets, which alleviated the problem of insufficient data from a single source, but still cannot meet the high data requirements of deep learning. Summary of the Invention

[0007] To address the above problems, the present invention aims to provide an intelligent method for identifying meteorological disasters based on AI image recognition, thereby improving the accuracy and efficiency of meteorological disaster identification, efficiently expanding the weather identification dataset, meeting the needs of model training, and enhancing the network's generalization ability.

[0008] This invention provides a method for intelligent identification of meteorological disaster weather based on AI image recognition.

[0009] The first aspect: A method for intelligent identification of meteorological disaster weather based on AI image recognition, including:

[0010] S1. Unify the size of multiple datasets and merge them to obtain a comprehensive dataset;

[0011] S2. The comprehensive dataset enhances the quality and diversity of the dataset through a GAN network to generate a weather recognition dataset;

[0012] S3. Using the Transformer visual recognition model, perform deep analysis and learning on the generated weather recognition dataset to complete meteorological and weather recognition and output the recognition results.

[0013] In one embodiment of the present invention, the following is stated:

[0014] When training and tuning the Transformer visual recognition model, transfer learning is performed on a specific domain weather dataset to fine-tune the model parameters.

[0015] The method according to claim 1 is characterized in that the multiple datasets include: TWI, MWI, MWD and Image2Weather datasets.

[0016] In one embodiment of the present invention, S2, which enhances the quality and diversity of the comprehensive dataset through a GAN network, includes:

[0017] GAN networks use generators to generate new, seemingly realistic samples based on a comprehensive input dataset;

[0018] GAN networks utilize a discriminator to evaluate the authenticity of these samples, determining whether they come from a real aggregate dataset or were created by a generator;

[0019] By having the generator and discriminator compete with each other and continuously optimize their performance, the generator produces high-quality and realistic data samples, which are then expanded to form a weather recognition dataset.

[0020] The objective function of the GAN network is expressed as follows:

[0021]

[0022] x is a real data sample, z is random noise input, G(z) is a fake sample generated by the generator; D(x) is the probability of the discriminator judging the real data; D(G(z)) is the probability of the discriminator judging the generated data.

[0023] In one embodiment of the present invention, the Transformer visual recognition model captures long-range dependencies in meteorological images through a self-attention mechanism, the formula for which is expressed as:

[0024]

[0025] Where Q is the query matrix, K is the key matrix, V is the value matrix, and dk is the dimension of the key vector.

[0026] In one embodiment of the present invention, the overall output of the Transformer visual recognition model is based on a multi-head attention mechanism and a feedforward network, as expressed by the formula:

[0027]

[0028]

[0029] in , , , It is a learnable weight matrix.

[0030] In one embodiment of the present invention, the loss function for fine-tuning the model parameters by transferring learning from a specific domain weather dataset is:

[0031]

[0032] in, denoted as the data distribution for the target task, F(x) represents the features extracted by the pre-trained model, C(F(x)) is the output of the fine-tuned classifier, and ℓ is the loss function.

[0033] In one embodiment of the present invention, the training process of the Transformer visual recognition model includes:

[0034] The meteorological image is segmented into fixed-size image patches, and the image patches are linearly embedded to form feature vectors;

[0035] Positional encoding is added to the embedded feature vectors to preserve the spatial information of image patches;

[0036] Feature extraction is performed through multiple Transformer encoder layers, each of which includes a multi-head self-attention mechanism, a feedforward neural network, residual connections, and layer normalization.

[0037] The extracted features are fed into the classification head, and the cross-entropy loss function guides the parameter updates during the training process, enabling model training and parameter tuning.

[0038] Second aspect: An electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, performs the steps of the method provided in the first aspect.

[0039] Third aspect: A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect.

[0040] The beneficial effects of this invention are:

[0041] 1. This invention uses the Transformer visual recognition model to replace traditional convolutional neural networks such as VGG-16 and ResNet. It captures global features and long-distance dependencies in meteorological images through a self-attention mechanism, which solves the problem of insufficient recognition of complex meteorological patterns caused by the limitation of local receptive field in traditional models. This makes the feature extraction of disaster weather such as rainstorms, typhoons, and dense fog more comprehensive and significantly improves the recognition accuracy.

[0042] 2. This invention combines a transfer learning strategy to fine-tune the pre-trained model on a specific scenario dataset, making the model adapt to scenario-specific meteorological features (such as the impact of rain and fog on the road surface in traffic scenarios, and the interaction between hail and crops in agricultural scenarios), further reducing the recognition error caused by scenario specificity and improving the recognition accuracy in subdivided scenarios.

[0043] 3. This invention solves the problem of limited coverage of a single data source by fusing multiple data sources (TWI, MWI, MWD, Image2Weather dataset). The comprehensive dataset covers meteorological images (such as satellite cloud images and ground monitoring images) from different regions, time periods and sensor types, and the scale of basic data is 3-5 times larger than that of traditional single datasets.

[0044] 4. This invention utilizes GAN networks to generate high-quality synthetic samples, which can specifically supplement image data of extremely rare disasters (such as strong tornadoes and severe blizzards), thereby increasing the diversity of disaster types covered by the dataset. The synthetic samples generated by GAN are highly consistent with the distribution of real samples, allowing the model to be exposed to richer edge cases during training. When facing unseen meteorological scenes (such as sudden thunderstorms and mixed rain and fog), the recognition stability is improved and the generalization error is reduced. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the structure of an existing recognition method;

[0046] Figure 2 This is a schematic diagram illustrating the principle and structure of the intelligent meteorological disaster weather identification method of the present invention.

[0047] Figure 3 This is a schematic diagram of the GAN network principle structure of the present invention;

[0048] Figure 4 This is a flowchart of the model training and optimization process of this invention;

[0049] Figure 5 This is a schematic diagram of the model structure of the present invention;

[0050] Figure 6 This is a schematic diagram of the structure of the electronic device of the present invention. Detailed Implementation

[0051] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0052] Given the current frequent occurrence of meteorological disasters, how to quickly and accurately identify various types of meteorological disasters has become an urgent problem to be solved. Traditional methods for identifying meteorological disasters mainly rely on manual observation and experience-based judgment. This method is not only inefficient but also easily affected by the subjective factors of the observer, resulting in low accuracy of the identification results.

[0053] To address the aforementioned problems, this invention provides an intelligent method for identifying meteorological disasters based on AI image recognition. Figure 2 The flowchart illustrates the principle of the intelligent meteorological disaster weather identification method based on AI image recognition technology provided in this embodiment of the invention.

[0054] Example 1:

[0055] This embodiment discloses a method for intelligent identification of meteorological disaster weather based on AI image recognition, the steps of which include:

[0056] First, unify the size of multiple datasets and merge them to obtain a comprehensive dataset.

[0057] like Figure 2 As shown, multiple datasets (e.g., TWI, MWI, MWD, and Image2Weather datasets) are started and merged into a single comprehensive dataset after being processed to achieve a uniform size. The aim is to ensure that all datasets are consistent in size, thereby ensuring the consistency and effectiveness of subsequent processing steps.

[0058] These datasets underwent standardized preprocessing, such as resizing all images to the same resolution and size. This standardization process not only eliminated the processing complexity caused by size differences in the original datasets but also laid the foundation for data fusion.

[0059] After unifying the data sizes, these preprocessed datasets were integrated into a comprehensive dataset. This comprehensive dataset covers a wider range of meteorological phenomena, thus providing richer and more diverse training resources for deep learning models.

[0060] Using a comprehensive dataset can enhance the model's ability to identify different meteorological disasters and improve its generalization performance.

[0061] Then, the dataset is combined with a GAN network to enhance its quality and diversity, generating a weather recognition dataset.

[0062] like Figure 3 As shown, the comprehensive dataset is further processed using a generative adversarial network (GAN) to augment the original dataset by generating high-quality synthetic meteorological images.

[0063] Generative Adversarial Networks (GANs) are used to augment the dataset, enhancing the network's generalization ability and robustness. In this process, GANs play a crucial role in the network training phase. A GAN mainly consists of two parts: a generator and a discriminator.

[0064] The generator's task is to produce new, seemingly realistic samples based on the input dataset; the discriminator, on the other hand, is responsible for evaluating the realism of these samples, determining whether they come from the real dataset or were created by the generator. Through this competitive process, both continuously optimize their performance, ultimately enabling the generator to produce high-quality and realistic data samples.

[0065] In this way, GANs can effectively improve the quality and diversity of datasets and enhance the model's generalization ability when faced with unseen data.

[0066] First, in meteorological data processing, raw datasets may be insufficiently large or diverse to cover all possible weather conditions. GANs can learn the distribution characteristics of existing data to generate additional synthetic data, thereby expanding the dataset size and increasing data diversity. Second, for some data types that are difficult to obtain or costly, such as image data under extreme weather conditions, GANs provide an effective solution to fill data gaps. Furthermore, GANs can help improve the generalization ability of models, enabling them to maintain good performance even when faced with unseen data. Finally, by generating high-quality synthetic data, GANs help improve the training effect of subsequent Transformer visual recognition models, thereby enhancing the accuracy and reliability of the entire system in identifying meteorological conditions.

[0067] This invention introduces GANs into this process, which not only enhances data resources but also lays the foundation for more accurate weather forecasting.

[0068] The core of GAN is the adversarial training process between the generator G and the discriminator D, and its objective function is expressed as:

[0069]

[0070] Where x is the real data sample, z is the random noise input, G(z) is the fake data generated by the generator, D(x) is the probability of the discriminator judging the real data, and D(G(z)) is the probability of the discriminator judging the generated data.

[0071] Then, as Figure 4 As shown, the Transformer visual recognition model is used to perform deep analysis and learning on the generated weather recognition dataset, complete the meteorological weather recognition, and output the recognition results.

[0072] The Transformer visual recognition model, as the main network model for intelligent meteorological disaster recognition in this invention, is primarily responsible for deep analysis and learning of the generated weather recognition dataset.

[0073] This model, through its self-attention mechanism, effectively captures long-range dependencies in the input data, which is crucial for understanding meteorological features in complex scenes. The Transformer can handle interactions between different regions, spanning a large spatial range and efficiently processing this information.

[0074] The advantages of using the Transformer visual recognition model are numerous. First, it possesses powerful representational capabilities, able to learn rich feature representations from large-scale datasets, which is crucial for improving prediction accuracy. Second, due to its architectural characteristics, the Transformer can process sequential data in parallel, significantly improving computational efficiency and training speed. Furthermore, compared to traditional convolutional neural networks (CNNs), the Transformer does not rely on local receptive fields but can directly focus on any location in the input data, making it more flexible in handling unstructured data. Moreover, through transfer learning, the Transformer can be fine-tuned on domain-specific datasets, further enhancing model performance. Finally, as the amount of data and the model size increase, the Transformer's performance often outperforms other models, making it an ideal choice for solving complex visual tasks.

[0075] The use of the Transformer visual recognition model not only improves the accuracy of meteorological condition recognition, but also provides new ideas and methods for processing complex visual data.

[0076] The core mechanism of Transformer is self-attention, which is calculated using the following formula:

[0077]

[0078] Q is the query matrix, K is the key matrix, and V is the value matrix; dk is the dimension of the key vector, used to scale the dot product to avoid gradient vanishing or exploding.

[0079] Furthermore, the overall output of the Transformer, through a multi-head attention mechanism and a feedforward network, is represented as follows:

[0080]

[0081]

[0082] in , , , It is a learnable weight matrix. Through a self-attention mechanism, the Transformer can capture global dependencies in the input data, thereby better understanding complex patterns in meteorological images.

[0083] Example 2:

[0084] This embodiment discloses an intelligent weather disaster identification method based on AI image recognition. Based on embodiment 1, when training and optimizing the Transformer visual recognition model, the model parameters are fine-tuned by transferring learning from a specific domain weather dataset.

[0085] To make weather recognition applicable to more fields, the method of this invention is further optimized for a single scenario by adopting transfer learning. The pre-trained network model trained on a large-scale meteorological dataset is further trained and its parameters are adjusted and optimized with the support of a specific scenario dataset.

[0086] Transfer learning refers to the technique of applying a model pre-trained on one task to another related but different task. This involves fine-tuning the pre-trained model for a specific meteorological data identification task. This approach can achieve good results on relatively small datasets because it allows the model to learn general feature representations from previous tasks and then optimize for the specific task.

[0087] Transfer learning not only improves work efficiency but also enhances the model's ability to handle specific tasks, making it an important means of achieving accurate meteorological condition identification.

[0088] Furthermore, by transferring learning from a domain-specific weather dataset, the loss function for fine-tuning the model parameters is:

[0089]

[0090] in, F(x) is the data distribution of the target task, F(x) is the feature extracted by the pre-trained model, C(F(x)) is the fine-tuned classifier output, and ℓ is the loss function. By fine-tuning the pre-trained model, the model can converge quickly on the target task and improve performance by utilizing the general features learned by the pre-trained model.

[0091] The advantages of using transfer learning on domain-specific weather datasets are significant. First, it drastically reduces training time and computational resources. Since pre-trained models have already learned rich feature representations, they only require minor adjustments to adapt to new datasets, which is far more efficient than training from scratch. Second, transfer learning effectively mitigates overfitting issues caused by small datasets. For tasks where large amounts of data are difficult to obtain (such as identifying specific types of weather phenomena), transfer learning can benefit from knowledge learned from larger datasets, improving the model's generalization ability. Third, this method helps improve model performance. Pre-trained models, having been exposed to a large amount of data, possess strong representational capabilities, thus providing high starting performance even after fine-tuning for new tasks. Finally, transfer learning promotes knowledge sharing across different domains; for example, pattern recognition techniques from natural images can be transferred to meteorological image analysis, providing more possibilities for solving complex problems.

[0092] Example 3:

[0093] This embodiment discloses an intelligent method for identifying meteorological disasters based on AI image recognition. Building upon Embodiment 1 or 2, it optimizes the method for training and tuning the parameters of the Transformer visual recognition model. Specifically, it includes:

[0094] First, the images are segmented. The original input images are weather-related images captured by ordinary sensors. These images are first divided into fixed-size blocks (e.g., 16x16 pixels), and each block is treated as a "token". To adapt to the Transformer architecture, each image block undergoes a linear transformation, mapping it to a high-dimensional space to form a feature vector suitable for model processing.

[0095] Next, positional encoding is performed. After converting the image patches into feature vectors, positional encoding is added to preserve the spatial information of the original image patches. Positional encoding can be learned or generated using fixed sine and cosine functions, ensuring that the model can understand the relative positional relationships between the individual image patches.

[0096] Then, a multi-head self-attention (MSA) mechanism is applied to the Transformer encoder layer.

[0097] Multi-head self-attention is a core part of Transformer, allowing the model to simultaneously focus on information from different representation subspaces within the same layer.

[0098] The specific operations include calculating the query (Q), key (K), and value (V) matrices, and obtaining the output through a scaling dot product attention mechanism.

[0099]

[0100] It is the dimension of the key vector, used to adjust the scale of the dot product result to prevent gradient vanishing or exploding.

[0101] Meanwhile, the Feed-Forward Network (FFN), which follows the Multi-Head Self-Attention (MSA) mechanism, connects a fully connected feed-forward network after each MSA layer. It contains two linear transformations and a ReLU activation function for further processing and transforming features.

[0102] Then, residual connections and layer normalization are implemented in each Transformer encoder layer. This helps accelerate the training process and stabilize the gradient flow, making deep networks easier to optimize.

[0103] Then, after deep feature extraction by a multi-layer Transformer encoder, the final feature representation is fed into a simple classification head (usually one or more fully connected layers) to predict the weather category to which the input image belongs.

[0104] While performing the above steps, cross-entropy loss is used as the objective function to guide parameter updates during training. Cross-entropy loss is used to measure the difference between the model's predictions and the true labels. At the same time, the Adam optimizer is used, combined with learning rate scheduling strategies such as learning rate warm-up and decay, to help the model converge faster and achieve better performance.

[0105] Example 4:

[0106] like Figure 5 As shown, this embodiment discloses an intelligent meteorological disaster weather recognition system based on AI image recognition. The system structure includes:

[0107] Data Acquisition and Preprocessing Module: This module collects meteorological image data from multiple sources, including but not limited to professional meteorological satellite images (such as TWI, MWI, and MWD datasets), images taken by ground meteorological stations, images acquired by traffic monitoring cameras, and publicly available meteorological image datasets (such as the Image2Weather dataset). This data covers meteorological images of different resolutions, formats, and shooting angles, providing a rich variety of meteorological information.

[0108] The collected raw image data undergoes initial screening to remove blurry, damaged, or incorrectly labeled images, ensuring data quality. Since images from different sources vary in size and resolution, all images are adjusted to a uniform size and resolution for easier subsequent processing. For example, images are uniformly scaled to a fixed pixel size (e.g., 224×224 pixels) to eliminate format differences.

[0109] Meteorological images are labeled by professional meteorologists or through crowdsourcing to identify the types of meteorological disasters (such as rainstorms, snowstorms, fog, typhoons, etc.) and related meteorological element information (such as precipitation, wind speed, visibility, etc.) contained in the images, providing accurate label data for model training.

[0110] Dataset augmentation module: Deployed with a Generative Adversarial Network (GAN) to augment the meteorological image dataset. The GAN consists of a generator G and a discriminator D.

[0111] The generator takes random noise as input and learns the data distribution of real weather images through a multi-layer neural network to generate synthetic images that resemble real weather images. During training, the generator continuously adjusts its parameters to generate more realistic and diverse weather images, such as images simulating rainstorm clouds of different intensities and shapes.

[0112] The discriminator is used to judge the input image, distinguishing whether it comes from a real dataset or is a synthetic image generated by the generator. The discriminator improves its discrimination ability by optimizing its own parameters, prompting the generator to produce higher-quality images. The two train against each other, and after multiple iterations, the generator can produce a large number of high-quality synthetic meteorological images. These, along with the original real images, constitute an expanded dataset, increasing the diversity and quantity of data and improving the model's generalization ability.

[0113] Feature extraction and learning module: Deploys the Transformer visual recognition model.

[0114] The module divides the preprocessed meteorological image into fixed-size image blocks, such as 16×16 pixel blocks, and treats each image block as a "token".

[0115] A linear transformation is performed on each image patch, mapping it to a high-dimensional feature vector to obtain the initial feature representation. Simultaneously, to preserve the spatial location information of the image patch within the original image, positional encoding is added, enabling the model to perceive the spatial structure of the image and understand the relationships between different regions.

[0116] The model encoder consists of multiple stacked Transformer encoder layers and is the core part of the model.

[0117] The Transformer encoder layer employs a multi-head self-attention mechanism, computing attention in parallel across multiple "heads" to capture long-range dependencies in meteorological images from different perspectives. The input feature vectors are mapped to query (Q), key (K), and value (V) matrices, respectively, using the formula:

[0118]

[0119] Attention weights are calculated to obtain the fused feature representation. The results from multiple images are then concatenated and subjected to a linear transformation to more comprehensively capture complex feature patterns in meteorological images, such as the interaction between different cloud systems and the distribution of precipitation areas.

[0120] By combining feedforward neural networks, the features output by the multi-head self-attention mechanism are further transformed and processed. This typically consists of two fully connected layers. The first layer maps the input features to a higher dimension, increasing the model's expressive power, and then introduces non-linearity through an activation function (such as ReLU). The second layer then maps the high-dimensional features back to the original or target dimension to obtain the final output features. This process can further refine features and extract more valuable information from meteorological images.

[0121] Residual connections and layer normalization are used to address the vanishing gradient problem in deep networks and accelerate model training convergence. Residual connections allow gradients to be passed directly from one layer to another, which helps solve the gradient vanishing problem and accelerates model training convergence. Layer normalization normalizes the input of each neuron, making the input data have a similar distribution and stabilizing the training process.

[0122] The output section consists of fully connected layers that map the feature vectors processed by the encoder module to probability distributions for different meteorological disaster weather categories. The difference between the predicted results and the true labels is measured using methods such as cross-entropy loss, guiding model training and parameter tuning, and ultimately outputting the identification results of meteorological disaster weather.

[0123] The system also includes a transfer learning module: a pre-trained Transformer model trained on a large-scale meteorological dataset is loaded into the system, which has learned general meteorological image features and patterns.

[0124] For specific application scenarios (such as fixed traffic monitoring or agricultural meteorological monitoring), meteorological image datasets for those scenarios are acquired. While keeping most parameters of the pre-trained model unchanged, only some parameters of the model (such as parameters of the output layer or some network layer parameters near the output layer) are adjusted. The loss function of transfer learning is minimized.

[0125]

[0126] This enables the model to quickly adapt to the characteristics of meteorological images in specific scenarios, thereby improving the accuracy and efficiency of meteorological disaster weather identification in those scenarios.

[0127] Based on the above model structure, the model of this invention achieves intelligent identification of meteorological disasters. In practical applications, users can capture or acquire meteorological images through the system or devices, and then input these images into the model system. The system will utilize the pre-trained Transformer model, combined with the transfer learning module, to perform feature extraction and pattern recognition on the images. The model system also supports real-time feedback and storage of the recognition results, facilitating subsequent analysis and processing by the user.

[0128] The present invention also provides an electronic device, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 6 As shown, the electronic device may include a processor, a communications interface, memory, and a communication bus, wherein the processor, communications interface, and memory communicate with each other via the communication bus. The processor can invoke logical instructions from the memory, for example, to execute the following method:

[0129] S1. Unify the size of multiple datasets and merge them to obtain a comprehensive dataset;

[0130] S2. The comprehensive dataset enhances the quality and diversity of the dataset through a GAN network to generate a weather recognition dataset;

[0131] S3. Using the Transformer visual recognition model, perform deep analysis and learning on the generated weather recognition dataset to complete meteorological and weather recognition and output the recognition results.

[0132] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0133] This invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments, including, for example:

[0134] S1. Unify the size of multiple datasets and merge them to obtain a comprehensive dataset;

[0135] S2. The comprehensive dataset enhances the quality and diversity of the dataset through a GAN network to generate a weather recognition dataset;

[0136] S3. Using the Transformer visual recognition model, perform deep analysis and learning on the generated weather recognition dataset to complete meteorological and weather recognition and output the recognition results.

[0137] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for intelligent identification of meteorological disaster weather based on AI image recognition, characterized in that, include: S1. Unify the size of multiple datasets and merge them to obtain a comprehensive dataset; S2. The comprehensive dataset enhances the quality and diversity of the dataset through a GAN network to generate a weather recognition dataset; S3. Using the Transformer visual recognition model, perform deep analysis and learning on the generated weather recognition dataset to complete meteorological and weather recognition and output the recognition results.

2. The method according to claim 1, characterized in that, The following is stated: When training and tuning the Transformer visual recognition model, transfer learning is performed on a specific domain weather dataset to fine-tune the model parameters.

3. The method according to claim 1, characterized in that, The various datasets include: TWI, MWI, MWD, and Image2Weather datasets.

4. The method according to claim 1, characterized in that, The enhancement of the quality and diversity of the comprehensive dataset through GAN networks in S2 includes: GAN networks use generators to generate new, seemingly realistic samples based on a comprehensive input dataset; GAN networks utilize a discriminator to evaluate the authenticity of these samples, determining whether they come from a real aggregate dataset or were created by a generator; By having the generator and discriminator compete with each other and continuously optimize their performance, the generator produces high-quality and realistic data samples, which are then expanded to form a weather recognition dataset. The objective function of the GAN network is expressed as follows: ; x is a real data sample, z is random noise input, G(z) is a fake sample generated by the generator, D(x) is the probability of the discriminator judging the real data, and D(G(z)) is the probability of the discriminator judging the generated data.

5. The method according to claim 1, characterized in that, The Transformer visual recognition model captures long-range dependencies in meteorological images through a self-attention mechanism, the formula for which is expressed as: ; Where Q is the query matrix, K is the key matrix, V is the value matrix, and dk is the dimension of the key vector.

6. The method according to claim 5, characterized in that, The overall output of the Transformer visual recognition model is based on a multi-head attention mechanism and a feedforward network, and is expressed by the following formula: ; ; in, , , , It is a learnable weight matrix.

7. The method according to claim 2, characterized in that, The loss function for fine-tuning model parameters through transfer learning of a specific domain weather dataset is: ; in, denoted as the data distribution for the target task, F(x) represents the features extracted by the pre-trained model, C(F(x)) is the output of the fine-tuned classifier, and ℓ is the loss function.

8. The method according to claim 2, characterized in that, The training process of the Transformer visual recognition model includes: The meteorological image is segmented into fixed-size image patches, and the image patches are linearly embedded to form feature vectors; Positional encoding is added to the embedded feature vectors to preserve the spatial information of image patches; Feature extraction is performed through multiple Transformer encoder layers, each of which includes a multi-head self-attention mechanism, a feedforward neural network, residual connections, and layer normalization. The extracted features are fed into the classification head, and the cross-entropy loss function guides the parameter updates during the training process, enabling model training and parameter tuning.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 8.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for generating desensitized meteorological data

    CN113536373A

  • Monocular camera 3D target detection method based on transfer learning suitable for extreme weather

    CN118864819A

  • Foggy day illegal sand dredger identification method and system based on deep learning

    CN119169500A

  • Weather forecast learning system based on artificial intelligence algorithm

    CN120178381A

Cited By

  • Power system extreme weather scene small sample generation and identification method based on multi-generator-evaluator cooperation mechanism and storage medium

    CN122173937A