Microclimate prediction method, system and equipment based on attention mechanism and medium

By introducing attention mechanisms and LSTM networks into microclimate prediction, combined with historical local and peripheral meteorological data, the problem of insufficient expansion ability of traditional methods in meteorological factor prediction is solved, achieving higher prediction accuracy and lower errors.

CN119669933AActive Publication Date: 2025-03-21HARBIN INST OF TECH

Patent Information

Application Number
CN202411736044.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

Traditional deep learning methods perform well in microclimate predictions on meteorological factors only on specific meteorological parameters, but lack the ability to extend to other meteorological factors and do not fully utilize local history and predictive prior knowledge of surrounding meteorological stations.

Method used

A microclimate prediction method based on attention mechanism is adopted, and the historical local meteorological data of the area to be predicted and the forecast information of the surrounding meteorological stations is obtained, combined with the long-term and short-term memory network (LSTM) and attention mechanism, temporal and spatial characteristics are extracted, and the data is fused for prediction.

Benefits of technology

The accuracy of microclimate prediction was improved, especially in the prediction of meteorological factors such as temperature, wind speed and air pressure, and significant experimental results were obtained, reducing prediction errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669933A_ABST
    Figure CN119669933A_ABST
Patent Text Reader

Abstract

The invention discloses a microclimate prediction method, system and device based on an attention mechanism, and a medium, and the method comprises the steps: obtaining the meteorological data of a to-be-predicted region, and the meteorological data comprises the historical local meteorological data of the to-be-predicted region and the prediction information of a surrounding meteorological station; the meteorological data are input into a climate prediction model for prediction classification, climate prediction data are obtained, the climate prediction model comprises a feature extraction module, a residual connection module, a normalization module and a prediction module which are connected in sequence, and the feature extraction module comprises a long and short term memory network module and an attention module which are arranged in parallel. According to the technical scheme, the method can be expanded to prediction of other meteorological elements, and the prediction accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of meteorological forecasting, and in particular relates to a microclimate forecasting method, system, device and medium based on an attention mechanism. Background Art

[0002] Under the same macroclimate background, the special local climate that is different from the macroclimate due to factors such as terrain, underlying surface properties and human activities is called microclimate phenomenon.

[0003] Since microclimate phenomena usually occur at a smaller scale than the NWP grid, the performance of traditional numerical weather models that use macroscopic physical laws in predicting microclimate is not very ideal. There is a large error between the 1km reanalysis meteorological data HRCLDAS using numerical models and the actual observation MAE of meteorological stations at a small scale. By using artificial intelligence algorithms for information fusion and analysis, more accurate local forecasts can be achieved.

[0004] The basic principle of using deep learning to predict microclimate is a regression problem. The general steps are: processing meteorological data to fill in missing items, normalize, and perform other operations; the model gradually constructs and trains neural networks by extracting data features; and predicts the microclimate of a certain place in the future.

[0005] The prediction results of traditional deep learning methods for meteorological elements only show good performance on specific meteorological parameters, but lack the ability to expand to other meteorological elements. In addition, it does not make good use of the prior knowledge of local history and surrounding meteorological station forecasts. Summary of the invention

[0006] The purpose of the present invention is to provide a microclimate prediction method, system, device and medium based on an attention mechanism to solve the problems existing in the above-mentioned prior art.

[0007] To achieve the above object, the present invention provides a microclimate prediction method based on an attention mechanism, comprising:

[0008] Acquire meteorological data of the area to be predicted, wherein the meteorological data includes historical local meteorological data of the area to be predicted and forecast information of surrounding meteorological stations;

[0009] The meteorological data is input into a climate prediction model for prediction and classification to obtain climate prediction data, wherein the climate prediction model includes a feature extraction module, a residual connection module, a normalization module and a prediction module connected in sequence, and the feature extraction module includes a long short-term memory network module and an attention module set in parallel.

[0010] Optionally, the training process of the climate prediction model specifically includes:

[0011] Acquiring training data, wherein the training data includes meteorological training data at different times;

[0012] An initial climate prediction model is constructed, the training data is input into the initial climate prediction model for prediction classification, and training is performed with the goal of minimizing the loss between the classified initial training results and the meteorological training data at the next moment corresponding to the input meteorological training data to obtain a trained climate prediction model.

[0013] Optionally, the processing of the climate prediction model specifically includes:

[0014] Inputting the historical local meteorological data into the long short-term memory network module to extract time features and obtain time feature data;

[0015] Inputting the forecast information of the surrounding weather stations into the attention module to extract spatial features and obtain spatial feature data;

[0016] The time feature data and the space feature data are input into the residual connection module and the normalization module for fusion to obtain fused data, time coding is introduced into the fused data, and the fused data after the time coding is introduced is input into the prediction module for prediction classification to obtain the climate prediction data.

[0017] Optionally, the step of inputting the historical local meteorological data into the long short-term memory network module to extract time features specifically includes:

[0018] The historical local meteorological data is input into the long short-term memory network module, and the characteristics and change trends of meteorological elements in the time dimension are extracted to obtain the time characteristic data, wherein the long short-term memory network module includes a plurality of long short-term memory network structures connected in series.

[0019] Optionally, the step of inputting the forecast information of the surrounding weather stations into the attention module for spatial feature extraction specifically includes:

[0020] The forecast information of the surrounding weather stations is input into the attention module, and the correlation between the forecast information of different weather stations is calculated to obtain the spatial feature data.

[0021] A climate prediction system based on attention mechanism, comprising:

[0022] A data acquisition module is used to acquire meteorological data of the area to be predicted, wherein the meteorological data includes historical local meteorological data of the area to be predicted and forecast information of surrounding meteorological stations;

[0023] A climate prediction module is used to input the meteorological data into a climate prediction model for prediction and classification to obtain climate prediction data, wherein the climate prediction model includes a feature extraction module, a residual connection module, a normalization module and a prediction module connected in sequence, and the feature extraction module includes a long short-term memory network module and an attention module set in parallel.

[0024] An electronic device includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform a microclimate prediction method based on an attention mechanism.

[0025] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the microclimate prediction method based on an attention mechanism.

[0026] The technical effects of the present invention are:

[0027] Based on deep learning technology, the present invention introduces historical local meteorological data and forecast information of surrounding meteorological stations as temporal and spatial features, designs and implements a local microclimate prediction model ALSTM that combines LSTM and Attention mechanism, which can improve the prediction accuracy and obtain representative experimental results on three meteorological elements: temperature, wind speed and air pressure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0030] Figure 1 A microclimate prediction network structure diagram in an embodiment of the present invention;

[0031] Figure 2 Schematic diagram of comparison of MAE errors in temperature prediction in an embodiment of the present invention;

[0032] Figure 3 This is a schematic diagram of the comparison results of ALSTM and LSTM temperature prediction MAE in an embodiment of the present invention;

[0033] Figure 4Flowchart of an embodiment of the present invention. DETAILED DESCRIPTION

[0034] Various exemplary embodiments of the present invention will now be described in detail. This detailed description should not be considered as limiting the present invention, but should be understood as a more detailed description of certain aspects, features, and embodiments of the present invention.

[0035] It should be understood that the terms described in the present invention are only for describing special embodiments and are not intended to limit the present invention. In addition, for the numerical range in the present invention, it should be understood that each intermediate value between the upper and lower limits of the scope is also specifically disclosed. Each smaller range between the intermediate value in any stated value or stated range and any other stated value or intermediate value in the described range is also included in the present invention. The upper and lower limits of these smaller ranges can be independently included or excluded in the scope.

[0036] Unless otherwise indicated, all technical and scientific terms used herein have the same meanings as those of ordinary skill in the art generally understood by the present invention. Although the present invention describes only preferred methods, any method similar or equivalent to that described herein may also be used in the implementation or testing of the present invention. All documents mentioned in this specification are incorporated by reference to disclose and describe the methods related to the documents. In the event of a conflict with any incorporated document, the content of this specification shall prevail.

[0037] It will be apparent to those skilled in the art that various modifications and variations may be made to the specific embodiments of the present invention description without departing from the scope or spirit of the present invention. Other embodiments derived from the present invention description will be apparent to those skilled in the art. The present application description and examples are exemplary only.

[0038] The words “include,” “including,” “have,” “contain,” etc. used in this article are open-ended terms, meaning including but not limited to.

[0039] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0040] Embodiment 1

[0041] like Figure 1 - Figure 4As shown, this embodiment provides a microclimate prediction method based on an attention mechanism, including: obtaining meteorological data of the area to be predicted, the meteorological data including historical local meteorological data of the area to be predicted and forecast information of surrounding meteorological stations; inputting the meteorological data into a climate prediction model for prediction and classification to obtain climate prediction data, wherein the climate prediction model includes a feature extraction module, a residual connection module, a normalization module and a prediction module connected in sequence, and the feature extraction module includes a long short-term memory network module and an attention module arranged in parallel.

[0042] The training process of the climate prediction model specifically includes:

[0043] Acquiring training data, wherein the training data includes meteorological training data at different times;

[0044] An initial climate prediction model is constructed, the training data is input into the initial climate prediction model for prediction classification, and training is performed with the goal of minimizing the loss between the classified initial training results and the meteorological training data at the next moment corresponding to the input meteorological training data to obtain a trained climate prediction model.

[0045] In order to improve the accuracy of microclimate prediction and achieve better performance in areas with significant local characteristics, this embodiment introduces historical local meteorological data and forecast information of surrounding meteorological stations as temporal and spatial features based on deep learning technology, and designs and implements a local microclimate prediction model ALSTM that combines LSTM and Attention mechanism. Representative experimental results have been obtained on three meteorological elements: temperature, wind speed, and air pressure.

[0046] The prediction model structure of this embodiment is as follows Figure 1 As shown in the figure, the model extracts temporal features through the LSTM module and spatial features through the Attention mechanism. The residual connection and normalization results are temporally encoded to introduce temporal information to assist the model in completing microclimate prediction.

[0047] Figure 1 In the example, the local temperature variable from time T to time T+k is predicted at time T-1. For example, in the experiment, the temperature in the next 24 hours is predicted based on the historical 72-hour temperature. Since the observation time interval of the data is 3 hours, the actual T value is 24, and k is 7. Input the local observation sequence of LSTM is the time variation trend of the local temperature from time 0 to time T+k, and finally outputs the hidden state h of time step T T . Input Self-Attention Weather Station Forecast It is the spatial correlation of the temperature forecast of m stations around the local meteorological station from time T to time T+k in the future. The spatial and temporal feature extraction results are fused through residual connection and normalization, and the time information is introduced to complete the local prediction through the linear layer.

[0048] In order to prove the effectiveness of introducing temporal features and spatial features, this embodiment uses MAE as the performance evaluation indicator of the model itself and conducts comparative experiments.

[0049] There are three objects for experimental comparison: 1km reanalysis data HRCLDAS, to verify whether the fitting prediction based on local features has advantages in areas with significant local features;

[0050] Only the LSTM model is used to capture the time dimension model of the local characteristics of meteorological elements, and to verify whether the introduction of meteorological information from surrounding meteorological stations can effectively improve the prediction accuracy;

[0051] Only the Attention mechanism is used to extract the spatial dimension model of the meteorological connection between the surrounding areas and the local area, and to verify whether the introduction of local historical observation information can effectively correct the prediction results.

[0052] In addition, in order to explore the impact of the spatial range of surrounding weather station data on the prediction results, the proposed ALSTM is divided into the ALSTM-all model, which uses the meteorological information of weather stations throughout Heilongjiang Province, and the ALSTM-part model, which uses the meteorological information of weather stations within 500 kilometers around the local area and with smaller prediction deviations.

[0053] The experimental results of microclimate prediction in some areas of Heilongjiang are as follows:

[0054] Table 1 Temperature prediction MAE comparison (℃)

[0055]

[0056] In Table 1, there are large differences between the temperature prediction errors and actual observation data in some local geographical locations, such as the Mohe, Huma, and Yichun meteorological stations in Heilongjiang Province, which are significantly higher than the average error of the HRCLDAS model of 1.656℃. The ALSTM model has smaller prediction errors and performs better in such areas with significant local characteristics.

[0057] Even if the LSTM model is used alone and the prediction is based on local historical information, the prediction accuracy can be improved accordingly. The MAE of the LSTM model on the test set is 1.539℃, which is lower than the prediction error of HRCLDAS. The effect is more significant at small meteorological points, and the temperature prediction errors of Mohe, Huma, and Yichun meteorological stations are reduced to 1.894℃, 1.954℃, and 1.561℃, respectively.

[0058] The spatial dimension model that only uses the Attention mechanism does not have a significant improvement in average performance compared to HRCLDAS, which shows that time features are irreplaceable in weather forecasting. Comparing the experimental results of LSTM and ALSTM, after adding spatial features, the prediction error of the model is further reduced, from an average of 1.539 to 1.459. And it performs better than the LSTM model that only uses time information at each time step, as shown below: Figure 3 shown.

[0059] In terms of the spatial range of weather station data, the ALSTM-part model achieved better performance, with an average forecast error of 1.331°C, which is lower than the 1.459°C of the ALSTM-all model. This result shows that only using weather station data that is closely related to local weather and has a small error can effectively reduce model interference and thus improve forecast accuracy.

[0060] In order to verify the performance of ALSTM in microclimate prediction based on different meteorological elements, in addition to the temperature prediction experiment, relevant comparative experiments were also conducted on two meteorological variables, wind speed and air pressure. The results obtained are similar, as shown in Table 2 and Table 3 below:

[0061] Table 2 Comparison of wind speed prediction MAE (m / s)

[0062]

[0063] Table 3 Comparison of air pressure prediction MAE (hpa)

[0064]

[0065] The overall prediction flow chart of ALSTM is as follows Figure 4 As shown in Figure 1, the model accepts local observation sequences and m weather station forecasts as input and uses the introduced time information to complete the microclimate prediction. This will be described in detail below.

[0066] The model of this embodiment can be divided into two modules, the LSTM module and the Attention module, each of which processes an input stream, such as Figure 4 shown.

[0067] The LSTM module accepts a local observation sequence as input. For example, a certain meteorological variable in the forecast time period T is used as an example. The local observation sequence is the historical meteorological data from local time 0 to time T-1. The LASTM module is composed of multiple LSTM structures in series, which is responsible for extracting the characteristics and change trends of meteorological elements in the time dimension.

[0068] The Attention module accepts m sufficiently large weather station forecasts as input, i.e., the weather forecasts of the local surrounding weather stations for the local forecast period T. The Attention module multiplies the forecasts of each weather station by different vectors W Q ,W K ,W V The obtained vectors Q, K, and V are used as input to learn the correlation between different space weather forecasts in a dot product manner.

[0069] The outputs of the two input streams are connected and normalized through residual connection and the time information of Time encoding are input into a linear layer to finally obtain the local weather forecast results.

[0070] Based on deep learning technology, this embodiment introduces historical local meteorological data and forecast information of surrounding meteorological stations as temporal and spatial features, designs and implements a local microclimate prediction model ALSTM that combines LSTM and Attention mechanism, which can improve the prediction accuracy and achieve representative experimental results on three meteorological elements: temperature, wind speed, and air pressure.

[0071] A climate prediction system based on attention mechanism, comprising:

[0072] A data acquisition module is used to acquire meteorological data of the area to be predicted, wherein the meteorological data includes historical local meteorological data of the area to be predicted and forecast information of surrounding meteorological stations;

[0073] A climate prediction module is used to input the meteorological data into a climate prediction model for prediction and classification to obtain climate prediction data, wherein the climate prediction model includes a feature extraction module, a residual connection module, a normalization module and a prediction module connected in sequence, and the feature extraction module includes a long short-term memory network module and an attention module set in parallel.

[0074] An electronic device includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform a microclimate prediction method based on an attention mechanism.

[0075] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the microclimate prediction method based on an attention mechanism.

[0076] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A microclimate prediction method based on attention mechanism, characterized in that: include: Acquire meteorological data of the area to be predicted, wherein the meteorological data includes historical local meteorological data of the area to be predicted and forecast information of surrounding meteorological stations; The meteorological data is input into a climate prediction model for prediction and classification to obtain climate prediction data, wherein the climate prediction model includes a feature extraction module, a residual connection module, a normalization module and a prediction module connected in sequence, and the feature extraction module includes a long short-term memory network module and an attention module set in parallel.

2. A microclimate prediction method based on attention mechanism according to claim 1, characterized in that: The training process of the climate prediction model specifically includes: Acquiring training data, wherein the training data includes meteorological training data at different times; An initial climate prediction model is constructed, the training data is input into the initial climate prediction model for prediction classification, and training is performed with the goal of minimizing the loss between the classified initial training results and the meteorological training data at the next moment corresponding to the input meteorological training data to obtain a trained climate prediction model.

3. The microclimate prediction method based on attention mechanism according to claim 1, characterized in that: The processing process of the climate prediction model specifically includes: Inputting the historical local meteorological data into the long short-term memory network module to extract time features and obtain time feature data; Inputting the forecast information of the surrounding weather stations into the attention module to extract spatial features and obtain spatial feature data; The time feature data and the space feature data are input into the residual connection module and the normalization module for fusion to obtain fused data, time coding is introduced into the fused data, and the fused data after the time coding is introduced is input into the prediction module for prediction classification to obtain the climate prediction data.

4. The microclimate prediction method based on attention mechanism according to claim 3 is characterized in that: The step of inputting the historical local meteorological data into the long short-term memory network module for time feature extraction specifically includes: The historical local meteorological data is input into the long short-term memory network module, and the characteristics and change trends of meteorological elements in the time dimension are extracted to obtain the time characteristic data, wherein the long short-term memory network module includes a plurality of long short-term memory network structures connected in series.

5. The microclimate prediction method based on attention mechanism according to claim 3 is characterized in that: The step of inputting the forecast information of the surrounding weather stations into the attention module for spatial feature extraction specifically includes: The forecast information of the surrounding weather stations is input into the attention module, and the correlation between the forecast information of different weather stations is calculated to obtain the spatial feature data.

6. A climate prediction system based on attention mechanism, characterized in that: include: A data acquisition module is used to acquire meteorological data of the area to be predicted, wherein the meteorological data includes historical local meteorological data of the area to be predicted and forecast information of surrounding meteorological stations; A climate prediction module is used to input the meteorological data into a climate prediction model for prediction and classification to obtain climate prediction data, wherein the climate prediction model includes a feature extraction module, a residual connection module, a normalization module and a prediction module connected in sequence, and the feature extraction module includes a long short-term memory network module and an attention module set in parallel.

7. An electronic device, characterized in that: It includes a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform a microclimate prediction method based on an attention mechanism according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements a microclimate prediction method based on an attention mechanism as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Machine room temperature prediction method based on deep parallel network

    CN113779107A

  • Meteorological data prediction method and device, storage medium and electronic device

    CN116400430A

  • Load prediction method based on Bi-LSTM and dual attention mechanism

    CN117833231A

  • Transform-based space-time meteorological prediction method

    CN117874448A

  • Precipitation forecast correction method, device, equipment and medium

    CN117874598A

Cited By

  • Reservoir outbound flow prediction method based on multi-class hydrological data feature fusion

    CN121146175A