A water quality monitoring and early warning method for aquaculture

By analyzing the coupling structure of water quality and behavioral data, and using long short-term memory networks for supervised learning and dynamically adjusting thresholds, the problem of difficulty in modeling the coupling relationship between water quality and behavior in aquaculture systems was solved. This enabled early identification and timely response to potential risks, improving the accuracy and intelligence of water quality monitoring.

CN120746014BActive Publication Date: 2026-07-21FRESHWATER FISHERIES RES CENT OF CHINESE ACAD OF FISHERY SCI
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FRESHWATER FISHERIES RES CENT OF CHINESE ACAD OF FISHERY SCI
Filing Date
2025-06-20
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing aquaculture water quality monitoring systems lack a modeling mechanism for the temporal coupling relationship between water quality changes and farmed animal behavior, making it difficult to accurately identify potential risks when farmed animals exhibit abnormal behavior, thus missing the risk window.

Method used

By acquiring real-time water quality and behavioral data, combining historical data analysis with the coupling structure, using long short-term memory networks for supervised learning, identifying normal coupling feature pairs, and implementing early warning through dynamic threshold adjustment, a multivariate correlation system is constructed to improve the timeliness and accuracy of early warning.

Benefits of technology

It effectively identifies hidden risks where water quality parameters are within limits but behavior is abnormal, improving the proactiveness and accuracy of early warnings, enabling timely identification and dynamic response to systemic coupling failures, and enhancing risk prevention and control capabilities in aquaculture environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120746014B_ABST
    Figure CN120746014B_ABST
Patent Text Reader

Abstract

The application discloses a water quality monitoring and early warning method for aquaculture and relates to the technical field of aquaculture. Specifically, real-time water quality data and real-time behavior data are acquired, historical data is combined, whether corresponding parameters in water quality data and corresponding parameters in behavior data have a statistically stable coupling structure in a non-disjoint state is analyzed, a specific time sequence sample pair is input into a long short-term memory network to output a prediction value of a behavior supervision learning target sample, a verification early warning instruction is triggered, the verification early warning instruction is started, whether an overall abnormal aggregation trend exists in a current abnormal area is judged to identify whether systematic water quality coupling failure exists in a current aquaculture area, and a decoupling parameter is locked to dynamically correct an original threshold value of the decoupling parameter, so that timeliness of water quality monitoring and early warning is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aquaculture technology, specifically to a method for monitoring and early warning of water quality in aquaculture. Background Technology

[0002] This invention relates to the field of aquaculture environmental monitoring and risk early warning technology, and more particularly to an intelligent water quality early warning method for aquaculture ecological environment management. More specifically, it relates to a water quality monitoring and early warning method based on multi-source data linkage and dynamic feedback mechanism, which is applicable to complex aquatic environments such as high-density ponds, factory farming, and recirculating aquaculture for aquatic economic animals such as fish and shrimp. The method focuses on real-time status identification of aquaculture water bodies, abnormal behavior correlation analysis, and parameter adjustment feedback during aquaculture, with particular attention to the complex status identification problem where water quality indicators are normal but aquaculture animals have exhibited abnormal behavior.

[0003] Currently, conventional aquaculture water quality monitoring systems generally employ real-time acquisition and threshold comparison of basic physicochemical parameters such as dissolved oxygen, ammonia nitrogen, and pH value for risk warning. However, such methods typically lack a modeling mechanism for the temporal coupling relationship between water quality changes and farmed animal behavior, making it difficult to determine whether water quality parameters truly reflect potential risks when farmed animals exhibit obvious behavioral abnormalities, such as herd agitation or sudden changes in feeding.

[0004] The data-phenomenon disconnect problem mainly stems from the fact that the current system ignores the coupling structure between water quality and behavior when modeling, and lacks a linkage reasoning mechanism between behavioral deviations and water quality trends. Once behavioral anomalies cannot be explained by existing water quality parameters, that is, an effective early warning mechanism cannot be triggered, which may lead to missing the risk window. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for monitoring and early warning of water quality in aquaculture, thus solving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides a method for monitoring and early warning of water quality in aquaculture, comprising the following steps:

[0007] S1: Acquire real-time water quality data and real-time behavioral data, and combine them with historical data to analyze whether the corresponding parameters in the water quality data and the corresponding parameters in the behavioral data have a statistically stable coupling structure in a non-disconnected state, so as to obtain the normal coupling characteristic pair;

[0008] S2: In the normal coupling feature pair, the water quality parameters belonging to the water quality state are marked as supervision samples, and the behavior parameters belonging to the behavior state are marked as supervision learning target samples to form a sample pair. By inputting the temporally ordered sample pair into the long short-term memory network, the predicted value of the behavior supervision learning target sample is output. The predicted value of the behavior supervision learning target sample is used to determine whether there is a risk of data and phenomenon disconnect in the current aquaculture area and to trigger a verification warning instruction.

[0009] S3: Initiate verification and early warning command. By judging whether there is an overall abnormal clustering trend in the current abnormal area, it can identify whether there is a systemic water quality coupling failure in the current aquaculture area, and lock the decoupling parameters to dynamically correct the original threshold of the decoupling parameters, so as to achieve timely water quality monitoring and early warning.

[0010] Preferably, several sets of monitoring equipment are pre-deployed in the aquaculture area to monitor the water quality and behavior of the aquaculture organisms in order to obtain real-time water quality data and real-time behavior data.

[0011] Real-time water quality data and real-time behavioral data are preprocessed to construct a standardized vector set under a synchronous time axis. The standardized vector set includes real-time water quality data and real-time behavioral data, and is used to reflect real-time water quality data under different behavioral conditions.

[0012] Preferably, the grey relational analysis method is used to analyze the trend coupling relationship between each parameter in the normal water quality data and each parameter in the normal behavior data to obtain the grey relational coefficient.

[0013] By combining historical data, the average grey correlation coefficient between each parameter in the normal water quality data and each parameter in the normal behavioral data is obtained through accumulation. The average grey correlation coefficient is used to measure the sensitivity of the influence of water quality data on behavioral data.

[0014] The probability density assessment method is used to analyze the nonlinear dependence between parameters in normal water quality data and parameters in normal behavior data in order to obtain mutual information.

[0015] Based on the accumulated grey relational coefficients and mutual information over historical periods, and combined with the mean-standard deviation method, the association threshold and dependency threshold are obtained respectively. Based on the association threshold and dependency threshold, normal coupling feature pairs are identified. Specifically, if the grey relational coefficient exceeds the association threshold and the mutual information exceeds the dependency threshold, it indicates that the corresponding parameters in the water quality data and the corresponding parameters in the behavioral data have a statistically stable coupling structure in a non-disconnected state, and the two parameters are recorded as a set of normal coupling feature pairs.

[0016] Preferably, in the normal coupling feature pair, water quality parameters belonging to the water quality state are labeled as supervised samples, and behavioral parameters belonging to the behavioral state are labeled as supervised learning target samples to form sample pairs. These temporally ordered sample pairs are then input into a long short-term memory network to output predicted values ​​for the behavioral supervised learning target samples, including...

[0017] Water quality parameters belonging to water quality state in the normal coupled feature pair are labeled as supervised samples, and the time series of supervised samples are obtained; behavioral parameters belonging to behavioral state in the normal coupled feature pair are labeled as supervised learning target samples.

[0018] For the supervised samples at each time point in the supervised sample time series, the supervised learning target sample for the next time moment is extracted from the historical data, so as to combine the supervised samples at each time point with the supervised learning target sample for the next time moment to form a sample pair;

[0019] Based on the supervised sample time series, obtain the corresponding sample pair time series;

[0020] The sample pairs of time series are used as the training set and input into the Long Short-Term Memory (LSTM) network. The LSM network is trained by passing through the input layer, hidden layer, and output layer. Based on the standardized vector set, the parameters of the supervised samples in the real-time water quality data are input into the trained LSM network to output the predicted value of the behavioral supervised learning target sample.

[0021] Preferably, the predicted values ​​of the behavioral supervision learning target samples are used to determine whether there is a risk of data discrepancy between the actual situation and the observed phenomena in the current aquaculture area, and to trigger verification and early warning instructions, including:

[0022] Wait for the next moment to obtain the true value of the supervised learning target sample;

[0023] By subtracting the true value from the predicted value of the supervised learning target sample and taking the absolute value, the deviation is obtained. If the deviation exceeds the preset deviation threshold, it indicates that there is a risk of data and phenomenon being out of sync in the current aquaculture area, and a verification warning command will be triggered.

[0024] If the deviation does not exceed the preset deviation threshold, it indicates that there is currently no risk of data and phenomena being out of sync in the aquaculture area, and the status of the aquaculture area will continue to be monitored.

[0025] Preferably, a verification and early warning command is initiated to identify whether there is a systemic water quality coupling failure in the current aquaculture area by judging whether there is an overall abnormal clustering trend in the current abnormal area, including:

[0026] Initiate verification and early warning commands, divide the aquaculture area into sub-regions, and identify the risk of data and phenomena being out of sync within each sub-region in order to obtain the number of abnormal areas;

[0027] The global Moran index method based on spatial weight matrix measures the autocorrelation of each abnormal region in the aquaculture area to obtain the clustering index. Based on the clustering index value, it is determined whether there is an overall abnormal clustering trend in the current abnormal region. If there is an overall abnormal clustering trend, it indicates that there is a systemic water quality coupling failure in the current aquaculture area, and the corresponding behavioral parameters are marked as abnormal behavioral parameters.

[0028] Preferably, the decoupling parameters are locked to dynamically correct the original thresholds of the decoupling parameters, thereby achieving timely water quality monitoring and early warning. This includes:

[0029] When there is a systemic water quality coupling failure in an aquaculture area, the normal coupling feature pair to which the abnormal behavior parameter belongs is locked, and the water quality parameters belonging to the water quality state are extracted from the normal coupling feature pair and marked as decoupling parameters.

[0030] The abnormal behavior coverage rate is determined based on the number of abnormal areas and the total number of sub-areas.

[0031] Preferably, the original threshold value corresponding to the decoupling parameter is determined based on the decoupling parameter.

[0032] Based on the abnormal behavior coverage, the original threshold of the decoupling parameter is dynamically adjusted. The specific adjustment method is as follows: θ dyn =θ ori -η*(1-e -λ*Ls ), where θ dyn For the corrected threshold, θ ori η is the original threshold of the decoupling parameter, e is the natural base, λ is the response speed coefficient, and Ls is the abnormal behavior coverage.

[0033] This invention provides a method for monitoring and early warning of water quality in aquaculture, which has the following beneficial effects:

[0034] (1) Real-time water quality data and real-time behavioral data are obtained through step S1. Combined with historical samples, the normal coupling structure between behavioral parameters and water quality parameters is explored, and a multivariate correlation system is constructed to effectively identify hidden risks where water quality parameters are not exceeded but behavior or phenomena have become abnormal, thereby further improving the proactiveness and accuracy of anomaly perception. In step S2, water quality parameters are used as supervised samples, and behavioral features are used as supervised learning target samples to form sample pairs. A temporal deep learning network is introduced to predict and model them, which can predict biological behavior trends in advance and compare them with real-time behavioral data, identify potential coupling failure areas in a timely manner, and provide a quantitative indicator basis for the determination of decoupling states. Adaptive dynamic adjustment of thresholds is achieved. In step S3, through spatial clustering analysis of abnormal behavior areas, systematic coupling failures are identified, and decoupling parameters are further locked. A dynamic correction function is constructed based on the abnormal behavior coverage to nonlinearly adjust the original water quality threshold, so that the early warning strategy has adaptive adjustment capabilities, effectively compensates for the lag of static threshold early warning, and improves the real-time performance and accuracy of early warning response. In summary, this method, based on the construction of a behavior-water quality linkage analysis system, establishes a complete feedback loop that couples perception, prediction bias, verification aggregation, and threshold correction, in order to further improve the complex water quality management and risk prevention and control in aquaculture scenarios.

[0035] (2) This invention proposes a dual judgment mechanism that combines grey relational analysis and mutual information assessment. It evaluates the normal coupling strength between water quality parameters and behavioral parameters from the perspectives of trend sensitivity and nonlinear dependence, respectively. The grey relational coefficient measures the degree to which water quality changes follow behavioral changes, and mutual information is used to assess the degree of nonlinear coupling between parameters. This makes the selected normal coupling feature pairs not only statistically correlated, but also have causal coupling explanatory power, providing a stable benchmark model for subsequent "decoupling identification".

[0036] (3) After identifying the risk of local disconnection, this method constructs a global Moran index based on a spatial weight matrix to quantitatively analyze the distribution patterns of abnormal areas within the aquaculture region. By statistically analyzing the spatial autocorrelation of abnormal areas, it distinguishes between "isolated anomalies" and "clustered anomalies," accurately identifying the systemic risk of overall failure of regional water quality-behavior coupling, thereby improving the macro-judgment capability and response depth of the early warning mechanism. When a systemic coupling failure is identified, the system can automatically lock the corresponding normal coupling feature pair that produces the abnormal behavior and track it to the water quality parameter affecting the behavior, thus marking the parameter as a decoupling parameter. This reverse tracking mechanism not only clarifies the specific intervention target of water quality control but also lays the causal foundation for subsequent dynamic correction, overcoming the shortcomings of traditional methods in locating the source of failure. In summary, this method can effectively solve the technical shortcomings of traditional water quality monitoring systems, such as rigid parameter threshold settings, weak judgment of regional anomalies, and lack of response to disconnection situations, improving the accuracy, timeliness, and intelligent level of water quality early warning in complex aquaculture environments. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of a method for monitoring and early warning of water quality in aquaculture according to the present invention;

[0038] Figure 2 This is a logic diagram of a water quality monitoring and early warning method for aquaculture according to the present invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] Example 1

[0041] Please see Figure 1 and Figure 2 This invention provides a method for monitoring and early warning of water quality in aquaculture, comprising the following steps:

[0042] S1: Acquire real-time water quality data and real-time behavioral data, and combine them with historical data to analyze whether the corresponding parameters in the water quality data and the corresponding parameters in the behavioral data have a statistically stable coupling structure in a non-disconnected state, so as to obtain the normal coupling characteristic pair;

[0043] S2: In the normal coupling feature pair, the water quality parameters belonging to the water quality state are marked as supervision samples, and the behavior parameters belonging to the behavior state are marked as supervision learning target samples to form a sample pair. By inputting the temporally ordered sample pair into the long short-term memory network, the predicted value of the behavior supervision learning target sample is output. The predicted value of the behavior supervision learning target sample is used to determine whether there is a risk of data and phenomenon disconnect in the current aquaculture area and to trigger a verification warning instruction.

[0044] S3: Initiate verification and early warning command. By judging whether there is an overall abnormal clustering trend in the current abnormal area, it can identify whether there is a systemic water quality coupling failure in the current aquaculture area, and lock the decoupling parameters to dynamically correct the original threshold of the decoupling parameters, so as to achieve timely water quality monitoring and early warning.

[0045] In this embodiment, through step S1, under normal aquaculture conditions, the system, based on historical water quality data and behavioral data, uses grey relational analysis and mutual information analysis to identify parameter combinations with stable linkages under non-disconnected conditions (i.e., normal ecological conditions), constructing normal coupling feature pairs. These feature pairs serve as the modeling basis for subsequent models, effectively reducing the modeling variable space and improving prediction accuracy and training efficiency. For example, in a fish farm, the system identifies a high grey relational degree and high mutual information between dissolved oxygen concentration and fish swimming speed, indicating that the two have a stable coupled response relationship under normal conditions, which can be used to construct a supervised prediction model.

[0046] In step S2, the system uses the water quality parameters in the normal coupled feature pair as supervision samples and the behavioral parameters as learning targets to construct time series sample pairs, which are then input into the Long Short-Term Memory (LSTM) network for training.

[0047] The trained model is used to predict the behavior state at the next moment based on the current water quality state and compare it with the actual observed behavior. If the deviation between the predicted value and the actual value exceeds a threshold, a disconnect between abnormal behavior and normal water quality can be identified, thereby achieving risk perception at an earlier stage.

[0048] In step S3, after identifying an abnormal area, the system initiates a verification and early warning command. By dividing the aquaculture area into sub-regions and combining spatial statistical methods (such as the global Moran index based on the spatial weight matrix), it determines whether there is a clustering trend of abnormal behavior. When a systemic coupling failure is detected (i.e., multiple areas simultaneously exhibit abnormal behavior, and the coupling model has failed), the system further identifies the feature pairs to which the abnormal behavior parameters belong and marks the corresponding water quality parameters as decoupling parameters.

[0049] Subsequently, based on the coverage rate of abnormal areas, the warning threshold of this decoupling parameter is dynamically adjusted, enabling the system to respond more sensitively to potential water quality risks and avoid significant aquaculture losses due to delayed judgment. For example, when the system determines that 60% of the current sub-regions are simultaneously experiencing unexplained behavioral anomalies, the system sets the pH value associated with feeding frequency as the decoupling parameter and dynamically lowers the original threshold of 7.5 to 7.2 to intervene in control strategies in advance, such as turning on the aeration system or replacing part of the water, thereby effectively controlling the spread of risk.

[0050] Normal coupling feature pairs refer to water quality parameter and behavioral parameter pairs that have a stable linkage under normal aquaculture conditions, which are used for subsequent behavior prediction and deviation identification.

[0051] In the supervised sample and the learning target sample, the former is the input variable (water quality parameter) and the latter is the variable to be predicted (behavioral parameter), which constitute the input for time series modeling.

[0052] The Long Short-Term Memory (LSTM) network model is used to predict behavioral trends based on historical water quality sequences. It is a deep learning structure suitable for capturing long-term dependencies and nonlinear relationships.

[0053] Deviation identification mechanism: used to compare predicted behavior values ​​with actual behavior values. If the deviation exceeds the threshold, it indicates that the system has a potential "decoupling" state.

[0054] The clustering trend of abnormal behavior refers to the simultaneous presence of abnormal behaviors in multiple sub-regions that are not explained by water quality data, indicating that a systemic problem is occurring.

[0055] In summary, this method, through the technical path of constructing a coupled structure, detecting behavioral prediction deviations, identifying systematic failures, and dynamically adjusting decoupling parameters, forms a complete closed-loop water quality monitoring and early warning mechanism with predictive, responsive, and adaptive capabilities, further enhancing the early warning system's ability to identify and respond to hidden risks in complex aquaculture environments.

[0056] Example 2

[0057] Please refer to Figure 1 Specifically: Several sets of monitoring equipment are pre-deployed in the aquaculture area to monitor the water quality and behavior of the aquaculture organisms in order to obtain real-time water quality data and real-time behavior data.

[0058] The monitoring equipment includes, but is not limited to, dissolved oxygen sensors, conductivity sensors, pH sensors, potential sensors, turbidity sensors, gas sensors, and image acquisition devices; the monitoring equipment is used to monitor in real time whether the corresponding water quality parameters exceed the threshold and whether any abnormalities occur, and when an abnormality occurs, it triggers the corresponding early warning command.

[0059] Real-time water quality data and real-time behavioral data are preprocessed, including noise removal, missing value imputation, and data smoothing. Missing value imputation methods include mean imputation, median imputation, interpolation imputation, and regression imputation. The preprocessed data is then time-aligned to construct a standardized vector set under a synchronized time axis. The standardized vector set includes real-time water quality data and real-time behavioral data, and is used to reflect real-time water quality data under different behavioral conditions.

[0060] The grey relational analysis method was used to analyze the trend coupling relationship between each parameter in the normal water quality data and each parameter in the normal behavior data to obtain the grey relational coefficient.

[0061] The grey relational coefficient is obtained as follows:

[0062]

[0063] Where, r ij (t) represents the behavior parameter B at time t. j With water quality parameter P i The grey relational coefficient, B j (t) represents the value of the j-th behavior parameter at time t, P i (t) represents the value of the i-th water quality parameter at time t, ρ is the resolution coefficient, ranging from [0, 1], commonly 0.5; t is the time index, i is the water quality parameter index, j is the behavior parameter index, and min i,t To minimize the absolute difference across all water quality parameters and all time points, max i,t To take the maximum value of the absolute difference across all water quality parameters and all time points;

[0064] Molecular part min i,t |B j (t)-P i (t)|+ρ*max i,t |B j (t)-P i (t)| represents the minimum difference plus the resolution coefficient multiplied by the maximum difference at the global scale. As a global comparison benchmark, it can be understood as a normalized reference frame reflecting the boundary between the maximum and minimum coupling. Using max... i,t and min i,t This is to ensure the formula has global normality, that is, to scale the difference between the current behavior and water quality combination, so that each pair of P... i With B j All comparisons are within a unified evaluation range (minimum 0, maximum 1) to prevent incomparability between indicators with different dimensions or ranges of variation.

[0065] Denominator part | B j (t)-P i (t)|+ρ*max i,t |B j (t)-P i (t)| represents the actual difference structure between a certain behavioral parameter and a water quality parameter at the current moment. The larger the denominator, the greater the current difference, and the smaller the grey relational coefficient (the weaker the coupling). Where r ij (t) The closer to 1, the stronger the synchronization or trend coupling between the behavior parameter and the water quality parameter at that moment. Conversely, the closer to 0, the weaker the coupling relationship, and the behavior fluctuations are not explained by the water quality index.

[0066] The resolution coefficient is a constant used to adjust the sensitivity of the grey relational coefficient. It controls the distribution range of the grey relational coefficient and affects the relative correlation strength between different variables. Its value can be obtained through empirical setting. In most practical applications, taking the resolution coefficient = 0.5 is the standard value recommended in grey system theory. Its advantages are good stability, strong adaptability, and less tendency to cause extreme deviations.

[0067] The grey relational coefficient only reflects the consistency of the changing trends (direction and magnitude of increase or decrease) of two time series, focusing primarily on the synchronous trend of numerical changes. A high grey relational coefficient indicates highly consistent trends between the two variables, while a low coefficient indicates opposite or inconsistent trends. However, it does not consider whether the response mechanism between variables is nonlinear, delayed, or threshold-triggered. For example, if fish's response to dissolved oxygen concentration is not linear, their feeding behavior remains almost unchanged when dissolved oxygen concentration varies between 6 and 4 mg / L, but suddenly drops sharply when dissolved oxygen concentration falls below 3 mg / L. Therefore, although there is a clear coupling response relationship between dissolved oxygen concentration and feeding frequency, the grey relational coefficient will be too low. Thus, a low grey relational coefficient does not necessarily mean no coupling, but rather that the grey relational coefficient fails to capture the "threshold-triggered" characteristic. Relying solely on the grey relational coefficient might lead to a misjudgment that "dissolved oxygen concentration is unrelated to feeding frequency," causing the parameter to be discarded. By considering mutual information, miscoupling can be effectively reduced.

[0068] By combining historical data, the average grey correlation coefficient between each parameter in the normal water quality data and each parameter in the normal behavioral data is obtained through accumulation. The average grey correlation coefficient is used to measure the sensitivity of the influence of water quality data on behavioral data.

[0069] Historical data refers to water quality data and behavioral data collected during historical periods. Normal water quality data and normal behavioral data refer to state data in which no abnormalities were found in either the water quality data or the behavioral data within the aquaculture area.

[0070] The probability density assessment method is used to analyze the nonlinear dependence between parameters in normal water quality data and parameters in normal behavior data in order to obtain mutual information.

[0071] The method for obtaining mutual information is as follows:

[0072]

[0073] Among them, MI ij For behavioral parameter B j With water quality parameter P i The mutual information between them, P(p i b j ) represents the combination of water quality and behavioral parameter values ​​(p i b j The joint probability of P(p) represents the probability that behavior and water quality occur together in a certain combination of states. i Water quality parameter P i The value is p i Marginal probability density, P(b) j ) is the behavioral parameter B j The value is b j Marginal probability density, p i b j These represent the discretized values ​​of water quality parameters and behavioral parameters, respectively. log(*) is the logarithmic function with a natural base, approximately 2.71828. P(p i )*P(b j Let be the joint probability assuming the two are independent. This represents the information gain of the joint probability relative to the independent assumption. If this ratio is large, it indicates that the two variables are not independent at that point and have information coupling.

[0074] P(p i b j ), P(p i ), P(b j The value of B can be obtained through histogram estimation. j (t) and P i (t) is discretized into bins, and then the frequency of each value or combination is counted and normalized to obtain the probability. Of course, the kernel density estimation method can also be used to obtain it.

[0075] Discretization p i With b j It can be obtained through equidistant binning (e.g., divided into 10 levels), equal-frequency binning, or kernel density estimation;

[0076] Specifically, the calculation of mutual information is based on the joint probability distribution model of water quality parameters and behavioral parameters in historical samples. The marginal distribution and joint distribution of variables are obtained by probability density estimation and discretization frequency normalization. Finally, the coupling strength is calculated through the mutual information function. The larger the mutual information value, the stronger the nonlinear correlation between variables, which serves as an important basis for selecting parameters for the subsequent coupling model.

[0077] Based on the accumulated grey relational coefficients and mutual information over historical periods, and using the mean-standard deviation method, the correlation threshold and dependency threshold are obtained respectively. Based on the correlation threshold and dependency threshold, normal coupling feature pairs are identified. Specifically: if the grey relational coefficient exceeds the correlation threshold and the mutual information exceeds the dependency threshold, it indicates that the corresponding parameter in the water quality data and the corresponding parameter in the behavioral data have a statistically stable coupling structure in a non-disconnected state, and the two parameters are recorded as a set of normal coupling feature pairs; or, if the grey relational coefficient exceeds the correlation threshold but the mutual information exceeds the dependency threshold, it indicates that the corresponding parameter in the water quality data and the corresponding parameter in the behavioral data have a statistically stable coupling structure in a non-disconnected state, and the two parameters are recorded as a set of normal coupling feature pairs.

[0078] Among them, the non-disconnected state is the normal state;

[0079] In this embodiment, the method achieves the preliminary identification of potential water quality risks in the aquaculture environment through multidimensional data modeling and parameter sensitivity measurement. By pre-deploying multiple sets of water quality monitoring equipment (such as pH detectors and ammonia nitrogen sensors) and behavior monitoring devices (such as high-definition cameras and sonar sensors) in the aquaculture area, the water quality status and the behavior status of the aquaculture objects can be collected simultaneously.

[0080] Subsequently, the system performs time alignment, denoising, and normalization on all monitoring data to construct a standardized vector set. This set can be used to dynamically characterize the real-time water quality status under specific behavioral backgrounds, achieving source analysis and feature preservation of the data.

[0081] Based on the collected historical normal state data, the system employs grey relational analysis to measure the trend consistency between water quality parameters (such as dissolved oxygen) and behavioral characteristics (such as swimming speed) to calculate the grey relational coefficient, which reflects the degree to which a water quality indicator explains a specific behavior over time. For example, historical data from multiple aquaculture cycles reveals that the grey relational coefficient between fish feeding activity and ammonia nitrogen concentration in the water reaches 0.85, indicating a high degree of synchronization between the two.

[0082] Specifically, the grey relational coefficient is used to measure the similarity of two variables in terms of trends. The larger the value, the stronger the coupling. However, trend consistency alone is often insufficient to determine deep dependencies. Therefore, this method further introduces mutual information as a nonlinear dependency index, estimating the degree of deviation between the joint distribution of water quality and behavioral variables through probability density. If a water quality parameter and a behavioral characteristic not only have similar trends but also mutual information greater than the dependency threshold, they are considered to have a stable, nonlinear statistical coupling structure.

[0083] Mutual information measures the degree of information sharing between two variables, identifies nonlinear correlations, and is an important tool for distinguishing between synchronous and intrinsic causal coupling. After acquiring all grey relational coefficients and mutual information, the system uses the mean-standard deviation method to set a discrimination threshold, identifying parameter pairs that meet the dual-high condition, defined as normal coupling feature pairs. These parameter pairs represent stable coupling relationships in a non-disconnected state and are used for subsequent predictive modeling. For example, if (dissolved oxygen, swimming speed) constitutes a normal coupling feature pair, it indicates that under normal conditions, fluctuations in dissolved oxygen will be reflected in swimming behavior; if significant abnormalities in behavior occur in the future while dissolved oxygen remains unchanged, it is suspected to be a data-phenomenon disconnect.

[0084] Through the coordinated implementation of the above steps, this method identifies the coupling sensitivity of key water quality parameters and establishes a statistically stable water quality-behavioral response system. This provides a model basis and quantitative evidence for abnormal but normal data states. Compared with the traditional single-parameter judgment mode based on fixed thresholds, the method of this invention can effectively identify the risk of coupling failure and significantly improve the ability to perceive non-obvious threats such as hidden water quality changes and fluctuations in environmental toxins, thereby providing early warning and avoiding major losses caused by biological anomalies.

[0085] Example 3

[0086] Please refer to Figure 1 Specifically: In the normal coupled feature pair, water quality parameters belonging to the water quality state are labeled as supervised samples, and behavioral parameters belonging to the behavioral state are labeled as supervised learning target samples to form sample pairs. These temporally ordered sample pairs are then input into a Long Short-Term Memory (LSTM) network to output predicted values ​​for the behavioral supervised learning target samples, including...

[0087] Water quality parameters belonging to water quality state in the normal coupled feature pair are labeled as supervised samples, and the time series of supervised samples are obtained; behavioral parameters belonging to behavioral state in the normal coupled feature pair are labeled as supervised learning target samples.

[0088] For the supervised samples at each time point in the supervised sample time series, the supervised learning target sample for the next time moment is extracted from the historical data, so as to combine the supervised samples at each time point with the supervised learning target sample for the next time moment to form a sample pair;

[0089] Based on the supervised sample time series, obtain the corresponding sample pair time series;

[0090] The time series of sample pairs are used as the training set and input into a Long Short-Term Memory (LSTM) network. The LSTM network is trained by passing through the input layer, hidden layer and output layer respectively. Based on the standardized vector set, the parameters of the supervised samples in the real-time water quality data are input into the trained LSTM network to output the predicted value of the target sample for behavioral supervision learning.

[0091] The predicted values ​​of the behaviorally supervised learning target samples are used to determine whether there is a risk of data discrepancy between actual conditions and phenomena in the current aquaculture area, and to trigger verification and early warning instructions, including...

[0092] Wait for the next moment to obtain the true value of the supervised learning target sample;

[0093] By subtracting the true value from the predicted value of the supervised learning target sample and taking the absolute value, the deviation is obtained. If the deviation exceeds the preset deviation threshold, it indicates that there is a risk of data and phenomenon being out of sync in the current aquaculture area, and a verification warning command will be triggered.

[0094] If the deviation does not exceed the preset deviation threshold, it indicates that there is currently no risk of data and phenomena being out of sync in the aquaculture area, and the status of the aquaculture area will continue to be monitored.

[0095] After identifying the normal coupling structure, the system uses the water quality parameters within this structure as the main modeling variables to construct a behavior prediction model. Specifically, an LSTM (Long Short-Term Memory) time series network is used as the main body of the model to enhance its ability to fit the lagging response of water quality changes to behavior. The system uses the water quality parameter sequence within a sliding time window as the model input and the behavior feature vector as the prediction target to train a neural network model for predicting future behavior trends. The model training process optimizes the weights by minimizing the mean squared error loss function between the predicted behavior vector and the actual observed vector. Simultaneously, to determine whether the coupling relationship has failed, the system constructs a coupling deviation index to quantify the degree of deviation between the current behavior observation and the predicted value. When this deviation exceeds a set threshold, and all water quality parameters involved in the coupling modeling are within the threshold during this period (i.e., the system does not generate a regular alarm), it is inferred that the abnormal behavior cannot be explained by water quality changes; that is, the behavior has deviated but the water quality has not fluctuated, the coupling has failed, and a data-phenomenon disconnect occurs.

[0096] In this embodiment, the method proposes using water quality parameters from a normal coupling feature pair as supervisory samples and their corresponding behavioral parameters as supervisory learning target samples, combining the two to form a sample pair. By extracting the historical time series of the supervisory samples and pairing the behavioral target corresponding to the next moment at each time point, a temporal sample pair sequence is formed. This sequence is used as the training set and input into a Long Short-Term Memory (LSTM) network. The model learns the temporal evolution law between water quality and behavior through a memory gate mechanism (including input gate, forget gate, and output gate). For example, using dissolved oxygen as a supervisory sample and fish activity as a target sample, the model can learn the statistical structure of the range in which fish activity should be at the next moment under certain water quality conditions. After training, real-time water quality data is input into the trained LSTM network to obtain the predicted value of the behavioral state at the next moment. Subsequently, by waiting for the actual observed values ​​of the behavioral parameters, the absolute difference between the two is calculated to obtain the deviation. If the deviation exceeds a preset threshold, a verification warning instruction is triggered, indicating that there is a potential risk of data-phenomenon disconnect in the system. This process is equivalent to dynamically monitoring the stability of the coupling relationship between behavior and water quality and sensing ecological fluctuations in advance.

[0097] Deviation, as a core criterion, not only determines whether behavior deviates from water quality expectations but also explains the source of that behavior: if deviation persists for a long time with minimal fluctuations in water quality parameters, it indicates that the system has entered a non-physical abnormal state (such as disease, micro-ecological imbalance, etc.), providing a basis for subsequent response strategies. Conversely, if water quality fluctuates drastically, it is more likely that the behavioral changes are caused by water quality drift. Therefore, this mechanism is not only used for disconnection identification but also lays the foundation for anomaly tracing and early warning model optimization. Supervised sample pairs refer to binary learning units consisting of water quality parameters (input variables) and their corresponding next-step behavioral parameters (output targets) at a given time.

[0098] Deviation is used to measure the difference between the predicted behavior and the actual value, and it is a core indicator for determining system coupling failure.

[0099] By introducing a supervised sample-driven LSTM behavior prediction model and using prediction bias as a risk triggering mechanism, an expected comparison system between "data and phenomena" is effectively established. This not only enhances the system's ability to predict behavioral responses caused by water quality changes, but also enables accurate identification of non-water quality-dominated anomalies. It breaks through the limitations of traditional threshold-based judgment models that cannot reflect complex ecological states, and ultimately improves the intelligence and response sensitivity of the aquaculture early warning system.

[0100] Example 4

[0101] Please refer to Figure 1Specifically: A verification and early warning command is initiated to determine whether there is an overall abnormal clustering trend in the current abnormal area, in order to identify whether there is a systemic water quality coupling failure in the current aquaculture area, including...

[0102] Initiate verification and early warning commands, divide the aquaculture area into sub-regions, and identify the risk of data and phenomena being out of sync within each sub-region in order to obtain the number of abnormal areas;

[0103] The global Moran index method based on spatial weight matrix measures the autocorrelation of each abnormal region in the aquaculture area to obtain the clustering index. Based on the clustering index value, it is determined whether there is an overall abnormal clustering trend in the current abnormal region. If there is an overall abnormal clustering trend, it indicates that there is a systemic water quality coupling failure in the current aquaculture area, and the corresponding behavioral parameters are marked as abnormal behavioral parameters.

[0104] The clustering index value is obtained using the following formula:

[0105]

[0106] Where I is the clustering index value, N is the number of subregions, and x g and x f These are the deviations of subregions g and f, respectively. The average deviation across all sub-regions, where g and f are sub-region numbers; w gf Let w be the spatial weight value, indicating whether region g and region f are adjacent (1 if adjacent, 0 if not adjacent), where w gf This forms the spatial weight matrix, a matrix used to represent the adjacency relationship between each region and other regions.

[0107] If the clustering index is greater than 1, it means that similar values ​​are clustered together, which is positively correlated and shows a clustered distribution. At this time, it is judged that the current abnormal area has an overall abnormal clustering trend. If it is less than 0, it means that similar values ​​are scattered, which is negatively correlated and shows anti-clustering or discrete distribution. If it is between 0 and 1, it means that there is no obvious spatial clustering and shows a random distribution.

[0108] The existence of systemic water quality coupling failure indicates that there is indeed a risk of data and phenomena being disconnected in the current aquaculture area;

[0109] Locking the decoupling parameters allows for dynamic correction of their original thresholds, enabling timely water quality monitoring and early warning. This includes...

[0110] When there is a systemic water quality coupling failure in an aquaculture area, the normal coupling feature pair to which the abnormal behavior parameter belongs is locked, and the water quality parameters belonging to the water quality state are extracted from the normal coupling feature pair and marked as decoupling parameters.

[0111] Based on the number of abnormal areas and the total number of sub-areas, the abnormal behavior coverage rate is determined. The abnormal behavior coverage rate can be used to determine whether the current aquaculture area is experiencing a global disturbance or a local disturbance, that is, it can reflect the degree of disturbance.

[0112] The abnormal behavior coverage rate is the ratio of the number of abnormal areas to the total number of sub-areas, where the total number of sub-areas refers to the total number of sub-areas within the aquaculture area.

[0113] Based on the decoupling parameters, determine the original threshold values ​​corresponding to the decoupling parameters;

[0114] Based on the abnormal behavior coverage, the original threshold of the decoupling parameter is dynamically adjusted. The specific adjustment method is as follows: θ dyn =θ ori -η*(1-e -λ*Ls ), where θ dyn For the corrected threshold, θ ori Here, η is the initial threshold for the decoupling parameters, η is the maximum adjustable range, which can be obtained using the safety margin method by setting a fixed percentage, such as 10% to 20% of the initial threshold, e is the natural base, with a value of approximately 2.71828, λ is the response speed coefficient, used to control the sensitivity of threshold correction to coverage; the larger the coefficient, the steeper the curve, indicating that the system is more sensitive to decoupling coverage, and Ls is the abnormal behavior coverage; η*(1-e -λ*Ls The amount is the dynamic downward adjustment caused by coverage.

[0115] The response speed coefficient can be tested by simulation or historical data playback to examine the correction curve performance of different λ values ​​under different abnormal behavior coverage rates. A value that closely matches the system response speed can be selected. The common range is 2 to 6, but it can also be set by the user according to the situation.

[0116] In this embodiment, the invention introduces spatial clustering analysis of abnormal behavior areas as a second layer of verification for decoupling determination. Specifically, after the deviation index triggers the initial decoupling judgment, the aquaculture area is further divided into multiple sub-regions. The number of areas exhibiting abnormal behavior is counted, and the global Moran's index is used to determine whether these abnormal areas show spatial clustering. For example, if abnormal areas are only randomly distributed in corners or a few ponds, rather than concentrated in large areas, it may be an occasional disturbance; however, if multiple adjacent areas continuously trigger decoupling behavior, the Moran's index tends to be positive, indicating a significant spatial clustering trend of the anomaly, with high reliability. This spatial autocorrelation analysis, as the core of verifying the early warning command, compensates for the false alarm problem that may be caused by relying solely on single-point deviation to trigger the early warning, effectively improving the robustness and reliability of decoupling identification.

[0117] After establishing the clustering, this method further marks the water quality parameters as decoupled parameters by tracing back the normal coupling feature pairs corresponding to the abnormal behavior parameters. These parameters are those where the current behavior is abnormal but the corresponding water quality does not produce the expected response. This identification mechanism can help the system accurately pinpoint the culprit of "systemic failure", which helps guide farmers to pay attention to changes in the sensor accuracy or pollution source of the decoupled parameters, providing a direct object for subsequent dynamic adjustment and forming a closed-loop traceability link "from spatial identification to parameter backtracking".

[0118] This method introduces an abnormal behavior coverage index, which is the proportion of the current number of abnormal areas to the total number of sub-regions, to characterize the prevalence of anomalies. Based on this, the alarm threshold of the corresponding decoupling parameter is dynamically adjusted. The adjustment formula adopts a nonlinear exponential adjustment model. This mechanism has significant advantages over a fixed threshold system. When there are few abnormal areas, the alarm threshold is only finely adjusted, avoiding overreaction; when anomalies are significantly clustered, the alarm threshold is significantly lowered, enhancing sensitivity. For example, if the original dissolved oxygen threshold is 4.0 mg / L, but current detection shows a significant decrease in fish feeding frequency and a high aggregation index in 70% of the area, the coverage-driven mechanism automatically lowers the threshold to 3.6 mg / L, thereby promptly capturing water quality hazards caused by the spread of pollution sources and the lurking of microcystin.

[0119] In summary, this invention, by constructing a continuous chain mechanism encompassing disconnection judgment, aggregation verification, parameter tracking, and adaptive threshold adjustment, further improves the accuracy and responsiveness to systemic coupling failures. Especially in the early stages when water quality deterioration signals are not significant, it can guide water quality indicators of concern through behavioral aggregation anomalies, breaking through the bottleneck of traditional "passive alarm and delayed response," and providing a more intelligent, forward-looking, and reliable early warning method for aquaculture water quality management.

[0120] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for monitoring and early warning of water quality in aquaculture, characterized in that: Includes the following steps, S1: Acquire real-time water quality data and real-time behavioral data, and combine them with historical data to analyze whether the corresponding parameters in the water quality data and the corresponding parameters in the behavioral data have a statistically stable coupling structure in a non-disconnected state, so as to obtain the normal coupling characteristic pair; S2: In the normal coupling feature pair, the water quality parameters belonging to the water quality state are marked as supervision samples, and the behavior parameters belonging to the behavior state are marked as supervision learning target samples to form a sample pair. By inputting the temporally ordered sample pair into the long short-term memory network, the predicted value of the behavior supervision learning target sample is output. The predicted value of the behavior supervision learning target sample is used to determine whether there is a risk of data and phenomenon disconnect in the current aquaculture area and to trigger a verification warning instruction. S3: Initiate verification and early warning command. By judging whether there is an overall abnormal clustering trend in the current abnormal area, identify whether there is a systemic water quality coupling failure in the current aquaculture area, and lock the decoupling parameters to dynamically correct the original threshold of the decoupling parameters, so as to achieve timely water quality monitoring and early warning. Locking the decoupling parameters allows for dynamic correction of their original thresholds, enabling timely water quality monitoring and early warning. This includes... When there is a systemic water quality coupling failure in an aquaculture area, the normal coupling feature pair to which the abnormal behavior parameter belongs is locked, and the water quality parameters belonging to the water quality state are extracted from the normal coupling feature pair and marked as decoupling parameters. The abnormal behavior coverage rate is determined based on the number of abnormal areas and the total number of sub-areas. Based on the decoupling parameters, determine the original threshold values ​​corresponding to the decoupling parameters; Based on the abnormal behavior coverage, the original threshold of the decoupling parameter is dynamically adjusted. The specific adjustment method is as follows: ,in, The corrected threshold. The original threshold for the decoupling parameter. This is the maximum possible downward adjustment range. The natural base, For response speed coefficient, For abnormal behavior coverage; Initiate a verification and early warning command to identify whether there is a systemic water quality coupling failure in the current aquaculture area by judging whether there is an overall abnormal clustering trend in the current abnormal area, including: Initiate verification and early warning commands, divide the aquaculture area into sub-regions, and identify the risk of data and phenomena being out of sync within each sub-region in order to obtain the number of abnormal areas; The global Moran index method based on spatial weight matrix measures the autocorrelation of each abnormal region in the aquaculture area to obtain the clustering index. Based on the clustering index value, it is determined whether there is an overall abnormal clustering trend in the current abnormal region. If there is an overall abnormal clustering trend, it indicates that there is a systemic water quality coupling failure in the current aquaculture area, and the corresponding behavioral parameters are marked as abnormal behavioral parameters.

2. The method for monitoring and early warning of water quality in aquaculture according to claim 1, characterized in that: Several sets of monitoring equipment are pre-deployed in the aquaculture area to monitor the water quality and behavior of the aquaculture organisms in order to obtain real-time water quality data and real-time behavior data. Real-time water quality data and real-time behavioral data are preprocessed to construct a standardized vector set under a synchronous time axis. The standardized vector set includes real-time water quality data and real-time behavioral data, and is used to reflect real-time water quality data under different behavioral conditions.

3. The method for monitoring and early warning of water quality in aquaculture according to claim 2, characterized in that: The grey relational analysis method was used to analyze the trend coupling relationship between each parameter in the normal water quality data and each parameter in the normal behavior data to obtain the grey relational coefficient. By combining historical data, the average grey correlation coefficient between each parameter in the normal water quality data and each parameter in the normal behavioral data is obtained through accumulation. The average grey correlation coefficient is used to measure the sensitivity of the influence of water quality data on behavioral data. The probability density assessment method is used to analyze the nonlinear dependence between parameters in normal water quality data and parameters in normal behavior data in order to obtain mutual information. Based on the accumulated grey relational coefficients and mutual information over historical periods, and combined with the mean-standard deviation method, the association threshold and dependency threshold are obtained respectively. Based on the association threshold and dependency threshold, normal coupling feature pairs are identified. Specifically, if the grey relational coefficient exceeds the association threshold and the mutual information exceeds the dependency threshold, it indicates that the corresponding parameters in the water quality data and the corresponding parameters in the behavioral data have a statistically stable coupling structure in a non-disconnected state, and the two parameters are recorded as a set of normal coupling feature pairs.

4. The method for monitoring and early warning of water quality in aquaculture according to claim 3, characterized in that: In a normal coupled feature pair, water quality parameters belonging to the water quality state are labeled as supervised samples, and behavioral parameters belonging to the behavioral state are labeled as supervised learning target samples to form sample pairs. These temporally ordered sample pairs are then input into a Long Short-Term Memory (LSTM) network to output predicted values ​​for the behavioral supervised learning target samples, including... Water quality parameters belonging to the water quality state in the normal coupling feature pair are marked as supervision samples, and the time series of supervision samples are obtained; In the normal coupled feature pair, the behavioral parameters belonging to the behavioral state are marked as the supervised learning target samples; For the supervised samples at each time point in the supervised sample time series, the supervised learning target sample for the next time moment is extracted from the historical data, so as to combine the supervised samples at each time point with the supervised learning target sample for the next time moment to form a sample pair; Based on the supervised sample time series, obtain the corresponding sample pair time series; The sample pairs of time series are used as the training set and input into the Long Short-Term Memory (LSTM) network. The LSM network is trained by passing through the input layer, hidden layer, and output layer. Based on the standardized vector set, the parameters of the supervised samples in the real-time water quality data are input into the trained LSM network to output the predicted value of the behavioral supervised learning target sample.

5. The method for monitoring and early warning of water quality in aquaculture according to claim 4, characterized in that: The predicted values ​​of the behavioral supervision learning target samples are used to determine whether there is a risk of data discrepancy between actual conditions and phenomena in the current aquaculture area, and to trigger verification and early warning instructions. include, Wait for the next moment to obtain the true value of the supervised learning target sample; By subtracting the true value from the predicted value of the supervised learning target sample and taking the absolute value, the deviation is obtained. If the deviation exceeds the preset deviation threshold, it indicates that there is a risk of data and phenomenon being out of sync in the current aquaculture area, and a verification warning command will be triggered. If the deviation does not exceed the preset deviation threshold, it indicates that there is currently no risk of data and phenomena being out of sync in the aquaculture area, and the status of the aquaculture area will continue to be monitored.