Intelligent flood runoff forecasting method based on large model

By using large language models and multi-source data fusion technology, the problems of low parameter calibration efficiency, poor adaptability and high migration cost in flood runoff forecasting have been solved, and efficient and accurate flood runoff forecasting has been achieved.

CN121787265APending Publication Date: 2026-04-03GUIZHOU EAST CENTURY SCI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing flood runoff forecasting technologies suffer from problems such as low parameter calibration efficiency, insufficient dynamic adaptability, high cross-basin migration costs, and insufficient fusion of multi-source data.

Method used

A flood runoff intelligent forecasting method based on a large language model is adopted. Through multi-source heterogeneous data fusion, feature engineering and a two-stage training strategy, a cross-modal conversion layer and a structured prompt template are constructed to realize the conversion of numerical hydrological time series data into semantic representation, and forecasting is carried out in combination with meteorological, hydrological and topographic data.

Benefits of technology

It improves the model's cross-basin generalization ability and prediction accuracy, reduces the cost of parameter recalibration for cross-basin applications, makes full use of the synergistic effect of multi-source data, adapts to changes in basin conditions, and enhances the physical rationality and accuracy of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
Patent Text Reader

Abstract

The invention discloses an intelligent flood runoff forecasting method based on a large model. The method comprises the steps of 1, fusion preprocessing and feature engineering of multi-source heterogeneous data; carrying out unified representation on meteorological, hydrological and terrain modal data, and providing input for the model; step 2, constructing a runoff forecasting architecture based on a large language model; numeric hydrological time series data are'translated 'into semantic representation capable of being understood by a large language model, and a structured prompt template is constructed to inject domain knowledge; 3, performing model training by adopting a two-stage training and optimization strategy; 4, flood runoff forecasting is achieved through the trained model; the problems of poor adaptability, low prediction precision, high migration cost and the like of flood runoff prediction in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of flood forecasting technology; in particular, it relates to an intelligent flood runoff forecasting method based on a large model. Background Technology

[0002] Current flood runoff forecasting primarily relies on physical mechanism models. While these models are theoretically mature, they still face numerous challenges in practical applications. From a technical perspective, traditional models have the following limitations:

[0003] First, a significant efficiency bottleneck exists in parameter calibration. Mechanistic models typically require a considerable amount of time for parameter calibration, and the entire process heavily relies on the experience and judgment of hydrological experts. A complete calibration process for a new watershed requires a substantial amount of continuous work from specialized technical personnel, and this high labor cost severely restricts the widespread application of the model.

[0004] Secondly, the models lack dynamic adaptability. With the intensification of global climate change, the runoff characteristics of major river basins in my country have changed significantly over the past few decades. The static parameter system of traditional models is ill-suited to these dynamic changes, leading to decreased prediction accuracy in rapidly urbanizing areas.

[0005] Third, cross-basin migration is costly. Practical applications show that when a model is migrated from one basin to another, a large number of parameters need to be recalibrated. This repetitive work not only wastes resources but also severely restricts the application of the model in small and medium-sized watersheds.

[0006] Finally, the integration of multi-source data is insufficient. Modern hydrological monitoring has formed a three-dimensional observation network including meteorological satellites, radar, and ground observation stations, but traditional models do not make full use of these heterogeneous data and fail to give full play to the synergistic effect of data. Summary of the Invention

[0007] The technical problem to be solved by this invention is to provide a smart flood runoff forecasting method based on a large model, so as to solve the problems of poor adaptability, low prediction accuracy and high migration cost faced by existing flood runoff forecasting technologies.

[0008] The technical solution of this invention is:

[0009] A smart flood runoff forecasting method based on a large model, the method comprising:

[0010] Step 1: Fusion, preprocessing, and feature engineering of multi-source heterogeneous data; unifying the representation of meteorological, hydrological, and topographic modal data to provide input for the model;

[0011] Step 2: Construct a runoff forecasting architecture based on a large language model; "translate" numerical hydrological time series data into semantic representations that the large language model can understand, and construct structured prompt templates to inject domain knowledge;

[0012] Step 3: Train the model using a two-stage training and optimization strategy;

[0013] Step 4: Implement flood runoff forecasting using the trained model.

[0014] Multi-source heterogeneous data includes:

[0015] Meteorological data: including rainfall, spatial raster data, recording hourly average rainfall in the basin; and temperature, time series data, recording hourly average temperature in the basin.

[0016] Hydrological data includes station flow data and time series data, recording hourly runoff at major hydrological stations;

[0017] Watershed attribute data includes: DEM, spatial raster data, which records the elevation values ​​of each grid within the watershed; soil type, category data, which describes the distribution of soil types in different areas within the watershed; and vegetation index, category data, which describes the vegetation cover status of the watershed.

[0018] Data fusion strategies include:

[0019] Time dimension alignment: unify all time series data to the same time frequency, ensuring that all time series have the same start and end times and time intervals;

[0020] Spatial dimension compression: For spatial data of DEM data and raster rainfall data, an average pooling strategy is used to process them into statistical values ​​that are consistent with the dimensions of time series slices;

[0021] Feature fusion architecture: It adopts a three-in-one fusion framework of "meteorology-hydrology-topography". After the data of each layer are aligned by time, they are spliced ​​together in the feature dimension to form a unified input matrix.

[0022] The feature engineering includes:

[0023] Spatial channels utilize deep learning to automatically extract watershed morphological features; the automatic extraction of watershed morphological features using deep learning includes:

[0024] The bottom feature extraction layer uses a one-dimensional convolutional network (1D-CNN) to process the local correlation patterns of each spatial feature;

[0025] The feature aggregation layer aggregates multi-scale spatial features into fixed-length vector representations through pooling operations.

[0026] Output a 128-dimensional spatial feature vector to comprehensively represent the geomorphological features of the watershed;

[0027] Time series channel: Capturing the dynamics of hydrological processes through multi-scale sliding windows:

[0028] Statistical feature extraction calculates the mean, variance, maximum, minimum, and trend slope statistical indicators for each window;

[0029] Frequency domain feature extraction uses Fast Fourier Transform (FFT) to extract periodic and frequency features;

[0030] A periodic feature encoder is designed for the time channel to construct seasonal time features.

[0031] StandardScaler is used for standardization, and the mean μ and standard deviation σ are calculated based on the training set and applied to all datasets to eliminate the influence of units and maintain the shape of the data distribution. Fully connected components are used to fuse data from different data sources.

[0032] Constructing a runoff forecasting architecture based on a large language model includes:

[0033] The backbone network uses the LLaMA model, and the pattern recognition capability is preserved through a parameter freezing strategy.

[0034] A text prototype alignment mechanism is designed in the cross-modal conversion layer to convert different morphological feature data into text encoding for fusion.

[0035] By designing multi-level prompt templates, hydrological knowledge and task objectives are structurally injected into the model, guiding the generation of prediction results that conform to physical laws.

[0036] The backbone network uses the LLaMA model, and the method for preserving pattern recognition capability through parameter freezing strategy includes:

[0037] Load the pre-trained model, loading the configuration and weights of the LLaMA-7B model from HuggingFace;

[0038] Setting `requires_grad = False` disables gradient computation in all layers of the model.

[0039] It is used only as a forward inference engine during training and does not update any weights.

[0040] A text prototype alignment mechanism is designed in the cross-modal conversion layer to convert different morphological feature data into text encoding for fusion, including:

[0041] First, the 30,522 tokens of LLaMA are mapped from a 30,522-dimensional one-hot representation to a 1,000-dimensional representation through a fully connected layer. The mapping layer parameters W are updated during training, and the linear combination of the original tokens is automatically learned to best express the hydrological time series features.

[0042] Secondly, a cross-modal feature reorganization layer is used to reorganize numerical hydrological time-series features into semantic language representations through an attention mechanism, achieving a smooth mapping from time-series space to language space.

[0043] The design of multi-level prompt templates includes:

[0044] Basic information layer: Watershed characteristics and statistical description, including watershed name, area, average elevation and slope topographic features, soil type distribution, vegetation cover and historical temperature statistics; described in natural language.

[0045] Task guidance layer: Defines the prediction objectives, including the prediction task type, input sequence length, and output requirements;

[0046] Dynamic statistics layer: Real-time data analysis, including the statistical characteristics of input data, calculating lag terms through functions, and dynamically generating data by combining real-time statistical information;

[0047] Feedback optimization mechanism: The weights of parameters in the prompt template are dynamically adjusted based on historical prediction errors; learnable prompt weights are introduced to optimize the importance of each feature prompt during training; prompt weights are defined using torch.nn.Parameter, and the optimal combination is learned through backpropagation.

[0048] The two-stage training and optimization strategy for model training includes:

[0049] General pre-training stage: Training is performed using watershed data from different climate zones and different landform types; backbone network parameters are frozen and only the cross-modal conversion layer and prediction head are trained; a text prototype alignment mechanism is used to achieve temporal-to-semantic mapping;

[0050] Specialized fine-tuning phase: Supervised fine-tuning using accurate historical data from the target watershed; Unfreezing parts of the backbone network layer for more refined parameter adjustments;

[0051] Dynamic path dropping mechanism: Randomly discard some connection paths in the neural network during forward propagation, forcing the model to learn redundant feature representations and preventing over-reliance on specific paths;

[0052] Data smoothing preprocessing mechanism: To address the common sawtooth fluctuations and negative value anomalies in hydrological time series data, data smoothing is performed before training to improve data quality and model training stability.

[0053] Adaptive learning rate scheduling mechanism: The learning rate is dynamically adjusted according to the training process to balance convergence speed and accuracy. The OneCycleLR strategy is used to first increase the temperature and then decrease it to break through local optima.

[0054] The beneficial effects of this invention are:

[0055] This invention has powerful cross-basin generalization and transfer capabilities: through a two-stage paradigm of "general pre-training + specialized fine-tuning" and the core technology of temporal input reprogramming, the model can quickly adapt to new watersheds, greatly reducing the cost of parameter recalibration and deployment threshold for cross-basin applications.

[0056] This invention has excellent multi-source data fusion capabilities: It designs a systematic multimodal data alignment, aggregation and feature engineering process, and utilizes the powerful representation capabilities of large models to deeply integrate multi-source information such as meteorology, hydrology, geospatial data and human activities, so as to give full play to the collaborative value of data.

[0057] This invention addresses the challenge of multimodal data fusion in hydrological forecasting by integrating diverse information such as meteorological observation data, geospatial data, hydrological monitoring data, and human activity data. It solves the alignment problem of data from different sources, including meteorological observations, geographic information, and historical hydrological records, by constructing a standardized processing workflow and a unified feature representation method, providing high-quality fused data input for runoff forecasting.

[0058] This invention employs advanced large-scale modeling technology, combining multi-source data such as precipitation, meteorology, and historical runoff to construct a runoff forecast with strong generalization capabilities, thus solving the problems of poor adaptability and high migration costs faced by existing flood runoff forecasting technologies.

[0059] This invention employs a "temporal input reprogramming" technique to convert numerical hydrological sequences into a representation suitable for large-scale model processing. By designing a dedicated encoder network and a multi-scale temporal segmentation strategy, it achieves efficient conversion of numerical hydrological sequences into semantic representations. A key focus is the design of specialized prompt templates that integrate hydrological knowledge and key indicators into the model. Simultaneously, a dynamic adaptive mechanism is employed, enabling the model to automatically adapt to changes in watershed conditions, thereby significantly improving the physical rationality and accuracy of cross-watershed predictions.

[0060] It solves the problems of poor adaptability, low prediction accuracy and high migration cost faced by existing flood runoff forecasting technologies. Detailed Implementation

[0061] A smart flood runoff forecasting method based on a large model includes:

[0062] Step 1: Fusion preprocessing and feature engineering of multi-source heterogeneous data.

[0063] This step unifies the representation of multimodal data such as meteorological, hydrological, and topographical data to provide high-quality input for the model.

[0064] Step 1.1: Collection and integration of multi-source data:

[0065] This invention integrates three types of multi-source heterogeneous data, including:

[0066] Meteorological data, including:

[0067] Rainfall: Spatial raster data and time series data, recording hourly average rainfall in the watershed (unit: mm).

[0068] Temperature: Time series data, recording the hourly average temperature of the basin (unit: degrees Celsius).

[0069] Hydrological data, including:

[0070] Station flow: Time series data, recording hourly runoff (unit: cubic meters / second) at major hydrological stations.

[0071] Watershed attribute data, including:

[0072] DEM (Digital Elevation Model): Spatial raster data that records the elevation values ​​(in meters) of each grid within a watershed.

[0073] Soil type: Category data, describing the distribution of soil types in different areas within the watershed.

[0074] Vegetation Index (NDVI): Categorical data that describes the vegetation cover of a watershed.

[0075] Table 1: Time series data of a certain watershed (two-dimensional representation with uniform dimensions)

[0076]

[0077] Statistical data in natural language description:

[0078] For data with relatively fixed or singular values, natural language descriptions are incorporated into the model:

[0079] Temperature statistics description:

[0080] "The average annual temperature in this basin is 15.6℃, with the average monthly temperature ranging from -2.3℃ to 28.7℃, and the average daily temperature difference being 8.4℃."

[0081] Soil type distribution description:

[0082] The soil in the basin is mainly brown soil (45.2%), mainly distributed in the central hills; paddy soil accounts for 28.7%, distributed in the river valley plains; and red soil accounts for 15.3%, distributed in the southern mountains.

[0083] Vegetation index statistics description:

[0084] "The watershed's average annual NDVI value is 0.68, indicating good vegetation cover. High vegetation cover (NDVI>0.6) accounts for 62.3%, while low vegetation cover (NDVI<0.3) accounts for only 8.7%."

[0085] Additional description of terrain features:

[0086] The average elevation of the basin is 325.6 meters, the highest point is 892.4 meters, the lowest point is 156.2 meters, the average slope is 12.7°, and the basin area is 256.8 square kilometers.

[0087] Step 1.2, Data Fusion Strategy:

[0088] Due to the inconsistency in the dimensions of the original data, the following fusion strategy is adopted:

[0089] Time dimension alignment:

[0090] Unify all time series data to the same time frequency (e.g., hourly), such as surface rainfall and station traffic data; ensure that all time series have the same start and end times and time intervals.

[0091] Spatial dimension compression:

[0092] For spatial data such as DEM data and raster rainfall data, this invention employs an average pooling strategy to process them into statistical values ​​consistent with the dimensions of time series slices. For example, the DEM data processing flow is as follows:

[0093] Watershed boundary extraction:

[0094] Extract the complete watershed boundary based on water system data; obtain the elevation values ​​of all DEM grid points within the watershed.

[0095] Spatial partitioning average pooling:

[0096] The watershed is divided into time series slices × K sub-regions.

[0097] For each sub-region, perform average pooling to calculate the average elevation value of that region.

[0098] The elevation statistics of K sub-regions are used as the input features of the DEM.

[0099] Feature fusion architecture:

[0100] It adopts a three-in-one integrated framework of "meteorology-hydrology-topography":

[0101] Meteorological layer: Time series of rainfall;

[0102] Hydrological layer: flow time series;

[0103] Topographic layer: Statistical characteristics such as DEM mean;

[0104] After the data from each layer are aligned over time, they are concatenated along the feature dimension to form a unified input matrix.

[0105] Feature engineering:

[0106] Spatial channels: Deep learning is used to automatically extract watershed morphological features. Methods include:

[0107] Low-level feature extraction layer: A one-dimensional convolutional network (1D-CNN) is used to process the local correlation patterns of various spatial features;

[0108] Feature aggregation layer: Aggregates multi-scale spatial features into a fixed-length vector representation through pooling operations;

[0109] Output: 128-dimensional spatial feature vector, comprehensively representing the morphological features of the watershed.

[0110] Time series channel: Captures the dynamics of hydrological processes through a multi-scale sliding window.

[0111] Statistical feature extraction: Calculate statistical indicators such as mean, variance, maximum value, minimum value, and trend slope for each window.

[0112] Frequency domain feature extraction: Periodic and frequency features are extracted using Fast Fourier Transform (FFT).

[0113] Time Channel: A periodic feature encoder was designed to construct seasonal time features; including:

[0114] Daily cycle characteristics:

[0115] Based on the 24-hour daily cycle, the following features are extracted:

[0116] Sine / cosine periodic encoding: The hour position is encoded as a continuous sine and cosine value, preserving periodic information.

[0117] Day and night division: A binary identifier that distinguishes between day and night.

[0118] Time period classification: The day is divided into five typical time periods: early morning, morning, afternoon, evening, and night.

[0119] Weekly cycle characteristics:

[0120] Based on the 7-day weekly cycle, the following features are extracted:

[0121] Weekday cycle encoding: Encodes the day of the week as consecutive sine and cosine values.

[0122] Weekday / Weekend Indicator: A binary feature that distinguishes between weekdays and weekends.

[0123] Monthly / yearly cycle characteristics:

[0124] Based on longer-term seasonal variation patterns, the following features are extracted:

[0125] Monthly cycle encoding: Encodes the month position as a continuous sine and cosine value.

[0126] Seasonal division: Spring, Summer, Autumn and Winter are classified and identified.

[0127] Step 1.3, Standardization and Data Fusion:

[0128] StandardScaler is used for standardization, which calculates the mean μ and standard deviation σ based on the training set and applies it to all datasets to eliminate the influence of units and maintain the shape of the data distribution.

[0129] Full connectivity is used to merge data from different data sources.

[0130] Step 2: Construct a runoff forecasting architecture based on a large language model. The core is to design a time-series input reprogramming mechanism to "translate" numerical hydrological time-series data into semantic representations that the large language model can understand, and to construct structured prompt templates to inject domain knowledge.

[0131] The backbone network uses the LLaMA model, and its powerful pattern recognition capabilities are preserved through a parameter freezing strategy. The specific implementation mechanism is as follows:

[0132] Load the pre-trained model: Load the configuration and weights of the LLaMA-7B model from HuggingFace.

[0133] Setting `requires_grad = False` disables gradient computation in all layers of the model, including embedding layers, Transformer layers, and output layers.

[0134] During training, it is used only as a forward inference engine and no weights are updated.

[0135] # Actual implementation in the code:

[0136] self.llm_model = LlamaModel.from_pretrained(...)

[0137] for param in self.llm_model.parameters():

[0138] param.requires_grad = False # Core freeze statement

[0139] A text prototype alignment mechanism is designed in the cross-modal conversion layer to convert data with different morphological features into text encodings for fusion. The specific implementation mechanism is as follows:

[0140] First, the 30,522 tokens of LLaMA (the model's initial vocabulary) are mapped from 30,522 dimensions to 1,000 dimensions using a fully connected layer. The mapping layer parameters W are updated during training, automatically learning which linear combinations of the original tokens best represent the hydrological time-series features. This is more flexible than a fixed terminology database and can adapt to different datasets.

[0141] # Actual implementation in the code

[0142] self.word_embeddings=self.llm_model.get_input_embeddings().weight #(30522, 768)

[0143] self.vocab_size = self.word_embeddings.shape[0] #30522

[0144] self.num_tokens = 1000

[0145] self.mapping_layer=nn.Linear(self.vocab_size, self.num_tokens) # Core mapping layer

[0146] # Forward propagation process

[0147] source_embeddings=self.mapping_layer(self.word_embeddings.permute(1,0)).permute(1, 0)

[0148] # Input: word_embeddings (30522, 768)

[0149] # Linear(30522, 1000): Compresses 30522 dimensions to 1000 dimensions.

[0150] # Output: (1000, 768)

[0151] Secondly, a cross-modal feature reorganization layer is used to reorganize numerical hydrological time-series features into semantic language representations through an attention mechanism, achieving a smooth mapping from time-series space to language space.

[0152] Traditional time series models process continuous numerical data, while large language models (LLMs) process discrete language tokens. These two have fundamental modal differences. Directly inputting numerical data into an LLM will cause the model to fail to understand its semantic meaning, and simple linear mapping cannot capture the complex relationship between time series data and linguistic concepts. Based on a dynamic feature reorganization mechanism using multi-head cross-attention, a learnable text prototype is used as a bridge to "translate" time series features into semantic representations that the LLM can understand. The specific implementation is as follows:

[0153] First step, initialize the QKV projection layer:

[0154] 1. Query Projection Layer: Time-series features → Query vector

[0155] Input: Temporal embedding (B, L, 128) → Output: Query Q (B, L, H×d_k)

[0156] 2. Key Projection Layer: Text Prototype → Key Vector

[0157] Input: Text prototype (1000, 768) → Output: Key K (1000, H×d_k)

[0158] 3. Value Projection Layer: Text Prototype → Value Vector

[0159] Input: Text prototype (1000, 768) → Output: Value V (1000, H×d_k)

[0160] Step 2: Mapping using a multi-head cross-attention mechanism:

[0161] Core calculation steps:

[0162] 1. Attention score calculation: scores = Q·K^T / sqrt(d_k):

[0163] - Dimensions: (B, H, L, 1000);

[0164] - Meaning: Calculate the similarity between each time segment and 1000 text prototypes;

[0165] 2. Attention weight normalization: A = softmax(scores);

[0166] - Normalize the last dimension (text prototype dimension);

[0167] - Each time segment receives 1000 weight values, with a total weight of 1;

[0168] 3. Weighted fusion: reprogrammed = A·V;

[0169] - Dimensions: (B, H, L, d_k);

[0170] - Essence: Representing temporal segments using a linear combination of 1000 text prototypes.

[0171] Step 3: Output the reconstruction results:

[0172] Processing steps:

[0173] 1. Multi-head concatenation: Concatenate the outputs of H attention heads → (B, L, H×d_k);

[0174] 2. Dimensional projection: Mapped to LLM dimensions through a linear layer → (B, L, 768);

[0175] 3. Output Alignment: Ensure that the output dimension perfectly matches the LLaMA word embedding space;

[0176] Build a structured prompt template system:

[0177] This system designs multi-level prompt templates to structurally inject hydrological knowledge and task objectives into a large model, guiding it to generate prediction results that are more in line with physical laws.

[0178] 1. Basic Information Layer: Watershed characteristics and statistical description, including:

[0179] Topographic features such as basin name, area, average elevation, and slope.

[0180] Soil type distribution (e.g., brown soil 45.2%, paddy soil 28.7%).

[0181] Vegetation cover (e.g., annual average NDVI value of 0.68).

[0182] Historical temperature statistics (e.g., annual average temperature of 15.6℃).

[0183] Implementation method:

[0184] Describing it in natural language, such as: "This watershed is a mountainous watershed with an average elevation of 325.6 meters. The soil is mainly brown soil with good vegetation cover and an average annual temperature of 15.6℃."

[0185] 2. Task Guidance Layer: Clearly define the prediction objectives, including:

[0186] Forecast task type (e.g., "72-hour runoff forecast").

[0187] Input the sequence length (e.g., "based on data from the past 96 hours").

[0188] Output requirements (e.g., "output unit is cubic meters per second").

[0189] Example template:

[0190] "Based on the rainfall and runoff data of the past 96 hours, please predict the runoff volume at the watershed outlet section for the next 72 hours, in cubic meters per second."

[0191] 3. Dynamic Statistics Layer: Real-time data analysis, including:

[0192] Statistical characteristics of the input data (such as minimum, maximum, median, trend direction, and major lag terms).

[0193] Generation method:

[0194] The lagged terms are calculated using functions and dynamically generated by combining real-time statistical information such as min_values, max_values, and medians.

[0195] 4. Feedback and optimization mechanism, including:

[0196] The weights of key parameters in the prompt template are dynamically adjusted based on historical prediction errors.

[0197] Introduce learnable cue weights (such as self.fusion_weights) to optimize the importance of each feature cue during training.

[0198] Implementation method:

[0199] Use torch.nn.Parameter to define cue weights and learn the optimal combination through backpropagation.

[0200] Step 3, Model Training: A two-stage training and optimization strategy is adopted, including:

[0201] General pre-training stage: Training on large-scale, multi-basin heterogeneous datasets, updating only the cross-modal conversion layer and prediction head parameters, enabling the model to learn the universal laws of hydrological processes and obtain a strong foundation for cross-basin generalization.

[0202] Specialized fine-tuning phase: Supervised fine-tuning of the model is performed on historical data of a specific target watershed. Some backbone network layers can be selectively unfrozen to achieve accurate adaptation of the model to the characteristics of the watershed.

[0203] Two-stage training strategy

[0204] (1) General pre-training stage: learning basic laws across watersheds

[0205] Objective: To train the model on large-scale, multi-basin data so that it can grasp the general laws of hydrological processes.

[0206] Implementation mechanism:

[0207] Training was conducted using watershed data from different climate zones and landform types.

[0208] The parameters of the backbone network (such as LLaMA) are frozen, and only the cross-modal transformation layer and prediction head are trained.

[0209] A text prototype alignment mechanism is used to achieve temporal-to-semantic mapping.

[0210] (2) Specific fine-tuning stage: precise adaptation to the target watershed

[0211] Objective: To fine-tune the model in a specific watershed to improve its prediction accuracy in that watershed.

[0212] Implementation mechanism:

[0213] Supervised fine-tuning is performed using precise historical data from the target watershed.

[0214] It can unfreeze some backbone network layers to allow for more precise parameter adjustments.

[0215] (3) Dynamic path discarding mechanism

[0216] During forward propagation, some connection paths in the neural network are randomly discarded, forcing the model to learn redundant feature representations and preventing over-reliance on specific paths.

[0217] Implementation method:

[0218] Apply Dropout after the attention output of the cross-modal conversion layer.

[0219] Apply Dropout before the fully connected layer of the output projection layer.

[0220] The dropout ratio is dynamically adjusted based on the training phase (0.1-0.3 initially, decreasing to 0.05-0.1 later).

[0221] (4) Data smoothing preprocessing mechanism

[0222] To address common issues in hydrological time-series data such as sawtooth fluctuations and negative value anomalies, data smoothing is performed before training to improve data quality and model training stability.

[0223] Implementation method:

[0224] Slip-tooth data smoothing:

[0225] A sliding window mean filter is used (window size 6-24 hours).

[0226] Use the Savitzky-Golay filter to preserve trend characteristics.

[0227] cubic spline interpolation was used to repair the mutation points.

[0228] (5) Adaptive learning rate scheduling mechanism

[0229] Working principle: The learning rate is dynamically adjusted according to the training process to balance convergence speed and accuracy.

[0230] Implementation method:

[0231] Using the OneCycleLR strategy, the temperature is first increased and then decreased to break through the local optimum.

[0232] Step 4: Implement flood runoff forecasting using the trained model.

Claims

1. A smart flood runoff forecasting method based on a large model, characterized in that: The method includes: Step 1: Fusion, preprocessing, and feature engineering of multi-source heterogeneous data; unifying the representation of meteorological, hydrological, and topographic modal data to provide input for the model; Step 2: Construct a runoff forecasting architecture based on a large language model; "translate" numerical hydrological time series data into semantic representations that the large language model can understand, and construct structured prompt templates to inject domain knowledge; Step 3: Train the model using a two-stage training and optimization strategy; Step 4: Implement flood runoff forecasting using the trained model.

2. The intelligent flood runoff forecasting method based on a large model according to claim 1, characterized in that: Multi-source heterogeneous data includes: Meteorological data: including rainfall, spatial raster data, recording hourly average rainfall in the basin; and temperature, time series data, recording hourly average temperature in the basin. Hydrological data includes station flow data and time series data, recording hourly runoff at major hydrological stations; Watershed attribute data includes: DEM, spatial raster data, recording the elevation values ​​of each grid within the watershed; soil type, category data, describing the distribution of soil types in different areas within the watershed; vegetation index, category data, describing the vegetation cover status of the watershed. Data fusion strategies include: Time dimension alignment: unify all time series data to the same time frequency, ensuring that all time series have the same start and end times and time intervals; Spatial dimension compression: For spatial data of DEM data and raster rainfall data, an average pooling strategy is used to process them into statistical values ​​that are consistent with the dimensions of time series slices; Feature fusion architecture: It adopts a three-in-one fusion framework of "meteorology-hydrology-topography". After the data of each layer are aligned by time, they are spliced ​​together in the feature dimension to form a unified input matrix.

3. The intelligent flood runoff forecasting method based on a large model according to claim 1, characterized in that: The feature engineering includes: Spatial channels utilize deep learning to automatically extract watershed morphological features; the automatic extraction of watershed morphological features using deep learning includes: The bottom feature extraction layer uses a one-dimensional convolutional network (1D-CNN) to process the local correlation patterns of each spatial feature; The feature aggregation layer aggregates multi-scale spatial features into fixed-length vector representations through pooling operations; Output a 128-dimensional spatial feature vector to comprehensively represent the geomorphological features of the watershed; Time series channel: Capturing the dynamics of hydrological processes through multi-scale sliding windows: Statistical feature extraction calculates the mean, variance, maximum, minimum, and trend slope statistical indicators for each window; Frequency domain feature extraction uses Fast Fourier Transform (FFT) to extract periodic and frequency features; A periodic feature encoder is designed for the time channel to construct seasonal time features.

4. The intelligent flood runoff forecasting method based on a large model according to claim 1, characterized in that: Data fusion includes: standardization using StandardScaler, calculating the mean μ and standard deviation σ based on the training set and applying them to all datasets to eliminate the influence of units and maintain the shape of the data distribution; and fusion of data from different data sources using fully connected methods.

5. The intelligent flood runoff forecasting method based on a large model according to claim 1, characterized in that: Constructing a runoff forecasting architecture based on a large language model includes: The backbone network uses the LLaMA model, and the pattern recognition capability is preserved through a parameter freezing strategy. A text prototype alignment mechanism is designed in the cross-modal conversion layer to convert different morphological feature data into text encoding for fusion. By designing multi-level prompt templates, hydrological knowledge and task objectives are structurally injected into the model, guiding the generation of prediction results that conform to physical laws.

6. The intelligent flood runoff forecasting method based on a large model according to claim 5, characterized in that: The backbone network uses the LLaMA model, and the method for preserving pattern recognition capability through parameter freezing strategy includes: Load the pre-trained model, loading the configuration and weights of the LLaMA-7B model from HuggingFace; Setting `requires_grad = False` disables gradient computation in all layers of the model. It is used only as a forward inference engine during training and does not update any weights.

7. The intelligent flood runoff forecasting method based on a large model according to claim 5, characterized in that: A text prototype alignment mechanism is designed in the cross-modal conversion layer to convert different morphological feature data into text encoding for fusion, including: First, the 30,522 tokens of LLaMA are mapped from a 30,522-dimensional one-hot representation to a 1,000-dimensional representation through a fully connected layer. The mapping layer parameters W are updated during training, and the linear combination of the original tokens is automatically learned to best express the hydrological time series features. Secondly, a cross-modal feature reorganization layer is used to reorganize numerical hydrological time-series features into semantic language representations through an attention mechanism, achieving a smooth mapping from time-series space to language space.

8. The intelligent flood runoff forecasting method based on a large model according to claim 5, characterized in that: The design of multi-level prompt templates includes: Basic information layer: Watershed characteristics and statistical description, including watershed name, area, average elevation and slope topographic features, soil type distribution, vegetation cover and historical temperature statistics; described in natural language. Task guidance layer: Defines the prediction objectives, including the prediction task type, input sequence length, and output requirements; Dynamic statistics layer: Real-time data analysis, including the statistical characteristics of input data, calculating lag terms through functions, and dynamically generating data by combining real-time statistical information; Feedback optimization mechanism: The weights of parameters in the prompt template are dynamically adjusted based on historical prediction errors; learnable prompt weights are introduced to optimize the importance of each feature prompt during training; prompt weights are defined using torch.nn.Parameter, and the optimal combination is learned through backpropagation.

9. The intelligent flood runoff forecasting method based on a large model according to claim 1, characterized in that: The two-stage training and optimization strategy for model training includes: General pre-training stage: Training is performed using watershed data from different climate zones and different landform types; backbone network parameters are frozen and only the cross-modal conversion layer and prediction head are trained; a text prototype alignment mechanism is used to achieve temporal-to-semantic mapping; Specialized fine-tuning phase: Supervised fine-tuning using accurate historical data from the target watershed; Unfreezing parts of the backbone network layer for more refined parameter adjustments; Dynamic path dropping mechanism: Randomly discard some connection paths in the neural network during forward propagation, forcing the model to learn redundant feature representations and preventing over-reliance on specific paths; Data smoothing preprocessing mechanism: To address the common sawtooth fluctuations and negative value anomalies in hydrological time series data, data smoothing is performed before training to improve data quality and model training stability. Adaptive learning rate scheduling mechanism: The learning rate is dynamically adjusted according to the training process to balance convergence speed and accuracy. The OneCycleLR strategy is used to first increase the temperature and then decrease it to break through local optima.