Method and system for ocean shallow water equation flow field prediction based on neural operator
By combining convolutional neural networks and Fourier neural operator modules, a method for predicting the flow field of shallow ocean equations is developed, which solves the problems of low efficiency and insufficient stability of traditional numerical methods and achieves fast and stable multi-scale flow field prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional numerical methods for solving shallow ocean equations are inefficient, time-consuming, and fail to effectively capture multi-scale dynamic processes, and lack stability in long-term predictions.
A method for predicting the flow field of shallow ocean water equations based on neural operators is adopted. Combining convolutional neural networks and Fourier neural operator modules, the flow field data can be predicted rapidly through training data construction and model training.
It achieves near real-time rapid solutions, effectively capturing multi-scale physical mechanisms in ocean dynamic processes, and improving the efficiency and stability of ocean simulation and forecasting.
Smart Images

Figure CN122154570A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine simulation and forecasting technology, and in particular to a method and system for predicting shallow water flow fields based on neural operators. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] The shallow water equations are the fundamental governing equations describing the dynamic characteristics of large-scale water bodies such as shallow seas, lakes, and estuaries. They are core dynamic models widely used in marine numerical simulation and marine forecasting systems. In the actual marine environment, water movement involves dynamic mechanisms spanning multiple spatial scales, from turbulent friction on the order of kilometers to tidal propagation on the order of hundreds of kilometers, and is influenced by multiple time scales, from second-level perturbations to diurnal tides. Therefore, the shallow water equations exhibit strong nonlinearity and significant multi-scale coupling characteristics.
[0004] Traditional methods for solving shallow-water ocean equations primarily rely on numerical discretization methods such as the finite difference method and the finite element method. These methods require discretizing the governing equations in both time and space, and completing the numerical solution through numerous iterative steps, often consuming enormous computational resources and time. Especially when dealing with complex ocean dynamic processes at high dimensions and multiple scales, continuous iterative calculations can lead to error accumulation, affecting the accuracy of the solution. Furthermore, traditional numerical methods struggle to fully capture the coupling characteristics of physical processes at different spatiotemporal scales in complex ocean environments, facing significant performance and accuracy bottlenecks in complex modeling tasks. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a method and system for predicting the flow field of shallow ocean equations based on neural operators. This method solves the problems of low efficiency and long time consumption in solving shallow ocean equations using traditional numerical methods, as well as the difficulty of existing neural network methods in simultaneously and effectively capturing multi-scale dynamic processes and their insufficient stability in long-term predictions.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for predicting the current field of shallow ocean equations based on neural operators, comprising the following steps: The training data construction module is configured to: acquire the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through the flow field simulation program, and construct a training set; The prediction model building module is configured to: build a shallow water equation flow field prediction model for the ocean, which includes a convolutional neural network module and a Fourier neural operator module; wherein, the convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information; the Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system; The model training module is configured to: during model training, according to a preset training phase scheduling strategy, dynamically combine real data in the training dataset with the prediction results of the ocean shallow water equation flow field prediction model itself at the previous time step as input data for the current time step, and jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges. The model prediction module is configured to predict the flow field data of the target water area using a trained ocean shallow water equation flow field prediction model.
[0007] Secondly, the present invention provides a shallow ocean current field prediction system based on neural operators, comprising: The training data construction module is configured to: acquire the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through the flow field simulation program, and construct a training set; The prediction model building module is configured to: build a shallow water equation flow field prediction model for the ocean, which includes a convolutional neural network module and a Fourier neural operator module; wherein, the convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information; the Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system; The model training module is configured to: during model training, according to a preset training phase scheduling strategy, dynamically combine real data in the training dataset with the prediction results of the ocean shallow water equation flow field prediction model itself at the previous time step as input data for the current time step, and jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges. The model prediction module is configured to predict the flow field data of the target water area using a trained ocean shallow water equation flow field prediction model.
[0008] Thirdly, the present invention provides an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.
[0009] Fourthly, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in the first aspect.
[0010] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows: The proposed method for predicting ocean shallow water equations based on neural operators can obtain flow field predictions through a single forward propagation using a trained neural network model, completely avoiding the time-consuming iterative calculation process in traditional numerical methods. This enables near real-time rapid solutions and greatly improves the efficiency of ocean simulation and forecasting. By cleverly combining the advantages of convolutional neural networks and Fourier neural operators, the proposed hybrid model architecture can simultaneously and effectively capture the multi-scale physical mechanisms of ocean dynamic processes, from local turbulence and bottom friction to global tides and circulation.
[0012] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0013] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0014] Figure 1 This is a flowchart of the ocean shallow water equation flow field prediction method based on neural operators in an embodiment of the present invention; Figure 2 This is a structural diagram of the ocean shallow water equation flow field prediction model based on Fourier neural operators and convolutional neural networks in an embodiment of the present invention; Figure 3 This is a structural diagram of the convolutional neural network module in the ocean shallow water equation flow field prediction model of the present invention; Figure 4 This is a structural diagram of the Fourier neural operator module in the ocean shallow water equation flow field prediction model in this embodiment of the invention; Figure 5 This is the flowchart of the ocean shallow water equation flow field prediction model prediction method based on Fourier neural operators and convolutional neural networks in this embodiment of the invention; Figure 6The Euler-mean flow field of the two-dimensional rotating shallow water equation with nonlinear bottom friction term is obtained by solving the ocean shallow water equation flow field prediction model in this embodiment of the invention; wherein, (a) is the baseline streamline diagram of the Euler-mean flow field obtained by numerical method solution, and (b) is the Euler-mean flow field streamline diagram obtained by model prediction. Figure 7 The Lagrange particle tracking trajectory is obtained by solving the two-dimensional rotating shallow water equation with nonlinear bottom friction term using the ocean shallow water equation flow field prediction model in this embodiment of the invention; wherein, (a) is a particle tracking trajectory diagram obtained by Lagrange particle tracking based on the flow field data solved by numerical method, and (b) is a Lagrange particle tracking trajectory diagram obtained based on model prediction. Figure 8 The above are the predicted velocity field results of the ocean shallow water equation flow field prediction model in this embodiment of the invention, which solves the two-dimensional rotating shallow water equation with nonlinear bottom friction term; where (a), (b), (e), and (f) are the instantaneous velocity field reference values obtained by numerical method, and (c), (d), (g), and (h) are the velocity fields obtained by model prediction. Figure 9 The Euler-mean flow field of the two-dimensional rotating shallow water equation with linear bottom friction term is obtained by solving the ocean shallow water equation flow field prediction model in this embodiment of the invention; wherein, (a) is the baseline streamline diagram of the Euler-mean flow field obtained by numerical method solution, and (b) is the Euler-mean flow field streamline diagram obtained by model prediction. Figure 10 The Lagrange particle tracking trajectory is obtained by solving the two-dimensional rotating shallow water equation with linear bottom friction term using the ocean shallow water equation flow field prediction model in this embodiment of the invention; wherein, (a) is a particle tracking trajectory diagram obtained by Lagrange particle tracking based on the flow field data solved by numerical method, and (b) is a Lagrange particle tracking trajectory diagram obtained based on model prediction. Figure 11 The above are the predicted velocity field results of the ocean shallow water equation flow field prediction model in this embodiment of the invention, which solves the two-dimensional rotating shallow water equation with linear bottom friction terms; where (a), (b), (e), and (f) are the instantaneous velocity field reference values obtained by numerical methods, and (c), (d), (g), and (h) are the velocity fields obtained by model prediction. Detailed Implementation
[0015] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0016] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0017] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0018] Example 1 like Figures 1 to 5 As shown, this embodiment provides a method for predicting the current field of shallow ocean equations based on neural operators, including the following steps: S1. Obtain the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through the flow field simulation program, and divide it into training set, validation set and test set according to a predetermined ratio; S2. Construct a shallow water equation flow field prediction model for the ocean, which includes a convolutional neural network module and a Fourier neural operator module. The convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion to reconstruct a composite feature representation containing multi-level implicit dynamic information. The Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system. S3. During the model training process, according to the preset training stage scheduling strategy, the real data in the training dataset and the prediction results of the ocean shallow water equation flow field prediction model itself in the previous time step are dynamically combined and used as the input data of the current time step to jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges. S4. Use the trained ocean shallow water equation flow field prediction model to predict the flow field data of the target water area.
[0019] The specific solution of this embodiment is as follows: S1. Obtain the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through the flow field simulation program, and divide it into training set, validation set and test set according to a predetermined ratio.
[0020] The initial dynamic conditions (i.e., initial state) of the target water area are obtained and input into the flow field simulation program. The program uses numerical methods to solve the shallow water equations of the ocean, iteratively calculating the dynamic evolution of the target water area within a set tidal cycle. As the simulation program progresses along the time dimension, key physical field variables (specifically including sea level height, velocity field, and static water depth, etc.) are extracted sequentially at preset fixed time steps, thereby generating a simulated flow field dataset that records the spatiotemporal evolution characteristics of the flow field. After the dataset is constructed, it is divided into training, validation, and test sets in an 8:1:1 ratio for subsequent model training and evaluation.
[0021] S2. Construct a shallow water equation flow field prediction model for the ocean, which includes a convolutional neural network module and a Fourier neural operator module. The convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion to reconstruct a composite feature representation containing multi-level implicit dynamic information. The Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system.
[0022] like Figure 2 As shown, the ocean shallow water equation flow field prediction model is mainly constructed based on a convolutional neural network module, a Fourier neural operator module, and linear layers. The convolutional neural network module is used for multi-channel feature mapping and deep fusion of the input data, enhancing the model's ability to capture and learn cross-channel physical information from the input data. The Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system. By capturing the global dependencies and long-term evolution laws of the input data in the frequency domain and learning the multi-scale dynamic characteristics of the input data in the spatial domain, it achieves accurate prediction of the flow field at a specific moment in the target area. The Fourier neural operator module can consist of a single Fourier layer or multiple cascaded Fourier layers to progressively improve the model's ability to express features in different frequency domains.
[0023] The reason for the above design is that the convolutional neural network module utilizes multiple parallel 1×1 convolutional branches to perform pointwise convolution operations in the spatial domain. This design can accurately extract and integrate cross-channel correlation features between variables such as sea level height, velocity field, and water depth at the same spatial grid point without loss of preservation of the original physical field spatial topology. After feature fusion, this module provides extremely rich multi-level high-dimensional implicit features and channel interaction information for the subsequent Fourier neural operator module to perform global feature extraction and learning. The Fourier layer in the Fourier neural operator module: at the frequency domain operation level, the fast Fourier transform is used to transform the input data from the spatial domain to the frequency domain, thereby quickly capturing the global dependency information of the data, which is highly consistent with the learning needs of large-scale ocean dynamics processes and can also accelerate the training efficiency of the model; at the spatial domain operation level, with the help of parallel multi-size convolutional local feature extraction in the Inception layer, it can well perceive the multi-scale neighborhood features of the input data, which is very suitable for capturing small-scale dynamic behaviors such as bottom friction processes and turbulence.
[0024] The ocean shallow water equation flow field prediction model consists of an encoding module, a linear layer, a convolutional neural network module, a Fourier neural operator module, another convolutional neural network module, and another linear layer. The linear layers are deployed at both the input and output ends of the model. The front-end linear layer performs linear transformations on the input data, increasing the dimensionality of the features and enabling the model to extract richer feature information in a higher-dimensional space. The rear-end linear layer decodes the complex nonlinear patterns extracted by the rear convolutional neural network module, mapping them back to the desired output dimension to generate the final flow field prediction data.
[0025] The convolutional neural network module of the ocean shallow water equation flow field prediction model extracts features from the input data. It uses multiple parallel convolution operation branches to map the input data to multi-level channel dimensions. Then, it fuses the outputs of each branch to achieve deep integration of cross-channel physical features, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information.
[0026] like Figure 3 As shown, the convolutional neural network module consists of multiple parallel convolutional layers, a feature fusion module, a nonlinear activation module, and residual connections.
[0027] The convolutional layers primarily perform 1×1 convolution operations. The role of convolution is to perform point-by-point cross-channel linear mapping on the input data, extracting and fusing implicit correlations between physical variables such as sea level height, velocity field, and water depth at the same spatial grid point while maintaining the physical field spatial resolution. Setting up multiple parallel 1×1 convolution operations to expand the data to different channel dimensions is to construct a multi-level feature representation capacity. This multi-dimensional channel mapping ensures that the model can form complementary nonlinear representations in high-dimensional space when processing different physical quantities, improving the model's fitting accuracy for multi-scale dynamic information in the data. The feature fusion module is mainly responsible for the deep integration of the outputs of multiple convolutional layers. Specifically, it first concatenates the feature tensors output from each branch along the channel dimension, and then, through convolution operations within this module, reduces the channel dimension of the fused data to the same dimension as the initial input of the convolutional neural network module, thereby achieving deep fusion and reconstruction of cross-channel physical features. The nonlinear activation module typically uses the GELU activation function to perform nonlinear activation processing on the feature data output from the above linear operations, further enhancing the model's ability to represent complex ocean dynamic processes nonlinearly. Residual connections are used to add the initial input of a module to the output after feature extraction and fusion across layers, which alleviates the gradient vanishing or gradient explosion problems that are prone to occur during the training of deep networks, and ensures that the model still has stable gradient propagation characteristics when the network depth is increased.
[0028] It should be noted that setting 3 convolutional layers in the example structure is a common setting, and it is not a requirement that the number of convolutional layers must be this number. Other reasonable settings for the number of convolutional layers are also applicable.
[0029] The Fourier neural operator module of the shallow ocean equation flow field prediction model extracts features from the input data. The convolutional neural network module at the tail further integrates the cross-channel information in the data output by the Fourier neural operator module and outputs the predicted flow field data through the linear layer at the end. Then, a loss value is calculated based on the difference between the predicted flow field data and the simulated flow field data, and the parameters of the shallow ocean equation flow field prediction model are updated based on this loss value.
[0030] like Figure 4 As shown, the Fourier neural operator module mainly consists of one or more Fourier layers connected in series. Each Fourier layer adopts a dual-branch cooperative structure, specifically including a frequency domain operation branch, a spatial domain operation branch, and a nonlinear activation layer.
[0031] In the frequency domain operation branch, the Fast Fourier Transform (FFT) layer is mainly responsible for using FFT to transform the input data from the spatial domain to the frequency domain, and efficiently extracting the global dependency features of the data in the frequency domain. The Inverse Fast Fourier Transform (IFFT) layer is mainly responsible for using IFFT to transform the extracted feature information from the frequency domain back to the spatial domain for further processing by subsequent networks.
[0032] The core of the spatial domain operation branch is the Inception layer, which is mainly responsible for sensing the multi-scale local dynamic features of the flow field. The Inception layer is a module based on parallel multi-size convolution operations, mainly composed of multiple parallel heterogeneous convolution branches, feature fusion modules, and residual connections.
[0033] The Inception layer comprises convolutional operations of varying sizes, primarily 1×1, 3×3, and 5×5, which capture local features of different granularities. This allows for precise perception of multi-scale correlations between physical quantities such as sea level height, velocity field, and water depth in processes like bottom friction and turbulence. The feature fusion module concatenates and fuses the outputs of these convolutional branches, reducing the channel dimension of the fused features to match the input dimension of the Fourier layer through internal mapping. To preserve the integrity of the original features and physical information, residual connections are introduced, linking the input and output data of the Inception layer. This ensures that the Inception layer captures multi-scale local features while retaining the basic information of the initial state, guaranteeing data integrity. Furthermore, this structure prevents gradient explosion risks associated with network deepening, thus ensuring the stability of model training. The introduction of the Inception layer enhances the model's ability to capture and learn multi-scale information, improving the completeness of feature extraction.
[0034] Nonlinear activation layers typically employ the GELU activation function, which can perform nonlinear mapping on the linear transformation results in the Fourier neural operator structure, thereby enhancing the model's expressive power and improving its learning performance on complex ocean dynamic processes.
[0035] Specifically, regarding the process of feature extraction and learning from input data in the ocean shallow water equation flow field prediction model: Before being input into the shallow ocean current field prediction model, the input data needs to be encoded and standardized by the encoding module: the current field data such as velocity field and sea level height are organized into a shape... The tensor. Then, predict the time for a given target. Perform periodic time encoding, that is, use trigonometric functions to... Encoded as sinusoidal time feature components Sum and cosine time characteristic components , It represents the tidal period and expands the encoding to be consistent with the flow field data. Resolution, and simultaneously, along with water depth, is expanded to a data volume consistent with the flow field data. As an additional feature, it is stitched together with the flow field data to form a shape of The encoded data. Water depth is a static physical quantity whose value remains constant throughout the calculation process. For data volume, The characteristic number of the flow field data. This indicates the number of additional features, where each feature represents a physical parameter. H represents height, and W represents width. This represents the resolution of the data in the height and width directions. The encoded input data is standardized along the channel dimension using zero-mean unit variance standardization, which involves subtracting the dataset mean from the data in each channel and dividing by the dataset standard deviation, resulting in normalized data that can be input into the convolutional neural network module. Then, this data is further increased in dimensionality to [value missing] using a linear layer. ,in, This represents the number of channels.
[0036] In this embodiment, the convolutional neural network module is configured with three parallel convolutional layers, and the channel dimension of the input data is further mapped to... , , In this context, the numbers represent a multiple relationship.
[0037] The convolutional neural network (CNN) module uses multiple parallel convolutional layers to upscale the input data to different channel dimensions, thereby capturing the complex dynamic coupling relationships between physical parameters at a spatial scale and extracting multi-level feature information: low-channel-dimensional branches are better able to capture basic, macroscopic physical features in the data; while high-channel-dimensional branches have a higher feature capacity and are more likely to decouple more complex, microscopic, nonlinear dynamic features from the data. Then, a feature fusion module performs deep channel interaction to further integrate these multi-level, complex feature information and reduce the channel dimension to match the initial input dimension. A nonlinear activation module then maps the data. Finally, residual connections are performed between the input and output of this module to prevent gradient explosion during training. Through these processes, the CNN module enables the model to learn complex feature information from the flow field data and provides the Fourier neural operator module with more comprehensive and expressive prior data.
[0038] The Fourier neural operator module utilizes multiple interconnected Fourier layers to further capture the global dependencies and long-term correlations inherent in the multi-level local feature information generated by the convolutional neural network module. The feature extraction process for a single Fourier layer is as follows: Figure 4 The processing flow of the Fourier layer, as described in the solid box, is shown. Specifically, it includes the following steps: (1) The data passed to the Fourier layer is transformed from the spatial domain to the frequency domain, so that the data is decomposed into several multi-scale frequency signals from low frequency to high frequency. These signals are truncated in the low-frequency mode, that is, only the first frequency is retained as needed. (1) Select low-frequency signals and ignore high-frequency signals. The reason for this is that low-frequency signals usually contain global dynamic information of the data and change smoothly, while high-frequency signals are numerous and contain a lot of noise, so these high-frequency signals are filtered out. This not only improves the calculation speed, but also ensures the accuracy of the model prediction. (2) Perform frequency modulation processing on the retained low-frequency signals, that is, multiply each retained low-frequency signal by a learnable matrix weight, that is, multiply the low-frequency signal by a learnable matrix weight. Complex weight matrices capture global features of the data and enhance the expressive power of the model. To retain the number of low-frequency signals, this process can be summarized as a frequency domain linear transformation operation, thereby obtaining the frequency-modulated low-frequency signals. Then, these low-frequency signals are transformed from the frequency domain back to the spatial domain, thereby obtaining the global feature data of the flow field. This process (2) together with process (1) is called frequency domain operation. (3) While performing frequency domain operation, the data is first subjected to spatial domain linear transformation, that is, a 1×1 convolution operation is performed on the input data to achieve linear mapping in the spatial domain. Then, it is input into the Inception layer, and multi-scale information in the data is further extracted by multiple parallel multi-size convolution operations. This can compensate for the loss of small-scale local details caused by high-frequency truncation in frequency domain operation, thereby improving the multi-scale expression ability of the Fourier neural operator module. Next, the output of each branch is integrated and the channel dimension is restored through the feature fusion module. Finally, the input and output are residually connected to stabilize gradient propagation. This process (3) is called spatial domain operation. (4) The results of the frequency domain operation and the spatial domain operation are added together so that the Fourier neural operator module can capture both global feature information and extract sufficient local multi-scale feature information. Finally, the final flow field feature data of the Fourier layer is output through a nonlinear activation operation.
[0039] The above four steps can be expressed by the following formula: (1) in, The flow field characteristic data represents the output of the current Fourier layer. This represents the data input to the current Fourier layer (i.e., the data after processing by the front-end network or the previous Fourier layer). It is an activation function. This represents the multi-scale local feature extraction operation of the Inception layer. These are linear operations in the spatial domain. Corresponding spatial domain operations, and These represent the Fast Fourier Transform and its inverse transform, respectively. Represents a learnable complex weight matrix (multiplication operator). This indicates the frequency domain linear operation described.
[0040] Finally, after being processed by several cascaded Fourier layers, the Fourier neural operator module outputs the final composite flow field feature data. This data is then fed into the convolutional neural network module at the end to further integrate the complex cross-channel interaction information generated by the multiple alternating frequency and spatial domain transformations. Finally, it is restored to the physical dimension of the target flow field variables through the linear layer at the end, thus outputting the final predicted flow field data.
[0041] S3. During model training, according to the preset training phase scheduling strategy, the real data in the training dataset and the prediction results of the ocean shallow water equation flow field prediction model itself in the previous time step are dynamically combined and used as the input data of the current time step to jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges.
[0042] During model training, the loss value is calculated based on the difference between the predicted flow field data and the simulated flow field data. Specifically: The loss value of the ocean shallow water equation flow field prediction model is determined by calculating the difference between the predicted flow field data and the simulated flow field data output by the ocean shallow water equation flow field prediction model using a loss function. This mainly includes: (1) calculating the prediction loss based on the predicted flow field data and the simulated flow field data. (2) determining the physical residual loss of the predicted flow field data based on the two-dimensional rotating shallow water equation with a nonlinear bottom friction term. (3) weighted summing of the physical residual loss and the prediction loss to obtain the loss value.
[0043] Calculating the physical residual loss is to provide a physical constraint on the prediction of the ocean shallow water equation flow field prediction model, ensuring that the prediction of the ocean shallow water equation flow field prediction model is more in line with the physical laws defined by the equation. For the determination of the physical residual loss described in (2), the physical residual values of the predicted data on the mass conservation equation and momentum conservation equation of the two-dimensional rotating shallow water equation with nonlinear bottom friction term can be calculated separately, and the two can be weighted and summed to obtain the physical residual loss of the predicted data on the two-dimensional rotating shallow water equation.
[0044] Shallow water equations are used to describe the dynamic evolution of water bodies with free surfaces, such as shallow seas, lakes, and estuaries. In the two-dimensional rotating shallow water equations with nonlinear bottom friction terms in their original variable form, the continuity equation is used to characterize the mass conservation of the water body. Its physical meaning is that the rate of change of sea level height at a certain point with time should be equal to the negative of the horizontal flux divergence at that point. When predicted flow field data is substituted into the mass conservation equation, the physical residual loss... It can be composed of the sum of the rate of change of sea level height over time and the horizontal flux divergence, as shown in equation (2). Under ideal physical conditions, this residual should be 0:
[0045] in, The physical residuals on the mass conservation equation, Indicates sea level height. Indicates the total water depth. , They represent Velocity field in the direction.
[0046] The momentum equation is used to describe the dynamic balance of a fluid. Its core meaning is that the rate of change of the fluid velocity at a certain point with time, plus the dynamic change caused by advection, should be in balance with the surface pressure gradient force, the Coriolis force caused by the Earth's rotation, and external forces such as bottom friction at that point. When the predicted flow field data is substituted into the momentum equation, the physical residual loss can be composed of the local rate of change of velocity, the difference between the advection term and the external force terms (including gravity, Coriolis force, and bottom friction), as shown in equation (3). This residual should also be 0 under ideal physical conditions:
[0047] in, , They represent The physical residuals on the momentum conservation equation in the direction of the direction. For Coriolis force parameters, The coefficient of friction is the lowest. It is the acceleration due to gravity. and That is, the nonlinear bottom friction term; , They represent Velocity field in the direction; Indicates sea level height.
[0048] Calculate their physical residual losses By summing the norms, we obtain the physical residual loss of the predicted flow field data on the two-dimensional rotating shallow water equation, as shown in equation (4):
[0049] in, For physical residual loss, N This indicates the number of samples included in this batch of training sets. i Indicates the sample number; express Norm.
[0050] The prediction loss is obtained by calculating the difference between the predicted flow field data output by the shallow ocean equation flow field prediction model and the simulated flow field data.
[0051] The final loss value is obtained by weighted summing of the physical residual loss and the prediction loss, as shown in equation (5):
[0052] in, Indicates the loss value. For simulation flow field data, To predict flow field data, The mean square error between the calculated simulated flow field data and the predicted flow field data is used to measure the difference between the two. , This represents the weight value, which can be set to 0.8 or 0.5 based on experience.
[0053] It is important to note that the loss function calculation method used in determining the loss value (such as...) No specific restrictions are imposed; any reasonable method is applicable.
[0054] After multiple rounds of training, a well-trained ocean shallow water equation flow field prediction model corresponding to the initial dynamic conditions of the target water area is obtained.
[0055] like Figure 2 As shown, based on the above training process, an end-to-end "online" collaborative training mechanism can be constructed, enabling the convolutional neural network module and the Fourier neural operator module to be jointly optimized under the same training framework. Specifically, in order to improve the model's ability to fit the actual inference process and its long-term prediction stability, the model's input data source will gradually shift from relying entirely on the real dataset to relying on the model's prediction results at the previous time step as the training process progresses. To achieve the above smooth transition, the entire training process is divided into the following three stages: First, the entire training process is divided into three stages: early training, middle training, and late training. Then, in the early training stage, the model's input data is entirely taken from the dataset to ensure the stability of the initial learning process. In the middle training stage, the probability scheduling strategy shown in equation (6) is introduced to dynamically select the input source: (6) in, This indicates the probability that the input data is taken from the dataset. This indicates the probability that the input data is taken from the model's predicted output at the previous time step. For the current training round, It is an adjustment parameter that controls the rate of probability decay, typically set to 10, but usually... Through this probability mechanism, as the training rounds progress... As the number of inputs increases, the probability of the model using its own predictions as input will gradually increase. In the later stages of training, the input data consists entirely of the model's predictions from the previous time step, achieving fully end-to-end "online" training.
[0056] Training can be stopped when either of the following conditions is met: (1) the number of training rounds reaches the preset maximum number of rounds; (2) the loss value does not decrease in a number of consecutive rounds and reaches the preset threshold. This indicates that the ocean shallow water equation flow field prediction model has been trained.
[0057] The reason for adopting this end-to-end "online" collaborative training mechanism is that the shallow ocean equations exhibit significant nonlinearity and strong coupling characteristics, with close dependencies between state variables over time. On the one hand, if the training phase consistently uses real data from the dataset as input, the model will be unable to adapt to the input driven by its own predictions during the extrapolation phase, easily leading to "exposure bias" and resulting in error accumulation and divergence in long-term predictions. On the other hand, consistently using the model's own prediction output from the previous time step as input for the next time step during training will also have serious consequences: the model's solution to the shallow ocean equations has not yet converged in the early stages of training, and its prediction errors are large. If these heavily biased predictions are directly fed back, they will gradually amplify the errors as training progresses, causing gradient oscillations, loss fluctuations, or even complete failure to converge, making it difficult for the model to learn the correct physical laws.
[0058] Therefore, introducing the above training mechanism enables the ocean shallow water equation flow field prediction model to gradually adapt to the input structure of real-world scenarios while maintaining training stability, significantly improving the model's long-term prediction stability and robustness to error disturbances. Simultaneously, this strategy also promotes the convergence of the convolutional neural network module and the Fourier neural operator module to a parameter space more suitable for the overall task through collaborative optimization, enhancing the comprehensive modeling capability for multi-scale dynamic processes.
[0059] S4. Use the trained model to predict the flow field data of the target water area.
[0060] like Figure 5 As shown, the prediction method steps include: (1) determining the target water area in The dynamic conditions at that moment. (2) The target water area in The dynamic conditions at a given time are input into the ocean shallow water equation flow field prediction model for prediction, and the target water area is obtained. Predicted flow field data at any given time.
[0061] The ocean shallow water equation current field prediction model has been trained according to the training method in the aforementioned embodiments. When applying it, it is necessary to first determine the current state of the target water area at the current moment. The dynamic conditions (i.e., physical state quantities such as sea level height, velocity field, water depth, and target prediction time code) are then input into the trained shallow ocean equation flow field prediction model to obtain the target water area at the next time step. The model obtains the predicted flow field data at a given time. After acquiring the predicted flow field data, it can also generate corresponding visualization results based on the predicted flow field, such as drawing the streamline diagram of the target water area, particle tracking trajectory diagram, etc., to visually display the future spatial distribution characteristics of the flow field in the target water area and the dynamic drift trajectory of particles.
[0062] The initial flow field data and the set time interval The data is input into the shallow ocean current field prediction model trained according to the procedure in Example 1, and the model infers the predicted current field data after a specific time. The specific procedure is as follows: the starting time is... Initial flow field data and time interval The data is input into the shallow ocean current field prediction model, and after forward propagation inference, the following results are obtained. Predicted flow field data at time Then Flow field data and time interval at time points Input the ocean shallow water equation flow field prediction model and obtain Flow field data And so on, using the predicted output from the previous time step as the input for the next time step, the autoregressive iterative calculation continues until the entire tidal cycle is covered. Among them, it is necessary to include The flow field data at time t is input into the ocean shallow water equation flow field prediction model, where all time interval sequences are: The predicted flow field data at each discrete time point obtained using the ocean shallow water equation flow field prediction model are as follows: In the above process, Flow field data at time points Include Data such as sea level height, velocity field, and water depth at any given time, and model-predicted flow field data. This includes data such as sea level height and velocity field.
[0063] Figure 6 As shown in (a)-(b), the Euler mean flow field streamlines are obtained by predicting the flow field data at various times based on the ocean shallow water equation flow field prediction model. It can be found that the Euler mean flow field predicted by the model is highly consistent with the numerical reference, indicating that after training, the model can obtain the instantaneous flow field data at various times with relatively high accuracy and achieve a good flow field prediction effect.
[0064] Specifically, the aforementioned Euler-mean flow field streamline diagram is obtained based on the Euler-mean residual flow after model inference. The Euler-mean residual flow is obtained by using a shallow ocean equation flow field prediction model to obtain the entire tidal cycle. After obtaining the predicted flow field data at each discrete moment, the instantaneous velocity field data at each spatial grid point is averaged by time integration. The specific discretization calculation method is shown in Equation (7).
[0065]
[0066] in, , Let x and y represent the Eulerian mean residual currents in the x and y directions, respectively, on a grid within the target water area. This represents a complete tidal cycle. , They represent Instantaneous predicted flow field data at time 1 In the figure, the instantaneous velocity field in the x-direction and the instantaneous velocity field in the y-direction, Indicates the starting time of the integral calculation. Indicates a complete tidal cycle Within, the total number of steps the model performs inference, i.e. , , They represent the first The predicted instantaneous velocity fields in the x and y directions on a certain grid at a discrete time.
[0067] Figure 7 As shown in (a)-(b), these are Lagrange particle tracking trajectories obtained from the flow field data predicted at various times based on the ocean shallow water equation flow field prediction model. It can be seen that... Figure 7 The Lagrange particle tracking trajectory obtained based on model prediction is shown in (b). Figure 7 The numerical benchmarks shown in (a) are highly similar, which further illustrates that the model can predict the instantaneous flow field data at various times with relatively high accuracy.
[0068] Specifically, the aforementioned Lagrange particle tracking trajectory diagram is based on the Lagrange average displacement obtained after the model inference was completed. The Lagrange average displacement is obtained from the ocean shallow water equation flow field prediction model for the entire tidal cycle. When obtaining the instantaneous velocity field data at each discrete moment, the predicted instantaneous velocity field values at each spatial grid point are used to calculate the particle velocity field at each grid point according to equation (8). The net displacement within a time period allows us to determine the position of each particle based on its position during the reasoning process. and The position data at any moment is used to obtain the net displacement of the particles within the entire tidal cycle, and then the Lagrange average displacement of each particle within one tidal cycle is obtained according to equation (9).
[0069]
[0070]
[0071] in, , These represent the displacement of a single particle in the x-direction and the displacement in the y-direction, respectively. , Let X and Y represent the instantaneous velocity fields in the x-direction and y-direction of the predicted flow field data, respectively. , Let x and y represent the instantaneous flow velocity in the x-direction on the west side of the grid and the instantaneous flow velocity in the y-direction on the south side of the grid, respectively. , These represent the initial positions of a single particle in the x-direction and the y-direction, respectively. Indicates time interval, , These represent the Lagrange average displacement of a single particle within one tidal cycle. , These represent the individual particles at the th... The net displacement at each discrete moment. Represents a complete tidal cycle The total number of steps in the internal model for inference, i.e. .
[0072] Figure 8 As shown, this represents the predictions made by the ocean shallow water equation flow field prediction model at four different times. The instantaneous velocity field prediction pseudocolor image is shown, where different values are represented by different colors. Figure 8 The four sets of results (a) and (c), (b) and (d), (e) and (g), and (f) and (h) represent respectively , , and By comparing the instantaneous velocity field baseline and predicted values at four different times, it can be seen that the model's predicted values are highly consistent with the numerical baseline values. The results indicate that, after training, the model's predictions can accurately reflect the entire tidal cycle. The evolution characteristics of the internal velocity field were analyzed, resulting in a better flow field prediction effect.
[0073] Furthermore, to verify the effectiveness of the ocean shallow water equation flow field prediction model in solving different ocean shallow water equations, this embodiment also conducted experiments on the linear bottom friction parameterization scheme. Specifically, while keeping the network architecture, training strategy, and inference strategy of this embodiment completely unchanged, only the hydrodynamic control equations used to generate the dataset and the ocean shallow water equations used to calculate the physical residual loss of the loss function were replaced by the two-dimensional rotating shallow water equations with nonlinear bottom friction terms shown in equations (2) and (3) with the two-dimensional rotating shallow water equations with linear bottom friction terms shown in equation (10).
[0074]
[0075] Among the two momentum equations, and This is the linear bottom friction term.
[0076] Initial flow field data and time interval After inputting the data into the trained ocean shallow water equation flow field prediction model, the same iterative derivation as described above is performed. The resulting Eulerian mean flow field streamline diagram, Lagrange particle tracking trajectory diagram, and instantaneous velocity field prediction pseudocolor image are shown below. Figure 9 (a)-(b) Figure 10 (a)-(b) and Figure 11 As shown in (a)-(h), it can be seen that, according to the model prediction, the Eulerian mean flow field and the Lagrange particle tracking trajectory are highly consistent with the numerical reference in other regions, except for small jitters and jumps in the streamlines in local areas. The model's prediction effect under this linear low-friction condition is in line with expectations. Figure 11 The four sets of results (a) and (c), (b) and (d), (e) and (g), and (f) and (h) represent respectively , , and The instantaneous velocity field baseline and predicted values at four different times.
[0077] The proposed method for predicting ocean shallow water equation current fields based on Fourier neural operators in this embodiment incorporates the fundamental physical laws (conservation laws) of the shallow water equations as constraints into the loss function, guiding the model to learn solutions that conform to physical laws. This not only reduces the reliance on large amounts of simulation data, but more importantly, it gives the model's prediction results a solid physical basis, improving the prediction reliability and generalization ability in scenarios with scarce data or extrapolation.
[0078] Example 2 This embodiment provides a shallow ocean current field prediction system based on neural operators, including: The training data construction module is configured to: acquire the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through the flow field simulation program, and construct a training set; The prediction model building module is configured to: build a shallow water equation flow field prediction model for the ocean, which includes a convolutional neural network module and a Fourier neural operator module; wherein, the convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information; the Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system; The model training module is configured to: during model training, according to a preset training phase scheduling strategy, dynamically combine real data in the training dataset with the prediction results of the ocean shallow water equation flow field prediction model itself at the previous time step as input data for the current time step, and jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges. The model prediction module is configured to predict the flow field data of the target water area using a trained ocean shallow water equation flow field prediction model.
[0079] In further embodiments, the following is also provided: An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When executed by the processor, the computer instructions perform the method described in Embodiment 1. For brevity, further details are omitted here.
[0080] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0081] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.
[0082] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in Embodiment 1.
[0083] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0084] A computer program product includes a computer program that, when executed by a processor, implements the method described in Embodiment 1.
[0085] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer-executable instructions, such as instructions included in program modules, which execute in a device on a target real or virtual processor to perform the processes / methods described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or divided among program modules as needed. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside in both local and remote storage media.
[0086] The computer program code used to implement the methods of the present invention may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the computer or other programmable data processing device, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.
[0087] In the context of this invention, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0088] Those skilled in the art will recognize that the units and algorithm steps described in conjunction with the embodiments herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0089] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for predicting the current field of shallow ocean equations based on neural operators, characterized in that, Includes the following steps: Obtain the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through a flow field simulation program, and construct a training set; A shallow ocean current field prediction model is constructed, comprising a convolutional neural network module and a Fourier neural operator module. The convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information. The Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system. During model training, according to the preset training stage scheduling strategy, the real data in the training dataset and the prediction results of the ocean shallow water equation flow field prediction model itself in the previous time step are dynamically combined and used as the input data of the current time step to jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges. Predict the flow field data of the target water area using a trained ocean shallow water equation flow field prediction model.
2. The ocean shallow water equation current field prediction method based on neural operators as described in claim 1, characterized in that, The convolutional neural network module employs multiple parallel convolutional operation branches to map the input data to multi-level channel dimensions. Subsequently, feature fusion is performed on the outputs of each convolutional operation branch to achieve deep integration of cross-channel physical features, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information.
3. The ocean shallow water equation current field prediction method based on neural operators as described in claim 1, characterized in that, The Fourier neural operator module includes at least one Fourier layer, and each Fourier layer includes parallel frequency domain operation branches and spatial domain operation branches. The frequency domain operation branches capture the global dependencies and long-term evolution patterns of the input data, and the spatial domain operation branches learn the multi-scale dynamic characteristics of the input data.
4. The ocean shallow water equation current field prediction method based on neural operators as described in claim 1, characterized in that, The preset training phase scheduling strategy is as follows: Early training phase: The input data for the ocean shallow water equation flow field prediction model is entirely taken from the training dataset; Mid-training: Input data sources are dynamically selected according to a preset probability scheduling formula, which is: in, This represents the probability of selecting input data from the dataset. This indicates the probability of using the previous time step prediction result of the shallow ocean equation flow field prediction model as input data. For the current training round, To adjust the parameters; Later in the training phase: The input data of the ocean shallow water equation flow field prediction model consists entirely of the prediction results of the ocean shallow water equation flow field prediction model itself at the previous time step.
5. The ocean shallow water equation current field prediction method based on neural operators as described in claim 1, characterized in that, When training the ocean shallow water equation flow field prediction model, its loss function includes prediction loss and physical residual loss. The prediction loss is determined based on the difference between the predicted flow field data output by the model and the simulated flow field data. The physical residual values of the predicted data on the mass conservation equation and momentum conservation equation of the two-dimensional rotating shallow water equation with nonlinear bottom friction term are calculated respectively, and the two physical residual values are weighted and summed to determine the physical residual loss of the predicted data on the two-dimensional rotating shallow water equation.
6. The ocean shallow water equation current field prediction method based on neural operators as described in claim 1, characterized in that, Also includes: The flow field data at various times is predicted based on the ocean shallow water equation flow field prediction model. The Eulerian mean flow field streamline diagram is obtained by time integration averaging of the instantaneous velocity field data at each spatial grid point.
7. A shallow ocean current field prediction system based on neural operators, characterized in that, include: The training data construction module is configured to: acquire the initial dynamic conditions of the target water area, generate simulated flow field data within the corresponding period through the flow field simulation program, and construct a training set; The prediction model building module is configured to: build a shallow water equation flow field prediction model for the ocean, which includes a convolutional neural network module and a Fourier neural operator module; wherein, the convolutional neural network module is used to map the input data to a multi-level channel dimension and perform feature fusion, thereby reconstructing a composite feature representation containing multi-level implicit dynamic information; the Fourier neural operator module is used to learn the large-scale evolution mechanism of the ocean dynamic system; The model training module is configured to: during model training, according to a preset training phase scheduling strategy, dynamically combine real data in the training dataset with the prediction results of the ocean shallow water equation flow field prediction model itself at the previous time step as input data for the current time step, and jointly optimize the parameters of the ocean shallow water equation flow field prediction model until the ocean shallow water equation flow field prediction model converges. The model prediction module is configured to predict the flow field data of the target water area using a trained ocean shallow water equation flow field prediction model.
8. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the ocean shallow water equation flow field prediction method based on neural operators as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, complete the ocean shallow water equation flow field prediction method based on neural operators as described in any one of claims 1-6.
10. A computer program product, characterized in that, The method includes a computer program that, when executed by a processor, implements the ocean shallow water equation flow field prediction method based on neural operators as described in any one of claims 1-6.