Pond aquaculture water quality multivariate prediction method based on DECSF-Net model

CN122965727APending Publication Date: 2026-10-23TIANJIN AGRICULTURE COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510484514.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0007]本申请提供基于DECSF-Net模型的池塘水产养殖水质多变量预测方法,解决现有水质预测模型忽略未来气象变化的时滞效应而导致极端天气下水质动态变化的预测精度不足、以及传统方法不能有效建模气象与水质数据的复杂交互关系而限制多源数据联合表征能力的技术问题

Benefits of technology

[0052]采用本申请设计的基于DECSF-Net模型的池塘水产养殖水质多变量预测方法,将未来气象数据的时滞效应纳入水质预测模型中,通过双编码器结构分别独立编码水质数据和气象数据,利用跨源反馈融合模块动态捕捉水质与气象之间的非线性依赖关系以及气象时滞效应;并结合未来气象数据,通过双向注意力机制增强数据交互,最终输出包括溶解氧、水温、pH值及盐度的多变量预测结果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965727A_ABST
    Figure CN122965727A_ABST
Patent Text Reader

Abstract

The application discloses a pond aquaculture water quality multivariate prediction method based on a DECSF-Net model, and steps include: constructing a training data set; collecting original water quality data and meteorological data in a pond breeding environment through an Internet of Things monitoring system, an underwater sensor or an automatic weather station; building a DECSF-Net model, including an input embedding layer, a double-encoder structure, a cross-source feedback fusion module and an output layer; training the model; inputting the data set into the DECSF-Net model, presetting initial learning rate, batch size and training round parameters to optimize the DECSF-Net model, and obtaining an optimal prediction model; and predicting water quality results; inputting water quality data and meteorological data of a current time window and meteorological data of a future time window into the optimal prediction model, and outputting multivariate prediction results based on future preset time steps. The double-encoder structure is used for independently encoding water quality data and meteorological data, and the cross-source feedback fusion module is used for dynamically capturing a nonlinear dependence relationship between water quality and meteorological conditions and a meteorological time lag effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of aquaculture water quality monitoring technology, and in particular relates to a multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model. Background Technology

[0002] Water quality, as a crucial environmental factor in aquaculture systems, directly impacts the health, productivity, and ultimate yield and quality of aquatic organisms through its dynamic changes. Aquatic organisms interact with the aquatic environment through physiological activities such as respiration, feeding, excretion, and reproduction. Changes in key factors such as dissolved oxygen (DO), water temperature, pH, and salinity are vital to their growth and health. These factors are not only core indicators for water quality monitoring but also the most precise key parameters obtained through sensors. For example, excessively high dissolved oxygen levels can lead to gas bubble disease in fish, while insufficient dissolved oxygen can inhibit growth and even cause death. Similarly, fluctuations in water temperature significantly affect fish growth and disease prevention, and the differences in water temperature adaptability among different fish species require special attention.

[0003] Currently, aquaculture mainly employs three models: recirculating aquaculture systems, pond culture, and cage culture. Among these, pond culture, due to its large water area (typically tens to hundreds of acres), is more susceptible to various ecological factors, increasing the difficulty of water quality control. Compared to the precise control of closed recirculating aquaculture systems, open pond systems rely more heavily on accurate water quality prediction. Existing research has attempted to improve prediction accuracy through various deep learning models. Some studies have utilized a hybrid model combining Long Short-Term Memory (LSTM) and Convolutional Neural Networks (CNN) to accurately predict dissolved oxygen levels 15 minutes later. Others have extracted key factors influencing dissolved oxygen using Principal Component Analysis (PCA) and optimized Gated Recurrent Unit (GRU) neural networks using the Pathfinder Optimizer (PFA) algorithm, effectively predicting dissolved oxygen levels in bass ponds 10 minutes later. Still others have employed a hybrid deep learning model (EEMD-MLR-LSTM) to predict multivariate water quality parameters, successfully predicting chlorophyll a and turbidity changes over the next 6 hours using multiple linear regression and LSTM. Additionally, a Transformer-based long-term prediction model, combining adaptive mechanisms and multi-scale feature extraction strategies, can predict dissolved oxygen levels 48 hours later. However, most of these models rely solely on water quality data and fail to adequately consider the potential impact of weather on water quality changes, which may limit their predictive performance under complex environmental conditions.

[0004] In outdoor pond aquaculture environments, meteorological factors such as air temperature, humidity, air pressure, wind direction, wind speed, and rainfall profoundly influence the dynamic changes of water quality factors. These factors directly or indirectly affect key water quality indicators such as dissolved oxygen, temperature, and salinity by altering the physical and chemical properties of the water. Specifically, rising air temperature usually leads to increased water temperature, resulting in decreased dissolved oxygen levels and affecting the metabolic rate of aquatic organisms; decreased humidity increases evaporation, thus increasing salinity; and decreased air pressure reduces the saturation of dissolved oxygen in the water, leading to a decrease in dissolved oxygen concentration. Increased wind speed may promote oxygen dissolution and temporarily raise dissolved oxygen levels, but it may also cause cyanobacteria to accumulate on the water surface, affecting phytoplankton photosynthesis. Rainfall usually lowers water temperature and salinity and may introduce nutrients, stimulating excessive algal growth and leading to water quality deterioration. Existing publicly available information indicates that using meteorological factors as auxiliary inputs can significantly improve the accuracy of water quality prediction. For example, a model combining K-means clustering and GRU was used to predict dissolved oxygen concentration in a pond 30 minutes later using synchronized water quality and meteorological data; an integrated model based on meteorological factors, water quality indicators, and spatial information was used to predict dissolved oxygen concentration in Taihu Lake 12 hours later through variational mode decomposition (VMD), bidirectional long short-term memory (BiLSTM) networks, and attention mechanisms; and a graph convolutional network and temporal transformer were used to capture complex spatiotemporal dependencies through multi-site meteorological data to accurately predict dissolved oxygen concentration for the next 12 hours. However, these methods only use synchronized or historical meteorological data, neglecting the time-lag effect of meteorological factors on water quality; they lack dynamic modeling of nonlinear interactions and cross-modal dependencies between water quality and meteorological variables; and they rely on pre-defined spatial topologies, making it difficult to adapt to the unstructured spatiotemporal dependencies between meteorological and water quality in complex ecological environments.

[0005] However, most existing studies focus on inputting water quality and meteorological data simultaneously, failing to fully reveal the time-lag effect of future meteorological factors on water quality. This time-lag effect is particularly significant in actual aquaculture environments, especially during extreme weather events (such as high temperatures or torrential rains). The impact of future meteorological conditions on current pond water quality changes remains insufficiently studied. For example, a future increase in air temperature may lead to a gradual rise in water temperature, resulting in a delayed decrease in dissolved oxygen concentration; while an impending torrential rain may alter water quality by changing the chemical properties and flow of the water. Therefore, accurately capturing the potential impact of future meteorological changes on water quality is a significant challenge in water quality forecasting.

[0006] The key point of this invention is that by introducing future meteorological data and designing a dual encoder structure, water quality and meteorological data can be used with different lookback window lengths, thereby accurately capturing the lag effect of meteorological factors; and a bidirectional attention mechanism is achieved through a cross-source feedback fusion module (CSFF): the implicit correlation between meteorological stations and water quality monitoring points is automatically learned through cross-source attention. Summary of the Invention

[0007] This application provides a multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model, which solves the technical problems of insufficient prediction accuracy of water quality dynamic changes under extreme weather conditions due to the neglect of the time lag effect of future meteorological changes in existing water quality prediction models, and the limitation of the joint representation capability of multi-source data due to the inability of traditional methods to effectively model the complex interaction between meteorological and water quality data.

[0008] To solve at least one of the above-mentioned technical problems, the technical solution adopted in this application is:

[0009] A multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model, comprising the following steps:

[0010] Building a training dataset: Collect raw water quality and meteorological data in the pond aquaculture environment through IoT monitoring systems, underwater sensors, or automatic weather stations;

[0011] Building the DECSF-Net model includes an input embedding layer, a dual encoder structure, a cross-source feedback fusion module, and an output layer.

[0012] Training the model: Input the dataset into the DECSF-Net model, preset the initial learning rate, batch size, and training epoch parameters to optimize the DECSF-Net model and obtain the optimal prediction model;

[0013] Predicting water quality results: Input the water quality data and meteorological data of the current time window, as well as the meteorological data of the future time window, into the optimal prediction model, and output the multivariate prediction results of dissolved oxygen, water temperature, pH value and salinity based on the future preset time step.

[0014] Furthermore, the water quality data includes dissolved oxygen, water temperature, pH value, and salinity; the meteorological data includes air temperature, humidity, air pressure, wind direction, wind speed, and rainfall.

[0015] Furthermore, the input embedding layer independently maps the original water quality data and meteorological data through a variable embedding mechanism, specifically as follows:

[0016] For the input time series dataset X = {X1, X2, ..., X...} n The time series of each variable is mapped to a high-dimensional feature vector E through its respective linear transformation embedding function f(·). i ,Right now:

[0017] E i =f(X) i ), i = 1, 2, ..., n

[0018] Among them, water quality data is data from the current time window; meteorological data is combined data from both the current and future time windows; each This represents fixed-time-step data for a specific variable in water quality or meteorological data.

[0019] Furthermore, the dual encoder structure includes:

[0020] Water quality encoder: Extracts time-series features of water quality data through a multi-head self-attention mechanism, feedforward network, and normalization module;

[0021] Weather encoder: Extracts time series features of future weather data through multi-head self-attention mechanism, feedforward network and normalization module.

[0022] Furthermore, the multi-head self-attention mechanism is implemented through the following steps:

[0023] The high-dimensional feature vectors obtained through the variable embedding mechanism are represented to generate the corresponding feature set {E1, E2, ..., E...}. n};

[0024] The feature set is processed by linear transformation to generate the query matrix Q. i Key matrix K i Sum matrix V i The corresponding matrices are as follows:

[0025] Q i =W Q E i ,K i =W K E i V i =W V E i

[0026] The attention weight α is calculated based on the query matrix and the key matrix. ij The calculation formula is:

[0027]

[0028] Where, d k It represents the dimension of the key vector; T denotes the matrix transpose operation; i and j both represent variable indices, corresponding to different variables in a multivariate time series; α ij Q represents the attention weight between variables i and j, used to quantify the degree of influence of variable j on variable i; i Let K represent the query vector Query corresponding to the i-th variable. j This represents the key vector Key corresponding to the j-th variable;

[0029] By adjusting the attention weight αij Sum matrix V j We perform a weighted summation to obtain the channel self-attention A. i The formula is:

[0030]

[0031] In the formula, A i V is the attention output for variable i; j The value vector corresponding to the j-th variable.

[0032] Furthermore, the cross-source feedback fusion module achieves interaction through the following steps:

[0033] Normalized water quality data and meteorological data And ensure that the data scale is consistent;

[0034] The standardized data is processed by linear transformation to generate a query, key, and value matrix of water quality data. And meteorological data queries, key-value matrices

[0035] Extracting internal features A from the query, key, and value matrices of water quality data using a single data source attention mechanism. W =Attention(Q) W ,K W V W ), and the internal features of the key-value matrix of meteorological data queries, as well as A. M =Attention(Q) M ,K M V M );

[0036] Interaction features C are calculated using a cross-data source attention mechanism. WM and C MW The specific calculation formula is as follows:

[0037] C WM =Attention(Q) W ,K M V M );

[0038] C MW =Attention(Q) M ,K W V W ).

[0039] Furthermore, the interaction steps of the cross-source feedback fusion module also include:

[0040] A cross-data source attention mechanism is used to interactively feed water quality data and meteorological data back to each other's encoders;

[0041] The cross-data source feedback intensity is controlled by the hyperparameter λ, and the fusion features of water quality data and meteorological data are iteratively updated. The corresponding fusion features are as follows:

[0042]

[0043] The fusion features of water quality data and meteorological data are integrated using a weighted sum to obtain the final feature representation, which is as follows:

[0044]

[0045] A cross-data source attention mechanism is used to interactively fuse the final feature representations of water quality data and meteorological data. The corresponding fusion formula is as follows:

[0046]

[0047] Furthermore, the output layer converts the fused joint features into multivariate water quality prediction results for a future preset time step through linear mapping, specifically:

[0048] Y = W. X fused +b

[0049] Y represents the multivariate water quality prediction results for 96 pre-defined time steps; W is the weight matrix; X fused is the joint feature after fusion; b represents the bias vector.

[0050] Furthermore, during model training, the initial learning rate is set to 0.0001, the batch size to 128, and the number of training epochs to 100. The mean squared error (MSE) is used as the loss function during model training, and the model parameters are optimized through the backpropagation algorithm.

[0051] Furthermore, the DECSF-Net model provides future meteorological data based on existing meteorological forecasting models to capture the time-lag effect of meteorological changes on water quality.

[0052] The multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model designed in this application incorporates the time lag effect of future meteorological data into the water quality prediction model. Water quality data and meteorological data are independently encoded through a dual encoder structure. The nonlinear dependency between water quality and meteorology, as well as the time lag effect of meteorology, are dynamically captured using a cross-source feedback fusion module. Furthermore, by combining future meteorological data and enhancing data interaction through a bidirectional attention mechanism, the final output includes multivariate prediction results for dissolved oxygen, water temperature, pH value, and salinity.

[0053] This application, using the DECSF-Net model, aims to address the technical problems of existing water quality prediction models neglecting the time lag effect of future meteorological changes, resulting in insufficient prediction accuracy of water quality dynamics under extreme weather conditions, and the limitations of traditional methods in effectively modeling the complex interaction between meteorological and water quality data, thus restricting the joint representation capability of multi-source data. Furthermore, experiments show that the prediction method proposed in this application significantly outperforms mainstream models such as Transformer, Informer, Autoformer, DLinear, and iTransformer in predicting key indicators such as dissolved oxygen, water temperature, pH, and salinity, in terms of both mean squared error (MSE) and mean absolute error (MAE), providing reliable technical support for dynamic water quality control in pond aquaculture.

[0054] This application uses dual encoders to independently process water quality and meteorological data, and utilizes a cross-source feedback fusion module to capture the time lag effect of future meteorological data, outputting multivariate prediction results including dissolved oxygen, water temperature, pH value, and salinity. This not only accurately captures the temporal characteristics of water quality and future meteorological data, but also the complex interaction between the two, improving the accuracy of multivariate prediction of water quality in pond aquaculture.

[0055] This application optimizes the model structure, reduces the number of parameters and computational load, improves model operating efficiency, and lowers computational costs. The proposed model design is scalable and adaptable to different scales and types of aquaculture environments, thus possessing high practical value. Attached Figure Description

[0056] Figure 1 This is a flowchart of the multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model in this invention;

[0057] Figure 2 This is a flowchart of the DECSF-Net model construction in this invention;

[0058] Figure 3 This is a flowchart illustrating the implementation of the multi-head self-attention mechanism in this invention;

[0059] Figure 4 This is a flowchart illustrating the interaction between the cross-source feedback fusion modules in this invention;

[0060] Figure 5 This is a schematic diagram of the DECSF-Net model in this invention;

[0061] Figure 6 This is a schematic diagram of the variable embedding structure of the DECSF-Net model in this invention;

[0062] Figure 7 This is a schematic diagram of the cross-source fusion module of the DECSF-Net model in this invention. Detailed Implementation

[0063] The present application will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0064] This embodiment proposes a multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model, such as... Figure 1 As shown, the steps include:

[0065] S1. Construct the training dataset.

[0066] The primary method involves collecting raw water quality and meteorological data from the pond aquaculture environment through IoT monitoring systems, underwater sensors, or automatic weather stations. Samples are collected every 5 minutes, with one time step representing 5 minutes. Based on this raw water quality data, training datasets for water quality and meteorological data are constructed. The water quality data includes four variables: dissolved oxygen, water temperature, pH, and salinity; the meteorological data includes six variables: air temperature, humidity, air pressure, wind direction, wind speed, and rainfall.

[0067] S2. Build the DECSF-Net model.

[0068] The DECSF-Net model structure is as follows: Figure 5 As shown, the setup process is as follows: Figure 2 As shown, it specifically includes:

[0069] S21, Input embedding layer;

[0070] The input embedding layer consists of a variable embedding mechanism and a linear transformation. The variable embedding mechanism independently maps the time series of each variable into a high-dimensional feature representation; its core function is to convert the multivariate time series in water quality and meteorological data into high-dimensional feature representations, providing suitable input features for the subsequent dual encoder. Then, a linear transformation converts the time series of each variable into a high-dimensional feature vector.

[0071] The variable embedding mechanism maps the entire time series of each variable to a high-dimensional feature representation. Specifically, it independently maps the multivariate time series in water quality and meteorological data to high dimensions, preserving the dynamic characteristics of each variable and allowing the historical dynamics of each variable to be captured independently.

[0072] For the input raw water quality data and raw meteorological data time series data, form a dataset X = {X1, X2, ..., X...} n The dataset X contains data at 336 time steps, including the data from the first 28 hours. The time series of each variable is mapped to a high-dimensional feature vector E through its respective linear transformation embedding function f(·). i ,Right now:

[0073] E i =f(X) i ), i = 1, 2, ..., n

[0074] Among them, water quality data is data from the current time window; meteorological data is combined data from both the current and future time windows; each This represents fixed-time-step data for a specific variable in water quality or meteorological data.

[0075] In this embodiment, each time step corresponds to 5 minutes; if the dataset covers a time interval from October 7, 2024 to December 11, 2024, a total of approximately 66 days, then the total number of data points is 11,641 (once every 5 minutes). Accordingly, the processing method is as follows:

[0076] If the total data points are divided in chronological order: the training set accounts for 70% of the total data points, the validation set accounts for 20% of the total data points, and the test set accounts for 10% of the total data points.

[0077] Sliding window for raw time window and predicted future time step: The model input is a continuous raw time step (e.g., L = 336 time steps), and the output is a continuous future time step (e.g., 96 time steps).

[0078] Then the total number of samples n = total number of time points - original time window length - predicted future time step length + 1.

[0079] Where n is the total number of samples in the training set, validation set, and test set; 336 is the number of time steps in the original window, i.e., the length of the input time series; and 96 is the preset number of future time steps, i.e., the length of the output time series.

[0080] Meteorological data includes data from both the current time window and future time windows. By combining high-precision meteorological data for future time windows provided by existing large-scale meteorological forecasting models, the length of meteorological data in the input window is expanded to capture the delayed impact of meteorological changes on water quality data.

[0081] S22, dual encoder structure.

[0082] The dual-encoder structure includes a water quality encoder and a meteorological encoder. The water quality encoder extracts time-series features from water quality data using a multi-head self-attention mechanism, a feedforward network, and a normalization module. The meteorological encoder extracts time-series features from future meteorological data using the same mechanism. By allowing the water quality encoder and meteorological encoder to extract their respective time-series features independently, interference between data sources can be avoided, thus improving feature representation capabilities.

[0083] In this embodiment, the DECSF-Net model provides future meteorological data based on existing meteorological forecasting models to capture the time-lag effect of meteorological changes on water quality. These existing meteorological forecasting models, such as WeatherGFT and ArchesWeatherGen, can accurately provide high-precision forecasts as short as 30 minutes and weather trajectories up to 15 days, covering multi-dimensional meteorological data such as temperature, precipitation, and wind speed. These models provide reliable future meteorological data support for water quality forecasting, enabling water quality prediction to go beyond current water quality and meteorological conditions and incorporate future meteorological changes, thereby significantly improving the accuracy and reliability of forecasts.

[0084] like Figure 3 As shown, the multi-head self-attention mechanism is implemented through the following steps:

[0085] The high-dimensional feature vectors obtained through the variable embedding mechanism are represented to generate the corresponding feature set {E1, E2, ..., E...}. n}

[0086] The feature set is processed by linear transformation to generate the query matrix Q. i Key matrix K i Sum matrix V i The corresponding matrices are as follows:

[0087] Q i =W Q E i ,K i =W K E i V i =W V E i .

[0088] Based on query matrix Q i With bond matrix K i Calculate the query matrix Q i With bond matrix K i The attention weight α is obtained by the dot product of the two numbers. ij The calculation formula is:

[0089]

[0090] Where, d k It represents the dimension of the key vector; T denotes the matrix transpose operation; i and j both represent variable indices, corresponding to different variables in a multivariate time series; α ij Q represents the attention weight between variables i and j, used to quantify the degree of influence of variable j on variable i; i K represents the query vector Query corresponding to the i-th variable; jLet Key represent the key vector corresponding to the j-th variable.

[0091] By adjusting the attention weight α ij Sum matrix V j We perform a weighted summation to obtain the channel self-attention A. i The formula is:

[0092]

[0093] Among them, A i V is the attention output for variable i; j This represents the value vector Value corresponding to the j-th variable.

[0094] S23, Cross-Source Feedback Fusion Module (CSFF).

[0095] like Figure 5 As shown in the diagram, the DECSF-Net model's variable embedding structure captures the information flow and interaction between water quality and meteorological data through alternating single-source attention mechanisms and cross-source attention mechanisms. A bidirectional attention mechanism is used to model the meteorological time lag effect to address the delayed impact of future meteorological changes on water quality. Water quality and meteorological data are processed through independent embedding layers to generate their respective feature representations.

[0096] like Figure 7 As shown, the cross-source feedback fusion module achieves interaction through the following steps:

[0097] Normalized water quality data and meteorological data And ensure that the data scale is consistent.

[0098] The normalized data is processed by linear transformation to generate a query, key, and value matrix Q for water quality data. W ,K W V W And meteorological data queries, key-value matrix Q M ,K M V M The formulas for querying and defining the key-value matrix of the corresponding water quality and meteorological data are as follows:

[0099]

[0100] Extracting internal features A from the query, key, and value matrices of water quality data using a single data source attention mechanism. W =Attention(Q) W ,K W V W ), and the internal features of the key-value matrix of meteorological data queries, as well as A. M=Attention(Q) M ,K M V M ).

[0101] Query, key, and value matrix Q in water quality data W ,K W V W And the query, key, and value matrix Q in meteorological data M ,K M V M Interaction features C are calculated through a cross-data source attention mechanism. WM and C MW The specific calculation formula is as follows:

[0102] C WM =Attention(Q) W ,K M V M );

[0103] C MW =Attention(Q) M ,K W V W ).

[0104] A cross-data source attention mechanism is used to interactively feed water quality data and meteorological data back to each other's encoders; that is, water quality data is fed back to meteorological data through a cross-data source attention mechanism, and meteorological data is fed back to water quality data through a cross-data source attention mechanism, ensuring that the mutual influence between the two is fully modeled.

[0105] The cross-data source feedback intensity is controlled by the hyperparameter λ, and the fusion features of water quality and meteorological data are iteratively updated. The corresponding fusion features are:

[0106]

[0107] The fusion features of water quality and meteorological data are integrated using a weighted sum to obtain the final feature representation. The corresponding final feature representation is as follows:

[0108]

[0109] A cross-data source attention mechanism is used to interactively fuse the final feature representations of water quality data and meteorological data. The corresponding fusion formula is:

[0110]

[0111] By introducing efficient parameter design and reducing computational costs through a lightweight structure, the DECSF-Net model can be deployed in complex aquaculture environments. Furthermore, through multi-source data fusion and combining it with existing high-precision weather forecasting models (such as WeatherGFT and ArchesWeatherGen), the forecast accuracy and reliability can be significantly improved.

[0112] S24, Output Layer;

[0113] The output layer uses a linear mapping to transform the fused joint features into multivariate water quality prediction results for 96 preset time steps (i.e., the next 8 hours). The specific linear mapping relationship is as follows:

[0114] Y = W. X fused +b

[0115] Y represents the multivariate water quality prediction results for 96 pre-defined time steps; W is the weight matrix; X fused is the joint feature after fusion; b represents the bias vector.

[0116] S3, Training the model.

[0117] The dataset was input into the DECSF-Net model, and the initial learning rate, batch size, and training epochs were preset to optimize the DECSF-Net model and obtain the optimal prediction model. Specifically, the initial learning rate was 0.0001, the batch size was 128, and the training epochs were 100. Furthermore, the mean squared error (MSE) was used as the loss function during model training, and the model parameters were optimized using the backpropagation algorithm.

[0118] S4. Predict water quality results.

[0119] The water quality and meteorological data of the current time window, as well as the meteorological data of the future time window, are input into the optimal prediction model, which outputs multivariate prediction results of dissolved oxygen, water temperature, pH value and salinity based on the future preset time step.

[0120] Table 1 shows the water quality prediction results obtained using the prediction method based on the DECSF-Net model proposed in this application, compared with five commonly used prediction models in the prior art. The mean squared error (MSE) and mean absolute error (MAE) of the prediction model proposed in this application are compared with those of the five existing prediction models. As can be seen from Table 1, the MSE obtained by the DECSF-Net model proposed in this application is 0.0959, and the MAE is 0.2037. That is, compared with the prior art, the MSE and MAE obtained by the prediction method proposed in this application are superior to those of existing mainstream models (such as Transformer, Informer, Autoformer, DLinear, and iTransformer).

[0121] Table 1. Comparison of Water Quality Prediction Results

[0122]

[0123] The multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model designed in this application incorporates the time lag effect of future meteorological data into the water quality prediction model. Water quality data and meteorological data are independently encoded through a dual encoder structure. The nonlinear dependency between water quality and meteorology, as well as the time lag effect of meteorology, are dynamically captured using a cross-source feedback fusion module. Furthermore, by combining future meteorological data and enhancing data interaction through a bidirectional attention mechanism, the final output includes multivariate prediction results for dissolved oxygen, water temperature, pH value, and salinity, thereby ensuring the continuity and stability of the collected water quality and meteorological data.

[0124] The advantages of this application are as follows: Independent modeling with dual encoders: The water quality encoder and meteorological encoder independently extract the temporal features of current water quality and meteorological data, avoiding interference from multiple data sources and improving feature representation capabilities. Future meteorological data integration: Combining high-precision future time window meteorological data provided by a large meteorological forecasting model, the length of meteorological data in the input window is expanded to capture the delayed impact of meteorological changes on water quality data. Cross-source feedback fusion module: A bidirectional cross-data source attention mechanism is adopted to dynamically capture the nonlinear dependency between water quality and meteorology. The fused features are iteratively updated by adjusting the feedback intensity to accurately model the time lag effect of meteorological influence on water quality. Lightweight and efficient architecture: Input representation is optimized through a variable embedding mechanism, and an adaptive learning strategy is used to reduce computational costs and improve prediction accuracy.

[0125] This application, through the DECSF-Net model, not only addresses the insufficient prediction accuracy of existing water quality prediction models due to neglecting the time lag effect of future meteorological changes, leading to inaccuracies in predicting dynamic water quality changes under extreme weather conditions, but also solves the technical problem that traditional methods cannot effectively model the complex interaction between meteorological and water quality data, thus limiting the joint representation capability of multi-source data. The prediction results are not only highly accurate but also superior to mainstream models. Moreover, experiments show that the prediction method proposed in this application significantly outperforms mainstream models such as Transformer, Informer, Autoformer, DLinear, and iTransformer in predicting key indicators such as dissolved oxygen, water temperature, pH, and salinity, in terms of both mean squared error (MSE) and mean absolute error (MAE). This provides reliable technical support for the dynamic control of water quality in pond aquaculture.

[0126] This application uses dual encoders to independently process water quality and meteorological data, and utilizes a cross-source feedback fusion module to capture the time lag effect of future meteorological data, outputting multivariate prediction results including dissolved oxygen, water temperature, pH value, and salinity. This not only accurately captures the temporal characteristics of water quality and future meteorological data, but also the complex interaction between the two, improving the accuracy of multivariate prediction of water quality in pond aquaculture.

[0127] This application optimizes the model structure, reduces the number of parameters and computational load, improves model operating efficiency, and lowers computational costs. The proposed model design is scalable and adaptable to different scales and types of aquaculture environments, thus possessing high practical value.

[0128] The embodiments of this application have been described in detail above. These descriptions are merely preferred embodiments and should not be construed as limiting the scope of this application. All equivalent variations and modifications made within the scope of this application should still fall within the patent coverage of this application.

Claims

1. A multivariate prediction method for pond aquaculture water quality based on the DECSF-Net model, characterized by the following steps: include: Building a training dataset: Collect raw water quality and meteorological data in the pond aquaculture environment through IoT monitoring systems, underwater sensors, or automatic weather stations; Building the DECSF-Net model includes an input embedding layer, a dual encoder structure, a cross-source feedback fusion module, and an output layer. Training the model: Input the dataset into the DECSF-Net model, preset the initial learning rate, batch size, and training epoch parameters to optimize the DECSF-Net model and obtain the optimal prediction model; Predicting water quality results: Input the water quality data and meteorological data of the current time window, as well as the meteorological data of the future time window, into the optimal prediction model, and output the multivariate prediction results of dissolved oxygen, water temperature, pH value and salinity based on the future preset time step.

2. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to claim 1, characterized in that, The water quality data includes dissolved oxygen, water temperature, pH value, and salinity; The meteorological data includes temperature, humidity, air pressure, wind direction, wind speed, and rainfall.

3. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to claim 1, characterized in that, The input embedding layer independently maps the original water quality data and meteorological data through a variable embedding mechanism, specifically as follows: For the input time series dataset X = {X1, X2, ..., X...} n The time series of each variable is mapped to a high-dimensional feature vector E through its respective linear transformation embedding function f(·). i ,Right now: E i =f(X i ),i=1,2,…,n Among them, water quality data is data from the current time window; meteorological data is combined data from both the current and future time windows; each This represents fixed-time-step data for a specific variable in water quality or meteorological data.

4. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to any one of claims 1-3, characterized in that, The dual encoder structure includes: Water quality encoder: Extracts time-series features of water quality data through a multi-head self-attention mechanism, feedforward network, and normalization module; Weather encoder: Extracts time series features of future weather data through multi-head self-attention mechanism, feedforward network and normalization module.

5. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to claim 4, characterized in that, The multi-head self-attention mechanism is implemented through the following steps: The high-dimensional feature vectors obtained through the variable embedding mechanism are represented to generate the corresponding feature set {E1, E2, ..., E...}. n }; The feature set is processed by linear transformation to generate the query matrix Q. i Key matrix K i Sum matrix V i The corresponding matrices are as follows: Q i =W Q E i ,K i =W K E i ,V i =W V E i The attention weight α is calculated based on the query matrix and the key matrix. ij The calculation formula is: Where, d k It represents the dimension of the key vector; T denotes the matrix transpose operation; i and j both represent variable indices, corresponding to different variables in a multivariate time series; α ij Q represents the attention weight between variables i and j, used to quantify the degree of influence of variable j on variable i; i Let K represent the query vector Query corresponding to the i-th variable. j This represents the key vector Key corresponding to the j-th variable; By adjusting the attention weight α ij Sum matrix V j We perform a weighted summation to obtain the channel self-attention A. i The formula is: In the formula, A i V is the attention output for variable i; j The value vector corresponding to the j-th variable.

6. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to any one of claims 1-3 and 5, characterized in that, The cross-source feedback fusion module achieves interaction through the following steps: Normalized water quality data and meteorological data And ensure that the data scale is consistent; The standardized data is processed by linear transformation to generate a query, key, and value matrix of water quality data. And meteorological data queries, key-value matrices Extracting internal features A from the query, key, and value matrices of water quality data using a single data source attention mechanism. W =Attention(Q) W ,K W V W ), and the internal features of the key-value matrix of meteorological data queries, as well as A. M =Attention(Q) M ,K M V M ); Calculate interaction features C using a cross-data source attention mechanism. WM and C MW The specific calculation formula is as follows: C WM =Attention(Q W ,K M ,V M ); C MW =Attention(Q M ,K W ,V W )。 7. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to claim 6, characterized in that, The interaction steps of the cross-source feedback fusion module also include: A cross-data source attention mechanism is used to interactively feed water quality data and meteorological data back to each other's encoders; The cross-data source feedback intensity is controlled by the hyperparameter λ, and the fusion features of water quality data and meteorological data are iteratively updated. The corresponding fusion features are as follows: The fusion features of water quality data and meteorological data are integrated using a weighted sum to obtain the final feature representation, which is as follows: A cross-data source attention mechanism is used to interactively fuse the final feature representations of water quality data and meteorological data. The corresponding fusion formula is as follows:

8. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to claim 7, characterized in that, The output layer converts the fused joint features into multivariate water quality prediction results for a future preset time step through linear mapping, specifically: Y=W﹒X fused +b Y represents the multivariate water quality prediction results for 96 pre-defined time steps; W is the weight matrix; X fused The combined features after fusion; b represents the bias vector.

9. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to any one of claims 1-3, 5, and 7-8, characterized in that, During model training, the initial learning rate was set to 0.0001, the batch size to 128, and the number of training epochs to 100. The mean squared error (MSE) was used as the loss function during model training, and the model parameters were optimized through the backpropagation algorithm.

10. The method for multivariate prediction of pond aquaculture water quality based on the DECSF-Net model according to claim 1, characterized in that, The DECSF-Net model is based on existing meteorological forecasting models to provide future meteorological data in order to capture the time-lag effect of meteorological changes on water quality.