Large watershed flow prediction method and system based on coupling seasonal effect PatchTST model
Through the coupled seasonal effect PatchTST model, large-scale watershed traffic data are regarded as independent channels, combined with Transformer architecture and blocking mechanism, the problems of weak correlation between traffic data and seasonal changes are solved in large-scale watersheds, and efficient and accurate traffic prediction is achieved.
Patent Information
- Application Number
- CN202510448173.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
In large-scale watersheds, due to the sparse geographical distribution of observation sites and large spatial spans, the traffic data has spatial heterogeneity and low correlation. Traditional methods are limited in traffic prediction, and models that rely solely on historical time windows may ignore seasonal periodic changes characteristics, affecting the prediction accuracy.
The coupled seasonal effect PatchTST model is adopted to treat traffic data as an independent channel, combine the Transformer architecture and blocking mechanism, seasonal periodic information is introduced, time series features are extracted through the multi-head self-attention mechanism, and traffic prediction results are generated through linear projection.
It significantly improves the accuracy and stability of traffic forecasting, breaks through the limitations of spatial heterogeneity and seasonal changes, and provides an efficient and stable prediction method, suitable for different river basins and observation sites, with strong robustness and generalization capabilities.
Smart Images

Figure CN120373539A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water conservancy technologies, and more specifically, to a large-scale basin flow prediction method and system based on a coupled seasonal effect PatchTST model, and even more specifically, to the application of the coupled seasonal effect PatchTST model in large-scale basin flow prediction. Background Art
[0002] In the context of intensified global climate change and frequent occurrence of extreme hydrological events, flow prediction, as one of the core technologies for water resource management, flood prevention and mitigation, has extremely important practical significance. The flow prediction of large-scale basins is not only related to flood warning and risk prevention, but also directly affects water resource allocation, ecological environment protection and regional economic sustainable development. Accurate flow prediction helps decision-makers scientifically allocate water resources, reduce economic losses caused by disasters, and at the same time provide a scientific basis for coping with the impact of climate change on the hydrological cycle.
[0003] Traditional flow prediction methods mainly rely on physical models and statistical models. Although these methods have a certain theoretical basis, when dealing with complex hydrological conditions and large-scale basin data, they often have problems such as low computational efficiency and insufficient prediction accuracy. With the rapid development of deep learning technology, data-driven time series prediction methods have made remarkable progress in the field of flow prediction. However, in large-scale basins, due to the sparse geographical distribution and large spatial span of observation stations, there are obvious spatial heterogeneities and low correlations in the flow data between stations. Even between stations with upstream and downstream topological relationships, the correlation of flow observation values is still weak, resulting in limited performance of traditional methods in large-scale basin prediction.
[0004] Patent document CN112801416A (application number: 202110262364.7) discloses an LSTM basin runoff prediction method based on multi-dimensional hydrological information, including the following steps: (1) calculating according to data information to obtain the annual cumulative anomaly value and the monthly rainfall anomaly percentage; at the same time, creating a data center runoff historical hydrological database; (2) dividing into multiple time periods, and performing time scale unification and normalization processing on the center runoff historical data; (3) using a classic three-layer LSTM neural network model including input, hidden and output to predict the runoff of the future time period; (4) obtaining the predicted runoff value of the final workload; (5) updating the data center runoff historical hydrological database with the runoff data of the prediction period.
[0005] To address this problem, PatchTST, a Transformer-based time series block model, can effectively capture long-term dependencies and local variation characteristics in time series data with its excellent time series modeling capabilities, showing strong generalization ability and prediction accuracy. However, in the flow prediction task, models that rely solely on historical time window data may ignore the seasonal periodic variation characteristics of flow, thereby affecting the accuracy of the prediction. Flow data usually show significant seasonal variation trends, especially in large basins with significant climate differences. The reasonable introduction of seasonal effects has become an important means to further improve prediction performance.
[0006] Therefore, how to combine the time series modeling advantages of the PatchTST model and effectively introduce seasonal effects to overcome the challenges of large-scale river basins with long geographical distances and weak correlation of flow data has become an important issue to be solved in the current flow prediction field. This will provide important technical support for improving the accuracy and applicability of flow prediction and promoting the development of water resources management and flood warning capabilities. Summary of the invention
[0007] In view of the defects in the prior art, the object of the present invention is to provide a large-scale basin flow prediction method and system based on the coupled seasonal effect PatchTST model.
[0008] A large-scale river basin flow prediction method based on a coupled seasonal effect PatchTST model provided by the present invention comprises:
[0009] Step S1: acquiring historical traffic time series data of the observation site, and preprocessing the acquired historical traffic time series data of the observation site to obtain the preprocessed historical traffic time series data of the observation site;
[0010] Step S2: construct a traffic prediction model based on the PatchTST model;
[0011] Step S3: Preprocess the historical flow time series data of the observation site and use the flow prediction model to predict the flow of the observation site.
[0012] Preferably, the step S1 comprises:
[0013] Step S1.1: Obtain the historical flow time series data of the observation site;
[0014] Input_len=seq_len+k·season_len
[0015] Among them, seq_len represents the past adjacent time window data; k represents the number of seasonal time windows; season_len represents the length of each seasonal time window;
[0016] Step S1.2: Normalize the historical flow time series data of the obtained observation stations to obtain the historical flow time series data of the observation stations after normalization processing.
[0017] Preferably, the flow prediction model includes: an independent channel and segmentation module, an encoder and projection module, and an output module;
[0018] The independent channel and segmentation module is used to model the historical flow time series data of multiple observation stations as independent channels;
[0019] The encoder and projection module is used to extract features from the historical flow time series data of the observation stations on the independent channels by using a Transformer encoder;
[0020] The output module is used to output the prediction results of all observation stations and splice the prediction results of all stations to generate a complete flow prediction sequence.
[0021] Preferably, the independent channel and segmentation module includes: respectively inputting the historical flow time series data of multiple preprocessed observation stations into independent channels and performing a chunking operation;
[0022]
[0023] Among them, represents the chunked data of the i-th station, N is the number of chunks; P represents the length of each chunk; S represents the stride.
[0024] Preferably, the encoder and projection module includes:
[0025] Through a linear mapping and a positional encoding W pos map the chunked data to a high-dimensional space:
[0026]
[0027] Among them, is the Transformer input of the i-th station;
[0028] In the Transformer encoder, calculate the attention weights through the multi-head self-attention mechanism to extract the time series features:
[0029]
[0030] Among them, W Q 、W K 、W V respectively represent the weight matrices of the i-th station; Q(i) , K (i) , V (i) represent the query, key, and value matrices respectively, and d k is the scaling factor; the encoder includes residual connections and a feed-forward neural network,
[0031] The time series features output a hidden representation through an embedding operation
[0032] Preferably, the output module includes:
[0033] The hidden representation z output by the encoder and the projection module (i) After being flattened, it passes through a linear projection layer and is mapped to the prediction target dimension:
[0034]
[0035] where W proj is the projection matrix, is the prediction result for the i-th site;
[0036] Finally, the prediction results of all sites are concatenated to generate a complete traffic prediction sequence:
[0037]
[0038] A large watershed flow prediction system based on a coupled seasonal effect PatchTST model provided by the present invention includes:
[0039] Module M1: Obtain the historical flow time series data of the observation sites, and preprocess the obtained historical flow time series data of the observation sites to obtain the preprocessed historical flow time series data of the observation sites;
[0040] Module M2: Construct a flow prediction model based on the PatchTST model;
[0041] Module M3: Use the preprocessed historical flow time series data of the observation sites to predict the flow of the observation sites using the flow prediction model.
[0042] Preferably, the module M1 includes:
[0043] Module M1.1: Obtain the historical flow time series data of the observation sites;
[0044] Input_len = seq_len + k·season_len
[0045] Among them, seq_len represents the data of adjacent past time windows; k represents the number of seasonal time windows; season_len represents the length of each seasonal time window;
[0046] Module M1.2: Normalize the historical flow time series data of the obtained observation stations to obtain the historical flow time series data of the observation stations after normalization.
[0047] Preferably, the flow prediction model includes: an independent channel and segmentation module, an encoder and projection module, and an output module;
[0048] The independent channel and segmentation module is used to model the historical flow time series data of multiple observation stations as independent channels;
[0049] The encoder and projection module is used to extract features from the historical flow time series data of the observation stations on the independent channels by using a Transformer encoder;
[0050] The output module is used to output the prediction results of all observation stations, and splice the prediction results of all stations to generate a complete flow prediction sequence.
[0051] Preferably, the independent channel and segmentation module includes: respectively inputting the historical flow time series data of multiple preprocessed observation stations into independent channels and performing a chunking operation;
[0052]
[0053] Among them, represents the chunked data of the i-th station, N is the number of chunks; P represents the length of each chunk; S represents the stride;
[0054] The encoder and projection module includes:
[0055] Through a linear mapping and a positional encoding W pos map the chunked data to a high-dimensional space:
[0056]
[0057] Among them, is the Transformer input of the i-th station;
[0058] In the Transformer encoder, calculate the attention weights through the multi-head self-attention mechanism and extract the time series features:
[0059]
[0060] Among them, WQ , W K , W V respectively represent the weight matrix of the i-th site; Q (i) , K (i) , V (i) respectively represent the query, key, and value matrices, and d k is the scaling factor; the encoder includes residual connections and a feed-forward neural network.
[0061] The time series features output hidden representations through an embedding operation
[0062] The output module includes:
[0063] The hidden representation z output by the encoder and the projection module (i) After being flattened, it passes through a linear projection layer and is mapped to the prediction target dimension:
[0064]
[0065] where, W proj is the projection matrix, is the prediction result of the i-th site;
[0066] Finally, the prediction results of all sites are concatenated to generate a complete traffic prediction sequence:
[0067]
[0068] Compared with the prior art, the present invention has the following beneficial effects:
[0069] 1. In view of the problem that the geographical locations of different observation sites are far apart and the correlation of traffic data is weak, the present invention constructs a time series prediction model, which not only fully excavates the data features within the time window, but also introduces seasonal cycle information, thereby significantly improving the accuracy and stability of traffic prediction;
[0070] 2. The present invention breaks through the limitation of the spatial heterogeneity of observation sites on the prediction performance. In view of the characteristics of sparse distribution of observation sites, large geographical location span, and weak correlation of traffic data in large basins, the present invention regards the traffic data of each site as an independent channel and uses the PatchTST model for time series modeling; on the basis of independent feature channels, the PatchTST model uses a block mechanism to capture local features of time series, and at the same time combines the advantages of the Transformer architecture to effectively model long-term dependencies and break through the application bottleneck of traditional methods under spatial heterogeneity conditions;
[0071] 3. The present invention introduces the seasonal effect to improve the prediction accuracy. Flow data is often significantly affected by seasonal cyclic variations. Pure prediction based on the historical time window may ignore this key feature. The present invention incorporates the seasonal effect by including the time window data of the same season in the past few years into the input and combines it with the data of the current time window for flow prediction. This design is similar to the way SARIMA models handle seasonality, enabling the model to capture the periodic variation patterns of flow data more comprehensively, thereby enhancing the rationality and accuracy of the prediction results.
[0072] 4. The present invention improves the applicability and generalization ability of the model. By constructing a PatchTST model coupled with the seasonal effect, it provides an efficient, stable, and highly applicable prediction method for the flow data characteristics of different river basins and different observation stations. Whether in the case of rich data or scarce observation stations, the model exhibits strong robustness and generalization ability, and can provide reliable technical support for water resource management, flood warning, and ecological protection in large-scale river basins.
[0073] 5. The present invention demonstrates significant performance advantages in practical applications such as water resource scheduling, flood warning, and ecological protection. It can provide more scientific and accurate technical support for hydrological prediction and water resource management, and has important engineering practical value and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Other features, objectives, and advantages of the present invention will become more apparent by reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0075] Figure 1 It is a flowchart of the PatchTST model for coupling the seasonal effect.
[0076] Figure 2 It is a diagram of multi-channel feature decomposition and block operation.
[0077] Figure 3 It is a diagram of the scaled dot product attention mechanism.
[0078] Figure 4 It is a diagram of flattening illustration and multi-channel combination reconstruction.
[0079] Figure 5 shows the flow prediction of some observation stations in the YANGYZE River Basin. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0080] The present invention will be described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made. These all belong to the protection scope of the present invention.
[0081] Embodiment 1
[0082] A large - scale watershed flow prediction method and system based on a PatchTST model with coupled seasonal effects provided by the present invention includes: constructing a PatchTST model with coupled seasonal effects; based on the constructed PatchTST model with coupled seasonal effects, in the time - series flow prediction task, aiming at the problems that the geographical positions of large - scale watershed observation stations are far apart and the correlation of flow data is weak, through the modeling method of introducing seasonal time windows and independent channels, efficient and accurate flow prediction is realized. It specifically includes five parts: overall architecture, model input, independent channels and segmentation, encoder and projection, and model output.
[0083] The large - scale watershed flow prediction method based on the PatchTST model with coupled seasonal effects includes:
[0084] Based on the PatchTST model, taking the flow data as the input time series, coupling the seasonal characteristics and independently modeling the time - series data of each observation station. In the PatchTST framework, the time series first undergoes seasonal effect coupling and block processing, and then the independent channels are input into the Transformer encoder to extract time - dependent relationships and local features. Finally, the predicted flow results of multiple stations are generated through linear projection and splicing. The overall process is as Figure 1 shown.
[0085] Model input module: By introducing seasonal time windows, the time - series characteristics of the flow data are extended to a combination of a basic window and a seasonal window, embedding the data characteristics of adjacent historical times and past seasonal cycles. The input data undergoes normalization processing and is segmented in a block form to provide high - quality time - series input features for the subsequent encoder.
[0086] Independent channels and segmentation module: Aiming at the characteristics that the geographical positions of large - scale watershed observation stations are scattered and the correlation of flow data is weak, the present invention regards the time - series flow data of each observation station as independent channels for modeling. Through the independent segmentation and shared - weight mechanism, the modeling complexity is effectively reduced, and the generalization ability and computational efficiency of the model in the multi - station prediction task are improved.
[0087] Encoder and Projection Module: Based on the PatchTST framework, the encoder performs temporal feature modeling on the data of each channel through the multi-head self-attention mechanism and local block feature extraction. Combining positional encoding and projection operations, the model can effectively capture the global temporal dependencies and local dynamic change features of traffic data.
[0088] Model Output Module: The features extracted by the encoder are linearly projected onto the target prediction dimension to generate traffic prediction results for each independent channel, and a complete multi-site traffic prediction sequence is formed through concatenation operations.
[0089] The PatchTST model with coupled seasonal effects proposed by the present invention combines the time series block modeling with seasonal cycle information, and provides an efficient and accurate traffic prediction method for the problems of scattered geographical locations of observation stations in large river basins, complex upstream and downstream topological relationships, and weak correlation of traffic data. Traditional traffic prediction methods are often limited by spatial heterogeneity and the single nature of time windows, and it is difficult to comprehensively capture the local features and seasonal variation laws of traffic data. Based on the PatchTST model, the present invention introduces the seasonal time window data of the same period last year, which can effectively mine the periodic fluctuation features of traffic data, make up for the limitations of simply relying on adjacent historical time windows, and further improve the rationality and accuracy of prediction results.
[0090] More specifically, the model input module includes:
[0091] The input of the model is the historical traffic time series data of multiple observation stations in a large river basin. For the traffic data of each station, the model not only considers the observed values of the past adjacent time windows, but also couples the data of seasonal time windows. The specific design is as follows:
[0092] Assume that the basic window length of the input time series is seq_len, corresponding to the past adjacent time window data; in order to introduce the seasonal effect, the data of the same season time windows of last year and the year before last are additionally added, and the final input length is:
[0093] Input_len = seq_len + k·season_len
[0094] where k represents the number of seasonal time windows, and season_len represents the length of each seasonal time window. For example, based on the daily traffic observation data, when seq_len = 30, and the 30-day data of the same season months of last year and the year before last are considered, then Input len = 30 + 30 + 30 = 90.
[0095] Specifically, as Figure 2 shown, the independent channel and segmentation module includes:
[0096] The present invention utilizes the independent channel characteristics of PatchTST to independently model the flow data of each observation site. The time-series data of multiple sites in a large watershed are regarded as independent channels and are respectively input into the Transformer encoder for prediction. This independent channel design has the following advantages: reducing the modeling complexity and avoiding interference caused by low correlation between channels; sharing model weights, being applicable to multi-site modeling tasks, and reducing the parameter scale.
[0097] For the flow data containing M sites, the input data is:
[0098]
[0099] Among them, represents the time-series flow data of the i-th site. The data is split into independent channels during the input stage, and each channel x (i) After instance normalization and patch operation, it is respectively input into the shared Transformer encoder. Regarding the details of the patch operation, each block length is P and the stride is S, generating a sequence of data blocks:
[0100]
[0101] Among them represents the patched data of the i-th site, and N is the number of patches.
[0102] The PatchTST model accurately captures the long-term dependence relationship and local change characteristics of the time series through the patch mechanism, has strong time-series modeling ability and generalization performance, and is particularly suitable for flow prediction under complex hydrological conditions in large-scale watersheds.
[0103] The encoder and projection module include:
[0104] The encoder uses the core Transformer encoder of the PatchTST model, which is responsible for extracting the local features and global dependence relationship of the time-series data. First, through the linear mapping and the position encoding W pos The patched data is mapped to a high-dimensional space:
[0105]
[0106] Among them, is the Transformer input of the i-th site.
[0107] Such as Figure 3As shown, in the Transformer encoder, attention weights are calculated through the multi-head self-attention mechanism to extract time series features:
[0108]
[0109] Among them, Q, K, and V respectively represent the query, key, and value matrices, and d k is the scaling factor. The encoder includes residual connections and a feed-forward neural network, and outputs a hidden representation
[0110] As Figure 4 shown, the model output includes:
[0111] The hidden representation z output by the encoder (i) After being flattened through the Flatten operation, and then passing through a linear projection layer, it is mapped to the prediction target dimension:
[0112]
[0113] Among them, W proj is the projection matrix, is the prediction result of the i-th site.
[0114] Finally, the prediction results of all sites are concatenated to generate a complete traffic prediction sequence:
[0115]
[0116] In this embodiment, the present invention makes full use of the coupling of the time series modeling ability of PatchTST and seasonal features, effectively solves the modeling problems of large geographical distances between observation sites in large river basins and weak correlation of flow data, and significantly improves the accuracy and stability of flow prediction in large river basins.
[0117] Based on the time series prediction of the basin flow of the observation sites numbered by the Global Runoff Data Center (GRDC), in order to eliminate the influence of the flow magnitude difference between different sites, the flow data is subjected to normal standardization processing before visualization. As Figures 5a to 5d shown, the abscissa in the figure is time (unit: day), and the ordinate is the standardized flow value.
[0118] The present invention also provides a large - scale watershed flow prediction system based on the coupled seasonal effect PatchTST model. The large - scale watershed flow prediction system based on the coupled seasonal effect PatchTST model can be realized by executing the process steps of the large - scale watershed flow prediction method based on the coupled seasonal effect PatchTST model. That is, those skilled in the art can understand the large - scale watershed flow prediction method based on the coupled seasonal effect PatchTST model as the preferred implementation manner of the large - scale watershed flow prediction system based on the coupled seasonal effect PatchTST model.
[0119] Those skilled in the art know that in addition to implementing the systems, devices, and their respective modules provided by the present invention in the form of pure computer - readable program codes, the method steps can be logically programmed to enable the systems, devices, and their respective modules provided by the present invention to be implemented in the form of logic gates, switches, application - specific integrated circuits, programmable logic controllers, and embedded microcontrollers, etc., to achieve the same program. Therefore, the systems, devices, and their respective modules provided by the present invention can be regarded as a kind of hardware component, and the modules included therein for implementing various programs can also be regarded as the structures within the hardware component; the modules for implementing various functions can also be regarded as either software programs for implementing the methods or the structures within the hardware component.
[0120] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above - mentioned specific implementation manners. Those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A large-scale watershed flow prediction method based on a coupled seasonal effect PatchTST model, characterized in that Including: Step S1: Obtain the historical flow time series data of the observation station, and preprocess the obtained historical flow time series data of the observation station to obtain the preprocessed historical flow time series data of the observation station; Step S2: Construct a flow prediction model based on the PatchTST model; Step S3: Use the preprocessed historical flow time series data of the observation station to predict the flow of the observation station by using the flow prediction model.
2. The large-scale watershed flow prediction method based on the coupled seasonal effect PatchTST model according to claim 1, wherein The said step S1 includes: Step S1.1: Obtain the historical flow time series data of the observation station; Input_len = seq_len + k·season_len where seq_len represents the data of adjacent time windows in the past; k represents the number of seasonal time windows; season_len represents the length of each seasonal time window; Step S1.2: Normalize the obtained historical flow time series data of the observation station to obtain the normalized historical flow time series data of the observation station.
3. The large-scale basin flow prediction method based on the coupled seasonal effect PatchTST model according to claim 1, characterized in that The said flow prediction model includes: an independent channel and segmentation module, an encoder and projection module, and an output module; The independent channel and segmentation module is used to model the historical flow time series data of multiple observation stations as independent channels; The encoder and projection module is used to extract features of the historical flow time series data of the observation station on the independent channel by using a Transformer encoder; The output module is used to output the prediction results of all observation stations, and splice the prediction results of all stations to generate a complete flow prediction sequence.
4. The large-scale basin flow prediction method based on the coupled seasonal effect PatchTST model according to claim 3, characterized in that The independent channel and segmentation module includes: respectively inputting the preprocessed historical flow time series data of multiple observation stations into independent channels and performing a chunking operation; Among them, represents the chunk data of the i-th site, N is the number of chunks; P represents the length of each chunk; S represents the stride.
5. The large-scale watershed flow prediction method based on the coupled seasonal effect PatchTST model according to claim 3, characterized in that The encoder and projection module includes: Through linear mapping and positional encoding W pos map the chunk data into a high-dimensional space: Among them, is the Transformer input of the i-th site; In the Transformer encoder, calculate the attention weights through the multi-head self-attention mechanism to extract time series features: Among them, W Q , W K , W V respectively represent the weight matrix of the i-th site; Q (i) , K (i) , V (i) respectively represent the query, key, and value matrices, d k is the scaling factor; the encoder includes residual connections and a feed-forward neural network. The time series features output hidden representations through an embedding operation 6. The large-scale watershed flow prediction method based on the coupled seasonal effect PatchTST model according to claim 3, characterized in that, The output module includes: The encoder and the hidden representation z output by the projection module (i) After passing through a flattening operation and then through a linear projection layer, it is mapped to the dimension of the prediction target: Among them, W proj is the projection matrix, is the prediction result of the i-th site; Finally, splice the prediction results of all stations to generate a complete flow prediction sequence:
7. A large-scale watershed flow prediction system based on a coupled seasonal effect PatchTST model, characterized in that, Including: Module M1: Obtain the historical flow time series data of the observation station, and preprocess the obtained historical flow time series data of the observation station to obtain the preprocessed historical flow time series data of the observation station; Module M2: Construct a flow prediction model based on the PatchTST model; Module M3: Use the preprocessed historical flow time series data of the observation station to predict the flow of the observation station by using the flow prediction model.
8. The large-scale watershed flow prediction system based on the coupled seasonal effect PatchTST model according to claim 7, characterized in that, The said module M1 includes: Module M1.1: Obtain the historical flow time series data of the observation station; Input_len = seq_len + k·season_len where seq_len represents the data of adjacent time windows in the past; k represents the number of seasonal time windows; season_len represents the length of each seasonal time window; Module M1.2: Normalize the historical flow time series data of the obtained observation stations to obtain the normalized historical flow time series data of the observation stations.
9. The large-scale watershed flow prediction system based on the coupled seasonal effect PatchTST model according to claim 7, characterized in that, The flow prediction model includes: an independent channel and segmentation module, an encoder and projection module, and an output module; The independent channel and segmentation module is used to model the historical flow time series data of multiple observation stations as independent channels; The encoder and projection module is used to extract features from the historical flow time series data of the observation stations on the independent channels by using a Transformer encoder; The output module is used to output the prediction results of all observation stations and splice the prediction results of all stations to generate a complete flow prediction sequence.
10. The large watershed flow prediction system based on the coupled seasonal effect PatchTST model according to claim 9, wherein The independent channel and segmentation module includes: respectively inputting the preprocessed historical flow time series data of multiple observation stations into independent channels and performing a chunking operation; Among them, represents the chunk data of the i-th site, N is the number of chunks; P represents the length of each chunk; S represents the stride; The encoder and projection module includes: Through linear mapping and position encoding W pos map the chunk data to a high-dimensional space: Among them, is the Transformer input of the i-th site; In the Transformer encoder, calculate the attention weights through the multi-head self-attention mechanism to extract the time series features: Among them, W Q , W K , W V respectively represent the weight matrices of the i-th site; Q (i) , K (i) , V (i) respectively represent the query, key, and value matrices, d k is the scaling factor; the encoder includes residual connections and a feed-forward neural network. The time series features output hidden representations through an embedding operation The output module includes: The encoder and the hidden representation z output by the projection module (i) After passing through a flattening operation and then through a linear projection layer, it is mapped to the predicted target dimension: Among them, W proj is the projection matrix, is the prediction result of the i-th site; Finally, splice the prediction results of all stations to generate a complete flow prediction sequence:
Citation Information
Patent Citations
LSTM drainage basin runoff prediction method based on multi-dimensional hydrological information
CN112801416A