Search

CN-121543043-B - Bay hydrodynamic prediction method based on hybrid Fourier neural architecture

CN121543043BCN 121543043 BCN121543043 BCN 121543043BCN-121543043-B

Abstract

The invention discloses a bay hydrodynamic prediction method based on a hybrid Fourier neural architecture, which belongs to the technical field of hydrodynamic prediction and comprises the steps of data conversion, data preprocessing, topology relation construction, feature extraction and fusion, model construction and training and prediction, and the like, wherein a static and dynamic feature data set is obtained through preprocessing a modified trim2nc data packet to convert a data format, a grid topological relation is constructed by using a Delaunay triangulation algorithm, space and time features are respectively extracted and fused through a graph neural network and a time convolution network, frequency domain calculation is carried out by combining a Fourier neural operator network with the capability of processing irregular geometric boundaries, a loss function training model is defined by coupling physical knowledge, and the bay hydrodynamic fast and accurate prediction is finally realized.

Inventors

  • LI SHAOBIN
  • CHEN YE
  • CHEN NENGWANG
  • LU SHASHA
  • MENG QICHENG
  • SUN WEIWEI

Assignees

  • 厦门大学

Dates

Publication Date
20260508
Application Date
20260120

Claims (8)

  1. 1. The bay hydrodynamic prediction method based on the hybrid Fourier neural architecture is characterized by comprising the following steps of: S1, modifying a trim2nc data packet, and converting an output file of a hydrodynamic model into a Python software readable nc file by using the modified trim2nc data packet; S2, reading the converted nc file and preprocessing the data to obtain a three-dimensional static characteristic data set and a four-dimensional dynamic characteristic data set; The step S2 specifically comprises the following steps: S21, data reading, namely reading the converted nc file by using Python software to obtain global characteristic data output by a hydrodynamic model, wherein the global characteristic data comprise friction coefficients, flow rates, water levels, topography elevations, land and sea properties, and global wind stress, tide and runoff data corresponding to each grid; s22, data preprocessing, namely performing data cleaning, missing value filling, abnormal value processing and normalization processing on the read data; S23, dividing a data set, namely taking friction coefficients, terrain elevations and land and sea attributes corresponding to all grids as three-dimensional static characteristic data sets to obtain tensors of [ H, W, C 1 ] shapes, wherein H represents transverse grid numbers, W represents longitudinal grid numbers, C 1 represents static characteristic numbers, taking flow velocity, water level and global external driving conditions corresponding to all grids as four-dimensional dynamic characteristic data sets to obtain tensors of [ T 1 ,X,Y,C 2 ] shapes, wherein T 1 is an input time step number, X represents transverse relative coordinates, Y represents longitudinal relative coordinates, and C 2 represents dynamic characteristic numbers; S3, based on the geometric center of the grid unit, utilizing a Delaunay triangulation algorithm, combining a four-way connectivity criterion or an eight-way connectivity criterion, converting an implicit grid topological relation into an explicit graph structure, and constructing an adjacency matrix; s4, constructing a graph neural network, and inputting the three-dimensional static feature data set and the grid topological relation into the graph neural network to learn the spatial topological relation and extract the features; s5, constructing a time convolution network, and inputting the four-dimensional dynamic characteristic data set into the time convolution network to extract and integrate time sequence characteristics; s6, fusing output characteristics of the graph neural network and the time convolution network to form a unified multi-characteristic representation; S7, constructing a Fourier neural operator network with the capability of processing irregular geometric boundaries, and inputting the fused characteristics into the Fourier neural operator network for frequency domain mixed calculation; s8, coupling physical knowledge, defining a loss function, taking a three-dimensional static characteristic data set, a grid topological relation and a four-dimensional dynamic characteristic data set as input data, taking flow velocity and water level corresponding to each grid at the forecasting moment as output labels, and training a bay two-dimensional hydrodynamic force forecasting model; S9, inputting global characteristic data to be predicted into a trained bay two-dimensional hydrodynamic prediction model, and outputting to obtain a bay hydrodynamic prediction result.
  2. 2. The method for predicting the hydrodynamic force of a bay based on a hybrid Fourier neural architecture of claim 1, wherein in the step S1, the modification process of the trim2nc data packet is that an unmodified trim2nc data packet is compiled and operated based on MATLAB software, the modified trim2nc data packet is operated by Python software, data conversion codes for grid positions, flow rates, bottom friction coefficients and topography elevations are newly added, the hydrodynamic force model is a Delft3D model, and an output file is in a. Dat format.
  3. 3. The bay hydrodynamic force prediction method based on the hybrid Fourier neural architecture of claim 2, wherein in the step S3, four-way connectivity means that each grid is connected with four grids adjacent to the bay hydrodynamic force prediction method, eight-way connectivity means that each grid is connected with eight grids adjacent to the bay hydrodynamic force prediction method, corresponding positions in an adjacent matrix are marked as 1 to represent space communication of the bay hydrodynamic force prediction method, the Delaunay triangulation algorithm is realized by constructing a large triangle and comprising all grids, repeatedly inserting an internal grid center point to perform triangle splitting, enabling a small triangle to meet Delaunay triangle conditions through edge turning, removing an external triangle, and marking grids corresponding to three vertexes of the small triangle after being split as 1 at corresponding positions of the adjacent matrix to represent space communication of the small triangle.
  4. 4. The bay hydrodynamic prediction method based on the hybrid fourier neural architecture as claimed in claim 3, wherein the specific process of step S4 is as follows: s41, constructing a graph neural network, inputting a three-dimensional static characteristic dataset and a grid topological relation into the graph neural network, and performing space topological relation learning and characteristic extraction to obtain tensors of [ X, Y, C 5 ] shapes; S42, adding a time dimension, and lifting output data of the graph neural network to four dimensions to obtain tensors of [ T 2 ,X,Y,C 5 ] shapes for being aligned with the four-dimensional dynamic feature data dimension output by the subsequent time convolution network, wherein C 5 represents feature numbers output by the graph neural network, and T 2 represents time steps after amplification.
  5. 5. The method of bay hydrodynamic force prediction based on mixed Fourier neural architecture as set forth in claim 4, wherein in step S5, the time convolution network comprises a parallel global time convolution network path and a node-by-node time convolution network path for respectively processing global dynamic feature input and dynamic feature input corresponding to each grid node, the specific process of step S5 is to construct a time convolution network, input a four-dimensional dynamic feature dataset into the time convolution network, extract and integrate time sequence features, and compress a time step number T 1 into T 2 to obtain tensors of [ T 2 ,X,Y,C 6 ] shapes, wherein C 6 represents feature numbers output by the time convolution network.
  6. 6. The method of bay hydrodynamic force prediction based on mixed Fourier neural architecture as claimed in claim 5, wherein the specific process of the step S6 is to splice and fuse tensors of [ T 2 ,X,Y,C 5 ] shape output by the graph neural network and tensors of [ T 2 ,X,Y,C 6 ] shape output by the time convolution network to form unified multi-feature representation, obtain tensors of [ T 2 ,X,Y,C 7 ] shape for being used as input of subsequent Fourier neural operator calculation, wherein C 7 represents feature number after fusion, and C 7 =C 5 +C 6 .
  7. 7. The method for predicting the bay hydrodynamic force based on the mixed Fourier neural architecture of claim 6, wherein in step S7, the Fourier operator network comprises a physical space encoder, a geometric deformation mapping network, a stacked Fourier layer, a geometric deformation inverse mapping network and a physical space decoder which are sequentially connected; the physical space encoder is composed of a full-connection layer and is used for receiving the integrated bay two-dimensional hydrodynamic feature tensor with space-time features, projecting the bay two-dimensional hydrodynamic feature tensor to a higher feature dimension and outputting a high-dimensional encoding tensor, wherein the format of the high-dimensional encoding tensor is [ T 2 ,X,Y,C 3 ], and C 3 represents the channel number of the high-dimensional encoding tensor; The geometric deformation mapping network is used for mapping a complex irregular physical domain to a simple regular calculation domain, converting a tensor format into [ T 2 ,H 1 ,W 1 ,C 3 ] so as to adapt to calculation of a Fourier neural operator on the regular domain, wherein H 1 represents latitude lattice points on the calculation domain, and W 1 represents longitude lattice points on the calculation domain; The stacked fourier layers are configured to receive the high-dimensional encoded tensor, implement spatial mixing by performing global convolution in a frequency domain, implement channel mixing by combining linear transformation, and output the tensor after mixing, and specifically include the following steps: S71, carrying out Fourier transform on tensors with the shape of [ T 2 ,H 1 ,W 1 ,C 3 ] along the horizontal direction, and reserving front N 1 frequency components along the height direction and front N 2 frequency components along the width direction to obtain frequency domain tensors with the shape of [ T 2 ,N 1 ,N 2 ,C 3 ]; S72, frequency domain adjustment and space reconstruction, namely sequentially carrying out phase and amplitude adjustment on the frequency domain tensor of [ T 2 ,N 1 ,N 2 ,C 3 ], then carrying out inverse Fourier transform, and reshaping the frequency domain tensor into the shape of [ T 2 ,C 3 ,H 1 ,W 1 ] to finish space mixing; S73, channel mixing, namely mapping the number of channels of tensors of the [ T 2 ,C 3 ,H 1 ,W 1 ] shape from C 3 to C 4 by using a learnable weight and a nonlinear activation function, and mixing channel dimensions to obtain the tensors of the [ T 2 ,H 1 ,W 1 ,C 4 ] shape after final mixing, wherein C 4 represents the mixed channel dimensions; The geometric deformation inverse mapping network is a reversible mapping network of the geometric deformation mapping network and is used for mapping the spatial coordinates of tensors with the shape of [ T 2 ,H 1 ,W 1 ,C 4 ] from a reference domain back to an original complex irregular physical domain and converting the tensor format back to [ T 2 ,X,Y,C 4 ]; The physical space decoder is used for decoding tensors output by the geometric deformation inverse mapping network to obtain characteristic tensors which are adaptive to subsequent loss calculation and prediction output.
  8. 8. The method for predicting the bay hydrodynamic force based on the hybrid Fourier neural architecture of claim 7, wherein in the step S8, the bay two-dimensional hydrodynamic force prediction model is a model obtained by performing targeted improvement and deep coupling on a graph neural network, a time convolution network and a Fourier neural operator network, and a loss function of the bay two-dimensional hydrodynamic force prediction model comprises a data loss term and a physical loss term, wherein the specific calculation formula is as follows: Total loss function: , wherein, As a total loss function; Is a data loss term; the weight super parameter is the physical loss; is a physical loss term; Data loss term: wherein N is the total sample amount of time steps, M is the total number of space grid points in each time step, i is the number of the time steps, M is the grid number under a certain time step; for a predicted flow velocity field; is the true flow velocity field; Scalar for predicted water level; Is a real water level scalar, and I.I 2 is the L2-norm of the vector; physical loss term: , wherein, Is the conservation loss of mass; Is the conservation loss of momentum; conservation of mass loss: , , wherein, Is mass conservation residual error, eta is water level, and h=eta-h b ,h b is terrain elevation; V is the flow velocity in the y direction; Time is; is in the x coordinate axis direction; Is that Coordinate axis direction; Momentum conservation loss: , wherein, Momentum conservation residual error in the x direction; conservation of momentum residual error in the y direction; , wherein g is gravitational acceleration; is the wind stress component in the x direction; is the wind stress component in the y direction; The rho is the water density; On a regular grid field output by the model, the time partial derivative adopts a first-order forward differential format, and the space partial derivative adopts a second-order center differential format; the discrete form of the partial derivative term in the mass conservation equation is: , , Wherein, the superscript indicates a time step, the subscripts i and j respectively indicate indexes of grids in the directions of H 1 and W 1 in a rule calculation domain, delta t is a time step, delta x is grid spacing in the x direction, and delta y is grid spacing in the y direction; Each partial derivative in the conservation of momentum equation takes the same discrete form as the partial derivative in the conservation of mass equation.

Description

Bay hydrodynamic prediction method based on hybrid Fourier neural architecture Technical Field The invention belongs to the technical field of hydrodynamic prediction, and particularly relates to a bay hydrodynamic prediction method based on a hybrid Fourier neural architecture. Background The bay is used as a key zone for land and sea intersection, has important economic value and ecological function, is a core area for maintaining biodiversity and ecological balance, is a hot spot area for economic activities such as mariculture, shipping traffic and the like, and has profound significance for sustainable development of the area. The bay hydrodynamic process is the basis for constructing water quality and ecological models. Along with the continuous deepening of development and utilization degree of the bay area, the demands for timely and high-resolution prediction of hydrodynamic behaviors are increasingly urgent. Developing a high-efficiency and accurate bay hydrodynamic modeling study and realizing quick dynamic prediction becomes an important task in the current field. At present, although various modeling software such as Delft3D, MIKE, ROMs and the like are widely adopted in the field of bay hydrodynamic force simulation, the traditional methods have obvious limitations that in order to realize high space-time resolution, a model often needs to be divided into intensive calculation grids, and time steps are strictly limited by conditions which must be observed in order to ensure numerical stability, and the two methods together lead to huge calculation cost and long simulation time, so that the quick scene analysis and optimization in management decision are difficult to support. The hydrodynamic agent model based on the neural network architecture provides a feasible scheme for long-time and high-timeliness prediction of bay hydrodynamic force by virtue of lower calculation cost and higher simulation precision. However, the output data of the conventional process model generally has strong spatial characteristics and long time sequence characteristics, and the conventional neural network has defects in effectively capturing such complex space-time characteristics, so that the model learning capability is limited, and the prediction accuracy is difficult to meet the actual requirements. Therefore, a hydrodynamic prediction method capable of efficiently capturing complex space-time characteristics in a bay hydrodynamic process and considering prediction accuracy and efficiency is needed to solve the problems existing in the prior art. Disclosure of Invention In order to solve the problems, the invention provides a bay hydrodynamic prediction method based on a hybrid Fourier neural architecture, which can solve the bottleneck problems of high calculation cost and low efficiency of the traditional hydrodynamic model, remarkably improve the simulation speed on the premise of keeping high precision and high space-time resolution, efficiently generate a long-time-sequence and high-resolution hydrodynamic field, provide reliable and efficient power input for a bay water quality model, an ecological model and the like, and has good popularization and application prospects. In order to achieve the above purpose, the present invention adopts the following technical scheme: a bay hydrodynamic prediction method based on a hybrid Fourier neural architecture comprises the following steps: S1, modifying a trim2nc data packet, and converting an output file of a hydrodynamic model into a Python software readable nc file by using the modified trim2nc data packet; S2, reading the converted nc file and preprocessing the data to obtain a three-dimensional static characteristic data set and a four-dimensional dynamic characteristic data set; S3, based on the geometric center of the grid unit, utilizing a Delaunay triangulation algorithm, combining a four-way connectivity criterion or an eight-way connectivity criterion, converting an implicit grid topological relation into an explicit graph structure, and constructing an adjacency matrix; s4, constructing a graph neural network, and inputting the three-dimensional static feature data set and the grid topological relation into the graph neural network to learn the spatial topological relation and extract the features; s5, constructing a time convolution network, and inputting the four-dimensional dynamic characteristic data set into the time convolution network to extract and integrate time sequence characteristics; s6, fusing output characteristics of the graph neural network and the time convolution network to form a unified multi-characteristic representation; S7, constructing a Fourier neural operator network with the capability of processing irregular geometric boundaries, and inputting the fused characteristics into the Fourier neural operator network for frequency domain mixed calculation; s8, coupling physical knowledge, defining a loss function, taking a three-d