A river underwater section shape reconstruction method and related device

By combining the Temporal Fusion Transformer model with static covariate data, the problems of low efficiency and poor accuracy in measuring the underwater cross-section morphology of rivers in traditional methods are solved. This enables high-precision reconstruction and interpretability analysis of the underwater cross-section morphology of rivers, making it suitable for refined simulation in the field of water conservancy.

CN122134925APending Publication Date: 2026-06-02INST OF EARTH ENVIRONMENT CHINESE ACAD OF SCI +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF EARTH ENVIRONMENT CHINESE ACAD OF SCI
Filing Date
2026-02-11
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Traditional methods for obtaining the underwater cross-sectional morphology of rivers are inefficient and have large errors. They are difficult to accurately measure and reconstruct in areas with scarce data, and lack quantitative coupling analysis of driving factors, resulting in poor prediction performance.

Method used

The Temporal Fusion Transformer model was used to preprocess spatial sequence data and static covariate data. Cubic spline interpolation, data augmentation and standardization were used, and the model was trained by combining transfer learning algorithm and pseudo-labels of remote sensing measurement data to achieve high-precision reconstruction of the underwater cross-sectional morphology of the river.

Benefits of technology

It achieves high-precision reconstruction of river cross-section morphology, enhances the model's generalization ability across rivers and time periods, provides interpretability of reconstruction results, and is suitable for refined simulation in fields such as water resource management, shipping safety, and ecological environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134925A_ABST
    Figure CN122134925A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of hydrogeomorphological modeling technology and discloses a method and related apparatus for reconstructing the underwater cross-sectional morphology of a river. The method includes: acquiring spatial sequence data and static covariate data of a target river; preprocessing the spatial sequence data and static covariate data of the target river to obtain preprocessed spatial sequence data and static covariate data; based on the preprocessed spatial sequence data and static covariate data of the target river, and combined with an underwater cross-sectional morphology reconstruction model, reconstructing the underwater cross-sectional morphology of the target river's area to be reconstructed, and obtaining the underwater cross-sectional morphology reconstruction result of the target river; wherein, the underwater cross-sectional morphology reconstruction model is a pre-trained Temporal Fusion Transformer model; this invention can achieve high-precision reconstruction of river cross-sectional morphology and can provide interpretability analysis of the reconstruction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hydrogeomorphological modeling technology, and specifically relates to a method and related apparatus for reconstructing the underwater cross-sectional morphology of rivers. Background Technology

[0002] The underwater cross-sectional morphology of a river refers to the geometric shape and spatial combination characteristics of the riverbed and bank slopes below the lowest water level in a cross section taken perpendicular to the main flow direction of the river. It comprehensively reflects the stability of the river channel, hydraulic conditions, and aquatic ecological habitat characteristics, and has a crucial impact on multiple fields such as water resource management, navigation safety, and the ecological environment. Therefore, accurately understanding the underwater cross-sectional morphology helps to rationally plan water resource utilization, ensure the safety of ship navigation, and maintain the stability of the ecosystem.

[0003] Currently, traditional methods for obtaining underwater river cross-sectional morphology mainly rely on contact measurements such as direct manual measurement or depth sounder measurements, as well as cross-sectional geometric generalization. These methods often require significant investment of manpower, resources, and time, resulting in low measurement efficiency and large errors. Specifically, due to limitations in the number of measurements and observation frequency, traditional methods typically only acquire a small amount of cross-sectional morphology data for a specific time period. This is especially problematic in areas inaccessible to humans, such as high-altitude or canyon regions, leading to low measurement efficiency and significant errors in the results. For example, the Qinghai-Tibet Plateau is a typical data-scarce region, with a hydrological station density of only 1 station per 13,505 km². 2 Secondly, the simplification of ideal geometric cross-sections such as rectangles and trapezoids commonly used in actual engineering calculations significantly weakens the asymmetry, multi-branch morphology, and detailed structure of natural river channel cross-sections, easily introducing systematic biases in hydraulic and sediment simulations. Furthermore, traditional methods often treat cross-sectional morphology as a given boundary condition, lacking quantitative coupling analysis with driving factors such as runoff, sediment load, geology, soil, vegetation, and human activities. This results in a lack of interpretability for reconstructing underwater cross-sectional morphology in different spatial regions but with similar surface topography, leading to poor prediction results and difficulty in revealing the mechanism of underwater cross-sectional morphological evolution and conducting precise future predictions. Summary of the Invention

[0004] To address the technical problems existing in the prior art, this invention provides a method and related apparatus for reconstructing the underwater cross-sectional morphology of rivers, thereby solving the technical problems of low measurement efficiency and large result errors in traditional methods for obtaining the underwater cross-sectional morphology of rivers.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a method for reconstructing the underwater cross-sectional morphology of a river, comprising: Acquire spatial sequence data and static covariate data of the target river; Preprocessing is performed on the spatial sequence data and static covariate data of the target river to obtain preprocessed spatial sequence data and static covariate data of the target river; Based on the preprocessed spatial sequence data and static covariate data of the target river, and combined with the underwater cross-sectional morphology reconstruction model, the underwater cross-sectional morphology of the target river to be reconstructed is reconstructed to obtain the underwater cross-sectional morphology reconstruction results of the target river; wherein, the underwater cross-sectional morphology reconstruction model is a pre-trained Temporal FusionTransformer model.

[0006] Furthermore, the spatial sequence data of the target river includes high-order sequence data above the lowest water level and high-order sequence data below the lowest water level; the static covariate data of the target river includes meteorological data, hydrological data, vegetation cover information, soil information, and human activity information.

[0007] Furthermore, the spatial sequence data and static covariate data of the target river are preprocessed to obtain the preprocessed spatial sequence data and static covariate data of the target river, as follows: The spatial sequence data of the target river is resampled using the cubic spline interpolation method to obtain the resampled spatial sequence data of the target river. Data augmentation and standardization are performed on the resampled spatial sequence data of the target river to obtain preprocessed spatial sequence data of the target river. The static covariate data of the target river are standardized to obtain preprocessed static covariate data of the target river.

[0008] Furthermore, the construction process of the underwater cross-sectional morphology reconstruction model of the river is as follows: Acquire spatial sequence data and static covariate data of the sample rivers; The spatial sequence data and static covariate data of the sample rivers are preprocessed to obtain training samples; Using training samples and a predetermined training strategy, the Temporal Fusion Transformer model is trained to obtain a pre-trained Temporal Fusion Transformer model, which serves as a model for reconstructing the underwater cross-section morphology of rivers.

[0009] Furthermore, the spatial sequence data of the sample rivers includes both field measurement data and remote sensing measurement data; The field measurement data includes high-order sequence data above the lowest water level and high-order sequence data below the lowest water level of the sample river, obtained through predetermined field measurement techniques. Remote sensing data includes high-order sequence data above the lowest water level of the sample river and high-order sequence data below the lowest water level of the sample river, obtained through remote sensing technology.

[0010] Furthermore, the predetermined training strategy is a transfer learning algorithm; in this approach, pseudo-labeled data from remote sensing measurements are used for model fine-tuning training.

[0011] This invention also provides a system for reconstructing the underwater cross-sectional morphology of rivers, comprising: The data acquisition module is used to acquire spatial sequence data and static covariate data of the target river; The data preprocessing module is used to preprocess the spatial sequence data and static covariate data of the target river to obtain the preprocessed spatial sequence data and static covariate data of the target river. The morphological reconstruction module is used to reconstruct the underwater cross-sectional morphology of the target river based on the preprocessed spatial sequence data and static covariate data of the target river, and in conjunction with the underwater cross-sectional morphological reconstruction model of the river, to obtain the underwater cross-sectional morphological reconstruction results of the target river; wherein, the underwater cross-sectional morphological reconstruction model of the river is a pre-trained Temporal Fusion Transformer model.

[0012] The present invention also provides an electronic device, comprising: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the underwater cross-sectional morphology reconstruction method for rivers.

[0013] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for reconstructing the underwater cross-sectional morphology of a river.

[0014] The present invention also provides a computer program product, characterized in that the computer program product includes a computer program, which, when executed by a processor, implements the method for reconstructing the underwater cross-sectional morphology of a river.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The underwater cross-sectional morphology reconstruction method for rivers provided by this invention acquires and preprocesses spatial sequence data and static covariate data of the target river, and then uses a pre-trained Temporal Fusion Transformer model to reconstruct the cross-sectional morphology. This method achieves high-precision reconstruction of river cross-sectional morphology and enables interpretable analysis of the reconstruction results. It does not rely on high-confidence measured water depth data, can adapt to data-scarce river sections, and can fully characterize long-term riverbed evolution and extreme scouring and deposition events, resulting in high accuracy and efficiency. In particular, by introducing static covariate data as physical constraints, the accuracy of the cross-sectional morphology reconstruction results is greatly improved, enhancing the model's generalization ability across rivers and time periods, as well as the interpretability of the reconstruction results. This allows for more effective applications in water conservancy disciplines such as water resource management, navigation safety, and ecological environment. Furthermore, the attention mechanism of the pre-trained Temporal Fusion Transformer model has strong physical meaning, and the model can output static covariate weights, facilitating interpretable analysis. It can be widely applied in scientific research scenarios such as underwater topographic reconstruction of rivers, research on river geomorphological evolution mechanisms, and refined simulation of water and sediment processes.

[0016] Furthermore, in the process of constructing the underwater cross-sectional morphology reconstruction model of the river, the transfer learning algorithm is introduced as a pre-determined training strategy, which is conducive to the model learning the characteristics of different watersheds and enhances the model's generalization ability. Secondly, pseudo-label data from remote sensing measurement data is introduced for model fine-tuning training, which effectively makes up for the lack of data and improves the data quality, thereby improving the reconstruction accuracy.

[0017] The river underwater cross-sectional morphology reconstruction system, electronic device, computer-readable storage medium, and computer program product provided by this invention possess all the advantages of the aforementioned river underwater cross-sectional morphology reconstruction method. Attached Figure Description

[0018] Figure 1 A flowchart of the method for reconstructing the underwater cross-sectional morphology of a river provided by the present invention; Figure 2 A flowchart of the method for reconstructing the underwater cross-sectional morphology of a river provided in Example 1; Figure 3 This is a structural block diagram of the Temporal Fusion Transformer model in Example 1; Figure 4 This is a schematic diagram showing the measured and reconstructed underwater topography values ​​of different study areas in Example 1; Figure 5 This is a structural block diagram of the river underwater cross-sectional morphology reconstruction system provided in Example 2; Figure 6This is a structural block diagram of the electronic device provided in Example 3. Detailed Implementation

[0019] To make the technical problems solved by the present invention, the technical solutions, and the beneficial effects clearer, the following specific embodiments provide a further detailed description of the present invention. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of the invention.

[0020] As attached Figure 1 As shown, the present invention provides a method for reconstructing the underwater cross-sectional morphology of a river, comprising the following steps: Step 100: Obtain spatial sequence data and static covariate data of the target river.

[0021] Step 200: Preprocess the spatial sequence data and static covariate data of the target river to obtain the preprocessed spatial sequence data and static covariate data of the target river.

[0022] Step 300: Based on the preprocessed spatial sequence data and static covariate data of the target river, and combined with the underwater cross-sectional morphology reconstruction model, the underwater cross-sectional morphology of the target river to be reconstructed is reconstructed to obtain the underwater cross-sectional morphology reconstruction results of the target river; wherein, the underwater cross-sectional morphology reconstruction model is a pre-trained TemporalFusion Transformer model.

[0023] In the above embodiments, a pre-trained Temporal Fusion Transformer model is used as the underwater cross-sectional morphology reconstruction model for rivers. Leveraging the model's powerful data processing and learning capabilities, it can better integrate static covariate data, eliminating the need for excessive reliance on high-confidence measured water depth data. Even in data-scarce river sections, it can achieve relatively accurate reconstruction. Simultaneously, the model can more accurately capture the dynamic changes in underwater cross-sectional morphology. Furthermore, by introducing static covariate data as physical constraints, the model's generalization ability across rivers and time periods is enhanced, making the reconstruction results more interpretable and providing precise guidance for ecological protection and restoration work. It has extremely high application value and broad development prospects in the field of water conservancy science. This invention, through the underwater cross-sectional morphology reconstruction model for rivers, combined with various data processing and enhancement strategies, achieves high-precision reconstruction of river cross-sectional morphology and provides interpretability analysis of the reconstruction results. It can be widely applied in scientific research scenarios such as underwater topographic reconstruction of rivers, research on river geomorphological evolution mechanisms, and refined simulation of water and sediment processes.

[0024] The following specific embodiments further explain the method for reconstructing the underwater cross-sectional morphology of rivers provided by the present invention: Example 1 This embodiment 1 provides a method for reconstructing the underwater cross-sectional morphology of a river. It aims to achieve high-precision reconstruction of the underwater topography of the target river and static covariate correlation analysis by processing and analyzing spatial sequence data containing high-order sequence data above the lowest water level of the target river and high-order sequence data below the lowest water level of the target river, as well as static covariate data containing meteorological data, hydrological data, vegetation cover information, soil information and human activity information of the target river. This enhances the interpretability of the cross-sectional morphology reconstruction results and effectively leverages the advantages of deep learning technology in water conservancy and related fields.

[0025] As attached Figure 2 As shown, the method for reconstructing the underwater cross-sectional morphology of a river includes the following steps: Step 1: Obtain spatial sequence data and static covariate data for the sample rivers. The spatial sequence data for the sample rivers includes both field measurement data and remote sensing measurement data.

[0026] Specifically, the field measurement data includes high-order sequence data above the lowest water level and high-order sequence data below the lowest water level of the sample river, obtained through predetermined field measurement techniques; preferably, the predetermined field measurement techniques include acoustic Doppler current profiler (ADCP) and real-time dynamic differential positioning (RTK); the remote sensing measurement data includes high-order sequence data above the lowest water level and high-order sequence data below the lowest water level of the sample river, obtained through UAV or satellite remote sensing measurement techniques.

[0027] The static covariate data for the sample rivers include meteorological data, hydrological data, vegetation cover information, soil information, and human activity information.

[0028] Step 2: Preprocess the spatial sequence data and static covariate data of the sample rivers to obtain training samples.

[0029] The specific process is as follows: Step 21: Use cubic spline interpolation to resample the spatial sequence data of the sample river to unify the spatial sequence data of the sample river to a 1m interval, and obtain the resampled spatial sequence data of the sample river.

[0030] Step 22: Perform data augmentation on the spatial sequence data of the resampled sample rivers to expand the sample space, effectively compensate for the difficulty in obtaining cross-sectional morphological data of rivers in areas with insufficient data, improve the generalization ability of the model, and obtain augmented spatial sequence data of the sample rivers; among which, data augmentation includes operations such as flipping the data of the left and right banks of the river and randomly scaling the width.

[0031] Step 23: Fuse the enhanced spatial sequence data of the sample river with the static covariate data of the sample river, and introduce additional indicators of the sample river to obtain the initial training samples; the process of generating additional indicators of the sample river is as follows: calculate the first and second differences of the spatial sequence data of the resampled sample river to obtain additional indicators of the sample river; by introducing the first and second differences of the spatial sequence data of the resampled sample river, the trend of the spatial sequence data can be removed, and the influence of low-frequency information on the model can be eliminated.

[0032] Step 24: Divide the initial training samples into a training set, a validation set, and a test set in a ratio of 7:1.5:1.5; the training set, validation set, and test set are used to train, validate, and test the Temporal Fusion Transformer model.

[0033] Step 25: Perform z-score standardization on the training set, validation set, and test set respectively to eliminate the influence of units and obtain training samples; wherein, the training samples include the standardized training set, the standardized validation set, and the standardized test set.

[0034] Step 3: Using training samples and a predetermined training strategy, train the Temporal Fusion Transformer model to obtain a pre-trained Temporal Fusion Transformer model, which will serve as the underwater cross-sectional morphology reconstruction model for the river. Specifically, using standardized training, validation, and test sets, and following a predetermined training strategy, train, validate, and test the Temporal Fusion Transformer model to obtain the pre-trained model. The predetermined training strategy is a transfer learning algorithm, using pseudo-labeled data from remote sensing measurements for model fine-tuning.

[0035] It should be noted that the Temporal Fusion Transformer model architecture includes a gating mechanism, a variable selection network, a GRN-based static feature encoder, a sequence processing layer, and a quantile prediction layer, as shown in the attached diagram. Figure 3 As shown.

[0036] The system employs a gating mechanism, using a Gated Residual Network (GRN) as the basic unit, to provide adaptive depth for datasets of different sizes and noise levels. A variable selection network applies the network to the static covariates, known surface data, and underwater data separately, calculating the weights of each variable and summing them weighted. A GRN-based static feature encoder encodes the static covariates, with the weights of each variable output through a Softmax layer to represent their importance. The sequence processing layer includes a local modeling mechanism based on Long Short-Term Memory (LSTM) and an interpretable global dependency modeling mechanism based on the Temporal Fusion Transformer model. Specifically, the Temporal Fusion Transformer model improves the multi-head attention mechanism of the original Transformer model to enhance interpretability. Specifically, the independent value weights of each attention head in the original Transformer model are replaced with shared value weights for all attention heads, and the outputs of all attention heads are combined through a weighted average to facilitate the summarization of attention information and improve interpretability. The quantile prediction layer calculates the final quantile prediction interval through a linear layer.

[0037] Specifically, the process of training the Temporal Fusion Transformer model using training samples and a predetermined training strategy to obtain a pre-trained Temporal Fusion Transformer model is as follows: Step 31: Initialize the data path, model storage path, initial learning rate, number of training rounds, early stopping threshold, and other configurations from the disk, and generate and save random seeds to ensure the reproducibility of the experiment.

[0038] Step 32: Load the training set, validation set, and test set from the pre-specified storage path and convert them into a data loader format that meets the model input requirements.

[0039] Step 33: Create a TensorBoard logger to record various metrics such as the loss function during training; configure callback functions such as the model, early stopping callback function, and learning rate scheduler, and initialize the PyTorchLightning trainer, integrating logging and callback functions to provide a standardized environment for model training.

[0040] Step 34: If the configuration specifies loading from a checkpoint, then restore the model state from the existing model checkpoint; otherwise, build and initialize a new Temporal Fusion Transformer model based on the training set features.

[0041] Step 35: Execute the learning rate tuning algorithm to find the optimal learning rate within the specified maximum and minimum learning rate range; then output the suggested learning rate value, generate and save the learning rate analysis chart to the specified path, and update the model hyperparameters with the obtained optimal learning rate to optimize the subsequent training process.

[0042] Step 36: Based on the transfer learning algorithm, use the configured trainer to fit and train the model; wherein, the input training set loader provides training data, the validation set loader is used for periodic evaluation, and the test set loader is used for testing; after training is completed, save the model checkpoints to the specified path.

[0043] Step 37: Systematically search for the predetermined model hyperparameters, serialize the optimization results and save them to a specified path for subsequent analysis or recovery; the predetermined model hyperparameters include the dimension of the hidden layer, the number of hidden layers and the number of attention heads; output the optimal combination of hyperparameters to obtain the pre-trained Temporal FusionTransformer model.

[0044] It should be noted that the transfer learning algorithm in this embodiment 1 includes a direct mixing training strategy, a progressive data ratio training strategy, and a two-stage sequential training strategy. Specifically, in the direct mixing training strategy, the spatial sequence data of the sample river is obtained by directly mixing the field measurement data and remote sensing measurement data according to a preset fixed ratio, so that the model uses the same data in each training round. The direct mixing training strategy can effectively alleviate the feature shift problem that may be caused by phased training and can be used as a reference baseline for evaluating the impact of data mixing on the model's generalization ability under domain transfer conditions. In the progressive data proportion training strategy, in the initial training rounds, most of the spatial sequence data of the sample rivers are field measurement data. As the training rounds increase, the proportion of remote sensing measurement data increases linearly at a fixed rate. The progressive data proportion training strategy can mitigate the negative impact of low-confidence pseudo-label data in the early training stage, allowing the model to gradually adapt to the domain features of multi-source remote sensing measurement data, including UAV remote sensing measurement data or satellite remote sensing measurement data. In the two-stage sequential training strategy, the first training stage uses all field measurement data for model training to construct initial feature representations as pre-training. The second training stage loads the weights of the pre-trained model and uses pseudo-label data from multi-source remote sensing measurement data to fine-tune the pre-trained model, i.e., only updating the parameters of the decoder part.

[0045] It should also be noted that the process of generating pseudo-label data for remote sensing measurement data is as follows: Based on field measurement data of sample rivers from different regions or levels, multiple Temporal Fusion Transformer models are trained to obtain a dedicated TFT model for each region or level of river. A general TFT model is then trained based on field measurement data of sample rivers from all regions and all levels. Using both the dedicated and general TFT models for each region or level of river, underwater cross-sectional morphology in regions lacking field measurement data is reconstructed. The determination coefficient, quantile loss, and anomaly of the reconstructed results compared to remote sensing measurement data are calculated. Thresholds are set for the determination coefficient, quantile loss, and anomaly. If any two indicators of a reconstructed result meet the threshold conditions, they are weighted and averaged with the remote sensing measurement data to obtain pseudo-labeled data for the remote sensing strategy data. This pseudo-labeled data replaces the remote sensing measurement data and is added to the training samples for model training. This approach expands the training dataset using remote sensing measurement data while avoiding the problems of low accuracy and confidence levels associated with the remote sensing measurement data.

[0046] Step 4: Obtain spatial sequence data and static covariate data for the target river. The spatial sequence data includes high-order series data above the minimum water level and high-order series data below the minimum water level. The static covariate data includes meteorological data, hydrological data, vegetation cover information, soil information, and human activity information for the target river.

[0047] Step 5: Preprocess the spatial sequence data and static covariate data of the target river to obtain preprocessed spatial sequence data and static covariate data of the target river. The specific process is as follows: Step 51: Use cubic spline interpolation to resample the spatial sequence data of the target river to unify the spatial sequence data of the target river to a 1m interval, and obtain the resampled spatial sequence data of the target river.

[0048] Step 52: Perform data augmentation and z-score normalization on the resampled spatial sequence data of the target river to obtain preprocessed spatial sequence data of the target river; the data augmentation process includes flipping the data of the left and right banks of the river and randomly scaling the width.

[0049] Step 53: Standardize the static covariate data of the target river to obtain preprocessed static covariate data of the target river.

[0050] Step 54: Fuse the preprocessed spatial sequence data of the target river with the preprocessed static covariate data of the target river, and introduce additional indicators of the target river to obtain the prediction dataset; wherein, the generation process of the additional indicators of the target river is as follows: calculate the first-order difference and second-order difference of the resampled spatial sequence data of the target river to obtain the additional indicators of the target river.

[0051] Step 6: Based on the prediction dataset and combined with the underwater cross-sectional morphology reconstruction model of the river, the underwater cross-sectional morphology of the target river to be reconstructed is reconstructed to obtain the underwater cross-sectional morphology reconstruction result of the target river.

[0052] Specifically, the prediction dataset is loaded from disk and converted into a data loader format that meets the model's input requirements to facilitate subsequent reconstruction operations. A pre-trained TemporalFusion Transformer model, typically the best model selected based on validation loss, is loaded from a pre-specified storage path and set to evaluation mode to ensure that model parameters are not modified during reconstruction. Reconstruction operations are performed on the test dataset, during which the model returns the reconstruction target value, input features, index information, and decoder length, and outputs the reconstruction results in the original mode to preserve all reconstruction details. The reconstruction results are then processed and saved to a specified path.

[0053] Step 7: Perform post-processing operations on the reconstruction results. Post-processing operations may include, for example, plotting a graph based on the reconstruction results and confidence intervals.

[0054] Step 8: Perform model interpretation to obtain interpretation information. Specifically, perform model interpretation by using the multi-head attention and static covariate encoder mechanism of the pre-trained Temporal Fusion Transformer model to calculate and save interpretation information. This interpretation information includes the contributions of preprocessed spatial sequence data of the target river, static covariate data, and additional indicators of the target river to the reconstruction results, as well as the attention weights of the preprocessed spatial sequence data and additional indicators of the target river. Through this interpretation information, the importance distribution of the static variable data and the attention distribution of the spatial sequence data can be obtained, revealing the spatial sequence data dependencies. This provides auxiliary information for studies such as underwater topography fitting methods and riverbed formation analysis. Visual charts of the interpretation results are generated and saved to facilitate understanding the model's decision-making mechanism and subsequent analysis.

[0055] Example explanation: This example uses the Yellow River, Jinsha River, Nu River, Lancang River, and Yarlung Tsangpo River as sample rivers for model training and underwater cross-sectional morphology reconstruction; the specific process is as follows: S01. Organize the elevation observation data above the lowest water level, the elevation observation data below the lowest water level, and the static covariates of the sample river into Microsoft Excel or CSV format; the original sampling point spacing of the elevation observation data above the lowest water level and the elevation observation data below the lowest water level of the sample river can be unequal, and the maximum number of points for a single input is 1000.

[0056] S02. The cubic spline interpolation algorithm is used to resample the elevation observation data above and below the lowest water level of the sample river, with a uniform interval of 1 meter, to obtain the spatial sequence data of the sample river after resampling. Data augmentation processing is performed on the spatial sequence data of the resampled sample river to obtain the enhanced spatial sequence data of the sample river. The first and second differences of the spatial sequence data of the resampled sample river are calculated to obtain the additional indicators of the sample river. z-score standardization is performed on all elevation sequence data and static covariate data to obtain training samples.

[0057] In this example, data augmentation is performed on the spatial sequence data of the resampled sample river to introduce data augmentation techniques to improve the model's generalization ability. Specifically, the data augmentation includes flipping the spatial sequence data (i.e., left and right banks) and randomly scaling the width. The data for each hydrological station is scaled by factors of 0.8 and 1.2. Combining all operations, the final result is 6 times the original data, namely: no flip + 1.0x scaling, no flip + 0.8x scaling, no flip + 1.2x scaling, flip + 1.0x scaling, flip + 0.8x scaling, and flip + 1.2x scaling.

[0058] S03. Train the Temporal Fusion Transformer model using training samples to obtain a pre-trained Temporal Fusion Transformer model, which serves as a model for reconstructing the underwater cross-section morphology of the river. The Temporal Fusion Transformer model possesses multivariate modeling and interpretability features. During training, record indicator logs, save checkpoints, and enable an early stopping mechanism to ensure training stability. After training is completed, save the optimal model.

[0059] S04. Obtain spatial sequence data and static covariate data of the target river; preprocess the spatial sequence data and static covariate data of the target river to obtain preprocessed spatial sequence data and static covariate data of the target river; combine the underwater cross-sectional morphology reconstruction model of the river to be reconstructed to reconstruct the underwater cross-sectional morphology of the target river, output the relative elevation estimation results of each cross-sectional point, and generate the quantile interval estimation of the predicted values ​​of each point to obtain the underwater cross-sectional morphology reconstruction results of the target river.

[0060] S05. Save the reconstruction results in both data table and image formats; the visualization images are drawn using tools such as matplotlib and can be exported in PNG and PDF formats.

[0061] S06. Calculate the weight of each input feature, i.e., the importance score, through the variable selection network in the pre-trained Temporal Fusion Transformer model; and calculate the attention distribution of the sequence data through the attention mechanism in the pre-trained Temporal Fusion Transformer model, generate an interpretation result chart, visualize the attention weight, help understand the model's decision-making basis, analyze underwater terrain patterns, and further provide auxiliary information on the causes of underwater terrain shaping.

[0062] In this example, the spatial sequence data of the sample river includes high-confidence field contact measurement data and multi-source remote sensing measurement data. A pseudo-label mechanism is introduced to assist the model in learning in areas with low data confidence. The specific operation is as follows: Typical mountain river distribution areas were selected, such as the Qinghai-Tibet Plateau, the Loess Plateau, and the Hengduan Mountains. Three dedicated TFT models were constructed based on field measurement data: a Loess Plateau regional model, a Qinghai-Tibet Plateau regional model, and a Hengduan Mountains regional model. In addition, a general TFT model was constructed and trained using field measurement data, aiming to achieve broad cross-regional generalization capabilities. The three dedicated TFT models and the general TFT model were applied to cross-sections within their target areas that lacked contact measurement, obtaining reconstruction results of underwater cross-sectional morphology. Each reconstruction result was compared with non-contact UAV remote sensing data at the same location, and the following three evaluation indicators were calculated: coefficient of determination (COP). ), quantile loss ( ), anomaly ( Set the following pseudo-label filtering thresholds:

[0063] If any two indicators in the reconstruction result meet the above threshold conditions, it is determined to be a "credible pseudo-label". The pseudo-label and the remote sensing value are weighted and fused with a fixed weight (predicted value weight 0.4, remote sensing value weight 0.6) to generate pseudo-label data of remote sensing measurement data. If the reconstruction result does not meet the above two indicator conditions, it is considered to have insufficient confidence and is directly removed.

[0064] Table 1 shows the calculation results of the subjective weight, objective weight, and comprehensive weight of the model in the example.

[0065] Table 2. Measurement of underwater cross-sectional morphological characteristics of rivers

[0066] As shown in Table 1 above, Table 1 presents the calculation results of the subjective weight, objective weight, and comprehensive weight of the model in the example. Table 1 also presents a set of typical subjective and objective weights for each evaluation index used to assess the model's effectiveness. The evaluation indexes are added together according to their weights to determine the comprehensive score of the underwater cross-sectional morphology reconstruction result, providing a relatively comprehensive evaluation index.

[0067] As shown in Table 2 above, the reconstruction results of the example are given, where the comprehensive evaluation indexes are added together according to the weights shown in Table 1. It can be seen from Table 2 that the underwater cross-sectional morphology reconstruction of the model performs well.

[0068] As attached Figure 4 As stated, Appendix Figure 4 The diagram below shows the measured underwater topographic values ​​and reconstruction results of the study area in Example 1; among them, the attached diagram... Figure 4 Figure a shows the measured and reconstructed underwater topographic data of the Niuchuan Xinmiao hydrological station on the Yellow River in the Loess Plateau. Figure 4 b is a schematic diagram showing the measured and reconstructed underwater topographic values ​​of the Diannan Hydrological Station on the Lancang River in the Qinghai-Tibet Plateau. Figure 4 c is a schematic diagram showing the measured and reconstructed underwater topographic values ​​of the Xiangjiaba hydrological station on the Jinsha River in the Hengduan Mountains. Figure 4 d is a schematic diagram showing the measured and reconstructed underwater topographic values ​​of the Menghai hydrological station on the Lancang River in the Qinghai-Tibet Plateau; from the attached diagram... Figure 4 As can be seen from the example, the model reconstruction results are quite close to the measured data, indicating that the reconstruction method proposed in Example 1 has the advantages of high accuracy.

[0069] To verify the performance and effectiveness of the underwater cross-section morphology reconstruction model in this example, a pre-determined alternative model is introduced for comparison. The comparison results of the reconstruction feature metrics of different models are shown in Table 3 below. Specifically, the Temporal Fusion Transformer model used in S03 is replaced with the pre-determined alternative model, and comparative tests are conducted on the same training and test samples. The pre-determined alternative models include the Long Short-Term Memory (LSTM) network model, the combined model of convolutional neural network and LSTM network (CNN+LSTM), and the Transformer model. The parameter size of the pre-determined alternative models is consistent with that of the Temporal Fusion Transformer model in terms of parameter size and number of training iterations.

[0070] Table 3 Comparison of Reconstruction Feature Indicators for Different Models

[0071] As shown in Table 3 above, the experimental results of the comparative study of the optional replacement models are presented. It can be seen from Table 3 that, under the same training conditions, the prediction performance of each model shows significant differences. Specifically, the LSTM model has poor prediction performance, the CNN+LSTM model performs slightly better than the LSTM model, the Transformer model further improves, and the TFT model used in this embodiment 1 achieves higher prediction accuracy and lower error than the comparative models. This verifies that the method described in this embodiment 1 has significant technical effects and application advantages in the underwater cross-sectional shape prediction scenario.

[0072] Example 2 As attached Figure 5 As shown in the figure, this embodiment 2 provides a river underwater cross-sectional morphology reconstruction system, including a data acquisition module, a data preprocessing module and a morphology reconstruction module.

[0073] The data acquisition module is used to acquire spatial sequence data and static covariate data of the target river; the data preprocessing module is used to preprocess the spatial sequence data and static covariate data of the target river to obtain preprocessed spatial sequence data and static covariate data of the target river; the morphological reconstruction module is used to reconstruct the underwater morphological structure of the target river based on the preprocessed spatial sequence data and static covariate data of the target river, and in conjunction with the underwater cross-sectional morphological reconstruction model of the river, to obtain the underwater cross-sectional morphological reconstruction result of the target river; wherein, the underwater cross-sectional morphological reconstruction model of the river is a pre-trained Temporal Fusion Transformer model.

[0074] Example 3 As attached Figure 6 As shown, this embodiment 3 provides an electronic device, including: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the river underwater cross-sectional morphology reconstruction method; or, the processor for executing the computer program to implement the functions of each module in the above-mentioned river underwater cross-sectional morphology reconstruction system.

[0075] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a preset function, the instruction segments describing the execution process of the computer program in the electronic device.

[0076] The electronic device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above are examples of electronic devices and do not constitute a limitation on the electronic device. It may include more components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0077] The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, or any conventional processor, etc. The processor is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and lines.

[0078] The memory can be used to store the computer program and / or module. The processor implements various functions of the electronic device by running or executing the computer program and / or module stored in the memory and by calling the data stored in the memory.

[0079] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.). The data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards, secure digital cards, flash memory cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0080] Example 4 This embodiment 4 also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for reconstructing the underwater cross-sectional morphology of a river.

[0081] If the modules / units integrated in the river underwater cross-section morphology reconstruction system are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0082] Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned method for reconstructing the underwater cross-section morphology of rivers, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-mentioned method for reconstructing the underwater cross-section morphology of rivers. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or a preset intermediate form, etc.

[0083] The computer-readable storage medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0084] Example 5 This embodiment 5 provides a computer product, which includes a computer program stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium and executes the computer program, so that the electronic device can execute the river underwater cross-sectional morphology reconstruction method described in embodiment 1, which will not be described again here.

[0085] It should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods.

[0086] The river underwater cross-sectional morphology reconstruction method of this invention compensates for the lack of data and improves data quality by preprocessing and enhancing the spatial sequence data and static covariate data of the acquired target river, and by introducing a pseudo-label mechanism during model training. Secondly, the use of transfer learning algorithm for model training is beneficial for the model to learn the characteristics of different watersheds and enhance its generalization ability. The pre-trained Temporal Fusion Transformer model is used as the river underwater cross-sectional morphology reconstruction model. The attention mechanism of the Temporal Fusion Transformer model has strong physical meaning, which allows the model to output static covariate weights, facilitating the interpretability analysis of the reconstruction results.

[0087] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment, but also includes any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention.

Claims

1. A method for reconstructing the underwater cross-sectional morphology of a river, characterized in that, include: Acquire spatial sequence data and static covariate data of the target river; Preprocessing is performed on the spatial sequence data and static covariate data of the target river to obtain preprocessed spatial sequence data and static covariate data of the target river; Based on the preprocessed spatial sequence data and static covariate data of the target river, and combined with the underwater cross-sectional morphology reconstruction model, the underwater cross-sectional morphology of the target river to be reconstructed is reconstructed to obtain the underwater cross-sectional morphology reconstruction results of the target river; wherein, the underwater cross-sectional morphology reconstruction model is a pre-trained Temporal FusionTransformer model.

2. The method for reconstructing the underwater cross-sectional morphology of a river according to claim 1, characterized in that, The spatial sequence data of the target river includes high-order sequence data above the lowest water level and high-order sequence data below the lowest water level; the static covariate data of the target river includes meteorological data, hydrological data, vegetation cover information, soil information and human activity information.

3. The method for reconstructing the underwater cross-sectional morphology of a river according to claim 2, characterized in that, The process of preprocessing the spatial sequence data and static covariate data of the target river to obtain the preprocessed spatial sequence data and static covariate data of the target river is as follows: The spatial sequence data of the target river is resampled using the cubic spline interpolation method to obtain the resampled spatial sequence data of the target river. Data augmentation and standardization are performed on the resampled spatial sequence data of the target river to obtain preprocessed spatial sequence data of the target river. The static covariate data of the target river are standardized to obtain preprocessed static covariate data of the target river.

4. The method for reconstructing the underwater cross-sectional morphology of a river according to claim 1, characterized in that, The construction process of the underwater cross-sectional morphology reconstruction model of the river is as follows: Acquire spatial sequence data and static covariate data of the sample rivers; The spatial sequence data and static covariate data of the sample rivers are preprocessed to obtain training samples; Using training samples and a predetermined training strategy, the Temporal Fusion Transformer model is trained to obtain a pre-trained Temporal Fusion Transformer model, which serves as a model for reconstructing the underwater cross-section morphology of rivers.

5. The method for reconstructing the underwater cross-sectional morphology of a river according to claim 4, characterized in that, The spatial sequence data of the sample rivers includes field measurement data and remote sensing measurement data; The field measurement data includes high-order sequence data above the lowest water level and high-order sequence data below the lowest water level of the sample river, obtained through predetermined field measurement techniques. Remote sensing data includes high-order sequence data above the lowest water level of the sample river and high-order sequence data below the lowest water level of the sample river, obtained through remote sensing technology.

6. The method for reconstructing the underwater cross-sectional morphology of a river according to claim 4, characterized in that, The predetermined training strategy is a transfer learning algorithm; in this strategy, pseudo-label data from remote sensing measurements are used for model fine-tuning training.

7. A system for reconstructing the underwater cross-sectional morphology of a river, characterized in that, include: The data acquisition module is used to acquire spatial sequence data and static covariate data of the target river; The data preprocessing module is used to preprocess the spatial sequence data and static covariate data of the target river to obtain the preprocessed spatial sequence data and static covariate data of the target river. The morphological reconstruction module is used to reconstruct the underwater cross-sectional morphology of the target river based on the preprocessed spatial sequence data and static covariate data of the target river, and in conjunction with the underwater cross-sectional morphological reconstruction model of the river, to obtain the underwater cross-sectional morphological reconstruction results of the target river; wherein, the underwater cross-sectional morphological reconstruction model of the river is a pre-trained Temporal Fusion Transformer model.

8. An electronic device, characterized in that, include: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the method for reconstructing the underwater cross-sectional morphology of a river as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for reconstructing the underwater cross-sectional morphology of a river as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method for reconstructing the underwater cross-sectional morphology of a river as described in any one of claims 1-6.