A river flow field state determination method, device, equipment and storage medium
By generating a hydrodynamic response sample set, screening outlier samples, constructing a physically enhanced surrogate model, and conducting joint optimization training, the problem of long prediction time for river flow field state in existing technologies is solved, and fast and accurate flow field state prediction is achieved, which is applicable to flood warning and river management in water conservancy projects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG YUANSUAN TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-26
AI Technical Summary
Existing numerical calculation methods based on hydrodynamic control equations are time-consuming in predicting river flow field conditions, making it difficult to meet the timeliness requirements of flood warnings, and the grid generation is cumbersome, making it impossible to quickly output flow field prediction results.
A hydrodynamic response sample set with different feature combinations is generated based on the hydrodynamic control equation. Abnormal samples are screened, a physically enhanced surrogate model is constructed, and it is trained using a joint optimization objective. The channel attributes are transformed into a structured representation through a spatial adaptation mechanism to achieve rapid prediction of the flow field state.
It improves the efficiency and accuracy of flow field prediction, has strong adaptability, and can quickly output the flow field state of the target river channel at future moments, which conforms to the law of hydrodynamic conservation and ensures the reliability of the prediction results.
Smart Images

Figure CN121936371B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hydrodynamic simulation technology for water conservancy projects, and more specifically, to a method, apparatus, equipment, and storage medium for determining the state of a river flow field. Background Technology
[0002] Accurate prediction of river flow field conditions such as water depth and flow rate is an important foundation for carrying out water conservancy work such as flood warning, water resource allocation, and daily river management, and is also a routine technical requirement in the field of water conservancy engineering.
[0003] Currently, the industry generally adopts numerical calculation methods based on hydrodynamic control equations for predicting river flow field conditions. This method, based on the basic hydrodynamic control equations and combined with information such as the geometric dimensions and basic hydrological parameters of the river, divides the river area into grids and completes the calculation in a step-by-step iterative manner, finally obtaining flow field state data at different locations in the river. It is the most basic and widely used technical means in river flow field prediction.
[0004] The numerical calculation method based on the hydrodynamic control equation has obvious technical defects. The method requires detailed grid subdivision of the river channel, and the iterative calculation process is cumbersome and the overall calculation time is long. It is difficult to quickly output the flow field prediction results and cannot meet the needs of water conservancy work scenarios such as flood warning, which have clear requirements for prediction timeliness. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a method, apparatus, equipment and storage medium for determining the state of a river flow field, which can improve the efficiency, accuracy and adaptability of flow field prediction.
[0006] In a first aspect, embodiments of this application provide a method for determining the state of a river flow field, the method comprising:
[0007] Based on the hydrodynamic control equations, the parameters of the river channel model are sampled to generate a hydrodynamic response sample set covering different combinations of features;
[0008] Abnormal samples in the hydrodynamic response sample set are filtered to obtain a valid dataset for model construction;
[0009] Based on the statistical characteristics of the effective dataset and the prior range of physical parameters, the static attributes and dynamic states of the river channel are encoded into a structured representation with fixed dimensions.
[0010] Construct a physically enhanced surrogate model, wherein the surrogate model takes a structured representation with fixed dimensions as input and is used to learn the mapping relationship from the current flow field state to the future flow field state;
[0011] The surrogate model is trained using a joint optimization objective, wherein the joint optimization objective includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term is used to constrain the model output to approximate the samples in the effective dataset, and the physical constraint term is used to ensure that the model output satisfies the hydrodynamic conservation law.
[0012] For the target river channel, its entity attributes are converted into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism;
[0013] The target structured representation is input into the trained surrogate model to perform flow field state deduction, and the flow field state prediction results of the target river channel at future time are obtained.
[0014] Optionally, the sampling of river channel model parameters based on the hydrodynamic control equations to generate a hydrodynamic response sample set covering different combinations of features includes:
[0015] A one-dimensional hydrodynamic numerical model containing a preset number of discrete grids is constructed based on the hydrodynamic control equations.
[0016] Random sampling of river channel geometric and physical parameters across a wide range;
[0017] The sampled geometric and physical parameters are used as inputs to the basic model, and a numerical solution engine is invoked to perform batch simulations to generate the hydrodynamic response sample set.
[0018] Optionally, the step of filtering outlier samples in the hydrodynamic response sample set to obtain a valid dataset for model construction includes:
[0019] Anomaly determination is performed on each sample in the hydrodynamic response sample set based on preset physical rules, which include at least one of numerical stability index, water balance error index and physical rationality index.
[0020] Remove the samples that are judged to be abnormal, and keep the samples that pass the abnormality judgment as the cleaned samples;
[0021] The cleaned samples are uniformly resampled in time, and the original non-uniform time step sequence is interpolated into a sequence with a target uniform time step to obtain the effective dataset.
[0022] Optionally, the step of encoding the static attributes and dynamic states of the river channel into a fixed-dimensional structured representation based on the statistical characteristics and prior ranges of the physical parameters of the effective dataset includes:
[0023] A structured tensor containing multiple channels is constructed as the structured representation, and the dimension of the structured tensor is fixed to a preset number of discrete grids;
[0024] Determine the statistical characteristics of each physical quantity in the effective dataset, wherein the statistical characteristics include at least one of mean, variance, maximum value and minimum value;
[0025] Based on the fixed prior range of the statistical features or physical parameters, a corresponding standardization rule is set for each channel of the structured tensor.
[0026] According to the standardization rules, the static attributes and dynamic states of the river channel are encoded into the corresponding channels of the structured tensor.
[0027] Optionally, the step of converting the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism includes:
[0028] Obtain the actual number of cross-sections of the target river channel and their corresponding entity attributes;
[0029] An interpolation function is constructed using the actual cross-sectional physical coordinates of the target river channel as the independent variable and the entity attributes as the dependent variable.
[0030] Using the interpolation function, the entity attributes of the actual cross-section are mapped to a fixed number of virtual nodes required by the proxy model to obtain the target structured representation.
[0031] Optionally, the physical constraint term in the joint optimization objective is dynamically constructed during training as the parameter state of the surrogate model changes. Specifically, its construction method is as follows:
[0032] Based on the residual form of the hydrodynamic control equations, the partial derivatives of the current output of the surrogate model with respect to the input dimension are calculated using automatic differentiation techniques to obtain the physical constraint terms corresponding to the current model state.
[0033] Optionally, the method includes:
[0034] Before inputting the target structured representation into the trained surrogate model, the entity attributes of the target river are compared with the parameter range of the valid dataset to perform a generalization boundary check.
[0035] If the entity attributes of the target river exceed the preset threshold of the parameter range of the effective dataset, the segmented reasoning mechanism is triggered, the target river is divided into multiple sub-segments along the flow, the entity attributes of each sub-segment are converted into the target structured representation and then input into the proxy model for reasoning, and the reasoning result of the previous sub-segment is used as the boundary condition of the next sub-segment.
[0036] And / or,
[0037] If the entity attributes of the target river channel meet the preset extreme working conditions, the hyperparameter configuration of the proxy model is dynamically adjusted, and inference is performed with the adjusted hyperparameter configuration.
[0038] Secondly, embodiments of this application provide a device for determining the state of a river flow field, the device comprising:
[0039] The sample set generation module is used to sample the parameters of the river channel model based on the hydrodynamic control equations and generate a hydrodynamic response sample set covering different combinations of features.
[0040] The dataset construction module is used to filter out abnormal samples in the hydrodynamic response sample set to obtain a valid dataset for model construction.
[0041] The structured representation generation module is used to encode the static attributes and dynamic states of the river channel into a fixed-dimensional structured representation based on the statistical characteristics and prior range of physical parameters of the effective dataset.
[0042] The proxy model construction module is used to construct a physically enhanced proxy model, wherein the proxy model takes a structured representation with fixed dimensions as input and is used to learn the mapping relationship from the current flow field state to the future flow field state.
[0043] The surrogate model training module is used to train the surrogate model using a joint optimization objective, wherein the joint optimization objective includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term is used to constrain the model output to approximate the samples in the effective dataset, and the physical constraint term is used to ensure that the model output satisfies the hydrodynamic conservation law.
[0044] The structured representation conversion module is used to convert the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism.
[0045] The prediction result generation module is used to input the target structured representation into the trained surrogate model to perform flow field state deduction and obtain the flow field state prediction result of the target river channel at future time.
[0046] Optionally, the sampling of river channel model parameters based on the hydrodynamic control equations to generate a hydrodynamic response sample set covering different combinations of features includes:
[0047] A one-dimensional hydrodynamic numerical model containing a preset number of discrete grids is constructed based on the hydrodynamic control equations.
[0048] Random sampling of river channel geometric and physical parameters across a wide range;
[0049] The sampled geometric and physical parameters are used as inputs to the basic model, and a numerical solution engine is invoked to perform batch simulations to generate the hydrodynamic response sample set.
[0050] Optionally, the step of filtering outlier samples in the hydrodynamic response sample set to obtain a valid dataset for model construction includes:
[0051] Anomaly determination is performed on each sample in the hydrodynamic response sample set based on preset physical rules, the physical rules including at least one of numerical stability index, water balance error index and physical rationality index.
[0052] Remove the samples that are judged to be abnormal, and keep the samples that pass the abnormality judgment as the cleaned samples;
[0053] The cleaned samples are uniformly resampled in time, and the original non-uniform time step sequence is interpolated into a sequence with a target uniform time step to obtain the effective dataset.
[0054] Optionally, the step of encoding the static attributes and dynamic states of the river channel into a fixed-dimensional structured representation based on the statistical characteristics and prior ranges of the physical parameters of the effective dataset includes:
[0055] A structured tensor containing multiple channels is constructed as the structured representation, and the dimension of the structured tensor is fixed to a preset number of discrete grids;
[0056] Determine the statistical characteristics of each physical quantity in the effective dataset, wherein the statistical characteristics include at least one of mean, variance, maximum value and minimum value;
[0057] Based on the fixed prior range of the statistical features or physical parameters, a corresponding standardization rule is set for each channel of the structured tensor.
[0058] According to the standardization rules, the static attributes and dynamic states of the river channel are encoded into the corresponding channels of the structured tensor.
[0059] Optionally, the step of converting the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism includes:
[0060] Obtain the actual number of cross-sections of the target river channel and their corresponding entity attributes;
[0061] An interpolation function is constructed using the actual cross-sectional physical coordinates of the target river channel as the independent variable and the entity attributes as the dependent variable.
[0062] Using the interpolation function, the entity attributes of the actual cross-section are mapped to a fixed number of virtual nodes required by the proxy model to obtain the target structured representation.
[0063] Optionally, the physical constraint term in the joint optimization objective is dynamically constructed during training as the parameter state of the surrogate model changes. Specifically, its construction method is as follows:
[0064] Based on the residual form of the hydrodynamic control equations, the partial derivatives of the current output of the surrogate model with respect to the input dimension are calculated using automatic differentiation techniques to obtain the physical constraint terms corresponding to the current model state.
[0065] Optionally, the device includes a generalization boundary checking module for:
[0066] Before inputting the target structured representation into the trained surrogate model, the entity attributes of the target river are compared with the parameter range of the valid dataset to perform a generalization boundary check.
[0067] If the entity attributes of the target river exceed the preset threshold of the parameter range of the effective dataset, the segmented reasoning mechanism is triggered, the target river is divided into multiple sub-segments along the flow, the entity attributes of each sub-segment are converted into the target structured representation and then input into the proxy model for reasoning, and the reasoning result of the previous sub-segment is used as the boundary condition of the next sub-segment.
[0068] And / or,
[0069] If the entity attributes of the target river channel meet the preset extreme working conditions, the hyperparameter configuration of the proxy model is dynamically adjusted, and inference is performed with the adjusted hyperparameter configuration.
[0070] Thirdly, embodiments of this application provide a computer device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the river flow field state determination method described in any of the optional embodiments of the first aspect are performed.
[0071] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the river flow field state determination method described in any of the optional embodiments of the first aspect.
[0072] The technical solution provided in this application includes, but is not limited to, the following beneficial effects:
[0073] Sampling river model parameters based on hydrodynamic control equations and generating hydrodynamic response sample sets covering different feature combinations allows the sample set generation process to conform to the hydrodynamic physical laws of river flow field changes, ensuring that all types of data in the sample set conform to the basic principles of hydrodynamics. At the same time, the diverse feature combinations can achieve comprehensive coverage of different river conditions, laying a reliable data foundation that is realistic and feature-complete for subsequent model construction and training, and avoiding model learning bias caused by samples deviating from physical laws.
[0074] By filtering out abnormal samples in the hydrodynamic response sample set and obtaining a valid dataset, invalid data that does not conform to hydrodynamic laws, contains errors, or is abnormal can be removed from the sample set. This reduces the interference of abnormal data on the model training process, effectively improves the quality and effectiveness of the dataset used for model construction, and allows the subsequent learning process of the model to be carried out based on accurate and reliable basic data, thus ensuring the training effect of the model from the data source.
[0075] Based on the statistical characteristics of the effective dataset and the prior range of physical parameters, the static attributes and dynamic states of the river channel are encoded into a structured representation with fixed dimensions. This enables the standardization of physical attributes and flow field states of different types and magnitudes of the river channel, eliminating model training interference caused by differences in the magnitude of physical quantities. At the same time, the unified structured representation with fixed dimensions standardizes the model input format, improves the model's adaptability to different river channel features, and provides a standardized and unified input foundation for the model to learn flow field features efficiently and stably.
[0076] A physically enhanced surrogate model is constructed with a fixed-dimensional structured representation as input to learn the mapping relationship between the current flow field state and the future flow field state. This allows the model to be specifically adapted to a standardized input format, efficiently capture the correlation features of the flow field state changing over time, and the physically enhanced model design makes the model's learning process conform to the inherent laws of the river flow field change, thereby improving the accuracy and effectiveness of the model in learning the mapping relationship between the current and future flow field states.
[0077] The surrogate model is trained using a joint optimization objective that includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term can effectively constrain the model output to approximate the real samples in the effective dataset, ensuring the model's fitting accuracy to the river flow field state. The physical constraint term can ensure that the model output strictly follows the hydrodynamic conservation law. The combination of the two allows the model training process to take into account both fitting accuracy and physical consistency, avoiding the model from having fitting deviations that deviate from the basic laws of hydrodynamics.
[0078] For the target river, the spatial adaptation mechanism is used to convert its entity attributes into a target structured representation that matches the fixed-dimensional structured representation. This enables accurate matching between the actual entity attributes of the target river and the model input format, solving the problem of incompatibility between the entity attributes of target rivers with different characteristics and the model input format. This allows the actual attributes of various target rivers to adapt to the model's input requirements, laying an adaptability foundation for the model to conduct effective flow field inferences on the target river.
[0079] The target structured representation is input into the trained surrogate model to extrapolate the flow field state and obtain the prediction results. Based on the trained model, the flow field extrapolation can be carried out quickly to output the flow field state prediction results of the target river channel at future time, which can effectively improve the efficiency of the river channel flow field state prediction. At the same time, the model trained by joint optimization of the target has both fitting accuracy and physical consistency, which can ensure the accuracy and reliability of the final flow field state prediction results.
[0080] The design of the above steps is progressive and interconnected. Starting with the construction of basic data for flow field prediction, the preliminary data preparation for model training is completed through data screening and attribute encoding. Then, through model construction and joint optimization training, a physically enhanced surrogate model that conforms to hydrodynamic laws and has an accurate fit is created. Finally, through spatial adaptation and model extrapolation, the flow field state of the target river is predicted. Each step provides effective support from the aspects of data foundation, input standardization, model learning, training constraints, actual adaptation, and extrapolation output. They work together to form a complete flow field state prediction process for the river. This not only ensures the scientificity and effectiveness of model training, but also improves the efficiency, accuracy, and adaptability of flow field prediction. At the same time, it ensures that the prediction results conform to the laws of hydrodynamic conservation, and ultimately achieves a reliable prediction of the future flow field state of the target river.
[0081] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0082] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0083] Figure 1 A flowchart of a method for determining the state of a river flow field provided in Embodiment 1 of this application is shown;
[0084] Figure 2 A flowchart of a hydrodynamic response sample set generation method provided in Embodiment 1 of this application is shown;
[0085] Figure 3 A flowchart of an efficient dataset construction method provided in Embodiment 1 of this application is shown;
[0086] Figure 4 A flowchart of a structured representation encoding method provided in Embodiment 1 of this application is shown;
[0087] Figure 5 A flowchart of a target structured representation generation method provided in Embodiment 1 of this application is shown;
[0088] Figure 6 A flowchart of a hyperparameter configuration optimization method provided in Embodiment 1 of this application is shown;
[0089] Figure 7 The diagram shows the overall flowchart of a flow field state prediction method based on a physically enhanced surrogate model provided in Embodiment 1 of this application.
[0090] Figure 8 This illustration shows a schematic diagram of the core architecture and physical constraint mechanism of a physical information neural operator network provided in Embodiment 1 of this application;
[0091] Figure 9 This paper shows a schematic diagram of a river flow field state determination device provided in Embodiment 2 of this application;
[0092] Figure 10 A schematic diagram of the structure of a computer device provided in Embodiment 3 of this application is shown. Detailed Implementation
[0093] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0094] Example 1
[0095] To facilitate understanding of this application, the following is combined with... Figure 1The flowchart illustrating a method for determining the flow field state of a river channel provided in Embodiment 1 of this application will be described in detail for Embodiment 1 of this application.
[0096] See Figure 1 As shown, Figure 1 A flowchart of a method for determining the flow field state of a river channel according to Embodiment 1 of this application is shown, wherein the method includes steps S101 to S107:
[0097] S101: Based on the hydrodynamic control equations, the parameters of the river channel model are sampled to generate a hydrodynamic response sample set covering different combinations of features.
[0098] Specifically, the hydrodynamic governing equations are the one-dimensional Saint-Venant equations, which are the core equations describing river flow motion. They include the continuity equation and the momentum equation, while the friction gradient is calculated using the Manning formula. The three formulas are as follows:
[0099] 1. Continuity equation: ,in The water-carrying area of the river channel. For time, For river flow, For process coordinates;
[0100] 2. Momentum equation: ,in It is the acceleration due to gravity. River water level, For frictional gradient;
[0101] 3. Manning's formula: ,in For Manning roughness, The radius is the hydraulic radius.
[0102] Parameter sampling requires the initial construction of a one-dimensional hydrodynamic numerical model. This model contains N+1 nodes and N computational segments, where N is the preset number of discrete grids. The model is based on the dynamic wave solution mechanism of the one-dimensional Saint-Venant equations, and a central difference scheme is used for spatial discretization to improve computational stability. The sampling method is Monte Carlo random sampling across the entire parameter space. The sampled parameters are divided into geometric and physical parameters. Geometric parameters include the total channel length L, the bottom width of the cross-section B, and the riverbed slope. The physical parameter is the Manning roughness n. Wide-span random sampling is performed on L to make the single-segment grid length... Dynamic changes within a reasonable physical range, for B, Uniformly distributed sampling is performed on n.
[0103] When the sample set is generated, the input parameters of the basic model are automatically modified, and a dynamic wave numerical solution engine based on the one-dimensional Saint-Venant equations is called to perform batch simulations. During the simulation, complex time-varying boundary conditions are configured for the model. The upstream inlet node generates a stochastic flow process line that conforms to the P-III type distribution, and the downstream outlet node randomly selects a fixed water level boundary or a free outflow boundary mode. The sample set generated by the batch simulation must be able to fully cover the preset parameter space and characterize the hydraulic response characteristics of the river channel under different combinations of geometric and physical parameters. This sample set will serve as the ground truth label for subsequent neural network training.
[0104] S102: Filter out the abnormal samples in the hydrodynamic response sample set to obtain a valid dataset for model construction.
[0105] Specifically, the abnormal sample screening is divided into two core steps: physical rule anomaly judgment and time-uniform resampling. First, all abnormal samples are removed by preset physical rules, and then the cleaned samples are standardized in the time dimension to finally obtain a high-fidelity effective dataset with physical consistency and spatiotemporal dimension uniformity.
[0106] The preset physical rules include three categories of judgment indicators: numerical stability, mass conservation, and physical rationality. Each indicator is calculated using a corresponding formula and a judgment threshold is set. If any indicator fails to meet the requirements, the sample is judged as an abnormal sample. The relevant formulas and judgment rules are as follows:
[0107] 1. The numerical stability index is the Froude number, calculated using the following formula: ,in For river flow velocity, For hydraulic depth, The width of the water surface; if detected Frequent high-frequency oscillations occurred in the non-drop zone. And the variance is too large, or the sample... If the proportion of time steps exceeds 5%, it is judged as a numerically unstable sample.
[0108] 2. The mass conservation index is the relative error of water balance, calculated using the following formula: ,in Total inbound traffic throughout the entire period. This represents the total outflow rate over all time periods. This represents the change in the amount of water stored in the river channel in the model; if It was determined to be a numerically divergent sample.
[0109] 3. Physical rationality indicators include overflow and negative flow determination; if arbitrary spatiotemporal coordinates exist... , ( (for the preset maximum depth of the cross-section), or it exists in the non-backwater zone. ( For negative current threshold, such as If a sample is found to be invalid, it is considered invalid. Finally, all valid samples undergo time-uniform resampling. Let the original non-uniform time step sequence be... The target uniform time step is For the target time Linear interpolation is used to calculate state variables. (i.e., water level or flow rate): , Through the above steps, a high-fidelity dataset with physical consistency and spatiotemporal dimension uniformity is constructed.
[0110] S103: Based on the statistical characteristics of the effective dataset and the prior range of physical parameters, the static attributes and dynamic states of the river channel are encoded into a structured representation with fixed dimensions.
[0111] Specifically, the structured representation is a fully physically constrained multichannel structured tensor, with a fixed tensor dimension. ,in The batch size is set to 64 in the implementation, and N is the preset number of discrete grids, which is set to 50 in the implementation. The 8 channels correspond to the normalized coordinate x' and the normalized riverbed elevation, respectively. Section width B, roughness n, grid size The water depth at the previous moment Traffic volume at the previous moment Boundary condition hybrid encoding: For any number of discrete nodes M in the actual river channel, it will be mapped to a fixed N through a virtual-real mapping interpolation mechanism to ensure the fixity of the tensor dimension.
[0112] The statistical characteristics of the effective dataset are the global maximum, global minimum, mean, and variance obtained by statistically analyzing all physical quantities in the set. The prior range of the physical parameters is a fixed physical interval determined based on the hydraulic engineering specifications, where the prior range of the roughness n is [0.01, 0.1]. For the different physical properties of the eight channels of the tensor, three types of standardization rules are formulated respectively: Min-Max normalization, Z-Score standardization, and linear mapping normalization, to eliminate the difference in magnitude between different physical quantities and avoid gradient imbalance during model training.
[0113] The standardized formulas and execution rules for each channel are as follows:
[0114] 1. Normalized coordinate channels: Linear mapping normalization is used, the formula is as follows: The physical coordinate x is mapped to the interval [0,1], and L is the total length of the river channel.
[0115] 2. Normalized riverbed elevation Section width B, grid scale The water depth at the previous moment Channels: Min-Max normalization is used, and the general formula is as follows: Where X is the original physical quantity, The global minimum value for the effective dataset. The global maximum value is the statistical value of the effective dataset; the riverbed elevation needs to be determined first based on... Calculate the actual elevation of each node. Given the physical coordinates of the i-th node, perform Min-Max normalization.
[0116] 3. Roughness n-channel: Min-Max normalization is performed based on a fixed physical range [0.01, 0.1], rather than the statistical values of the effective dataset, to avoid normalization anomalies caused by out-of-bounds test set parameters.
[0117] 4. Flow rate at the previous time step Channels: Z-Score normalization is used, the formula is as follows: ,in The mean of the traffic in the effective dataset. To determine the variance of the effective dataset traffic during implementation , .
[0118] The boundary condition hybrid coding channel adopts a single-point marking strategy of "numerical value + label". The upstream and downstream are distinguished by the tensor array subscript index, with index 0 fixed as upstream and index 49 fixed as downstream. The normalized flow value of the next time step is filled in at the upstream index 0 as the driving force. If the downstream index 49 is a free outflow, the label value -1.0 is filled in. If it is a fixed water level, the water level value normalized by Min-Max is filled in. All intermediate nodes are filled with 0 to ensure that the model can quickly identify the boundary type and boundary driving force. The cross-sectional width B and roughness n are constants that do not change along the flow path. A broadcast mechanism is used to fill the entire channel to reduce computational redundancy.
[0119] S104: Construct a physically enhanced surrogate model, wherein the surrogate model takes the structured representation with fixed dimensions as input and is used to learn the mapping relationship from the current flow field state to the future flow field state.
[0120] Specifically, the physical enhancement proxy model is an improved physical information neural operator (PINO) network. The overall architecture consists of a progressive feature enhancement layer, four stacked Fourier operator blocks, an adaptive normalization layer, and a decoding projection layer. The core is the "global spectrum + local convolution" dual-branch feature extraction structure of the Fourier operator block. The network ultimately achieves operator mapping learning from the geometric-physical input tensor to the flow field state at the next time step.
[0121] The progressive feature enhancement layer is a two-layer perceptron structure, located at the front end of the network as an encoder that executes only once. Its function is to map the low-dimensional input tensor to a high-dimensional latent space, avoiding information sparsity caused by direct mapping of low-dimensional physical quantities. Its calculation formula is as follows:
[0122] , This is the weight matrix. For bias, This is the GeLU activation function. To produce high-dimensional output features, this layer increases the physical feature dimension to [missing value]. This improves network convergence speed by 20%; in the example Initialized as a normal distribution with a value of 0.01. Initialize to 0.
[0123] The Fourier operator block is the core iterative unit of the network. The four layers of operator blocks have completely identical structures. The input-output relationship of the l-th layer operator block is as follows: ,in For the first The layer takes input features, K as the global spectral branch, W as the local convolutional branch, and InstanceNorm as the adaptive normalization layer. The GeLU activation function is used; the two branches work together to complete feature extraction, with the global spectral branch capturing the global long-range dependence of the flow field and the local convolutional branch supplementing the loss of high-frequency details caused by frequency domain truncation.
[0124] The global spectral branch K achieves feature extraction by approximation using a frequency domain integral operator, and consists of four steps. The core formulas and parameters are as follows:
[0125] 1. Fast Fourier Transform (RFFT): Input features Transform from the spatial domain to the frequency domain to obtain frequency domain coefficients. , Here, k is the Fourier transform operator, and k is the frequency domain wavenumber.
[0126] 2. Low-frequency mode cutoff and filtering: Only the lowest frequency mode is retained. Each mode will The coefficient is set to 0. Based on the attenuation characteristics of high-frequency components in the flow field, a balance is struck between computational efficiency and simulation accuracy.
[0127] 3. Frequency domain complex weighting: ,in , For learnable complex weight tensors, This is complex tensor multiplication.
[0128] 4. Inverse Fourier Transform (iRFFT): The weighted frequency domain features are then converted back to the spatial domain. For the inverse Fourier transform operator, This is the output feature of the global spectrum branch.
[0129] To address the vanishing complex gradient problem in deep networks, [the following is a summary of the previous sentence]. The complex orthogonal initialization strategy (complex unitary matrix initialization) is adopted, and the steps are as follows:
[0130] 1. Generating a complex Gaussian random matrix: First, generate a matrix with shape... Complex random matrix .
[0131] Its construction method is as follows The real part and the virtual part Each element is independently sampled from a standard normal distribution. .
[0132] 2. Perform complex QR decomposition on the matrix. Perform QR decomposition:
[0133]
[0134] Where: Q is a unitary moment, satisfying . It is an upper triangular matrix.
[0135] 3. Extract and normalize the matrix. As the initial weight matrix To ensure that the modulus of all eigenvalues is strictly 1, it is usually also necessary to... Normalize the diagonal elements:
[0136]
[0137] Local convolution branch ( The purpose of this is to compensate for the loss of high-frequency details (such as shock wavefronts) caused by frequency domain truncation; therefore, it employs... Convolution performs residual connections, the specific calculation formula is as follows: This operation can directly mix channel information in the spatial domain, equivalent to an all-pass filter.
[0138] To accommodate the varying flow rates of different samples, an adaptive normalization layer is applied before the activation function. Its calculation expression is as follows:
[0139] ,in The mean of a single sample space dimension. For the variance of a single sample space dimension, Calculated based solely on the spatial dimension of the current single sample. It is a numerically stable term.
[0140] S105: The surrogate model is trained using a joint optimization objective, wherein the joint optimization objective includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term is used to constrain the model output to approximate the samples in the effective dataset, and the physical constraint term is used to ensure that the model output satisfies the hydrodynamic conservation law.
[0141] Specifically, the joint optimization objective is a hybrid physical loss function, and the overall formula is: ,in This is the data fitting term (weighted mean square error loss). This is the physical constraint term (PDE residual loss). , This is a dynamic balancing coefficient used to adjust the weight ratio between data fitting accuracy and physical conservation constraints. (In implementation...) Fixed at 1.0, The learning strategies are dynamically adjusted through the course.
[0142] Data fitting term The spatially weighted mean square error (MSE) is calculated using a weighting factor of 5 at upstream and downstream boundary nodes (x=0, x=L, corresponding to indices 0 and N-1) to prevent the propagation of boundary errors along the path. All other internal nodes have a weighting factor of 1. The calculation formula is as follows:
[0143]
[0144] in , Let h and Q be the water level and flow rate predicted by the model, and Q be the actual water level and flow rate in the valid dataset. 2 The error is the squared error, and N is the number of discrete grid cells; in implementation, it is simplified to... Single-node error term .
[0145] Physical constraints Based on the residual form of the one-dimensional Saint-Venant equations, the model output partial derivatives with respect to spacetime coordinates are calculated using automatic differentiation techniques to ensure that the model output satisfies mass and momentum conservation. The calculation formula is as follows:
[0146]
[0147] in For the residuals of the continuity equation, The residuals of the momentum equation, Let be the process coordinates of the i-th node; the specific formula for the residual is:
[0148] 1. Residuals of the continuity equation: ;
[0149] 2. Momentum equation residuals: Among them, the riverbed slope (A positive value indicates a downward slope along the river), clarifying the physical relationship that "the bottom slope provides gravitational potential energy and friction consumes energy".
[0150] Calculate the friction gradient in the residuals of the momentum equation To avoid the denominator being zero, a numerical stability constant is added to the denominator term of the Manning formula. The corrected formula is as follows: , This is a correction term for Manning's formula.
[0151] The model training employs a dynamic weighting strategy based on course learning. The adjustment will be carried out in three phases, with a total number of iterations (Epochs) set at 500:
[0152] 1. Phase One (Epoch 0-100): =0, only minimize This allows the model to quickly fit the basic distribution law of the flow field;
[0153] 2. Phase Two (Epoch 101-300): The formula is to increase the value from 0 to 0.5 using linear interpolation. e represents the current iteration round, gradually introducing physical constraints to guide the model to learn conservation laws, and 100 represents the riverbed elevation benchmark value;
[0154] 3. Phase Three (Epochs 301-500): Keeping the value of 0.5 constant balances the accuracy of data fitting with physical consistency.
[0155] Model training is GPU accelerated, the optimizer used is AdamW, and the hyperparameters are configured as follows: initial learning rate value Weight decay coefficient 0.001 (to suppress overfitting), momentum parameter The learning rate adjustment strategy is cosine annealing. =100, minimum learning rate The batch size is set to 64, and the model weights are saved every 10 epochs. An early stopping strategy (Patience=50) is adopted. If the loss on the validation set does not decrease for 50 consecutive epochs, training is stopped. The effective dataset is divided into training and validation sets in an 8:2 ratio. The validation set samples are randomly selected to ensure that the sample distribution is consistent.
[0156] S106: For the target river channel, its entity attributes are converted into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism.
[0157] Specifically, the entity attributes of the target river channel include the actual number of cross-sections M obtained from actual measurements, and the physical coordinates of each cross-section. Geometric parameters (total length) Bottom width ,slope Riverbed elevation ), physical parameters (roughness) ), dynamic state of the flow field (current water depth) ,flow The data includes the upstream and downstream boundary conditions. After obtaining the data, it is necessary to verify and remove abnormal data caused by measurement errors.
[0158] The spatial adaptation mechanism includes three stages: generalized boundary check, terrain change judgment, and virtual-real mapping interpolation. The core is the virtual-real mapping mechanism based on cubic spline interpolation, which maps the entity attributes of the actual cross section to the fixed number of virtual nodes N required by the model (N=50 in implementation).
[0159] The generalized boundary check is used to verify whether the target river parameters are within ±20% of the sampling range of the valid dataset. The sampling range of the valid dataset is: , If the parameters exceed this range, the segmented reasoning mechanism is triggered, dividing the target river into multiple sub-segments. The core parameters of each sub-segment do not exceed the upper limit of the effective dataset sampling and a 20% safety margin is reserved.
[0160] The terrain change determination is for terrain changes such as steep slopes and weirs. If there is a terrain change in the target river channel, cubic spline interpolation will smooth out the change features. In this case, the interpolation method is not used. Instead, the segmented reasoning mechanism is directly triggered to divide the river channel into segments without changes, and then spatial adaptation is performed on each segment.
[0161] The core of virtual-real mapping interpolation is to construct a cubic spline interpolation function, using the physical coordinates of the actual cross-section of the target river channel. With the independent variable being the base width, slope, roughness, and riverbed elevation, and the dependent variable being entity attributes such as base width, slope, roughness, and riverbed elevation, the interpolation function must satisfy the following condition in each sub-interval: The above is a cubic polynomial, continuous over the entire interval with continuous second derivatives, and the interval endpoints satisfy the natural boundary conditions (second derivative is 0); during the interpolation process, it is ensured that the coordinates of the virtual nodes cover the entire length of the target river channel to avoid boundary extrapolation.
[0162] The coordinates of a fixed number of virtual nodes are substituted into the interpolation function to calculate the entity attributes of each virtual node. Then, the virtual node attributes are standardized according to the standardization rule of S103. At the same time, the boundary conditions of the target river are encoded using a hybrid "numerical + label" approach. Finally, the boundary conditions are filled into a structured tensor of dimension (Batch, N, 8), which is the target structured representation that matches the input of the surrogate model.
[0163] S107: Input the target structured representation into the trained surrogate model to perform flow field state deduction, and obtain the flow field state prediction result of the target river channel at future time.
[0164] Specifically, the flow field state deduction adopts a time-step recursive prediction method. The target structured representation is input into the trained PINO network, and the network outputs the water depth changes of N virtual nodes at the next time step. And traffic Q, through The water depth at time t was calculated. This process is repeated to complete the flow field evolution simulation at multiple time points.
[0165] If the target river channel is divided into multiple segments due to parameters exceeding the range or abrupt terrain changes, a segmented inference mechanism using a serial call model is adopted: the entity attributes of each segment are extracted and converted into the corresponding segment target structured representation. The first segment is inferred first, and its outlet node's flow / water level is used as the upstream inlet boundary condition of the second segment. The inference of all segments is completed in sequence. The boundary data between segments are smoothly transitioned through linear interpolation. The interpolation formula is consistent with the time resampling formula of S102 to avoid abrupt changes in the flow field caused by segmentation.
[0166] Before the simulation, extreme scenario adaptation will be performed. If the target river meets the extreme working conditions ( >0.005 indicates a steep slope or (For roughness <0.02), the "high-frequency mode enhancement" strategy is automatically activated, which preserves the number of low-frequency modes in the Fourier operator block. The parameters were increased from 16 to 24, and the batch size during inference was adjusted to 1 to improve the model's accuracy in capturing high-frequency details of rapidly changing flows and improve simulation accuracy under extreme conditions. If the extreme conditions are not met, the default parameters will be used for inference.
[0167] After deriving the flow field states (water level, flow rate) of N virtual nodes, cubic spline back interpolation is used to map the results back to the coordinate positions of M actual cross-sections of the target river channel using the state variables of the virtual nodes as dependent variables and the physical coordinates as independent variables, thus obtaining the flow field state prediction results of each actual cross-section.
[0168] The prediction results can be further processed into flow field evolution curves or exported into a GIS-compatible format for practical applications such as engineering visualization analysis, real-time flood warning, and probabilistic risk analysis in smart water conservancy scenarios.
[0169] In an optional implementation, see Figure 2 As shown, Figure 2 The flowchart of a method for generating a hydrodynamic response sample set according to Embodiment 1 of this application is shown. The method involves sampling river model parameters based on the hydrodynamic control equations to generate a hydrodynamic response sample set covering different combinations of features, including steps S201-S203:
[0170] S201: Construct a one-dimensional hydrodynamic numerical model based on the hydrodynamic control equations, which includes a preset number of discrete grids.
[0171] Specifically, the hydrodynamic governing equations are the one-dimensional Saint-Venant equations, which include the continuity equations. and momentum equation Friction slope By Manning's formula The calculations are performed, and the character definitions are consistent with S101.
[0172] The preset number of discrete grids is N computing segments, and the model contains N+1 nodes. In the implementation, N=50, that is, 50 computing segments and 51 nodes. The model is constructed based on the dynamic wave solution mechanism of the one-dimensional Saint-Venant equations. The spatial discretization scheme adopts the central difference scheme to improve the stability of the model calculation and provide a reliable numerical basis for subsequent batch simulations.
[0173] S202: Random sampling of river channel geometric and physical parameters across a range.
[0174] Specifically, the sampling method is Monte Carlo random sampling of the entire parameter space, with a total of 10,000 samples to ensure full coverage of the parameter space. All geometric parameters adopt a uniform sampling strategy, and physical parameters also adopt uniform sampling.
[0175] River channel geometric parameters include total channel length L, bottom width of cross section B, and riverbed slope. The sampling intervals are set with reference to water conservancy engineering specifications and actual river characteristics: L∈[2000,10000]m, B∈[20,100]m, ∈[0.0005,0.005]; Sampling the L-width span makes the single-segment grid length It dynamically varies between [40, 200] m, covering the conventional discretization accuracy of small and medium-scale rivers.
[0176] The physical parameter of the river channel is the Manning roughness n, and the sampling interval is [0.02, 0.05]. 0.02 corresponds to concrete-lined river channels, and 0.05 corresponds to natural river channels overgrown with weeds, covering the roughness distribution of the main river channel. All parameter combinations are automatically recorded during the sampling process to provide input for subsequent batch simulations.
[0177] S203: Using the sampled geometric parameters and physical parameters as inputs to the basic model, call the numerical solution engine to perform batch simulations and generate the hydrodynamic response sample set.
[0178] Specifically, the numerical solution engine is a dynamic wave numerical solution engine based on the one-dimensional Saint-Venant equations. It can accurately solve the hydraulic response process of the river channel according to the input geometric and physical parameters, and output state variables such as water level and flow rate at each spatiotemporal node.
[0179] During batch simulations, stochastic time-varying boundary conditions are configured for the model: the upstream inlet node generates a stochastic flow process curve conforming to a type P-III distribution, with peak flow range... The process time is uniformly set to 72 hours, and the initial time step is 10 seconds to adapt to the stability requirements of dynamic wave solution. The downstream outlet node randomly selects one of the modes of "fixed water level boundary" (set water level 3.0m, determined based on the average water depth of conventional river cross section) or "free outflow boundary" to make the sample set fit the complex boundary conditions of actual engineering.
[0180] Batch simulations employ a multi-threaded parallel processing approach, automatically modifying the input parameters of the basic model and executing simulations sequentially, significantly improving sampling and simulation efficiency. The simulation outputs are time series of the river hydraulic response under various parameter combinations. All results together constitute a hydrodynamic response sample set covering different feature combinations, which serves as the ground truth label for subsequent neural network training.
[0181] In an optional implementation, see Figure 3 As shown, Figure 3 The flowchart of an effective dataset construction method provided in Embodiment 1 of this application is shown, wherein the step of filtering outlier samples in the hydrodynamic response sample set to obtain an effective dataset for model construction includes steps S301 to S303:
[0182] S301: Based on preset physical rules, each sample in the hydrodynamic response sample set is judged to be abnormal. The physical rules include at least one of numerical stability index, water balance error index and physical rationality index.
[0183] Specifically, the numerical stability index is the Froude number. The calculation formula is: For flow rate, For hydraulic depth, The width of the water surface; the determination rule is: if Frequent high-frequency fluctuations in the non-drop zone ( (>1.5 and the variance is too large), or in the sample If the proportion of time steps >1.5 exceeds 5%, it is judged as a numerically unstable sample.
[0184] The water balance error index is the relative error of water balance. The calculation formula is: , Total inbound traffic throughout the entire period. This represents the total outflow rate over all time periods. The change in stored water volume; the determination rule is: if >5% is considered a numerical divergence sample.
[0185] The physical rationality index includes overflow determination and negative flow determination: overflow determination is based on whether the overflow occurs. make The elevation of the riverbed. The maximum depth of the preset cross-section is used to determine whether it is an overflow sample; negative flow is determined if it exists in the non-return water zone. The threshold for negative flow is used to determine a sample as having negative flow.
[0186] The anomaly detection process iterates through all spatiotemporal nodes of the sample and verifies each of the three types of indicators mentioned above. If any indicator fails to meet the requirements, the sample is determined to be an anomaly, thus ensuring the physical consistency of the filtered samples.
[0187] S302: Remove samples that are judged as abnormal, and keep the samples that pass the abnormality judgment as cleaned samples.
[0188] Specifically, an automated sample screening mechanism is established to perform full-process physical rule verification on each sample in the hydrodynamic response sample set, automatically marking and removing all abnormal samples such as numerically unstable samples, numerically divergent samples, overflow samples, and negative flow samples.
[0189] Only samples that pass all physical rules are retained as cleaned samples. These samples can accurately characterize the actual hydraulic response characteristics of the river channel and have physical consistency and numerical stability. In practice, the effectiveness of the samples after this step is about 75%, which can ensure the sample quality for subsequent model training.
[0190] S303: Perform time-uniform resampling on the cleaned samples, interpolate the original non-uniform time step sequence to a sequence with the target uniform time step, and obtain the effective dataset.
[0191] Specifically, resampling uses a linear interpolation method with a target uniform time step. The time limit is set to 60 seconds to accommodate the time requirements of subsequent model training; the interpolation formula is... ,in Given the original non-uniform time step sequence, t' is the target time and The flow field state quantity (water level or flow rate) at the target time.
[0192] Resampling iterates through the time series of all cleaned samples, converting the original non-uniform time step sequence of each sample into a uniform time step sequence of 60s, ensuring the consistency of all samples in the time dimension.
[0193] After time-uniform resampling, all processed samples together constitute a high-fidelity, effective dataset with physical consistency and spatiotemporal dimension uniformity, which can be directly used for the construction and training of subsequent proxy models.
[0194] In an optional implementation, see Figure 4 As shown, Figure 4 The flowchart of a structured representation encoding method provided in Embodiment 1 of this application is shown. The step of encoding the static attributes and dynamic states of a river channel into a fixed-dimensional structured representation based on the statistical characteristics of the effective dataset and the prior range of physical parameters includes steps S401-S404:
[0195] S401: Construct a structured tensor containing multiple channels as the structured representation, wherein the dimension of the structured tensor is fixed to a preset number of discrete grids.
[0196] Specifically, the structured tensor is an 8-channel 3D tensor with a fixed dimension of (Batch, N, 8), where Batch is the batch size, set to 64 in the implementation; N is the preset number of discrete grids, set to 50 in the implementation, a fixed value for the model training and inference phases; the 8 channels correspond to the normalized coordinate x', the normalized riverbed elevation, and the other two coordinates respectively. Section width B, roughness n, grid size The water depth at the previous moment Flow rate at the previous moment The boundary condition hybrid coding covers all the core factors affecting the hydrodynamic characteristics of the river channel.
[0197] For any number of discrete nodes M in the actual river channel, the virtual-real mapping interpolation mechanism of S106 will be used to map them to a fixed N, ensuring the dimension of the structured tensor is fixed and solving the problem of traditional models being unsuitable for variable-scale grids.
[0198] S402: Determine the statistical characteristics of each physical quantity in the effective dataset, wherein the statistical characteristics include at least one of mean, variance, maximum value and minimum value.
[0199] Specifically, a full statistical analysis is performed on all physical quantities in the valid dataset, covering all samples in the dataset, to ensure that the statistical characteristics can accurately represent the distribution pattern of physical quantities in the entire sample set and avoid standardization errors caused by local sample bias.
[0200] Extracting core statistical features for different types of physical quantities: For riverbed elevation Cross-sectional width B, water depth h, grid size Extract the global maximum value for geometric physical quantities. and global minimum This reflects the range of values for a physical quantity; for dynamic flow field physical quantities such as flow rate Q, in addition to extracting the maximum and minimum values, the mean value is also accurately calculated. and variance This provides key parameters for Z-Score standardization; the statistical characteristics of the flow during implementation are... , .
[0201] The statistical process records the statistical characteristic values of each physical quantity, providing accurate data for the subsequent formulation of standardization rules for each channel.
[0202] S403: Based on the fixed prior range of the statistical features or physical parameters, set corresponding standardization rules for each channel of the structured tensor.
[0203] Specifically, the standardization rules are divided into three categories: linear mapping normalization, Min-Max normalization, and Z-Score standardization. Based on the characteristics of the physical quantities in each channel, engineering requirements, and whether there is a fixed prior range, corresponding rules are adapted for each of the eight channels. The core purpose is to eliminate the difference in magnitude between different physical quantities and avoid gradient imbalance during model training.
[0204] The standardized rules for each channel are set as follows:
[0205] 1. Normalized coordinate x' channel: Normalized using linear mapping, formula The physical coordinates are mapped to the [0,1] interval to eliminate the scale effect of the total river length.
[0206] 2. Riverbed elevation Section width B, grid scale The water depth at the previous moment Channel: Performs Min-Max normalization based on the global maximum and minimum values of the valid dataset, using a general formula. This maps physical quantities to the interval [0,1].
[0207] 3. Roughness n-channel: Min-Max normalization is performed based on a fixed physical prior range [0.01, 0.1], rather than the statistical values of the effective dataset, to avoid normalization anomalies caused by out-of-bounds test set parameters.
[0208] 4. Flow rate at the previous time step Channel: Z-Score standardization is performed based on the mean and variance of the valid dataset. (Formula) It adapts to the dynamic distribution characteristics of traffic.
[0209] 5. Boundary condition hybrid encoding channel: adopts a hybrid encoding rule of "numerical value + label", does not perform conventional normalization, distinguishes upstream and downstream by array subscripts, and fills in the label value or normalized boundary value to ensure that the model can identify the boundary type.
[0210] S404: In accordance with the standardization rules, the static attributes and dynamic states of the river channel are encoded into the corresponding channels of the structured tensor.
[0211] Specifically, before encoding, the static attributes of the river channel (normalized coordinates x', riverbed elevation) are first determined. Section width B, roughness n, grid size ) and dynamic flow field state (water depth at the previous moment) Flow rate at the previous moment The numerical values are converted according to the corresponding standardization rules, and the boundary conditions are mixed and encoded to fill the eight channels of the tensor in sequence.
[0212] Riverbed elevation It needs to be approved first. Calculate the actual elevation of each node. The physical coordinates of the i-th node are then filled after Min-Max normalization; the cross-sectional width B and roughness n are constants that remain unchanged along the path, and a broadcast mechanism is used to fill the entire channel to reduce computational redundancy.
[0213] Boundary condition hybrid coding is performed using a single-point marking strategy: upstream and downstream are distinguished by tensor array subscripts, with index 0 for upstream and index 49 for downstream; the normalized flow value of the next moment is filled in at index 0 of the upstream as the driving force, and if the downstream index 49 is a free outflow, the mark value -1.0 is filled in, and if it is a fixed water level, the water level value after Min-Max normalization is filled in, and all intermediate nodes are filled with 0.
[0214] Once all channels are filled, a standardized, fixed-dimensional structured tensor is formed. This tensor eliminates the differences in physical quantities and can be directly used as input to the surrogate model.
[0215] In an optional implementation, see Figure 5 As shown, Figure 5The flowchart illustrates a target structured representation generation method provided in Embodiment 1 of this application, wherein, for a target river channel, its entity attributes are converted into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism, including steps S501-S503:
[0216] S501: Obtain the actual number of cross-sections of the target river channel and its corresponding entity attributes.
[0217] Specifically, relevant data of the target river channel are obtained through actual engineering measurements. The core data includes the number of actual cross-sections (M) and the physical coordinates of each actual cross-section. And the entity attributes corresponding to each cross section.
[0218] Entity attributes encompass the static geometric attributes of the target river channel (total river length). bottom width of cross section Riverbed slope Riverbed elevation ), physical parameters (Manning roughness) ), dynamic state of the flow field (current water depth) ,flow This also includes key information such as the types of upstream and downstream boundary conditions.
[0219] The acquired entity attributes are validated to remove abnormal data caused by measurement errors, instrument malfunctions, etc., to ensure the accuracy of subsequent mapping and coding.
[0220] S502: Construct an interpolation function using the actual cross-sectional physical coordinates of the target river channel as the independent variable and the entity attribute as the dependent variable.
[0221] Specifically, the interpolation function is constructed using cubic spline interpolation, which provides high interpolation accuracy and ensures the smoothness and continuity of the function across the entire interval.
[0222] The cubic spline interpolation function must satisfy three conditions: ① In each subinterval The above is a cubic polynomial; ② it is continuous over the entire interval and its second derivative is continuous; ③ it satisfies the natural boundary conditions (the second derivative is 0) at the endpoints of the interval.
[0223] During construction, the physical coordinates of each actual cross-section are used. The independent variable is defined as follows, and the dependent variables are entity attributes such as bottom width, slope, roughness, and riverbed elevation. An independent interpolation function is constructed for each entity attribute to ensure the mapping accuracy of each attribute.
[0224] If the target river channel has abrupt terrain changes such as steep banks or weirs, cubic spline interpolation will smooth out the abrupt features. In this case, instead of constructing an interpolation function, the segmented reasoning mechanism is directly triggered to divide the target river channel into multiple segments without abrupt changes, and then an interpolation function is constructed for each segment.
[0225] S503: Using the interpolation function, the entity attributes of the actual cross-section are mapped to a fixed number of virtual nodes required by the proxy model to obtain the target structured representation.
[0226] Specifically, the proxy model requires a fixed number of virtual nodes, N, which is 50 in practice. First, the physical coordinates of N virtual nodes covering the entire length of the target river are generated to avoid errors caused by boundary extrapolation.
[0227] By substituting the coordinates of N virtual nodes into the interpolation function of each entity attribute, the geometric parameters, physical parameters, and dynamic state of the flow field of each virtual node are calculated, thus completing the virtual-real mapping from the actual cross section M to the virtual node N.
[0228] The mapped virtual node attributes are standardized and converted throughout the entire process according to the standardization rules set in S403. At the same time, the boundary conditions of the target river are encoded using a hybrid "numerical + label" approach.
[0229] The standardized attributes and boundary codes are sequentially filled into the corresponding channels of the 8-channel structured tensor to form a tensor with dimensions (Batch, N, 8). This tensor is the target structured representation that matches the input requirements of the surrogate model.
[0230] In an optional implementation, the physical constraint term in the joint optimization objective is dynamically constructed during training as the surrogate model parameter states change. Specifically, its construction method is as follows:
[0231] Based on the residual form of the hydrodynamic control equations, the partial derivatives of the current output of the surrogate model with respect to the input dimension are calculated using automatic differentiation techniques to obtain the physical constraint terms corresponding to the current model state.
[0232] Specifically, the hydrodynamic governing equations are a set of one-dimensional Saint-Venant equations, and their residual form includes the residuals of the continuity equations. and momentum equation residuals The formula is , Among them, the riverbed slope The character definitions are consistent with S101.
[0233] Calculate the friction gradient in the residuals of the momentum equation When adding a numerical stability constant To avoid a denominator of 0, the corrected formula is as follows: .
[0234] Automatic differentiation technology is applied directly to the network structure of the surrogate model. Based on the current parameter state of the model, it automatically calculates the flow field state variables such as water depth and flow rate in relation to the spatiotemporal coordinates. The first-order partial derivatives, such as All partial derivatives are calculated automatically by the network, without the need for manual derivation.
[0235] Substituting the partial derivatives obtained through automatic differentiation into the residual formula of the Saint-Venant equations, the results for each spatiotemporal node are calculated. and Then, the mean square error of the residuals at all nodes is calculated to obtain the physical constraint term. The loss value is the physical constraint term corresponding to the current model parameter state.
[0236] As model training progresses and model parameters are continuously updated, automatic differentiation techniques calculate partial derivatives under the new parameter states in real time and recalculate the residuals accordingly. This enables the dynamic construction of physical constraints, ensuring that physical constraints always match the current state of the model.
[0237] In an optional implementation, see Figure 6 As shown, Figure 6 A flowchart of a hyperparameter configuration optimization method provided in Embodiment 1 of this application is shown, wherein the method includes steps S601 to S603:
[0238] S601: Before inputting the target structured representation into the trained surrogate model, the entity attributes of the target river are compared with the parameter range of the valid dataset to perform a generalization boundary check.
[0239] Specifically, the core validation parameter for generalized boundary checks is the core entity attribute of the target river channel: total river length. bottom width of cross section Riverbed slope Manning roughness .
[0240] The parameter range of the valid dataset is the uniform sampling interval set during sampling: L∈[2000,10000]m, B∈[20,100]m, ∈[0.0005,0.005], n∈[0.02,0.05]; the judgment threshold for the check is ±20% of the effective dataset parameter range.
[0241] The inspection process compares the attribute values of each entity in the target river channel with the upper and lower limits of the effective dataset parameter range, and calculates the proportion of attribute values that exceed the range. If all attribute values are within the ±20% threshold range, the generalization boundary check is passed, and the target structured representation can be directly input for inference. If any attribute value exceeds the threshold, the check is not passed, and the subsequent segmented inference mechanism is triggered.
[0242] S602: If the entity attributes of the target river exceed the preset threshold of the parameter range of the effective dataset, the segmented reasoning mechanism is triggered to divide the target river into multiple sub-segments along the flow. The entity attributes of each sub-segment are converted into the target structured representation and then input into the proxy model for reasoning. The reasoning result of the previous sub-segment is used as the boundary condition of the next sub-segment.
[0243] Specifically, the preset threshold is ±20% of the effective dataset parameter range. The segmentation principle of the segmented reasoning mechanism is: the core attributes of the sub-segment (such as the total length L) do not exceed the upper limit of the effective dataset parameter range, and a 20% safety margin is reserved; the sub-segment length of medium and long river channels is ≤8000m (the upper limit of the effective dataset L is 10000m).
[0244] The target river channel is divided into multiple continuous segments along the flow direction. The independent entity attributes (total length, slope, bottom width, roughness, etc.) of each segment are extracted, and steps S501 to S503 are performed for each segment to convert it into the corresponding segment target structured representation.
[0245] The inference adopts a serial calling model: first, the flow field is simulated for the first sub-segment to obtain the flow rate and water level values at its outlet node; this value is used as the upstream inlet boundary condition for the second sub-segment, and then the second sub-segment is simulated; and so on, to complete the inference for all sub-segments.
[0246] The boundary data between sub-segments is smoothly transitioned using linear interpolation, with the interpolation formula being: This avoids abrupt changes in the flow field caused by river channel segmentation, ensuring the continuity and accuracy of the overall simulation results.
[0247] S603: And / or, if the entity attributes of the target river channel meet the preset extreme working conditions, the hyperparameter configuration of the proxy model is dynamically adjusted, and inference is performed with the adjusted hyperparameter configuration.
[0248] Specifically, the preset extreme operating conditions are that the target river channel is a steep slope or a low roughness channel, and the judgment criteria are as follows: >0.005 (steep slope) or With a roughness coefficient <0.02, these types of waterways are prone to rapid flow changes, and conventional hyperparameter configurations are insufficient to guarantee simulation accuracy.
[0249] The dynamically adjusted hyperparameters are the core parameters of the Fourier operator block in the surrogate model. Activating the "high-frequency mode enhancement" strategy will increase the number of low-frequency modes retained in the global spectral branch. The number of parameters has been increased from the default 16 to 24, improving the model's ability to capture high-frequency details in rapidly changing flow.
[0250] To further improve the accuracy of capturing high-frequency features, the BatchSize during inference was adjusted from the normal value (64) to 1, so that the model could focus on the refined inference of a single sample.
[0251] Hyperparameter tuning is automated: the model first predicts whether the target river channel meets extreme working conditions; if so, it automatically modifies the parameters. The BatchSize is then used to input the target structured representation for recursive deduction of the flow field state. If the target river channel does not meet the extreme working conditions, the default hyperparameter configuration of the model is used directly to perform inference without the need for parameter adjustment.
[0252] Regardless of whether the hyperparameters are adjusted, after the simulation is completed, the flow field state results of the virtual nodes will be mapped back to the actual cross-sectional coordinates of the target river channel through cubic spline back interpolation. This will yield the predicted flow field state results such as water level and flow rate of each actual cross-section, ensuring that the results match the cross-sections measured in actual engineering. The results can then be directly used for subsequent engineering analysis and applications.
[0253] For a better explanation of the determination of the river flow field state provided in this application, see [link to relevant documentation]. Figure 7 As shown, Figure 7 The diagram shows the overall flowchart of a flow field state prediction method based on a physically enhanced surrogate model provided in Embodiment 1 of this application. The process is divided into five core stages, and the stages and sub-steps are as follows:
[0254] 1.S1: Constructing a parameterized chained discrete data generator
[0255] Step 1: Monte Carlo random sampling (L,B,S0,n) is performed to randomly sample all parameters in space for the total length of the river channel L, the bottom width of the cross section B, the riverbed slope S0, and the Manning roughness n.
[0256] Step 2: Batch simulation of dynamic wave numerical engine (Saint-Venant equations). Input the sampled parameters into the dynamic wave numerical solution engine based on the Saint-Venant equations to generate hydrodynamic response samples.
[0257] Step 3: Physical rule data cleaning (Fr stability, mass conservation), removing outlier samples based on physical rules such as Froude number stability and mass conservation;
[0258] Step 4: Time uniform resampling (Δt=60s) interpolates the original non-uniform time step sequence into a uniform time step sequence of Δt=60s to obtain the effective dataset.
[0259] 2.S2: Constructing a multi-channel input tensor with full physical constraints
[0260] Geometric / physical property normalization (Min-Max / Z-Score) standardizes the geometric properties, physical parameters and flow field state of the river channel based on the statistical characteristics of the effective dataset or the physical prior range.
[0261] An 8-channel tensor (Batch, 50, 8) [x, Z, B, n, Δx, h, Q, BC] is constructed, encoding the normalized attributes into a multi-channel structured tensor with fixed dimensions. The channels are, in order, normalized coordinate x, riverbed elevation Z, cross-sectional bottom width B, roughness n, grid scale Δx, water depth h, flow rate Q, and boundary condition BC.
[0262] 3.S3: Building the PINA network architecture
[0263] The progressive feature enhancement layer (Linear->GeLU->Linear) maps low-dimensional input features to a high-dimensional latent space through two-layer linear transformation and GeLU activation.
[0264] Fourier operator block (4 layers) (global spectrum + local convolution) contains 4 stacked Fourier operator blocks. The global spectrum branch captures the global long-range dependence of the flow field, and the local convolution branch supplements high-frequency details.
[0265] The decoding projection layer (output Δh, Q) maps high-dimensional features to water depth change Δh and flow rate Q, thereby enabling flow field state prediction.
[0266] 4.S4: Optimization Training Based on Hybrid Physical Loss
[0267] Automatic differentiation is used to calculate the physical residuals (mass / momentum conservation). Based on the residual form of the Saint-Venant equations, the physical residuals output by the model are calculated using automatic differentiation techniques.
[0268] Hybrid loss function (L data +λ·L PDE ), by the data fitting term L data and physical constraint term L PDE The composition is balanced by a dynamic weight λ.
[0269] The course learning strategy (dynamic weight λ) adjusts λ in stages, first quickly fitting the flow field distribution, and then gradually introducing physical constraints.
[0270] 5.S5: Spatial Adaptive Reasoning and Applications
[0271] For the new river channel to be tested, input the entity attributes of the target river channel;
[0272] Generalization check & extreme scenario adaptation: verify whether the target river parameters are within the range of the training set parameters, and dynamically adjust hyperparameters for extreme working conditions.
[0273] Virtual-real mapping (cubic spline interpolation) maps the actual cross-sectional properties to the fixed virtual nodes required by the model through cubic spline interpolation;
[0274] The recursive prediction and result reconstruction method uses a time-step recursive approach to perform flow field simulation and maps the virtual node results back to the actual cross-section to obtain the final prediction result.
[0275] In addition, see Figure 8 As shown, Figure 8 The diagram illustrates the core architecture and physical constraint mechanism of a physical information neural operator network provided in Embodiment 1 of this application. The modules and their connections are as follows:
[0276] Input tensor: multi-channel structured data with dimensions (Batch, 50, 8) containing river channel geometric properties, physical parameters, and flow field state;
[0277] Feature enhancement layer P: adopts a Linear (8->64) structure to map the input 8-dimensional physical features into 64-dimensional high-dimensional latent features, thus solving the problem of low-dimensional information sparsity.
[0278] Fourier operator block (x4 layers): The core iterative unit of the network, containing 4 operator blocks with the same structure. Each operator block consists of bi-branch feature extraction and normalized activation.
[0279] Global Spectrum Branch: Executes RFFT (Fast Fourier Transform), spectral filtering & multiplication (R(k)·v(k), k) sequentially. max =16, retaining only the minimum 16 low-frequency modes), iRFFT (inverse Fourier transform), to capture the global long-range dependence of the flow field;
[0280] Local convolution branch W: adopts a Conv1d(1x1) structure to compensate for the loss of high-frequency details caused by frequency domain truncation;
[0281] After summing the outputs of both branches, the results are processed by InstanceNorm (adaptive normalization) and the GeLU activation function.
[0282] Decoding projection layer Q: adopts a Linear->Linear structure to map high-dimensional features into two-dimensional outputs, corresponding to the water depth change Δh and the flow rate Q, respectively;
[0283] Physical constraint module: Calculates the partial derivatives of the model output with respect to spacetime coordinates using automatic differentiation techniques. The residuals of the Saint-Venant equation are obtained and used to construct the physical constraint loss term. The dashed arrows indicate the relationship between the physical constraint module and the network input and output.
[0284] Output: The network ultimately outputs the water depth change Δh and the flow rate Q, which are used for flow field state prediction.
[0285] Example 2
[0286] See Figure 9 As shown, Figure 9 The diagram shows a structural schematic of a river flow field state determination device according to Embodiment 2 of this application, wherein the device includes:
[0287] The sample set generation module 901 is used to sample the parameters of the river channel model based on the hydrodynamic control equation and generate a hydrodynamic response sample set covering different combinations of features.
[0288] The dataset construction module 902 is used to filter out abnormal samples in the hydrodynamic response sample set to obtain a valid dataset for model construction.
[0289] The structured representation generation module 903 is used to encode the static attributes and dynamic states of the river channel into a structured representation with fixed dimensions based on the statistical characteristics and prior range of physical parameters of the effective dataset.
[0290] The proxy model construction module 904 is used to construct a physically enhanced proxy model, wherein the proxy model takes the structured representation with fixed dimensions as input and is used to learn the mapping relationship from the current flow field state to the future flow field state.
[0291] The surrogate model training module 905 is used to train the surrogate model using a joint optimization objective, wherein the joint optimization objective includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term is used to constrain the model output to approximate the samples in the effective dataset, and the physical constraint term is used to ensure that the model output satisfies the hydrodynamic conservation law.
[0292] The structured representation conversion module 906 is used to convert the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism.
[0293] The prediction result generation module 907 is used to input the target structured representation into the trained surrogate model to perform flow field state deduction and obtain the flow field state prediction result of the target river channel at future time.
[0294] In an optional implementation, the sampling of river model parameters based on the hydrodynamic control equations to generate a hydrodynamic response sample set covering different combinations of features includes:
[0295] A one-dimensional hydrodynamic numerical model containing a preset number of discrete grids is constructed based on the hydrodynamic control equations.
[0296] Random sampling of river channel geometric and physical parameters across a wide range;
[0297] The sampled geometric and physical parameters are used as inputs to the basic model, and a numerical solution engine is invoked to perform batch simulations to generate the hydrodynamic response sample set.
[0298] In an optional implementation, the step of filtering outlier samples in the hydrodynamic response sample set to obtain a valid dataset for model construction includes:
[0299] Anomaly determination is performed on each sample in the hydrodynamic response sample set based on preset physical rules, the physical rules including at least one of numerical stability index, water balance error index and physical rationality index.
[0300] Remove the samples that are judged to be abnormal, and keep the samples that pass the abnormality judgment as the cleaned samples;
[0301] The cleaned samples are uniformly resampled in time, and the original non-uniform time step sequence is interpolated into a sequence with a target uniform time step to obtain the effective dataset.
[0302] In an optional implementation, encoding the static attributes and dynamic states of the river channel into a fixed-dimensional structured representation based on the statistical characteristics and prior ranges of the physical parameters of the effective dataset includes:
[0303] A structured tensor containing multiple channels is constructed as the structured representation, and the dimension of the structured tensor is fixed to a preset number of discrete grids;
[0304] Determine the statistical characteristics of each physical quantity in the effective dataset, wherein the statistical characteristics include at least one of mean, variance, maximum value and minimum value;
[0305] Based on the fixed prior range of the statistical features or physical parameters, a corresponding standardization rule is set for each channel of the structured tensor.
[0306] According to the standardization rules, the static attributes and dynamic states of the river channel are encoded into the corresponding channels of the structured tensor.
[0307] In an optional implementation, the step of converting the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism includes:
[0308] Obtain the actual number of cross-sections of the target river channel and their corresponding entity attributes;
[0309] An interpolation function is constructed using the actual cross-sectional physical coordinates of the target river channel as the independent variable and the entity attributes as the dependent variable.
[0310] Using the interpolation function, the entity attributes of the actual cross-section are mapped to a fixed number of virtual nodes required by the proxy model to obtain the target structured representation.
[0311] In an optional implementation, the physical constraint term in the joint optimization objective is dynamically constructed during training as the surrogate model parameter states change. Specifically, its construction method is as follows:
[0312] Based on the residual form of the hydrodynamic control equations, the partial derivatives of the current output of the surrogate model with respect to the input dimension are calculated using automatic differentiation techniques to obtain the physical constraint terms corresponding to the current model state.
[0313] In an optional implementation, the apparatus includes a generalization boundary checking module for:
[0314] Before inputting the target structured representation into the trained surrogate model, the entity attributes of the target river are compared with the parameter range of the valid dataset to perform a generalization boundary check.
[0315] If the entity attributes of the target river exceed the preset threshold of the parameter range of the effective dataset, the segmented reasoning mechanism is triggered, the target river is divided into multiple sub-segments along the flow, the entity attributes of each sub-segment are converted into the target structured representation and then input into the proxy model for reasoning, and the reasoning result of the previous sub-segment is used as the boundary condition of the next sub-segment.
[0316] And / or,
[0317] If the entity attributes of the target river channel meet the preset extreme working conditions, the hyperparameter configuration of the proxy model is dynamically adjusted, and inference is performed with the adjusted hyperparameter configuration.
[0318] Example 3
[0319] Based on the same application concept, see [link / reference] Figure 10 As shown, Figure 10 This illustration shows a structural schematic diagram of a computer device provided in Embodiment 3 of this application, wherein, as shown... Figure 10As shown, the computer device 1000 provided in Embodiment 3 of this application includes:
[0320] The system includes a processor 1001, a memory 1002, and a bus 1003. The memory 1002 stores machine-readable instructions executable by the processor 1001. When the computer device 1000 is running, the processor 1001 and the memory 1002 communicate via the bus 1003. When the machine-readable instructions are executed by the processor 1001, they perform the steps of the river flow field state determination method shown in Embodiment 1 above.
[0321] Example 4
[0322] Based on the same concept, this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the river flow field state determination method described in any of the above embodiments.
[0323] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0324] The computer program product for determining the state of a river flow field provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0325] The river flow field state determination device provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0326] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0327] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0328] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0329] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0330] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0331] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A method for determining the state of a river flow field, characterized in that, The method includes: Based on the hydrodynamic control equations, the parameters of the river channel model are sampled to generate a hydrodynamic response sample set covering different combinations of features; Abnormal samples in the hydrodynamic response sample set are filtered to obtain a valid dataset for model construction; Based on the statistical characteristics of the effective dataset and the prior range of physical parameters, the static attributes and dynamic states of the river channel are encoded into a structured representation with fixed dimensions. A physically enhanced surrogate model is constructed, wherein the surrogate model takes a structured representation with a fixed dimension as input and is used to learn the mapping relationship from the current flow field state to the future flow field state. The surrogate model is a physical information neural operator network, including: a progressive feature enhancement layer, used to map the low-dimensional features of the input to a high-dimensional latent space; stacked Fourier operator blocks, each Fourier operator block containing a global spectral branch and a local convolutional branch, wherein the global spectral branch is used to capture the global long-range dependency of the flow field, and the local convolutional branch is used to supplement the high-frequency detail loss; and a decoding projection layer, used to output the flow field state prediction result. The surrogate model is trained using a joint optimization objective, wherein the joint optimization objective includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term is used to constrain the model output to approximate the samples in the effective dataset, and the physical constraint term is used to ensure that the model output satisfies the hydrodynamic conservation law. For the target river channel, its entity attributes are converted into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism; The target structured representation is input into the trained surrogate model to perform flow field state deduction, and the flow field state prediction results of the target river channel at future time are obtained.
2. The method according to claim 1, characterized in that, The sampling of river channel model parameters based on hydrodynamic control equations generates a hydrodynamic response sample set covering different combinations of features, including: A one-dimensional hydrodynamic numerical model containing a preset number of discrete grids is constructed based on the hydrodynamic control equations. Random sampling of river channel geometric and physical parameters across a wide range; The sampled geometric and physical parameters are used as inputs to the basic model, and a numerical solution engine is invoked to perform batch simulations to generate the hydrodynamic response sample set.
3. The method according to claim 1, characterized in that, The process of filtering out anomalies in the hydrodynamic response sample set to obtain a valid dataset for model construction includes: Anomaly determination is performed on each sample in the hydrodynamic response sample set based on preset physical rules. The physical rules include numerical stability index, water balance error index and physical rationality index. If any index fails to meet the requirements, it is determined to be an abnormal sample. Remove the samples that are judged to be abnormal, and keep the samples that pass the abnormality judgment as the cleaned samples; The cleaned samples are uniformly resampled in time, and the original non-uniform time step sequence is interpolated into a sequence with a target uniform time step to obtain the effective dataset.
4. The method according to claim 1, characterized in that, The step of encoding the static attributes and dynamic states of the river channel into a fixed-dimensional structured representation based on the statistical characteristics and prior range of physical parameters of the effective dataset includes: A structured tensor containing multiple channels is constructed as the structured representation, and the dimension of the structured tensor is fixed to a preset number of discrete grids; Determine the statistical characteristics of each physical quantity in the effective dataset, wherein, for geometric physical quantities, the statistical characteristics include the maximum and minimum values; for dynamic flow field physical quantities, the statistical characteristics include the mean, variance, maximum and minimum values; Based on the fixed prior range of the statistical features or physical parameters, a corresponding standardization rule is set for each channel of the structured tensor. According to the standardization rules, the static attributes and dynamic states of the river channel are encoded into the corresponding channels of the structured tensor.
5. The method according to claim 1, characterized in that, The process of converting the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism includes: Obtain the actual number of cross-sections of the target river channel and their corresponding entity attributes; An interpolation function is constructed using the actual cross-sectional physical coordinates of the target river channel as the independent variable and the entity attributes as the dependent variable. Using the interpolation function, the entity attributes of the actual cross-section are mapped to a fixed number of virtual nodes required by the proxy model to obtain the target structured representation.
6. The method according to claim 1, characterized in that, The physical constraint term in the joint optimization objective is dynamically constructed during training as the surrogate model parameter state changes. Specifically, its construction method is as follows: Based on the residual form of the hydrodynamic control equations, the partial derivatives of the current output of the surrogate model with respect to the input dimension are calculated using automatic differentiation techniques to obtain the physical constraint terms corresponding to the current model state.
7. The method according to claim 1, characterized in that, The method includes: Before inputting the target structured representation into the trained surrogate model, the entity attributes of the target river are compared with the parameter range of the valid dataset to perform a generalization boundary check. If the entity attributes of the target river exceed the preset threshold of the parameter range of the effective dataset, the segmented reasoning mechanism is triggered, the target river is divided into multiple sub-segments along the flow, the entity attributes of each sub-segment are converted into the target structured representation and then input into the proxy model for reasoning, and the reasoning result of the previous sub-segment is used as the boundary condition of the next sub-segment. And / or, If the entity attributes of the target river channel meet the preset extreme working conditions, the hyperparameter configuration of the proxy model is dynamically adjusted, and inference is performed with the adjusted hyperparameter configuration.
8. A device for determining the state of a river flow field, characterized in that, The device includes: The sample set generation module is used to sample the parameters of the river channel model based on the hydrodynamic control equations and generate a hydrodynamic response sample set covering different combinations of features. The dataset construction module is used to filter out abnormal samples in the hydrodynamic response sample set to obtain a valid dataset for model construction. The structured representation generation module is used to encode the static attributes and dynamic states of the river channel into a fixed-dimensional structured representation based on the statistical characteristics and prior range of physical parameters of the effective dataset. A surrogate model construction module is used to construct a physically enhanced surrogate model. The surrogate model takes a fixed-dimensional structured representation as input and learns the mapping relationship from the current flow field state to the future flow field state. The surrogate model is a physical information neural operator network, including: a progressive feature enhancement layer for mapping low-dimensional input features to a high-dimensional latent space; stacked Fourier operator blocks, each containing a global spectral branch and a local convolutional branch. The global spectral branch is used to capture the global long-range dependencies of the flow field, and the local convolutional branch is used to supplement high-frequency detail loss; and a decoding projection layer for outputting the flow field state prediction result. The surrogate model training module is used to train the surrogate model using a joint optimization objective, wherein the joint optimization objective includes a data fitting term and a physical constraint term based on the hydrodynamic control equation. The data fitting term is used to constrain the model output to approximate the samples in the effective dataset, and the physical constraint term is used to ensure that the model output satisfies the hydrodynamic conservation law. The structured representation conversion module is used to convert the entity attributes of the target river channel into a target structured representation that matches the fixed-dimensional structured representation through a spatial adaptation mechanism. The prediction result generation module is used to input the target structured representation into the trained surrogate model to perform flow field state deduction and obtain the flow field state prediction result of the target river channel at future time.
9. A computer device, characterized in that, include: The system includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the method for determining the river flow field state as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for determining the river flow field state as described in any one of claims 1 to 7.
Citation Information
Patent Citations
CN120508997A
CN120524818A