Aquaculture multivariable water quality parameter prediction method and system

By employing adaptive characterization distillation and dynamic Gaussian kernel attention mechanisms, the problems of redundancy interference and distribution drift in the prediction of multivariate water quality parameters in aquaculture are solved, achieving high-precision, low-complexity multi-scale modeling and improving prediction stability and accuracy.

CN121365367AActive Publication Date: 2026-01-20SHANDONG INST OF BUSINESS & TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511946635.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-01-20
Estimated Expiration
2045-12-23

AI Technical Summary

Technical Problem

Existing multivariate water quality parameter prediction models for aquaculture suffer from problems such as redundant interference, sensitivity to changes in data distribution, and weak modeling of cross-scale and cross-variable coupling relationships when faced with multi-scale dynamic changes, seasonal drift, and cross-variable coupling relationships. These issues lead to unstable prediction performance and insufficient accuracy.

Method used

An adaptive representation distillation method based on the information bottleneck theory is adopted, which combines a dynamic Gaussian kernel and a dual-path routing attention mechanism. Through a cross-granularity sequence interactive perceptron, the symmetric coupling relationship between variables at different time granularities is explored. Wavelet decomposition and residual connection are used to ensure information fidelity, and attention weights are dynamically adjusted to achieve multi-scale feature extraction and adaptive modeling.

Benefits of technology

It significantly improves the model's adaptability and stability to multi-scale dynamics, enhances prediction accuracy and generalization performance, strengthens the model's robustness and feature interpretability in complex environments, and can efficiently capture dynamic changes in water quality parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365367A_ABST
    Figure CN121365367A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of water quality parameter prediction, and particularly relates to an aquaculture multivariable water quality parameter prediction method and system. The method comprises the following steps: acquiring a multivariable water quality monitoring time sequence; carrying out adaptive representation distillation treatment on the multivariable water quality monitoring time sequence to obtain a historical-future fused water quality sequence; on the basis of a historical-future fusion water quality sequence, an attention mechanism fusing a dynamic Gaussian kernel and double-path routing is adopted, and an attention result after weighted fusion is output through a two-stage routing strategy; on the basis of the attention result after weighted fusion, a cross-granularity sequence interactive perceptron is adopted to mine symmetrical coupling relations between different time granularities and variables, and final output features are obtained; and mapping the final output feature into a predicted value of the target dimension through a full connection layer or a convolution layer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of water quality parameter prediction, and particularly relates to a water product breeding multivariate water quality parameter prediction method and system. BACKGROUND

[0002] Aquaculture is one of the most dynamic sectors in the global food system, and aquaculture products not only provide an important source of protein for human consumption, but also play a key role in the economy and the environment. The quality of farmed aquatic products is closely related to the water quality environment. Due to the dynamic changes in the amount and feeding amount of aquaculture, in addition to the lack of timely water purification, excessive feed and improper aquatic plant management often affect water quality. Therefore, efficient, real-time and accurate long-term prediction of aquaculture water quality is crucial for reducing the cost of aquaculture and improving fish yield and quality.

[0003] In the prior art, water product breeding multivariate water quality parameter prediction mainly relies on two types of methods: modeling methods based on physical mechanisms and learning methods based on data-driven. The former describes the physical process by establishing system dynamics equations, has certain interpretability, but when facing complex nonlinear, multi-source disturbance and high-dimensional data, it is easy to have problems such as equation distortion, parameter identification difficulty and high computational complexity, resulting in insufficient model generalization performance. The latter, such as traditional machine learning methods (support vector machine, random forest, hidden Markov model, etc.), can learn rules from data, but relies on manual feature engineering, has limited ability to describe data distribution changes and long-range dependencies, and is difficult to adapt to dynamic changes in multi-scale time sequence features.

[0004] In recent years, deep learning methods (such as LSTM, GRU, TCN, etc.) have made certain progress in water quality parameter prediction, and can automatically extract features through hierarchical structure. However, this kind of method still has significant deficiencies in processing long sequences or non-stationary sequences: the gradient vanishing of the recurrent structure model is easy to appear, and the fixed receptive field of the convolution model limits the capture of global dependencies; at the same time, it has poor interpretability, high sensitivity to hyperparameters, and is difficult to be stably applied in multivariate complex systems.

[0005] The emergence of the Transformer model provides a new idea for water quality parameter prediction based on global self-attention mechanism. It can capture the dependency between any time steps and effectively model the interaction between multiple variables. However, the standard Transformer has the problem of computational complexity growing with the square of the sequence length, and when faced with multi-scale dynamic changes, seasonal drift and cross-variable coupling relationships, it shows problems such as insufficient feature extraction, high information redundancy and decreased model generalization performance. Existing improvement methods (such as Informer, Autoformer, FEDformer, etc.) have made certain optimization in computational efficiency and feature extraction, but still have a series of technical bottlenecks that need to be solved: (1) Redundancy interference problem in periodic feature extraction: For sequences with strong seasonality or multi-periodicity, the attention mechanism of existing models has difficulty in accurately distinguishing key signals from background noise or redundant information when capturing periodic patterns. These redundant features will form interference in the model representation, not only diluting the weight of key information, (2) Insufficient adaptability to dynamic changes in data distribution: Water quality parameter data often undergoes statistical distribution drift (concept drift). The weight pattern learned by the traditional attention mechanism during the training phase is relatively fixed. Once the distribution characteristics of the test data change, the model cannot adaptively adjust its attention to key time steps, resulting in a decrease in feature capture ability and significant fluctuations in prediction performance, poor robustness.

[0006] (3) Weak modeling of cross-scale and cross-variable coupling relationships: Existing methods often treat short-term fluctuations and long-term trends in isolation, or fail to fully model the complex interaction effects of different variables at different time scales. This lack of joint dynamic modeling capability of "cross-scale-cross-variable" limits the further improvement of prediction accuracy. SUMMARY

[0007] In order to overcome the problems in the prior art, the present application provides a method and system for predicting multi-variable water quality parameters in aquaculture.

[0008] The technical solution of the present application to solve the above technical problems is as follows: In a first aspect, the present application provides a method for predicting multi-variable water quality parameters in aquaculture, comprising the following steps: Step 100: Obtain a multi-variable water quality monitoring time series; Step 200: Perform adaptive representation distillation processing on the multi-variable water quality monitoring time series to obtain a history-future fusion water quality sequence; Step 300: Based on the history-future fused water quality sequence, the attention mechanism of fused dynamic Gaussian kernel and double-path routing is adopted, and the weighted fused attention result is output through a two-stage routing selection strategy. Step 400: Based on the weighted fused attention result, a cross-granularity sequence interaction perception machine is adopted to mine the symmetric coupling relationship between different time granularities and variables, and the final output feature is obtained. Step 500: The final output feature is mapped to the predicted value of the target dimension through a fully connected layer or a convolutional layer.

[0009] Further, the multivariate water quality monitoring time series includes conductivity, dissolved oxygen, chlorophyll a, turbidity, temperature, and pH.

[0010] Further, step 200 includes: Discrete wavelet decomposition is performed on the input multivariate water quality monitoring time series to obtain approximation coefficients and detail coefficients. Based on the approximation coefficients and detail coefficients, filtering is performed, and the information bottleneck theory is used to retain key information and filter irrelevant features to obtain processed approximation coefficients and detail coefficients. Based on the processed approximation coefficients and detail coefficients, the time series estimation value after reconstruction is obtained by using wavelet reconstruction. The estimation value of the time series after reconstruction is divided into multiple sub-sequences, and the number of placeholders is calculated to initialize the future placeholder sequence. The multiple sub-sequences and the placeholder sequence are spliced to obtain the history-future fused water quality sequence.

[0011] Further, step 300 includes: Based on the history-future fused water quality sequence, a self-adaptive Gaussian kernel is constructed using a learnable standard deviation parameter, a causal mask offset is performed on the Gaussian kernel output, and then multiplied by the value vector of the position correlation branch to generate a position bias signal. Based on the history-future fused water quality sequence, linear mapping is performed to calculate the query vector, key vector, and value vector of the content correlation branch, and then the attention score is calculated. Through the routing mechanism, the position bias signal and the attention score are weighted and fused to obtain the fused attention score. Based on the fused attention score, the shared head and the routing head work together to output the weighted fused attention result.

[0012] Further, based on the fused attention score, the shared head and the routing head work together to output the weighted fused attention result, including: The score of each individual head and the score related to the head type are calculated to obtain the routing score is defined as: ; In the above formula, denotes the number of shared heads; and respectively denote the projection matrices of the shared head and the routing head; denotes the i-th input mark in the input; denotes the i-th input mark in the input; wherein the balance coefficient and balances the contributions of the shared head and the routing head, and is defined as: ; In the above formula, is a trainable projection matrix; is the hidden size of ; The weighted fusion attention result is calculated based on the routing score and the attention result after weighted fusion.

[0013] Further, the step 400 comprises: Different granularity local context features are extracted by time domain multi-scale convolution, and the features are enhanced by cross-scale splicing and channel reorganization to obtain the reorganized features; Based on the reorganized features, a double-path pooling mechanism is introduced, and a channel-adaptive scale factor and an offset are respectively generated by dimension reduction-nonlinear activation-dimension increase operation; Based on the channel-adaptive scale factor and the offset, a dynamic gating mechanism is used to adaptively fuse local convolution features and global statistical features; The symmetric coupling relationship between local and global features is modeled by bidirectional outer product operation, and the original time sequence structure is reserved by combining residual connection to obtain the final output feature.

[0014] Further, based on the local features, global statistical information, scale fusion gate and bias fusion gate, the symmetric coupling relationship between local and global features is modeled by bidirectional outer product operation, and the original time sequence structure is reserved by combining residual connection to obtain the final output feature , comprising: ; ; In the above formula, denotes the result of bidirectional outer product operation; denotes the i-th channel scale fusion gate; i denotes the i-th channel scale fusion gate; denotes the i-th channel scale fusion gate; i denotes the i-th channel scale fusion gate; denotes the i-th channel scale fusion gate; jbias fusion gate of the channel; global information of the channel; j global information of the channel; interaction weight matrix for adaptive learning; weighted fusion attention result; d channel dimension number.

[0015] In a second aspect, a water farming multivariate water quality parameter prediction system is provided, which comprises a data acquisition and input module, an adaptive representation distillation module, a dual-path routing attention mechanism module, a cross-granularity sequence interaction multi-layer perception module and an output module. The input module is used to acquire and input multivariate water quality monitoring time series. The adaptive representation distillation module is used to process the input multivariate water quality monitoring time series to obtain a history-future fusion water quality sequence. The dual-path routing attention mechanism module is used to output a weighted fusion attention result based on the history-future fusion water quality sequence by using a fusion dynamic Gaussian kernel and a dual-path routing attention mechanism through a two-stage routing selection strategy. The cross-granularity sequence interaction multi-layer perception module is used to obtain final output features by using a cross-granularity sequence interaction perception mechanism to mine the symmetric coupling relationship between different time granularities and variables based on the weighted fusion attention result. The output module is used to map the final output features to a target dimension prediction value through a fully connected layer or a convolution layer.

[0016] Compared with the prior art, the present application has the following technical effects: (1) The existing water farming multivariate water quality parameter prediction model needs to introduce a large number of parameters in multi-scale dynamic modeling, and is prone to redundant information interference and noise amplification when processing features of different time scales, resulting in high model complexity, unstable training and poor generalization performance. The present application proposes an adaptive representation distillation method based on information bottleneck theory. First, the original time series is divided into different frequency components by wavelet decomposition to extract multi-scale features; then an information bottleneck mechanism is introduced in the feature layer to compress redundant information and select key information; then a residual connection structure is used to ensure continuous transmission and fusion of effective information; finally, wavelet inverse transform is used to restore the time domain signal to realize high-fidelity prediction feature reconstruction. This method can effectively suppress redundant and noise information while preserving the main dynamic features, reducing the number of model parameters and computational complexity; significantly improving the adaptability and stability of the model to different time scales, realizing high-precision, low-complexity multi-scale time series modeling.

[0017] (2) In view of the problem that the traditional multi-head attention mechanism is sensitive to data distribution changes and is difficult to adaptively adjust the attention mode in the prediction of multi-variable water quality parameters in aquaculture, leading to performance decline and insufficient feature extraction of the model in the distribution drift or non-stationary environment. The application proposes an attention mechanism that fuses dynamic Gaussian kernel and double-path routing. The mechanism uses dynamic Gaussian kernel to adaptively model the input sequence, enhancing the perception of distribution changes in different time periods. A global and local double-path attention structure is used to capture long-range dependencies and local changes simultaneously. Through the dynamic selection mechanism of shared heads and routing heads, adaptive feature filtering and fusion of multiple distribution modes are realized. When facing time distribution drift, non-stationarity and heterogeneous data, the mechanism can dynamically adjust the attention weight distribution, effectively enhancing the model's ability to capture key features and robustness, thereby improving the prediction accuracy and generalization performance of the model in complex environments.

[0018] (3) The existing multi-variable water quality parameter prediction model in aquaculture is insufficient in modeling cross-scale correlation and cross-variable dependence, making it difficult to capture the dynamic coupling relationship between short-term fluctuations and long-term trends, resulting in a decline in prediction accuracy and structural interpretability. The application proposes a cross-granularity sequence perception MLP structure. The structure introduces a multi-scale convolution branch in the time domain to extract local context features, and realizes multi-granularity information fusion through feature concatenation and channel reorganization. Further, a double-path pooling mechanism is used to aggregate global statistical features, and a parameter-decoupled bottleneck MLP is used to explicitly model the high-order coupling between variables. Finally, dynamic gating and bidirectional outer product operations are used to realize adaptive fusion of local and global features. This method can fully describe the dynamic dependence between different variables and different time scales, enabling collaborative modeling of short-term changes and long-term trends. It improves prediction accuracy while effectively enhancing the model's structural expression ability and feature interpretability. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0020] Figure 1 The figure is a schematic diagram of the overall structure of the system of the present application. Figure 2 The figure is a schematic diagram of the adaptive representation distillation structure of the present application. Figure 3 The figure is the overall framework of the double-path routing attention mechanism of the present application. Figure 4The structure and calculation process of a single attention head in the dual-path routing attention mechanism of the application; Figure 5 The conductivity fitting curve; Figure 6 The conductivity regression scatter plot; Figure 7 The temperature fitting curve; Figure 8 The temperature regression scatter plot; Figure 9 The dissolved oxygen fitting curve; Figure 10 The dissolved oxygen regression scatter plot; Figure 11 The PH fitting curve; Figure 12 The PH regression scatter plot; Figure 13 The chlorophyll a fitting curve; Figure 14 The chlorophyll a regression scatter plot; Figure 15 The turbidity fitting curve; Figure 16 The turbidity regression scatter plot. DETAILED DESCRIPTION

[0021] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined object of the application, the specific embodiments, structures, features and effects of the technical solutions proposed by the present application are described in detail below in combination with the drawings and preferred embodiments. The specific features, structures or characteristics in one or more embodiments can be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as understood by those skilled in the art to which the present application belongs.

[0022] In an embodiment, referring to Figures 1-16 , a water farming multivariate water quality parameter prediction method is provided, comprising the following steps: Step 100: obtaining a multivariate water quality monitoring time series; Step 200: performing adaptive representation distillation processing on the multivariate water quality monitoring time series to obtain a history-future fusion water quality sequence; Step 300: based on the history-future fusion water quality sequence, using a fusion dynamic Gaussian kernel and a dual-path routing attention mechanism, and through a two-stage routing selection strategy, outputting a weighted fusion attention result; Step 400: based on the weighted fusion attention result, using a cross-granularity sequence interaction perception machine to mine the symmetric coupling relationship between different time granularities and variables to obtain the final output feature; Step 500: Map the final output feature to a prediction value of a target dimension through a fully connected layer or a convolutional layer.

[0023] The above steps are described in detail as follows: Step 100: Obtain and preprocess a multivariate water quality monitoring time series, which includes water quality monitoring indicators, i.e., conductivity, dissolved oxygen, chlorophyll a, turbidity, temperature, and pH.

[0024] The preprocessing includes missing value filling, outlier detection and correction, noise suppression, and necessary normalization processing on the original water quality monitoring data to eliminate the influence of sensor errors, environmental interference, and data collection discontinuity on subsequent modeling.

[0025] The multivariate water quality monitoring time series of the aquaculture water body includes water quality indicators such as conductivity, dissolved oxygen DO, chlorophyll a (Chl-a), turbidity, temperature, and pH. Each water quality monitoring indicator serves as a variable dimension of the input sequence, and no artificial weight needs to be set in advance. Its importance is learned by the model during the training process.

[0026] Step 200: Process the input multivariate water quality monitoring time series to retain key information while suppressing redundant features.

[0027] Multivariate water quality monitoring time series generally exhibit significant multiscale characteristics. Existing methods often rely on additional parameterization designs to capture multiscale features, which increases the computational burden of the model. In addition, due to significant differences between different data sets, the model often highly depends on tedious hyperparameter adjustment in actual application, thereby restricting its generalization ability in diversified scenarios. Especially when facing data with strong seasonal regularity, many models have difficulty in effectively distinguishing key signals from redundant features. These redundant features not only interfere with the learning process of the model and increase the prediction bias, but also may mask the potential real patterns in the data, leading to a decrease in the reliability of the prediction results. Based on this, the present embodiment proposes an adaptive representation distillation based on the information bottleneck theory. After the multivariate water quality parameter sequence enters the aquaculture multivariate water quality parameter prediction model, it will first pass through the adaptive representation distillation module based on the information bottleneck theory, which aims to extract the most critical and representative information from the multivariate water quality monitoring time series while removing as much redundant and irrelevant information as possible.

[0028] As Figure 2As shown, wavelet decomposition is used to decompose the time series into components of different frequencies to identify patterns and trends at different time resolutions, thereby comprehensively capturing feature information. Then, the information bottleneck theory is used to filter out redundant features that may be contained in the multi-scale information, and residual connections are used to ensure that valuable information is fully preserved during the filtering process. Wavelet reconstruction is used to reconstruct the processed data back to the time domain. Specifically, the following steps are included: Step 210: Perform discrete wavelet decomposition on the input multivariate water quality monitoring time series, decomposing it into approximation coefficients and detail coefficients.

[0029] For the input multivariate water quality monitoring time series matrix ,in, Indicates the length of the backtracking window; The number of variables representing water quality parameters includes water quality indicators such as dissolved oxygen (DO), chlorophyll a (Chl-a), water temperature, turbidity, salinity, and pH. The observation values ​​of each variable over time constitute the column vector of the matrix.

[0030] Wavelet transform decomposes multivariate water quality monitoring time series into approximate coefficients. and detail coefficient Among them, the approximation coefficient The component representing the overall trend or smoothing of a multivariate water quality monitoring time series reflects low-frequency information; while the detail coefficients... This captures fine-grained high-frequency information, highlighting local fluctuations and details in the sequence. Discrete wavelet decomposition can be specifically represented as: ; ; in, Indicates the original water quality parameters over time. The possible values ​​of ; This is a scaling function, corresponding to a low-pass filter, used to extract the low-frequency trend components of the signal; This is a wavelet function, corresponding to a high-pass filter, used to extract high-frequency local variation features of a signal; and These are the filter coefficients when expanding the scaling function and wavelet function, respectively; and These represent the number of coefficients for the low-pass and high-pass filters, respectively; This is the filter coefficient index, used to control the translation position of the function; and Let represent the scaling and translation forms of the scaling function and wavelet function, respectively, where "2t" represents the scaling change. k " indicates translation; integral symbol" denotes a convolution operation on the time axis, which is used to extract signal components at corresponding scales.

[0031] Through the wavelet decomposition described above, the model can obtain the trend characteristics and local detail characteristics of the signal at different scales, thereby realizing fine modeling of the dynamics of complex time series.

[0032] Step 220: Filtering based on the approximation coefficients and the detail coefficients, and using the information bottleneck theory to retain key information and filter irrelevant features to obtain processed approximation coefficients and detail coefficients.

[0033] After completing the wavelet decomposition to obtain the approximation coefficients and the detail coefficients , further processing is performed on both through filtering operations.

[0034] Let denote the original coefficients, i.e., the approximation coefficients and the detail coefficients obtained through wavelet decomposition; denote the filtered results. At this time, and are regarded as random variables, and their joint distribution is .

[0035] The mutual information between two random variables quantifies the amount of information shared between and . The mutual information between joint distributions is defined as follows: ; where is the KL divergence, which is used to quantify the difference between the joint distribution and the product of the marginal distributions ; denotes the joint probability of taking value and taking value , is the set of values; denotes the marginal probability distribution of ; denotes the marginal probability distribution of ; denotes the entropy of , indicating its uncertainty or information amount; denotes the conditional entropy of given , indicating the remaining uncertainty after knowing .

[0036] ​Define random variables in the intermediate hidden layer It follows the Markov chain principle. And mutual information satisfies .

[0037] Although it is passed to the intermediate layer Information loss is inevitable during the process, but Predictions were retained. The most critical information is required, while irrelevant features are filtered out. Therefore, it is necessary to maximize... and Mutual information between them, while minimizing and Mutual information between them: ; in, It is a trade-off parameter that balances information retention with redundancy filtering: maximize : Ensure Z retains the prediction Key information required, such as water quality trends or anomalies; minimize : Inhibit Z-interaction Irrelevant redundant information, such as noise or minor fluctuations.

[0038] Through this optimization, the intermediate layer Z achieves adaptive compression and purification of the original coefficients: preserving the prediction target while maintaining the original coefficients. The core information is filtered out, and the interference features are filtered out, thereby improving the model's efficiency and robustness in modeling complex water quality dynamics.

[0039] Step 230: Based on the processed approximation coefficients and detail coefficients, reconstruct the time domain using wavelets to obtain the estimated value of the time series.

[0040] After performing discrete wavelet decomposition and filtering on the multivariate water quality time series, the processed approximation coefficients and detail coefficients are recombined using inverse wavelet transform (IWT) to reconstruct the estimated values ​​of the multivariate water quality monitoring time series. : ; In the above formula, This represents the approximation coefficients after filtering. This represents the detail factor after filtering.

[0041] Step 240: Estimated values ​​of the reconstructed time series Divided into n subsequences .

[0042] The number of subsequences n is determined by the subsequence window length W and the step size S, i.e. , represents a floor function.

[0043] Step 250: Calculate the number of placeholders, initialize the future placeholder sequence.

[0044] For the future data to be predicted, initialize the learnable placeholders, denoted as the future subsequence of length w. Subsequently, for the prediction range of H time steps, m placeholders are needed to represent the future. In this case, .

[0045] Step 260: Concatenate the subsequence with the placeholder sequence to obtain the history-future fused water quality sequence.

[0046] The n subsequences divided in step 240 and the m placeholders initialized in step 250 are concatenated in turn to obtain: ; In the above formula, denotes the history-future fused water quality sequence.

[0047] Step 300: Based on the history-future fused water quality sequence, adopt the attention mechanism of fused dynamic Gaussian kernel and double-path routing, and output the weighted fused attention result through a two-stage routing selection strategy.

[0048] In the prediction of aquaculture water quality parameter time series, the data distribution often drifts over time (distribution shift), i.e., the statistical characteristics of the time series change significantly in different time periods. Such distribution drift can weaken the generalization ability of the model on new data, leading to problems such as prediction accuracy decline, error increase, and output instability when a model performs well in a training period but faces different periods or external environment changes. Especially in long-term prediction tasks, the cumulative effect of distribution drift can further amplify model bias, making it difficult to accurately capture future dynamic trends.

[0049] Traditional multi-head attention mechanism (MHA) has certain limitations in dealing with distribution drift. Since the weight distribution of all attention heads is fixed during the training phase, they cannot flexibly adjust the focus mode according to the dynamic changes of data distribution. This static configuration may make the model perform well on the training data, but when the test data distribution drifts, some attention heads may become ineffective, causing the overall attention distribution to deviate from the key features, thereby reducing the prediction accuracy. In addition, the static attention mechanism is difficult to effectively filter feature representations that adapt to different time periods, easily introducing information redundancy or causing key information loss, limiting the model's ability to adapt to complex environmental changes.

[0050] Based on this, the embodiment proposes a dual-path routing attention mechanism that fuses dynamic Gaussian kernel and dual-branch attention mechanism. The overall framework is as shown in Figure 3 , which can efficiently model the multi-scale dependency relationship of time series in a global range, using a two-stage routing selection strategy. In the first stage, according to the characteristics of input features and task requirements, the attention heads that may have important significance are preliminarily filtered out; in the second stage, the preliminarily filtered attention heads are further selected and activated adaptively. In this way, the model can focus on specific distribution patterns and key areas. For example, in certain specific water quality change situations, the model can accurately identify which areas have the most significant changes in water quality indicators and which distribution patterns are closely related to water quality abnormal conditions, thereby more accurately capturing the rules and characteristics of water quality changes.

[0051] The dual-branch attention mechanism includes a position correlation branch and a content correlation branch. In order to more intuitively reveal its internal working principle, the structure and calculation process of a single attention head are as shown in Figure 4 . The history-future fused water quality sequence is first sent into the content correlation branch and the position correlation branch, where the position correlation branch uses a learnable standard deviation parameter to construct an adaptive Gaussian kernel after receiving the input to generate a position bias signal; the content correlation branch directly performs linear mapping on the input features to obtain Q, K, V representations. The dynamic position bias signal generated by the position correlation branch and the attention score calculated by the content correlation branch are aligned at the same time step and then sent into the routing module together, and the routing module generates routing weights according to the input features to weight and fuse the two types of attention results, thereby obtaining the final output of the attention head.

[0052] Step 310: Based on the history-future fused water quality sequence, an adaptive Gaussian kernel is constructed using a learnable standard deviation parameter, the Gaussian kernel output is subjected to causal mask offset, and then multiplied by the value vector of the position correlation branch to generate a position bias signal.

[0053] The position correlation branch describes the dynamic dependency structure between time steps better with the help of a Gaussian kernel guided position bias. A learnable standard deviation parameter An adaptive Gaussian kernel is constructed to introduce dynamic position bias for the attention assignment. The Gaussian kernel can adaptively adjust the position correlation strength between positions , enabling the model to capture local neighborhood features while maintaining the ability to depict global patterns.

[0054] ; In the above formula, represents the position index of the time series, and represents the association relationship between different time steps; is a numerical stability constant; represents the dynamic correlation weight between positions and , which adaptively adjusts the balance between local neighborhoods and global patterns through a Gaussian kernel; is generated by the input feature through an MLP, which controls the decay range of the correlation around the position ; this formula adjusts the local sensitivity to enable the model to maintain high resolution modeling of the neighborhood relationship under distribution drift while suppressing distant noise interference. When , attention is focused on the neighborhood (to deal with sudden distribution changes); when , the weight tends to be evenly distributed (suitable for stationary phases).

[0055] The Gaussian kernel output g is subjected to a causal mask offset, and then multiplied by the value vector of the position correlation branch to generate the position bias signal: ; ; In the above formula, is a value linear variation matrix; achieves a causal mask offset to prevent future information leakage; represents the generated position bias signal.

[0056] Step 320: Based on the history-future fused water quality sequence, perform linear mapping to calculate the query vector, key vector, and value vector of the content correlation branch, and then calculate the attention score.

[0057] The content correlation branch focuses on extracting significant pattern features in the time series signal, and performs linear mapping on the history-future fused water quality sequence to obtain the query vector Q, key vector K, and value vector of the content correlation branch : ; ; ; In the above formula, denotes the query linear transformation matrix; denotes the key linear transformation matrix; denotes the value linear transformation matrix.

[0058] Based on the query vector, the key vector, and the value vector, the attention score is calculated: ; In the above formula, denotes the key vector dimension, used to scale the dot product result to prevent gradient disappearance; denotes the normalization function, which converts the attention score into a probability distribution, highlighting significant pattern features such as water quality mutations and periodic fluctuations; denotes the value vector of the content correlation branch.

[0059] Step 330: Through the routing mechanism, the position bias signal and the attention score are weighted and fused to obtain the fused attention score.

[0060] The two types of attention results are adaptively fused through the routing mechanism, and the specific calculation formula is as follows: ; ; In the above formula, denotes the output fused attention score; denotes the dynamic gating weight, calculated through a learnable matrix, balancing the contributions of the content correlation branch and the position correlation branch; and are learnable matrices; denotes the activation function, introducing non-linear enhancement of expression capability.

[0061] When the input is stationary, such as long-term stable water quality, global dependence is strengthened, and the content correlation branch dominates; When a mutation is detected, such as an algal bloom outbreak, local smoothing is enhanced, and the position correlation branch dominates.

[0062] Step 340: Based on the fused attention score, the attention result is output through the collaborative work of the shared head and the routing head.

[0063] Combining the MoE (Mixed Expert) idea, each head is regarded as an expert, and through the collaborative work of the shared head and the routing head, combined with the two-stage routing strategy, efficient and stable feature extraction in the distributed drift scene is realized. The shared head ensures the capture of the basic dependence, the routing head dynamically activates for specific patterns, the balance coefficient realizes the adaptive adjustment of the weight, and the final output is the attention result after weighted fusion, which significantly improves the modeling ability of the model for complex dynamic scenes.

[0064] In this routing strategy, the routing score is determined by the score of each individual head and the score related to the head type. Specifically, given the th input token , the routing score is defined as: ; where denotes the number of shared heads; and denote the projection matrices of shared heads and routing heads, respectively; i denotes the i th attention head; the balance coefficient balances the contributions of shared heads and routing heads, defined as: ; where is a trainable projection matrix; is the hidden size of .

[0065] Ensure + =1, dynamically adjust the contribution of shared heads and routing heads: When the input is stable (such as long-term stable water quality), the contribution of shared heads is strengthened: →1, and the general feature extraction of shared heads is strengthened.

[0066] When a mutation is detected (such as an algae outbreak), the contribution of routing heads is enhanced: →1, and the specific pattern capture ability of routing heads is enhanced.

[0067] The total output is the combination of shared heads and routing heads activated through the gating mechanism: ; In the above formula, denotes the attention result after weighted fusion; denotes the i th output fused attention (calculated through the content-position double branch).

[0068] ​​The shared head guarantees the stable extraction of the base features, avoiding the loss of base information caused by distribution drift. The routing head activates only when certain distribution patterns are detected through Top-K sparse activation, reducing computational redundancy and improving response speed to mutations.

[0069] Step 400: Based on the weighted fused attention results, a cross-granularity sequence interaction perception machine is used to mine the symmetric coupling relationship between different time granularities and variables, to obtain the final output features.

[0070] The modeling of cross-channel correlation plays a key role in improving the accuracy and stability of water quality parameter prediction in aquaculture. In addition to the direct dependency between variables, the interaction of different variables at different time scales (such as the coupling of short-term fluctuations and long-term trends) also affects the evolution pattern of the sequence. If this cross-scale correlation is not fully captured, the model will often struggle to accurately depict complex temporal dynamics. When modeling multivariate dependencies, although multilayer perceptron (MLP) has the advantage of lower computational complexity and fewer parameters, as a fully connected structure, it is not sensitive to the order of input and is difficult to effectively model temporal dependencies. At the same time, due to the lack of inductive bias for time series, MLP is difficult to adaptively extract long-term dependencies and local patterns at different scales, thus limiting its application in complex time series prediction tasks.

[0071] To further improve the model's ability to model complex dynamic dependencies, a cross-granularity sequence interaction MLP is introduced. In water quality monitoring of aquaculture water bodies, there are complex coupling relationships between water quality changes at different time granularities and different variables. Cross-granularity sequence interaction MLP uses a bidirectional outer product operation to deeply mine these symmetric coupling relationships between different time granularities and variables. The bidirectional outer product operation can process and analyze data from multiple perspectives. It not only considers the mutual influence between different granularities in the time dimension, but also takes into account the interaction between different variables. Through this operation, the model can more comprehensively and deeply understand the complex dynamic dependencies in water quality data, thus more accurately predicting the trend of water quality changes and providing more reliable support for the management and decision-making of aquaculture water bodies.

[0072] Step 410: Based on the weighted fused attention results, different granular local context features are extracted through time-domain multi-scale convolution, and the feature expression is enhanced through cross-scale concatenation and channel reorganization to obtain the reorganized features.

[0073] In the time domain, different scale convolution branches are used to extract the weighted fused attention results Local context features are introduced to capture short-term temporal fluctuations and multi-granularity local patterns, and the representation ability is enhanced through cross-scale feature concatenation and hierarchical reorganization strategies, enabling the model to perceive local dynamic correlations between variables. The specific process is shown in the following formula: ; ; wherein, represents a channel reorganization operator, represents tensor concatenation; represents the size of the convolution kernel; represents features of different scales; represents reorganized features.

[0074] Step 420: Based on the reorganized features, a double-path pooling mechanism is introduced to generate channel-adaptive scale factors and offsets, respectively, through dimension reduction-nonlinear activation-dimension increase operations, and to calculate global statistical information.

[0075] The double-path pooling mechanism is introduced to aggregate global statistical information in the time dimension, thereby fusing long-term dependencies across variables and improving the model's perception of overall temporal patterns. A double-layer bottleneck MLP structure with decoupled parameters is designed to generate channel-adaptive scale factors and offsets, respectively, through dimension reduction-nonlinear activation-dimension increase operations, to explicitly model high-order coupling relationships between different variables and to strengthen the interaction of cross-scale information: ; ; ; wherein, represents feature concatenation, is a dimension reduction network with shared parameters: ; represents global statistical features; represents local statistical features; , represent the generated channel-adaptive scale factors and offsets, respectively; represents global statistical information.

[0076] Step 430: Based on the channel-adaptive scale factors and offsets, a dynamic gating mechanism is used to adaptively fuse local convolutional features and global statistical features to obtain scale fusion gates and bias fusion gates.

[0077] The dynamic gating mechanism adaptively fuses local convolutional features and global statistical features, enabling the model to accurately capture multi-scale interaction patterns between variables while preserving the original temporal dynamic structure.

[0078]

[0079] ; In the above formula, denotes the scale fusion gate; denotes the bias fusion gate; the Sigmoid function maps the input to the interval (0, 1), which plays the role of a gate.

[0080] Step 440: Based on the local features, global statistical information, scale fusion gate and bias fusion gate, the symmetric coupling relationship of local-global features is modeled by a bidirectional outer product operation, and the original time sequence structure is reserved by combining residual connection to realize efficient modeling of complex spatiotemporal dependencies, and the final output feature is obtained .

[0081] The process is represented as: ; ; In the above formula, denotes the result of the bidirectional outer product operation; denotes the i th channel scale fusion gate; denotes the i th channel local feature; denotes the j th channel bias fusion gate; denotes the j th channel global information; is an adaptive learning interaction weight matrix; d denotes the channel dimension number.

[0082] In order to improve the expression ability of bidirectional feature interaction, the invention defines the bidirectional outer product operation represented by the symbol as follows: ; wherein, denotes the standard outer product operation. This definition ensures that the information interaction between features has symmetry, which helps to capture the collaborative relationship across variables and scales.

[0083] By explicitly modeling the high-order interaction relationship between the two types of features through the bidirectional outer product operation, the local pattern and the global trend can participate in the final representation construction in a symmetric manner, thereby making up for the defect that traditional MLPs cannot capture cross-scale correlations. Because this structure can simultaneously enhance local sensitivity and global dependency modeling capability, and avoid redundant feature interference under the action of dynamic gating, it directly leads to significant improvement in prediction accuracy and stability of the model in processing complex, non-stationary multivariate time series.

[0084] Step 500: Map the final output feature to a target dimension of prediction value through a fully connected layer or a convolutional layer.

[0085] Interacted feature X out Contains complex dependency relationships across scales and variables; through a fully connected layer or a convolutional layer X out Map to a target dimension of prediction value: ; Wherein, represents a flattening operator, and Y represents a predicted multivariate water quality parameter time series.

[0086] To ensure the stability and reproducibility of the experimental results, the model uses uniform input sequence length and training configuration in all experimental settings. Specifically, the initial learning rate of the model is set to 0.001, the batch size is set to 24, the maximum number of training rounds is set to 100, and the early stopping strategy is used during training according to the validation set performance to alleviate the risk of overfitting. The experiment is carried out on an NVIDIA RTX 4060 (8GB) GPU, and the mean square error (MSE) is used as the loss function during training.

[0087] Figures 5-16 The present application demonstrates the prediction performance of the present application on various key water quality parameters (conductivity, dissolved oxygen, chlorophyll a, turbidity, temperature, pH) in the water quality dataset (including Burnet et al.), aiming to comprehensively evaluate the generalization ability of the model. In order to more intuitively reflect the adaptability and stability of the model in different scenarios, the present application uses time series graphs and scatter plots to visually compare and analyze the observed values and predicted values of each dataset. From the visualization results of the time series graph, the prediction curve of the present model on multiple monitoring sites and various water quality parameters is highly consistent with the true observed values, fully reflecting the excellent generalization ability of the model.

[0088] Specifically, the model can not only accurately fit long-term trends, such as periodic fluctuations in temperature, but also effectively respond to short-term mutations and abnormal changes, such as rapid rises and falls in high-frequency oscillation variables such as dissolved oxygen and turbidity. In addition, under different regional and environmental conditions of water bodies, the model fitting performance remains consistent, and there is no significant regional overfitting or underfitting phenomenon, indicating that it has strong spatiotemporal migration ability. Overall, the trend fidelity and fitting consistency reflected in the time series graph fully verify the model's generalization and adaptation ability in the face of diverse input features and time series patterns. From the visualization results of the scatter plot, the model shows a high degree of consistency in fitting quality and prediction accuracy in different regions and various water quality parameter prediction tasks, further verifying its excellent generalization ability. Specifically, the predicted values of each parameter show a strong linear relationship with the true values, and the scatter points are closely distributed near the ideal diagonal line, indicating that the model can effectively capture the true distribution characteristics of the data in different variables and regions. The determination coefficient of most indicators exceeds 0.85, and the slope is close to 1, indicating that the model not only has high prediction accuracy, but also has uniform error distribution without significant systematic bias or outliers. In summary, whether from the fitting degree of the predicted trend or from the perspective of error distribution, the model shows excellent stability and effectiveness in long-term water quality prediction tasks. In comparison with other models, the proposed model exhibits stronger generalization ability and prediction performance.

[0089] Based on the same inventive concept, the embodiments of the present application also provide a water breeding multivariate water quality parameter prediction system. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, so the specific limitations in one or more system embodiments provided below can refer to the limitations of the water breeding multivariate water quality parameter prediction method described above, and will not be repeated here.

[0090] Reference Figures 1-16 In this embodiment, a water breeding multivariate water quality parameter prediction system is provided, which comprises a data acquisition and input module, an adaptive representation distillation module, a dual-path routing attention mechanism module, a cross-granularity sequence interaction multi-layer perception module, and an output module.

[0091] The input module is used to acquire and input multivariate water quality monitoring time series. These data cover the observation values of water quality indicators such as conductivity, dissolved oxygen, chlorophyll a, turbidity, temperature, pH, etc. at different time points, providing a basic data source for the entire prediction system.

[0092] Reference Figure 2The adaptive representation distillation module is used for processing an input multivariate water quality monitoring time series, suppressing redundant features while retaining key information, and obtaining a history-future fusion water quality sequence. Specifically, the adaptive representation distillation module comprises a discrete wavelet decomposition submodule, an adaptive distillation network submodule, and a discrete wavelet reconstruction module. The discrete wavelet decomposition submodule is used to decompose the multivariate water quality monitoring time series into components of different frequencies to identify patterns and trends at different time resolutions, thereby comprehensively capturing feature information. The adaptive distillation network submodule is used to filter redundant features that may be contained in multiscale information using information bottleneck theory, and to ensure that valuable information is completely retained during the filtering process through residual connection. The discrete wavelet reconstruction module is used to reconstruct the processed data back to the time domain using wavelet reconstruction to obtain the history-future fusion water quality sequence.

[0093] With reference to Figures 3-4 The dual-path routing attention mechanism module is used to output a weighted fusion attention result based on the history-future fusion water quality sequence using an attention mechanism that fuses a dynamic Gaussian kernel and a dual-path routing mechanism through a two-stage routing selection strategy. Specifically, the dual-path routing attention mechanism module comprises an input layer, a dual-branch attention mechanism, an MoE routing strategy, and a fusion and output layer. The input layer is used to input the history-future fusion water quality sequence, which is sent into a shared head and a routing head in parallel, with each head representing an independent expert. The dual-branch attention mechanism is a core feature extractor for each head. The dual-branch attention mechanism comprises a position correlation branch and a content correlation branch. The position correlation branch uses a learnable standard deviation parameter to construct an adaptive Gaussian kernel to generate a position bias signal after receiving the input. The content correlation branch directly performs linear mapping on the input features to obtain query, key, and value vector representations to calculate the attention score. In the MoE routing strategy, the shared head is always activated to extract general features such as long-term trends. The routing head is selected and activated through a Top-K mechanism and is activated when a mutation is detected. The contribution of the shared head and the routing head is adjusted through a balance coefficient. The fusion and output layer is used to perform weighted summation on the outputs of all heads to generate a final representation.

[0094] The cross-granularity sequence interaction multi-layer perception module is used for mining the symmetric coupling relationship between different time granularities and variables based on the weighted fused attention results, and obtaining the final output features by using a cross-granularity sequence interaction perception machine. Specifically, the cross-granularity sequence interaction multi-layer perception module includes a time domain multi-scale convolution submodule, a double-path pooling submodule, a double-path pooling submodule, a dynamic gating submodule, and a bidirectional outer product operation modeling submodule. The time domain multi-scale convolution submodule is used for introducing a multi-scale convolution branch in the time domain to extract local context features, and realizing multi-granularity information fusion through feature splicing and channel reorganization; the double-path pooling mechanism submodule is used for generating channel-adaptive scale factors and offsets through dimension reduction-nonlinear activation-dimension increase operations based on the reorganized features; the dynamic gating submodule is used for adaptively fusing local convolution features and global statistical features by using a dynamic gating mechanism; and the bidirectional outer product operation modeling submodule is used for realizing efficient modeling of complex space-time dependencies by combining residual connections to retain the original time sequence structure through the symmetric coupling relationship between local-global features, and obtaining the final output features.

[0095] The output module is used for mapping the final output features into prediction values of a target dimension through a full connection layer or a convolution layer.

[0096] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. An aquaculture multivariate water quality parameter prediction method, characterized by, The method comprises the following steps: Step 100: acquiring a multivariate water quality monitoring time sequence; Step 200: performing adaptive representation distillation processing on the multivariate water quality monitoring time sequence to obtain a history-future fused water quality sequence; Step 300: based on the history-future fused water quality sequence, using a fusion dynamic Gaussian kernel and an attention mechanism with a double-path routing, outputting a weighted fused attention result through a two-stage routing selection strategy; Step 400: based on the weighted fused attention result, using a cross-granularity sequence interaction perception machine to mine symmetric coupling relationships between different time granularities and variables to obtain final output features; Step 500: mapping the final output features to prediction values of a target dimension through a fully connected layer or a convolutional layer.

2. The method of claim 1, wherein, The multivariate water quality monitoring time sequence comprises conductivity, dissolved oxygen, chlorophyll a, turbidity, temperature and pH.

3. The method of claim 1, wherein, Step 200 comprises: Discrete wavelet decomposition is performed on the input multivariate water quality monitoring time sequence to obtain approximation coefficients and detail coefficients; Based on the approximation coefficients and the detail coefficients, filtering is performed, and key information is retained and irrelevant features are filtered according to the information bottleneck theory to obtain processed approximation coefficients and detail coefficients; Based on the processed approximation coefficients and the detail coefficients, the time sequence is reconstructed into the time domain using a wavelet reconstruction to obtain an estimated value of the reconstructed time sequence; The estimated value of the reconstructed time sequence is divided into a plurality of sub-sequences, and the number of placeholders is calculated to initialize a future placeholder sequence; The plurality of sub-sequences and the placeholder sequence are spliced to obtain the history-future fused water quality sequence.

4. The method of claim 1, wherein, The step 300 comprises: Based on the history-future fused water quality sequence, an adaptive Gaussian kernel is constructed using a learnable standard deviation parameter, a causal mask offset is performed on the Gaussian kernel output, and then multiplied by a value vector of a position correlation branch to generate a position bias signal; Based on the history-future fused water quality sequence, linear mapping is performed to calculate a content correlation branch query vector, a key vector and a value vector, and then to calculate an attention score; Through a routing mechanism, the position bias signal and the attention score are weighted and fused to obtain a fused attention score; Based on the fused attention score, a shared head and a routing head work together to output a weighted fused attention result.

5. The method of claim 4, wherein, Based on the fused attention score, a shared head and a routing head work together to output a weighted fused attention result, comprising: The score of each individual head and the score related to the head type, calculate the routing score is defined as: ; In the above formulae, denotes the number of shared headers; and denote the projection matrices of the shared and routing headers, respectively; denotes the i-th input marker in the input; denotes the i-th input marker in the input; where the balance coefficient and The contribution of the balance sharing header and the routing header is defined as: ; In the above formula, is a trainable projection matrix; is the hidden size; Based on the routing score and the weighted fused attention result, a weighted fused attention result is calculated.

6. The method of claim 1, wherein, The step 400 comprises: Based on the weighted fused attention result, local context features of different granularities are extracted through time-domain multi-scale convolution, and the features are enhanced through cross-scale splicing and channel reorganization to obtain reorganized features; Based on the reorganized features, a double-path pooling mechanism is introduced to generate channel-adaptive scale factors and offsets through dimension reduction-nonlinear activation-dimension increase operations, and global statistical information is calculated; Based on the channel adaptive scale factor and offset, the local convolution feature and the global statistical feature are adaptively fused by using a dynamic gating mechanism to obtain a scale fusion gate and a bias fusion gate; Based on the local feature, the global statistical information, the scale fusion gate and the bias fusion gate, a symmetric coupling relationship between the local-global features is modeled by a bidirectional outer product operation, and a residual connection is combined to reserve the original time sequence structure to obtain the final output feature.

7. A multi-variate water quality parameter prediction method for aquaculture according to claim 6, characterized in that, Based on local features, global statistical information, scale fusion gate and bias fusion gate, the symmetric coupling relationship of local-global features is modeled through bidirectional outer product operation, and the original time sequence structure is reserved by combining residual connection to obtain the final output features , comprising: ; ; In the above formula, denotes the result of the bidirectional outer product operation; denotes the first i channel dimension fusion gate; denotes the first i channel local feature; denotes the first j channel bias fusion gate; denotes the first j channel global information; is an adaptive learning interaction weight matrix; denotes the attention result after weighted fusion; d denotes the channel dimension number.

8. An aquaculture multivariate water quality parameter prediction system, employing the aquaculture multivariate water quality parameter prediction method of any one of claims 1-7, characterized in that, The system comprises a data acquisition and input module, an adaptive representation distillation module, a dual-path routing attention mechanism module, a cross-granularity sequence interaction multi-layer perception module and an output module; The input module is used to acquire and input the multivariate water quality monitoring time series; The adaptive representation distillation module is used to process the input multivariate water quality monitoring time series to obtain a history-future fused water quality sequence; The dual-path routing attention mechanism module is used to adopt an attention mechanism of fused dynamic Gaussian kernel and dual-path routing based on the history-future fused water quality sequence, and output a weighted fused attention result through a two-stage routing selection strategy; The cross-granularity sequence interaction multi-layer perception module is used to adopt a cross-granularity sequence interaction perception based on the weighted fused attention result, to mine the symmetric coupling relationship between different time granularities and variables, and to obtain the final output feature; The output module is used to map the final output feature to a prediction value of a target dimension through a fully connected layer or a convolution layer.

Citation Information

Patent Citations

  • Water quality prediction method and device

    CN114169638A

  • Sea cucumber culture water quality prediction method for optimizing GRU neural network based on whale algorithm

    CN115859057A

  • Water quality monitoring and early warning method and system

    CN120687758A

  • Intelligent laboratory air quality control system and method

    CN120926568A

  • Water quality prediction method and system based on gating residual enhancement and feature fusion

    CN121119284A