Embedded intelligent aquaculture dissolved oxygen regulation and control system

Through the embedded intelligent aquaculture dissolved oxygen control system, an independent closed-loop system is built using edge computing and lightweight algorithms, which solves the network dependence and measurement accuracy problems of traditional systems, and realizes high-precision localized data processing and equipment control, which is suitable for aquaculture in remote areas.

CN120604751APending Publication Date: 2025-09-09FUJIAN UNIV OF TECH

Patent Information

Application Number
CN202510723777.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-01
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Traditional aquaculture dissolved oxygen control systems rely on cloud-based processing, which has problems such as strong network dependence, lack of localized processing capabilities, insufficient sensor measurement accuracy, and poor compatibility between predictive control models and hardware. These problems lead to control delays or failures, making it difficult to operate effectively in remote areas.

Method used

An embedded intelligent aquaculture dissolved oxygen control system is adopted, which integrates the perception layer, transmission layer and execution layer. It uses the edge computing node Raspberry Pi 5 for local data processing and predictive control, combines a lightweight weighted convolutional neural network model to predict dissolved oxygen concentration, and builds a local independent communication network through a dual-band Wi-Fi module to achieve autonomous control.

Benefits of technology

It improves the reliability and response speed of the system in an offline environment, reduces dependence on external networks, improves the automation level of aquaculture and the efficiency of dissolved oxygen regulation, and ensures high-precision data processing and equipment control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120604751A_ABST
    Figure CN120604751A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent aquaculture, and discloses an embedded intelligent aquaculture dissolved oxygen regulation and control system. The system comprises a sensing layer configured with a sensor module used for collecting water environment parameters in real time; the transmission layer comprises a network data acquisition instrument and an edge computing node, the acquired analog signals are converted into digital signals, the digital signals are transmitted to the edge computing node, and the edge computing node is Raspberry Pi 5; the application layer is deployed in Raspberry Pi 5 and comprises a data processing unit and a prediction control unit, and the data processing unit is used for performing cleaning, feature extraction and format conversion on the real-time water quality data transmitted by the transmission layer and the acquired historical water quality data to generate a time sequence data set; the prediction control unit predicts the dissolved oxygen concentration in real time based on the time sequence data set, and generates an aerator control signal according to a prediction result; and the execution layer comprises an aerator connected with the GPIO interface of the Raspberry Pi 5, and the aerator executes start-stop operation according to the aerator control signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent aquaculture technology, and in particular to an embedded intelligent aquaculture dissolved oxygen control system. Background Art

[0002] In aquaculture, dissolved oxygen concentration is a key parameter affecting the survival rate and growth efficiency of aquaculture organisms. Traditional aquaculture dissolved oxygen control systems typically adopt a three-tier architecture of "sensor-cloud platform-actuator," relying on remote servers for data processing and control decisions. This presents the following technical bottlenecks:

[0003] 1. High network dependency: Data must be uploaded to the cloud in real time. Remote farming areas are susceptible to insufficient network coverage or signal interruptions, leading to control delays or even system failures.

[0004] 2. Lack of local processing capabilities: Lack of local decision support from edge computing nodes, making it impossible to independently complete data collection, prediction, and device control in an offline environment;

[0005] 3. Insufficient sensor measurement accuracy: There is no integrated temperature compensation mechanism. The measurement of dissolved oxygen and pH values ​​is significantly affected by water temperature fluctuations, resulting in large data deviations.

[0006] 4. Poor compatibility between predictive control models and hardware: Traditional deep learning models have high computational complexity and are difficult to run in real time on low-power embedded devices, limiting the system's portability and deployment flexibility.

[0007] Therefore, a system is urgently needed to solve at least one of the above problems. Summary of the Invention

[0008] This application provides an embedded intelligent aquaculture dissolved oxygen control system, which aims to solve the problems of traditional aquaculture dissolved oxygen control systems that usually adopt a three-tier architecture of "sensor-cloud platform-execution device" and rely on remote servers for data processing and control decisions. It has strong network dependence, lack of local processing capabilities, insufficient sensor measurement accuracy, and poor compatibility between predictive control models and hardware.

[0009] In a first aspect, an embodiment of the present application provides an embedded intelligent aquaculture dissolved oxygen control system, comprising:

[0010] The perception layer is equipped with a sensor module for real-time acquisition of water environment parameters. The sensor module includes at least a dissolved oxygen sensor, a pH sensor, and a temperature sensor. The sensor module is integrated with a temperature compensation module to dynamically correct the measured value.

[0011] The transmission layer includes a network data logger and an edge computing node. The network data logger communicates with the sensor module via an RS-485 interface and the ModBus-RTU protocol, converts the collected analog signals into digital signals, and transmits them to the edge computing node. The edge computing node is a Raspberry Pi 5 with a built-in dual-band Wi-Fi module. The dual-band Wi-Fi module is used to establish an AP hotspot to build a local independent communication network and obtain historical water quality data from the IoT cloud platform through an API interface.

[0012] The application layer is deployed in the Raspberry Pi 5 and includes a data processing unit and a prediction control unit. The data processing unit is used to clean, extract features, and convert the format of the real-time water quality data transmitted by the transport layer and the acquired historical water quality data to generate a time series data set. The prediction control unit performs real-time prediction of dissolved oxygen concentration based on the time series data set and generates an aerator control signal based on the prediction result.

[0013] The execution layer includes an aerator connected to the GPIO interface of the Raspberry Pi 5, and the aerator performs start and stop operations according to the aerator control signal.

[0014] In some embodiments, the sensor module integrates a temperature compensation module to dynamically correct the measured value, including: the temperature sensor synchronously collects water temperature data, the temperature compensation module dynamically corrects the oxygen diffusion coefficient of the dissolved oxygen sensor based on the water temperature data, and compensates for the electrode potential temperature drift of the pH sensor, and the correction formulas corresponding to the compensation and dynamic correction meet the nonlinear relationship model between the dissolved oxygen concentration and temperature of the water body and the Nernst equation temperature correction mechanism of the pH value.

[0015] In some embodiments, the collected analog signal is converted into a digital signal and transmitted to the edge computing node, including: the network data acquisition instrument serves as a data concentrator, cascades multiple sensor modules through the RS-485 bus, parses the analog signal output by the sensor in accordance with the ModBus-RTU protocol, converts it into a digital signal through a built-in analog-to-digital conversion module, and transmits the digital signal to the Raspberry Pi 5 in real time, and synchronously uploads it to the cloud storage through the Internet of Things cloud platform interface.

[0016] In some embodiments, the dual-band Wi-Fi module is used to establish an AP hotspot to build a local independent communication network, including: the dual-band Wi-Fi module provides wireless communication access for local devices such as the sensor module and network data logger by building a 2.4GHz and 5GHz dual-band Wi-Fi hotspot, forming a local communication system independent of the external network, ensuring that localized operation of data collection, processing and control instruction issuance can still be achieved when there is no external network coverage.

[0017] In some embodiments, the real-time water quality data transmitted by the transmission layer and the historical water quality data obtained are cleaned, feature extracted and format converted to generate a time series data set, including: the data processing unit removes outliers in the real-time data through a sliding window filtering algorithm, extracts time lag features based on the time correlation of water quality parameters, and converts the data format into a multidimensional time series with a fixed time interval, wherein the multidimensional time series includes dissolved oxygen concentration, pH value, water temperature and historical dissolved oxygen trend features.

[0018] In some embodiments, the real-time prediction of dissolved oxygen concentration based on the time series data set and the generation of an aerator control signal according to the prediction result include: the prediction control unit adopts a sliding window rolling prediction mechanism, inputs the time series data set into a lightweight weighted convolutional neural network model, and outputs a predicted value of dissolved oxygen concentration in the next 1-3 hours; when the predicted value is lower than a preset critical threshold, a start-up aerator signal is generated, and when the predicted value is higher than a saturation threshold, a stop-aerator signal is generated, and the critical threshold and the saturation threshold are dynamically configured according to the survival needs of the target fish species in the aquaculture water body.

[0019] In some embodiments, the lightweight weighted convolutional neural network model built into the prediction control unit is a time series prediction model based on a CNN-GRU hybrid architecture. The model establishes a nonlinear mapping relationship between water quality parameters and dissolved oxygen concentration change trends through supervised learning of historical water quality data sets. The inference delay of the model on the embedded device does not exceed 500ms, and the prediction accuracy is ≥96%; the historical water quality data set includes dissolved oxygen, pH value, water temperature, salinity and parameters related to biological metabolic activities.

[0020] Exemplarily, the lightweight weighted convolutional neural network model includes: a spatiotemporal feature extraction layer, which is composed of an improved depthwise separable convolutional layer, which performs channel dimension weighting on the time series of water quality parameters, and extracts the time-varying influence characteristics of water temperature and pH value on dissolved oxygen concentration through local receptive field aggregation across time steps; a time series dependency modeling layer, which adopts a GRU unit with a gated attention mechanism, and dynamically allocates the contribution of historical time steps to the current prediction through the attention weight matrix; a lightweight output layer, which compresses the parameters of the fully connected layer through channel pruning technology, and uses a dynamic quantization algorithm to reduce the computational complexity, so that the number of floating-point operations of the lightweight weighted convolutional neural network model on the Raspberry Pi 5 is ≤150M, and the prediction accuracy is maintained at ≥96%; the lightweight weighted convolutional neural network model jointly optimizes the dissolved oxygen concentration prediction and abnormal state detection tasks through multi-task learning, and the loss function is the weighted sum of the prediction mean square error and the anomaly classification cross entropy.

[0021] In some embodiments, the Raspberry Pi 5 acts as an edge computing node to achieve model optimization through a cloud-edge collaboration mechanism: when the accumulation of the local data set exceeds a preset threshold, the incremental data is encrypted and uploaded to the cloud server through the dual-band Wi-Fi module, and the cloud completes the model retraining and downloads the update to the prediction control unit, forming a closed-loop learning system from local prediction to cloud optimization.

[0022] In some embodiments, it also includes: a database module, configured in the Raspberry Pi 5, which uses a sliding window algorithm to store historical water quality data in the most recent preset time period, and the amount of historical data in the preset time period is determined based on the sensor upload cycle, and is used to provide training and prediction data for the weighted convolutional neural network model.

[0023] The present invention provides an embedded intelligent dissolved oxygen control system for aquaculture. Through the deep integration of edge computing and lightweight intelligent algorithms, an independent closed-loop system integrating "real-time perception, local processing, and autonomous control" is constructed. The corresponding technical solutions include: the perception layer uses sensors with integrated temperature compensation modules to collect dissolved oxygen, pH value, temperature, and other parameters in real time to address the interference of water temperature on measurement accuracy; the transmission layer uses a Raspberry Pi 5 as an edge computing node and builds a local independent communication network through a dual-band Wi-Fi module to support data transmission and device control in an offline environment. At the same time, historical data from the cloud is obtained through an API interface, taking into account both localization and cloud collaboration; the application layer deploys a data processing unit and a prediction control unit. Based on time series data cleaning, feature extraction, and a lightweight weighted convolutional neural network model, it realizes real-time prediction of dissolved oxygen concentration and intelligent control of the aerator; the execution layer directly drives the aerator through the GPIO interface, forming an efficient closed loop from data acquisition to control execution.

[0024] Compared with the prior art, the invention is creative in that:

[0025] 1. Innovation in edge computing architecture: Integrating core data processing and predictive control functions into the Raspberry Pi 5 embedded device, eliminating the need for cloud servers and significantly improving system reliability and responsiveness in offline scenarios.

[0026] 2. Optimized communication and storage mechanisms: The dual-band Wi-Fi module builds a local independent network, combined with a sliding window historical data storage algorithm, to ensure stable data transmission and real-time updates of model training data.

[0027] 3. Lightweight intelligent control: Achieve high-precision real-time predictions on embedded devices through lightweight neural network models, solving the problem of difficult deployment of traditional complex models and reducing system power consumption and costs.

[0028] In summary, through the above-mentioned technical solutions, the system achieves high-precision perception of water environmental parameters, localized intelligent processing, and precise control of equipment, effectively improving the automation level and dissolved oxygen regulation efficiency of aquaculture, significantly reducing dependence on external networks, and providing a reliable solution for smart farming in remote areas or in unstable network scenarios.

[0029] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0031] Figure 1 A schematic structural diagram of an embedded intelligent aquaculture dissolved oxygen control system provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of an embedded intelligent aquaculture dissolved oxygen control system provided by an embodiment of the present invention;

[0033] Figure 3 A topological diagram of an embedded intelligent aquaculture dissolved oxygen control system provided by an embodiment of the present invention;

[0034] Figure 4 A schematic diagram of real-time monitoring data of an embedded intelligent aquaculture dissolved oxygen control system provided by an embodiment of the present invention;

[0035] Figure 5 A schematic diagram of data retrieval results of an embedded intelligent aquaculture dissolved oxygen control system provided by an embodiment of the present invention;

[0036] Figure 6 This is a dissolved oxygen prediction curve analysis diagram provided by an embodiment of the present invention.

[0037] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0039] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0040] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, terms such as "first" and "second" are used to distinguish between identical or similar items having substantially the same functions and effects. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or order of execution, and that terms such as "first" and "second" do not necessarily define differences.

[0041] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0042] It will also be understood that the term "and / or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0043] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0044] In aquaculture, dissolved oxygen concentration is a key parameter affecting the survival rate and growth efficiency of aquaculture organisms. Traditional aquaculture dissolved oxygen control systems typically adopt a three-tier architecture of "sensor-cloud platform-actuator," relying on remote servers for data processing and control decisions. This presents the following technical bottlenecks:

[0045] 1. High network dependency: Data must be uploaded to the cloud in real time. Remote farming areas are susceptible to insufficient network coverage or signal interruptions, leading to control delays or even system failures.

[0046] 2. Lack of local processing capabilities: Lack of local decision support from edge computing nodes makes it impossible to independently complete data collection, prediction, and device control in an offline environment;

[0047] 3. Insufficient sensor measurement accuracy: There is no integrated temperature compensation mechanism. The measurement of dissolved oxygen and pH values ​​is significantly affected by water temperature fluctuations, resulting in large data deviations.

[0048] 4. Poor compatibility between predictive control models and hardware: Traditional deep learning models have high computational complexity and are difficult to run in real time on low-power embedded devices, limiting the system's portability and deployment flexibility.

[0049] Therefore, a system is urgently needed to solve at least one of the above problems.

[0050] To solve the above problems, please refer to Figure 1 The embodiment of the present application provides an embedded intelligent aquaculture dissolved oxygen control system, including: a perception layer, which is equipped with a sensor module for real-time acquisition of water environment parameters, wherein the sensor module includes at least a dissolved oxygen sensor, a pH sensor and a temperature sensor, and the sensor module integrates a temperature compensation module to dynamically correct the measured value; a transmission layer, which includes a network data acquisition instrument and an edge computing node, wherein the network data acquisition instrument communicates with the sensor module via an RS-485 interface and a ModBus-RTU protocol, and is used to convert the acquired analog signal into a digital signal and transmit it to the edge computing node, wherein the edge computing node is a Raspberry Pi 5 with a built-in dual-band Wi-Fi module. The i module is used to establish an AP hotspot to build a local independent communication network, and to obtain historical water quality data from the Internet of Things cloud platform through an API interface; the application layer is deployed in the Raspberry Pi 5, including a data processing unit and a prediction control unit. The data processing unit is used to clean, extract features and convert the format of the real-time water quality data transmitted by the transport layer and the historical water quality data obtained to generate a time series data set; the prediction control unit performs real-time prediction of the dissolved oxygen concentration based on the time series data set, and generates an aerator control signal according to the prediction result; the execution layer includes an aerator connected to the GPIO interface of the Raspberry Pi 5, and the aerator performs start and stop operations according to the aerator control signal.

[0051] Specifically, this system adopts a four-layer architecture (perception layer, transport layer, application layer, and execution layer) driven by edge computing, combined with lightweight intelligent algorithms and localized control mechanisms, to build an intelligent control closed loop independent of the cloud. The core technologies are as follows:

[0052] The perception layer includes: Sensor module: Integrates a dissolved oxygen sensor (such as a polarographic electrode), a pH sensor (glass electrode), and a temperature sensor (NTC thermistor) to achieve real-time and synchronous acquisition of dissolved oxygen concentration (DO), pH value, and water temperature (T) in the water body. Temperature compensation module: Dynamically corrects the measured value through a built-in algorithm to address the impact of water temperature on sensor measurement accuracy. Specifically, the water temperature data collected in real time by the temperature sensor is used to perform nonlinear compensation on the oxygen diffusion coefficient of the dissolved oxygen sensor (based on the Arrhenius equation model), and the electrode potential of the pH sensor is subjected to Nernst equation temperature correction (compensation formula: ΔE=S*ΔT*lnc, where S is the temperature coefficient and c is the ion concentration), eliminating measurement deviations introduced by water temperature fluctuations.

[0053] The transport layer includes: A network data logger, which serves as a bridge between underlying sensors and edge computing nodes. It cascades multiple sensor modules via the RS-485 bus and uses the ModBus-RTU protocol to analyze analog sensor output signals (such as 4-20mA current). This signal is converted to digital form by the built-in 24-bit ADC module and then transmitted in real time to the edge computing node (Raspberry Pi 5) via TCP / IP. Furthermore, it supports simultaneous upload of data to the IoT cloud platform via the MQTT protocol, enabling dual local storage and cloud backup.

[0054] The edge computing node (Raspberry Pi 5) is equipped with a quad-core 64-bit processor and a dual-band Wi-Fi module (2.4GHz / 5GHz). It has two core functions: a local independent communication network, configured through the hostapd software to establish a Wi-Fi access point hotspot, provides wireless access to sensor modules, network data loggers, and other devices, forming a local area communication system that does not require an external network (with a customizable SSID and support for WPA2 encryption). This ensures that "data collection, processing, and control" operations can be localized even when the network is disconnected. Cloud data interaction uses an API interface to pull historical water quality data (such as dissolved oxygen, pH, and water temperature data from the past year) from the IoT cloud platform for edge-side model training and prediction, balancing local real-time performance with the richness of cloud data.

[0055] The application layer includes the following: A data processing unit performs three-layer processing on real-time data (minute-level frequency) and historical data: Data cleaning: Sliding window filtering (window size 5 minutes) is used to remove outliers (such as outliers exceeding 3σ standard deviation), and range verification is performed based on aquaculture scenario business rules (such as dissolved oxygen concentration cannot exceed 20 mg / L); Feature extraction: Based on time series correlation, it extracts lagged features (such as dissolved oxygen concentration in the previous 1 hour and the previous 3 hours), trend features (slope, fluctuation amplitude), and combined features (coupling coefficient of pH value and water temperature) to form an input vector containing 12-dimensional features; Format conversion: Multi-source heterogeneous data is unified into a multidimensional time series with a fixed time interval (30 minutes) (format: [timestamp, DO, pH, T, DO(t-1), DO(t-6), …]) to adapt to the input requirements of the prediction model.

[0056] The prediction control unit has a built-in lightweight weighted convolutional neural network model (CNN-GRU hybrid architecture). The core mechanisms include: based on the current and historical 45-day time series data (sliding window storage), the model inference outputs the predicted value of dissolved oxygen concentration in the next 1-3 hours, with an inference delay of ≤500ms (meeting the real-time requirements of embedded devices); preset dynamic thresholds (such as the critical threshold of 2mg / L and the saturation threshold of 10mg / L for tilapia farming, which can be customized through the human-computer interaction interface). When the predicted value is lower than the critical threshold, a signal to start the aerator is generated, and when it is higher than the saturation threshold, a stop signal is generated, avoiding the hysteresis of traditional threshold control.

[0057] The execution layer directly connects to an aerator (such as an impeller-type aerator) via the Raspberry Pi 5's GPIO interface, using a relay module for strong electrical isolation control. Control signals include start / stop commands and a priority strategy: When the predicted dissolved oxygen concentration continues to drop below a critical threshold, the aerator is activated first. When a device fault (such as an abnormal current flow) is detected, an alarm signal is sent to the farmer's terminal via the local network.

[0058] You can also build a SQLite database into the Raspberry Pi 5 and use a sliding window algorithm to store the last 45 days of historical data (storage capacity = 45 days × 48 records / day = 2160 records, with a sampling frequency of 30 minutes). Expired data outside the window is regularly deleted to achieve efficient data utilization with limited hardware resources and provide a continuously updated sample set for model training.

[0059] In some embodiments, the hardware deployment solution includes the following: At the sensor layer, dissolved oxygen, pH, and temperature sensors are integrated into a waterproof and pressure-resistant sensor probe. The probe is suspended vertically in the water (0.5-1.5 meters above the water surface) via a buoyancy device. The sensor cables are connected to a shore-based network data logger via waterproof connectors. At the transmission layer, the network data logger uses an industrial-grade RTU (supporting a wide operating temperature range of -40°C to 85°C) and connects to the sensors via an RS-485 bus (bus length ≤ 1200 meters, supporting twisted-pair differential transmission for interference resistance). A Raspberry Pi 5 is deployed in a waterproof chassis, powered by a POE module for long-distance power (≤ 100 meters), and an external dual-band Wi-Fi antenna enhances signal coverage (radius ≥ 50 meters). At the execution layer, the aerator is connected to a shore-based control box via a waterproof cable. The control box integrates a relay module (contact capacity 10A / 250VAC) and a current monitoring module, providing real-time feedback on the device's operating status to the Raspberry Pi 5.

[0060] The edge computing node software runs on the Raspbian operating system and deploys Python applications. The communication module uses the pymodbus library to implement ModBus-RTU protocol parsing, the socket library to implement TCP data transmission, and hostapd+dnsmasq to establish a Wi-Fi hotspot. The data processing module uses Pandas for data cleaning, NumPy to construct time series features, and a sliding window to generate training samples (for example, using the previous 24 time steps to predict the next three time steps). The prediction model is deployed using the TensorFlow Lite framework. Through channel pruning (retaining key feature channels) and 8-bit fixed-point quantization (reducing computational complexity), the model size is ≤10MB and the number of FLOPs is ≤150M, making it compatible with the ARM processor in the Raspberry Pi 5. The temperature compensation algorithm calculates the corrected dissolved oxygen concentration in real time based on the temperature correction formula in the international standard ISO 5814: DOcorrected = DOmeasured × α(Tref) / α(Tcurrent), where α(T) is the oxygen solubility coefficient at different temperatures and Tref is the calibration temperature (25°C).

[0061] When the local data set accumulates more than 5,000 records, the Raspberry Pi 5 encrypts and uploads the incremental data to a cloud server (AWS IoT Core or Alibaba Cloud IoT Platform) via a 4G module (external expansion) or Wi-Fi. The cloud then uses a deep learning framework (such as PyTorch) to retrain the model, generate optimized model parameters, and download them to the edge node, forming a closed loop of "local prediction-cloud optimization" to continuously improve prediction accuracy.

[0062] By building a local, independent communication network using dual-band Wi-Fi modules, the system enables local operation of the entire process, from sensor data collection to edge computing node processing and aerator control, even in remote fish ponds and mountain farms without 4G or wired network coverage. This completely resolves the "network failure" issue with traditional systems, reducing control latency from minutes in cloud-based architectures to seconds (≤10s) at the edge. The edge computing node (Raspberry Pi 5) integrates data processing, model prediction, and device control, eliminating the need for remote servers. A single node completes the closed-loop process from data collection to control execution. Field tests have shown that in offline scenarios, the system can operate continuously for 72 hours (powered by local batteries), achieving a dissolved oxygen prediction accuracy of R² ≥ 95%. The control strategy is consistent with online operations, significantly improving aquaculture safety. The temperature compensation module dynamically corrects the core interference factor (water temperature) in dissolved oxygen and pH value measurements. After actual measurement and comparison, the dissolved oxygen measurement error is reduced from ±15% of the traditional solution to ±5%, and the pH measurement error is reduced from ±0.3pH to ±0.1pH, providing high-quality input data for subsequent prediction models and avoiding control misjudgments caused by data bias. The improved CNN-GRU hybrid model (including channel weighting and gated attention mechanism) is used to maintain high prediction accuracy (R 2 ≥96%), while reducing computational effort by over 70% through model compression technology. Compatible with the low-power processor of the Raspberry Pi 5 (typical power consumption ≤5W), it enables 24-hour continuous operation without additional cooling. Compared with traditional deep learning models (which require industrial computers and power consumption ≥50W), hardware costs are reduced by 60%, significantly improving deployment flexibility.

[0063] Dynamically configure the dissolved oxygen threshold based on the respiratory characteristics of the aquaculture species (such as shrimp and sea bass) to avoid energy waste or hypoxia risks caused by "one-size-fits-all" control. Aquaculture tests have verified that the operating time of the aerator is reduced by 30% compared with the traditional timing control solution, and the dissolved oxygen compliance rate is increased to more than 98%.

[0064] Historical data stored on the edge side can be used for aquaculture process traceability and environmental change analysis. Combined with cloud-based collaborative optimization, it forms an intelligent aquaculture ecosystem where "devices are edge nodes and nodes are data portals", providing data support for precision fisheries.

[0065] Through three core technologies: edge computing architecture innovation, sensor measurement optimization, and lightweight model deployment, this system systematically solves the problems of network dependence, offline failure, measurement deviation, hardware adaptation, etc. in traditional aquaculture control systems, and realizes the deep integration of "high-precision perception-localized intelligence-precision control". It is suitable for various aquaculture scenarios such as ponds, lakes, and factory circulating water, and significantly improves the intelligence level and production efficiency of aquaculture.

[0066] In some embodiments, the sensor module integrates a temperature compensation module to dynamically correct the measured value, including: the temperature sensor synchronously collects water temperature data, the temperature compensation module dynamically corrects the oxygen diffusion coefficient of the dissolved oxygen sensor based on the water temperature data, and compensates for the electrode potential temperature drift of the pH sensor, and the correction formulas corresponding to the compensation and dynamic correction meet the nonlinear relationship model between the dissolved oxygen concentration and temperature of the water body and the Nernst equation temperature correction mechanism of the pH value.

[0067] Hardware Integration and Data Synchronization: The dissolved oxygen sensor (e.g., polarographic electrode), pH sensor (glass electrode), and temperature sensor (NTC thermistor) are housed in an integrated probe. The temperature sensor is physically close to the other two (≤2 cm apart), ensuring simultaneous acquisition of water temperature data from the same water microenvironment. (The sampling frequency is consistent with that of the dissolved oxygen and pH sensors: 1 time / minute.) The resistance output of the temperature sensor is converted into a voltage signal (accuracy ±0.1°C) through a voltage divider circuit. This signal is then transmitted synchronously to the network data logger along with the current signal (4-20 mA) from the dissolved oxygen sensor and the voltage signal (-200 mV to +200 mV) from the pH sensor.

[0068] Dynamic Correction of Dissolved Oxygen Concentration: Based on the nonlinear relationship between dissolved oxygen concentration and temperature in water (international standard ISO 5814), the temperature compensation module corrects the dissolved oxygen measurement using the following formula: DOcorrected = DOmeasured × α(Tref) / α(Tcurrent); where α(T) is the oxygen solubility coefficient at different temperatures (unit: mg / (L*atm)), Tref is the calibration temperature (25°C), and Tcurrent is the real-time water temperature (Kelvin). Calculated using the Antoine equation: lnα(T) = A + B / T + CT + DT 2 ,. The constant term A means: the asymptotic value when the temperature T→∞, reflecting the baseline value of lnα(T) at high temperature, and is related to the inherent properties of the substance (such as intermolecular forces, characteristics under standard conditions). The inverse proportional term coefficient B reflects the sensitivity of lnα(T) to changes in 1 / T, which is common in processes involving energy changes (such as activation energy, phase change enthalpy). If used to describe the reaction rate or equilibrium constant, its unit is K (Kelvin). C is used to describe the linear change trend of lnα(T) with temperature, reflecting the linear influence in the medium temperature range (such as the linear response of temperature to molecular kinetic energy). The unit is K -1 (Kelvin -1 D captures the nonlinear (curvature) variation of lnα(T) with temperature and is used to fit nonlinear behaviors at high temperatures or over a wide temperature range (such as temperature dependence of molecular vibrational degrees of freedom and high-order thermal effects). The unit is K. -2 (Kelvin -2 ).

[0069] According to the Nernst equation, the electrode potential of the pH sensor changes with temperature as follows: E=E 0 + RT / nF*lnc H+ ; Among them, the temperature coefficient S = 2.303R*T / nF (approximately 59.16mV / pH at 25℃). The compensation module calculates the correction slope Scurrent at the current temperature in real time and performs offset correction on the original pH measurement value: pHcorrected = pHmeasured + (Sref-Scurrent) / Scurrent*pHmeasured; where Sref = 59.16mV / pH (reference slope at 25℃).

[0070] The compensation algorithm is implemented by integrating the temperature compensation module into the sensor probe's microcontroller (such as STM32) in the form of firmware, or deployed as a software module in a network data logger / edge computing node. Each time data is collected, a compensation calculation is triggered and the corrected dissolved oxygen and pH values ​​are output.

[0071] Through dynamic water temperature compensation, the dissolved oxygen measurement error is reduced from ±15% (compared to traditional solutions) to within ±5% (verified by standard water calibration tests), and the pH measurement error is reduced from ±0.3pH to ±0.1pH. This eliminates the core issue of sensor interference caused by water temperature fluctuations and provides high-quality input data for subsequent prediction models. Supporting a wide operating temperature range of -5°C to 40°C, the system eliminates the need for regular manual calibration, making it particularly suitable for aquaculture scenarios with large seasonal temperature swings (for example, water temperatures in North China can vary by up to 30°C between winter and summer). This prevents control errors caused by temperature fluctuations (such as misjudging sufficient dissolved oxygen at low temperatures and failing to activate the aerator).

[0072] In some embodiments, the collected analog signal is converted into a digital signal and transmitted to the edge computing node, including: the network data acquisition instrument serves as a data concentrator, cascades multiple sensor modules through the RS-485 bus, parses the analog signal output by the sensor in accordance with the ModBus-RTU protocol, converts it into a digital signal through a built-in analog-to-digital conversion module, and transmits the digital signal to the Raspberry Pi 5 in real time, and synchronously uploads it to the cloud storage through the Internet of Things cloud platform interface.

[0073] The hardware architecture and bus cascading include: The network data logger utilizes an industrial-grade RTU device (such as the Advantech ADAM-4000 series) with a built-in RS-485 communication interface (supporting the ModBus-RTU slave protocol). It can cascade up to 32 sensor modules (with terminal resistor matching, allowing bus lengths ≤ 1200 meters). Each sensor module is assigned a unique slave address (1-32), configured via DIP switches or software. The analog output signals from the sensors (4-20mA for dissolved oxygen, 0-5V for pH, and 0-5V for temperature) are filtered and amplified by the signal conditioning circuitry before being connected to the data logger's 24-bit ADC (resolution 1 / 16,777,216, signal-to-noise ratio ≥ 90dB) for conversion to digital values ​​(e.g., 0-4095 for dissolved oxygen).

[0074] Protocol parsing and data encapsulation include: the data logger follows the ModBus-RTU protocol frame format (1-byte address code + 1-byte function code + N-byte data code + 2-byte CRC checksum), periodically polls the sensor (polling interval is 500ms), parses the raw data in the register (such as the dissolved oxygen sensor register 40001 stores the current value), and restores the physical quantity through a linear conversion formula (such as dissolved oxygen concentration = (ADC value / 4095) × 20mg / L).

[0075] The converted digital signal is encapsulated via the TCP / UDP protocol (data format: JSON, including timestamp, sensor address, dissolved oxygen, pH, and temperature), transmitted to the edge computing node (Raspberry Pi 5) via the RJ45 network port or Wi-Fi, and simultaneously uploaded to the IoT cloud platform (such as Alibaba Cloud IoT) via the MQTT protocol (QoS=1). The topic naming rule is "aquaculture pond ID / sensor type / data type".

[0076] Anti-interference features include: the RS-485 bus uses a shielded twisted pair (120Ω impedance) with 120Ω terminal resistors installed at both ends to reduce signal reflections; the data logger's power supply integrates a surge protection module (resistant to 4kV pulse voltage) to adapt to the complex electromagnetic environment of farms.

[0077] Through bus cascading technology, a single data logger can connect to 32 sensors, supporting large-scale aquaculture pond networking (e.g., a 1,000-mu pond only requires 32 data loggers), reducing hardware costs by over 30%. The ModBus-RTU protocol's CRC checksum, combined with cloud-based synchronized storage, ensures data transmission accuracy of ≥99.99%. It also supports resumable transmission even after network disconnection (the data logger has a built-in 8MB cache that can store 24 hours of data), addressing the signal attenuation and packet loss issues of traditional single-sensor direct connection solutions. The bidirectional synchronization of real-time and historical data provides a data path for subsequent cloud-edge collaborative model training, establishing a hybrid architecture of "local real-time control + cloud-based big data analysis."

[0078] In some embodiments, the dual-band Wi-Fi module is used to establish an AP hotspot to build a local independent communication network, including: the dual-band Wi-Fi module provides wireless communication access for local devices such as the sensor module and network data logger by building a 2.4GHz and 5GHz dual-band Wi-Fi hotspot, forming a local communication system independent of the external network, ensuring that localized operation of data collection, processing and control instruction issuance can still be achieved when there is no external network coverage.

[0079] The hardware configuration and hotspot setup include: The Raspberry Pi 5's built-in dual-band Wi-Fi module (supporting 802.11a / b / g / n / ac protocols) is configured in AP (access point) mode via software. Hotspot parameters are defined using the hostapd tool: 2.4GHz channel 6, SSID "FarmEdge_2.4G," WPA2-PSK encryption (with a 128-bit random string as the password), and support for long-range coverage (a radius of 50 meters, suitable for ponds). 5GHz channel 48, SSID "FarmEdge_5G," supports high-bandwidth transmission (≥433Mbps) for high-speed data exchange between the sensor module and the data logger (e.g., batch uploading of historical data). Local devices (sensor modules, network data logger, and farmer's mobile phone) connect to the hotspot by scanning the SSID and are assigned private IP addresses (network segment 192.168.1.X / 24). Dynamic DHCP is implemented using the DNSMASQ service.

[0080] Offline Communication Mechanism: When the external network is disconnected (e.g., the 4G module signal is lost), the Raspberry Pi 5 automatically switches to pure AP mode, severing its connection to the cloud and maintaining only local LAN communication. At this point, the sensor module continues to upload data to the data logger via Wi-Fi, which temporarily stores the data in a local SQLite database. The predictive control unit continues to operate based on locally stored historical data (the last 45 days) and real-time data. The generated aerator control signals are directly output via the GPIO interface, unaffected by the external network.

[0081] Dual-band switching strategy: Low-power devices (such as battery-powered sensors) prioritize access to the 2.4 GHz band to ensure battery life; high-bandwidth devices (such as camera monitoring modules) access the 5 GHz band to avoid data congestion.

[0082] In remote areas without 4G or wired networks (such as mountain reservoirs and offshore fish farms), the system can operate independently via local Wi-Fi networks, reducing control latency from 20-30 seconds in cloud-based architectures to 2-3 seconds at the edge, eliminating the risk of loss of control during network outages. Tests have shown 72 hours of offline operation without data loss or control interruption. Without relying on carrier network coverage, the aquaculture control system can be quickly established using only a Raspberry Pi 5 (power over Ethernet / battery support). This makes it particularly suitable for temporary aquaculture sites (such as seasonal fishing ponds) or areas with limited network infrastructure. The local network utilizes WPA2 encryption, and data transmission is conducted within the LAN, reducing the risk of privacy breaches associated with cloud-based transmission and meeting the regulatory requirements for localized aquaculture data.

[0083] In some embodiments, the real-time water quality data transmitted by the transmission layer and the historical water quality data obtained are cleaned, feature extracted and format converted to generate a time series data set, including: the data processing unit removes outliers in the real-time data through a sliding window filtering algorithm, extracts time lag features based on the time correlation of water quality parameters, and converts the data format into a multidimensional time series with a fixed time interval, wherein the multidimensional time series includes dissolved oxygen concentration, pH value, water temperature and historical dissolved oxygen trend features.

[0084] Data cleaning: Sliding window filtering and outlier removal: Real-time data is filtered using a 5-minute sliding window (window size = 5 time points, sampling frequency 1 / minute). The mean μ and standard deviation σ within the window are calculated. If the current value exceeds μ ± 3σ, it is considered an outlier and replaced using linear interpolation (using the average of the previous and next effective values). Dissolved oxygen concentration is strictly limited to 0-20 mg / L (actual water bodies are unlikely to exceed this range), and pH is limited to 6.5-9.0 (the normal range for aquaculture water). Values ​​outside this range are marked as invalid and trigger a sensor fault alarm.

[0085] Time Lag and Composite Feature Construction: Lag Features: Extract dissolved oxygen concentrations for the previous 1, 3, 6, and 12 time steps (i.e., DO values ​​for the past 1, 3, 6, and 12 minutes) to form a 4-dimensional lag feature. Similarly, lag features are extracted for pH and water temperature (4 dimensions each), for a total of 12 lag features. Trend Features: Calculate the slope (ΔDO / Δt), fluctuation amplitude (maximum-minimum) of dissolved oxygen within the current window, and the rate of change of pH (ΔpH / Δt) to form a 3-dimensional trend feature. Composite Features: Construct the correlation coefficient (Pearson coefficient) between water temperature and dissolved oxygen, and the coupling index between pH and water temperature (temperature sensitivity coefficient derived from the Nernst equation) to form a 2-dimensional composite feature.

[0086] Format conversion: Fixed-interval multidimensional time series generation: The original minute-level data is resampled to a fixed 30-minute interval (missing values ​​are filled by linear interpolation). The generated time series format is: [t, \text{DO}_t, \text{pH}_t,T_t, \text{DO}_{t-1}, \text{DO}_{t-6}, \dots, \text{slope}_{t-1}, \text{pH}_\text{rate}_{t-1}]; where t is the timestamp, the total dimension is 1 (time) + 3 (real-time parameters) + 12 (lagged features) + 3 (trend features) + 2 (combined features) = 21 dimensions.

[0087] Sliding window filtering combined with business rule validation reduces the proportion of abnormal data from 5% of the original data collected to below 0.5%, preventing outliers from interfering with model training and increasing model convergence speed by 40% (the number of iterations has been reduced from 500 to 300). Through time lag and combined feature extraction, the model explicitly models the temporal correlation of water quality parameters (such as the impact of water temperature changes over the previous 12 minutes on current dissolved oxygen) and physicochemical coupling (the drift of pH with water temperature). This enables the model to capture complex patterns that traditional univariate models cannot identify (such as the sudden drop in dissolved oxygen caused by a drop in water temperature at night). The fixed-interval time series format unifies the data input dimensionality, adapting to the spatiotemporal feature processing requirements of the CNN-GRU model, reducing model preprocessing time and improving inference efficiency (preprocessing time has been reduced from 200ms to 50ms).

[0088] In some embodiments, the real-time prediction of dissolved oxygen concentration based on the time series data set and the generation of an aerator control signal according to the prediction result include: the prediction control unit adopts a sliding window rolling prediction mechanism, inputs the time series data set into a lightweight weighted convolutional neural network model, and outputs a predicted value of dissolved oxygen concentration in the next 1-3 hours; when the predicted value is lower than a preset critical threshold, a start-up aerator signal is generated, and when the predicted value is higher than a saturation threshold, a stop-aerator signal is generated, and the critical threshold and the saturation threshold are dynamically configured according to the survival needs of the target fish species in the aquaculture water body.

[0089] Sliding Window Rolling Prediction Mechanism: The prediction control unit maintains a sliding window with a length of 48 (corresponding to 24 hours, sampling interval of 30 minutes). Each time new data arrives, the window rolls forward 1 step, discarding the oldest data and adding the new data to form the input sample Xt = [xt-47, xt-46, …, xt]. The target value is the dissolved oxygen concentration in the next 1 - 3 hours (i.e., yt = [DO t+2, DOt+4, DOt+6], corresponding to 30 minutes × 2 / 4 / 6 = 1 / 2 / 3 hours). Each time the model infers, it outputs the predicted values at 3 time points. The predicted value for the next 1 hour (DOt+2) is taken as the basis for immediate control, and the predicted values for the next 2 - 3 hours are used for trend warning (e.g., if it continues to decline, start the aerator in advance).

[0090] Dynamic Threshold Configuration and Control Logic: Critical Threshold (DO_low): Set according to the aquaculture species, e.g., 2mg / L for tilapia and 3mg / L for white shrimp, and can be modified in real time through the human-computer interaction interface (Web server deployed on Raspberry Pi 5); Saturation Threshold (DO_high): Set to 10mg / L (the theoretical saturation value of dissolved oxygen in water, corrected according to water temperature) to avoid energy waste caused by excessive aeration.<00(0203>

[0091] Control Strategy: When DOt+2 < DO_low and the current aerator is not started, immediately output a high-level signal (3.3V) to the relay module to start the aerator; when DOt+2 > DO_high and the current aerator is in operation, output a low-level signal to stop the aerator; add a 5-minute anti-shake mechanism (to avoid frequent start and stop near the threshold), that is, the signal is valid for 5 minutes before the action is executed.

[0092] If multiple aerators are deployed in the aquaculture pond (e.g., 3 units), the prediction control unit dynamically allocates the start quantity according to the decline amplitude of the predicted value (e.g., start 1 unit in case of mild hypoxia and 3 units in case of severe hypoxia), and realizes multi-channel control through a GPIO expansion board (such as Raspberry Pi HAT).

[0093] Predicting the change of dissolved oxygen 1 - 3 hours in advance can avoid the risk of sudden drop in dissolved oxygen caused by algae respiration at night in advance compared with traditional real-time threshold control (lagging response) (the measured incidence of hypoxia events is reduced by 70%). The combination of dynamic threshold and anti-shake mechanism reduces the operation time of the aerator by 35% compared with the timing control scheme (e.g., the traditional daily operation is 8 hours, and after optimization, it is 5.2 hours on average). Calculated according to the power of each aerator being 1.5kW, about 1500 degrees of electricity can be saved annually, reducing the aquaculture cost. Support personalized threshold configuration for different aquaculture species (such as the difference in critical values between cold-water fish and tropical fish), avoid the stress response caused by "one-size-fits-all" control, and improve the survival rate of aquaculture organisms (the measured survival rate of shrimp has increased from 80% to 88%).

[0094] In some embodiments, the lightweight weighted convolutional neural network model built into the prediction control unit is a time series prediction model based on a CNN-GRU hybrid architecture. The model establishes a nonlinear mapping relationship between water quality parameters and dissolved oxygen concentration change trends through supervised learning of historical water quality data sets. The inference delay of the model on the embedded device does not exceed 500ms, and the prediction accuracy is ≥96%; the historical water quality data set includes dissolved oxygen, pH value, water temperature, salinity and parameters related to biological metabolic activities.

[0095] Model architecture design (CNN-GRU hybrid architecture): Input layer: Receives 21-dimensional time series (generated in Example 4), and the dimensions are adjusted to [time step 48, feature dimension 21]. Spatiotemporal feature extraction layer: Uses improved depthwise separable convolution, first convolves each feature channel independently (kernel size 3, extracts local time step features), and then performs channel weighting through 1×1 point-by-point convolution (weight matrix W∈R 21×1 ), strengthen the key influencing channels of water temperature and pH value on dissolved oxygen, and finally aggregate the local features of 6 time steps through cross-time step pooling (window size 6, step length 3), with an output dimension of [16, 10] (16 time steps, 10 feature channels). Temporal dependency modeling layer: Use GRU units with gated attention mechanism (GA-GRU), introduce attention weight matrix A∈R based on the update gate and reset gate of traditional GRU 16×16 , the contribution of the historical time step to the current prediction is calculated by the following formula:

[0096] ;

[0097] Where ht is the current hidden state, Wq and Wk are the attention parameter matrices, and the final hidden state ht = α t⊙tanh(Wrht-1+Urxt) strengthens memory of key historical events (such as the dissolved oxygen change after the aerator was activated at the same time yesterday). The fully connected layer uses channel pruning (retaining the top 80% of important channels and using L1 regularization to filter) to compress the parameters from 21×100 to 21×30. Then, it uses 8-bit dynamic quantization (floating point to fixed point conversion) to output the predicted dissolved oxygen values ​​for the next three time points.

[0098] Training and inference optimization: Training data includes dissolved oxygen, pH, water temperature, salinity (if available), and bio-metabolism parameters (such as conductivity, reflecting algae density). Training is performed locally on edge computing nodes (using the Adam optimizer, a learning rate of 0.001, and a batch size of 32). Incremental training is triggered every 500 new data items. Inference performance: Tested on a Raspberry Pi 5, single-sample inference time is ≤450ms (meeting the 500ms latency requirement), prediction accuracy R² ≥96% (an 8% improvement over traditional LSTM models), FLOPs = 145M (below the 150M threshold), and model size is 9.8MB (for easy edge storage).

[0099] Depthwise separable convolution and a channel weighting mechanism explicitly model the spatiotemporal coupling of water quality parameters (e.g., the nonlinear pattern that dissolved oxygen decreases by 0.7 mg / L for every 1°C increase in water temperature). The GA-GRU attention mechanism enhances the capture of long-term dependencies (such as dissolved oxygen fluctuations caused by the diurnal cycle) and anomalous events (such as a sudden drop in pH after heavy rain), enabling the model to detect complex patterns that traditional linear models cannot. Through channel pruning and dynamic quantization, the model reduces computational overhead by 70% (compared to an uncompressed CNN-LSTM model) while maintaining high accuracy. Adapted to the ARM Cortex-A76 processor in the Raspberry Pi 5, it achieves 24-hour continuous prediction with power consumption of ≤3W, eliminating the need for additional cooling equipment and reducing hardware costs to just one-fifth of traditional industrial computer solutions. By incorporating extended parameters such as salinity and conductivity, the model can further distinguish between dissolved oxygen fluctuations caused by excessive algal blooms and insufficient oxygenation caused by mechanical failure, laying the foundation for accurate fault diagnosis.

[0100] Exemplarily, the lightweight weighted convolutional neural network model includes: a spatiotemporal feature extraction layer, which is composed of an improved depthwise separable convolutional layer, which performs channel dimension weighting on the time series of water quality parameters, and extracts the time-varying influence characteristics of water temperature and pH value on dissolved oxygen concentration through local receptive field aggregation across time steps; a time series dependency modeling layer, which adopts a GRU unit with a gated attention mechanism, and dynamically allocates the contribution of historical time steps to the current prediction through the attention weight matrix; a lightweight output layer, which compresses the parameters of the fully connected layer through channel pruning technology, and uses a dynamic quantization algorithm to reduce the computational complexity, so that the number of floating-point operations of the lightweight weighted convolutional neural network model on the Raspberry Pi 5 is ≤150M, and the prediction accuracy is maintained at ≥96%; the lightweight weighted convolutional neural network model jointly optimizes the dissolved oxygen concentration prediction and abnormal state detection tasks through multi-task learning, and the loss function is the weighted sum of the prediction mean square error and the anomaly classification cross entropy.

[0101] Deepening of the spatiotemporal feature extraction layer (depthwise separable convolution + channel weighting): Depthwise separable convolution is divided into two steps: Depthwise Convolution: Apply a 3×1 convolution kernel (along the time axis) to each feature channel (such as dissolved oxygen, pH, water temperature) to extract the local dependence of each parameter in the time dimension (such as the water temperature change trend in the first 6 time steps), and the output dimension is [48, 21, 1] (each channel is processed independently); Pointwise Convolution: Cross-channel weighting is performed through a 1×1 convolution kernel, and the weight matrix W∈R 1×21×C′ (C′ = 10 is the number of output channels). The channel weights for water temperature and pH are dynamically learned using gradient descent, with emphasis placed on parameter channels with a greater impact on dissolved oxygen (for example, water temperature is typically weighted higher than salinity). Average pooling (window size 6, step size 3) is used across the time dimension to compress 48 time steps to 16, reducing the computational burden on the time series modeling layer.

[0102] Temporal dependency modeling layer (GA-GRU gated attention mechanism): After the update gate zt and reset gate rt of the GRU are calculated, the attention mechanism is introduced to dynamically adjust the hidden state: first, the similarity αt,i between the current hidden state ht and all historical hidden states hi (i=1,2,...,16) is calculated (the formula is the same as that provided in the above embodiment), forming the attention weight vector αt; then, the context vector is obtained by weighted summation. The final hidden state is updated to ht=zt⊙ht-1+(1-zt)⊙tanh(Wc*ct+Uc*xt), where zt is the update gate. The attention mechanism focuses on the historical time step that is most relevant to the current prediction (such as the high incidence period of low dissolved oxygen from 22:00 to 4:00 in the morning).

[0103] Lightweight output layer (channel pruning + dynamic quantization): Channel pruning: L1 regularization is applied to the fully connected layer weights during training. After iteration, channels with absolute weight values ​​less than a threshold (0.01) are pruned, compressing the fully connected layer parameters from 21×100 to 21×30, with a compression rate of 70%. Dynamic quantization: During inference, floating-point weights are converted to 8-bit fixed-point numbers (for example, a 32-bit floating-point value of 0.123 is converted to an 8-bit fixed-point number of 31, corresponding to a scaling factor of 0.00390625). Multiplication operations are converted from floating-point operations to fixed-point operations, increasing the computing speed by 3 times (the measured single-sample inference time is reduced from 1.2s to 0.4s).

[0104] Multi-task learning optimization simultaneously trains dissolved oxygen concentration prediction (a regression task) and anomaly detection (a binary classification task with a label definition of 1 if dissolved oxygen ≤ 2 mg / L for three hours, otherwise 0). The loss function is: L = 0.8*MSE(ypred,ytrue) + 0.2*CE(p anomaly,yanomaly). MSE is the mean squared error, and CE is the cross entropy. By sharing the underlying feature extraction layer, the model can simultaneously predict dissolved oxygen and identify anomaly trends (for example, providing early warning when the predicted value continues to decline and approaches a critical threshold).

[0105] Depthwise separable convolution reduces computational overhead by 90% compared to traditional convolution (the number of parameters is reduced from 21×3×3=189 to 21×3+21×10=213). Combined with a channel weighting mechanism, this approach preserves key influencing factors while maintaining lightweightness. GA-GRU explicitly assigns weights to historical time steps through an attention mechanism, addressing the traditional GRU's inability to model long-range dependencies (e.g., those exceeding 12 hours). In particular, the accuracy of detecting sudden nighttime dissolved oxygen drops has increased from 75% to 92%, providing a reliable basis for early intervention. Multi-task learning enables the model to learn more robust feature representations from anomalous samples (e.g., unusual coupling patterns between dissolved oxygen and pH). In transfer learning for new aquaculture scenarios, fine-tuning time has been reduced from 4 hours to 1 hour, enabling adaptation to regional variations in water quality.

[0106] In some embodiments, the Raspberry Pi 5 acts as an edge computing node to achieve model optimization through a cloud-edge collaboration mechanism: when the accumulation of the local data set exceeds a preset threshold, the incremental data is encrypted and uploaded to the cloud server through the dual-band Wi-Fi module, and the cloud completes the model retraining and downloads the update to the prediction control unit, forming a closed-loop learning system from local prediction to cloud optimization.

[0107] Data upload triggering conditions: The edge computing node (Raspberry Pi 5) counts the historical data volume in the local SQLite database in real time. When the data records exceed 5,000 (approximately 34 days, 30-minute sampling frequency), the cloud-edge collaborative process is triggered. Incremental filtering is performed before data upload, and only new data that has not been synchronized is uploaded (marked by timestamp). The compression format is Protocol Buffers (reducing the transmission volume, with a compression rate of 60%), and it is uploaded to the cloud server (such as AWS EC2) through a TLS encrypted channel (port 443).

[0108] Cloud-based model retraining process: The cloud server receives incremental data uploaded by multiple edge nodes, merges it into a global dataset (including data from different aquaculture ponds and different seasons), and uses a distributed training framework (such as Horovod) for model retraining. Training strategy: Use transfer learning to retain the parameters of the underlying feature extraction layer of the edge model and only fine-tune the upper prediction layer. The training cycle is 2 hours (using the computing power of cloud-based GPUs) to generate optimized model parameters (.tflite format).

[0109] Model download and update: After cloud training is completed, an update notification is sent to the edge node via the MQTT protocol. The Raspberry Pi 5 downloads the new model via HTTPS, stores it in a temporary directory, verifies the checksum (MD5 value), and then replaces the model file in the original prediction control unit. The entire process is completed automatically without manual intervention.

[0110] Version control mechanism: Edge nodes record model version numbers (e.g., v1.0, v1.1), back up the old model before updating, and automatically roll back to the previous version if the new model's inference error increases significantly (e.g., R² < 95%), ensuring system stability. By aggregating data from multiple edge nodes, the cloud-based model can learn a wider range of aquaculture scenario characteristics (e.g., regional variations in water temperature and salinity). In real-time deployments across regions, the decline in prediction accuracy has been reduced from 30% to 8%, addressing the data limitations of a single edge node. The edge is responsible for real-time control (low computing power requirements), while the cloud is responsible for model training (high computing power requirements). This creates a "edge execution + cloud intelligence" division of labor, reducing edge device hardware costs (no need for integrated GPUs) while leveraging idle cloud computing power (e.g., training during low-peak hours at night) to improve resource utilization. As the aquaculture environment changes (e.g., algal colony succession, equipment aging), the model is continuously optimized through cloud-edge collaboration to prevent prediction accuracy degradation caused by data distribution drift. This has extended the effective life of the model from 6 months to 18 months, reducing the need for manual parameter adjustment by over 90%.

[0111] In some embodiments, it also includes: a database module, configured in the Raspberry Pi 5, which uses a sliding window algorithm to store historical water quality data in the most recent preset time period, and the amount of historical data in the preset time period is determined based on the sensor upload cycle, and is used to provide training and prediction data for the weighted convolutional neural network model.

[0112] Storage strategy design: Create a SQLite database file (edge_db.db) on the SD card of the Raspberry Pi 5, containing the "water_quality" table. The fields include: timestamp (TEXT, primary key), dissolved oxygen (REAL), pH value (REAL), water temperature (REAL), salinity (REAL, optional), and sensor address (INTEGER).

[0113] A sliding window algorithm is used to define the storage period: the preset window size is 45 days (which can be modified through the configuration file), and the sensor upload cycle is 30 minutes. Therefore, the total data volume = 45 days × 48 records / day = 2160 records. When new data is inserted, expired data outside the window (with a timestamp earlier than the current time - 45 days) is automatically deleted. This is achieved through SQL triggers:

[0114] CREATE TRIGGER delete_old_data;

[0115] AFTER INSERT ON water_quality;

[0116] BEGIN;

[0117] DELETE FROM water_quality;

[0118] WHERE timestamp < datetime('now', '-45 days');

[0119] END;

[0120] Storage optimization measures improve concurrent read and write performance (supporting 32 concurrent connections) by enabling SQLite's WAL (Write-Ahead Logging) mode; and create indexes on timestamp fields to speed up time range queries (for example, querying data for the last seven days is reduced from 50ms to 5ms).

[0121] Data usage is divided into the following categories: training data: data from the last 30 days within the window (2160×30 / 45=1440 items), used for incremental model training; prediction data: data from the last 24 hours within the window (48 items), used for sliding window input for real-time inference.

[0122] On the Raspberry Pi 5's 32GB SD card, 2,160 data entries only take up approximately 2MB of storage space (approximately 1KB per record), avoiding the hardware load caused by massive data storage and ensuring long-term smooth operation of edge devices. Retaining only the most recent 45 days of "fresh" data not only meets the model training's learning needs for recent environmental changes (such as water temperature patterns after seasonal changes), but also prevents outdated data (such as winter data from six months ago) from interfering with current summer forecasts. The measured model's response time to seasonal pattern changes has been shortened from 7 days to 1 day. Even if the SD card is reset due to a fault, the system can restore the most recent 45 days of data through cloud synchronization (Example 2). Combined with cloud-edge collaboration (Example 8), this ensures that model training data is not lost and improves the system's fault tolerance.

[0123] In some embodiments, the present invention proposes an embedded dissolved oxygen intelligent control system based on edge computing and cloud-edge collaboration, which realizes the closed loop of data acquisition-storage-prediction-control through Raspberry Pi 5, solving the core problems of dissolved oxygen control response lag, reliance on manual experience, and strong dependence on the host computer in traditional aquaculture. This system collects water quality data in real time through PH and DO sensors, transmits it to the network data acquisition instrument via the 485 / ModBus-RTU protocol, and uploads it to the Internet of Things cloud platform. Raspberry Pi 5 obtains data through the API interface, uses the built-in dual-band Wi-Fi module to establish an AP hotspot, deploys a lightweight weighted convolutional neural network model for edge computing, and finally generates an aerator control signal to achieve intelligent water quality control. The specific technical solution is as follows: Figure 2 shown.

[0124] The sensor layer design addresses the needs of water quality monitoring in the water environment. This system utilizes a multi-source sensor collaborative architecture to build a real-time monitoring system for dissolved oxygen, pH, water temperature, and dissolved oxygen saturation. The core sensing units are the VMS-3002-LDO-N01-20 dissolved oxygen sensor and the SN-3003-PH-N01-201T pH sensor. The pH sensor utilizes a glass electrode method, while the dissolved oxygen sensor uses a fluorescence quenching method. The sensors integrate a temperature compensation module to dynamically correct for the effects of the oxygen diffusion coefficient on measured values. The sensors also simultaneously collect water temperature data and calculate dissolved oxygen saturation. The sensor's technical parameters and performance indicators are shown in the table below (illustrating the Pearson correlation coefficients between dissolved oxygen content and various parameters). The design meets industrial-grade online monitoring standards and meets the long-term stability requirements of complex water bodies in aquaculture scenarios.

[0125]

[0126] The transport layer design is included in the transport layer architecture design of this system. This application uses the integrated connection of the 485 / ModBus-RTU network data acquisition instrument and a variety of water quality sensors to achieve accurate and efficient collection of water quality parameters. Specifically, the network data acquisition instrument, with its RS-485 interface and the ModBus-RTU communication protocol it follows, can establish a stable data exchange channel with multiple water quality sensors. These sensors cover monitoring indicators that are critical to water quality, such as dissolved oxygen concentration, pH value, temperature, etc., ensuring the comprehensiveness and pertinence of data collection.

[0127] During data collection, the network data logger serves as the core data concentrator, receiving analog signals from various sensors and converting them into digital signals through internal processing mechanisms. This process not only improves data readability but also ensures accuracy and consistency during data transmission. Subsequently, utilizing the Wi-Fi communication module built into the Raspberry Pi edge computing device, the integrated digital signals are securely and reliably transmitted to the cloud platform. As a key node in edge computing, the Raspberry Pi not only performs the task of predicting dissolved oxygen concentration but also serves as a bridge between the local network and the cloud, enabling water quality monitoring data to transcend geographical boundaries and be uploaded to a cloud storage and analysis system in real time via the internet.

[0128] To further enhance the system's flexibility and responsiveness, this paper introduces API technology. By invoking the API interface deployed on the cloud platform, the Raspberry Pi can initiate HTTP requests based on actual needs, accurately obtaining key water quality data such as dissolved oxygen concentration within a specific time period. This mechanism not only simplifies the data retrieval process but also significantly enhances the system's adaptability to dynamic monitoring needs.

[0129] In summary, the transmission layer design of this invention fully embodies a highly integrated and intelligent design concept. It not only achieves the precise collection and efficient transmission of water quality parameters, but also provides an efficient, flexible, and secure solution for water quality monitoring through the deep integration of edge computing and cloud computing, as well as the flexible application of API technology. This design not only enhances the intelligent level of water quality monitoring, but also provides strong technical support for environmental protection and water resource management.

[0130] The application layer design, encompassed within this system, revolves around the Raspberry Pi as an edge computing node, enabling real-time analysis and prediction of water quality data, thereby controlling the operation of the aerator. First, the design fully leverages cloud computing resources. By invoking APIs on the cloud platform, data for specific time periods can be dynamically acquired based on actual needs. The Raspberry Pi leverages its powerful processing power to run a pre-deployed weighted convolutional neural network model to perform in-depth processing and prediction of the collected water quality data. This process includes data cleaning, feature extraction, and format conversion to ensure that the data is suitable for model input. The trained and optimized neural network model then predicts dissolved oxygen concentrations for a future period based on historical and real-time data.

[0131] Based on the prediction results, the Raspberry Pi connects to and intelligently controls the operating status of the aerator via its GPIO port to ensure that the dissolved oxygen concentration in the water remains within the optimal range. This mechanism effectively improves the automation and responsiveness of water quality management. To support this complex and efficient process, the Raspberry Pi 5, with its built-in dual-band Wi-Fi module, not only provides a stable connection to the external network for timely system updates and uploading of critical data, but also configures the hostapd software to create a Wi-Fi hotspot, providing a stable, reliable, and independent network environment for local water quality sensors and other devices. This self-supplied network capability greatly enhances the system's independent operation and environmental adaptability. Even in extreme situations where external network access is lacking, the Raspberry Pi can independently handle all tasks of data collection, processing, and prediction. The entire application layer design fully demonstrates its high degree of integration and intelligence, providing not only a comprehensive and efficient solution for water quality monitoring but also a valuable exploration and practice for the deep integration of edge computing and cloud computing.

[0132] The database design is part of this system's database design. This application proposes an IoT data storage architecture designed for the Raspberry Pi 5, focusing on efficiently storing and dynamically updating time-series data locally in the cloud. This architecture builds an optimized database model for time-sensitive data. By using a sliding window algorithm to update historical data in real time, the system retains only the most recent 45 days of valid data (i.e., 2,160 records, based on the sensor nodes' 30-minute data upload frequency). This capacity design not only aligns with the sensor upload cycle but also effectively reduces data storage costs, improving overall system efficiency and performance.

[0133] This study used a typical aquaculture pond as an experimental scenario to construct an intelligent water environment control system based on a Raspberry Pi 5 edge computing node. The system continuously collected key indicators such as dissolved oxygen (DO) and pH on a 30-minute basis using a multi-parameter water quality sensor. These indicators were transmitted to a cloud-based IoT platform via the ModBus-RTU protocol. The Raspberry Pi 5 then accessed these data in real time through an API interface to construct a time series dataset. The experimental dataset spanned 2160 data samples from 10:02 AM on January 13, 2025, to 9:32 AM on February 27, 2025, ensuring both temporal continuity and spatial integrity.

[0134] The system uses Python 3.9 development environment and deploys the self-developed IPSO-CNN-GRU-TAM hybrid prediction model based on deep learning frameworks such as TensorFlow and Keras to achieve online rolling prediction of dissolved oxygen concentration. The embedded system establishes a closed-loop feedback mechanism with the aerator controller through the GPIO interface. When the predicted value is lower than the critical threshold, the oxygen increase instruction is triggered, and when it is higher than the saturation threshold, the shutdown operation is executed, forming a full-chain intelligent control system of "perception-prediction-decision-control". The system topology is as follows: Figure 3 shown.

[0135] The system integrates water quality and data acquisition functions, and transmits real-time collected data to a cloud platform via a network data logger. The cloud platform can record and display water quality data in real time. Figure 4 The system's real-time monitoring results for water quality data include key parameters such as dissolved oxygen saturation, dissolved oxygen concentration, temperature and pH value.

[0136] By setting a certain period of time, you can retrieve water quality data within a certain time range. Figure 5 Displays partial data query results for a certain day.

[0137] By applying the dissolved oxygen prediction algorithm, the present application can determine the input and output of the dissolved oxygen prediction model, and accordingly draw a dissolved oxygen prediction result curve and an actual monitoring value curve, so as to observe the change trend of dissolved oxygen over a period of time. Figure 6 This is the dissolved oxygen prediction curve analysis chart, which shows the comparison between the predicted and actual values. By accurately predicting changes in dissolved oxygen concentration, this application can more effectively control the operation of the aerator to optimize water quality and improve aquaculture efficiency. Experimental data shows that the use of this prediction model architecture can maintain a prediction accuracy of up to 96.47% while shortening the control response time to no more than 72 seconds, significantly improving the timeliness of regulation and energy efficiency of the aquaculture environment.

[0138] In some embodiments, to address the problems that traditional Antoine equation parameters rely on manual experimental fitting and new material data are scarce, a cross-material parameter prediction framework based on transfer learning is designed. The universal model is trained using thermodynamic data of known materials and then transferred to the target material to achieve rapid parameter optimization.

[0139] Cross-substance feature encoding: Constructs a molecular feature vector (e.g., SMILES encoding, quantum chemical descriptors) of a substance, combines it with the Antoine parameters (A / B / C) of known substances and the applicable temperature range, and establishes a "molecular feature-parameter space" mapping relationship. Pre-trained general model: Using a graph neural network (GNN) or Transformer model, pre-trained with millions of known substance data (e.g., the NIST database), learns the potential relationship between molecular structure and thermodynamic parameters. Target substance migration fine-tuning: Inputting only a small amount of experimental data for the target substance (e.g., vapor pressure measurements at 3-5 temperature points), by freezing the underlying parameters of the pre-trained model and fine-tuning the upper-layer network, high-precision A / B / C parameters are quickly fitted. Adaptive error correction uses a Bayesian optimization algorithm to dynamically correct the error of the predicted parameters within the target temperature range and generate an error confidence interval.

[0140] This method reduces the need for dozens of experimental data sets to just 3-5, shortening the parameter acquisition cycle for new substances by over 80%. This method is applicable to substances with limited public data, such as ionic liquids and novel polymers, solving the "cold start" problem. Combined with Bayesian correction, the parameter prediction error is reduced by 40% compared to traditional least squares methods, with a particularly significant advantage in the high and low temperature ranges where data is sparse.

[0141] In some embodiments, to address the problems of high energy consumption and product quality fluctuations in distillation towers, a reinforcement learning framework called "environmental state-control action-multi-objective reward" is designed to optimize operating parameters such as reflux ratio and heating amount in real time to balance the three goals of energy consumption, purity, and output.

[0142] State-space modeling: Collect real-time data (tower top / bottom temperature, pressure, component concentrations, and energy consumption sensor signals) and construct a state vector St = [T1, P2, cA, …, Eloss] containing more than 100 dimensions.

[0143] Action Space Design: Discretize adjustable parameters (recirculation ratio adjustment step size ±5%, heating power ±10kW) to form over 50 combined actions A t, ensuring operations within safety thresholds. Multi-objective Reward Function: Design a weighted reward Rt = α*Δpurity + β*(-Δenergy consumption) + γ*Δoutput, and generate a set of non-dominated solutions through Pareto front optimization.

[0144] Distributed training and deployment: Use the Proximal Policy Optimization (PPO) algorithm for offline training on the digital twin platform, and then fine-tune online with real-time sensor data when deployed to the PLC control system.

[0145] Compared to traditional PID control, this system reduces energy consumption by 15%-20%, reduces product purity standard deviation by 30%, and increases yield by 8%. Adaptive anti-interference: When feed composition fluctuates by ±10%, system stabilization time is reduced from 120 minutes to 40 minutes, significantly enhancing robustness. Model-independent: Eliminating the need for a precise distillation column thermodynamic model, data-driven adaptation to different systems (such as ethanol-water and benzene-toluene) reduces adaptation cycles from weeks to hours.

[0146] In some embodiments, to address the difficult problem of inverting phase equilibrium parameters of azeotropic / near-azeotropic systems (such as NRTL and UNIQUAC model parameters), an improved genetic algorithm that incorporates quantum bit encoding and adaptive mutation operators is introduced to overcome the bottleneck of traditional optimization algorithms that are prone to falling into local optimality.

[0147] Quantum coding optimization: Model parameters are encoded as quantum bit strings, with each parameter corresponding to multiple quantum states (superposition states represent the diversity of solutions). The initial population is generated through Latin hypercube sampling, covering more than 95% of the effective area of ​​the parameter space.

[0148] Adaptive mutation strategy: Introduces the concept of "energy barrier" and dynamically adjusts the mutation probability according to the current population concentration: when the solution space converges, global mutation is triggered (the mutation rate increases from 5% to 20%); when dispersed, local fine search is adopted (the mutation rate drops to 1%).

[0149] Multi-objective fitness function: Simultaneously minimizes the deviation between experimental and calculated values ​​(such as vapor-liquid composition errors and temperature errors) while maximizing the physical rationality of parameters (such as the monotonicity constraint on activity coefficients). Parallel computing acceleration: Utilizing GPU clusters to evaluate thousands of offspring individuals in parallel, combined with an elite retention strategy (retaining the top 10% of optimal solutions), each generation's computation time is reduced to 1 / 20th that of a traditional CPU.

[0150] In azeotropic systems (such as the ternary system of ethanol, benzene, and water), the parameter inversion success rate has increased from 65% with traditional GA to 92%, avoiding local minima near the azeotropic point. Physical constraint integration: By embedding thermodynamic consistency conditions (such as the Gibbs-Duhem equation) into the fitness function through a penalty function, parameter reliability has increased by over 50%. Breakthrough efficiency: When processing complex systems with 10+ parameters, optimization time has been reduced from 72 hours to 6 hours, meeting the needs of real-time inversion of high-throughput experimental data.

[0151] In some embodiments, in response to the need for real-time monitoring of vapor pressure in chemical production, a Transformer model is constructed that combines time series (temperature changes) and spatial features (correlations between multiple measurement points), thereby achieving high-precision prediction and abnormal operating condition warning.

[0152] Multimodal data fusion: Input data includes the target material temperature series (over the past 24 hours, minute-by-minute), temperature / pressure data from adjacent measurement points, and ambient humidity / pressure sensor signals, forming a spatiotemporal feature matrix. Position encoding improvements: A "joint spatiotemporal position encoding" was designed, using a sine function for the time dimension and attention weights for the spatial dimension based on the physical distance of the measurement points. This captures the dependencies between sensors at different locations (for example, the weight of measurement points within 5 meters of the target container is increased by 30%).

[0153] Dual-channel output design: The main branch outputs a one-hour vapor pressure forecast (including a 95% confidence interval), while the auxiliary branch reconstructs the input data through self-supervised learning. Anomaly detection alerts are triggered when the reconstruction error exceeds 3σ. Online incremental learning: New experimental data is automatically imported daily, and the model is updated using knowledge distillation technology to prevent "old knowledge forgetting" while maintaining prediction latency below 200ms.

[0154] Compared to the Antoine equation with a single temperature input, accounting for environmental variables and spatial correlation improves prediction accuracy by 25% (RMSE drops from 1.2 kPa to 0.9 kPa). It successfully detects hidden faults such as pipe blockage (causing localized temperature anomalies) and sensor drift, achieving a 98% early warning accuracy rate and reducing the false alarm rate by 70% compared to traditional threshold methods. The model automatically adapts to seasonal variations (such as fluctuations in ambient air pressure with altitude and weather) without requiring manual adjustments, and the cost of parameter migration is near zero when deployed across multiple factories.

[0155] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An embedded intelligent aquaculture dissolved oxygen control system, characterized in that: include: The perception layer is equipped with a sensor module for real-time acquisition of water environment parameters. The sensor module includes at least a dissolved oxygen sensor, a pH sensor, and a temperature sensor. The sensor module is integrated with a temperature compensation module to dynamically correct the measured value. The transmission layer includes a network data logger and an edge computing node. The network data logger communicates with the sensor module via an RS-485 interface and the ModBus-RTU protocol, converts the collected analog signals into digital signals, and transmits them to the edge computing node. The edge computing node is a Raspberry Pi 5 with a built-in dual-band Wi-Fi module. The dual-band Wi-Fi module is used to establish an AP hotspot to build a local independent communication network and obtain historical water quality data from the IoT cloud platform through an API interface. The application layer is deployed in the Raspberry Pi 5 and includes a data processing unit and a prediction control unit. The data processing unit is used to clean, extract features, and convert the format of the real-time water quality data transmitted by the transport layer and the acquired historical water quality data to generate a time series data set. The prediction control unit performs real-time prediction of dissolved oxygen concentration based on the time series data set and generates an aerator control signal based on the prediction result. The execution layer includes an aerator connected to the GPIO interface of the Raspberry Pi 5, and the aerator performs start and stop operations according to the aerator control signal.

2. The system according to claim 1, wherein: The sensor module integrates a temperature compensation module to dynamically correct the measured value, including: The temperature sensor synchronously collects water temperature data, and the temperature compensation module dynamically corrects the oxygen diffusion coefficient of the dissolved oxygen sensor based on the water temperature data, and compensates for the electrode potential temperature drift of the pH sensor. The correction formulas corresponding to the compensation and dynamic correction meet the nonlinear relationship model between the dissolved oxygen concentration and temperature of the water body and the Nernst equation temperature correction mechanism of the pH value.

3. The system according to claim 1, wherein: The step of converting the collected analog signal into a digital signal and transmitting the digital signal to the edge computing node includes: The network data logger acts as a data concentrator, cascading multiple sensor modules via the RS-485 bus, parsing the analog signals output by the sensors in accordance with the ModBus-RTU protocol, converting them into digital signals via a built-in analog-to-digital conversion module, and transmitting the digital signals in real time to the Raspberry Pi 5, which is then synchronously uploaded to cloud storage via the IoT cloud platform interface.

4. The system according to claim 1, wherein: The dual-band Wi-Fi module is used to establish an AP hotspot to build a local independent communication network, including: The dual-band Wi-Fi module provides wireless communication access for local devices such as the sensor module and network data logger by building a dual-band Wi-Fi hotspot of 2.4GHz and 5GHz, forming a local communication system independent of the external network, ensuring localized operation of data collection, processing and control command issuance when there is no external network coverage.

5. The system according to claim 1, wherein: The real-time water quality data transmitted by the transmission layer and the acquired historical water quality data are cleaned, feature extracted, and format converted to generate a time series data set, including: The data processing unit removes outliers in real-time data using a sliding window filtering algorithm, extracts time lag features based on the time correlation of water quality parameters, and converts the data format into a multidimensional time series with fixed time intervals. The multidimensional time series includes dissolved oxygen concentration, pH value, water temperature, and historical dissolved oxygen trend features.

6. The system according to claim 1, wherein: The real-time prediction of dissolved oxygen concentration based on the time series data set and the generation of an aerator control signal according to the prediction result include: The prediction control unit adopts a sliding window rolling prediction mechanism, inputs the time series data set into a lightweight weighted convolutional neural network model, and outputs a predicted value of dissolved oxygen concentration for the next 1-3 hours; when the predicted value is lower than a preset critical threshold, a signal to start the aerator is generated; when the predicted value is higher than a saturation threshold, a signal to stop the aerator is generated. The critical threshold and saturation threshold are dynamically configured according to the survival needs of the target fish species in the aquaculture water body.

7. The system according to claim 1, wherein: The lightweight weighted convolutional neural network model built into the prediction control unit is a time series prediction model based on a CNN-GRU hybrid architecture. This model establishes a nonlinear mapping relationship between water quality parameters and dissolved oxygen concentration trends through supervised learning of historical water quality datasets. The inference delay of this model on embedded devices does not exceed 500ms, and the prediction accuracy is ≥96%. The historical water quality data set includes dissolved oxygen, pH value, water temperature, salinity and parameters related to biological metabolic activities.

8. The system according to claim 7, characterized in that The lightweight weighted convolutional neural network model includes: The spatiotemporal feature extraction layer consists of an improved depthwise separable convolutional layer that weights the water quality parameter time series by channel dimension and extracts the time-varying effects of water temperature and pH on dissolved oxygen concentration by aggregating local receptive fields across time steps. The temporal dependency modeling layer uses a GRU unit with a gated attention mechanism to dynamically allocate the contribution of historical time steps to the current prediction through the attention weight matrix; The lightweight output layer compresses the fully connected layer parameters through channel pruning technology and adopts a dynamic quantization algorithm to reduce computational complexity. This reduces the floating-point operations of the lightweight weighted convolutional neural network model to ≤150M on a Raspberry Pi 5, while maintaining a prediction accuracy of ≥96%. The lightweight weighted convolutional neural network model jointly optimizes the dissolved oxygen concentration prediction and abnormal state detection tasks through multi-task learning. The loss function is the weighted sum of the prediction mean square error and the anomaly classification cross entropy.

9. The system according to claim 1, wherein: The Raspberry Pi 5 serves as an edge computing node and implements model optimization through a cloud-edge collaboration mechanism: when the local data set accumulation exceeds a preset threshold, the incremental data is encrypted and uploaded to the cloud server through the dual-band Wi-Fi module. The cloud completes the model retraining and then downloads the update to the prediction control unit, forming a closed-loop learning system from local prediction to cloud optimization.

10. The system according to claim 1, wherein: Also includes: The database module is configured in the Raspberry Pi 5 and uses a sliding window algorithm to store historical water quality data for a recent preset time period. The amount of historical data within the preset time period is determined based on the sensor upload cycle and is used to provide training and prediction data for the weighted convolutional neural network model.

Citation Information

Patent Citations

  • Factory-like aquaculture water quality dissolved oxygen predicting and controlling method and system

    CN107728477A

  • Factory-like aquaculture dissolved oxygen regulation and control system and method

    CN107977025A

  • Deep sea fishery breeding system based on Internet of Things

    CN115348250A

  • Water quality monitoring control method and system

    CN118861642A

Cited By

  • Polymer performance prediction system and synthesis scheme recommendation system based on two channels

    CN121075491A

  • A dual-channel polymer performance prediction system and synthesis scheme recommendation system

    CN121075491B