Temperature prediction method based on hybrid space-time neural network and multi-scale feature fusion

This temperature prediction method, which employs rigorous temporal feature extraction and multi-scale feature fusion, addresses the issues of single feature construction and error accumulation in existing temperature prediction methods, achieving high-precision temperature prediction that adapts to multi-scale features and long-term trends.

CN121598153APending Publication Date: 2026-03-03GUANGZHOU INST OF TROPICAL MARINE METEOROLOGY CHINA METEOROLOGICAL ADMINISTRATION (GUANGDONG INST OF METEOROLOGICAL SCI)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511754381.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing temperature prediction methods are simplistic in their feature construction, neglecting the synergistic influence of multiple meteorological elements, resulting in error accumulation and poor long-term prediction accuracy. They are also unable to capture multi-scale features and lack adaptability and accuracy.

Method used

By acquiring historical temperature data and multi-source meteorological data, we perform rigorous temporal feature extraction and multi-scale feature fusion, and use an improved LSTM neural network for prediction. This constructs a temperature prediction framework that adapts to seasonal heterogeneous features, ensuring strict temporal constraints and no data leakage.

Benefits of technology

It significantly improves the accuracy and reliability of temperature prediction, reduces error accumulation in multi-step prediction, enhances the ability to capture long-term climate change, and improves the predictive level of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121598153A_ABST
    Figure CN121598153A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of meteorological short-term climate prediction, and discloses a temperature prediction method based on hybrid space-time neural network and multi-scale feature fusion. The method comprises the following steps: acquiring a historical temperature data sequence and a multi-source meteorological data sequence, wherein the multi-source meteorological data sequence comprises wind speed data, soil temperature data, snow cover data and sea temperature data; strict time sequence feature extraction is conducted on the historical temperature data sequence, a temperature short-term fluctuation feature set and a temperature long-term trend feature set are obtained, and it is ensured that only historical information is used without data leakage through strict time sequence feature extraction; and on the basis of the multi-source meteorological data sequence, the temperature short-term fluctuation feature group and the temperature long-term trend feature group, predicating through an improved LSTM neural network to obtain predicated temperature data of a preset number of days in the future. The accuracy of temperature prediction is improved by constructing a temperature short-term fluctuation feature group and a temperature long-term trend feature group during temperature prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of short-term meteorological climate prediction technology, specifically a temperature prediction method based on the fusion of hybrid spatiotemporal neural networks and multi-scale features. Background Technology

[0002] With the intensification of global climate change and the increasing frequency of extreme temperature events, the demand for high-precision temperature forecasting in agricultural production, energy management, and urban planning is becoming increasingly urgent. Existing forecasting methods are relatively simplistic in feature construction and prone to error accumulation during the forecasting process, resulting in large errors in the predicted temperature data. There is a problem of simplistic feature construction; traditional forecasting methods typically rely solely on historical temperature data, ignoring the synergistic effects of multiple meteorological factors (such as wind speed, soil temperature, snow cover, and sea surface temperature), and particularly lacking quantitative modeling of the impact of model-predicted features, leading to limited feature expressive power. Furthermore, there are issues of data leakage and temporal confusion; existing methods often use future information for standardization or feature calculation in feature engineering, violating the basic principles of time series forecasting and causing a significant decline in model performance in practical applications.

[0003] Regarding error accumulation and long-term prediction, traditional recursive prediction methods experience gradual error accumulation during multi-step prediction and fail to effectively capture long-term climate trends under the background of global warming, resulting in poor long-term prediction accuracy. In terms of model architecture adaptability, standard machine learning models struggle to simultaneously capture multi-scale features such as short-term fluctuations, seasonal cycles, and long-term trends in temperature sequences, and lack customized neural network architectures specifically designed for temperature prediction.

[0004] These problems collectively result in significant shortcomings in existing temperature forecasting methods regarding multi-timescale forecasting accuracy, seasonality model adaptability, and forecast uncertainty quantification, making it difficult to efficiently and reliably meet the needs of refined temperature forecasting.

[0005] Therefore, how to construct a temperature prediction framework that adapts to seasonal heterogeneous characteristics and achieve accurate multi-scale predictions under strict temporal constraints has become a key technical challenge that urgently needs to be overcome in the field of temperature prediction. Summary of the Invention

[0006] To overcome the aforementioned problems of the prior art, this invention provides a temperature prediction method based on hybrid spatiotemporal neural networks and multi-scale feature fusion. Through rigorous temporal feature extraction and multi-scale feature fusion, the accuracy and reliability of temperature prediction are significantly improved.

[0007] To achieve the above objectives, this application provides the following technical solution: Historical temperature data sequences and multi-source meteorological data sequences are acquired, including wind speed data, soil temperature data, snow cover data, and sea surface temperature data. Strict time-series feature extraction is performed on the historical temperature data sequence to obtain a short-term temperature fluctuation feature group and a long-term temperature trend feature group, wherein the strict time-series feature extraction only uses historical information; Based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, the predicted temperature data for the next preset number of days is obtained through an improved LSTM neural network.

[0008] In one embodiment, the step of performing rigorous time-series feature extraction on the historical temperature data sequence to obtain a short-term temperature fluctuation feature group and a long-term temperature trend feature group includes: Obtain the latest temperature data from the historical temperature data sequence, and obtain reference temperature data from the historical temperature data sequence that differs from the latest temperature data by a preset number of days; Calculate the difference between each of the reference temperature data and the latest temperature data, and obtain a short-term temperature fluctuation feature group based on the difference and the latest temperature data, wherein the short-term fluctuation feature group includes a 7-day anomaly trend, a 30-day anomaly trend and a seasonal anomaly pattern. Based on a preset year length window, rolling average trend analysis and regression analysis are performed on each temperature data in the historical temperature data sequence to obtain the moving average trend characteristics and long-term climate trend characteristics of each temperature data. Based on the moving average trend characteristics and the long-term climate trend characteristics, combined with the background trend of global warming, a long-term temperature trend characteristic group is determined.

[0009] In one embodiment, the step of predicting the predicted temperature data for a preset number of days in the future using an improved LSTM neural network based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group includes: The multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group are standardized by rolling window to obtain the meteorological standard data sequence, the short-term temperature fluctuation standard feature group, and the long-term temperature trend standard feature group. Based on the meteorological standard data sequence, the short-term temperature fluctuation standard feature group, and the long-term temperature trend standard feature group, a time-series feature tensor is constructed. Based on the aforementioned temporal feature tensor and the improved LSTM neural network, predicted temperature data for the next preset number of days is obtained.

[0010] In one embodiment, the step of predicting the predicted temperature data for a preset number of days in the future based on the temporal feature tensor and the improved LSTM neural network includes: Multi-scale feature fusion is performed on the short-term temperature fluctuation standard feature group and the long-term temperature trend standard feature group in the time-series feature tensor to obtain the target tensor; The target tensor is input into an improved LSTM neural network to predict the temperature data for the next preset number of days.

[0011] In one embodiment, the step of performing multi-scale feature fusion on the short-term temperature fluctuation standard feature set and the long-term temperature trend standard feature set in the time-series feature tensor to obtain the target tensor includes: The long-term temperature trend standard feature set is mapped to the LSTM hidden layer dimension space in the preset LSTM encoder by linear projection to obtain the long-term trend feature projection. The standard feature set of short-term temperature fluctuations is mapped to the LSTM hidden layer dimension space in the preset LSTM encoder by linear transformation to obtain the short-term fluctuation feature projection. The long-term trend feature projection and the short-term fluctuation feature projection are weighted and fused to obtain the fused feature tensor; The target tensor is obtained by performing temporal encoding on the fused feature tensor using a preset LSTM encoder.

[0012] In one embodiment, the step of performing temporal encoding processing on the fused feature tensor using a preset LSTM encoder to obtain the target tensor includes: The fused feature tensor is input into the temporal attention processing channel and the feature attention processing channel of the preset LSTM encoder, respectively; The time attention processing channel is used to analyze each time step in the fused feature tensor to generate time attention weights, and based on the time attention weights and the fused feature tensor, a time context-enhanced feature sequence is generated. Each meteorological feature in the fused feature tensor is analyzed through the feature attention processing channel to generate feature attention weights, and a feature sequence with enhanced feature context is generated based on the feature attention weights and the fused feature tensor. The temporal context-enhanced feature sequence and the feature context-enhanced feature sequence are integrated to obtain a joint feature sequence that combines temporal context awareness and feature selection capabilities. The joint feature sequence is encoded using LSTM to obtain the target tensor.

[0013] In one embodiment, the step of inputting the target tensor into an improved LSTM neural network to predict temperature data for a preset number of future days includes: The target tensor is input into an improved LSTM neural network to predict the temperature data for the next day. The predicted temperature data for the next day is added to the historical temperature data sequence, and the short-term temperature fluctuation characteristic group and the long-term temperature trend characteristic group are recalculated based on strict time sequence principles. Based on the updated multi-source meteorological data sequence, the new short-term temperature fluctuation feature set, and the new long-term temperature trend feature set, a new target tensor is determined and input into the LSTM neural network. The prediction is iterated until the LSTM neural network outputs a sequence of predicted temperature data for the next preset number of days.

[0014] This application provides a temperature prediction device, the temperature prediction device comprising: The data acquisition module is used to acquire historical temperature data sequences and multi-source meteorological data sequences, including wind speed data, soil temperature data, snow cover data, and sea surface temperature influence data. The feature extraction module is used to perform strict time-series feature extraction on the historical temperature data sequence to obtain short-term temperature fluctuation feature groups and long-term temperature trend feature groups. The model prediction module is used to predict the temperature data for the next preset number of days based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, using an improved LSTM neural network.

[0015] The embodiments of this application have the following beneficial effects: This study solved the technical challenge of multi-source data fusion. By integrating data from multiple sources, including wind speed, soil temperature, snow cover, and sea surface temperature, a comprehensive system of temperature influence factors was constructed, overcoming the problem of single feature construction in traditional methods. It achieved leak-free prediction under strict time-series constraints. Employing rolling window standardization and a rigorous time-series feature extraction mechanism, it ensured that only historical information was used during model training and prediction, fundamentally avoiding data leakage. It improved the accuracy and stability of long-term predictions. By combining regression with global warming background trend analysis, the model's ability to capture long-term climate change was enhanced, significantly reducing the error accumulation effect in multi-step predictions. It innovatively quantified the impact of model prediction features, systematically transforming model prediction bias features into computable features, thereby improving the model's predictive level.

[0016] The embodiments of this application construct multi-scale features and combine them with an improved LSTM neural network during temperature prediction to achieve prediction of short-term temperature fluctuations and long-term trends, thereby improving the accuracy and reliability of temperature prediction. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating the first embodiment of the temperature prediction method provided in this application; Figure 2 A flowchart illustrating a second embodiment of the temperature prediction method provided in this application; Figure 3 A flowchart illustrating the third embodiment of the temperature prediction method provided in this application; Figure 4 A flowchart illustrating the fourth embodiment of the temperature prediction method provided in this application; Figure 5 A flowchart illustrating the fifth embodiment of the temperature prediction method provided in this application; Figure 6 A comparison chart of temperature prediction verification for the temperature prediction method provided in this application; Figure 7 A comparison chart of the temperature prediction accuracy of the temperature prediction method provided in this application; Figure 8 Heatmaps of monthly temperature observation anomalies for the temperature prediction method provided in this application; Figure 9 Heatmaps of monthly temperature prediction anomalies for the temperature prediction method provided in this application; Figure 10 A schematic diagram of the temperature prediction device provided in this application. Detailed Implementation

[0019] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0020] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0022] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0023] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0024] It is understood that the method of this application is applied to temperature prediction devices, which may be smart terminals, PC terminals, mobile terminals, etc., and are not limited thereto.

[0025] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0026] Please refer to Figure 1 , Figure 1 This application provides a schematic flowchart of a first embodiment of a temperature prediction method, the method comprising: Step S101: Obtain historical temperature data sequences and multi-source meteorological data sequences, wherein the multi-source meteorological data sequences include wind speed data, soil temperature data, snow cover data, and sea surface temperature data.

[0027] In this embodiment, the temperature prediction device acquires historical temperature data sequences and multi-source meteorological data sequences. It should be noted that the multi-source meteorological data sequences include wind speed data, soil temperature data, snow cover data, and sea surface temperature data; the historical temperature data sequences include temperature data corresponding to each day in history.

[0028] In one embodiment, the temperature prediction device acquires a historical temperature data sequence, wherein the historical temperature data sequence is a sequence of temperature data for each day in a specified past year; the multi-source meteorological data sequence includes wind speed, soil temperature, snow cover and sea surface temperature data for a specified past time period; the historical temperature data sequence is used to construct strict time-series feature data, and the multi-source meteorological data sequence serves as auxiliary input data in the temperature prediction process.

[0029] Step S102: Perform strict time-series feature extraction on the historical temperature data sequence to obtain short-term temperature fluctuation feature group and long-term temperature trend feature group.

[0030] In this embodiment, the temperature prediction device performs rigorous time-series feature extraction on historical temperature data sequences to obtain short-term temperature fluctuation feature groups and long-term temperature trend feature groups. The short-term temperature fluctuation feature group includes calculating temperature data changes over multiple time windows, such as 7-day anomaly trends, 30-day anomaly trends, and seasonal anomaly patterns, used to capture abrupt temperature events. The long-term temperature trend feature group includes rolling average trend features based on temperature data within a preset year-length window and long-term climate trend features obtained through regression analysis. Combined with the background trend of global warming, the final long-term trend feature group is determined.

[0031] Step S103: Based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, the predicted temperature data for the next preset number of days is obtained by using an improved LSTM neural network.

[0032] In this embodiment, the temperature prediction device uses an improved LSTM neural network to predict the predicted temperature data for the next preset number of days based on multi-source meteorological data sequences, short-term temperature fluctuation feature groups, and long-term temperature trend feature groups.

[0033] In one embodiment, the temperature prediction device first adopts a rolling window standardization strategy to standardize the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group respectively. During the standardization process, a strict time sequence principle is adopted to ensure that only historical information is used and there is no data leakage. Features at different scales are normalized using a time window that matches their period.

[0034] In one embodiment, after the temperature prediction device standardizes the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, it constructs a time-series feature tensor from the standardized feature group; the feature tensor is then processed by an improved LSTM neural network to achieve deep fusion of multi-scale features and obtain the prediction result.

[0035] In one embodiment, the temperature prediction device inputs the obtained feature tensor into an improved LSTM neural network, and the prediction model uses the feature tensor to predict the temperature data for the next preset number of days. During the prediction process, an iterative prediction method is employed, with each prediction step based on the latest feature state, avoiding the error accumulation problem in traditional methods and significantly improving the accuracy of temperature prediction.

[0036] The temperature prediction device in this embodiment acquires historical temperature data sequences and multi-source meteorological data sequences; it performs rigorous temporal feature extraction on the historical temperature data sequences to obtain short-term temperature fluctuation feature groups and long-term temperature trend feature groups; based on the multi-source meteorological data sequences, the short-term temperature fluctuation feature groups, and the long-term temperature trend feature groups, it uses an improved LSTM neural network to predict the temperature data for the next preset number of days. By constructing multi-scale features and combining them with an improved LSTM neural network when predicting temperature data, it achieves accurate capture of short-term temperature fluctuations and long-term trends, significantly improving the accuracy and reliability of temperature prediction.

[0037] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the temperature prediction method provided in this application. The difference between the second embodiment and the first embodiment lies in the step of performing rigorous time-series feature extraction on the historical temperature data sequence to obtain a short-term temperature fluctuation feature group and a long-term temperature trend feature group, which includes: Step S201: Obtain the latest temperature data from the historical temperature data sequence, and obtain reference temperature data from the historical temperature data sequence that differs from the latest temperature data by a preset number of days.

[0038] Step S202: Calculate the difference between each of the reference temperature data and the latest temperature data, and obtain a short-term temperature fluctuation characteristic group based on the difference and the latest temperature data.

[0039] In this embodiment, the temperature prediction device acquires the latest temperature data from a historical temperature data sequence, and also acquires reference temperature data from the historical temperature data sequence that differ from the latest temperature data by a preset number of days. The difference between each reference temperature data and the latest temperature data is calculated, and a short-term temperature fluctuation characteristic group is obtained based on the difference and the latest temperature data.

[0040] In one embodiment, the temperature prediction device acquires the latest temperature data from the historical temperature data sequence and the reference temperature data from the historical temperature data sequence that differs from the latest temperature data by a specific number of days. The corresponding temperature differences are calculated respectively. These differences and the latest temperature data constitute a short-term temperature fluctuation characteristic group, which includes key indicators such as 7-day anomaly trend and 30-day anomaly trend.

[0041] In one embodiment, the temperature prediction device acquires the latest historical temperature data from the historical temperature data sequence, and acquires reference historical temperature data from the historical temperature data sequence that differ from the latest historical temperature data by 3 days, 15 days, 30 days, 90 days, and 180 days. The device calculates the difference between the latest historical temperature data and the historical temperature data from 3 days ago, the difference between the latest historical temperature data and the historical temperature data from 3 days ago, the difference between the latest historical temperature data and the historical temperature data from 15 days ago, the difference between the latest historical temperature data and the historical temperature data from 30 days ago, the difference between the latest historical temperature data and the historical temperature data from 90 days ago, and the difference between the latest historical temperature data and the historical temperature data from 180 days ago. These differences, along with the latest historical temperature data, constitute a short-term temperature fluctuation characteristic group.

[0042] Step S203: Perform rolling average trend analysis and regression analysis on each temperature data in the historical temperature data sequence based on a preset year length window to obtain the moving average trend characteristics and long-term climate trend characteristics of each temperature data.

[0043] Step S204: Based on the moving average trend characteristics and the long-term climate trend characteristics, combined with the global warming background trend, determine the long-term temperature trend characteristic group.

[0044] In this embodiment, the temperature prediction device performs rolling average trend analysis and Theil-Sen robust regression analysis on each temperature data point in the historical temperature data series based on a preset year length window, obtaining the moving average trend characteristics and long-term climate trend characteristics of each temperature data point. Based on the moving average trend characteristics and long-term climate trend characteristics, combined with the background trend of global warming, a group of long-term temperature trend characteristics is determined.

[0045] In one embodiment, the preset year length window includes 3 years, 5 years, and 10 years. The temperature prediction device acquires all historical temperature data within 3 years of the latest historical temperature data in the historical temperature data sequence, calculates the arithmetic mean of all historical temperature data within 3 years, and obtains the moving average trend feature within 3 years. It then acquires all historical temperature data within 5 years of the latest historical temperature data in the historical temperature data sequence, calculates the arithmetic mean of all historical temperature data within 5 years, and obtains the moving average trend feature within 5 years. Finally, it acquires all historical temperature data within 10 years of the latest historical temperature data in the historical temperature data sequence, calculates the arithmetic mean of all historical temperature data within 10 years, and obtains the moving average trend feature within 10 years.

[0046] In one embodiment, the temperature prediction device acquires all historical temperature data within a preset year-length window from the latest historical temperature data in the historical temperature data sequence. It calculates the exponentially weighted average trend characteristic within the preset year-length window using the weighting formula: alpha = 1 - e^(ln(0.5) / 365*n) and the exponentially weighted average trend recursive formula: EMA_t = alpha × x_t + (1-alpha) × EMA_(t-1). Here, alpha represents the weight, signifying the influence of older historical temperature data on the current value, assigning higher weight to more recent historical temperature data to enhance responsiveness to trend reversals. n is the length of the preset year-length window, EMA_t is the exponentially weighted average trend characteristic of the current historical temperature data, x_t is the latest historical temperature data, and EMA_(t-1) is the exponentially weighted average trend characteristic of the historical temperature data from the day before the current historical temperature data.

[0047] In one embodiment, the long-term temperature trend feature group includes the average of historical temperature data for the most recent 3 years, 5 years, and 10 years, as well as the exponentially weighted average of the historical temperature data for the most recent 3 years, 5 years, and 10 years. Alternatively, the long-term temperature trend feature group includes the average of historical temperature data for the most recent 3 years and 5 years, as well as the exponentially weighted average of the historical temperature data for the most recent 3 years and 5 years. The specific composition of the long-term temperature trend feature group is not limited here and can be set according to specific circumstances.

[0048] In one embodiment, the preset year length window includes a climate baseline period of nearly 30 years. The temperature prediction device acquires all temperature data within a specified year from the latest temperature data from historical temperature data, calculates the corresponding moving average trend characteristics, and simultaneously uses Theil-Sen robust regression analysis to calculate long-term climate trend characteristics.

[0049] In one embodiment, the long-term temperature trend feature set includes a fusion of a rolling average trend based on historical data, a Theil-Sen robust regression trend, and a global warming background trend.

[0050] The temperature prediction device in this embodiment constructs a short-term temperature fluctuation feature group and a long-term temperature trend feature group through rigorous temporal feature extraction, which enables the simultaneous capture of short-term temperature fluctuations and long-term climate trends during the prediction process, significantly improving prediction accuracy compared to traditional single-feature prediction methods.

[0051] Please refer to Figure 3 , Figure 3This is a flowchart illustrating the third embodiment of the temperature prediction method provided in this application. The difference between the third embodiment and the first and second embodiments lies in the step of predicting the predicted temperature data for a preset number of days in the future based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group using an improved LSTM neural network, which includes: Step S301: Perform rolling window standardization on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group to obtain the meteorological standard data sequence, the short-term temperature fluctuation standard feature group, and the long-term temperature trend standard feature group.

[0052] In this embodiment, the temperature prediction device performs rolling window standardization on multi-source meteorological data sequences, short-term temperature fluctuation feature groups, and long-term temperature trend feature groups to obtain meteorological standard data sequences, short-term temperature fluctuation standard feature groups, and long-term temperature trend standard feature groups. It should be noted that the temperature prediction device adopts a strict time-series principle, dynamically matching the corresponding standardized time window based on the type of time-series feature being processed and its corresponding time scale, ensuring that only historical information is used. The temperature prediction device needs to dynamically match the standardized time window for the corresponding cause based on the type of time-series feature being processed and its corresponding time scale. The specific matching logic is as follows: short-term features (such as 3-day variations), reflecting short-term weather fluctuations (such as cold waves, sudden cold spells), are standardized using a 15-day time window; seasonal variation features (such as 90-day variations), reflecting seasonal transitions (spring cold, autumn warmth), are standardized using a 180-day time window; long-term trend features (such as 3-year / 5-year averages), reflecting global warming or periodic climate patterns, are standardized using a 10-year time window. Selection logic explanation: If the window is too small, the statistics will be unstable and noisy; if the window is too large, it will not be able to reflect the changes in the current climate state and will lag significantly. Therefore, a "scale alignment" strategy is adopted: the standardized window is slightly larger than or covers the time dynamic range represented by the feature, preferably 1-2 times the period corresponding to the feature.

[0053] In one embodiment, the multi-source meteorological data sequence is a sequence composed of temperature data for each day over the past 60 days. In this case, the temperature prediction device uses historical temperature data from the past 180 days as a time window, calculates the mean and standard deviation of the temperature data within this time window, and then calculates the standard data corresponding to each day's temperature data based on the mean and standard deviation. The specific formula is: Standard data = (Temperature data for each day - Mean) / Standard deviation. This yields the meteorological standard data sequence.

[0054] In one embodiment, the short-term temperature fluctuation feature group includes the latest historical temperature data, the difference between the latest historical temperature data and historical temperature data from 3 days ago, a first difference between the latest historical temperature data and historical temperature data from 3 days ago, a second difference between the latest historical temperature data and historical temperature data from 15 days ago, a third difference between the latest historical temperature data and historical temperature data from 30 days ago, a fourth difference between the latest historical temperature data and historical temperature data from 90 days ago, and a fifth difference between the latest historical temperature data and historical temperature data from 180 days ago. For the latest historical temperature data, the first difference, and the second difference, a reference historical temperature data from the past 15 days is used as a time window to calculate the mean and standard deviation of the temperature data within the time window. Based on the mean and standard deviation, standard data corresponding to the latest historical temperature data, the first difference, and the second difference are calculated. For the third difference, the fourth difference, and the fifth difference, a reference historical temperature data from the past 180 days is used as a time window to calculate the mean and standard deviation of the temperature data within the time window. Based on the mean and standard deviation, standard data corresponding to the third difference, the fourth difference, and the fifth difference are calculated. This allows us to obtain the standard characteristic set of short-term temperature fluctuations.

[0055] In one embodiment, the long-term temperature trend feature group includes the average values ​​of historical temperature data from the most recent 3 years and the most recent 5 years, as well as the exponentially weighted average values ​​of historical temperature data from the most recent 3 years and the most recent 5 years. Using reference historical temperature data from the past 10 years as a time window, the mean and standard deviation of the temperature data within this time window are calculated. Based on the mean and standard deviation, standard data corresponding to the average values ​​of historical temperature data from the most recent 3 years and the most recent 5 years, as well as the exponentially weighted average values ​​of historical temperature data from the most recent 3 years and the most recent 5 years, are calculated. This yields the standard feature group for the long-term temperature trend.

[0056] Understandably, standardizing features at different scales using time windows that match their cycles helps improve sensitivity and accuracy in dealing with extreme events across scales, such as 7-15 day cold waves and 2-7 year El Niño events.

[0057] In one embodiment, when calculating the standard deviation of various time windows used in the standardization process, the standard deviation needs to be compared with a preset threshold. If the standard deviation is less than the preset threshold, a larger time window is automatically switched for standardization to prevent the standardization result from drastic fluctuations or even overflow caused by an extremely small standard deviation, which could lead to subsequent erroneous predictions.

[0058] In one embodiment, the temperature prediction device employs a rolling window normalization method, which uses corresponding historical windows to standardize features at different time scales to prevent data leakage.

[0059] In one embodiment, when calculating the standard deviation of various time windows used in the standardization process, the standard deviation needs to be compared with a preset threshold. If the standard deviation is less than the preset threshold, a larger time window is automatically switched for standardization to prevent the standardization result from drastic fluctuations due to an extremely small standard deviation.

[0060] Step S302: Construct a time series feature tensor based on the meteorological standard data sequence, the short-term temperature fluctuation standard feature group, and the long-term temperature trend standard feature group.

[0061] Step S303: Based on the time-series feature tensor and the improved LSTM neural network, predict the temperature data for the next preset number of days.

[0062] In this embodiment, the temperature prediction device constructs a time-series feature tensor based on meteorological standard data sequences, short-term temperature fluctuation standard feature groups, and long-term temperature trend standard feature groups. Based on the time-series feature tensor and an improved LSTM neural network, it predicts the temperature data for the next preset number of days.

[0063] The temperature prediction device in this embodiment uses a rolling window normalization method to standardize features at different scales, ensuring strict temporal constraints and helping to improve the accuracy of subsequent temperature predictions based on the standardized features.

[0064] In one embodiment, the step of predicting the predicted temperature data for a preset number of days in the future based on the temporal feature tensor and the improved LSTM neural network includes: Step S3031: Perform multi-scale feature fusion on the short-term temperature fluctuation standard feature group and the long-term temperature trend standard feature group in the time series feature tensor to obtain the target tensor.

[0065] Step S3032: Input the target tensor into the improved LSTM neural network to predict the predicted temperature data for the next preset number of days.

[0066] In this embodiment, the temperature prediction device performs multi-scale feature fusion on the standard feature groups of short-term temperature fluctuations and long-term temperature trends in the time-series feature tensor to obtain a target tensor. The target tensor is then input into an improved LSTM neural network to predict the temperature data for the next preset number of days.

[0067] In one embodiment, the temperature prediction device maps features of different scales onto the dimensional space of the LSTM hidden layer through linear projection and linear transformation to obtain corresponding feature projections. These different feature projections are then weighted and fused to obtain a fused feature tensor. An improved LSTM encoder is used to encode the fused feature tensor to obtain the target tensor.

[0068] The temperature prediction device in this embodiment performs deep fusion of multi-scale features in the time-series feature tensor to obtain the target tensor, and performs temperature prediction through an improved LSTM neural network. This enhances the model's ability to understand multi-scale dynamic coupling and helps to improve prediction accuracy.

[0069] Please refer to Figure 4 , Figure 4 This application provides a flowchart illustrating a fourth embodiment of the temperature prediction method. The difference between the fourth embodiment and the first to third embodiments lies in the step of performing multi-scale feature fusion on the short-term temperature fluctuation standard feature group and the long-term temperature trend standard feature group in the time-series feature tensor to obtain the target tensor, which includes: Step S401: The long-term temperature trend standard feature group is mapped to the LSTM hidden layer dimension space in the preset LSTM encoder by linear projection to obtain the long-term trend feature projection.

[0070] Step S402: The standard feature set of short-term temperature fluctuations is mapped to the LSTM hidden layer dimension space in the preset LSTM encoder by linear transformation to obtain the short-term fluctuation feature projection.

[0071] Step S403: The long-term trend feature projection and the short-term fluctuation feature projection are weighted and fused to obtain the fused feature tensor.

[0072] In this embodiment, the temperature prediction device performs dimensional transformation on the standard feature groups of short-term temperature fluctuations and long-term temperature trends in the time-series feature tensor, respectively; maps the standard feature groups of long-term temperature trends to the dimensional space of the LSTM hidden layer through linear projection to obtain the long-term trend feature projection; maps the standard feature groups of short-term temperature fluctuations to the dimensional space of the LSTM hidden layer through linear transformation to obtain the short-term fluctuation feature projection; and performs weighted fusion of the long-term trend feature projection and the short-term fluctuation feature projection to obtain the fused feature tensor.

[0073] In one embodiment, the time-series feature tensor contains a feature vector composed of multiple dimensional features, including short-term fluctuation features reflecting the recent rate of temperature change and long-term trend features reflecting the climate background state.

[0074] In one embodiment, the feature tensor includes a feature vector composed of nine dimensions. The first six dimensions represent standard features of short-term temperature fluctuations, reflecting the rate and direction of recent temperature changes: 1st dimension: the change in the latest temperature data relative to 3 days ago; 2nd dimension: the change in the latest temperature data relative to 15 days ago; 3rd dimension: the change in the latest temperature data relative to 30 days ago; 4th dimension: the change in the latest temperature data relative to 90 days ago; 5th dimension: the change in the latest temperature data relative to 180 days ago; 6th dimension: the latest temperature data (standardized). The last three dimensions represent standard features of long-term temperature trends, reflecting the climate background: 7th dimension: the moving average of temperature over the past 3 years; 8th dimension: the moving average of temperature over the past 5 years; 9th dimension: the trend value of temperature over the past 10 years, or calculated using an exponential weighting method, giving higher weight to recent data. Thus, the feature tensor has a nine-dimensional feature vector for each day of the past 60 days, and 60 consecutive days constitute a three-dimensional data block: a total of 60 time points × 9 features per point.

[0075] In one embodiment, the temperature prediction device splits the aforementioned 9-dimensional feature input into two different processing paths. One path specifically processes the first 6 dimensions of short-term temperature fluctuation standard features, while the other path extracts the last 3 dimensions of long-term temperature trend standard features. Since the original features have low dimensionality (6-dimensional and 3-dimensional), and the model needs to capture complex nonlinear relationships in a higher-dimensional space, the temperature prediction device performs dimensionality-up transformations on both types of features. For the vector sequence composed of the 6 short-term temperature fluctuation standard features (60 time points in total), the temperature prediction device uses a linear transformation operation to convert the 6-dimensional vector at each time point into a higher-dimensional vector (e.g., 128-dimensional). This process is called "principal feature projection," resulting in a time series containing 60 high-dimensional vectors, i.e., the projection of the short-term fluctuation standard feature group. For the single vector composed of the 3 long-term temperature trend standard features (extracted at only one time point), the temperature prediction device also performs an independent linear transformation, expanding it from 3-dimensional to the same 128-dimensional high-dimensional space. This high-dimensional vector no longer changes over time, resulting in a global "climate context vector," i.e., the projection of the long-term trend standard feature group. Next, the system copies the 128-dimensional "climate context vector" 60 times, corresponding it one-to-one with the 60 time points to form a new 60×128-dimensional tensor. This broadcast long-term trend tensor is then added element-wise to the previously obtained "principal feature projection." In other words, the short-term feature representation at each time point is superimposed with the same long-term trend correction term, resulting in the fused feature tensor.

[0076] Step S404: The fused feature tensor is temporally encoded using a preset LSTM encoder to obtain the target tensor.

[0077] In this implementation, the temperature prediction device performs time-series encoding on the fused feature tensor using a preset LSTM encoder to obtain the target tensor.

[0078] In one embodiment, the step of performing temporal encoding processing on the fused feature tensor using an improved LSTM encoder to obtain the target tensor includes: Step S4041: Input the fused feature tensor into the temporal attention processing channel and the feature attention processing channel of the improved LSTM encoder, respectively.

[0079] In this embodiment, the temperature prediction device inputs the fused feature tensor into the temporal attention processing channel and the feature attention processing channel of the improved LSTM encoder, respectively.

[0080] Step S4042: Analyze each target time step in the fused feature tensor through the time attention processing channel to generate time attention weights, and generate a time context-enhanced feature sequence based on the time attention weights and the fused feature tensor.

[0081] In this embodiment, the temperature prediction device analyzes each target time step in the fused feature tensor through a time attention processing channel, generates time attention weights, and generates a time context-enhanced feature sequence based on the time attention weights and the fused feature tensor.

[0082] In one embodiment, the temperature prediction device treats the high-dimensional feature sequence of the past 60 days in the fused feature tensor as a set of "memory units," where the vector at each time point can potentially serve as an important reference for future predictions. For each target time point in the sequence (e.g., day 45), the temperature prediction device calculates its "correlation strength" with all other time points (including itself). For example, is the temperature anomaly on day 45 highly correlated with the cooling process on day 38, or more significantly affected by a frontal event on day 30? The temperature prediction device generates a set of weights—called "temporal attention weights"—based on these correlation strengths. Higher weights indicate that the information at that target time point should receive more attention. Then, the temperature prediction device performs a weighted summation of the feature vectors of all time points in the past 60 days in the fused feature tensor according to the temporal attention weights of the target time point, generating a new vector representation that includes global temporal context, ultimately resulting in a temporally context-enhanced feature sequence.

[0083] Step S4043: Analyze each feature in the fused feature tensor through the feature attention processing channel to generate feature attention weights, and generate a feature sequence with enhanced feature context based on the feature attention weights and the fused feature tensor.

[0084] In this embodiment, the temperature prediction device analyzes each feature in the fused feature tensor through the feature attention processing channel, generates feature attention weights, and generates a feature sequence with enhanced feature context based on the feature attention weights and the fused feature tensor.

[0085] In one embodiment, for each time point in the fused feature tensor over the past 60 days, the temperature prediction device treats all feature dimensions at that time point as a set of "candidate signal sources," such as "3-day temperature difference," "5-year trend," and "current temperature." It assesses the differences in importance between these features: whether the current period is one of drastic change or a climate transition year. The temperature prediction device constructs a "feature correlation network" to examine the synergistic effect between each pair of features. For example, "3-day significant temperature drop" is often accompanied by "low soil temperature," and these two features are assigned a high cross-correlation, while "10-year warming trend" may temporarily fail during winter cold waves, resulting in a reduced correlation. Based on the above analysis, the temperature prediction device generates a set of "feature attention weights" to redistribute the contribution ratio of each feature. Then, the temperature prediction device recombines all features according to these weights to form a new feature vector that better reflects the essence of the current meteorological state. The above process is executed one by one at each of the 60 time points, generating a feature sequence with enhanced feature context.

[0086] Step S4044: Integrate the temporal context-enhanced feature sequence and the feature context-enhanced feature sequence to obtain a joint feature sequence that combines temporal context awareness and feature selection capabilities.

[0087] In this embodiment, the temperature prediction device integrates the time context-enhanced feature sequence and the feature context-enhanced feature sequence to obtain a joint feature sequence that combines time context awareness and feature selection capabilities.

[0088] In one embodiment, the temperature prediction device obtains a time-context-enhanced feature sequence to emphasize "which time point is most important," and a feature-context-enhanced feature sequence to emphasize "which feature is most important." The temperature prediction device employs a gated fusion strategy (which can be understood as intelligent weighted merging) to combine the two: first, it compares the consistency between the time-context-enhanced feature sequence and the feature-context-enhanced feature sequence; if both point to the same conclusion (e.g., "recent mutations dominate"), the signal is strengthened; if there is a conflict (e.g., the time frame is stable, but a certain feature undergoes a mutation), an adjustment mechanism is introduced to prevent misjudgment; finally, a joint feature sequence with both time context awareness and feature selection capabilities is obtained.

[0089] Step S4045: Perform LSTM encoding on the joint feature sequence to obtain the target tensor.

[0090] In this embodiment, the temperature prediction device performs LSTM encoding on the joint feature sequence to obtain the target tensor.

[0091] In one embodiment, the temperature prediction device feeds the joint feature sequence into a multi-layered stacked time-series modeling structure (based on an improved Transformer architecture). This structure analyzes the data layer by layer, performing the following tasks: In each layer, the model examines the correlation between various time points, identifying which historical patterns most influence the current state. For example, the model might find that two consecutive weeks of unusually cold weather in autumn often foreshadow strong cold air activity in early winter. Simultaneously, each layer retains residual connections to prevent information loss during deep propagation, and a normalization mechanism is used to stabilize the training process. The activation function is GELU, enhancing the model's ability to fit nonlinear changes. After two to three layers of the above processing, the joint feature sequence is gradually refined into a set of highly abstract, context-rich hidden state sequences, i.e., the target tensor. The target tensor contains 60 time points; each time point corresponds to a 128-dimensional high-dimensional vector, and each vector integrates: the original short-term change information, the long-term climate trend background, the dynamic dependence between different time periods, the relative importance judgment between different features, and a clear time sequence marker.

[0092] The temperature prediction device in this embodiment achieves deep feature extraction through multi-scale feature fusion and attention mechanism, introduces the global modulation effect of long-term trends to enable the model to have climate perception capabilities, and uses dynamic weighting mechanism to allow the model to autonomously select the focus, significantly improving the modeling accuracy of complex temperature systems.

[0093] Please refer to Figure 5 , Figure 5 This application provides a flowchart illustrating a fifth embodiment of the temperature prediction method. The difference between this fifth embodiment and the first to fourth embodiments lies in the step of inputting the target tensor into an improved LSTM neural network to predict the predicted temperature data for a preset number of days in the future, which includes: Step S501: Input the target tensor into the improved LSTM neural network to predict the temperature data for the next day.

[0094] In this embodiment, the temperature prediction device inputs the target tensor into an improved LSTM neural network to predict the temperature data for the next day. The LSTM neural network is also called a prediction head, which can be a direct regression prediction head, a time projection head, or a pseudo-decoder. In one embodiment, the prediction head is a direct regression prediction head, which directly regresses the target encoded tensor. The direct regression prediction head outputs the predicted meteorological data for the next 30 days at once through a fully connected layer, while the temperature prediction device only retains the predicted temperature data for the next day.

[0095] Step S502: Add the predicted temperature data for the next day to the historical temperature data sequence, and recalculate the short-term temperature fluctuation characteristic group and the long-term temperature trend characteristic group based on strict time sequence principles.

[0096] Step S503: Based on the updated multi-source meteorological data sequence, the new short-term temperature fluctuation feature group, and the new long-term temperature trend feature group, a new target tensor is determined, and the new target tensor is input into the improved LSTM neural network.

[0097] Step S504: Continuously predict until the improved LSTM neural network outputs a predicted temperature data sequence for the next preset number of days.

[0098] In this embodiment, the temperature prediction device adds the predicted temperature data for the next day to the historical temperature data sequence and recalculates the short-term temperature fluctuation feature group and the long-term temperature trend feature group based on strict time sequence principles. Based on the updated multi-source meteorological data sequence, the new short-term temperature fluctuation feature group, and the new long-term temperature trend feature group, a new target tensor is determined and input into the improved LSTM neural network. The prediction is iterated until the improved LSTM neural network outputs a predicted temperature data sequence for the next preset number of days.

[0099] In one embodiment, the recursive prediction process is as follows: the model performs forward propagation and outputs the predicted temperature data for the first day of the future; the new predicted temperature data is incorporated into the historical sequence, and all dynamic features are updated in real time; a fixed-length sliding input window is maintained; the above steps are repeated until the prediction of all the preset number of future days is completed.

[0100] The temperature prediction device in this embodiment adopts a cyclic iterative prediction method. Each prediction step is based on the latest feature state, which avoids the problem of using outdated features to predict the future, significantly reduces error accumulation, can quickly respond to temperature changes, adjust trend judgment in a timely manner, and improve the accuracy of temperature prediction.

[0101] In one embodiment, during the initial preparation phase, it is necessary to determine the hyperparameters of the temperature prediction device. This application determines the hyperparameters through the following steps: 1. Define the hyperparameter search space; Before starting optimization, first clarify the key hyperparameters that need to be adjusted and their possible value ranges. This application focuses on the three core parameters that have the greatest impact on model performance: hidden layer dimension (d_model): represents the dimensionality of the feature vectors inside the model, determining the information representation capability; number of attention heads (nhead): controls the number of time-dependent patterns processed in parallel in the multi-head attention mechanism; Dropout rate: used to prevent model overfitting, the proportion of randomly masked neuron connections during training. Based on actual needs and computational resource constraints, reasonable value ranges are set: hidden layer dimension is selected from 64 or 128; number of attention heads is an integer value between 4 and 8; Dropout rate varies continuously between 0.1 and 0.3. 2. Automated search execution; the entire search process is driven by the TPE Bayesian optimization algorithm. Unlike exhaustive grid search or random search, this algorithm can build a probabilistic model based on existing experimental results and intelligently infer the parameter combinations more likely to achieve high performance, thus significantly reducing unnecessary attempts. The specific implementation steps are as follows: Initialization optimization task: Set the optimization objective to minimize the prediction error (e.g., mean absolute error MAE) on the validation set, ensuring that the selected parameters can truly improve the model's generalization ability. Iterative experiment: The system automatically selects a set of candidate parameters, constructs the corresponding Transformer model, trains and validates it on historical meteorological data, and records its performance. Feedback learning: After each experiment, the TPE algorithm updates its internal model, analyzes which parameter values ​​tend to bring lower errors, and guides the next sampling accordingly. Convergence judgment: After 10 to 20 iterations, the algorithm tends to stabilize and outputs the current optimal set of hyperparameter configurations. 3. Integration with temperature prediction equipment: After optimization, the optimal parameters are not only used for a single experiment but are solidified into the final deployed temperature prediction equipment for long-term reuse. During the offline training phase, all hyperparameters are searched using historical data, and the optimal model structure and weights are saved. In the online prediction phase, the optimized parameter configuration is directly loaded without readjustment, ensuring a fast, stable, and consistent inference process. This "optimize once, use long-term" approach maximizes model performance while meeting the requirements for response speed and system reliability in real-world business scenarios.

[0102] refer to Figure 6 and Figure 7 , Figure 6 This is a comparison chart showing the temperature prediction verification of the temperature prediction method provided in this application. Figure 7 The temperature prediction accuracy comparison chart of the temperature prediction method provided in this application shows that the overall trend of the temperature predicted by the model is in good agreement with that of the observed temperature. However, the amplitude of the temperature change predicted by the model is smaller than that of the observed temperature. The evaluation shows that the MAE of the model test set is 2.065°C and the standard deviation of the prediction error is 2.72°C.

[0103] refer to Figure 8 and Figure 9 , Figure 8 Thermographic maps of monthly temperature observation anomalies for the temperature prediction method provided in this application. Figure 9 The heatmap shows the monthly temperature prediction anomaly error of the temperature prediction method provided in this application. It can be seen that the monthly temperature anomalies predicted by the model are generally consistent with the observed anomalies, and the anomaly sign accuracy is 78.5%, which shows that the model has good overall prediction performance.

[0104] Please refer to Figure 10 This application also provides a temperature prediction device, the temperature prediction device comprising: The data acquisition module 10 is used to acquire historical temperature data sequences and multi-source meteorological data sequences, including wind speed data, soil temperature data, snow cover data, and sea surface temperature influence data.

[0105] The feature extraction module 20 is used to perform strict time-series feature extraction on the historical temperature data sequence to obtain short-term temperature fluctuation feature group and long-term temperature trend feature group.

[0106] The model prediction module 30 is used to predict the temperature data for the next preset number of days based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, using an improved LSTM neural network.

[0107] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0108] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0109] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0110] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A temperature prediction method based on hybrid spatiotemporal neural network and multi-scale feature fusion, characterized in that, The method includes: Historical temperature data sequences and multi-source meteorological data sequences are acquired, including wind speed data, soil temperature data, snow cover data, and sea surface temperature data. Strict time-series feature extraction is performed on the historical temperature data sequence to obtain a short-term temperature fluctuation feature group and a long-term temperature trend feature group, wherein the strict time-series feature extraction only uses historical information; Based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, the predicted temperature data for the next preset number of days is obtained through an improved LSTM neural network.

2. The temperature prediction method according to claim 1, characterized in that, The step of performing rigorous time-series feature extraction on the historical temperature data sequence to obtain short-term temperature fluctuation feature groups and long-term temperature trend feature groups includes: Obtain the latest temperature data from the historical temperature data sequence, and obtain reference temperature data from the historical temperature data sequence that differs from the latest temperature data by a preset number of days; Calculate the difference between each of the reference temperature data and the latest temperature data, and obtain a short-term temperature fluctuation feature group based on the difference and the latest temperature data, wherein the short-term fluctuation feature group includes a 7-day anomaly trend, a 30-day anomaly trend and a seasonal anomaly pattern. Based on a preset year length window, rolling average trend analysis and regression analysis are performed on each temperature data in the historical temperature data sequence to obtain the moving average trend characteristics and long-term climate trend characteristics of each temperature data. Based on the moving average trend characteristics and the long-term climate trend characteristics, combined with the background trend of global warming, a long-term temperature trend characteristic group is determined.

3. The temperature prediction method according to claim 1, characterized in that, The step of predicting the predicted temperature data for a preset number of days in the future using an improved LSTM neural network based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group includes: The multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group are standardized by rolling window to obtain the meteorological standard data sequence, the short-term temperature fluctuation standard feature group, and the long-term temperature trend standard feature group. Based on the meteorological standard data sequence, the short-term temperature fluctuation standard feature group, and the long-term temperature trend standard feature group, a time-series feature tensor is constructed. Based on the aforementioned temporal feature tensor and the improved LSTM neural network, predicted temperature data for the next preset number of days is obtained.

4. The temperature prediction method according to claim 3, characterized in that, The step of predicting the predicted temperature data for a preset number of days in the future based on the time-series feature tensor and the improved LSTM neural network includes: Multi-scale feature fusion is performed on the short-term temperature fluctuation standard feature group and the long-term temperature trend standard feature group in the time-series feature tensor to obtain the target tensor; The target tensor is input into an improved LSTM neural network to predict the temperature data for the next preset number of days.

5. The temperature prediction method according to claim 4, characterized in that, The step of performing multi-scale feature fusion on the standard feature set of short-term temperature fluctuations and the standard feature set of long-term temperature trends in the time-series feature tensor to obtain the target tensor includes: The long-term temperature trend standard feature set is mapped to the LSTM hidden layer dimension space in the preset LSTM encoder by linear projection to obtain the long-term trend feature projection. The standard feature set of short-term temperature fluctuations is mapped to the LSTM hidden layer dimension space in the preset LSTM encoder by linear transformation to obtain the short-term fluctuation feature projection. The long-term trend feature projection and the short-term fluctuation feature projection are weighted and fused to obtain the fused feature tensor; The target tensor is obtained by performing temporal encoding on the fused feature tensor using a preset LSTM encoder.

6. The temperature prediction method according to claim 5, characterized in that, The step of performing temporal encoding processing on the fused feature tensor using a preset LSTM encoder to obtain the target tensor includes: The fused feature tensor is input into the temporal attention processing channel and the feature attention processing channel of the preset LSTM encoder, respectively; The time attention processing channel is used to analyze each time step in the fused feature tensor to generate time attention weights, and based on the time attention weights and the fused feature tensor, a time context-enhanced feature sequence is generated. Each meteorological feature in the fused feature tensor is analyzed through the feature attention processing channel to generate feature attention weights, and a feature sequence with enhanced feature context is generated based on the feature attention weights and the fused feature tensor. The temporal context-enhanced feature sequence and the feature context-enhanced feature sequence are integrated to obtain a joint feature sequence that combines temporal context awareness and feature selection capabilities. The joint feature sequence is encoded using LSTM to obtain the target tensor.

7. The temperature prediction method according to claim 4, characterized in that, The step of inputting the target tensor into an improved LSTM neural network to predict the temperature data for a preset number of days in the future includes: The target tensor is input into an improved LSTM neural network to predict the temperature data for the next day. The predicted temperature data for the next day is added to the historical temperature data sequence, and the short-term temperature fluctuation characteristic group and the long-term temperature trend characteristic group are recalculated based on strict time sequence principles. Based on the updated multi-source meteorological data sequence, the new short-term temperature fluctuation feature set, and the new long-term temperature trend feature set, a new target tensor is determined and input into the LSTM neural network. The prediction is iterated until the LSTM neural network outputs a sequence of predicted temperature data for the next preset number of days.

8. A temperature prediction device, characterized in that, The temperature prediction device includes: The data acquisition module is used to acquire historical temperature data sequences and multi-source meteorological data sequences, including wind speed data, soil temperature data, snow cover data, and sea surface temperature influence data. The feature extraction module is used to perform strict time-series feature extraction on the historical temperature data sequence to obtain short-term temperature fluctuation feature groups and long-term temperature trend feature groups. The model prediction module is used to predict the temperature data for the next preset number of days based on the multi-source meteorological data sequence, the short-term temperature fluctuation feature group, and the long-term temperature trend feature group, using an improved LSTM neural network.