A multi-sea-state element prediction method and system based on an adaptive distribution perception optimization strategy
Patent Information
- Application Number
- CN202611278094.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-21
AI Technical Summary
[0009]为克服现有海况多要素预测中忽视要素间物理尺度差异、缺乏轻量级历史记忆增强及自适应损失函数设计的问题,本发明提供一种基于自适应分布感知优化策略的多海况要素预测方法及系统,通过多尺度补丁专家差异化建模、局部敏感哈希记忆检索及要素感知损失约束的协同机制,实现整体预测精度与极端事件预测可靠性的同步提升
[0053](1)本发明通过可逆实例归一化对输入序列进行逐样本、逐通道的动态去平稳化处理,能够消除了海风、海浪、海流在物理量纲和局部分布上的不一致性,使后续模型能够专注于时序模式的建模而非分布差异的适应;同时,RevIN的可逆特性使得预测输出能够精确恢复至原始物理量纲,有利于保证预测结果的物理可解释性。
Smart Images

Figure CN122777962B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine environmental forecasting technology, specifically to a multi-sea state element prediction method and system based on an adaptive distributed sensing optimization strategy, which can be applied to scenarios such as marine disaster prevention and mitigation, maritime navigation safety, offshore wind power operation, and early warning of extreme marine meteorological disasters. Background Technology
[0002] Sea state element prediction (such as sea breeze, waves, and currents) is a fundamental task in the field of marine environmental forecasting, and it has significant application value in disaster prevention and mitigation, maritime navigation safety, offshore wind power facility operation and management, and early warning of extreme marine meteorological disasters. Accurate prediction of elements such as wave height is of great significance to the marine economy and marine engineering, and is also an important guarantee for maritime navigation safety. With the rapid development of observation technology and the accumulation of large amounts of marine observation data, using artificial intelligence methods such as deep learning for sea state element prediction has become an effective means to improve the accuracy of marine forecasts in today's digital age.
[0003] Achieving accurate multi-factor sea state forecasting faces two core challenges: first, it requires effective modeling of long-range time dependencies in ocean time-series data; second, it requires sensitivity to dynamic multi-scale patterns existing in different physical variables (sea wind, waves, and currents).
[0004] In recent years, time series prediction methods based on temporal patching and multi-scale expert architecture (AMS) have attracted widespread attention. These methods divide continuous time series into local patch blocks and then distribute different patches to expert databases of different scales for modeling through a routing mechanism. This architecture can, to some extent, capture both global periodicity and local abrupt dynamics. For example, existing research has extracted features across different time spans by constructing multi-scale feature fusion and attention mechanisms, and improved long-term prediction accuracy through sequence decomposition and multi-scale fusion attention networks.
[0005] However, existing multi-scale ocean state prediction methods generally implicitly assume a "symmetric homogeneity" assumption: that all predicted ocean elements (wind, waves, and currents) have equal prediction difficulty, and that the loss gradient captured at the normalized feature level can be seamlessly mapped back to the real physical domain with complex boundary constraints. This assumption overlooks an important fact: wind components are often accompanied by violent and unpredictable short-term local disturbances (high-frequency abrupt changes), while waves and currents exhibit relatively smooth, slow-changing trends and strong physical coupling between variables. In reality, wind, waves, and currents appear to be synchronously intertwined in the time domain, but their underlying physical evolution scales and prediction difficulties differ significantly—this difference between elements reveals that temporal synchronicity does not necessarily imply scale consistency. Modeling based solely on undifferentiated multi-element joint modeling or fixed loss constraints is insufficient to address the complex physical mechanisms of the coexistence of high-frequency abrupt changes and slow-changing backgrounds.
[0006] Furthermore, existing methods have significant shortcomings in loss function design. Most methods rely on general time-domain loss functions such as mean squared error, which are difficult to effectively handle scale heterogeneity among different ocean elements and gradient stability modeling problems under high-threshold extreme events. Although some studies have attempted to alleviate class imbalance in data by using weighted loss functions that consider wave height levels, a systematic technical solution for designing differentiated loss functions for the individual physical characteristics of sea winds, waves, and currents has yet to emerge.
[0007] At the model architecture level, recent multi-scale models have performed well in modeling temporal dependencies. However, many of these models rely on external hard auxiliary branches or overly complex heavy loss terms, which can easily lead to auxiliary term mismatch and attention gradient competition degradation on small-sample ocean datasets. These loosely coupled or overly constrained integration strategies leave a methodological gap: can a more integrated and compact framework be developed that, while achieving low-perturbation residual enhancement and historical typical pattern memory retrieval, synergistically reduces overall error and high-threshold extreme numerical errors through adaptive distribution-aware loss function design?
[0008] In summary, existing multi-factor sea state prediction technologies still face the following technical problems to be solved: (1) lack of multi-scale modeling mechanisms for different physical characteristics of ocean elements; (2) lack of lightweight historical time series pattern memory enhancement methods; and (3) lack of adaptive loss function design that can perceive the differences in the distribution of ocean elements. Summary of the Invention
[0009] To overcome the problems of neglecting the differences in physical scale between elements, lacking lightweight historical memory enhancement and adaptive loss function design in existing multi-element sea state prediction, this invention provides a multi-element sea state prediction method and system based on an adaptive distributed perception optimization strategy. Through the collaborative mechanism of multi-scale patch expert differential modeling, local sensitive hash memory retrieval and element perception loss constraint, the overall prediction accuracy and the reliability of extreme event prediction are improved simultaneously.
[0010] This invention provides a method for predicting multiple sea state elements based on an adaptive distribution-sensing optimization strategy, comprising the following steps:
[0011] S1. Obtain multi-element sea state time series data as input sequence, perform reversible instance normalization processing on the input sequence sample by sample and channel by channel, and map the normalized scalar observation values to a unified hidden feature space to obtain a shared hidden layer representation.
[0012] S2. The shared hidden layer representation is input into an adaptive multi-scale patch layer for temporal dependency modeling. The adaptive multi-scale patch layer decomposes the shared hidden layer representation into trend components and seasonal components. Based on the trend components and seasonal components, the representation is distributed to multiple expert libraries with different patch sizes through a noisy Top-K gated router for local and global temporal modeling. A protective residual fusion strategy is applied to the output branches of each expert library to obtain a fused representation. The protective residual fusion strategy includes: configuring learnable weights for each output branch, setting the initial learnable weights of a specified branch to be lower than the initial state of other branches, and scaling the outputs of each branch after layer normalization and a preset residual amplitude control factor, followed by dynamic soft selection fusion through an attention residual mixer.
[0013] S3. Enhance the historical temporal pattern memory of the fused representation, including:
[0014] Based on the differences between adjacent time steps in the fusion representation, a temporal novelty trajectory is extracted, and a first routing mask for controlling historical memory retrieval is generated based on the temporal novelty trajectory.
[0015] After local distribution stabilization of the fused representation, it is discretized into an integer patch feature identifier sequence through random projection and sign function binarization;
[0016] Perform multi-stage temporal shift obfuscation hashing on the patch feature identifier sequence, and retrieve the global historical embedded matrix from the preset historical prototype vocabulary;
[0017] The fused representation is used as the query vector, and the global historical embedded matrix is used as the key vector and value vector, respectively. Multi-head cross-gated fusion is performed to obtain the historical prototype memory representation, and a second confidence score is generated based on the global similarity between the fused representation and the historical prototype memory representation.
[0018] A dual cascaded gate is constructed based on the element-wise product of the first routing mask and the second confidence score. The historical prototype memory representation and the fused representation are residually superimposed to generate a memory-enhanced representation.
[0019] S4. Map the memory-enhanced representation input variables to the shared prediction head to the target prediction length, and restore the physical dimensions through reversible instance denormalization, and output the prediction results of multiple sea state elements.
[0020] S5. During the training phase, the prediction results and true values of the multi-sea state elements are input into the loss function module. The loss function module includes at least: a basic loss calculated using a numerically stable substitution form, an element perception loss that is differentiated and weighted according to the prediction difficulty of each sea state element, an auxiliary loss that constrains the consistency of the vector magnitude, and a correction loss that penalizes the underestimation behavior of preset high-threshold elements. The output of the loss function module is used as the basis for gradient backpropagation.
[0021] Furthermore, S1 specifically includes:
[0022] S1.1 Calculate the mean and standard deviation of each independent variable in the input sequence on the time axis, center the independent variable and divide it by the standard deviation, and then scale and translate it through learnable affine transformation parameters to complete the reversible instance normalization.
[0023] S1.2. The normalized independent variables are expanded in scalar dimension, and the scalar value of each time step is independently mapped to the feature vector of the preset dimension through a linear mapping layer to obtain the shared hidden layer representation.
[0024] Furthermore, in S2, the local temporal modeling uses an intra-patch temporal recursive modeler to capture short-term mutation trajectories along the internal time axis of the patch; the global temporal modeling uses an inter-patch temporal recursive modeler to expand the temporal features within each patch into labeled sequences and capture long-range dependencies between patches.
[0025] The specified branch includes a dual attention refinement branch, which reshapes the feature dimension through a time-series periodic branch to perform periodic alignment, and establishes physical coupling between multiple variables in the same time step through a channel variable branch. The difference between the outputs of the two branches is averaged and layered normalized to output a dual calibration residual.
[0026] In the protective residual fusion strategy, the initial Logits value corresponding to the initial learnable weight of the dual attention refinement branch is -1, and the initial Logits value corresponding to the initial learnable weight of other branches is 0. The output of each branch is normalized by the layer and scaled by the preset residual amplitude control factor, and then input into the attention residual mixer. The attention residual mixer dynamically and softly selects the fusion result from the candidate paths including the original input, each single-branch update path, and the multi-branch sum path.
[0027] Further, in step S3, extracting the temporal novelty trajectory based on the difference between adjacent time steps of the fused representation specifically includes:
[0028] Calculate the cosine similarity of the fused representation between each adjacent time step, and use the difference between the cosine similarity and 1 as the novelty score. After zero-padding each novelty score, divide it by the maximum absolute value of novelty in the current sequence, and scale the novelty score to a preset range to obtain the temporal novelty trajectory.
[0029] Further, in step S3, after local distribution stabilization of the fused representation, it is discretized into an integer patch feature identifier sequence through random projection and sign function binarization, specifically including:
[0030] Calculate the mean and standard deviation of the local distribution of the fused representation at each time step, and perform de-stationing processing;
[0031] The de-stable continuous features are input into a fixed random projection matrix for dimensionality reduction mapping. The mapping result is binarized using a sign function, and the binarized result is weighted and summed based on binary basis vectors to obtain an integer patch feature identifier sequence.
[0032] Furthermore, in step S3, the multi-order time-shift obfuscation hashing process specifically includes:
[0033] The patch feature identifier sequence is zero-padded and truncated according to the preset maximum order to construct a multi-time-series shift reference matrix containing the current identifier and first-order to multi-order hysteresis identifiers.
[0034] Prime multiplier vectors are generated based on random seeds. The current identifier and each lag identifier are multiplied by their corresponding prime multipliers. The product results are then fused using bitwise XOR logic to obtain a confused hash value.
[0035] The obfuscated hash value is moduloed against a preset multi-head vocabulary size matrix to generate a multi-head obfuscated hash scalar. Based on the multi-head obfuscated hash scalar and the address offset, the corresponding dense feature vector is extracted from the bus embedded vocabulary and concatenated to output the global history embedded matrix.
[0036] Furthermore, in step S3, the fused representation is used as the query vector, and the global historical embedded matrix is used as the key vector and value vector, respectively, for multi-head cross-gated fusion, specifically including:
[0037] The fused representation and the global history embedded matrix are divided into multiple sub-channels along the hidden feature dimension;
[0038] Within each sub-channel, the fusion representation of the current sub-channel is used as the query vector, and the output of the global history embedded matrix after linear mapping of the sub-channel is used as the key vector. The dot product similarity between the two is calculated, and soft temporal interleaving gating values are generated through square root magnitude convergence and Sigmoid activation.
[0039] Using the output of the global history embedded matrix after global shared linear mapping as the value vector, the soft temporal interleaving gate value of each sub-channel is broadcast multiplied and interleaved with weighted fusion to be combined with the value vector, and the historical prototype memory representation is output after being spliced along each sub-channel.
[0040] Furthermore, in S5, the basic loss adopts a log-hyperbolic cosine form;
[0041] The element perception loss is weighted by a preset channel weight matrix to calculate the predicted loss of each element. In the channel weight matrix, the weight of high-frequency abrupt change elements is greater than the weight of low-frequency stable elements.
[0042] The modulus consistency auxiliary loss is calculated based on the total velocity scalar synthesized from the vector components of the wind field or flow field;
[0043] The correction loss is constructed using a one-sided differentiable activation function. When the predicted value of the high-threshold element is lower than the preset threshold line, the prediction error is added to the total loss with a preset weight.
[0044] This invention also provides a multi-sea state element prediction system based on an adaptive distributed sensing optimization strategy, comprising:
[0045] The encoding module is used to acquire multi-element sea state time series data as input sequence, perform reversible instance normalization processing on the input sequence sample by sample and channel by channel, and map the normalized scalar observation values to a unified hidden feature space to obtain a shared hidden layer representation.
[0046] A multi-scale temporal modeling module is used to input the shared hidden layer representation into an adaptive multi-scale patch layer for temporal dependency modeling. The adaptive multi-scale patch layer decomposes the shared hidden layer representation into trend components and seasonal components. Based on the trend components and seasonal components, the components are distributed to multiple expert libraries with different patch sizes through a noisy Top-K gated router for local and global temporal modeling. A protective residual fusion strategy is applied to the output branches of each expert library to obtain a fused representation. The protective residual fusion strategy includes: configuring learnable weights for each output branch, setting the initial learnable weights of a specified branch to be lower than the initial state of other branches, and scaling the outputs of each branch after layer normalization and a preset residual amplitude control factor, followed by dynamic soft selection fusion through an attention residual mixer.
[0047] A historical memory enhancement module is used to enhance the historical temporal pattern memory of the fused representation, including: extracting a temporal novelty trajectory based on the difference between adjacent time steps of the fused representation, and generating a first routing mask based on the temporal novelty trajectory; after local distribution stabilization of the fused representation, discretizing it into an integer patch feature identifier sequence through random projection and sign function binarization; performing multi-order temporal shift obfuscation hashing on the patch feature identifier sequence, and retrieving a global historical embedding matrix from a preset historical prototype vocabulary; using the fused representation as a query vector and the global historical embedding matrix as a key vector and value vector respectively, performing multi-head cross-gating fusion to obtain a historical prototype memory representation, and generating a second confidence score based on the global similarity between the fused representation and the historical prototype memory representation; constructing a dual cascaded gate based on the element-wise product of the first routing mask and the second confidence score, and performing residual superposition of the historical prototype memory representation and the fused representation to generate a memory-enhanced representation;
[0048] The prediction output module is used to map the memory-enhanced representation input variables to the shared prediction head to the target prediction length, and restore the physical dimensions through reversible instance denormalization, and output the prediction results of multiple sea state elements.
[0049] The loss constraint module is used to input the prediction results and true values of the multi-sea state elements into the loss function module during the training phase. The loss function module includes at least: a basic loss calculated using a numerically stable substitution form, an element perception loss that is differentiated and weighted according to the prediction difficulty of each sea state element, an auxiliary loss that constrains the consistency of the constraint vector magnitude, and a correction loss that targets the underestimation behavior of elements with a preset high threshold. The output of the loss function module is used as the basis for gradient backpropagation.
[0050] Furthermore, in the historical memory enhancement module, the multi-order temporal shift obfuscation hashing process specifically includes:
[0051] The patch feature identifier sequence is zero-padded and truncated according to the preset maximum order to construct a multi-time shift reference matrix containing the current identifier and first-order to multi-order lag identifiers; prime multiplier vectors are generated based on random seeds, and the current identifier and each order lag identifier are multiplied by the corresponding prime multiplier, and the product results are fused by bitwise XOR logic to obtain a scrambled hash value; the scrambled hash value is moduloed on the preset multi-head vocabulary size matrix to generate a multi-head scrambled hash scalar, and the corresponding dense feature vectors are extracted from the bus embedded vocabulary according to the multi-head scrambled hash scalar and the address offset, and then concatenated to output the global history embedded matrix.
[0052] This invention discloses a method and system for predicting multiple sea state elements based on an adaptive distributed sensing optimization strategy, which has the following advantages compared with the prior art:
[0053] (1) This invention performs dynamic de-stationing processing on a sample-by-sample and channel-by-channel basis on the input sequence through reversible instance normalization, which can eliminate the inconsistency in physical dimensions and local distribution of sea wind, sea waves and ocean currents, so that the subsequent model can focus on modeling the time series pattern rather than adapting to the distribution difference; at the same time, the reversible nature of RevIN enables the prediction output to be accurately restored to the original physical dimensions, which is conducive to ensuring the physical interpretability of the prediction results.
[0054] (2) The present invention adopts a feature mapping strategy with dimension expansion, which maps the normalized scalar observations to a unified feature space independently through a linear layer. This avoids the introduction of a heavy encoder at the input end, which would lead to overfitting of small samples, thus leaving the modeling capacity to the subsequent AMS expert database.
[0055] (3) This invention addresses the differences in physical characteristics of sea breeze with high-frequency sudden changes, ocean waves with medium-frequency smoothness, and ocean currents with long-period slow changes. It separates the sequence components through a seasonal / trend decomposition component and then inputs them into a noisy Top-K gated router, enabling the routing decision to simultaneously perceive the long-period background and short-term fluctuations. This is beneficial for achieving adaptive sparse distribution of different time-series components among expert databases of long and short patch scales, and helps to solve the technical problem that a fixed single patch scale cannot take into account all factors.
[0056] (4) This invention sets the initial learnable weight of the dual attention residual refiner branch to be lower than the initial state of other branches, and explicitly constrains the residual magnitude of the main path by using the residual magnitude control factor λ, so that the complex branch is in an extremely low state in the early stage of training, which helps to avoid overfitting of small sample ocean datasets caused by directly stacking complex branches.
[0057] (5) This invention captures short-term mutations through Intra-patch Mamba, captures global long-range dependencies through Inter-patch Mamba, and performs periodic alignment and cross-variable physical coupling modeling through dual attention residual refiner. The three work together to achieve multi-dimensional temporal dependency capture of local mutations, global periodicity and cross-variable coupling, which makes up for the lack of periodic alignment and cross-variable collaborative modeling capabilities in the prior art.
[0058] (6) This invention converts continuous features into discrete patch identifier sequences through local sensitive hash discretization, and then retrieves relevant patterns from the historical prototype vocabulary through N-gram multi-order temporal shift obfuscation hashing. It supplements long-term memory information in the form of lightweight residuals, and achieves effective retrieval of historical typical patterns without the need to introduce external heavy auxiliary branches. This helps to avoid the auxiliary term mismatch and attention gradient competition degradation caused by external auxiliary branches on small sample datasets in the prior art.
[0059] (7) The present invention generates a first routing mask through temporal novelty trajectory and generates a second confidence score through global cosine similarity back check. The element-wise multiplication of the two constitutes a dual cascaded control gate, which can be verified from two dimensions: "whether memory needs to be retrieved" and "whether the retrieved memory is physically similar", which helps to prevent physical mismatch between historical memory and real-time sequence.
[0060] (8) The present invention divides the hidden dimension into multiple sub-channels by channel multiplication factor G. Each sub-channel is independently QKV gated and fused and then spliced together, which realizes more refined local feature dynamic calibration than global unified gating.
[0061] (9) This invention introduces a channel-based hard weight matrix based on the prediction difficulty of each marine element. It assigns high weights to highly volatile sea winds and high-risk waves, and low weights to gentle ocean currents, breaking the "symmetric homogeneity assumption" that all elements have equal prediction difficulty in existing technologies. This helps to avoid difficult elements being submerged by smoothing elements.
[0062] (10) The present invention uses hyperbolic cosine logarithmic loss as the basic loss, which can avoid numerical overflow of the exponential function when the error is large, thus ensuring the numerical stability of the training process.
[0063] (11) In the physical domain, the present invention constrains the consistency of wind field or flow field vector magnitudes through the modulus consistency auxiliary loss, and adds a directional penalty gradient to the systematic underestimation behavior of “predicting strong winds as light winds” through the ReLU function. This can directly serve the actual needs of marine disaster prevention and mitigation, and improve the prediction reliability of the model under extreme disaster events.
[0064] (12) Through the synergistic effect of the coding module, multi-scale routing and expert calculation module, historical time series pattern memory enhancement module and loss function module, the present invention forms a complete technical chain of "distribution adaptation - multi-scale modeling - historical memory compensation - differentiated optimization", which achieves the technical effect of synergistically reducing the overall error of multiple elements and the extreme numerical error of high threshold without destroying the stability of ocean waves and currents. Attached Figure Description
[0065] Figure 1 This is a flowchart illustrating the multi-sea state element prediction system based on the adaptive distributed sensing optimization strategy of the present invention. Detailed Implementation
[0066] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0067] like Figure 1 As shown in the figure, this embodiment provides a multi-sea state element prediction method based on an adaptive distribution-aware optimization strategy, which includes the following steps:
[0068] S1, Sea State Multi-Element Coding Stage: Input The sea state multi-element encoding module involves normalization based on Reversible Instance Normalization (RevIN), followed by dynamic de-stabilization on a sample-by-sample and channel-by-channel basis to address inconsistencies in the dimensions and local distributions of wind, current, and waves. Furthermore, for the normalized scalar output values, a dimensionality-expanding feature mapping strategy is employed to enhance the feature dimensions, resulting in a shared hidden layer representation. .
[0069] S1 includes the following sub-steps:
[0070] S1.1 Reversible instance normalization: that is, for input... In Calculate its time axis mean and standard deviation The normalization formula is:
[0071]
[0072] in and These are the learnable affine transformation parameters. For Among them All variables were normalized using the same method to obtain the stabilized result. .
[0073] S1.2, Feature mapping strategy for dimensional expansion: The final dimension (scalar observation) is extended to a unified feature space via a linear layer. Dimensionality. By mapping the scalar features of each independent variable separately, we avoid introducing a heavy encoder at the input, which could lead to overfitting on small samples, thus leaving the modeling capacity to the subsequent AMS expert database.
[0074]
[0075] in, Will Expanding to the last dimension , Linearly map it to To obtain the shared hidden layer representation .
[0076] S2, Multi-scale Routing and Expert Computation Stage: The obtained shared hidden layer representation is then processed. The input is fed into the multi-scale routing and expert computation module, which will share the hidden layer representation. The inputs are cascaded into multiple adaptive multi-scale patch layers (AMSLayers). Within each AMS layer, the sequence components are first separated using a seasonal / trend decomposition component and then fed into a noisy Top-K gated router to generate sparse routing weights. Next, the sparse distributor distributes the samples to expert libraries of patches at different time scales according to the weights to perform local and global temporal dependency modeling.
[0077] S2 includes the following sub-steps:
[0078] S2.1 Constructing an AMS Multi-Scale Patch Expert Router: Due to the drastic changes in sea winds (high-frequency abrupt changes), relatively smooth ocean waves (medium-frequency), and ocean currents with slow-changing backgrounds (long-period, low-frequency), a fixed single patch time scale cannot take all factors into account. The router does not directly calculate the original hidden layer features. Instead, it first extracts the trend and seasonality components of the feature sequence through decomposition techniques such as moving average filtering. This combination is then used as the router's input, making the routing decision more sensitive to long-period backgrounds and short-term fluctuations. During route selection, Gaussian noise is introduced into the gating Logits of each expert to improve the robustness of sparse selection and activate the highest-period experts. One expert (in this embodiment) ):
[0079]
[0080] in Large-scale patch experts (e.g., patch size = 32) are forced to take on more responsibility for capturing long-term, large-scale evolution, while small-scale patch experts (e.g., patch size = 8) adaptively capture details such as local wind speed changes.
[0081] S2.2 Construct local and global temporal dependency modeling modules, utilizing the Intra-patch Mamba, Inter-patch Mamba, and Leddam Dual-Attention Refiner to capture local and global temporal dependencies respectively. First, the hidden features are divided into `patch_num` local patch blocks on the timeline, each patch being `patch_size`. The Intra-patch Mamba executes along the timeline within each patch, directly modeling the recursive state between local times and preserving the short-term mutation trajectory at each time step. The Inter-patch Mamba unfolds the temporal features within each patch into tokens, with each token's feature dimension becoming... The relationships between patches are captured along the `patch_num` dimension. To compensate for the shortcomings of explicit periodic alignment and cross-variable collaborative modeling, a dual attention residual refiner is introduced in parallel: it uses temporal periodic branches to reshape the hidden features into... The attention mechanism is used to explicitly align and compare features with time-shifting periodicity; the hidden features are reshaped using channel variable branching. Within the same time step, the physical coupling and cross-dynamics between multiple variables of wind, wave, and current are explicitly established. The outputs of the time-series periodic branch and the channel variable branch are then... The variances are averaged and then normalized using LayerNorm to output low-weighted, double-calibrated residuals. Directly stacking complex branches can lead to overfitting on small ocean datasets; therefore, the following protective mechanism is employed:
[0082] During initialization, the dynamic learnable weights of the three branches are set. The initial Logits are The weights calculated using Softmax ensure that the dual-attention residual refiner module is in a very low state during the early stages of training, so as not to interfere with the already stable remaining two main branches; a fixed hyperparameter control factor is introduced. Explicitly constrain the residual magnitude entering the main path:
[0083]
[0084] in, , , These are the outputs of the in-patch modeling branch, the inter-patch modeling branch, and the dual attention refining branch, respectively.
[0085] Five candidate paths are received using an attention residual mixer: the original input Single branch update , , and the sum of the three branches The mixer dynamically generates soft selection weights based on the input samples, giving the model a protective soft routing function without destroying the underlying residuals, ultimately resulting in a representation modeled both locally and globally. .
[0086] S3, Variable Sharing Prediction Stage: The final feature representation is input into the variable sharing prediction head (PredictionHead). A linear layer maps the hidden layers back to the future prediction length. Finally, RevIN denormalization restores the true physical dimensions, and the prediction result is output. .
[0087] S4. Historical Time-Series Pattern Memory Enhancement Stage: After outputting from the specified AMS layer, the sea state element memory residual module is connected. The historical prototype pattern in the training set is retrieved through local sensitive hashing, and long-term memory information is supplemented to the current feature in the form of lightweight residuals.
[0088] S4 includes the following sub-steps:
[0089] S4.1 First, temporal mutation feature extraction and multi-dimensional route activation are performed by receiving the local and global modeling representations from the previous layer AMS. Calculate the cosine similarity between adjacent time steps to extract the entire temporal pattern variability track (Novelty Track):
[0090]
[0091] Zero-filling of novel trajectories ( The mutation sensitivity score is then forcibly and smoothly scaled to the maximum absolute novelty value within the current sequence, and divided by this value. Within the interval, the temporal mutation feature matrix is obtained. The original input and this matrix are concatenated along the last axis to form a multidimensional routing feature vector. This vector is then fed into a router composed of a multilayer perceptron and a GELU activation function, outputting two-dimensional routing logits. Softmax mapping is used to calculate the dynamic retention probability of whether the model needs to retrieve historical long-term temporal memories. .
[0092] S4.2 Reversible Local Distribution Stabilization and Local Sensitive Hash (LSH) Discretization: To enable continuous feature vectors to adaptively map to discrete integer indices (token IDs), the mean of the input features at each sample time step is first calculated. and standard deviation Local distribution normalization is performed to remove stationary drift. The stationary continuous features are then... The input is fed into the hash projection module. This module contains a fixed projection matrix that is pre-randomized by Gaussians and does not participate in gradient backpropagation. (Number of hash bits in this embodiment) ) and the base of a binary weighted basis vector The input features are centered using LayerNorm, then multiplied by a random projection matrix, and binarized and discretely segmented using a sign function. Finally, the three-dimensional continuous hidden state is transformed into a two-dimensional long integer patch feature label sequence through weighted summation of basis vectors. It achieves an adaptive regularization mapping from a high-dimensional continuous space to a discrete hash space:
[0093]
[0094] S4.3, Multi-head Embedded Storage Retrieval and Memory Evolution Based on N-gram: Generating Discrete... Subsequently, to capture the morphology of multi-order complex ocean processes across different time spans (such as second-order and third-order temporal correlations), data is cascaded into the NgramHashMapping and Engram core computing components. The NgramHashMapping process constructs a multi-order temporal shift matrix based on the configured maximum Num-gram length, using fixed-length constant zero-padding and temporal truncation operations to build a set of multi-order shift reference feature matrices containing the original input, first-order lag, second-order lag, and up to Num-1 order lag. Using prime multipliers pre-generated based on a specific random seed, the current patch ID is multiplied and obfuscated with the patch IDs of each lag, and then fused dynamically using bitwise XOR logic. The fused hash value is then modulo-counted against a multi-head vocabulary matrix constructed from large prime numbers, thereby expanding the space and projecting it into a multi-head obfuscated hash scalar matrix. To prevent hash collisions, the module internally maintains a bus-sized vocabulary embedding matrix. Multi-head obfuscated hash scalars achieve absolute address space isolation through address accumulation offsets. They directly retrieve and extract corresponding dense feature vectors from the vocabulary using multi-head obfuscated hash sequences, flatten and concatenate them to output a global history embedding matrix. .
[0095] To achieve precise dynamic calibration of local features, the system introduces a channel multiplication factor. (Default setting is 4), reducing the hidden dimension of each sub-channel to For the first Sub-channels ( ),in The mapping and fusion steps are as follows: Query vector (Query, (Based on the current real-time features of the main path, directly extracting the current main path's...) The timing hidden state of each sub-channel: , dimension ,in Indicates taking The All time steps and all variables of each sub-channel; key vector (Key, Distributed projection from the historical prototype large vocabulary, by the global history embedded matrix The input is generated by a dedicated linear mapping layer for this channel: , dimension Value vector (Value, Global evolutionary features derived from historical prototype large vocabularies. Generated through a globally shared linear projection layer mapping, representing historical morphological entity knowledge used for residual compensation: .calculate and The dot product similarity on the hidden dimension axis is used, and nonlinear amplitude convergence is achieved using the square root operator and the sign function. Finally, the soft temporal interleaving gating for the current channel is dynamically generated through Sigmoid activation. :
[0096]
[0097] All sub-channels Combining into a total gating tensor Through broadcast multiplication and the expanded value vector Interweaving, empowering, and integrating to output hybrid historical prototype memory representations :
[0098]
[0099] S4.4 To prevent severe physical mismatch between retrieved historical memories and the current real-time sequence, the system introduces a global review mechanism: calculating the global cosine similarity between the two along the hidden feature axis to examine the physical similarity between the historical evolution pattern and the real-time observation trajectory. This is combined with an adaptive temperature coefficient. With bias parameters The memory retrieval confidence score (conf_score) is constructed using the Sigmoid activation function:
[0100]
[0101] The hybrid memory representation is input into the multilayer perceptron evolutionary projector and mapped to obtain the final predicted historical prototype residual features. The routing mask generated in step S4.1 is then used... The physical confidence level generated in this step Element-by-element multiplication and composition are performed to construct a dual-cascaded control valve.
[0102] S5. Training Loss Constraint Phase: During the training phase, the predicted value... Compared with the true value The gradient is calculated by inputting the data into a specially designed loss function module. An adaptive distributed sensing optimization strategy is adopted based on the characteristics of various factors such as wind, waves, and currents to obtain better prediction results.
[0103] S5 includes the following sub-steps:
[0104] S5.1 First, calculate the basic loss. The calculation uses a numerically stable equivalent substitution formula to calculate the predicted value. Compared with the true value The hyperbolic cosine logarithmic loss between them avoids hardware-level exponential overflow when the error is large.
[0105] S5.2. Inverse normalize the predicted and actual sequences back to the real physical domain. Based on the prediction difficulty of each ocean element, explicitly introduce a channel-based hard weight matrix. (High weights are assigned to volatile sea winds and high-risk waves, while low weights are assigned to gentle currents), and basic losses are dynamically weighted to prevent difficult factors from being submerged by smoothing factors.
[0106] S5.3, Modulus Consistency and Disaster Mitigation Underestimation Addition: In the physical domain, the components of wind speed and flow velocity are synthesized to obtain a one-dimensional scalar total velocity, and the auxiliary loss of the wind speed scalar (weight set to 0.08) is calculated to constrain the vector modulus consistency; at the same time, a sudden strong wind threshold line is set, and the one-sided differentiable function ReLU is used to add a directional penalty gradient (weight set to 0.01) to the systematic underestimation behavior of "predicting strong wind as light wind".
[0107] The present invention also provides a multi-sea state element prediction system based on an adaptive distribution-aware optimization strategy, for performing the methods described in S1 to S5 above.
[0108] Those skilled in the art will understand that the various functional modules in the system embodiments of the present invention can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the aforementioned functional modules can be software programs composed of computer program instructions, which are stored in a computer-readable storage medium and loaded and executed by a processor to achieve the corresponding functions. When implemented in hardware, the aforementioned functional modules can be integrated into one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs), or other programmable logic devices.
[0109] The multi-sea state element prediction system of the present invention includes an encoding module, a multi-scale time series modeling module, a historical memory enhancement module, a prediction output module, and a loss constraint module.
[0110] The encoding module is used to acquire multi-factor sea state time-series data as input sequences. The input sequence is subjected to reversible instance normalization on a sample-by-sample and channel-by-channel basis, and the normalized scalar observations are mapped to a unified hidden feature space to obtain the shared hidden layer representation. The specific implementation of this encoding module is the same as that of S1 mentioned above, and will not be repeated here.
[0111] The multi-scale temporal modeling module, connected to the encoding module, is used to receive the shared hidden layer representation. The shared hidden layer representation is cascaded and input into multiple adaptive multi-scale patch layers for temporal dependency modeling. Within each adaptive multi-scale patch layer, the shared hidden layer representation is decomposed into trend and seasonal components. Based on the trend and seasonal components, these components are distributed to multiple expert libraries with different patch sizes via a noisy Top-K gated router for local and global temporal modeling. A protective residual fusion strategy is applied to the output branches of each expert library to obtain the fused representation. The specific implementation of this multi-scale temporal modeling module is the same as that of S2 mentioned above, and will not be repeated here.
[0112] The historical memory enhancement module, connected to the multi-scale temporal modeling module, is used to receive the fused representation. The fused representation is enhanced with historical temporal pattern memory. This module specifically includes:
[0113] The novelty trajectory extraction unit is used to extract temporal novelty trajectories based on the differences between adjacent time steps of the fused representation. And based on the temporal novelty trajectory, a first routing mask for controlling historical memory retrieval is generated. ;
[0114] The locality-sensitive hash discretization unit is used to localize the fused representation and then discretize it into an integer patch feature identifier sequence through random projection and sign function binarization. ;
[0115] The obfuscation hash retrieval unit is used to perform multi-stage temporal shift obfuscation hashing on the patch feature identifier sequence and retrieve the global historical embedded matrix from a preset historical prototype vocabulary. ;
[0116] A multi-head gating fusion unit is used to perform multi-head cross-gating fusion, using the fused representation as a query vector and the global historical embedded matrix as the key vector and value vector, respectively, to obtain the historical prototype memory representation. ;
[0117] A dual-cascaded gating unit is used to generate a second confidence score based on the global similarity between the fused representation and the historical prototype memory representation. A dual cascaded gate is constructed based on the element-wise product of the first routing mask and the second confidence score. The historical prototype memory representation and the fused representation are residually superimposed to generate a memory-enhanced representation.
[0118] The specific implementation of this historical memory enhancement module is the same as that of S4 mentioned above, and will not be repeated here.
[0119] The prediction output module, connected to the historical memory enhancement module, is used to share the memory enhancement representation input variables with the prediction head and map the hidden layers to the target prediction length through a linear layer. The physical dimensions are recovered through reversible inverse normalization, and the prediction results of multiple sea state elements are output. The specific implementation of this prediction output module is the same as that of S3 mentioned above, and will not be repeated here.
[0120] The loss constraint module, connected to the prediction output module, is used to process the prediction results of the multi-sea state elements during the training phase. Compared with the true value The common inputs are fed into the loss function module, which includes at least: a base loss calculated using a numerically stable substitution form; an element-aware loss weighted differently based on the prediction difficulty of each sea state element; an auxiliary loss constraining the consistency of the constraint vector magnitude; and a correction loss that penalizes the underestimation of elements with preset high thresholds. The output of the loss function module serves as the basis for gradient backpropagation. The specific implementation of this loss constraint module is the same as described in S5 above, and will not be repeated here.
[0121] The above modules are connected sequentially to form an information processing chain of "encoding → multi-scale modeling → memory enhancement → prediction → loss constraint (training phase)". During the prediction phase, the loss constraint module does not participate in the process. The encoding module, multi-scale temporal modeling module, historical memory enhancement module, and prediction output module process the input sequence sequentially and output the prediction result.
[0122] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the inventive concept of the present invention, and all such modifications or additions should fall within the protection scope of the present invention.
Claims
1. A method for predicting multiple sea state elements based on an adaptive distributed sensing optimization strategy, characterized in that, Includes the following steps: S1. Obtain time series data of multiple sea state elements as input sequence, wherein the multiple sea state elements include sea wind, sea waves and ocean current; perform reversible instance normalization processing on the input sequence sample by sample and channel by channel, and map the normalized scalar observation values to a unified hidden feature space to obtain a shared hidden layer representation. S2. Input the shared hidden layer representation into the adaptive multi-scale patch layer for temporal dependency modeling; The adaptive multi-scale patch layer decomposes the shared hidden layer representation into trend components and seasonal components. Based on the trend components and seasonal components, the patch layer distributes them to multiple expert libraries with different patch sizes through a noisy Top-K gated router for local and global time series modeling. A protective residual fusion strategy is applied to the output branches of each expert library to obtain the fused representation. The protective residual fusion strategy includes: configuring learnable weights for each output branch, setting the initial learnable weights of a specified branch to be lower than the initial state of other branches, and after scaling the outputs of each branch by layer normalization and a preset residual magnitude control factor, dynamically soft-selecting and fusing them through an attention residual mixer. S3. Enhance the historical temporal pattern memory of the fused representation, including: Based on the difference between adjacent time steps in the fusion representation, a temporal novelty trajectory is extracted, and a first routing mask for controlling the retrieval of historical memory is generated based on the temporal novelty trajectory. After local distribution stabilization of the fused representation, it is discretized into an integer patch feature identifier sequence through random projection and sign function binarization; Perform multi-stage temporal shift obfuscation hashing on the patch feature identifier sequence, and retrieve the global historical embedded matrix from the preset historical prototype vocabulary; The fused representation is used as the query vector, and the global historical embedded matrix is used as the key vector and value vector, respectively. Multi-head cross-gated fusion is performed to obtain the historical prototype memory representation, and a second confidence score is generated based on the global similarity between the fused representation and the historical prototype memory representation. A dual cascaded gate is constructed based on the element-wise product of the first routing mask and the second confidence score. The historical prototype memory representation and the fused representation are residually superimposed to generate a memory-enhanced representation. S4. Map the memory-enhanced representation input variables to the shared prediction head to the target prediction length, and restore the physical dimensions through reversible instance denormalization, and output the prediction results of multiple sea state elements. S5. During the training phase, the prediction results and true values of the multi-sea state elements are input into the loss function module. The loss function module includes at least: a basic loss calculated using a numerically stable substitution form, an element perception loss that is differentiated and weighted according to the prediction difficulty of each sea state element, an auxiliary loss that constrains the consistency of the vector magnitude, and a correction loss that penalizes the underestimation behavior of preset high-threshold elements. The output of the loss function module is used as the basis for gradient backpropagation.
2. The multi-sea state element prediction method based on an adaptive distribution sensing optimization strategy according to claim 1, characterized in that, S1 specifically includes: S1.1 Calculate the mean and standard deviation of each independent variable in the input sequence on the time axis, center the independent variable and divide it by the standard deviation, and then scale and translate it through learnable affine transformation parameters to complete the reversible instance normalization. S1.
2. The normalized independent variables are expanded in scalar dimension, and the scalar value of each time step is independently mapped to the feature vector of the preset dimension through a linear mapping layer to obtain the shared hidden layer representation.
3. The multi-sea state element prediction method based on an adaptive distributed sensing optimization strategy according to claim 2, characterized in that, In S2, the local time series modeling uses an intra-patch time series recursive modeler to capture short-term mutation trajectories along the internal time axis of the patch; the global time series modeling uses an inter-patch time series recursive modeler to expand the time series features within each patch into labeled sequences and capture long-range dependencies between patches. The specified branch includes a dual attention refinement branch, which reshapes the feature dimension through a time-series periodic branch to perform periodic alignment, and establishes physical coupling between multiple variables in the same time step through a channel variable branch. The difference between the outputs of the two branches is averaged and layered normalized to output a dual calibration residual. In the protective residual fusion strategy, the initial Logits value corresponding to the initial learnable weight of the dual attention refinement branch is -1, and the initial Logits value corresponding to the initial learnable weight of other branches is 0. The output of each branch is normalized by the layer and scaled by the preset residual amplitude control factor, and then input into the attention residual mixer. The attention residual mixer dynamically and softly selects the fusion result from the candidate paths including the original input, each single-branch update path, and the multi-branch sum path.
4. The multi-sea state element prediction method based on an adaptive distribution sensing optimization strategy according to claim 1, characterized in that, In step S3, extracting the temporal novelty trajectory based on the difference between adjacent time steps of the fused representation specifically includes: Calculate the cosine similarity of the fused representation between each adjacent time step, and use the difference between the cosine similarity and 1 as the novelty score. After zero-padding each novelty score, divide it by the maximum absolute value of novelty in the current sequence, and scale the novelty score to a preset range to obtain the temporal novelty trajectory.
5. The multi-sea state element prediction method based on an adaptive distribution sensing optimization strategy according to claim 4, characterized in that, In step S3, after local distribution stabilization of the fused representation, it is discretized into an integer patch feature identifier sequence through random projection and sign function binarization, specifically including: Calculate the mean and standard deviation of the local distribution of the fused representation at each time step, and perform de-stationing processing; The de-stable continuous features are input into a fixed random projection matrix for dimensionality reduction mapping. The mapping result is binarized using a sign function, and the binarized result is weighted and summed based on binary basis vectors to obtain an integer patch feature identifier sequence.
6. The multi-sea state element prediction method based on an adaptive distribution sensing optimization strategy according to claim 4, characterized in that, In step S3, the multi-order time-shift obfuscation hashing process specifically includes: The patch feature identifier sequence is zero-padded and truncated according to the preset maximum order to construct a multi-time-series shift reference matrix containing the current identifier and first-order to multi-order hysteresis identifiers. Prime multiplier vectors are generated based on random seeds. The current identifier and each lag identifier are multiplied by their corresponding prime multipliers. The product results are then fused using bitwise XOR logic to obtain a confused hash value. The obfuscated hash value is moduloed against a preset multi-head vocabulary size matrix to generate a multi-head obfuscated hash scalar. Based on the multi-head obfuscated hash scalar and the address offset, the corresponding dense feature vector is extracted from the bus embedded vocabulary and concatenated to output the global history embedded matrix.
7. The multi-sea state element prediction method based on an adaptive distributed sensing optimization strategy according to claim 4, characterized in that, In step S3, the fused representation is used as the query vector, and the global historical embedded matrix is used as the key vector and value vector, respectively, for multi-head cross-gated fusion, specifically including: The fused representation and the global history embedded matrix are divided into multiple sub-channels along the hidden feature dimension; Within each sub-channel, the fusion representation of the current sub-channel is used as the query vector, and the output of the global history embedded matrix after linear mapping of the sub-channel is used as the key vector. The dot product similarity between the two is calculated, and soft temporal interleaving gating values are generated through square root magnitude convergence and Sigmoid activation. Using the output of the global history embedded matrix after global shared linear mapping as the value vector, the soft temporal interleaving gate value of each sub-channel is broadcast multiplied and interleaved with weighted fusion to be combined with the value vector, and the historical prototype memory representation is output after being spliced along each sub-channel.
8. The multi-sea state element prediction method based on an adaptive distribution sensing optimization strategy according to claim 1, characterized in that, In S5, the basic loss is in the form of log-hyperbolic cosine. The element perception loss is weighted by a preset channel weight matrix to calculate the predicted loss of each element. In the channel weight matrix, the weight of high-frequency abrupt change elements is greater than the weight of low-frequency stable elements. The modulus consistency auxiliary loss is calculated based on the total velocity scalar synthesized from the vector components of the wind field or flow field; The correction loss is constructed using a one-sided differentiable activation function. When the predicted value of the high-threshold element is lower than the preset threshold line, the prediction error is added to the total loss with a preset weight.
9. A multi-sea state element prediction system based on an adaptive distributed sensing optimization strategy, used to execute the method as described in any one of claims 1 to 8, characterized in that, include: The encoding module is used to acquire multi-element sea state time series data as input sequence, perform reversible instance normalization processing on the input sequence sample by sample and channel by channel, and map the normalized scalar observation values to a unified hidden feature space to obtain a shared hidden layer representation. The multi-scale temporal modeling module is used to input the shared hidden layer representation into the adaptive multi-scale patch layer for temporal dependency modeling; The adaptive multi-scale patch layer decomposes the shared hidden layer representation into trend components and seasonal components. Based on the trend components and seasonal components, the patch layer distributes them to multiple expert libraries with different patch sizes through a noisy Top-K gated router for local and global time series modeling. A protective residual fusion strategy is applied to the output branches of each expert library to obtain the fused representation. The protective residual fusion strategy includes: configuring learnable weights for each output branch, setting the initial learnable weights of a specified branch to be lower than the initial state of other branches, and after scaling the outputs of each branch by layer normalization and a preset residual magnitude control factor, dynamically soft-selecting and fusing them through an attention residual mixer. A historical memory enhancement module is used to enhance the historical temporal pattern memory of the fused representation, including: extracting a temporal novelty trajectory based on the difference between adjacent time steps of the fused representation, and generating a first routing mask based on the temporal novelty trajectory; after local distribution stabilization of the fused representation, discretizing it into an integer patch feature identifier sequence through random projection and sign function binarization; performing multi-order temporal shift obfuscation hashing on the patch feature identifier sequence, and retrieving a global historical embedding matrix from a preset historical prototype vocabulary; using the fused representation as a query vector and the global historical embedding matrix as a key vector and value vector respectively, performing multi-head cross-gating fusion to obtain a historical prototype memory representation, and generating a second confidence score based on the global similarity between the fused representation and the historical prototype memory representation; constructing a dual cascaded gate based on the element-wise product of the first routing mask and the second confidence score, and performing residual superposition of the historical prototype memory representation and the fused representation to generate a memory-enhanced representation; The prediction output module is used to map the memory-enhanced representation input variables to the shared prediction head to the target prediction length, and restore the physical dimensions through reversible instance denormalization, and output the prediction results of multiple sea state elements. The loss constraint module is used to input the prediction results and true values of the multi-sea state elements into the loss function module during the training phase. The loss function module includes at least: a basic loss calculated using a numerically stable substitution form, an element perception loss that is differentiated and weighted according to the prediction difficulty of each sea state element, an auxiliary loss that constrains the consistency of the constraint vector magnitude, and a correction loss that targets the underestimation behavior of elements with a preset high threshold. The output of the loss function module is used as the basis for gradient backpropagation.
10. The multi-sea state element prediction system based on an adaptive distributed sensing optimization strategy according to claim 9, characterized in that, In the historical memory enhancement module, the multi-order temporal shift obfuscation hashing process specifically includes: The patch feature identifier sequence is zero-padded and truncated according to the preset maximum order to construct a multi-time shift reference matrix containing the current identifier and first-order to multi-order lag identifiers; prime multiplier vectors are generated based on random seeds, and the current identifier and each order lag identifier are multiplied by the corresponding prime multiplier, and the product results are fused by bitwise XOR logic to obtain a scrambled hash value; the scrambled hash value is moduloed on the preset multi-head vocabulary size matrix to generate a multi-head scrambled hash scalar, and the corresponding dense feature vectors are extracted from the bus embedded vocabulary according to the multi-head scrambled hash scalar and the address offset, and then concatenated to output the global history embedded matrix.
Citation Information
Patent Citations
Bohai sea temperature prediction model based on fusion model
CN121350616A
Plug-and-play parameterized memory enhancement prediction method for time sequence basic model
CN122072836A