Meteorological prediction method and system based on space-time fusion attention mechanism

By introducing a deep learning model of the space-time fusion attention mechanism in meteorological prediction, the limitations of traditional meteorological prediction methods in terms of accuracy and timeliness are solved, and more efficient meteorological data prediction is achieved.

CN119986857APending Publication Date: 2025-05-13SICHUAN ZHONGDIAN AOSTAR INFORMATION TECHNOLOGIES CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510024453.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Traditional meteorological prediction methods have limitations in prediction accuracy and timeliness, and existing deep learning-based meteorological prediction methods fail to fully consider the spatial and temporal correlation of meteorological data.

Method used

A meteorological prediction method based on the temporal and spatial fusion attention mechanism is proposed. By constructing a deep learning model including the temporal attention module, the spatial and fusion module, the temporal and spatial correlation of meteorological data is captured and meteorological prediction is carried out.

Benefits of technology

It significantly improves the accuracy of meteorological prediction, can automatically learn the complex relationships and spatial and temporal changes between different meteorological elements, and is suitable for meteorological data prediction in different regions and seasons, meeting the timeliness requirements of meteorological prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119986857A_ABST
    Figure CN119986857A_ABST
Patent Text Reader

Abstract

The invention relates to a meteorological prediction method and system based on a space-time fusion attention mechanism, and the method comprises the specific steps: collecting historical meteorological data of multiple regions, carrying out the classification and collection of the historical meteorological data according to a time sequence and a region position, and carrying out the normalization and preprocessing; constructing a meteorological prediction deep learning model based on a space-time fusion attention mechanism, wherein the meteorological prediction model comprises a time attention module, a space attention module and a fusion module; the time attention module performs time sequence feature extraction by using a multi-layer perceptron, calculates a time attention weight, and fuses the time sequence feature and the time attention weight to obtain a weighted time sequence feature; and the space attention module performs space feature extraction by using a convolutional neural network, calculates space attention weights among different regions, and fuses the space features and the space attention weights to obtain weighted space features.
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 based on a spatiotemporal fusion attention mechanism. Background Art

[0002] With the continuous advancement of science and technology, weather forecasting technology is also developing continuously. Traditional weather forecasting methods are mainly based on physical models and numerical simulations. They use high-performance computers to solve equations to predict future weather conditions by mathematically modeling the physical processes of atmospheric movement. These methods can provide relatively accurate weather forecasts to a certain extent, but there are some limitations. On the one hand, the construction of physical models requires an in-depth understanding and precise parameterization of the physical processes of the atmosphere. However, the atmospheric system is a highly complex nonlinear system with many physical processes and uncertainties that are difficult to accurately describe, which results in certain limitations on the prediction accuracy of physical models. On the other hand, numerical simulations require a lot of computing resources and time, and are highly sensitive to initial and boundary conditions. Small errors may continue to magnify over time, affecting the accuracy and reliability of the prediction.

[0003] Weather forecasting is of great significance to people's daily life, agricultural production, transportation and many other aspects. Traditional weather forecasting methods are mainly based on meteorological principles and statistical analysis, but with the continuous increase in the amount of meteorological data and the increase in data complexity, traditional methods are gradually unable to meet the needs in terms of prediction accuracy and timeliness. In recent years, deep learning technology has been widely used in the field of weather forecasting, but most of the existing weather forecasting methods based on deep learning fail to fully consider the spatiotemporal correlation of meteorological data, or only consider the impact of one aspect on weather forecasting, resulting in certain limitations in the prediction results. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention proposes a weather forecasting method and system based on spatiotemporal fusion attention mechanism.

[0005] The technical solution of the present invention is as follows:

[0006] On the one hand, the present invention proposes a weather forecasting method based on a spatiotemporal fusion attention mechanism, the specific steps of which include:

[0007] Collect historical meteorological data from multiple regions, classify and aggregate the historical meteorological data according to time series and regional location, and then normalize and preprocess them;

[0008] Constructing a deep learning model for weather forecasting based on a spatiotemporal fusion attention mechanism, wherein the weather forecasting model includes a temporal attention module, a spatial attention module, and a fusion module;

[0009] The time attention module uses a multi-layer perceptron to extract time series features, calculates time attention weights, and fuses time series features with time attention weights to obtain weighted time series features;

[0010] The spatial attention module uses a convolutional neural network to extract spatial features, calculates spatial attention weights between different regions, and fuses spatial features with spatial attention weights to obtain weighted spatial features;

[0011] The fusion module combines the weighted time series features and spatial features to obtain fusion features;

[0012] The historical meteorological data sets classified by time series and regional location are used as the input of the temporal attention module and the spatial attention module respectively, and the true value of the historical meteorological data at the prediction moment is used as the output to train the meteorological forecast model based on the spatiotemporal fusion attention mechanism.

[0013] Use the trained weather forecast model to make weather forecasts that take into account the influence of time series and regional location.

[0014] As a preferred implementation, the historical meteorological data are collected through methods including ground meteorological station observations, balloon high-altitude meteorological observations, meteorological satellite remote sensing detection, meteorological radar detection, aircraft detection and ocean buoy observations.

[0015] As a preferred implementation, the method for normalizing the historical meteorological data is specifically as follows:

[0016] The Z-Score normalization method is used to normalize the historical meteorological data. The specific calculation formula is as follows:

[0017]

[0018] Where, X norm is the normalized result, x is the sample of historical meteorological data; μ is the mean of historical meteorological data, and σ is the standard deviation of historical meteorological data.

[0019] As a preferred implementation, the steps for calculating the temporal attention weight are specifically as follows:

[0020] The input vector x corresponding to each time step of the time series data t Through different linear transformations, we get the query vector q t , key vector k t Sum value vector v t ; Through the weight matrix W Q , W K , W V The specific transformation formula is as follows:

[0021] q t =x t W Q1

[0022] k t =x t W K1

[0023]

[0024] The default dimension of the input vector is d input1 , query vector q t , key vector k t Sum value vector v t The dimension is d model1 , calculate the dot product of the query vector at each time step and the key vector at other time steps to get the attention score e t , i , the specific calculation formula is as follows:

[0025]

[0026] In the formula, e t , i is the attention score of the t-th time step to the i-th time step, is the key vector at the i-th moment;

[0027] The attention score e obtained for each time step t , i Perform softmax normalization on all time steps to get the attention weight α t , i , the specific calculation formula is as follows:

[0028]

[0029] Where T is the total length of the time series.

[0030] As a preferred implementation, the steps for calculating the spatial attention weight are specifically as follows:

[0031] The feature vector x of each region i Through different linear transformations, we get the query vector q i , key vector k i Sum value vector v i ; Through the weight matrix W Q2 , W K2 , W V2 The specific transformation formula is as follows:

[0032] q i =xi W Q2

[0033] k i =x i W K2

[0034] v i =x i W V2

[0035] The default dimension of the input vector is d input2 , query vector q i , key vector k i Sum value vector v i The dimension is d model2 , calculate the dot product of the query vector of each region and the key vector of other regions to get the attention score e m , n , the specific calculation formula is as follows:

[0036]

[0037] In the formula, e m , n is the attention score of the mth region to the nth region, is the key vector of each n-th region;

[0038] The attention score e obtained for each region m , n Perform softmax normalization on all regions to obtain the attention weight α m , n , the specific calculation formula is as follows:

[0039]

[0040] Where N is the total number of regions.

[0041] As a preferred implementation, the fusion module splices the weighted time series features and spatial features to obtain fusion features in the following steps:

[0042] F=[T f ; S f ]

[0043] Where, T f Weighted time series features; S f is the weighted spatial feature.

[0044] As a preferred implementation, the loss function in the weather forecast deep learning model based on the spatiotemporal fusion attention mechanism adopts a mean square error loss function, specifically:

[0045]

[0046] In the formula, MSE is the mean square error, a is the number of samples, and y b is the true value of the bth sample, is the predicted value of the prediction model for the bth sample.

[0047] On the other hand, the present invention proposes a weather forecasting system based on a spatiotemporal fusion attention mechanism, the specific steps of which include:

[0048] The data collection and preprocessing module collects historical meteorological data from multiple regions, classifies and aggregates the historical meteorological data according to time series and regional location, and then normalizes and preprocesses them;

[0049] A prediction model building module, which builds a weather prediction deep learning model based on a spatiotemporal fusion attention mechanism, wherein the weather prediction model includes a time attention module, a space attention module, and a fusion module;

[0050] A time attention module, wherein the time attention module uses a multi-layer perceptron to extract time series features, calculates time attention weights, and fuses time series features with time attention weights to obtain weighted time series features;

[0051] A spatial attention module, wherein the spatial attention module uses a convolutional neural network to extract spatial features, calculates spatial attention weights between different regions, and fuses the spatial features with the spatial attention weights to obtain weighted spatial features;

[0052] A fusion module, wherein the fusion module combines the weighted time series features and the spatial features to obtain fusion features;

[0053] The training module takes the historical meteorological data set classified by time series and regional location as the input of the time attention module and the spatial attention module respectively, and takes the true value of the historical meteorological data at the prediction moment as the output to train the meteorological forecast model based on the spatiotemporal fusion attention mechanism;

[0054] The prediction module uses the trained meteorological prediction model to perform meteorological predictions that take into account the influence of time series and regional location.

[0055] On the other hand, the present invention proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a weather forecasting method based on a spatiotemporal fusion attention mechanism as described in any embodiment of the present invention is implemented.

[0056] On the other hand, the present invention proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a weather forecasting method based on a spatiotemporal fusion attention mechanism as described in any embodiment of the present invention.

[0057] The present invention has the following beneficial effects:

[0058] 1. Through the spatiotemporal fusion attention mechanism, the present invention can more effectively capture the spatiotemporal correlation of meteorological data, thereby significantly improving the accuracy of meteorological forecasts and providing people with more accurate meteorological information.

[0059] 2. The prediction model of the present invention can automatically learn the complex relationship between different meteorological elements and the changing laws at different time and space scales, and has good adaptability to meteorological data in different regions and seasons.

[0060] 3. The present invention is based on a deep learning framework, and the prediction model can quickly process a large amount of meteorological data, realize rapid prediction of meteorological conditions, and meet the requirements for timeliness of meteorological forecasts in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

[0064] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0065] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0066] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0067] Embodiment 1:

[0068] See also Figure 1 , a weather forecasting method based on spatiotemporal fusion attention mechanism, the specific steps include:

[0069] Collect historical meteorological data from multiple regions, classify and aggregate the historical meteorological data according to time series and regional location, and then normalize and preprocess them;

[0070] Constructing a deep learning model for weather forecasting based on a spatiotemporal fusion attention mechanism, wherein the weather forecasting model includes a temporal attention module, a spatial attention module, and a fusion module;

[0071] The time attention module uses a multi-layer perceptron to extract time series features, calculates time attention weights, and fuses time series features with time attention weights to obtain weighted time series features;

[0072] The spatial attention module uses a convolutional neural network to extract spatial features, calculates spatial attention weights between different regions, and fuses spatial features with spatial attention weights to obtain weighted spatial features;

[0073] The fusion module combines the weighted time series features and spatial features to obtain fusion features;

[0074] The historical meteorological data sets classified by time series and regional location are used as the input of the temporal attention module and the spatial attention module respectively, and the true value of the historical meteorological data at the prediction moment is used as the output to train the meteorological forecast model based on the spatiotemporal fusion attention mechanism.

[0075] Use the trained weather forecast model to make weather forecasts that take into account the influence of time series and regional location.

[0076] As a preferred implementation manner of this embodiment, the collection methods of the historical meteorological data include ground meteorological station observations, balloon high-altitude meteorological observations, meteorological satellite remote sensing detection, meteorological radar detection, aircraft detection and ocean buoy observations.

[0077] In this embodiment, the data collection methods of various data collection channels are specifically as follows:

[0078] Ground weather station observations:

[0079] Principle: Various meteorological instruments and equipment are used to directly measure the physical and chemical properties of the atmosphere at a fixed position on the ground to obtain local meteorological data.

[0080] Equipment and parameters: Common instruments include temperature sensors, humidity sensors, barometers, wind speed and direction instruments, rain gauges, etc., which can measure basic meteorological elements such as air temperature, air pressure, air humidity, wind direction and speed, and precipitation. Some weather stations are also equipped with more professional instruments to measure data such as evaporation, sunshine hours, ground temperature, and frozen soil depth.

[0081] Site requirements: The site selection and observation site setting of the meteorological station need to take into account the surrounding environmental factors. For example, it is necessary to avoid building it in places that may affect the observation data, such as buildings, forests, slopes, etc., to ensure the representativeness and accuracy of the collected data.

[0082] High-altitude meteorological observation

[0083] Principle: It is mainly carried out by balloons carrying sounding instruments to measure the physical and chemical characteristics of the free atmosphere from near the ground to 30 kilometers or even higher.

[0084] Equipment and parameters: Sondes can measure meteorological elements such as temperature, air pressure, humidity, wind direction and wind speed at different altitudes. Some can also measure special items such as atmospheric composition, ozone, radiation, atmospheric electricity, etc.

[0085] Observation time: Observations are usually conducted twice, at 7:00 and 19:00 Beijing time. A few stations will also conduct additional observations at 01:00 and 13:00 Beijing time. Some stations only observe high-altitude winds.

[0086] Meteorological satellite remote sensing detection

[0087] Principle: Meteorological satellites carry various observation instruments to observe the Earth's atmosphere from space, receive electromagnetic radiation signals from the atmosphere and the Earth's surface, and then obtain information on meteorological elements through inversion algorithms.

[0088] Advantages: It has the advantages of wide coverage and strong data continuity. It can observe meteorological parameters on a global scale and obtain data on various meteorological factors such as air quality, surface temperature, and hydrological cycle, providing a macro perspective and rich data support for meteorological research and forecasting.

[0089] Classification: According to satellite orbits, they can be divided into polar sun-synchronous orbit satellites and geosynchronous meteorological satellites. Polar sun-synchronous orbit satellites pass through all parts of the world at almost the same local time, and can achieve global coverage observation; geosynchronous meteorological satellites are stationary relative to a certain area and can continuously monitor weather changes in a fixed area.

[0090] Weather radar detection

[0091] Principle: Use the physical phenomena such as scattering and reflection produced by the interaction between electromagnetic waves and targets in the atmosphere to detect the distribution and changes of meteorological elements such as precipitation, clouds, and wind fields in the atmosphere.

[0092] Type: Common meteorological radars include weather radars and wind profiler radars. Weather radars are mainly used to monitor rainfall intensity, precipitation areas, and the movement of storms, while wind profiler radars can measure wind direction, wind speed, and other information at different heights.

[0093] Aircraft detection

[0094] Principle: Use meteorological observation instruments installed on the aircraft to observe the atmosphere in real time during the flight and obtain meteorological data along the route.

[0095] Equipment and parameters: It can measure meteorological elements such as temperature, air pressure, humidity, wind speed, wind direction, and can also collect information such as chemical composition and aerosols in the atmosphere. It is of great significance for studying the vertical structure of the atmosphere and small and medium-scale weather systems.

[0096] Ocean buoy observations

[0097] Principle: Various buoys are placed in the ocean, on which meteorological and oceanographic observation instruments are installed. The collected data is transmitted back to the land data center through satellite communications and other means to achieve long-term and continuous observation of marine meteorological and marine environmental parameters.

[0098] Parameters: It can measure various data such as sea surface temperature, air pressure, wind speed, wind direction, wave height, ocean current, etc., providing important basis for marine meteorological forecasting, marine resource development, and maritime navigation safety.

[0099] As a preferred implementation of this embodiment, the method for normalizing the historical meteorological data is specifically as follows:

[0100] The Z-Score normalization method is used to normalize the historical meteorological data. The specific calculation formula is as follows:

[0101]

[0102] Where, X born is the normalized result, x is the sample of historical meteorological data; μ is the mean of historical meteorological data, and σ is the standard deviation of historical meteorological data.

[0103] In this embodiment, Z-Score normalization can eliminate the dimension effect of the data, make different features have the same scale, and have a certain robustness to outliers.

[0104] It is applicable to the case where the data distribution is approximately Gaussian. In meteorological data, many meteorological elements conform to normal distribution to a certain extent, such as the long-term average temperature distribution in a certain area. In this case, Z-Score normalization is more applicable.

[0105] As a preferred implementation of this embodiment, the steps for calculating the temporal attention weight are specifically as follows:

[0106] The input vector x corresponding to each time step of the time series data t Through different linear transformations, we get the query vector q t , key vector k t Sum value vector v t ; Through the weight matrix W Q , W K , W V The specific transformation formula is as follows:

[0107] q t =x t W Q1

[0108] k t =x t W K1

[0109]

[0110] The default dimension of the input vector is d input1 , query vector q t , key vector k t Sum value vector v t The dimension is d model1 , calculate the dot product of the query vector at each time step and the key vector at other time steps to get the attention score e t , i , the specific calculation formula is as follows:

[0111]

[0112] In the formula, e t , i is the attention score of the t-th time step to the i-th time step, is the key vector at the i-th moment;

[0113] The attention score e obtained for each time step t , i Perform softmax normalization on all time steps to get the attention weight α t , i , the specific calculation formula is as follows:

[0114]

[0115] Where T is the total length of the time series.

[0116] In this embodiment, divided by This is to prevent the dot product result from being too large, causing the gradient to disappear or explode after passing through the softmax function.

[0117] Attention weight α t,i It indicates the importance ratio of the i-th time step when predicting the i-th time step.

[0118] As a preferred implementation of this embodiment, the steps for calculating the spatial attention weight are specifically as follows:

[0119] The feature vector x of each region i Through different linear transformations, we get the query vector q i , key vector k i Sum value vector v i ; Through the weight matrix W Q2 , W K2 , W V2 The specific transformation formula is as follows:

[0120] q i =x i W Q2

[0121] k i =x i W K2

[0122] v i =x i W V2

[0123] The default dimension of the input vector is d input2 , query vector q i , key vector k i Sum value vector v i The dimension is d model2 , calculate the dot product of the query vector of each region and the key vector of other regions to get the attention score e m , n , the specific calculation formula is as follows:

[0124]

[0125] In the formula, e m , n is the attention score of the mth region to the nth region, is the key vector of each n-th region;

[0126] The attention score e obtained for each region m , n Perform softmax normalization on all regions to obtain the attention weight α m , n , the specific calculation formula is as follows:

[0127]

[0128] Where N is the total number of regions.

[0129] As a preferred implementation of this embodiment, the fusion module splices the weighted time series features and spatial features to obtain fusion features in the following steps:

[0130] F=[T f ; S f ]

[0131] Where, T f Weighted time series features; S f is the weighted spatial feature.

[0132] In this embodiment, different types of feature vectors are sequentially connected into a longer feature vector. This method is simple and intuitive, and can retain all original feature information, but it may cause the feature dimension to be too high, increasing the complexity and computational complexity of model training.

[0133] As a preferred implementation of this embodiment, the loss function in the weather forecast deep learning model based on the spatiotemporal fusion attention mechanism adopts a mean square error loss function, specifically:

[0134]

[0135] In the formula, MSE is the mean square error, a is the number of samples, and y is b is the true value of the bth sample, is the predicted value of the prediction model for the bth sample.

[0136] In this embodiment, the mean square error loss function is applicable to regression problems, such as predicting continuous values ​​such as temperature and humidity in meteorological data. When the quantum convolutional neural network is used to predict the specific values ​​of meteorological elements, by minimizing the mean square error loss function, the predicted value of the model can be made as close to the true value as possible, thereby improving the accuracy of the prediction.

[0137] Embodiment 2:

[0138] A weather forecasting system based on spatiotemporal fusion attention mechanism, characterized in that the specific steps include:

[0139] The data collection and preprocessing module collects historical meteorological data from multiple regions, classifies and aggregates the historical meteorological data according to time series and regional location, and then normalizes and preprocesses them;

[0140] A prediction model building module, which builds a weather prediction deep learning model based on a spatiotemporal fusion attention mechanism, wherein the weather prediction model includes a time attention module, a space attention module, and a fusion module;

[0141] A time attention module, wherein the time attention module uses a multi-layer perceptron to extract time series features, calculates time attention weights, and fuses time series features with time attention weights to obtain weighted time series features;

[0142] A spatial attention module, wherein the spatial attention module uses a convolutional neural network to extract spatial features, calculates spatial attention weights between different regions, and fuses the spatial features with the spatial attention weights to obtain weighted spatial features;

[0143] A fusion module, wherein the fusion module combines the weighted time series features and the spatial features to obtain fusion features;

[0144] The training module takes the historical meteorological data set classified by time series and regional location as the input of the time attention module and the spatial attention module respectively, and takes the true value of the historical meteorological data at the prediction moment as the output to train the meteorological forecast model based on the spatiotemporal fusion attention mechanism;

[0145] The prediction module uses the trained meteorological prediction model to perform meteorological predictions that take into account the influence of time series and regional location.

[0146] Embodiment three:

[0147] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a weather forecasting method based on a spatiotemporal fusion attention mechanism as described in any embodiment of the present invention is implemented.

[0148] Embodiment 4:

[0149] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a weather forecasting method based on a spatiotemporal fusion attention mechanism as described in any embodiment of the present invention.

[0150] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A weather forecasting method based on spatiotemporal fusion attention mechanism, characterized in that: The specific steps include: Collect historical meteorological data from multiple regions, classify and aggregate the historical meteorological data according to time series and regional location, and then normalize and preprocess them; Constructing a deep learning model for weather forecasting based on a spatiotemporal fusion attention mechanism, wherein the weather forecasting model includes a temporal attention module, a spatial attention module, and a fusion module; The time attention module uses a multi-layer perceptron to extract time series features, calculates time attention weights, and fuses time series features with time attention weights to obtain weighted time series features; The spatial attention module uses a convolutional neural network to extract spatial features, calculates spatial attention weights between different regions, and fuses spatial features with spatial attention weights to obtain weighted spatial features; The fusion module combines the weighted time series features and spatial features to obtain fusion features; The historical meteorological data sets classified by time series and regional location are used as the input of the temporal attention module and the spatial attention module respectively, and the true value of the historical meteorological data at the prediction moment is used as the output to train the meteorological forecast model based on the spatiotemporal fusion attention mechanism. Use the trained weather forecast model to make weather forecasts that take into account the influence of time series and regional location.

2. The weather forecasting method based on spatiotemporal fusion attention mechanism according to claim 1 is characterized in that: The historical meteorological data are collected through ground meteorological station observation, balloon high-altitude meteorological observation, meteorological satellite remote sensing detection, meteorological radar detection, Aircraft detection and ocean buoy observations.

3. According to the dual power backup power supply magnetic wireless temperature measurement device of claim 1, it is characterized in that: The method for normalizing the historical meteorological data is specifically as follows: The Z-Score normalization method is used to normalize the historical meteorological data. The specific calculation formula is as follows: Where, X norm is the normalized result, x is the sample of historical meteorological data; μ is the mean of historical meteorological data, and σ is the standard deviation of historical meteorological data.

4. The weather forecasting method based on spatiotemporal fusion attention mechanism according to claim 1 is characterized in that: The calculation steps of the temporal attention weight are specifically as follows: The input vector x corresponding to each time step of the time series data t Through different linear transformations, we get the query vector q t , key vector k t Sum value vector v t ; Through the weight matrix W Q , W K , W V The specific transformation formula is as follows: q t =x t W Q1 The default dimension of the input vector is d input1 , query vector q t , key vector k t Sum value vector v t The dimension is d model1 , calculate the dot product of the query vector at each time step and the key vector at other time steps to get the attention score e t , i , the specific calculation formula is as follows: In the formula, e t , i is the attention score of the t-th time step to the i-th time step, for The key vector at the i-th moment; The attention score e obtained for each time step t , i Perform softmax normalization on all time steps to get the attention weight α t , i , the specific calculation formula is as follows: Where T is the total length of the time series.

5. The weather forecasting method based on spatiotemporal fusion attention mechanism according to claim 1 is characterized in that: The calculation steps of the spatial attention weight are specifically as follows: The feature vector x of each region i Through different linear transformations, we get the query vector q i , key vector k i Sum value vector v i ; Through the weight matrix W Q2 , W K2 , W V2 The specific transformation formula is as follows: q i =x i W Q2 k i =x i W K2 v i =x i W V2 The default dimension of the input vector is d input2 , query vector q i , key vector k i Sum value vector v i The dimension is d model2 , calculate the dot product of the query vector of each region and the key vector of other regions to get the attention score e m , n , the specific calculation formula is as follows: In the formula, e m , n is the attention score of the mth region to the nth region, is the key vector of each n-th region; The attention score e obtained for each region m , n Perform softmax normalization on all regions to obtain the attention weight α m , n , the specific calculation formula is as follows: Where N is the total number of regions.

6. The weather forecasting method based on spatiotemporal fusion attention mechanism according to claim 1, characterized in that: The fusion module combines the weighted time series features and spatial features to obtain fusion features in the following steps: F=[T f ;S f ] Where, T f Weighted time series features; S f is the weighted spatial feature.

7. The weather forecasting method based on spatiotemporal fusion attention mechanism according to claim 1 is characterized in that: The loss function in the weather forecast deep learning model based on the spatiotemporal fusion attention mechanism adopts the mean square error loss function, which is specifically: In the formula, MSE is the mean square error, a is the number of samples, and y is b is the true value of the bth sample, is the predicted value of the prediction model for the bth sample.

8. A weather forecast system based on spatiotemporal fusion attention mechanism, characterized in that: The specific steps include: The data collection and preprocessing module collects historical meteorological data from multiple regions, classifies and aggregates the historical meteorological data according to time series and regional location, and then normalizes and preprocesses them; A prediction model building module is used to build a weather prediction deep learning model based on a spatiotemporal fusion attention mechanism, wherein the weather prediction model includes a temporal attention module, a spatial attention module, and a fusion module; A time attention module, wherein the time attention module uses a multi-layer perceptron to extract time series features, calculates time attention weights, and fuses time series features with time attention weights to obtain weighted time series features; A spatial attention module, which uses a convolutional neural network to extract spatial features, calculates spatial attention weights between different regions, and fuses spatial features with spatial attention weights to obtain weighted spatial features; A fusion module, wherein the fusion module combines the weighted time series features and the spatial features to obtain fusion features; The training module takes the historical meteorological data set classified by time series and regional location as the input of the time attention module and the spatial attention module respectively, and takes the true value of the historical meteorological data at the prediction moment as the output to train the meteorological forecast model based on the spatiotemporal fusion attention mechanism; The prediction module uses the trained meteorological prediction model to perform meteorological predictions that take into account the influence of time series and regional location.

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 a weather forecasting method based on a spatiotemporal fusion attention mechanism as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a weather forecasting method based on a spatiotemporal fusion attention mechanism as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Ecological carbon sink potential prediction method and system based on fusion attention mechanism

    CN120877055A

  • An ecological carbon sink potential prediction method and system based on a fusion attention mechanism

    CN120877055B

  • Cloud and rain environment modeling prediction method and device based on supervised machine learning

    CN121257294A

  • Urban inland inundation online prediction method and system based on space attention and depth fusion

    CN121683490A