Aquaculture water quality regulation and control system based on multi-source sensing fusion
By working collaboratively across multiple modules, high-precision time synchronization and low-latency fusion of multi-source sensor data were achieved, solving the problem of insufficient real-time response in water quality control systems under narrowband IoT environments and improving the accuracy and reliability of water quality management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGFA GUOXIN (SHANGHAI) AGRI SCI & TECH DEV CO LTD
- Filing Date
- 2025-09-10
- Publication Date
- 2026-04-21
AI Technical Summary
Existing water quality monitoring systems cannot achieve high-precision time synchronization and low-latency fusion processing of multi-source sensor data in narrowband IoT environments, resulting in insufficient real-time response and reliability of water quality control systems, and failing to effectively cope with complex decision-making needs under multi-parameter coupling conditions.
By employing a data synchronization module, a delay compensation module, a transmission scheduling module, and a fusion decision module, and using techniques such as dynamic time warping algorithm, Kalman filter algorithm, federated learning framework, and DS evidence theory, high-precision time synchronization, delay compensation, and priority scheduling of multi-source sensor data are achieved, generating precise control commands.
It significantly improves the accuracy and reliability of aquaculture water quality management, ensures the timeliness and accuracy of responses to water quality anomalies, and provides a stable water environment guarantee.
Smart Images

Figure CN121900238A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aquaculture, and more specifically, to an aquaculture water quality control system based on multi-source sensor fusion. Background Technology
[0002] With the rapid development of intensive aquaculture, water quality management in high-density aquaculture ponds faces increasingly severe challenges. Key parameters such as dissolved oxygen, pH, and ammonia nitrogen concentration in the aquaculture water are easily affected by changes in the internal and external environment. For example, heavy rain in summer can cause a sudden drop in water temperature and a sharp change in dissolved oxygen saturation. Large amounts of precipitation may cause water stratification and hypoxia at the bottom. After feeding, fish metabolism intensifies, consuming large amounts of oxygen and producing harmful substances such as ammonia nitrogen. If oxygenation equipment is not adjusted in time, it can easily cause fish stress or even large-scale mortality. Such scenarios require continuous monitoring of multiple water quality parameters and precise control with a response time of seconds to maintain the ecological balance of the aquatic body and ensure the safety of aquaculture organisms.
[0003] Currently, most IoT-based water quality monitoring systems use NB-IoT technology for remote data transmission. While this technology offers advantages such as low power consumption and wide coverage, its communication mechanism prioritizes energy saving, employs half-duplex mode, and has limited transmission rates. In areas with network congestion or weak signals, transmission delays of hundreds of milliseconds to several seconds may occur. Furthermore, the data acquisition timestamps of the multi-source sensors deployed in the system have inherent deviations due to differences in type and asynchronous sampling periods. Existing solutions typically rely on single-sensor threshold alarms or use proprietary protocols such as LoRa for data transmission. The former cannot handle complex decision-making needs under multi-parameter coupling conditions, while the latter, although it can alleviate the delay problem to some extent, is limited by protocol compatibility and coverage, making it difficult to widely apply in large-scale aquaculture scenarios. More importantly, existing systems lack the ability to perform real-time collaborative processing of multi-source heterogeneous data at the edge, failing to effectively compensate for the timestamp misalignment caused by transmission delays, leading to delayed control commands or malfunctions. Therefore, there is an urgent need for a technical solution that can achieve high-precision time synchronization and low-latency fusion processing of multi-source sensor data in a narrowband IoT environment to support the real-time response and reliable operation of water quality control systems. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing an aquaculture water quality control system based on multi-source sensor fusion. This system is capable of achieving high-precision time synchronization and low-latency fusion processing of multi-source sensor data in a narrowband Internet of Things environment, thereby solving the problems mentioned in the background.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: it includes a data synchronization module, a delay compensation module, a transmission scheduling module, and a fusion decision module, wherein,
[0006] The data synchronization module is used to receive asynchronous data streams from dissolved oxygen, pH, and ammonia nitrogen concentration sensors. It aligns the multi-source time series by calling the dynamic time warping algorithm, and performs short-term state prediction and noise reduction on the aligned multi-sensor data series by combining the Kalman filter algorithm, and outputs a multi-parameter fusion data stream under a unified time base.
[0007] The delay compensation module is used to receive the multi-parameter fusion data stream output by the data synchronization module, and perform real-time inference through a local prediction model deployed on the edge node to compensate for the data delay caused by network transmission. The local prediction model is trained and updated in a distributed manner through a federated learning framework, and outputs real-time water quality status data after delay compensation.
[0008] The transmission scheduling module is used to receive the real-time water quality status data output by the delay compensation module, dynamically adjust the discontinuous reception period of the NB-IoT communication unit by calculating its priority score and comparing it with a preset threshold, insert a mark for high-priority data packets, and output the final water quality data packet transmitted by priority scheduling.
[0009] The fusion decision module is used to receive the final water quality data packet that has been prioritized and transmitted by the transmission scheduling module, fuse multi-source sensor data by using DS evidence theory, generate control instructions and send them to the execution device, and at the same time collect the status feedback data of the execution device and send it back to the data synchronization module to form a closed-loop control.
[0010] In a preferred embodiment, the specific operation of aligning multi-source time series by calling the dynamic time warping algorithm in the data synchronization module is as follows:
[0011] The system receives raw asynchronous data streams from dissolved oxygen, pH, and ammonia nitrogen concentration sensors. Each data record contains a sensor value and a local timestamp. The local timestamps of each sensor are uniformly converted to the system's absolute time reference. The conversion process incorporates sensor clock calibration offset and network transmission delay smoothing factors for compensation. Based on the converted timestamps, data buffer sequences for each sensor are constructed. The dissolved oxygen sensor buffer sequence contains the latest sample values and their absolute timestamps, as do the pH and ammonia nitrogen sensor buffer sequences. The information entropy value of each buffer sequence is calculated by statistically analyzing the numerical distribution histogram and calculating the uncertainty of the probability distribution. Entropy weight coefficients are calculated based on the information entropy values of each buffer sequence. These entropy weight coefficients are negatively correlated with the information entropy values. A weighted cost matrix is constructed, where each element is a weighted sum of the absolute differences between each sensor value and a reference value, with the weight being the corresponding entropy weight coefficient. The optimal path of the weighted cost matrix is solved. The optimal path satisfies the condition of minimizing cumulative cost and having path curvature constrained by a penalty coefficient. A time-aligned multi-sensor data sequence is generated based on the optimal path index.
[0012] In a preferred embodiment, the specific operations of the short-term state prediction and denoising processing are as follows:
[0013] The time-aligned multi-sensor data sequence is input into a multi-parameter joint Kalman filter. The state vector is defined to include dissolved oxygen, pH, and ammonia nitrogen concentration values, along with their first derivatives. A state transition matrix is designed, containing a time interval parameter and a diagonal matrix of attenuation coefficients for each parameter. The attenuation coefficients characterize the inertial characteristics of each parameter over time. An observation matrix is designed, specifying the correspondence between observable state components and sensor values. Process noise covariance and observation noise covariance matrices are configured, with the observation noise covariance inversely proportional to the entropy weighting coefficient. Kalman filter recursive calculations are performed, including state prediction, error covariance prediction, Kalman gain calculation, state correction, and error covariance update. The output is a multi-parameter fused data stream under a unified time reference, containing a filtered state vector sequence, where the state vector sequence consists of dissolved oxygen, pH, and ammonia nitrogen concentration values and their respective rates of change.
[0014] In a preferred embodiment, the specific operation of real-time inference using a local prediction model deployed at the edge node in the delay compensation module is as follows:
[0015] The system receives the multi-parameter fused data stream output by the data synchronization module, extracts the arrival timestamp and generation timestamp of data packets at the edge nodes, calculates the network transmission delay (the difference between the arrival and generation timestamps minus the fixed processing delay at the edge nodes), and constructs a delay buffer sequence based on the calculated network transmission delay and the state vector estimate output by the data synchronization module. This delay buffer sequence consists of pairing the state vector estimate with the corresponding network transmission delay. The prediction step size is determined based on the calculated network transmission delay, which is the network transmission delay divided by the system sampling interval and rounded up. The multi-parameter... The fused data stream is organized into historical data sequences according to time windows, with a fixed length of ten sampling points. The historical data sequences are input into a spatiotemporal convolutional gating network, which simultaneously performs one-dimensional convolution operations in the time dimension and graph convolution operations in the spatial dimension. The temporal convolution operation extracts the temporal variation features in the data stream, while the graph convolution operation models the coupling relationship between different water quality parameters. The temporal and spatial features are dynamically fused through learnable gating vectors to generate a fused feature representation. Based on the fused feature representation, the predicted water quality status at future prediction step times is calculated through a fully connected layer, and the delayed-compensated real-time water quality status data is output.
[0016] In a preferred embodiment, the specific steps of the federated learning framework for distributed training and updating include:
[0017] Each edge node trains a spatiotemporal convolutional gating network using locally stored historical water quality data. The training objective is to minimize the Euclidean distance between the predicted and actual values, while constraining the Frobenius norm of the model parameters. The local training loss value for each edge node is calculated; this loss is the sum of the prediction error and the regularization term. Node aggregation weights are calculated based on these local training loss values. These weights are negatively correlated with the loss values and are normalized using an exponential function. The central server collects the model parameters and aggregation weights from each edge node, aggregates the model parameters using a weighted average algorithm, and generates a new generation of global model parameters. These global model parameters are then distributed to each edge node to replace the original parameters, completing the model update.
[0018] In a preferred embodiment, the specific steps in the transmission scheduling module for calculating the priority score and comparing it with a preset threshold are as follows:
[0019] The system receives real-time water quality status data from the delay compensation module; calculates the anomaly degree of water quality parameters. The anomaly degree calculation is performed independently for each parameter. The absolute value of the difference between the current value of the parameter and the preset safety threshold is divided by the range of the parameter, multiplied by the risk weight coefficient corresponding to the parameter, and finally the weighted anomaly degrees of all parameters are summed; calculates the trend sensitivity, which is the output value of the hyperbolic tangent function of the product of the rate of change vector L2 and the prediction time scale; calculates the comprehensive priority score, which is the result of the linear combination of the anomaly degree weighting coefficient and the sensitivity weighting coefficient compressed by the S-shaped function. The anomaly degree weighting coefficient is 1.2 and the sensitivity weighting coefficient is 0.8. The system outputs the priority score value in the range of 0 to 1, and compares the calculated priority score value with the high priority threshold to determine whether the data packet needs to be marked as high priority.
[0020] In a preferred embodiment, the specific operation of dynamically adjusting the discontinuous reception period of the NB-IoT communication unit is as follows:
[0021] A virtual queue is constructed, and the queue is updated by adding the previous queue length to the current priority score and subtracting the target throughput threshold, with the result being a non-negative value. The Lyapunov drift plus penalty term is calculated, where the drift term is the expected change of the square of the queue length, and the penalty term is the product of the expected communication energy consumption and the energy consumption control parameter. The optimal discontinuous reception period is solved by finding the period value that minimizes the Lyapunov drift plus penalty term within the range of the minimum and maximum periods specified in the standard, and the calculated optimal period is configured in the narrowband IoT communication unit.
[0022] In a preferred embodiment, the specific steps for inserting tags into high-priority data packets and outputting the final water quality data are as follows:
[0023] A flag bit is generated based on the comparison result between the priority score value and the high priority threshold. When the priority score value is greater than the high priority threshold, the flag bit is set to high priority; otherwise, it is set to normal priority. The final transmission data packet is constructed, which includes the flag bit, real-time water quality status data, data packet generation timestamp, and optimal discontinuous reception period value. The final transmission data packet is then output to the narrowband IoT communication unit for transmission.
[0024] In a preferred embodiment, the specific steps of fusing multi-source sensor data using DS evidence theory in the fusion decision module include:
[0025] The system receives the final water quality data packet output by the transmission scheduling module and extracts dissolved oxygen concentration, pH, and ammonia nitrogen concentration values from it as multi-source sensor data. It calculates the information entropy value of each sensor data point, obtained by statistically analyzing the histogram of numerical distributions and calculating the uncertainty of the probability distribution. It calculates the evidence weight coefficient based on the information entropy value of each sensor data point; the evidence weight coefficient is negatively correlated with the information entropy value. It generates a basic probability allocation function, calculated by multiplying the evidence weight coefficient by an exponential decay function, where the input to the exponential decay function is the Euclidean distance between the sensor data and the reference values of each proposition. It performs a weighted evidence synthesis calculation on the basic probability allocation function, which includes multiplying the basic probability allocation values supporting the same proposition by each piece of evidence, and multiplying the basic probability allocation values that do not support the proposition by the complement of each piece of evidence. Finally, it multiplies the two results together. It calculates the confidence function and likelihood function values for each proposition; the confidence function value is the sum of all synthesized evidence supporting the proposition, and the likelihood function value is one minus the sum of all synthesized evidence opposing the proposition.
[0026] In a preferred embodiment, the specific operation of generating control commands and forming closed-loop control is as follows:
[0027] Control commands are generated based on the comparison between the confidence function value and a preset threshold. A normal operation command is generated when the confidence function value of the normal state proposition is greater than 0.8; a dosage adjustment command is generated when the confidence function value of the warning state proposition is greater than 0.6; and an emergency shutdown command is generated when the confidence function value of the danger state proposition is greater than 0.7. These control commands are then sent to the executing equipment, which includes a dosing pump and a valve controller. Status feedback data from the executing equipment is collected, including flow rate readings, pressure readings, and execution status codes. This status feedback data is combined with the data acquisition timestamp and equipment identifier to form a feedback data packet. The feedback data packet is then sent back to the data synchronization module, completing the closed-loop control.
[0028] The beneficial effects of this invention are as follows: Through the collaborative work of multiple modules, the accuracy and reliability of aquaculture water quality management are effectively improved. The data synchronization module integrates data from multiple heterogeneous sensors, eliminates time-series differences, and provides a clean data stream. The delay compensation module uses a local intelligent prediction model to overcome network transmission delays and ensures the real-time nature of status perception. The transmission scheduling module dynamically optimizes communication strategies based on the criticality of data to ensure priority transmission of important information. The fusion decision module comprehensively analyzes multi-dimensional information to generate control commands and continuously optimizes the execution effect through a closed-loop feedback mechanism. The entire system realizes intelligent control of the entire process from data collection, processing, transmission to decision execution, significantly enhancing the timeliness and accuracy of water quality anomaly response and providing a stable and reliable water environment guarantee for intensive aquaculture. Attached Figure Description
[0029] Figure 1 This is a flowchart of the method of the present invention;
[0030] Figure 2 This is a block diagram of the system structure of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0033] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0034] Example 1
[0035] This embodiment provides, for example Figure 1-2 The system illustrates aquaculture water quality control system based on multi-source sensor fusion, specifically comprising: a data synchronization module, a delay compensation module, a transmission scheduling module, and a fusion decision module.
[0036] The data synchronization module is used to receive asynchronous data streams from dissolved oxygen, pH, and ammonia nitrogen concentration sensors. It aligns the multi-source time series by calling the dynamic time warping algorithm, and performs short-term state prediction and noise reduction on the aligned multi-sensor data series by combining the Kalman filter algorithm, and outputs a multi-parameter fusion data stream under a unified time base.
[0037] The delay compensation module receives the multi-parameter fused data stream output by the data synchronization module and performs real-time inference through a local prediction model deployed on the edge node to compensate for the data delay caused by network transmission. The local prediction model is trained and updated in a distributed manner through a federated learning framework and outputs real-time water quality status data after delay compensation.
[0038] The transmission scheduling module is used to receive real-time water quality status data output by the delay compensation module, dynamically adjust the discontinuous reception cycle of the NB-IoT communication unit by calculating its priority score and comparing it with a preset threshold, insert a mark for high-priority data packets, and output the final water quality data packet transmitted by priority scheduling.
[0039] The fusion decision module receives the final water quality data packet output by the transmission scheduling module after priority scheduling. It uses DS evidence theory to fuse multi-source sensor data, generates control commands and sends them to the execution equipment. At the same time, it collects the status feedback data of the execution equipment and sends it back to the data synchronization module to form a closed-loop control.
[0040] In this embodiment, it is specifically necessary to explain the following operation in the data synchronization module: aligning multi-source time series by calling the dynamic time warping algorithm.
[0041] Receive raw asynchronous data streams from dissolved oxygen, pH, and ammonia nitrogen concentration sensors. Each data record includes the sensor value and the sensor's local timestamp. * =(v,t) sensor ); Set the local timestamp t of each sensor sensor Unified conversion to system absolute time base t abs The conversion process incorporates sensor clock calibration offset and network transmission delay smoothing factors for compensation. The conversion formula for the system's absolute time base is:
[0042] t abs =t sensor +△t offset +ηe·(t network -t sensor );
[0043] Among them, t abs This represents the system's absolute time base (i.e., the system's absolute timestamp), used to uniformly convert sensor times to a unique, standard time base used by the entire system, Δt. offset ηe represents the sensor clock calibration offset (-0.5 to 0.5 s), ηe represents the network transmission delay smoothing factor (set to 0.6), and t networkThis represents the system arrival timestamp of the data packet. Based on the converted timestamps, a data buffer sequence for each sensor is constructed. The dissolved oxygen sensor buffer sequence contains the latest several sample values and their absolute timestamps; the pH sensor buffer sequence contains the latest several sample values and their absolute timestamps; and the ammonia nitrogen concentration sensor buffer sequence contains the latest several sample values and their absolute timestamps. The expression for the data buffer sequence of each sensor is as follows:
[0044]
[0045] Among them, B DO This indicates a dissolved oxygen data buffer sequence (which stores the most recent batch of dissolved oxygen data that has been timestamped). This represents the i-th dissolved oxygen value in the dissolved oxygen data buffer sequence (i.e., the dissolved oxygen sensor reading that has been converted to an absolute time base). L1 represents the absolute timestamp of the i-th data point, and L1 represents the length of the dissolved oxygen data buffer sequence, i.e., the number of data points currently contained in the dissolved oxygen data buffer sequence. This value changes dynamically and is continuously updated as new data arrives and old data is processed. pH This represents the pH sensor buffer sequence. This represents the ammonia nitrogen concentration sensor buffer sequence; the information entropy value of each buffer sequence is calculated, obtained by statistically analyzing the numerical distribution histogram and calculating the uncertainty of the probability distribution; based on the information entropy value of each buffer sequence, an entropy weighting coefficient is calculated, which is negatively correlated with the information entropy value. The formula for calculating the entropy weighting coefficient is:
[0046]
[0047] Where, ωe DO The entropy weighting coefficient represents the dissolved oxygen data buffer sequence, ranging from 0 to 1. It measures the importance of dissolved oxygen data in subsequent alignment calculations; a larger value indicates more complex variations in the sensor data and a higher weight in the alignment. (B) DO This represents the dissolved oxygen data buffer sequence, H(B) * ) represents the data buffer sequence B * Information entropy is used to quantify the degree of uncertainty or disorder in the sensor's data buffer sequence. A higher entropy value indicates greater data fluctuation and richer information content. It is calculated as follows: p m This represents the probability value (the probability that the sensor value falls within the m-th histogram interval), and it is calculated as follows: L * Represents the total length of the sequence, count(v) m ∈bin m ) represents the number of data points falling within that interval, ∑ *H represents the summation formula (summing the entropy values of the three sensors). max The maximum information entropy is represented by H. max =lnM, where M represents the number of bins in the histogram (M=10), that is, dividing the continuous range of sensor values into 10 discrete intervals (bins), and then counting the frequency of the value falling into each interval; construct a weighted cost matrix, the matrix elements are composed of the weighted sum of the absolute differences between each sensor value and the reference value, and the weights are the corresponding entropy weight coefficients. The expression of the weighted cost matrix is:
[0048]
[0049] Where C(i,j,k) represents the value of the weighted cost matrix at index (i,j,k) (i.e., the "cost" or "mismatch" of forcibly aligning the i-th point in the dissolved oxygen data buffer sequence, the j-th point in the pH sensor buffer sequence, and the k-th point in the ammonia nitrogen concentration sensor buffer sequence to the same time point; the smaller the value, the more similar the three points are), and i,j,k represent the indices of the data points in their respective sequences. This represents the i-th dissolved oxygen value in the dissolved oxygen data buffer sequence. Let represent the reference sequence value (the mean of the first sequence); solve for the optimal path in the weighted cost matrix. The optimal path satisfies the condition of minimizing cumulative cost and having path curvature constrained by a penalty coefficient. The expression for the optimal path is:
[0050]
[0051] in, Indicates the optimal path ( τv represents the path point index (from 1 to T) path (incrementing), T path i represents the total length of the optimal path (the total number of aligned data points). τv ,j τv ,k τv This represents the τv-th point on this optimal path, indexed by three specific locations i from the three sensor data sequences. τv ,j τv ,k τv (Composition), argmin represents the optimization operator (the one that minimizes the objective function). ), C(i τv ,j τv ,k τvLet τv represent the cost of the alignment point τv on the path, λe represent the path curvature penalty coefficient (set to 0.3), used to adjust whether the algorithm favors strict alignment (large λe) or allows a certain degree of asynchrony (small λe), and penalty(τv) represent the path curvature penalty term at step τv, i.e., calculating the curvature of the path at point τv (e.g., deviation from a straight path). The greater the curvature, the higher the penalty value, thus encouraging a smoother alignment path. A time-aligned multi-sensor data sequence is generated based on the optimal path index. (D aligned This represents the time-aligned multi-sensor data sequence (i.e., the final output, which includes T). path (Each data point consists of three simultaneous sensor values and a timestamp), t τv The timestamp representing the τv-th alignment point (obtained by interpolation of the original timestamps from the three sensors or by selecting one of them, representing the unified time of this alignment data point);
[0052] The specific operations for short-term state prediction and denoising are as follows:
[0053] The time-aligned multi-sensor data sequence D aligned The input multi-parameter joint Kalman filter is defined with a state vector containing dissolved oxygen, pH, ammonia nitrogen concentration, and their first derivatives, expressed as:
[0054]
[0055] Where, x te Let te represent the state vector (and te = 1, 2, ..., Te). The sensor values represent the dissolved oxygen concentration, pH value, and ammonia nitrogen concentration at time te, respectively. The first derivative of the sensor values (the instantaneous rate of change of dissolved oxygen concentration, pH, and ammonia nitrogen concentration at time te) represents the sensor readings. ⊥ The transpose symbol represents the vector used to convert a row vector into a column vector, where x is the transpose symbol. te It is a column vector; design a state transition matrix, which contains a time interval parameter and a diagonal matrix of decay coefficients for each parameter. The decay coefficients characterize the inertial properties of each parameter as a function of time. The expression for the state transition matrix is:
[0056]
[0057] Where F represents the state transition matrix (a 6x6 matrix that establishes a mathematical model from the state at time te-1 to the predicted state at time te, describing how the system state evolves over time), I 3×3This represents a 3x3 identity matrix (a matrix with 1s on the main diagonal and 0s elsewhere, used in the formula to maintain the original dimension values), and Δt represents the time interval, the time step (in seconds) between two filtering calculations. For a 5Hz output, Δt = 0.2 seconds. 3×3 Let Γ represent the 3rd order zero matrix, and let Γ represent the decay coefficient matrix (a 3x3 diagonal matrix whose diagonal values represent the inertial decay characteristics of the rates of change of each parameter), calculated as follows: The `diag(·)` operator constructs a diagonal matrix (i.e., it constructs a diagonal matrix using the elements within the parentheses). This represents the attenuation coefficient (i.e., the attenuation coefficient corresponding to the rate of change of dissolved oxygen, pH value, and ammonia nitrogen concentration, respectively), and γa DO =0.05,γa pH =0.03, The larger the value, the easier it is for the parameter to change slowly; design the observation matrix, specifying the correspondence between observable state components and sensor values. The expression for the observation matrix is:
[0058]
[0059] Where Ha represents the observation matrix (a 3x6 matrix whose function is to extract the portion (the first three values) from the 6-dimensional state vector that can be directly compared with the 3-dimensional sensor observations), and z te The observation vector (a 3-dimensional column vector derived from a time-aligned multi-sensor data sequence D) represents the observation vector. aligned The value at time te Configure the process noise covariance matrix and the observation noise covariance matrix, where the observation noise covariance is inversely proportional to the entropy weighting coefficient; perform Kalman filtering recursively, using the following formula:
[0060]
[0061] in, This represents the prior state estimate (the system state estimate obtained at time te solely through the state transition model F (not yet incorporating the latest observation data)). This represents the posterior state estimate (at time te-1, incorporating the then-current observation value z). te-1 The subsequent optimal state estimate (this is the starting point of the recursion) This represents the posterior state estimate (at time te, it combines the predicted value and the latest observation z). te The final, more accurate optimal estimate of the system state obtained afterwards is the output state vector. This represents the prior estimate covariance, used to measure the prior state estimate. A matrix representing the magnitude of uncertainty or error, P teThis represents the posterior estimate covariance, used to measure the posterior state estimate. The matrix of uncertainty or error magnitude, K te Let represent the Kalman gain (which determines whether to place more weight on the predictive model or the latest observational sensor data during fusion), Q represent the process noise covariance matrix (taken as diag(0.01,0.01,0.01,0.1,0.1,0.1)), and R represent the observation noise matrix (taken as...). ), te represents the time index (incrementing from 1 to Te), Te represents the total number of time steps (determined by the alignment sequence length), and I represents the identity matrix (a square matrix with 1s on the diagonal and 0s elsewhere). Specifically, it includes state prediction, error covariance prediction, Kalman gain calculation, state correction, and error covariance update; the output is a multi-parameter fused data stream under a unified time base. This multi-parameter fused data stream contains a filtered state vector sequence, where the state vector sequence consists of dissolved oxygen values, pH values, ammonia nitrogen concentration values, and their respective rates of change.
[0062] D sync This represents a multi-parameter fused data stream (i.e., the final output result after filtering). t represents the posterior state estimate. te Indicates the timestamp of data generation (and the posterior state estimate) (Corresponding absolute time), 5Hz means 5 sets of data are output per second. That is, the time interval is 0.2 seconds, which is consistent with Δt.
[0063] In this embodiment, it is necessary to specifically explain the real-time inference operation performed by the local prediction model deployed on the edge node in the delay compensation module as follows:
[0064] Receive the multi-parameter fused data stream D output by the data synchronization module sync Extract the arrival timestamp and generation timestamp of the data packet from the edge node, and calculate the network transmission delay. The network transmission delay is the difference between the arrival timestamp and the generation timestamp minus the fixed processing delay of the edge node. The formula is:
[0065] τ net =t receive -t te -τ process ;
[0066] Where, τ net This represents network transmission latency, specifically the time it takes for data to travel from generation to reception by edge nodes, minus the node's own processing time. The unit is typically milliseconds, and the value ranges from [0.2, 0.5] seconds. receiveThe timestamp representing the arrival time of the data packet at the edge node, i.e., the actual time the data packet arrived at the edge server performing the computation, t te τ represents the timestamp of data generation. process This represents the edge node processing latency (the fixed time required for data packets to undergo preliminary processing (such as unpacking and verification) at the edge node), set to 50ms. Based on the calculated network transmission latency and the state vector estimate output by the data synchronization module, a latency buffer sequence is constructed. This latency buffer sequence consists of pairing state vector estimates with corresponding network transmission latency values. The expression for the latency buffer sequence is:
[0067]
[0068] Among them, B delay Indicates a delayed buffer sequence. Let Te represent the posterior state estimate, and Te represent the total number of time steps (the buffer sequence contains data from consecutive time points from 1 to Te). The prediction step size is determined based on the calculated network transmission delay, which is the network transmission delay divided by the system sampling interval and rounded up. The multi-parameter fused data stream is organized into a historical data sequence according to a time window, with a fixed length of ten sampling points. The historical data sequence is input into a spatiotemporal convolutional gating network, which simultaneously performs a one-dimensional convolution operation in the time dimension and a graph convolution operation in the spatial dimension. The temporal convolution operation extracts the temporal variation features from the data stream; the extraction formula for the temporal convolution operation is:
[0069]
[0070] in, This represents a historical data sequence, specifically a historical data window from time te-Le to te, where Le represents the window length and Le = 10. temp The temporal features, specifically those extracted from historical data through one-dimensional convolution (Conv1D), reflect the changes in parameters over time. temp The temporal convolution weights (parameters of the one-dimensional convolution kernel, learned during model training, used to extract temporal features) represent the modeling of the coupling relationships between different water quality parameters in graph convolution operations. The expression is:
[0071]
[0072] in, F represents the posterior state estimate (i.e., a vector composed of the values and rates of change of all water quality parameters DO, pH, NH3). spat Representing spatial features, that is, features extracted from the current data through graph convolution (GraphConv) that reflect the physical coupling relationship between parameters, W spatLet represent the spatial convolution weights (parameters of the graph convolution operation, learned during model training), and Ge represent the sensor topology graph, defining the connections and influence relationships between sensors for different water quality parameters (dissolved oxygen, pH, and ammonia nitrogen concentration). Temporal and spatial features are dynamically fused using learnable gating vectors to generate a fused feature representation. The expression for this fused feature representation is:
[0073] ;
[0074] in, This represents the gate vector, with values ranging from [0,1]. It is generated by the Sigmoid function (σ) and is used to dynamically control the fusion ratio of spatiotemporal features. Indicates the gating weights and biases. This indicates a concatenation operation, used to join temporal and spatial feature vectors into a longer vector. This represents element-wise multiplication, used to weight and fuse the spatiotemporal features of the gated vector. The fused feature representation, which integrates temporal and spatial information, is used for final prediction. Based on the fused feature representation, a fully connected layer calculates the predicted water quality status at future prediction step times, outputting delay-compensated real-time water quality status data. The formula for predicting water quality status is:
[0075]
[0076] in, W represents the predicted water quality status, i.e., the real-time water quality status data predicted at the current time te, and for the future time te+κ (i.e., the output after delay compensation). o ,b o The output layer weights and biases represent the learnable parameters that map the fused features to the final predicted value. ELU stands for Exponential Linear Unit (introducing non-linearity into the model to help it learn complex patterns better), and κ represents the prediction step size, calculated as follows: And Δtc = 100ms;
[0077] The specific steps for distributed training and updating within the federated learning framework include:
[0078] Each edge node uses locally stored historical water quality data ( This represents the temporal convolution weight of the ue-th edge node. The spatial graph convolution weights represent the values of the ue-th edge node. This represents the gating weight of the ue-th edge node. Let represent the output layer weights of the ue-th edge node. The spatiotemporal convolutional gating network is trained with the objective of minimizing the Euclidean distance between the predicted and true values, while simultaneously constraining the Frobenius norm of the model parameters. The expression is:
[0079]
[0080] Among them, L local This represents the local training loss value. This indicates that the summation is performed over all predicted step sizes κ. This represents the predicted water quality state at the current moment, te, for the next κ steps. Let λv represent the true water quality state at the next κ steps, and λv represent the regularization coefficient, used to control the penalty strength for model complexity and prevent overfitting. F Let Θ denote the Frobenius norm, and Θ denote the set of all parameters of the model (i.e., ...). Calculate the local training loss value for each edge node. The local training loss value is the sum of the prediction error and the regularization term. Calculate the node aggregation weight based on the local training loss value. The aggregation weight is negatively correlated with the loss value and is normalized using an exponential function. The formula for calculating the node aggregation weight is as follows:
[0081]
[0082] Where, αv ue represents the node aggregation weight of the ue-th edge node. The larger this value, the more reliable the local model of that node is, and the higher its proportion in the global aggregation. exp(·) represents the exponential function, used to map the loss value to a positive range. γv represents the temperature coefficient, set to 0.5, used to adjust the smoothness of the weight distribution. The larger the γv value, the more the weights are allocated to nodes with smaller losses. Let ∑ represent the local training loss value of the ue-th edge node. uv This represents the summation of the uv values of all edge nodes participating in federated learning. This represents the local training loss value of the uv-th edge node; the central server collects the model parameters and aggregated weights of each edge node, uses a weighted average algorithm to aggregate the model parameters, and generates the next-generation global model parameters, expressed as:
[0083]
[0084] in, This represents the global model parameters in the (uy+1)th iteration (next generation). This represents summing over all NV edge nodes, αv ue This represents the node aggregation weight of the ue-th edge node. This represents the local model parameters of the ue-th edge node in the uy-th iteration; the global model parameters are distributed to each edge node to replace the original parameters, thus completing the model update; the global model update cycle does not exceed 24 hours to ensure that the model continuously adapts to the trend of water quality changes.
[0085] In this embodiment, the specific steps for calculating the priority score and comparing it with a preset threshold in the transmission scheduling module are as follows:
[0086] Real-time water quality status data output by the delay compensation module This data includes dissolved oxygen concentration, pH value, ammonia nitrogen concentration, and their respective rates of change. The anomaly rate of water quality parameters is calculated independently for each parameter. The absolute value of the difference between the current parameter value and a preset safety threshold is divided by the parameter's range, then multiplied by the corresponding risk weight coefficient. Finally, the weighted anomalies of all parameters are summed. The formula for calculating the anomaly rate of water quality parameters is as follows:
[0087]
[0088] in, This indicates the degree of anomaly in water quality parameters (dimensionless). A larger value indicates a greater deviation from a safe state. `lo` represents the parameter index (1 = dissolved oxygen, 2 = pH, 3 = ammonia nitrogen). `v`... lo v represents the current measured value of the lo-th parameter. lo,th This represents the safety threshold for the lo-th parameter, where the safety threshold for dissolved oxygen concentration is 6 mg / L, the safety threshold for pH is 8.5, and the safety threshold for ammonia nitrogen concentration is 0.2 mg / L. |v lo -v lo,th | represents the absolute value of the difference between the current value and the safety threshold, △v lo,range This represents the range of the lo-th parameter (the difference between its maximum and minimum values), and Δv 1,range For 10 mg / L (range 0-10 mg / L), Δv 2,range The value is 14 (range 0-14), △v 3,range The concentration is 0.5 mg / L (range 0-0.5 mg / L). This represents the risk weight coefficient of the lo-th parameter, i.e., the proportion of that parameter's contribution to the overall anomaly rate. The sensitivity to change trends is calculated as the hyperbolic tangent function output of the product of the L2 norm of the rate of change vector and the prediction time scale. The formula for calculating the sensitivity to change trends is:
[0089]
[0090] in, The value represents the sensitivity to changes in trend (dimensionless, range 0-1), with a larger value indicating a more drastic change. tanh represents the hyperbolic tangent function, used to compress the input to the interval (0,1). Represents the rate of change vector (i.e. ), κ pred This represents the prediction time scale (unit: seconds), set to 5 to amplify the impact of the rate of change. A comprehensive priority score is calculated, which is the result of a linear combination of the anomaly weighting coefficient and the sensitivity weighting coefficient compressed using an S-shaped function. The anomaly weighting coefficient is 1.2, and the sensitivity weighting coefficient is 0.8. The output priority score value is within the range of 0 to 1. The formula for calculating the comprehensive priority score is:
[0091]
[0092] in, The overall priority score (dimensionless, range 0-1) represents the final output score. The higher the value, the higher the data priority. βl1 represents the anomaly weighting coefficient, which is set to 1.2. βl2 represents the sensitivity weighting coefficient, which is set to 0.8. σ represents the Sigmoid function, which is used to compress the weighted sum to the interval (0,1) to obtain the final score. The calculated priority score value is compared with the high priority threshold to determine whether the data packet needs to be marked as high priority.
[0093] The specific operation for dynamically adjusting the discontinuous reception period of the NB-IoT communication unit is as follows:
[0094] A virtual queue is constructed, and the queue is updated by adding the previous queue length to the current priority score and subtracting the target throughput threshold, with the result being a non-negative value. The expression for the virtual queue is:
[0095]
[0096] Where Qv(te) represents the virtual queue length and the queue state at time te, Qv(te+1) represents the virtual queue length at the next time te+1, max[…,0] represents the maximum value function to ensure that the queue length does not become negative, φ represents the target throughput threshold, and its value is set to 0.7; the Lyapunov drift plus penalty term is calculated, where the drift term is the expected change of the square of the queue length, and the penalty term is the product of the expected communication energy consumption and the energy consumption control parameter. The formula for calculating the Lyapunov drift plus penalty term is:
[0097]
[0098] Among them, △ L(te) represents the Lyapunov drift plus penalty term, El[] represents the expectation operator, which calculates the mathematical expectation of the random variable within the parentheses, Vl represents the energy consumption control parameter, which is set to 10 to adjust the trade-off between "queue stability" and "energy consumption". The larger the Vl value, the more inclined it is to reduce energy consumption. comm (te) represents the communication energy consumption function, i.e., the energy consumed in communication at time te; to solve for the optimal discontinuous reception period, we find the period value that minimizes the Lyapunov drift penalty term within the range of the minimum and maximum periods specified in the standard. The formula for calculating the optimal discontinuous reception period is:
[0099]
[0100] in, T represents the optimal discontinuous reception period. DRX This represents the decision variable, i.e., the DRX period to be optimized. This represents the minimum value of the DRX period, and This represents the maximum value of the DRX cycle, and This indicates the constraint condition, namely that the optimization range must be between the minimum and maximum values, and the calculated optimal cycle is configured to the narrowband IoT communication unit;
[0101] The specific steps for inserting tags into high-priority data packets and outputting the final water quality data are as follows:
[0102] A flag is generated based on the comparison between the priority score and the higher priority threshold. When the priority score is greater than the higher priority threshold, the flag is set to higher priority; otherwise, it is set to normal priority. The expression is:
[0103]
[0104] in, This represents a flag function used to indicate the priority of the final transmitted data packet. An output of 1 represents high priority, and an output of 0 represents normal priority. θ high This indicates a high-priority threshold, set to 0.8; the final transmission data packet is constructed, including a flag bit, real-time water quality status data, a data packet generation timestamp, and the optimal discontinuous reception period value. (t stamp (Indicates the timestamp of data packet generation), and finally outputs the transmitted data packet to the narrowband IoT communication unit for transmission.
[0105] In this embodiment, it is necessary to specifically explain the steps involved in fusing multi-source sensor data using the DS evidence theory in the fusion decision module, including:
[0106] The final water quality data packet output by the transmission scheduling module is received. Dissolved oxygen concentration, pH, and ammonia nitrogen concentration values are extracted from the final water quality data packet as multi-source sensor data. The expression is as follows:
[0107]
[0108] Where Dl represents the multi-source sensor data vector; the information entropy value of each sensor data is calculated, which is obtained by statistically analyzing the histogram of numerical distributions and calculating the uncertainty of the probability distribution; the evidence weight coefficient is calculated based on the information entropy value of each sensor data, and the evidence weight coefficient is negatively correlated with the information entropy value. The formula for calculating the evidence weight coefficient is as follows:
[0109]
[0110] in, H(e) represents the weight coefficient (0,1) of the j-th piece of evidence, i.e., the reliability of this evidence (sensor data). The larger the value, the more reliable the evidence. jl ) indicates evidence e jl The information entropy is calculated as follows: p m This represents the probability value (the probability that the sensor value falls within the m-th histogram interval), and it is calculated as follows: L * Represents the total length of the sequence, count(v) m ∈bin m H represents the number of data points falling within that interval. max The maximum information entropy is represented by H. max =lnM, where M represents the number of bins in the histogram (M=10), that is, dividing the continuous range of sensor values into 10 discrete intervals (bins), and then counting the frequency of the value falling into each interval, H(e kl ) indicates evidence e kl The information entropy; generating the basic probability assignment function, which is calculated by multiplying the evidence weight coefficient and the exponential decay function. The input of the exponential decay function is the Euclidean distance between the sensor data and the reference values of each proposition. The formula for generating the basic probability assignment function is:
[0111]
[0112] Where, ψ jl (A ol ) represents the basic probability assignment function, which is the degree to which the jl-th piece of evidence (sensor data) supports the ol-th proposition, and its value ranges from [0,1]. A represents the proposition. ol Let A1 represent the normal state, A2 represent the warning state, and A3 represent the dangerous state. Let μ represent the weight coefficient of the kl-th piece of evidence. ol Proposition A ol The reference values (center point of normal / warning / dangerous states, μ1 represents the ideal value of the normal state, μ2 represents the boundary value of the warning state, and μ3 represents the critical value of the danger state) are given. γo represents the decay coefficient, which controls the decay rate of the exponential function and is set to 0.5. Weighted evidence synthesis calculations are performed on the basic probability allocation function. This calculation includes multiplying the basic probability allocation values of each piece of evidence supporting the same proposition, and then multiplying the basic probability allocation values of each piece of evidence not supporting the proposition after performing a complement operation. Finally, the two multiplication results are multiplied together. The weighted evidence synthesis formula is:
[0113]
[0114] Where Bel(A) represents the confidence function, the overall level of trust in proposition A, i.e., the combined strength of all evidence supporting proposition A, with a value between 0 and 1; Ie represents the set of evidence indices (representing all possible combinations of evidence involved in the synthesis); and De represents the set of all evidence. ψ represents the weight of the j-th or ol-th piece of evidence, a coefficient between 0 and 1, reflecting the reliability or importance of that evidence. A higher weight indicates a greater contribution of that evidence to the synthesis. jl (A),ψ ol (A) represents the basic probability assignment value of the j-th or ol-th piece of evidence for proposition A (the degree to which the evidence itself supports proposition A); calculate the reliability function value and likelihood function value for each proposition. The reliability function value is the sum of the combined results of all evidence supporting the proposition, and the likelihood function value is 1 minus the sum of the combined results of all evidence opposing the proposition. The formula for calculating the reliability interval is:
[0115]
[0116] Where Pl(A) represents the likelihood function (the degree of reasonable doubt about proposition A, i.e., the sum of probabilities of all evidence that does not contradict A), with a range of [0,1]. The larger the value, the higher the probability that proposition A is true. [Bel(A),Pl(A)] represents the confidence interval, which describes the range of uncertainty in the cognition of proposition A. The narrower the interval, the more consistent the evidence and the higher the certainty; the wider the interval, the greater the conflict and the higher the uncertainty. Bl represents the set of propositions that conflict with proposition A.
[0117] The specific operations for generating control commands and forming closed-loop control are as follows:
[0118] Control commands are generated based on the comparison between the reliability function value and a preset threshold. A normal operation command is generated when the reliability function value of the normal state proposition is greater than 0.8; a dosage adjustment command is generated when the reliability function value of the warning state proposition is greater than 0.6; and an emergency shutdown command is generated when the reliability function value of the dangerous state proposition is greater than 0.7. The expression is:
[0119]
[0120] Where C represents the control command; the control command C is sent to the execution device S. dev The actuators include a dosing pump and a valve controller; status feedback data Fl is collected from the actuators, including flow rate readings, pressure readings, and execution status codes; the status feedback data is combined with the data acquisition timestamp and the device identifier to form a feedback data packet, the expression of which is:
[0121] F sync = <Fl,t stamp Device ID>;
[0122] Among them, F sync t represents the feedback data packet after synchronization. stamp The data acquisition timestamp indicates the time when the data packet was generated or acquired, which is used for subsequent data synchronization and timing alignment. The device ID represents the unique identifier of the execution device, used to distinguish multiple different execution devices. The feedback data packet is sent back to the data synchronization module to complete the closed-loop control.
[0123] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0124] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0125] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0128] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0129] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A water quality control system for aquaculture based on multi-source sensor fusion, characterized in that, Specifically, it includes: The system comprises a data synchronization module, a latency compensation module, a transmission scheduling module, and a fusion decision module. The data synchronization module is used to receive asynchronous data streams from dissolved oxygen, pH, and ammonia nitrogen concentration sensors. It aligns the multi-source time series by calling the dynamic time warping algorithm, and performs short-term state prediction and noise reduction on the aligned multi-sensor data series by combining the Kalman filter algorithm, and outputs a multi-parameter fusion data stream under a unified time base. The delay compensation module is used to receive the multi-parameter fusion data stream output by the data synchronization module, and perform real-time inference through a local prediction model deployed on the edge node to compensate for the data delay caused by network transmission. The local prediction model is trained and updated in a distributed manner through a federated learning framework, and outputs real-time water quality status data after delay compensation. The transmission scheduling module is used to receive the real-time water quality status data output by the delay compensation module, dynamically adjust the discontinuous reception period of the NB-IoT communication unit by calculating its priority score and comparing it with a preset threshold, insert a mark for high-priority data packets, and output the final water quality data packet transmitted by priority scheduling. The fusion decision module is used to receive the final water quality data packet output by the transmission scheduling module after priority scheduling, fuse multi-source sensor data by using DS evidence theory, generate control instructions and send them to the execution device, and at the same time collect the status feedback data of the execution device and send it back to the data synchronization module to form a closed-loop control.
2. The aquaculture water quality control system based on multi-source sensor fusion according to claim 1, characterized in that: In the data synchronization module, the specific operation of aligning multi-source time series by calling the dynamic time warping algorithm is as follows: The system receives raw asynchronous data streams from dissolved oxygen, pH, and ammonia nitrogen concentration sensors. Each data record contains a sensor value and a local timestamp. The local timestamps of each sensor are uniformly converted to the system's absolute time reference. The conversion process incorporates sensor clock calibration offset and network transmission delay smoothing factors for compensation. Based on the converted timestamps, data buffer sequences for each sensor are constructed. The dissolved oxygen sensor buffer sequence contains the latest sample values and their absolute timestamps, as do the pH and ammonia nitrogen sensor buffer sequences. The information entropy value of each buffer sequence is calculated by statistically analyzing the numerical distribution histogram and calculating the uncertainty of the probability distribution. Entropy weight coefficients are calculated based on the information entropy values of each buffer sequence. These entropy weight coefficients are negatively correlated with the information entropy values. A weighted cost matrix is constructed, where each element is a weighted sum of the absolute differences between each sensor value and a reference value, with the weight being the corresponding entropy weight coefficient. The optimal path of the weighted cost matrix is solved. The optimal path satisfies the condition of minimizing cumulative cost and having path curvature constrained by a penalty coefficient. A time-aligned multi-sensor data sequence is generated based on the optimal path index.
3. The aquaculture water quality control system based on multi-source sensor fusion according to claim 2, characterized in that: The specific operations for short-term state prediction and denoising are as follows: The time-aligned multi-sensor data sequence is input into a multi-parameter joint Kalman filter. The state vector is defined to include dissolved oxygen, pH, ammonia nitrogen concentration and their first derivatives. The state transition matrix is designed, which includes the time interval parameter and a diagonal matrix of attenuation coefficients for each parameter. The attenuation coefficients characterize the inertial characteristics of each parameter as it changes over time. Design the observation matrix and specify the correspondence between the observable state components and the sensor values; Configure the process noise covariance matrix and the observation noise covariance matrix. The observation noise covariance is inversely proportional to the entropy weighting coefficient. The Kalman filter recursive calculation is performed, which includes state prediction, error covariance prediction, Kalman gain calculation, state correction, and error covariance update. The output is a multi-parameter fused data stream under a unified time base. This multi-parameter fused data stream contains a filtered state vector sequence, which consists of dissolved oxygen values, pH values, ammonia nitrogen concentration values, and their respective rates of change.
4. The aquaculture water quality control system based on multi-source sensor fusion according to claim 3, characterized in that: In the delay compensation module, the specific operation of real-time inference using a local prediction model deployed on edge nodes is as follows: The system receives a multi-parameter fused data stream from the data synchronization module, extracts the arrival timestamps and generation timestamps of data packets at the edge nodes, calculates the network transmission delay (the difference between the arrival and generation timestamps minus the fixed processing delay at the edge nodes), and constructs a delay buffer sequence based on the calculated network transmission delay and the state vector estimate output by the data synchronization module. This delay buffer sequence consists of state vector estimates paired with corresponding network transmission delays. The prediction step size is determined based on the calculated network transmission delay, which is the network transmission delay divided by the system sampling interval and rounded up. The multi-parameter fused data stream is organized into a historical data sequence according to a time window, with a fixed length of ten sampling points. The historical data sequence is input into a spatiotemporal convolutional gating network, which simultaneously performs a one-dimensional convolution operation in the time dimension and a graph convolution operation in the spatial dimension. The temporal convolution operation extracts the temporal variation features in the data stream, while the graph convolution operation models the coupling relationships between different water quality parameters. The temporal and spatial features are dynamically fused using learnable gating vectors to generate a fused feature representation. Based on the fusion feature representation, the predicted water quality status at future prediction step times is calculated through a fully connected layer, and the real-time water quality status data with delay compensation is output.
5. The aquaculture water quality control system based on multi-source sensor fusion according to claim 4, characterized in that: The specific steps for distributed training and updating in the federated learning framework include: Each edge node trains a spatiotemporal convolutional gating network using locally stored historical water quality data. The training objective is to minimize the Euclidean distance between the predicted and actual values, while constraining the Frobenius norm of the model parameters. The local training loss value for each edge node is calculated; this loss is the sum of the prediction error and the regularization term. Node aggregation weights are calculated based on these local training loss values. These weights are negatively correlated with the loss values and are normalized using an exponential function. The central server collects the model parameters and aggregation weights from each edge node, aggregates the model parameters using a weighted average algorithm, and generates a new generation of global model parameters. These global model parameters are then distributed to each edge node to replace the original parameters, completing the model update.
6. The aquaculture water quality control system based on multi-source sensor fusion according to claim 5, characterized in that: In the transmission scheduling module, the specific steps for calculating the priority score and comparing it with a preset threshold are as follows: Receive real-time water quality status data output by the delay compensation module; calculate the anomaly degree of water quality parameters. The anomaly degree calculation is performed independently for each parameter. The absolute value of the difference between the current value of the parameter and the preset safety threshold is divided by the range of the parameter, multiplied by the risk weight coefficient corresponding to the parameter, and finally the weighted anomaly degree of all parameters is added together. The sensitivity to change trends is calculated as the hyperbolic tangent function output of the product of the L2 norm of the rate of change vector and the prediction time scale. Calculate the comprehensive priority score, which is the result of a linear combination of the anomaly weighting coefficient and the sensitivity weighting coefficient compressed by an S-shaped function. The anomaly weighting coefficient is 1.2 and the sensitivity weighting coefficient is 0.
8. Output the priority score value in the range of 0 to 1. Compare the calculated priority score value with the high priority threshold to determine whether the data packet needs to be marked as high priority.
7. The aquaculture water quality control system based on multi-source sensor fusion according to claim 6, characterized in that: The specific operation of dynamically adjusting the discontinuous reception period of the NB-IoT communication unit is as follows: A virtual queue is constructed, and the queue is updated by adding the previous queue length to the current priority score and subtracting the target throughput threshold, with the result being a non-negative value. The Lyapunov drift plus penalty term is calculated, where the drift term is the expected change of the square of the queue length, and the penalty term is the product of the expected communication energy consumption and the energy consumption control parameter. The optimal discontinuous reception period is solved by finding the period value that minimizes the Lyapunov drift plus penalty term within the range of the minimum and maximum periods specified in the standard, and the calculated optimal period is configured in the narrowband IoT communication unit.
8. The aquaculture water quality control system based on multi-source sensor fusion according to claim 7, characterized in that: The specific steps for inserting tags into high-priority data packets and outputting the final water quality data are as follows: A flag bit is generated based on the comparison result between the priority score value and the high priority threshold. When the priority score value is greater than the high priority threshold, the flag bit is set to high priority; otherwise, it is set to normal priority. The final transmission data packet is constructed, which includes the flag bit, real-time water quality status data, data packet generation timestamp, and optimal discontinuous reception period value. The final transmission data packet is then output to the narrowband IoT communication unit for transmission.
9. The aquaculture water quality control system based on multi-source sensor fusion according to claim 8, characterized in that: The specific steps for fusing multi-source sensor data using DS evidence theory in the fusion decision module include: The system receives the final water quality data packet output by the transmission scheduling module and extracts dissolved oxygen concentration, pH, and ammonia nitrogen concentration values from it as multi-source sensor data. It calculates the information entropy value of each sensor data point, obtained by statistically analyzing the histogram of numerical distributions and calculating the uncertainty of the probability distribution. It calculates the evidence weight coefficient based on the information entropy value of each sensor data point; the evidence weight coefficient is negatively correlated with the information entropy value. It generates a basic probability allocation function, calculated by multiplying the evidence weight coefficient by an exponential decay function, where the input to the exponential decay function is the Euclidean distance between the sensor data and the reference values of each proposition. It performs a weighted evidence synthesis calculation on the basic probability allocation function, which includes multiplying the basic probability allocation values supporting the same proposition by each piece of evidence, and multiplying the basic probability allocation values that do not support the proposition by the complement of each piece of evidence. Finally, it multiplies the two results together. It calculates the confidence function and likelihood function values for each proposition; the confidence function value is the sum of all synthesized evidence supporting the proposition, and the likelihood function value is one minus the sum of all synthesized evidence opposing the proposition.
10. The aquaculture water quality control system based on multi-source sensor fusion according to claim 9, characterized in that: The specific operation of generating control commands and forming closed-loop control is as follows: Control commands are generated based on the comparison between the reliability function value and a preset threshold. A normal operation command is generated when the reliability function value of the normal state proposition is greater than 0.8; a dosage adjustment command is generated when the reliability function value of the warning state proposition is greater than 0.6; and an emergency shutdown command is generated when the reliability function value of the dangerous state proposition is greater than 0.
7. The control commands are then sent to the execution equipment, which includes a dosing pump and a valve controller. Status feedback data from the execution equipment is collected, including flow rate readings, pressure readings, and execution status codes. Combine the status feedback data with the data acquisition timestamp and device identifier to form a feedback data packet; The feedback data packet is sent back to the data synchronization module to complete the closed-loop control.