Meteorological prediction method and system, electronic equipment and medium

By combining membership theory and neural network technology, using K-mean algorithm and multi-head attention mechanism to build a meteorological membership detection model, the problem of insufficient meteorological prediction accuracy in the existing technology is solved, and a higher accuracy and reliability meteorological environment is achieved Forecasting, supporting decision-making and management in multiple fields.

CN119105111APending Publication Date: 2024-12-10SICHUAN ZHONGDIAN AOSTAR INFORMATION TECHNOLOGIES CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411182368.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The prior art is difficult to provide high-precision and reliable meteorological forecasts, affecting decision-making and management in areas such as agriculture, transportation and renewable energy.

Method used

Combining membership theory and neural network technology, the K-mean algorithm is used to divide meteorological types, and a meteorological type membership detection model is constructed based on the multi-head attention mechanism. The membership of meteorological data is calculated through feature extraction, object detection and feature output modules. To predict weather types.

Benefits of technology

It improves the accuracy and reliability of meteorological forecasting, can provide more accurate prediction results under complex and changing climate conditions, and supports decision-making in areas such as meteorological forecasting, agricultural production and disaster warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105111A_ABST
    Figure CN119105111A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of meteorological prediction, and discloses a meteorological prediction method and system, an electronic device and a medium, and the method comprises the steps: S1, employing a K-mean algorithm to divide daily historical meteorological data into K meteorological types; s2, calculating the degree of membership of the weather forecast data at the moment to be predicted to K weather types; s3, setting a meteorological type membership degree detection model based on a multi-head attention mechanism; s4, obtaining a trained meteorological type membership degree detection model, inputting the meteorological data into the meteorological type membership degree detection model, and obtaining a membership degree corresponding to the meteorological data; and S5, predicting the weather type according to the membership degree. The system comprises a meteorological type division unit, a membership calculation unit, a model construction unit and a meteorological type prediction unit. According to the method, the membership theory and the neural network technology are combined, and accurate and reliable meteorological prediction can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of weather forecasting, and in particular to a weather forecasting method and system, electronic equipment, and medium. Background Art

[0002] Weather changes have a profound impact on multiple industries, such as agriculture, tourism, and transportation. Accurate weather forecasts help companies prepare in advance and adjust production plans, inventory management, and logistics arrangements, thereby reducing losses caused by weather changes. If weather forecasts are not accurate enough, companies will not be able to make timely and appropriate decisions, which will significantly weaken their ability to cope with market fluctuations. Therefore, improving the accuracy of weather forecasts is crucial to production and life.

[0003] In order to cope with severe weather conditions and rationally plan agricultural activities, transportation and outdoor activities, it is necessary to accurately predict meteorological conditions and obtain the most suitable meteorological forecast data for renewable energy power generation, thereby providing strong support for power forecasting of hydropower and new energy, and further optimizing scheduling and power generation plan management. Summary of the invention

[0004] The present invention provides a method and system for weather forecasting, electronic equipment and medium, which combine membership theory and neural network technology to achieve more accurate and reliable weather forecasting. The method can better analyze complex weather data, thereby providing more detailed and accurate weather forecasts.

[0005] The present invention is achieved through the following technical solution: A method for weather forecasting comprises the following steps:

[0006] Step S1, using K-means algorithm to divide daily historical meteorological data into K meteorological types;

[0007] Step S2, calculating the membership of the weather forecast data at the time to be predicted to the K types of weather types;

[0008] Step S3, setting a meteorological type membership detection model based on a multi-head attention mechanism, wherein the meteorological type membership detection model includes a feature extraction module, a target detection module and a feature output module;

[0009] Step S4, training the meteorological type membership detection model, obtaining the trained meteorological type membership detection model, inputting meteorological data into the meteorological type membership detection model, and obtaining the membership corresponding to the meteorological data;

[0010] Step S5, predicting the meteorological type according to the degree of membership.

[0011] In order to better implement the present invention, further, step S1 includes:

[0012] Step S11, normalizing the meteorological features in each meteorological sample, and randomly selecting K meteorological samples as initial clustering centers;

[0013] Step S12, calculating the distance between each meteorological sample and each cluster center, and assigning it to the cluster center closest to it;

[0014] Step S13, after all meteorological samples are assigned, the mean of the clustering features of all meteorological samples in each category is calculated as a new cluster center;

[0015] Step S14, continuously repeating steps S12 to S14 until the distance between the cluster centers before and after the update is less than a threshold, and K different meteorological types are obtained.

[0016] In order to better implement the present invention, further, step S2 includes: defining a meteorological subset and its corresponding cluster center, and obtaining the membership degree of the meteorological forecast data at the time to be predicted by calculating the Euclidean distance from the meteorological forecast data at the time to be predicted to each cluster center;

[0017] The membership formula is expressed as Among them, Q represents the meteorological characteristics of the meteorological forecast data at the time to be predicted, and C k Represents the meteorological subset The cluster center, D(Q, C k ) represents the Euclidean distance from Q to each cluster center.

[0018] In order to better implement the present invention, further, in step S3,

[0019] The feature extraction module includes a graph convolution layer, a first normalization layer, and a linear correction layer;

[0020] The target detection module includes a first residual connection layer, a second residual connection layer, a third residual connection layer, a multi-head attention mechanism layer, a weight addition layer, a dynamic graph convolution layer, a second normalization layer, and a feature addition module;

[0021] The feature output module includes a fully connected layer.

[0022] In order to better realize the present invention, further, the graph convolution layer, the first normalization layer, and the linear correction layer are connected in sequence from front to back; the linear correction layer is respectively connected to the first residual connection layer, the second residual connection layer and the third residual connection layer, the first residual connection layer and the second residual connection layer are connected in parallel to the multi-head attention mechanism layer, the third residual connection layer and the multi-head attention mechanism layer are connected in parallel to the weight addition layer, and the weight addition layer is connected in sequence from front to back to the dynamic graph convolution layer, the second normalization layer, the feature addition module and the fully connected layer.

[0023] In order to better implement the present invention, further, step S4 includes: marking the daily historical meteorological data into training sets, validation sets and test sets in proportion, setting hyperparameters, using the training set and loss function to guide the learning of the meteorological type membership detection model, and outputting the trained improved face recognition network model.

[0024] In order to better implement the present invention, further, the loss function includes an L1 loss function, and is expressed as Among them, k i and They represent the predicted value and the corresponding true value of the i-th meteorological sample respectively, N is the number of meteorological samples, and Loss represents the super-resolution loss based on the multi-head attention mechanism.

[0025] The present invention also provides a weather forecasting system, comprising a weather type classification unit, a membership calculation unit, a model building unit and a weather type prediction unit, wherein:

[0026] A meteorological type classification unit is used to classify daily historical meteorological data into K meteorological types using a K-means algorithm; a membership calculation unit is used to calculate the membership of the meteorological forecast data at the time to be predicted to the K meteorological types;

[0027] A model building unit, used for setting a meteorological type membership detection model based on a multi-head attention mechanism, wherein the meteorological type membership detection model includes a feature extraction module, a target detection module and a feature output module;

[0028] The meteorological type prediction unit is used to train the meteorological type membership detection model, obtain the trained meteorological type membership detection model, input meteorological data into the meteorological type membership detection model, and obtain the membership corresponding to the meteorological data; and predict the meteorological type according to the membership.

[0029] The present invention also provides an electronic device, which includes a processor and a memory; the processor includes the weather forecast system described in the second aspect above.

[0030] The present invention also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the electronic device described in the third aspect, the electronic device executes the method described in the first aspect.

[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0032] (1) The present invention provides a method for weather forecasting, which combines membership theory with neural network technology, and can make full use of the advantages of both to improve the accuracy and reliability of weather forecasting;

[0033] (2) The present invention provides a method for weather forecasting that can not only process complex meteorological data, but also provide more accurate forecast results under changing climate conditions, thereby providing strong support for decision-making in multiple fields such as weather forecasting, agricultural production, and disaster warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The present invention is further described in conjunction with the following drawings and embodiments, and all the concepts and innovations of the present invention should be regarded as the disclosed contents and the protection scope of the present invention.

[0035] Figure 1 A flow chart of a weather forecasting method provided in an embodiment of the present application.

[0036] Figure 2 A schematic diagram of the structure of the meteorological type membership detection model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, and therefore should not be regarded as limiting the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without making creative work are within the scope of protection of the present invention.

[0038] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "disposed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0039] Embodiment 1:

[0040] A weather forecasting method of this embodiment uses a K-means algorithm to divide historical weather data into K types of weather. Figure 1 As shown, the specific steps of the method are as follows:

[0041] Step S1, using K-means algorithm to divide daily historical meteorological data into K meteorological types;

[0042] Step S2, calculating the membership of the weather forecast data at the time to be predicted to the K types of weather types;

[0043] Step S3, setting a meteorological type membership detection model based on a multi-head attention mechanism, wherein the meteorological type membership detection model includes a feature extraction module, a target detection module and a feature output module;

[0044] Step S4, training the meteorological type membership detection model, obtaining the trained meteorological type membership detection model, inputting meteorological data into the meteorological type membership detection model, and obtaining the membership corresponding to the meteorological data;

[0045] Step S5, predicting the meteorological type according to the degree of membership.

[0046] Specifically, the method for cluster analysis of meteorological data is as follows.

[0047] 1) Data preprocessing: First, the meteorological characteristics in each meteorological sample need to be carefully normalized to ensure the accuracy and effectiveness of subsequent analysis. The normalization process involves scaling the data to a specific range, such as between 0 and 1, or making it have zero mean and unit variance. After normalization, it is necessary to randomly select K meteorological samples as the initial clustering centers, which will serve as the starting point for subsequent iterative processes. The method for selecting the initial clustering centers can be random selection, or more complex methods such as K-means++ can be used to improve the quality and convergence speed of clustering.

[0048] During the data preprocessing, the meteorological characteristics of each meteorological sample are normalized, and K meteorological samples are randomly selected as the initial clustering centers.

[0049] 2) Meteorological sample allocation: In the meteorological sample allocation stage, we need to calculate the distance between each meteorological sample and each cluster center. Usually Euclidean distance is used as the metric, but other distance metrics such as Manhattan distance or cosine similarity can also be selected according to the specific problem. After calculating the distance, each meteorological sample is assigned to the cluster center with the closest distance, thus forming a preliminary clustering result.

[0050] Calculate the distance between each meteorological sample and each cluster center and assign it to the cluster center with the closest distance.

[0051] 3) Update cluster centers: After all meteorological samples are assigned to corresponding cluster centers, we need to recalculate the feature mean of all meteorological samples in each cluster to obtain a new cluster center. This mean is calculated based on the feature values ​​of all meteorological samples in the cluster, with the goal of making the new cluster center closer to the center position of the meteorological samples in the current cluster.

[0052] After all meteorological samples are assigned, the mean of the clustering characteristics of all meteorological samples in each category is calculated as the new cluster center.

[0053] 4) Determine the threshold: Repeat steps 2) to 4) until the distance between the cluster centers before and after the update is less than the threshold. Repeat the above process of meteorological sample allocation and cluster center update until a certain stopping condition is met. Usually, this stopping condition is that the distance between the cluster centers before and after the update is less than a preset threshold. This threshold can be a fixed value or a relatively small change to ensure the convergence of the clustering process.

[0054] Through the above steps, we can get K different meteorological types, each type corresponds to a group of meteorological samples with similar characteristics. These meteorological types can be different weather conditions such as sunny, cloudy, rainy, etc., and each type has its own unique characteristics and attributes. Ultimately, through this clustering method, we can better understand and analyze meteorological data, and provide strong support for meteorological forecasting, climate research, etc.

[0055] Embodiment 2:

[0056] This embodiment is further optimized on the basis of embodiment 1. In the process of weather forecasting, we usually obtain some key meteorological data, which can be used to predict future weather conditions. Specifically, we have a weather forecast data set Q at the time to be predicted, which contains various meteorological characteristics, such as temperature, humidity, wind speed, etc. In order to better understand these data and compare them with known meteorological types, we need to calculate the membership of the weather forecast data Q at the time to be predicted to the K meteorological types.

[0057] The calculation method of membership degree is as follows: First, we define a meteorological subset, each of which has a cluster center, which represents the typical characteristics of the subset. Then, we calculate the Euclidean distance from the meteorological forecast data Q at the time to be predicted to each cluster center. Euclidean distance is a method to measure the distance between two points in multidimensional space. It can help us quantify the similarity between the weather at the time to be predicted and each cluster center.

[0058] Specifically, the smaller the distance between the weather at the time to be predicted and a cluster center, the greater the similarity between it and the type of weather. By calculating these distances, we can get a membership value, which reflects the similarity between the weather at the time to be predicted and each type of weather. Finally, by comparing these membership values, we can determine which type of weather the weather at the time to be predicted is closest to, thereby providing a more accurate reference for weather forecasting.

[0059] Input the weather forecast data Q at the time to be predicted, and calculate the membership degree ω for each weather type i as follows: Among them, Q represents the meteorological characteristics of the meteorological forecast data at the time to be predicted, and C k Represents the meteorological subset The cluster center, D(Q, C k ) represents the Euclidean distance from Q to each cluster center. The smaller the distance between the weather at the time of prediction and a cluster center, the greater the similarity with the type of weather.

[0060] By conducting detailed analysis and calculations on various meteorological types, we can derive their respective memberships, which represent the degree of belonging of a certain meteorological state to a specific type (i.e., its probability or weight in that type). In this way, we can more accurately judge and predict meteorological changes, thus providing a scientific basis for relevant decision-making.

[0061] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0062] Embodiment 3:

[0063] This embodiment is further optimized on the basis of the above-mentioned embodiment 1 or embodiment 2. The data used in the present invention is mainly daily meteorological data. In order to facilitate model prediction and improve the speed of model learning and convergence, it is necessary to convert the data set into a format suitable for model processing, that is, set it as a training set, a validation set and a test set in a ratio of 7:2:1.

[0064] The other parts of this embodiment are the same as any of the above embodiments 1-2, so they are not repeated here.

[0065] Embodiment 4:

[0066] This embodiment is further optimized based on any one of the above embodiments 1-3. Figure 2 As shown, the meteorological type membership detection model includes a feature extraction module, a target detection module and a feature output module.

[0067] The feature extraction module includes a graph convolution layer, a first normalization layer, and a linear correction layer;

[0068] The target detection module includes a first residual connection layer, a second residual connection layer, a third residual connection layer, a multi-head attention mechanism layer, a weight addition layer, a dynamic graph convolution layer, a second normalization layer, and a feature addition module;

[0069] The feature output module includes a fully connected layer.

[0070] The graph convolution layer, the first normalization layer, and the linear correction layer are connected from front to back; the linear correction layer is connected to the first residual connection layer, the second residual connection layer, and the third residual connection layer respectively; the first residual connection layer and the second residual connection layer are connected in parallel to the multi-head attention mechanism layer; the third residual connection layer and the multi-head attention mechanism layer are connected in parallel to the weight addition layer; the weight addition layer is connected to the dynamic graph convolution layer, the second normalization layer, the feature addition module, and the fully connected layer from front to back.

[0071] Since the L1 loss function has better network convergence ability, the present invention uses the L1 loss function as the network loss function, which is expressed as

[0072] Among them, k i and They represent the predicted value and the corresponding true value of the i-th meteorological sample respectively, N is the number of meteorological samples, and Loss represents the super-resolution loss based on the multi-head attention mechanism.

[0073] The other parts of this embodiment are the same as any one of the above embodiments 1-3, so they are not repeated here.

[0074] Embodiment 5:

[0075] This embodiment is further optimized on the basis of any one of the above embodiments 1-4. The present invention constructs a meteorological type membership detection model which is formed by integrating a dynamic graph convolution layer and an attention mechanism. The attention mechanism is embedded in the dynamic graph convolution layer to more effectively extract spatial feature information. Through a fixed graph convolution layer and a dynamic graph convolution layer, the fixed and directed dynamic components of spatial dependence are explored respectively, and the global spatial features learned are integrated using the attention mechanism.

[0076] The other parts of this embodiment are the same as any one of the above embodiments 1-4, so they are not repeated here.

[0077] Embodiment 6:

[0078] The present invention also provides a weather forecasting system, comprising a weather type classification unit, a membership calculation unit, a model building unit and a weather type prediction unit; Figure 1 The method shown.

[0079] The present invention also provides an electronic device, which includes a processor and a memory; the processor includes the weather forecast system described above.

[0080] Embodiment 7:

[0081] The present invention also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the electronic device described in the above embodiment, the electronic device executes the method described in the above embodiment. Optionally, the computer-readable storage medium may be a memory.

[0082] The processor involved in the embodiments of the present application may be a chip. For example, it may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0083] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0084] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0085] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0087] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0088] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0089] In addition, each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.

[0090] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0091] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for weather forecasting, It is characterized in that The following steps are involved: Step S1, using K-means algorithm to divide daily historical meteorological data into K meteorological types; Step S2, calculating the membership of the weather forecast data at the time to be predicted to the K types of weather types; Step S3, setting a meteorological type membership detection model based on a multi-head attention mechanism, wherein the meteorological type membership detection model includes a feature extraction module, a target detection module and a feature output module; Step S4, training the meteorological type membership detection model, obtaining the trained meteorological type membership detection model, inputting meteorological data into the meteorological type membership detection model, and obtaining the membership corresponding to the meteorological data; Step S5, predicting the meteorological type according to the degree of membership.

2. A method for weather forecasting according to claim 1, It is characterized in that The step S1 comprises: Step S11, normalizing the meteorological features in each meteorological sample, and randomly selecting K meteorological samples as initial clustering centers; Step S12, calculating the distance between each meteorological sample and each cluster center, and assigning it to the cluster center closest to it; Step S13, after all meteorological samples are assigned, the mean of the clustering features of all meteorological samples in each category is calculated as a new cluster center; Step S14, continuously repeating steps S12 to S14 until the distance between the cluster centers before and after the update is less than a threshold value, and K different meteorological types are obtained.

3. A method for weather forecasting according to claim 1, It is characterized in that The step S2 comprises: Define a meteorological subset and its corresponding cluster center, and obtain the membership degree of the meteorological forecast data at the time to be predicted by calculating the Euclidean distance from the meteorological forecast data at the time to be predicted to each cluster center; The membership formula is expressed as Among them, Q represents the meteorological characteristics of the meteorological forecast data at the time to be predicted, C k Represents the meteorological subset The cluster center, D(Q, C k ) represents the Euclidean distance from Q to each cluster center.

4. A method for weather forecasting according to claim 1, It is characterized in that The feature extraction module includes a graph convolution layer, a first normalization layer, and a linear correction layer; The target detection module includes a first residual connection layer, a second residual connection layer, a third residual connection layer, a multi-head attention mechanism layer, a weight addition layer, a dynamic graph convolution layer, a second normalization layer, and a feature addition module; The feature output module includes a fully connected layer.

5. A method for weather forecasting according to claim 4, It is characterized in that The graph convolution layer, the first normalization layer, and the linear correction layer are connected in sequence from front to back; the linear correction layer is connected to the first residual connection layer, the second residual connection layer, and the third residual connection layer, respectively; the first residual connection layer and the second residual connection layer are connected in parallel to the multi-head attention mechanism layer; the third residual connection layer and the multi-head attention mechanism layer are connected in parallel to the weight addition layer; the weight addition layer is connected to the dynamic graph convolution layer, the second normalization layer, the feature addition module, and the fully connected layer in sequence from front to back.

6. A method for weather forecasting according to claim 1, It is characterized in that The step S4 comprises: The daily historical meteorological data are proportionally labeled as training sets, validation sets and test sets, hyperparameters are set, the training sets and loss functions are used to guide the learning of the meteorological type membership detection model, and the trained improved face recognition network model is output.

7. A method for weather forecasting according to claim 6, It is characterized in that The loss function includes the L1 loss function and is expressed as Among them, k i and They represent the predicted value and the corresponding true value of the i-th meteorological sample respectively, N is the number of meteorological samples, and Loss represents the super-resolution loss based on the multi-head attention mechanism.

8. A weather forecasting system. It is characterized in that It includes a meteorological type classification unit, a membership calculation unit, a model building unit and a meteorological type prediction unit, wherein: A meteorological type classification unit is used to classify daily historical meteorological data into K meteorological types using a K-means algorithm; A membership calculation unit, used to calculate the membership of the meteorological forecast data at the time to be predicted to the K meteorological types; A model building unit, used for setting a meteorological type membership detection model based on a multi-head attention mechanism, wherein the meteorological type membership detection model includes a feature extraction module, a target detection module and a feature output module; The meteorological type prediction unit is used to train the meteorological type membership detection model, obtain the trained meteorological type membership detection model, input meteorological data into the meteorological type membership detection model, and obtain the membership corresponding to the meteorological data; and is used to predict the meteorological type according to the membership.

9. An electronic device, It is characterized in that It comprises a processor and a memory; the processor comprises the weather forecasting system as claimed in claim 8.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes instructions; when the instructions are executed on the electronic device as claimed in claim 9, the electronic device executes the method as claimed in any one of claims 1 to 7.

Citation Information

Cited By

  • Regional meteorological model error control method based on neural network

    CN121327748A