River sediment simulation method based on real river network path and feature screening
By using a method based on real river network paths and feature selection, the upstream station sequence is recovered and physically constrained aggregation is performed. Combined with multi-level feature selection and stacked ensemble model, the problems of upstream spatial heterogeneity and model overfitting in existing river sediment simulation are solved, thereby improving the accuracy and generalization ability of sediment simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEAST INST OF GEOGRAPHY & AGRIECOLOGY C A S
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-14
AI Technical Summary
Existing methods for simulating river sediment ignore the real river network topology, resulting in the flattening of upstream spatial heterogeneity and making it difficult to reflect sediment transport paths and distance attenuation. The strong coupling between meteorological and hydrological characteristics leads to model overfitting and limited fitting ability.
A river sediment simulation method based on real river network paths and feature selection recovers the upstream station sequence through depth-first traversal and breadth-first traversal, combines physical constraint aggregation features and multi-level feature selection, and uses a stacked ensemble model for sediment simulation.
It restores upstream spatial heterogeneity, enhances the fitting ability for high sediment load events and peak processes, reduces noise and overfitting risks, and quantifies the contribution of barrier factors to sediment reduction at the outlet.
Smart Images

Figure CN122389677A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of river sediment simulation technology, and in particular to a river sediment simulation method based on the selection of real river network paths and features. Background Technology
[0002] In the field of river sediment simulation, methods can be broadly categorized into three types: empirical statistical methods, mathematical modeling of water and sediment, and machine learning or deep learning methods. The first two types often have shortcomings in terms of data requirements, parameter calibration, process adaptability, or spatial representation. While the third type possesses strong fitting capabilities and can automatically uncover the complex relationships between input variables and output sediment, existing machine learning or deep learning-based sediment simulation methods generally suffer from the following limitations: Firstly, simplifying upstream information into local inputs or basin-average attributes ignores the unit-by-unit upstream propagation relationships under the real river network topology, resulting in the flattening of upstream spatial heterogeneity.
[0003] Secondly, upstream processes are often simplified to ordinary mean, summation or static aggregation, which makes it difficult to reflect the actual propagation path and distance attenuation of sediment as it is transported along the river channel.
[0004] Thirdly, the meteorological, hydrological, and underlying surface features are numerous and highly coupled, making direct modeling prone to introducing noise, leading to overfitting and poor generalization ability.
[0005] Fourthly, river sediment data typically exhibit a clear right-skewed and long-tailed distribution, and traditional regression methods have limited ability to fit high-sediment-content events and peak processes. Summary of the Invention
[0006] The present invention aims to overcome the shortcomings of the prior art and provide a river sediment simulation method based on the screening of real river network paths and features to solve the existing technical problems.
[0007] To achieve the above objectives, the technical solution created by this invention is implemented as follows: A method for simulating river sediment based on real river network paths and feature selection includes the following steps: S1: Obtain multi-source data from the target site and preprocess it to construct a sample dataset with site and date as the basic unit; S2: Based on the river network routing relationship, perform real river network path tracing to obtain the set of all upstream stations corresponding to the target station and the real path distance from each upstream station to the target station, and sort them by distance to form an upstream station sequence; S3: Along the upstream station sequence, the environmental and hydrological information of each upstream station is physically constrained and aggregated to generate high-dimensional aggregated features; among them, the physical constraint aggregation includes: constructing source erosion capacity, river sediment transport capacity, path cumulative penetration coefficient combined with reservoir barrier, and dynamic transport efficiency; S4: Concatenate the high-dimensional aggregated features with the site local features and spatiotemporal coding features to form the input feature set; S5: Perform multi-level feature filtering on the input feature set; wherein, multi-level feature filtering includes at least pre-screening, relevance ranking, rearrangement based on permutation importance, and dynamic feature quantity selection based on nested cross-validation to obtain a stable subset of key features; S6: Perform a logarithmic transformation on the target sediment variable, train a stacked ensemble model using a stable subset of key features, and then perform an anti-logarithmic transformation and non-negative truncation on the output of the stacked ensemble model to obtain the daily sediment simulation results.
[0008] Furthermore, step S2 specifically includes: First, a depth-first traversal algorithm is used to collect all upstream sites corresponding to the target site; Then, a breadth-first traversal algorithm is used to calculate the actual path distance from each upstream station to the target station; Finally, all upstream stations are sorted in order of distance from the actual path from farthest to closest, forming a sequence of upstream stations under the constraints of the actual river network path.
[0009] Furthermore, in step S3, constructing the source-end erosion capability specifically includes: Utilizing precipitation Constructing erosive precipitation proxy :
[0010] in, This indicates the indicator function, when precipitation... The value is 1 when the rainfall is greater than or equal to 12.7 mm, and 0 when the rainfall is less than 12.7 mm. Using Normalized Difference Vegetation Index Constructing vegetation cover factor :
[0011] Combined with soil erodibility factors and terrain factors Constructing slope sediment yield proxy : .
[0012] Furthermore, in step S3, constructing the river channel's sediment transport capacity specifically includes: Utilize traffic River slope Hehekuan Constructing river sediment transport agency : .
[0013] Furthermore, in step S3, constructing the cumulative path penetration coefficient combined with reservoir barriers specifically includes: Utilizing reservoir capacity and inbound flow Constructing the storage capacity-inflow ratio :
[0014] Construction interception efficiency :
[0015] And obtain the penetration rate : ; Along from upstream stations To the target site The cumulative penetration coefficient is calculated recursively along the downstream path. : ; in, Indicates from upstream station To the target site Each blocking station passed in sequence along the downstream path; Indicates from upstream station To the target site The set of all obstructing stations along the downstream path; This indicates that it will be from the upstream site To the target site The penetration rates of all blocking stations along the downstream path are multiplied together; Indicates from upstream station To the target site The downstream path of Penetration rate of each blocking site.
[0016] Furthermore, in step S3, constructing the dynamic transport efficiency specifically includes: Calculate the average path traffic from the upstream site to the target site. Construct the flow scaling factor : ; Based on the actual path distance d and the traffic scaling factor Constructing multi-scale sediment transport ratios: ; ; ; in, Indicates the short-range scale sediment transport ratio; Indicates the sediment transport ratio at a medium-range scale; It represents the sediment transport ratio over long distances.
[0017] Furthermore, in step S3, the high-dimensional aggregation features include potential sand supply features without considering obstacles and effective sand supply features considering obstacles; wherein, The potential sediment supply characteristics are calculated by adding the source-end erosion capacity and the river channel sediment transport capacity of each upstream station, and then multiplying by the dynamic transport efficiency to obtain the potential sediment supply contribution without considering obstruction, which is used as the potential sediment supply characteristics. The effective sediment supply characteristic is calculated by multiplying the potential sediment supply contribution by the cumulative penetration coefficient to obtain the effective sediment supply contribution considering the obstruction, which is used as the effective sediment supply characteristic.
[0018] Furthermore, in step S4, the local features of the site include the daily weather, flow rate, NDVI, soil, and topography of the target site; the spatiotemporal coding features include spatial periodic coding based on the latitude and longitude of the target site and time periodic coding based on the date.
[0019] Furthermore, in step S5, Pre-screening specifically includes: deleting constant features, features with a missing rate exceeding a threshold, duplicate features, and collinear features with a correlation higher than a set threshold; The relevance ranking specifically includes: ranking the pre-screened features using the maximum relevance and minimum redundancy method; Reordering based on permutation importance specifically includes: reordering features that have been ranked in terms of relevance using permutation importance methods; The dynamic feature quantity selection based on nested cross-validation specifically includes: In nested cross-validation, coarse search and local fine search are performed on the reordered features to determine the optimal number of features K under the current segmentation conditions; the frequency of feature selection under different segmentation conditions is counted, and features with a frequency higher than a preset threshold are identified as a stable key feature subset.
[0020] Furthermore, in step S6, the base learners of the stacked ensemble model include at least two of XGBoost, LightGBM, ExtraTrees, and CatBoost, and the meta-learners are either ridge regression cross-validation models or linear regression models.
[0021] A computer device, comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, causes the at least one processor to perform the above-described river sediment simulation method.
[0022] A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the aforementioned river sediment simulation method.
[0023] Compared with the prior art, the present invention can achieve the following beneficial effects: 1. This invention fully restores the entire upstream station sequence of the target station by reverse topology tracing and path distance sorting, avoiding the smoothing of upstream spatial heterogeneity by watershed averaging and preserving the differences in the response of different locations and distance units to outlet sediment.
[0024] 2. This invention integrates source erosion, channel transport, interception and retention, and dynamic transport efficiency into the feature construction by physically constraining upstream aggregation, making the input of the machine learning model closer to the real physical process of sediment formation-transportation-reduction, and reducing the physical distortion of pure black box learning.
[0025] 3. This invention employs a funnel-shaped screening process that includes pre-screening, correlation ranking, rearrangement based on permutation importance, and dynamic feature quantity selection based on nested cross-validation. This process identifies stable key factors that repeatedly appear under different segmentation conditions, effectively reducing the risk of overfitting caused by redundant and noisy features.
[0026] 4. This invention first performs a logarithmic transformation on the target variable to compress the scale, then uses multiple base learners for stacking and integration, and finally restores the scale through an inverse antilogarithmic transformation, thereby enhancing the fitting ability for high-sand-content events and peak processes under right-skewed, long-tailed distributions.
[0027] 5. This invention distinguishes between two different levels of issues, namely "how much sediment is generated upstream" and "how much sediment ultimately reaches the outlet," by identifying potential sediment supply characteristics and effective sediment supply characteristics, and quantifies the contribution of barrier factors to the reduction of sediment at the outlet.
[0028] 6. Using flow rate as the core hydrodynamic variable throughout the entire process of sample construction, transport capacity, and interaction feature construction helps to enhance the ability to identify high sediment load processes and peak events. Attached Figure Description
[0029] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram of the process for simulating river sediment based on real river network paths and feature selection, as described in the embodiments of the present invention; Figure 2 This is a schematic diagram illustrating the extraction of the station-river network unit-full upstream path as described in the embodiments of the present invention; Figure 3 A schematic diagram illustrating the physical constraint aggregation process described in the embodiments of the present invention; Figure 4 This is a schematic diagram of the multi-level feature filtering process described in the embodiments of the present invention; Figure 5 This invention provides a schematic diagram of the internal computing architecture and data flow of the stacked integration model described in an embodiment. Figure 6 A schematic diagram of the structure of the computer device described in the embodiment of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0031] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0032] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0033] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0034] This invention provides a river sediment simulation method based on real river network paths and feature selection. The overall technical approach of this method is centered on the target station. Instead of using only local station information or basin average features, it first reconstructs the station sequence of the entire upstream catchment area along the real river network path. Then, it organizes the environmental attributes, daily hydrological and meteorological conditions, early and late states, and path distances to the outlet of each upstream station in a unified manner. Subsequently, through physical constraints on upstream aggregation, the three processes of "source sediment production - flow transport - blockage / retention correction" are transformed into high-dimensional features that can be used for machine learning modeling. Afterward, through multi-level feature selection, stable key factors are identified, and a stacked integrated model is used to complete high-precision sediment simulation in the logarithmic domain.
[0035] The invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0036] like Figure 1 As shown in the figure, the present invention provides a method for simulating river sediment based on real river network paths and feature selection, including the following steps: S1: Obtain multi-source data from the target site and preprocess it to construct a sample dataset with site and date as the basic unit.
[0037] The purpose of this step is to prepare input data with a uniform format and spatiotemporal alignment for subsequent modeling.
[0038] The target site's multi-source data should include at least: River network, hydrogeomorphology, and river channel geometry data are used to determine the direction of water flow and the shape of the river channel. Reservoir regulation data, including reservoir location and capacity information, is crucial for calculating the barrier effect; Daily meteorological data, including at least daily precipitation; Daily flow data, including global daily river flow data; Bi-monthly NDVI data are used to characterize vegetation cover dynamics; Annual data on land use, population, and human activities; Soil data, including sand, silt, clay, and organic carbon content; Topographic and erosional topographic factors, lithology and loess proportion data; Watershed statistical characteristics data.
[0039] In the preprocessing stage, multi-source data are unified to the same spatial resolution. This embodiment preferably uses a 0.5°×0.5° grid. For data already at 0.5° resolution, the focus is on unit unification, time scale conversion, and quality control to avoid unnecessary resampling. All data are aligned temporally and spatially around the target site, forming a sample dataset indexed by "site-date".
[0040] In a preferred embodiment, the flow data uses global daily river flow data output by CWatM (Global Water Cycle Model). This data, as a core hydrodynamic variable, will play a key role in subsequent stages such as the construction of river sediment transport capacity and the calculation of dynamic transport efficiency.
[0041] S2: Based on the river network routing relationship, perform real river network path tracing to obtain the set of all upstream stations corresponding to the target station and the real path distance from each upstream station to the target station, and sort them by distance to form an upstream station sequence.
[0042] First, the latitude and longitude of the target sediment monitoring station are mapped to a 0.5° grid. Then, based on pre-generated river network data, each grid point is mapped to a unique river network unit identifier (ArcID). This ArcID serves as the outlet control point for the entire upstream catchment area. Through this mapping, a physical connection is established between the target station and specific river network points.
[0043] Then, the pre-calculated river network routing table is read. The routing table records the downstream station number of each river station. To obtain all upstream stations of a certain station (exit station), this embodiment constructs a reverse river network mapping relationship: for each station, all its direct upstream stations are recorded. Subsequently, a depth-first search (DFS) algorithm is used to recursively collect all reachable upstream stations starting from the exit station and following the reverse mapping relationship, forming a complete set of upstream stations.
[0044] Next, the true path distance from each upstream station to the exit station is calculated. This embodiment uses the Breadth First Search (BFS) algorithm to accumulate the length of each river segment along the downstream direction (from the upstream station to the exit station) to obtain the true path distance. Figure 2 The process of extracting the entire upstream path from the site to the river network unit is shown.
[0045] Finally, the upstream stations are sorted in order of distance from the actual path (i.e., from the watershed boundary to the outlet), resulting in an ordered sequence of upstream stations constrained by the actual river network paths. This sequence preserves the spatial differences between different upstream locations and avoids information loss caused by using simple watershed averages.
[0046] S3: Along the upstream station sequence, the environmental and hydrological information of each upstream station is physically constrained and aggregated to generate high-dimensional aggregated features; among them, the physical constraint aggregation includes: constructing source erosion capacity, river sediment transport capacity, path cumulative penetration coefficient combined with reservoir barrier, and dynamic transport efficiency.
[0047] After obtaining the upstream station sequence, one of the core innovations of this invention lies in the fact that, instead of using a simple arithmetic average to aggregate information, it transforms the environmental and hydrological information of each upstream node into high-dimensional aggregated features through a set of formulas with clear physical meaning. The entire aggregation process simultaneously outputs the potential sediment supply features (Gross) without considering downstream obstruction and the effective sediment supply features (Net) considering obstruction.
[0048] Figure 3 The process of this physical constraint aggregation is illustrated. For example... Figure 3 As shown, the process includes the following: (1) Construction of source-end erosion capability For each upstream station, the slope sediment yield proxy is constructed using its daily precipitation data, soil properties, vegetation index, and topographic factors.
[0049] First, utilize precipitation Constructing erosive precipitation proxy :
[0050] Where P is the daily precipitation (in mm), and I is the indicator function; when the precipitation The value is 1 when the rainfall is greater than or equal to 12.7 mm, and 0 when the rainfall is less than 12.7 mm.
[0051] The above formula reflects the magnitude of rainfall erosion.
[0052] Secondly, using the normalized vegetation index Constructing vegetation cover factor : ; The higher the elevation, the better the vegetation cover. The smaller the value, the higher the degree of soil protection.
[0053] Then, combined with soil erodibility factors and terrain factors Constructing slope sediment yield proxy : .
[0054] Soil erodibility factors The topographic factors are calculated based on the combined content of sand, silt, clay, and organic carbon in the soil. It is determined by the slope and slope length.
[0055] (2) Construction of river channel sediment transport capacity For each upstream station, the sediment transport capacity of the river channel is calculated using a proxy based on the daily flow, river slope, and river width, and the formula is as follows: ; in, To measure the daily river flow, For the river slope, The greater the flow rate, the steeper the slope, and the narrower the river width, the stronger the shear force and sediment transport capacity of the water flow.
[0056] (3) Constructing the cumulative penetration coefficient of the path blocked by the reservoir. This step specifically addresses the interception effect of reservoirs and other barrier sites on sediment.
[0057] First, utilize the reservoir capacity and inbound flow Constructing the storage capacity-inflow ratio :
[0058] Secondly, construct the retention efficiency :
[0059] Retention efficiency varies with storage capacity-inflow ratio Increases as it increases.
[0060] Penetration rate That is: ; For sediment generated at upstream sites, when considering its path downstream through multiple reservoirs, the total effective penetration rate is the product of the penetration rates of each reservoir.
[0061] Therefore, along from the upstream station To the target site The cumulative penetration coefficient is calculated recursively along the downstream path. : ; in, Indicates from upstream station To the target site Each blocking station passed in sequence along the downstream path; Indicates from upstream station To the target site The set of all obstructing stations along the downstream path; This indicates that it will be from the upstream site To the target site The penetration rates of all blocking stations along the downstream path are multiplied together; Indicates from upstream station To the target site The downstream path of Penetration rate of each blocking site.
[0062] The above formula accurately quantifies the effective proportion of upstream sediment that can ultimately reach the outlet after passing through a series of reservoirs.
[0063] (4) Construction of dynamic transport efficiency To describe the nonlinear transport process of sediment that decreases with distance and is enhanced by flow rate, this embodiment constructs a multi-scale sediment transport ratio.
[0064] First, calculate from the upstream site To the target site average path traffic And based on average path traffic Construct a flow scaling factor to represent the water transport capacity. : ; Then, based on this traffic scaling factor Based on the actual path distance d, a multi-scale sediment transport ratio is constructed, including sediment transport ratios at three scales: short-distance, medium-distance, and long-distance, to simulate sediment of different particle sizes or different residence times. ; ; ; in, Indicates the short-range scale sediment transport ratio; Indicates the sediment transport ratio at a medium-range scale; It represents the sediment transport ratio over long distances.
[0065] (5) Gross / Net dual-track output After calculating the above items, a weighted aggregation is performed on each upstream station to generate parallel dual-track features.
[0066] The potential sediment yield represented by the source-end erosion capacity and channel sediment transport capacity of each upstream station is aggregated to form the potential sediment supply characteristic, i.e., the Gross characteristic, which does not consider downstream obstruction. Simultaneously, the aforementioned potential sediment supply is multiplied by the corresponding path cumulative penetration coefficient. and dynamic transport efficiency (e.g.) This yields the effective sand supply characteristics, or Net characteristics, that can effectively reach the target site after considering obstacles and attenuation along the route.
[0067] Gross / Net dual-track output can clearly distinguish between two different levels of questions: "how much sediment is generated upstream" and "how much sediment ultimately reaches the outlet," quantifying the contribution of the barrier factor to the reduction of sediment at the outlet.
[0068] In addition, this embodiment also summarizes information on soil, loess, soft rock, land use, human activities, lakes, wetlands, small reservoirs, regulating lakes, glaciers, terraces, etc. of upstream sites, and constructs background features, fingerprint features, interaction features, component ratio features, and connectivity features, which are all incorporated into the high-dimensional aggregated features.
[0069] This invention integrates source erosion, channel transport, interception and retention, and dynamic transport efficiency into the feature construction by physically constraining upstream aggregation. This makes the input of the machine learning model closer to the real physical process of sediment formation, transport and reduction, and reduces the physical distortion of pure black box learning.
[0070] S4: Concatenate the high-dimensional aggregated features with the site local features and spatiotemporal coding features to form the input feature set.
[0071] After completing the physical constraint aggregation for each sample, the local features of the site, the spatiotemporal coding features, and the upstream aggregated features are concatenated into the input feature set.
[0072] Local features of a site include the target site’s daily weather, flow, NDVI, soil, topography and other original or simple derived features.
[0073] Spatiotemporal coding features include spatial periodic coding based on the latitude and longitude of the target site and time periodic coding based on the date, which are used to express spatial location differences and seasonal variations.
[0074] S5: Perform multi-level feature filtering on the input feature set; wherein, multi-level feature filtering includes at least pre-screening, relevance ranking, rearrangement based on permutation importance, and dynamic feature quantity selection based on nested cross-validation to obtain a stable subset of key features.
[0075] To avoid model overfitting caused by high-dimensional feature coupling and redundancy, this invention employs a funnel-shaped multi-level feature selection process. Figure 4 The screening process is shown below, with the specific steps as follows: (1) Pre-screening: For the input feature set, first delete one of the following features: features with constant values in the training set, features with missing rates higher than the first threshold (e.g., 70%), features with completely repeated values, and collinear feature pairs with a correlation coefficient higher than the second threshold (e.g., 0.95), to achieve preliminary screening of features.
[0076] (2) Relevance Ranking (First Round Ranking): The pre-screened features are ranked using the Minimum Redundancy Maximum Relevance (mRMR) algorithm. This algorithm maximizes the correlation between features and the target variable while minimizing the redundancy between features, and can evaluate the importance of features from a global perspective. The system selects a batch of top-ranked features (such as the first 200 or 300) to proceed to the next stage.
[0077] (3) Reordering based on permutation importance (second round of ranking): The features ranked by relevance are reordered using the permutation importance method. The Permutation Importance method is used to reorder the features after they have been ranked by relevance.
[0078] (4) Nested Cross-Validation Dynamic K Selection: This is the core of this step. The system divides the samples into multiple inner and outer folds, forming a nested cross-validation framework. In each outer loop of an outer fold, the inner loop is used to search for the number of features K in the feature sequence after two rounds of sorting. The search strategy adopts a method of first coarse search (using a large step size to determine the interval of the optimal K) and then fine search (searching within a small range with a step size of 1) to obtain the optimal number of features under that outer fold. Finally, the frequency of each feature in the optimal feature subset of all outer folds is counted. Those features that appear frequently and stably under different outer folds and different random segmentation conditions are identified as stable key features. These stable key features constitute the final stable key feature subset. Stable key features are not the single optimal ones, but rather driving factors with robustness and generalization interpretability.
[0079] The advantage of this funnel-shaped multi-level feature screening process is that it does not search for the optimal feature combination in a single step, but rather identifies key factors that contribute stably under different data segmentation conditions, thereby reducing the risk of overfitting.
[0080] S6: Perform a logarithmic transformation on the target sediment variable, train a stacked ensemble model using a stable subset of key features, and then perform an antilogarithmic transformation on the output of the stacked ensemble model to obtain the daily sediment simulation results.
[0081] Figure 5 The internal computing architecture and data flow of the stacked integration model are illustrated. For example... Figure 5 As shown: (1) Input features and preprocessing The stable key feature subset obtained after multi-level feature screening is used as the input feature vector of the stacked ensemble model. Since the original sediment concentration data usually exhibits obvious right skewness, long tail, and extreme value distribution problems, the target variable is first logarithmically transformed to make the transformed distribution closer to the normal distribution, so as to reduce the excessive dominance of large value samples on the loss function.
[0082] (2) Parallel training and prediction of the first-layer base learner At least two heterogeneous tree models are used as base learners, and training and inference are performed in parallel. Specifically, this includes: XGBoost: Excels at handling high-dimensional nonlinear spaces; LightGBM: Based on histogram binning decision-making, it has high training efficiency; ExtraTrees: Extremely random trees with low variance; CatBoost: Used to supplement heterogeneous feature learning and automatically process categorical features.
[0083] To avoid overfitting, each base learner uses 5-fold cross-validation on the training set to generate corresponding out-of-fold predictions. That is, in each fold, the model is trained using the data from the other 4 folds to predict the current fold, and finally the 5-fold predictions are concatenated to form all the training-level predictions for that base learner.
[0084] (3) Predictive feature splicing pool The out-of-place predictions (Pred_XGB, Pred_LGBM, Pred_ET, Pred_CB) of each base learner on the training set are concatenated column-wise to form a new feature matrix, which serves as the prediction feature concatenation pool. This prediction feature concatenation pool is used as the input features for the second-layer meta-learner. During the testing phase, each base learner directly predicts the test samples, and the concatenated prediction values are then input into the meta-learner.
[0085] (4) Second-layer meta-learner decision The meta-learner employs either a Ridge Cross-Validation (RidgeCV) model or a standard Linear Regression (Linear) model. This meta-learner receives the concatenated predicted features as input and generates a joint sediment concentration prediction on a logarithmic scale by weighting and combining the outputs of each base learner. RidgeCV automatically selects the optimal regularization parameter through built-in cross-validation, thereby balancing the contributions of each base learner and preventing overfitting.
[0086] (5) Output post-processing The predicted sediment concentration values were subjected to anti-correlation reduction and non-negative truncation (non-negative function truncation) to obtain the final simulation results of the daily sediment concentration at the target site.
[0087] This modeling process fully leverages the advantages of each base learner (XGBoost's high-dimensional nonlinear fitting, LightGBM's efficiency, ExtraTrees' low variance, and CatBoost's heterogeneous processing capability), and uses a ridge regressor learner for robust integration, thereby significantly improving the fitting accuracy for high-sedimentation events and peak processes.
[0088] This invention first performs a logarithmic transformation on the target variable to compress the scale, then stacks and integrates multiple base learners, and finally restores the scale through an inverse antilogarithmic transformation, thereby enhancing the fitting ability for high-sediment-content events and peak processes under right-skewed, long-tailed distributions. Accordingly, according to embodiments of the present invention, the present invention also provides a computer device and a readable storage medium.
[0089] Figure 6 This is a schematic diagram of the structure of a computer device 12 provided in an embodiment of the present invention. Figure 6A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 6 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0090] like Figure 6 As shown, computer device 12 is represented in the form of a general-purpose computing device. Computer device 12 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0091] The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0092] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0093] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0094] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 6 Not shown; usually referred to as a "hard drive"). Although Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0095] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0096] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with computer device 12, and / or with any device that enables computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0097] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the river sediment simulation method provided in the embodiments of the present invention.
[0098] This invention also provides a non-transitory computer-readable storage medium storing computer instructions, on which a computer program is stored, wherein the program, when executed by a processor, is the river sediment simulation method provided in all embodiments of this application.
[0099] The computer storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0100] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0101] The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. The computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0102] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for simulating river sediment based on real river network paths and feature selection, characterized in that, Includes the following steps: S1: Obtain multi-source data from the target site and preprocess it to construct a sample dataset with site and date as the basic unit; S2: Based on the river network routing relationship, perform real river network path tracing to obtain the set of all upstream stations corresponding to the target station and the real path distance from each upstream station to the target station, and sort them by distance to form an upstream station sequence; S3: Along the upstream station sequence, the environmental and hydrological information of each upstream station is physically constrained and aggregated to generate high-dimensional aggregated features; among them, the physical constraint aggregation includes: constructing source erosion capacity, river sediment transport capacity, path cumulative penetration coefficient combined with reservoir barrier, and dynamic transport efficiency; S4: Concatenate the high-dimensional aggregated features with the site local features and spatiotemporal coding features to form the input feature set; S5: Perform multi-level feature filtering on the input feature set; wherein, multi-level feature filtering includes at least pre-screening, relevance ranking, rearrangement based on permutation importance, and dynamic feature quantity selection based on nested cross-validation to obtain a stable subset of key features; S6: Perform a logarithmic transformation on the target sediment variable, train a stacked ensemble model using a stable subset of key features, and then perform an anti-logarithmic transformation and non-negative truncation on the output of the stacked ensemble model to obtain the daily sediment simulation results.
2. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, Step S2 specifically includes: First, a depth-first traversal algorithm is used to collect all upstream sites corresponding to the target site; Then, a breadth-first traversal algorithm is used to calculate the actual path distance from each upstream station to the target station; Finally, all upstream stations are sorted in order of distance from the actual path from farthest to closest, forming a sequence of upstream stations under the constraints of the actual river network path.
3. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S3, the construction of source-end erosion capability specifically includes: Utilizing precipitation Constructing erosive precipitation proxy : in, This indicates the indicator function, when precipitation... The value is 1 when the rainfall is greater than or equal to 12.7 mm, and 0 when the rainfall is less than 12.7 mm. Using Normalized Difference Vegetation Index Constructing vegetation cover factor : Combined with soil erodibility factors and terrain factors Constructing slope sediment yield proxy : 。 4. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S3, constructing the river channel's sediment transport capacity specifically includes: Utilize traffic River slope Hehekuan Constructing river sediment transport agency : 。 5. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S3, the specific steps for constructing the cumulative path penetration coefficient combined with reservoir barriers include: Utilizing reservoir capacity and inbound flow Constructing the storage capacity-inflow ratio : Construction interception efficiency : And obtain the penetration rate : ; Along from upstream stations To the target site The cumulative penetration coefficient is calculated recursively along the downstream path. : ; in, Indicates from upstream station To the target site Each blocking station passed in sequence along the downstream path; Indicates from upstream station To the target site The set of all obstructing stations along the downstream path; This indicates that it will be from the upstream site To the target site The penetration rates of all blocking stations along the downstream path are multiplied together; Indicates from upstream station To the target site The downstream path of Penetration rate of each blocking site.
6. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S3, constructing the dynamic transfer efficiency specifically includes: Calculate the average path traffic from the upstream site to the target site. Construct the flow scaling factor : ; Based on the actual path distance d and the traffic scaling factor Constructing multi-scale sediment transport ratios: ; ; ; in, Indicates the short-range scale sediment transport ratio; Indicates the sediment transport ratio at a medium-range scale; It represents the sediment transport ratio over long distances.
7. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S3, the high-dimensional aggregated features include potential sand supply features without considering barriers and effective sand supply features considering barriers; wherein, The potential sediment supply characteristics are calculated by adding the source-end erosion capacity and the river channel sediment transport capacity of each upstream station, and then multiplying by the dynamic transport efficiency to obtain the potential sediment supply contribution without considering obstruction, which is used as the potential sediment supply characteristics. The effective sediment supply characteristic is calculated by multiplying the potential sediment supply contribution by the cumulative penetration coefficient to obtain the effective sediment supply contribution considering the obstruction, which is used as the effective sediment supply characteristic.
8. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S4, the local features of the site include the daily weather, flow, NDVI, soil, and topography of the target site; the spatiotemporal coding features include spatial periodic coding based on the latitude and longitude of the target site and time periodic coding based on the date.
9. The river sediment simulation method based on real river network path and feature selection according to claim 1, characterized in that, In step S5, Pre-screening specifically includes: deleting constant features, features with a missing rate exceeding a threshold, duplicate features, and collinear features with a correlation higher than a set threshold; The relevance ranking specifically includes: ranking the pre-screened features using the maximum relevance and minimum redundancy method; Reordering based on permutation importance specifically includes: reordering features that have been ranked in terms of relevance using permutation importance methods; The dynamic feature quantity selection based on nested cross-validation specifically includes: In nested cross-validation, coarse search and local fine search are performed on the reordered features to determine the optimal number of features K under the current segmentation conditions; the frequency of feature selection under different segmentation conditions is counted, and features with a frequency higher than a preset threshold are identified as a stable key feature subset.
10. The river sediment simulation method based on real river network path and feature screening according to claim 1, characterized in that, In step S6, the base learners of the stacked ensemble model include at least two of XGBoost, LightGBM, ExtraTrees, and CatBoost, and the meta learners are either ridge regression cross-validation models or linear regression models.
11. A computer device, characterized in that, include: At least one processor; as well as A memory that is communicatively connected to at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, causes the at least one processor to perform the river sediment simulation method according to any one of claims 1 to 10.
12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the river sediment simulation method according to any one of claims 1 to 10.