A method for predicting water dynamics in a bay based on a hybrid fourier neural architecture

By employing a hybrid Fourier neural architecture approach, combining graph neural networks and temporal convolutional networks, the problems of high computational cost and low efficiency in bay hydrodynamic simulation are addressed, achieving efficient and accurate hydrodynamic prediction and supporting the sustainable development of the bay area.

CN121543043BActive Publication Date: 2026-05-08XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN UNIV
Filing Date
2026-01-20
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies are computationally expensive and inefficient in simulating the hydrodynamics of the bay, making it difficult to achieve rapid predictions with high spatiotemporal resolution. Traditional neural networks are insufficient in capturing complex spatiotemporal features, and their prediction accuracy is difficult to meet practical needs.

Method used

A hybrid Fourier neural architecture-based approach is adopted, which combines graph neural networks and temporal convolutional networks with Fourier neural operator networks to construct a bay hydrodynamic prediction model. The Delaunay triangulation algorithm is used to process the grid topology relationship, and a loss function is defined in combination with physical knowledge for training, so as to achieve efficient capture of complex spatiotemporal features and long-term time series prediction.

Benefits of technology

It significantly improves the efficiency and accuracy of bay hydrodynamic prediction, can generate high-resolution dynamic fields, provides reliable dynamic input for bay water quality and ecological models, and supports rapid scenario analysis and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543043B_ABST
    Figure CN121543043B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on hybrid fourier neural architecture's gulf hydrodynamic prediction method, belong to hydrodynamic prediction technical field, the method includes data conversion, data preprocessing, topological relationship construction, feature extraction and fusion, model construction and training and prediction etc. steps, by modified trim2nc data packet conversion data format, static and dynamic feature dataset are obtained after preprocessing;Grid topological relationship is constructed using Delaunay triangulation algorithm;Space and time characteristics are extracted and fused respectively by graph neural network, time convolution network;Combining with the ability of Fourier neural operator network with processing irregular geometric boundary is calculated in frequency domain, coupled physical knowledge defines loss function training model, finally realizes gulf hydrodynamic fast and accurate prediction;The application solves the problems of high cost and low efficiency of traditional hydrodynamic model calculation, and considers the prediction accuracy and efficiency, which can provide reliable basis for gulf water environment management and planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hydrodynamic prediction technology, specifically relating to a method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture. Background Technology

[0002] As a crucial area where land and sea meet, the bay possesses significant economic value and ecological functions. It is not only a core region for maintaining biodiversity and ecological balance but also a hotspot for economic activities such as mariculture and shipping, playing a profound role in the region's sustainable development. Bay hydrodynamic processes form the basis for constructing water quality and ecological models. With the increasing development and utilization of bay areas, the need for timely and high-resolution prediction of hydrodynamic behavior is becoming increasingly urgent. Conducting efficient and accurate bay hydrodynamic modeling research to achieve rapid dynamic prediction has become an important task in the field.

[0003] Currently, in the field of Gulf hydrodynamic simulation, although various modeling software such as Delft3D, MIKE, and ROMs are widely used, these traditional methods have obvious limitations: in order to achieve high spatiotemporal resolution, the model often needs to be divided into dense computational grids, and the conditions that must be followed to ensure numerical stability strictly limit the time step. Both of these factors result in huge computational overhead and long simulation time, making it difficult to support rapid scenario analysis and optimization in management decision-making.

[0004] Hydrodynamic surrogate models based on neural network architecture offer a feasible solution for long-term, high-precision hydrodynamic prediction in bays due to their low computational cost and high simulation accuracy. However, the output data of traditional process models typically exhibit strong spatial characteristics and long-term temporal features. Conventional neural networks are insufficient in effectively capturing such complex spatiotemporal features, resulting in limited model learning capabilities and prediction accuracy that fails to meet practical requirements.

[0005] Therefore, there is an urgent need for a hydrodynamic prediction method that can efficiently capture the complex spatiotemporal characteristics of the hydrodynamic process in the bay, while taking into account both prediction accuracy and efficiency, in order to solve the problems existing in the current technology. Summary of the Invention

[0006] To address the aforementioned issues, this invention proposes a bay hydrodynamic prediction method based on a hybrid Fourier neural architecture. This method overcomes the bottleneck problems of high computational cost and low efficiency in traditional hydrodynamic models. While maintaining high accuracy and high spatiotemporal resolution, it significantly improves simulation speed and efficiently generates long-term, high-resolution hydrodynamic fields. This provides reliable and efficient dynamic input for bay water quality models, ecological models, and other applications, and has promising prospects for widespread application.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] A method for predicting the hydrodynamics of a bay based on a hybrid Fourier neural architecture includes the following steps:

[0009] S1. Modify the trim2nc data packet and use the modified trim2nc data packet to convert the output file of the hydrodynamic model into a .nc file readable by Python software;

[0010] S2. Read the converted .nc file and preprocess the data to obtain a three-dimensional static feature dataset and a four-dimensional dynamic feature dataset;

[0011] S3. Based on the geometric center of the grid cell, the Delaunay triangulation algorithm is used, combined with the four-way connectivity or eight-way connectivity criterion, to transform the implicit grid topology into an explicit graph structure and construct the adjacency matrix.

[0012] S4. Construct a graph neural network and input the 3D static feature dataset and grid topology into the graph neural network to learn spatial topology and extract features.

[0013] S5. Construct a temporal convolutional network and input the four-dimensional dynamic feature dataset into the temporal convolutional network for time series feature extraction and integration.

[0014] S6. Integrate the output features of graph neural networks and temporal convolutional networks to form a unified multi-feature representation;

[0015] S7. Construct a Fourier neural operator network capable of handling irregular geometric boundaries, and input the fused features into the Fourier neural operator network for frequency domain hybrid calculation.

[0016] S8. Couple physical knowledge, define a loss function, use a three-dimensional static feature dataset, grid topology relationship and four-dimensional dynamic feature dataset as input data, and use the flow velocity and water level corresponding to each grid at the prediction time as output labels to train a two-dimensional hydrodynamic prediction model for the bay.

[0017] S9. Input the global feature data to be predicted into the trained two-dimensional hydrodynamic prediction model of the bay, and output the hydrodynamic prediction result of the bay.

[0018] Preferably, in step S1, the modification process of the trim2nc data packet is as follows: the unmodified trim2nc data packet is compiled and run based on MATLAB software, and after modification, it is adapted to run in Python software, and data conversion code for grid position, flow velocity, bottom friction coefficient, and terrain elevation is added; the hydrodynamic model is a Delft3D model, and the output file is in .dat format.

[0019] Preferably, step S2 specifically includes:

[0020] S21. Data Reading: The converted .nc file is read using Python software to obtain the global feature data output by the hydrodynamic model. The global feature data includes the friction coefficient, flow velocity, water level, topographic elevation, land and sea properties, wind stress, tide and runoff data acting on the whole, corresponding to each grid.

[0021] S22. Data preprocessing: The read data is cleaned, missing values ​​are filled, outliers are handled, and normalization is performed.

[0022] S23. Dataset Partitioning: The friction coefficient, terrain elevation, and land-sea attributes corresponding to each grid are used as a three-dimensional static feature dataset, resulting in a tensor of shape [H,W,C1], where H represents the number of horizontal grids, W represents the number of vertical grids, and C1 represents the number of static features; the flow velocity, water level, and global external driving conditions corresponding to each grid are used as a four-dimensional dynamic feature dataset, resulting in a tensor of shape [T1,X,Y,C2], where T1 is the input time step, X represents the horizontal relative coordinate, Y represents the vertical relative coordinate, and C2 represents the number of dynamic features.

[0023] Preferably, in step S3, four-way connectivity means that each grid is connected to its four adjacent grids (up, down, left, and right); eight-way connectivity means that each grid is connected to its eight adjacent grids (up, down, left, right, and diagonal), and the corresponding position in the adjacency matrix is ​​marked as 1 to indicate its spatial connectivity. The implementation process of the Delaunay triangulation algorithm is as follows: construct a large triangle containing all grids, repeatedly insert the center point of the inner grid to split the triangle, flip the edges to make the small triangles satisfy the Delaunay triangulation condition, remove the outer triangle, and mark the grids corresponding to the three vertices of the subdivided small triangles as 1 in the corresponding position in the adjacency matrix to indicate its spatial connectivity.

[0024] Preferably, the specific process of step S4 is as follows:

[0025] S41. Construct a graph neural network by inputting the three-dimensional static feature dataset and grid topology into the graph neural network, performing spatial topology learning and feature extraction, and obtaining a tensor of shape [X,Y,C5].

[0026] S42. Add a time dimension to boost the output data of the graph neural network to four dimensions, resulting in a tensor of shape [T2,X,Y,C5], which is used to align with the four-dimensional dynamic feature data dimension of the output of the subsequent temporal convolutional network; where C5 represents the number of features output by the graph neural network and T2 represents the number of time steps after augmentation.

[0027] Preferably, in step S5, the temporal convolutional network includes parallel global temporal convolutional network paths and node-by-node temporal convolutional network paths, used to process global dynamic feature input and dynamic feature input corresponding to each grid node, respectively; the specific process of step S5 is as follows: construct a temporal convolutional network, input the four-dimensional dynamic feature dataset into the temporal convolutional network, perform time series feature extraction and integration, and compress the time step T1 into T2 to obtain a tensor of shape [T2,X,Y,C6]; where C6 represents the number of features output by the temporal convolutional network.

[0028] Preferably, the specific process of step S6 is as follows: the tensor of shape [T2,X,Y,C5] output by the graph neural network and the tensor of shape [T2,X,Y,C6] output by the temporal convolutional network are concatenated and fused to form a unified multi-feature representation, resulting in a tensor of shape [T2,X,Y,C7], which is used as the input for subsequent Fourier neural operator calculation; where C7 represents the number of features after fusion, C7=C5+C6.

[0029] Preferably, in step S7, the Fourier neural operator network includes a physical space encoder, a geometric deformation mapping network, stacked Fourier layers, a geometric deformation inverse mapping network, and a physical space decoder connected in sequence.

[0030] The physical space encoder consists of a fully connected layer, which receives the fused two-dimensional hydrodynamic feature tensor of the bay with spatiotemporal characteristics, projects the two-dimensional hydrodynamic feature tensor of the bay to a higher feature dimension, and outputs a high-dimensional encoded tensor; the format of the high-dimensional encoded tensor is [T2,X,Y,C3], where C3 represents the number of channels of the high-dimensional encoded tensor;

[0031] The geometric deformation mapping network is used to map a complex and irregular physical domain to a simple and regular computational domain, transforming the tensor format into [T2,H1,W1,C3] to adapt to the computation of Fourier neural operators on a regular domain, where H1 represents the number of latitude grid points in the computational domain and W1 represents the number of longitude grid points in the computational domain.

[0032] The stacked Fourier layers are used to receive high-dimensional encoded tensors, achieve spatial mixing through global convolution in the frequency domain, and achieve channel mixing by combining linear transformation, outputting the mixed tensor. Specifically, the steps include:

[0033] S71. Frequency domain transformation and truncation: Perform a Fourier transform on the tensor of shape [T2,H1,W1,C3] along the horizontal direction, retain the first N1 frequency components along the height direction and the first N2 frequency components along the width direction, and obtain a frequency domain tensor of shape [T2,N1,N2,C3].

[0034] S72. Frequency domain adjustment and spatial reconstruction: The frequency domain tensor of [T2,N1,N2,C3] is sequentially adjusted in phase and amplitude, then an inverse Fourier transform is performed, and it is reshaped into the shape of [T2,C3,H1,W1] to complete spatial mixing;

[0035] S73, Channel Blending: Using learnable weights and non-linear activation functions, the number of channels in a tensor of shape [T2,C3,H1,W1] is mapped from C3 to C4, thus achieving channel dimension blending and obtaining a final blended tensor of shape [T2,H1,W1,C4]; where C4 represents the channel dimension after blending.

[0036] The geometric deformation inverse mapping network is a reversible mapping network of the geometric deformation mapping network, used to map the spatial coordinates of a tensor with shape [T2,H1,W1,C4] from the reference domain back to the original complex and irregular physical domain, and to transform the tensor format back to [T2,X,Y,C4].

[0037] The physical space decoder is used to decode the tensor output by the geometric deformation inverse mapping network to obtain a feature tensor that is adapted to the subsequent loss calculation and prediction output.

[0038] Preferably, in step S8, the two-dimensional hydrodynamic prediction model for the bay is a model obtained by targeted improvement and deep coupling of graph neural networks, temporal convolutional networks, and Fourier neural operator networks; the loss function of the two-dimensional hydrodynamic prediction model for the bay includes a data loss term and a physical loss term, and the specific calculation formula is as follows:

[0039] Total loss function: ,in, This is the total loss function; For data loss items; The weight hyperparameters for the physical loss; This is the physical loss item;

[0040] Data loss items: Where N is the total number of samples at each time step; M is the total number of spatial grid points in each time step; i is the time step number; and m is the grid number at a certain time step. For the predicted flow velocity field; This represents the actual flow velocity field. For the predicted water level scalar; Let be the actual water level scalar; ||·||2 is the L2 norm of the vector;

[0041] Physical loss item: ,in, Loss due to conservation of mass; Loss due to conservation of momentum;

[0042] Loss due to conservation of mass: , ,in, The residual is the mass conservation value; η is the water level; h = η - h b h b This refers to the terrain elevation; v is the flow velocity in the x-direction; v is the flow velocity in the y-direction; For time; The x-axis direction; for Coordinate axis direction;

[0043] Momentum conservation loss: ,in, The residual is the momentum conservation in the x-direction; The residual is the momentum conservation in the y-direction; , Where g is the acceleration due to gravity; Let x be the wind stress component in the x-direction; The wind stress component is in the y-direction; ρ is the bottom friction coefficient; ρ is the water density;

[0044] The spatiotemporal partial derivatives in the physical loss term are discretized using the finite difference method; on the regular grid field output by the model, the temporal partial derivatives are calculated using a first-order forward difference scheme, and the spatial partial derivatives are calculated using a second-order central difference scheme.

[0045] The discrete form of the partial derivative terms in the mass conservation equation is: , , In this context, the superscript represents the time step; the subscripts i and j represent the indices of the grid in the H1 and W1 directions in the rule computation domain, respectively; Δt is the time step size; Δx is the grid spacing in the x-direction; and Δy is the grid spacing in the y-direction.

[0046] The partial derivatives in the momentum conservation equation are discretized in the same way as those in the mass conservation equation.

[0047] By adopting the above technical solution, this invention has the following beneficial effects: Through a deeply coupled graph neural network, a temporal convolutional network, and a Fourier neural operator network capable of handling irregular geometric boundaries, this invention can collaboratively capture the complex spatial topology and long-term temporal dependencies in the hydrodynamic process of the bay, significantly improving the prediction efficiency of the two-dimensional hydrodynamic field while ensuring high accuracy. This method can be seamlessly integrated into existing hydrodynamic model frameworks, achieving an order-of-magnitude improvement in prediction speed and providing real-time and reliable hydrodynamic data for water environment management and planning. Simultaneously, the constructed hybrid architecture efficiently generates future long-term, high-resolution dynamic fields using forward inference, effectively promoting the sustainable development of the bay area and possessing broad prospects for widespread application. Attached Figure Description

[0048] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0050] like Figure 1 As shown, a method for predicting the hydrodynamics of a bay based on a hybrid Fourier neural architecture includes the following steps:

[0051] S1. Modify the trim2nc data packet and use the modified trim2nc data packet to convert the output file of the hydrodynamic model into a .nc file readable by Python software;

[0052] In step S1, the modification process of the trim2nc data packet is as follows: the unmodified trim2nc data packet is compiled and run based on MATLAB software, and after modification, it is adapted to run in Python software, and data conversion code for grid position, flow velocity, bottom friction coefficient, and terrain elevation is added; the hydrodynamic model is a Delft3D model, and the output file is in .dat format;

[0053] S2. Read the converted .nc file and preprocess the data to obtain a 3D static feature dataset and a 4D dynamic feature dataset;

[0054] Step S2 specifically includes:

[0055] S21. Data Reading: The converted .nc file is read using Python software to obtain the global feature data output by the hydrodynamic model. The global feature data includes the friction coefficient, flow velocity, water level, topographic elevation, land and sea properties, wind stress, tide and runoff data acting on the whole, corresponding to each grid.

[0056] S22. Data preprocessing: The read data is cleaned, missing values ​​are filled, outliers are handled, and normalization is performed.

[0057] S23. Dataset Partitioning: The friction coefficient, terrain elevation, and land-sea attributes corresponding to each grid are used as a three-dimensional static feature dataset, resulting in a tensor of shape [H,W,C1], where H represents the number of horizontal grids, W represents the number of vertical grids, and C1 represents the number of static features; the flow velocity, water level, and global external driving conditions corresponding to each grid are used as a four-dimensional dynamic feature dataset, resulting in a tensor of shape [T1,X,Y,C2], where T1 is the input time step, X represents the horizontal relative coordinate, Y represents the vertical relative coordinate, and C2 represents the number of dynamic features;

[0058] S3. Based on the geometric center of the grid cell, the Delaunay triangulation algorithm is used, combined with the four-way connectivity or eight-way connectivity criterion, to transform the implicit grid topology into an explicit graph structure and construct the adjacency matrix.

[0059] In step S3, four-way connectivity means that each grid is connected to its four adjacent grids (up, down, left, and right); eight-way connectivity means that each grid is connected to its eight adjacent grids (up, down, left, right, and diagonal). The corresponding position in the adjacency matrix is ​​marked as 1 to indicate its spatial connectivity. The implementation process of the Delaunay triangulation algorithm is as follows: construct a large triangle containing all grids, repeatedly insert the center point of the inner grid to split the triangle, flip the edges to make the small triangles satisfy the Delaunay triangulation condition, remove the outer triangle, and mark the grids corresponding to the three vertices of the subdivided small triangles as 1 in the corresponding position in the adjacency matrix to indicate its spatial connectivity.

[0060] S4. Construct a graph neural network and input the 3D static feature dataset and grid topology into the graph neural network to learn spatial topology and extract features.

[0061] The specific process of step S4 is as follows:

[0062] S41. Construct a graph neural network by inputting the three-dimensional static feature dataset and grid topology into the graph neural network, performing spatial topology learning and feature extraction, and obtaining a tensor of shape [X,Y,C5].

[0063] S42. Add a time dimension to boost the output data of the graph neural network to four dimensions, resulting in a tensor of shape [T2,X,Y,C5], which is used to align with the four-dimensional dynamic feature data dimension of the output of the subsequent temporal convolutional network; where C5 represents the number of features output by the graph neural network and T2 represents the number of time steps after augmentation.

[0064] S5. Construct a temporal convolutional network and input the four-dimensional dynamic feature dataset into the temporal convolutional network for time series feature extraction and integration.

[0065] In step S5, the temporal convolutional network includes parallel global temporal convolutional network paths and node-by-node temporal convolutional network paths, used to process global dynamic feature input and dynamic feature input corresponding to each grid node, respectively. The specific process of step S5 is as follows: construct a temporal convolutional network, input the four-dimensional dynamic feature dataset into the temporal convolutional network, perform time series feature extraction and integration, and compress the time step T1 into T2 to obtain a tensor of shape [T2,X,Y,C6]; where C6 represents the number of features output by the temporal convolutional network.

[0066] S6. Integrate the output features of graph neural networks and temporal convolutional networks to form a unified multi-feature representation;

[0067] The specific process of step S6 is as follows: the tensor of shape [T2,X,Y,C5] output by the graph neural network and the tensor of shape [T2,X,Y,C6] output by the temporal convolutional network are concatenated and fused to form a unified multi-feature representation, resulting in a tensor of shape [T2,X,Y,C7], which is used as the input for subsequent Fourier neural operator calculations; where C7 represents the number of features after fusion, C7=C5+C6;

[0068] S7. Construct a Fourier neural operator network capable of handling irregular geometric boundaries, and input the fused features into the Fourier neural operator network for frequency domain hybrid calculation.

[0069] In step S7, the Fourier neural operator network includes a physical space encoder, a geometric deformation mapping network, stacked Fourier layers, a geometric deformation inverse mapping network, and a physical space decoder connected in sequence.

[0070] The physical space encoder consists of a fully connected layer, which receives the fused two-dimensional hydrodynamic feature tensor of the bay with spatiotemporal characteristics, projects the two-dimensional hydrodynamic feature tensor of the bay to a higher feature dimension, and outputs a high-dimensional encoded tensor; the format of the high-dimensional encoded tensor is [T2,X,Y,C3], where C3 represents the number of channels of the high-dimensional encoded tensor;

[0071] The geometric deformation mapping network is used to map a complex and irregular physical domain to a simple and regular computational domain, transforming the tensor format into [T2,H1,W1,C3] to adapt to the computation of Fourier neural operators on a regular domain, where H1 represents the number of latitude grid points in the computational domain and W1 represents the number of longitude grid points in the computational domain.

[0072] The stacked Fourier layers are used to receive high-dimensional encoded tensors, achieve spatial mixing through global convolution in the frequency domain, and achieve channel mixing by combining linear transformation, outputting the mixed tensor. Specifically, the steps include:

[0073] S71. Frequency domain transformation and truncation: Perform a Fourier transform on the tensor of shape [T2,H1,W1,C3] along the horizontal direction, retain the first N1 frequency components along the height direction and the first N2 frequency components along the width direction, and obtain a frequency domain tensor of shape [T2,N1,N2,C3].

[0074] S72. Frequency domain adjustment and spatial reconstruction: The frequency domain tensor of [T2,N1,N2,C3] is sequentially adjusted in phase and amplitude, then an inverse Fourier transform is performed, and it is reshaped into the shape of [T2,C3,H1,W1] to complete spatial mixing;

[0075] S73, Channel Blending: Using learnable weights and non-linear activation functions, the number of channels in a tensor of shape [T2,C3,H1,W1] is mapped from C3 to C4, thus achieving channel dimension blending and obtaining a final blended tensor of shape [T2,H1,W1,C4]; where C4 represents the channel dimension after blending.

[0076] The geometric deformation inverse mapping network is a reversible mapping network of the geometric deformation mapping network, used to map the spatial coordinates of a tensor with shape [T2,H1,W1,C4] from the reference domain back to the original complex and irregular physical domain, and to transform the tensor format back to [T2,X,Y,C4].

[0077] The physical space decoder is used to decode the tensor output by the geometric deformation inverse mapping network to obtain a feature tensor that is adapted to the subsequent loss calculation and prediction output.

[0078] S8. Couple physical knowledge, define a loss function, use a three-dimensional static feature dataset, grid topology relationship and four-dimensional dynamic feature dataset as input data, and use the flow velocity and water level corresponding to each grid at the prediction time as output labels to train a two-dimensional hydrodynamic prediction model for the bay.

[0079] In step S8, the two-dimensional hydrodynamic prediction model for the bay is obtained by specifically improving and deeply coupling graph neural networks, temporal convolutional networks, and Fourier neural operator networks; the loss function of the two-dimensional hydrodynamic prediction model for the bay includes a data loss term and a physical loss term, and the specific calculation formula is as follows:

[0080] Total loss function: ,in, This is the total loss function; For data loss items; The weight hyperparameters for physical loss; This is the physical loss item;

[0081] Data loss items: Where N is the total number of samples at each time step; M is the total number of spatial grid points in each time step; i is the time step number; and m is the grid number at a certain time step. For the predicted flow velocity field; This represents the actual flow velocity field. For the predicted water level scalar; Let be the actual water level scalar; ||·||2 is the L2 norm of the vector;

[0082] Physical loss item: ,in, Loss due to conservation of mass; Loss due to conservation of momentum;

[0083] Loss due to conservation of mass: , ,in, The residual is the mass conservation value; η is the water level; h = η - h b h b This refers to the terrain elevation; v is the flow velocity in the x-direction; v is the flow velocity in the y-direction; For time; The x-axis direction; for Coordinate axis direction;

[0084] Momentum conservation loss: ,in, The residual is the momentum conservation in the x-direction; The residual is the momentum conservation in the y-direction; , Where g is the acceleration due to gravity; Let x be the wind stress component in the x-direction; The wind stress component is in the y-direction; ρ is the bottom friction coefficient; ρ is the water density;

[0085] The spatiotemporal partial derivatives in the physical loss term are discretized using the finite difference method; on the regular grid field output by the model, the temporal partial derivatives are calculated using a first-order forward difference scheme, and the spatial partial derivatives are calculated using a second-order central difference scheme.

[0086] The discrete form of the partial derivative terms in the mass conservation equation is: , , In this context, the superscript represents the time step; the subscripts i and j represent the indices of the grid in the H1 and W1 directions in the rule computation domain, respectively; Δt is the time step size; Δx is the grid spacing in the x-direction; and Δy is the grid spacing in the y-direction.

[0087] The partial derivatives of each term in the momentum conservation equation are discretized in the same way as those in the mass conservation equation.

[0088] S9. Input the global feature data to be predicted into the trained two-dimensional hydrodynamic prediction model of the bay, and output the hydrodynamic prediction result of the bay.

[0089] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for predicting the hydrodynamics of a bay based on a hybrid Fourier neural architecture, characterized in that, Includes the following steps: S1. Modify the trim2nc data packet and use the modified trim2nc data packet to convert the output file of the hydrodynamic model into a .nc file readable by Python software; S2. Read the converted .nc file and preprocess the data to obtain a three-dimensional static feature dataset and a four-dimensional dynamic feature dataset; Step S2 specifically includes: S21. Data Reading: The converted .nc file is read using Python software to obtain the global feature data output by the hydrodynamic model. The global feature data includes the friction coefficient, flow velocity, water level, topographic elevation, land and sea properties, wind stress, tide and runoff data acting on the whole, corresponding to each grid. S22. Data preprocessing: The read data is cleaned, missing values ​​are filled, outliers are handled, and normalization is performed. S23. Dataset Partitioning: The friction coefficient, terrain elevation, and land-sea attributes corresponding to each grid are used as a three-dimensional static feature dataset, resulting in a tensor of shape [H,W,C1], where H represents the number of horizontal grids, W represents the number of vertical grids, and C1 represents the number of static features; the flow velocity, water level, and global external driving conditions corresponding to each grid are used as a four-dimensional dynamic feature dataset, resulting in a tensor of shape [T1,X,Y,C2], where T1 is the input time step, X represents the horizontal relative coordinate, Y represents the vertical relative coordinate, and C2 represents the number of dynamic features; S3. Based on the geometric center of the grid cell, the Delaunay triangulation algorithm is used, combined with the four-way connectivity or eight-way connectivity criterion, to transform the implicit grid topology into an explicit graph structure and construct the adjacency matrix. S4. Construct a graph neural network and input the 3D static feature dataset and grid topology into the graph neural network to learn spatial topology and extract features. S5. Construct a temporal convolutional network and input the four-dimensional dynamic feature dataset into the temporal convolutional network for time series feature extraction and integration. S6. Integrate the output features of graph neural networks and temporal convolutional networks to form a unified multi-feature representation; S7. Construct a Fourier neural operator network capable of handling irregular geometric boundaries, and input the fused features into the Fourier neural operator network for frequency domain hybrid calculation. S8. Couple physical knowledge, define a loss function, use a three-dimensional static feature dataset, grid topology relationship and four-dimensional dynamic feature dataset as input data, and use the flow velocity and water level corresponding to each grid at the prediction time as output labels to train a two-dimensional hydrodynamic prediction model for the bay. S9. Input the global feature data to be predicted into the trained two-dimensional hydrodynamic prediction model of the bay, and output the hydrodynamic prediction result of the bay.

2. The method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture as described in claim 1, characterized in that, In step S1, the modification process of the trim2nc data packet is as follows: the unmodified trim2nc data packet is compiled and run based on MATLAB software, and after modification, it is adapted to run in Python software, and data conversion code for grid position, flow velocity, bottom friction coefficient and terrain elevation is added; The hydrodynamic model is a Delft3D model, and the output file is in .dat format.

3. The method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture as described in claim 2, characterized in that: In step S3, four-way connectivity means that each grid is connected to its four adjacent grids (up, down, left, and right); eight-way connectivity means that each grid is connected to its eight adjacent grids (up, down, left, right, and diagonal). The corresponding position in the adjacency matrix is ​​marked as 1 to indicate its spatial connectivity. The implementation process of the Delaunay triangulation algorithm is as follows: construct a large triangle containing all grids, repeatedly insert the center point of the internal grid to split the triangle, flip the edges to make the small triangles satisfy the Delaunay triangulation condition, remove the outer triangle, and mark the grids corresponding to the three vertices of the subdivided small triangles as 1 in the corresponding position in the adjacency matrix to indicate its spatial connectivity.

4. The bay hydrodynamic prediction method based on a hybrid Fourier neural architecture as described in claim 3, characterized in that, The specific process of step S4 is as follows: S41. Construct a graph neural network by inputting the three-dimensional static feature dataset and grid topology into the graph neural network, performing spatial topology learning and feature extraction, and obtaining a tensor of shape [X,Y,C5]. S42. Add a time dimension to boost the output data of the graph neural network to four dimensions, resulting in a tensor of shape [T2,X,Y,C5], which is used to align with the four-dimensional dynamic feature data dimension of the output of the subsequent temporal convolutional network; where C5 represents the number of features output by the graph neural network and T2 represents the number of time steps after augmentation.

5. The method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture as described in claim 4, characterized in that: In step S5, the temporal convolutional network includes parallel global temporal convolutional network paths and node-by-node temporal convolutional network paths, which are used to process the global dynamic feature input and the dynamic feature input corresponding to each grid node, respectively. The specific process of step S5 is as follows: construct a temporal convolutional network, input the four-dimensional dynamic feature dataset into the temporal convolutional network, perform time series feature extraction and integration, and compress the time step T1 into T2 to obtain a tensor of shape [T2,X,Y,C6]; where C6 represents the number of features output by the temporal convolutional network.

6. The method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture as described in claim 5, characterized in that, The specific process of step S6 is as follows: the tensor of shape [T2,X,Y,C5] output by the graph neural network and the tensor of shape [T2,X,Y,C6] output by the temporal convolutional network are concatenated and fused to form a unified multi-feature representation, resulting in a tensor of shape [T2,X,Y,C7], which is used as the input for subsequent Fourier neural operator calculations; where C7 represents the number of features after fusion, C7=C5+C6.

7. The method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture as described in claim 6, characterized in that: In step S7, the Fourier neural operator network includes a physical space encoder, a geometric deformation mapping network, stacked Fourier layers, a geometric deformation inverse mapping network, and a physical space decoder connected in sequence. The physical space encoder consists of a fully connected layer, which receives the fused two-dimensional hydrodynamic feature tensor of the bay with spatiotemporal characteristics, projects the two-dimensional hydrodynamic feature tensor of the bay to a higher feature dimension, and outputs a high-dimensional encoded tensor; the format of the high-dimensional encoded tensor is [T2,X,Y,C3], where C3 represents the number of channels of the high-dimensional encoded tensor; The geometric deformation mapping network is used to map a complex and irregular physical domain to a simple and regular computational domain, transforming the tensor format into [T2,H1,W1,C3] to adapt to the computation of Fourier neural operators on a regular domain, where H1 represents the number of latitude grid points in the computational domain and W1 represents the number of longitude grid points in the computational domain. The stacked Fourier layers are used to receive high-dimensional encoded tensors, achieve spatial mixing through global convolution in the frequency domain, and achieve channel mixing by combining linear transformation, outputting the mixed tensor. Specifically, the steps include: S71. Frequency domain transformation and truncation: Perform a Fourier transform on the tensor of shape [T2,H1,W1,C3] along the horizontal direction, retain the first N1 frequency components along the height direction and the first N2 frequency components along the width direction, and obtain a frequency domain tensor of shape [T2,N1,N2,C3]. S72. Frequency domain adjustment and spatial reconstruction: The frequency domain tensor of [T2,N1,N2,C3] is sequentially adjusted in phase and amplitude, then an inverse Fourier transform is performed, and it is reshaped into the shape of [T2,C3,H1,W1] to complete spatial mixing; S73, Channel Blending: Using learnable weights and non-linear activation functions, the number of channels in a tensor of shape [T2,C3,H1,W1] is mapped from C3 to C4, thus achieving channel dimension blending and obtaining a final blended tensor of shape [T2,H1,W1,C4]; where C4 represents the channel dimension after blending. The geometric deformation inverse mapping network is a reversible mapping network of the geometric deformation mapping network, used to map the spatial coordinates of a tensor with shape [T2,H1,W1,C4] from the reference domain back to the original complex and irregular physical domain, and to transform the tensor format back to [T2,X,Y,C4]. The physical space decoder is used to decode the tensor output by the geometric deformation inverse mapping network to obtain a feature tensor that is adapted to the subsequent loss calculation and prediction output.

8. The method for predicting bay hydrodynamics based on a hybrid Fourier neural architecture as described in claim 7, characterized in that: In step S8, the two-dimensional hydrodynamic prediction model for the bay is obtained by specifically improving and deeply coupling graph neural networks, temporal convolutional networks, and Fourier neural operator networks; the loss function of the two-dimensional hydrodynamic prediction model for the bay includes a data loss term and a physical loss term, and the specific calculation formula is as follows: Total loss function: ,in, This is the total loss function; For data loss items; The weight hyperparameters for physical loss; This is the physical loss item; Data loss items: Where N is the total number of samples at each time step; M is the total number of spatial grid points in each time step; i is the time step number; and m is the grid number at a certain time step. For the predicted flow velocity field; This represents the actual flow velocity field. For the predicted water level scalar; Let be the actual water level scalar; ||·||2 is the L2 norm of the vector; Physical loss item: ,in, Loss due to conservation of mass; Loss due to conservation of momentum; Loss due to conservation of mass: , ,in, The residual is the mass conservation value; η is the water level; h = η - h b h b This refers to the terrain elevation; v is the flow velocity in the x-direction; v is the flow velocity in the y-direction; For time; The x-axis direction; for Coordinate axis direction; Momentum conservation loss: ,in, The residual is the momentum conservation in the x-direction; The residual is the momentum conservation in the y-direction; , Where g is the acceleration due to gravity; Let x be the wind stress component in the x-direction; The wind stress component is in the y-direction; ρ is the bottom friction coefficient; ρ is the water density; The spatiotemporal partial derivatives in the physical loss term are discretized using the finite difference method; on the regular grid field output by the model, the temporal partial derivatives are calculated using a first-order forward difference scheme, and the spatial partial derivatives are calculated using a second-order central difference scheme. The discrete form of the partial derivative terms in the mass conservation equation is: , , In this context, the superscript represents the time step; the subscripts i and j represent the indices of the grid in the H1 and W1 directions in the rule computation domain, respectively; Δt is the time step size; Δx is the grid spacing in the x-direction; and Δy is the grid spacing in the y-direction. The partial derivatives in the momentum conservation equation are discretized in the same way as those in the mass conservation equation.

Citation Information

Patent Citations

  • Gulf automatic partitioning method based on graph neural network

    CN118551676A

  • Marine pasture grazing and raising site selection method and system

    CN121094605A