An abnormality detection algorithm and inspection system based on aquaculture water quality and environmental parameters
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 江西省农业技术推广中心
- Filing Date
- 2026-01-19
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies for detecting anomalies in water quality and environmental parameters in factory farming suffer from problems such as high false alarm rates for single-index threshold determination, inability to remove outliers, inability to locate the causes of anomalies, and response delays.
A three-level preprocessing strategy is adopted to construct a coupled prediction model. By combining static features, dynamic features and correlation features, anomaly warnings are triggered collaboratively through prediction deviation judgment and correlation rule judgment to match the root cause of the anomaly.
Accurately identify anomalies, reduce misjudgment rate, reduce workload of breeding personnel, avoid ignoring real anomalies, improve control efficiency, adapt to the needs of different breeding species, form a closed-loop management system, and improve breeding efficiency.
Smart Images

Figure CN122196768A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aquaculture water quality monitoring technology, specifically to an anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters. Background Technology
[0002] As an important part of modern agriculture, factory farming's core competitiveness lies in the precise control of the farming environment. The detection of anomalies in water quality and environmental parameters is a key link in achieving precise control. However, the anomaly detection technologies currently used in factory farming have many significant limitations, which seriously affect farming efficiency and product quality.
[0003] The reference patent is titled: "An Automatic Detection Method for Water Quality Parameters in Large-Area Crab Farming Ponds" (Patent Publication No.: CN111487386A, Patent Publication Date: 2020-08-04). This method uses an automatic navigation boat equipped with water level, water quality, and water temperature sensors to collect parameters such as dissolved oxygen, pH value, and water temperature at the bottom and middle layers of each grid in the entire pond, as well as the pond water level. Combining the sampling time and GPS / BeiDou navigation system information of the automatic navigation boat, a database of water level, water quality, and water temperature parameters for each grid in the entire crab farming pond at a limited time point is established. By setting water level, water quality, and water temperature sensors at specific points at the bottom of the pond and combining the latitude and longitude information of the specific points, a long-term historical database of water level, water quality, and water temperature parameters at specific points in the crab farming pond is established. Based on the parameter data of each specific detection point and the database of water level, water quality, and water temperature parameters for the entire crab farming pond at a limited time point, a neural network fitting method is used to estimate the current water level, water quality, and water temperature parameters for the entire crab farming pond, forming a dynamic information distribution map of water quality, water level, and water temperature for each grid in the entire pond.
[0004] Based on the description in the above documents, the existing methods for detecting abnormal water quality and environmental parameters in factory-style aquaculture have the following problems: 1. Existing technologies mostly adopt a single-index threshold judgment mode, without considering the coupling relationship between water quality parameters and between water quality and environmental parameters, which leads to an increased false alarm rate. 2. Existing technologies mostly use simple mean filtering, which cannot effectively remove outliers; 3. Existing detection technologies can only identify the occurrence of anomalies, but cannot locate the cause of the anomalies, resulting in a delay in control response; Therefore, this invention provides an anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters. This solves the problems of existing anomaly detection operations, such as independent detection of single parameters, neglect of coupling correlation, coarse data preprocessing, weak anti-interference ability, delayed anomaly response, lack of cause localization, poor adaptability, and inability to cover multiple species.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an anomaly detection algorithm based on aquaculture water quality and environmental parameters, specifically comprising the following steps: A1. By collecting data on aquaculture water quality and environmental parameters, a three-stage preprocessing strategy is used to perform preprocessing operations on the collected data. A2. Extract the preprocessed data, perform classification operations, and extract water quality and environmental parameter features for anomaly detection from the classified data. A3. Based on the extracted water quality and environmental parameter features, a coupled prediction model is constructed. The model is trained by integrating historical aquaculture data and expert rules for each species. Then, water quality parameters, environmental parameters, and aquaculture process parameters are input, and a coupled prediction model specific to each species is tested. Real-time data is input to output the predicted values of future water quality parameters. A4. Anomaly warnings are triggered collaboratively by a dual mechanism of prediction deviation judgment and association rule judgment, and different levels of anomaly are classified according to the magnitude and duration of the deviation. A5. Associate equipment operating data and process parameters during abnormal periods to match the root cause of the anomaly.
[0007] Preferably, the preprocessing operation of the collected data in A1 using a third-order preprocessing strategy is as follows: a11. Based on the 3σ principle, extreme data caused by sensor drift and equipment start-up and shutdown disturbances are eliminated. That is, the parameter value corresponding to the data falls outside the mean ± 3 times the standard deviation and is judged as abnormal extreme data, while retaining the normal fluctuation range of the parameter. a12. Based on the operational needs of aquaculture, the data collected by the equipment is dynamically smoothed and filtered. The time interval included in the equipment switching operation is set as a special time period, while the time interval outside the special time period is a regular time period. The special time period is balanced by short-time moving average, and the regular time period is balanced by long-time moving average. a13. Use linear interpolation combined with aquaculture experience correction to complete the missing data.
[0008] Preferably, the operation of extracting and classifying the preprocessed data in A2 is as follows: a21. Set up a classification table, using different parameter categories as column headers and the timestamps of the corresponding parameter collection as row headers. a22, and map the preprocessed data to the contents of the classification table. That is, when the parameter category content is matched, the parameter value under the timestamp is filled into the result column where the parameter category and timestamp are extended and intersected. a23. Create a classification table with numerical results.
[0009] Preferably, the operation in A2 to extract water quality and environmental parameter features for anomaly detection from the classified data is as follows: b1. Extract water quality and environmental parameter features to construct an anomaly identification feature set, which includes static features, dynamic features and correlation features; b2. Static features include the absolute value of a single parameter and the baseline value of an environmental parameter. These are combined with species-specific thresholds to determine the suitable aquaculture species. Dynamic features are the dynamic changes of parameters within a unit of time or the duration after exceeding the threshold. Correlation features are the influence between corresponding water quality and environmental parameter categories, i.e., a change in the value of one parameter category causes a change in the value of another parameter category.
[0010] Preferably, the operation of training the model in A3 by fusing historical breeding data and expert rules for each species is as follows: a31. After extracting the historical breeding data of the aquaculture species, divide it into training set and test set in an 8:2 ratio, and use the training set and expert rules to train a coupled prediction model specific to the species. a32. Input the test set into the trained coupled prediction model, and optimize and correct the coupled prediction model according to the deviation between the prediction results and the actual results to obtain a variety-specific coupled prediction model.
[0011] Preferably, the operation of inputting real-time data and outputting predicted values of future water quality parameters in A3 is as follows: c1. Determine the parameter category to be predicted. First, extract the real-time changes of the parameter category. Select the absolute values of the parameters over f periods and calculate the average to obtain the fluctuation value. In this way, predict the next period node parameter value of the current parameter category under ideal conditions within the fluctuation range of the current period node parameter value. c2. The fluctuation value update operation removes the parameter values of the preceding period nodes for f periods and adds the corresponding number of period node parameter values in real time, calculated according to the average. c3. Extract the associated features of the current parameter category, that is, extract the impact of changes in the value of the associated features on the value of the current parameter category. Similarly, obtain the predicted parameter value of the associated feature value in the next period node through the operation of obtaining the fluctuation value. Based on the rule coefficient at the time of association, obtain the predicted parameter value range of the current parameter category in the next period node.
[0012] Preferably, the dual-mechanism collaborative triggering of the anomaly warning operation in A4, which combines prediction deviation determination and association rule determination, is as follows: a41. By extracting the actual value under the corresponding period node and comparing the actual value under the period node with the predicted parameter value range of the period node, if the actual value under the period node is not within the predicted parameter value range of the period node, an abnormal warning generation instruction is triggered. a42. Simultaneously extract the parameter category values associated with the current parameter category, and determine whether the associated parameter category values meet the water quality and environmental parameter association rules based on the set aquaculture experience. If not, trigger the abnormal warning generation command. a43. If neither step a41 nor step a42 is satisfied, an abnormal warning generation instruction will be triggered.
[0013] Preferably, the operation in A4 that classifies different levels of abnormality based on the magnitude and duration of the deviation is as follows: d1. Extract values of different parameter categories that exceed the predicted parameter value range, and set the abnormality level range after exceeding the range; d2. Compare the values that exceed the range with the values in the anomaly level range, and compare the duration of the value exceeding the range of predicted parameter values with the anomaly level range. d3. Based on this, the abnormality is divided into three levels: mild, moderate and severe, and different warning instructions are matched for different levels of abnormality.
[0014] Preferably, the operation of matching the root cause of the anomaly in A5 is as follows: a51. Retrieve equipment status data and process parameters during abnormal periods; a52. Establish a cause database for anomaly types using historical data, match the detected anomaly types with the cause database, and filter out the root causes of the anomalies corresponding to the anomaly types. a53. Output the root cause of the anomaly, its corresponding level, and the scope of its impact to the staff.
[0015] This invention also discloses an anomaly inspection system based on aquaculture water quality and environmental parameters, comprising: Data acquisition module: Collects water quality parameters, environmental parameters, and equipment operation data through high-precision sensors, and the acquisition frequency is dynamically adjusted according to the scenario; Data processing and analysis module: This module preprocesses the collected data and constructs a coupled prediction model to predict future water quality parameters. Early warning module: It uses a dual mechanism of judgment based on prediction deviation and judgment based on association rules to trigger abnormal early warning, and outputs early warning information with different priorities according to the level of abnormality to the aquaculture personnel. Regulation and verification module: Automatically records abnormal data, the regulation measures taken by aquaculture personnel, and the water quality recovery status, and feeds the data back to the coupled prediction model for iterative optimization of the model.
[0016] This invention provides an anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters. Compared with existing technologies, it has the following advantages: 1. This anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters constructs a multi-dimensional feature set of "static features + dynamic features + correlation features," and combines it with an improved LSTM and expert rule fusion coupled prediction model to establish a variety-specific dynamic judgment benchmark. At the same time, it adopts a dual mechanism of "prediction deviation judgment + correlation rule judgment" for collaborative early warning, which effectively avoids the one-sidedness of single threshold judgment, accurately identifies anomalies, reduces the probability of misjudgment, significantly reduces the ineffective workload of aquaculture personnel, avoids the problem of ignoring real anomalies due to frequent false alarms, and provides a reliable guarantee for accurate monitoring of the aquaculture environment.
[0017] 2. This anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters optimizes data quality layer by layer through a three-stage preprocessing strategy. It flexibly adjusts the moving average window according to the differences between normal and special time periods, ensuring data smoothness while taking into account real-time performance. This avoids information distortion caused by traditional fixed smoothing methods, solves the problem of data breakage caused by sensor offline, and ensures data integrity. It provides high-quality data support for subsequent feature extraction, coupled modeling, and anomaly judgment, ensuring the accuracy and stability of detection results.
[0018] 3. This anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters optimizes the detection operation process and data collection frequency, giving aquaculture personnel valuable time for adjustment and preventing the continuous expansion of anomalies from causing stress reactions or large-scale mortality in aquaculture organisms. At the same time, by associating equipment operation data and process parameters during abnormal periods, it achieves accurate matching of the root cause of anomalies based on a preset "cause library of anomaly types", directly outputting targeted adjustment suggestions, avoiding blind adjustment, and significantly improving the efficiency and effectiveness of adjustment.
[0019] 4. This anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters establishes a species-specific threshold library and coupled prediction model. It uses historical aquaculture data to conduct targeted training and optimization for different aquaculture species, enabling the model to accurately adapt to the growth needs of each species. This effectively solves the problem of poor adaptability of existing technologies, meets the monitoring needs of large-scale, multi-species factory farming, and reduces the cost of technology promotion and application.
[0020] 5. This anomaly detection algorithm and inspection system based on aquaculture water quality and environmental parameters outputs precise control suggestions by locating the cause of anomalies, avoiding the energy waste and resource depletion caused by traditional blind control. The system is equipped with a control verification module that automatically records abnormal data, control measures, and water quality recovery status, and feeds the data back to the coupled modeling module for model iteration and optimization. With the continuous accumulation of aquaculture data, the model's prediction accuracy, anomaly judgment accuracy, and cause location accuracy can be further improved, forming a closed-loop system of "detection-control-verification-optimization". It continuously adapts to the dynamic changes in aquaculture scenarios, helps industrialized aquaculture achieve refined management, and improves the quality and overall benefits of aquaculture products. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the operation of the anomaly detection algorithm of the present invention. Figure 2 This is a schematic diagram of the inspection system of the present invention. Detailed Implementation
[0022] 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.
[0023] Please see Figures 1-2 This invention provides three technical solutions: Example 1: An anomaly detection algorithm based on aquaculture water quality and environmental parameters, specifically including the following steps: A1. By collecting data on aquaculture water quality and environmental parameters, a three-stage preprocessing strategy is used to perform preprocessing operations on the collected data. A2. Extract the preprocessed data, perform classification operations, and extract water quality and environmental parameter features for anomaly detection from the classified data. A3. Based on the extracted water quality and environmental parameter features, a coupled prediction model is constructed. The model is trained by integrating historical aquaculture data and expert rules for each species. Then, water quality parameters, environmental parameters, and aquaculture process parameters are input, and a coupled prediction model specific to each species is tested. Real-time data is input to output the predicted values of future water quality parameters. A4. Anomaly warnings are triggered collaboratively by a dual mechanism of prediction deviation judgment and association rule judgment, and different levels of anomaly are classified according to the magnitude and duration of the deviation. A5. Associate equipment operating data and process parameters during abnormal periods to match the root cause of the anomaly.
[0024] By constructing a multi-dimensional feature set of "static features + dynamic features + correlation features", and combining it with an improved LSTM and expert rule fusion coupled prediction model, a variety-specific dynamic judgment benchmark is established. At the same time, a dual mechanism of "prediction deviation judgment + correlation rule judgment" is adopted for collaborative early warning, which effectively avoids the one-sidedness of single threshold judgment, accurately identifies anomalies, reduces the probability of misjudgment, significantly reduces the ineffective workload of breeding personnel, avoids the problem of ignoring real anomalies due to frequent false alarms, and provides a reliable guarantee for accurate monitoring of the breeding environment.
[0025] In this embodiment of the invention, the preprocessing operation of the collected data in A1 using a third-order preprocessing strategy is as follows: a11. Based on the 3σ principle, extreme data caused by sensor drift and equipment start-up and shutdown disturbances are eliminated. That is, the parameter value corresponding to the data falls outside the mean ± 3 times the standard deviation and is judged as abnormal extreme data, while retaining the normal fluctuation range of the parameter. a12. Based on the operational needs of aquaculture, the data collected by the equipment is dynamically smoothed and filtered. The time interval included in the equipment switching operation is set as a special time period, while the time interval outside the special time period is a regular time period. The special time period is balanced by short-time moving average, and the regular time period is balanced by long-time moving average. a13. Use linear interpolation combined with aquaculture experience correction to complete the missing data.
[0026] Among them, "regular periods" and "special periods" (before and after feeding, when switching equipment) are distinguished: a 5-minute moving average is used for regular periods, and a 2-minute moving average is used for special periods (such as 30 minutes before feeding) to balance the smoothing effect and real-time performance.
[0027] By designing a three-stage preprocessing strategy, the data quality is optimized layer by layer. The moving average window is flexibly adjusted according to the differences between normal and special time periods. This ensures both data smoothness and real-time performance, avoids information distortion caused by traditional fixed smoothing methods, solves data breakage problems caused by sensor offline, and ensures data integrity. This provides high-quality data support for subsequent feature extraction, coupled modeling, and anomaly detection, ensuring the accuracy and stability of the detection results.
[0028] In this embodiment of the invention, the operation of extracting and classifying the preprocessed data in A2 is as follows: a21. Set up a classification table, using different parameter categories as column headers and the timestamps of the corresponding parameter collection as row headers. a22, and map the preprocessed data to the contents of the classification table. That is, when the parameter category content is matched, the parameter value under the timestamp is filled into the result column where the parameter category and timestamp are extended and intersected. a23. Create a classification table with numerical results.
[0029] In this embodiment of the invention, the operation in A2 to extract water quality and environmental parameter features for anomaly detection from the classified data is as follows: b1. Extract water quality and environmental parameter features to construct an anomaly identification feature set, which includes static features, dynamic features and correlation features; b2. Static features include the absolute value of a single parameter and the baseline value of an environmental parameter. These are combined with species-specific thresholds to determine the suitable aquaculture species. Dynamic features are the dynamic changes of parameters within a unit of time or the duration after exceeding the threshold. Correlation features are the influence between corresponding water quality and environmental parameter categories, i.e., a change in the value of one parameter category causes a change in the value of another parameter category.
[0030] Among them, static characteristics include: absolute values of single parameters (such as dissolved oxygen value and water temperature value), environmental parameter benchmark values (such as workshop temperature of 25℃), and specific thresholds for suitable varieties. Dynamic characteristics: parameter change rate (e.g., dissolved oxygen decreases by >0.8 mg / L within 10 minutes), fluctuation range (e.g., daily fluctuation of ammonia nitrogen >0.3 mg / L), duration (e.g., water temperature exceeds threshold for >30 minutes). Correlation characteristics: coupling coefficient of water quality and environmental parameters (e.g., dissolved oxygen consumption increases by 0.2 mg / L for every 1°C increase in workshop temperature), correlation between water quality parameters (e.g., when ammonia nitrogen increases by 0.1 mg / L, nitrate nitrogen should increase by 0.05 mg / L simultaneously).
[0031] By optimizing the detection process and data collection frequency, valuable adjustment time is gained for aquaculture personnel, preventing the continuous expansion of anomalies from causing stress reactions or large-scale mortality in aquatic organisms. At the same time, by linking equipment operation data and process parameters during abnormal periods, the root causes of anomalies are accurately matched based on a preset "cause library of anomaly types," directly outputting targeted adjustment suggestions, avoiding blind adjustments, and significantly improving the efficiency and effectiveness of adjustments.
[0032] In this embodiment of the invention, the operation of training the model in A3 using historical breeding data of various species and expert rules is as follows: a31. After extracting the historical breeding data of the aquaculture species, divide it into training set and test set in an 8:2 ratio, and use the training set and expert rules to train a coupled prediction model specific to the species. a32. Input the test set into the trained coupled prediction model, and optimize and correct the coupled prediction model according to the deviation between the prediction results and the actual results to obtain a variety-specific coupled prediction model.
[0033] Among these measures, a variety-specific coupled prediction model is constructed to provide a dynamic benchmark for anomaly detection. ① Model selection: An improved LSTM + expert rule fusion model is adopted; ② Input variables: water quality parameters (dissolved oxygen, ammonia nitrogen, water temperature, pH), environmental parameters (workshop temperature and humidity, light intensity), and aquaculture process parameters (stocking density, feeding amount). ③ Output variables: Predicted water quality parameters for the next 10 minutes; ④ Model training: The model is trained using historical aquaculture data of each species, and the prediction bias is corrected by combining expert rules (such as the rate of increase of ammonia nitrogen after feeding should be ≤0.05mg / L / 10 minutes) to make the prediction accuracy ≥93%.
[0034] By establishing a threshold library and coupled prediction model specific to each species, and using historical aquaculture data for targeted training and optimization, the model can accurately adapt to the growth needs of each species, effectively solving the problem of poor adaptability of existing technologies, meeting the monitoring needs of large-scale, multi-species factory farming, and reducing the cost of technology promotion and application.
[0035] In this embodiment of the invention, the operation of inputting real-time data and outputting predicted values of future water quality parameters in A3 is as follows: c1. Determine the parameter category to be predicted. First, extract the real-time changes of the parameter category. Select the absolute values of the parameters over f periods and calculate the average to obtain the fluctuation value. In this way, predict the next period node parameter value of the current parameter category under ideal conditions within the fluctuation range of the current period node parameter value. c2. The fluctuation value update operation removes the parameter values of the preceding period nodes for f periods and adds the corresponding number of period node parameter values in real time, calculated according to the average. c3. Extract the associated features of the current parameter category, that is, extract the impact of changes in the value of the associated features on the value of the current parameter category. Similarly, obtain the predicted parameter value of the associated feature value in the next period node through the operation of obtaining the fluctuation value. Based on the rule coefficient at the time of association, obtain the predicted parameter value range of the current parameter category in the next period node.
[0036] In this embodiment of the invention, the dual-mechanism collaborative triggering of the anomaly warning operation in A4 through prediction deviation determination and association rule determination is as follows: a41. By extracting the actual value under the corresponding period node and comparing the actual value under the period node with the predicted parameter value range of the period node, if the actual value under the period node is not within the predicted parameter value range of the period node, an abnormal warning generation instruction is triggered. a42. Simultaneously extract the parameter category values associated with the current parameter category, and determine whether the associated parameter category values meet the water quality and environmental parameter association rules based on the set aquaculture experience. If not, trigger the abnormal warning generation command. a43. If neither step a41 nor step a42 is satisfied, an abnormal warning generation instruction will be triggered.
[0037] Among them, there are preset water quality-environment parameter association rules (such as "when the workshop temperature is >30℃, the dissolved oxygen should be ≥5.5mg / L" and "when the ammonia nitrogen increases, the flow rate of the biological filter should be increased accordingly"). If the rules are not met (such as when the dissolved oxygen is only 5.0mg / L at a temperature of 31℃), an abnormal warning will be triggered.
[0038] In this embodiment of the invention, the operation of classifying different levels of abnormality in A4 according to the magnitude and duration of the deviation is as follows: d1. Extract values of different parameter categories that exceed the predicted parameter value range, and set the abnormality level range after exceeding the range; d2. Compare the values that exceed the range with the values in the anomaly level range, and compare the duration of the value exceeding the range of predicted parameter values with the anomaly level range. d3. Based on this, the abnormality is divided into three levels: mild, moderate and severe, and different warning instructions are matched for different levels of abnormality.
[0039] For example, based on the magnitude and duration of the deviation, it is divided into mild (Δ≤0.8mg / L, duration <10 minutes), moderate (0.8mg / L<Δ≤1.2mg / L, duration 10-30 minutes), and severe (Δ>1.2mg / L, duration >30 minutes), corresponding to different warning priorities.
[0040] In this embodiment of the invention, the operation of matching the root cause of the anomaly in A5 is as follows: a51. Retrieve equipment status data and process parameters during abnormal periods; a52. Establish a cause database for anomaly types using historical data, match the detected anomaly types with the cause database, and filter out the root causes of the anomalies corresponding to the anomaly types. a53. Output the root cause of the anomaly, its corresponding level, and the scope of its impact to the staff.
[0041] This includes retrieving equipment status (such as aerator power, biofilter flow rate, and feeding robot operation records) and process parameters (such as whether the stocking density exceeds the standard or whether the feeding amount is abnormal) during abnormal periods, establishing a "cause database of abnormal types" (such as abnormal dissolved oxygen → insufficient aerator power / biomass overload), "abnormal ammonia nitrogen → biofilter malfunction / overfeeding", and outputting the abnormal level and scope of impact (such as moderate dissolved oxygen abnormality in a certain aquaculture pond, the reason being: aerator power is only 80% of the rated value) to support precise control.
[0042] By pinpointing the causes of anomalies and providing precise control suggestions, the system avoids the energy waste and resource depletion caused by traditional blind control. Equipped with a control verification module, the system automatically records abnormal data, control measures, and water quality recovery. This data is fed back to the coupled modeling module for model iteration and optimization. As aquaculture data continues to accumulate, the model's prediction accuracy, anomaly detection accuracy, and cause location accuracy can be further improved, forming a closed-loop system of "detection-control-verification-optimization." This system continuously adapts to the dynamic changes in aquaculture scenarios, helping industrialized aquaculture achieve refined management and improve the quality and overall benefits of aquaculture products.
[0043] Example 2 differs from Example 1 in that: the present invention also discloses an anomaly inspection system based on aquaculture water quality and environmental parameters, comprising: Data acquisition module: Collects water quality parameters, environmental parameters, and equipment operation data through high-precision sensors, and the acquisition frequency is dynamically adjusted according to the scenario; Data processing and analysis module: This module preprocesses the collected data and constructs a coupled prediction model to predict future water quality parameters. Early warning module: It uses a dual mechanism of judgment based on prediction deviation and judgment based on association rules to trigger abnormal early warning, and outputs early warning information with different priorities according to the level of abnormality to the aquaculture personnel. Regulation and verification module: Automatically records abnormal data, the regulation measures taken by aquaculture personnel, and the water quality recovery status, and feeds the data back to the coupled prediction model for iterative optimization of the model.
[0044] Example 3 differs from Examples 1 and 2 in that: the present invention also discloses an execution flow for the algorithm, specifically as follows: Data Acquisition: Water quality parameters: Dissolved oxygen (accuracy ±0.1mg / L), ammonia nitrogen (±0.05mg / L), and water temperature (±0.2℃) are collected every 5 minutes by sensors, and the frequency is increased to once every 2 minutes before and after feeding (6:00 AM, 10:00 AM, 2:00 PM, and 6:00 PM); Environmental parameters: Workshop temperature and humidity sensors collect data every 10 minutes; Equipment data: Aerator power and biological filter flow rate are collected every 1 minute. Data preprocessing: Outlier removal: If dissolved oxygen jumps from 5.5 mg / L to 3.8 mg / L at a certain moment (exceeding the 3σ range), it is determined to be sensor drift and is removed; Dynamic smoothing: A 5-minute moving average is used during normal periods (e.g., 8:00 AM), and a 2-minute moving average is used 30 minutes before feeding (e.g., 5:30 AM); Data completion: If the dissolved oxygen sensor is offline for 4 minutes, linear interpolation is used for data completion; Coupled Modeling and Anomaly Detection: Model Input: Current dissolved oxygen 5.2 mg / L, ammonia nitrogen 0.4 mg / L, water temperature 28℃, workshop temperature 29℃, feeding rate 0.8 kg / time; Model Output: Predicted dissolved oxygen value 5.1 mg / L and predicted ammonia nitrogen value 0.42 mg / L for the next 10 minutes; Anomaly Detection: If the deviation between the actual monitored values (dissolved oxygen 4.5 mg / L and ammonia nitrogen 0.43 mg / L in 10 minutes) and the predicted values ΔDO = 0.6 mg / L (> 0.5 mg / L threshold), and the dissolved oxygen is 4.5 mg / L < 5.5 mg / L at a workshop temperature of 29℃ (association rule not satisfied), a "moderate dissolved oxygen anomaly" warning is triggered. Cause identification: Equipment data retrieval: Aerator current power 1.2kW (rated 1.5kW, only 80% capacity), biological filter flow velocity 10m / s. 3 / h (normal); Matching the cause database: The cause of the abnormality is determined to be "insufficient aerator power", and the warning message is output: "Moderate dissolved oxygen abnormality in pool 3, it is recommended to increase the aerator power to 1.5kW"; Control verification: Control measures were implemented: the oxygenator power was increased to 1.5kW; Effect feedback: after 15 minutes, dissolved oxygen rose to 5.3mg / L, the abnormality was resolved, and the algorithm recorded the abnormal data for model iteration.
[0045] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0046] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0047] 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. An anomaly detection algorithm based on aquaculture water quality and environmental parameters, characterized in that: Specifically, the following steps are included: A1. By collecting data on aquaculture water quality and environmental parameters, a three-stage preprocessing strategy is used to perform preprocessing operations on the collected data. A2. Extract the preprocessed data, perform classification operations, and extract water quality and environmental parameter features for anomaly detection from the classified data. A3. Based on the extracted water quality and environmental parameter features, a coupled prediction model is constructed. The model is trained by integrating historical aquaculture data and expert rules for each species. Then, water quality parameters, environmental parameters, and aquaculture process parameters are input, and a coupled prediction model specific to each species is tested. Real-time data is input to output the predicted values of future water quality parameters. A4. Anomaly warnings are triggered collaboratively by a dual mechanism of prediction deviation judgment and association rule judgment, and different levels of anomaly are classified according to the magnitude and duration of the deviation. A5. Associate equipment operating data and process parameters during abnormal periods to match the root cause of the anomaly.
2. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 1, characterized in that: The preprocessing operation of the collected data in A1 using a third-order preprocessing strategy is as follows: a11. Based on the 3σ principle, extreme data caused by sensor drift and equipment start-up and shutdown disturbances are eliminated. That is, the parameter value corresponding to the data falls outside the mean ± 3 times the standard deviation and is judged as abnormal extreme data, while retaining the normal fluctuation range of the parameter. a12. Based on the operational needs of aquaculture, the data collected by the equipment is dynamically smoothed and filtered. The time interval included in the equipment switching operation is set as a special time period, while the time interval outside the special time period is a regular time period. The special time period is balanced by short-time moving average, and the regular time period is balanced by long-time moving average. a13. Use linear interpolation combined with aquaculture experience correction to complete the missing data.
3. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 1, characterized in that: The operation of extracting and classifying the preprocessed data in A2 is as follows: a21. Set up a classification table, using different parameter categories as column headers and the timestamps of the corresponding parameter collection as row headers. a22, and map the preprocessed data to the contents of the classification table. That is, when the parameter category content is matched, the parameter value under the timestamp is filled into the result column where the parameter category and timestamp are extended and intersected. a23. Create a classification table with numerical results.
4. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 1, characterized in that: The operation in A2 that extracts water quality and environmental parameter features for anomaly detection from the classified data is as follows: b1. Extract water quality and environmental parameter features to construct an anomaly identification feature set, which includes static features, dynamic features and correlation features; b2. Static features include the absolute value of a single parameter and the baseline value of an environmental parameter. These are combined with species-specific thresholds to determine the suitable aquaculture species. Dynamic features are the dynamic changes of parameters within a unit of time or the duration after exceeding the threshold. Correlation features are the influence between corresponding water quality and environmental parameter categories, i.e., a change in the value of one parameter category causes a change in the value of another parameter category.
5. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 1, characterized in that: The operation of training the model in A3 by fusing historical breeding data and expert rules for each species is as follows: a31. After extracting the historical breeding data of the aquaculture species, divide it into training set and test set in an 8:2 ratio, and use the training set and expert rules to train a coupled prediction model specific to the species. a32. Input the test set into the trained coupled prediction model, and optimize and correct the coupled prediction model according to the deviation between the prediction results and the actual results to obtain a variety-specific coupled prediction model.
6. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 1, characterized in that: The operation of inputting real-time data and outputting predicted values of future water quality parameters in A3 is as follows: c1. Determine the parameter category to be predicted. First, extract the real-time changes of the parameter category. Select the absolute values of the parameters over f periods and calculate the average to obtain the fluctuation value. In this way, predict the next period node parameter value of the current parameter category under ideal conditions within the fluctuation range of the current period node parameter value. c2. The fluctuation value update operation removes the parameter values of the preceding period nodes for f periods and adds the corresponding number of period node parameter values in real time, calculated according to the average. c3. Extract the associated features of the current parameter category, that is, extract the impact of changes in the value of the associated features on the value of the current parameter category. Similarly, obtain the predicted parameter value of the associated feature value in the next period node through the operation of obtaining the fluctuation value. Based on the rule coefficient at the time of association, obtain the predicted parameter value range of the current parameter category in the next period node.
7. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 6, characterized in that: The dual-mechanism collaborative triggering of anomaly warning operations in A4, which utilizes prediction bias determination and association rule determination, is as follows: a41. By extracting the actual value under the corresponding period node and comparing the actual value under the period node with the predicted parameter value range of the period node, if the actual value under the period node is not within the predicted parameter value range of the period node, an abnormal warning generation instruction is triggered. a42. Simultaneously extract the parameter category values associated with the current parameter category, and determine whether the associated parameter category values meet the water quality and environmental parameter association rules based on the set aquaculture experience. If not, trigger the abnormal warning generation command. a43. If neither step a41 nor step a42 is satisfied, an abnormal warning generation instruction will be triggered.
8. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 6, characterized in that: The operation in A4 that classifies different levels of abnormality based on the magnitude and duration of the deviation is as follows: d1. Extract values of different parameter categories that exceed the predicted parameter value range, and set the abnormality level range after exceeding the range; d2. Compare the values that exceed the range with the values in the anomaly level range, and compare the duration of the value exceeding the range of predicted parameter values with the anomaly level range. d3. Based on this, the abnormality is divided into three levels: mild, moderate and severe, and different warning instructions are matched for different levels of abnormality.
9. The anomaly detection algorithm based on aquaculture water quality and environmental parameters according to claim 1, characterized in that: The operation for matching the root cause of the anomaly in A5 is as follows: a51. Retrieve equipment status data and process parameters during abnormal periods; a52. Establish a cause database for anomaly types using historical data, match the detected anomaly types with the cause database, and filter out the root causes of the anomalies corresponding to the anomaly types. a53. Output the root cause of the anomaly, its corresponding level, and the scope of its impact to the staff.
10. An anomaly inspection system based on aquaculture water quality and environmental parameters, employing an anomaly detection algorithm based on aquaculture water quality and environmental parameters as described in any one of claims 1-9, characterized in that: include: Data acquisition module: Collects water quality parameters, environmental parameters, and equipment operation data through high-precision sensors, and the acquisition frequency is dynamically adjusted according to the scenario; Data processing and analysis module: This module preprocesses the collected data and constructs a coupled prediction model to predict future water quality parameters. Early warning module: It uses a dual mechanism of judgment based on prediction deviation and judgment based on association rules to trigger abnormal early warning, and outputs early warning information with different priorities according to the level of abnormality to the aquaculture personnel. Regulation and verification module: Automatically records abnormal data, the regulation measures taken by aquaculture personnel, and the water quality recovery status, and feeds the data back to the coupled prediction model for iterative optimization of the model.