Pond dissolved oxygen prediction method and system based on SINDy physical constraint
Patent Information
- Application Number
- CN202611086776.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]然而,现有技术存在以下明显缺陷:一是感知维度单一,局部代表性差
本发明提供了一种基于SINDy物理约束的池塘溶解氧预测方法及系统,通过将鱼类行为特征与水质、气象数据进行时空对齐并联合建模,突破了现有技术仅依赖单点理化传感器进行溶解氧预测的局限,使模型能够同步捕获水体环境变化和鱼类的生物响应反馈,在溶解氧胁迫发生前获取前瞻性的行为预兆信息,从而有效克服了感知维度单一、局部代表性差的问题,显著提升了预测的全面性、及时性和准确度。在此基础上,利用稀疏动力学辨识方法从历史数据中建立描述溶解氧浓度变化规律的动力学方程,并将该方程转化为物理约束嵌入预测模型的训练过程,使网络在拟合数据分布的同时,强制遵守溶解氧消耗、复氧等客观物理生化规律。该物理约束在突发天气、剧烈温变或异常工况等非平稳场景下能够起到机理兜底作用,有效抑制预测结果的剧烈波动和物理失实,大幅增强模型的泛化能力和鲁棒性,并赋予预测结果更强的物理可解释性。通过多模态生物行为感知与稀疏动力学物理约束的深度融合,本发明实现了复杂养殖环境下溶解氧动态的高精度、高稳定性预测,为池塘增氧调控提供了更加可靠的决策依据。
Smart Images

Figure CN122930281A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, specifically to a method and system for predicting dissolved oxygen in ponds based on SINDy physical constraints. Background Technology
[0002] With the intensive development of aquaculture, dissolved oxygen is a key indicator for measuring the aquatic environment and fish health. Current dissolved oxygen monitoring and prediction mainly rely on single-point water quality sensors, combined with conventional data-driven models to perform black-box fitting predictions of historical sequences.
[0003] However, existing technologies have the following significant drawbacks: First, they suffer from limited sensing dimensions and poor local representativeness. Single-point sensors are susceptible to local water body variations, equipment drift, and probe contamination. Furthermore, existing methods neglect the biological feedback of fish as the primary agents directly responding to changes in the aquatic environment (such as stress behaviors like surfacing during hypoxia). Second, they lack physical and dynamic constraints, resulting in weak generalization ability. Conventional data-driven models rely solely on the correlation between input and output data, completely detached from the objective physical and biochemical laws governing the dynamic changes in dissolved oxygen. When faced with non-stationary scenarios such as sudden weather events, drastic temperature changes, or abnormal operating conditions, the lack of underlying mechanistic constraints makes the models prone to wildly inaccurate predictions, large fluctuations, and insufficient interpretability, making them unreliable as a basis for actual oxygenation regulation.
[0004] Therefore, existing technologies suffer from poor robustness and low accuracy in pond aquaculture dissolved oxygen prediction under complex and variable environments due to their limited perception dimensions and failure to integrate biological response feedback from fish behavior. At the same time, conventional prediction models are limited by pure data-driven black-box fitting and lack physical and dynamic constraints on water quality evolution. Summary of the Invention
[0005] To address the aforementioned technical problems, the present invention aims to provide a pond dissolved oxygen prediction method and system based on SINDy physical constraints. The specific technical solution adopted is as follows: One embodiment of the present invention provides a method for predicting dissolved oxygen in ponds based on SINDy physical constraints, the method comprising the following steps: The historical and current multimodal feature vectors of aquaculture ponds are obtained, and the multimodal feature vectors are composed of water quality data, meteorological data, and biological behavior feature data. Based on the water quality data and meteorological data in the historical multimodal feature vector, an explicit kinetic equation describing the variation law of dissolved oxygen concentration is established using the sparse kinetic identification method. A prediction model is constructed, and the prediction model is trained using the historical multimodal feature vectors and the physical constraints determined by the explicit dynamic equations to obtain a trained prediction model. The current multimodal feature vector is input into the trained prediction model to obtain the dissolved oxygen prediction values for multiple consecutive future time periods.
[0006] Furthermore, the water quality data includes at least: dissolved oxygen concentration, water temperature, pH value, oxidation-reduction potential, and turbidity; the meteorological data includes at least: air temperature, wind speed, air pressure, light intensity, and rainfall. Acquiring the biological behavioral characteristic data includes: Target identification is performed on the collected pond video data to count the number of fish in the preset water area; Calculate the proportion of the number of fish to the total number of detected fish, and when the total number of fish is zero, directly assign the proportion to zero; Using the sampling period of the water quality data and meteorological data as a time reference, the average value of the quantity ratio within the same period is calculated and downsampled to obtain time-aligned biological behavior characteristic data.
[0007] Furthermore, based on the water quality data and meteorological data in the historical multimodal feature vectors, an explicit kinetic equation describing the variation law of dissolved oxygen concentration is established using a sparse kinetic identification method, including: The dissolved oxygen concentration data in the historical multimodal feature vector is smoothed to obtain the dissolved oxygen concentration change rate. The water quality data and the meteorological data are extracted to form an original state vector. The original state vector is then standardized using a fixed mean and standard deviation to obtain a standardized state vector. A candidate function library is constructed based on the standardized state vector, and the candidate function library includes at least constant terms, polynomial terms, and variable interaction terms. The sparse regression method is used to screen the candidate function library for effective terms with the rate of change of dissolved oxygen concentration as the target, and the explicit kinetic equation is obtained.
[0008] Furthermore, the expression for the explicit dynamic equation is: In the formula, The value represents the rate of change of dissolved oxygen concentration, and x represents the original state vector. Indicates candidate function libraries, Represents the standardized state vector. The coefficients represent the fixed explicit dynamic equations.
[0009] Furthermore, the prediction model is a prediction model with time series modeling capabilities.
[0010] Furthermore, the training process of the prediction model includes: The network parameters of the prediction model are updated with the improved total loss function until the preset convergence condition is met, and the trained prediction model is obtained. The improved total loss function is calculated using the following formula: In the formula, L represents the total loss function value. Indicates data loss items, This represents the physical loss weighting coefficient. Represents the physical residual loss term; The data loss term is obtained by calculating the mean square error between the dissolved oxygen prediction sequence and the dissolved oxygen observation sequence corresponding to the same training sample. The physical loss weight coefficient is a hyperparameter that measures the importance of the SINDy physical residual term. The physical residual loss term is determined by the network prediction change rate and the model estimation change rate at the same prediction time during a single training session.
[0011] Furthermore, the process of determining the physical residual loss term includes: Within the future prediction time window during a single training session, the network prediction change rate at each prediction time is calculated based on the dissolved oxygen training prediction value and time step interval between adjacent prediction times. The water quality data and meteorological data corresponding to the same prediction time are combined with the dissolved oxygen training prediction value to generate prediction state data. The prediction state data is then standardized using a fixed mean and standard deviation to obtain a standardized prediction state vector for each prediction time. The standardized predicted state vector is input into the explicit dynamic equation with fixed coefficients, and the model estimated rate of change at each prediction time is output. The mean square error between the network-predicted rate of change and the model-estimated rate of change at all prediction times is calculated and used as the physical residual loss term.
[0012] Furthermore, the formula for calculating the physical residual loss term is as follows: In the formula, This represents the physical residual at the k-th prediction time. and These represent the dissolved oxygen training prediction values at adjacent prediction times. Indicates the time step interval. This represents the standardized prediction state vector corresponding to the k-th prediction time. The explicit dynamic equations representing fixed coefficients. This represents the rate of change of the network prediction at the k-th prediction time. This represents the model estimate rate of change at the k-th prediction time; K represents the total number of prediction times within the future prediction time window.
[0013] Another embodiment of the present invention provides a pond dissolved oxygen prediction system based on SINDy physical constraints, including a processor and a memory, wherein the processor is used to process instructions stored in the memory to implement a pond dissolved oxygen prediction method based on SINDy physical constraints as described above.
[0014] The present invention has the following beneficial effects: This invention provides a pond dissolved oxygen prediction method and system based on SINDy physical constraints. By spatiotemporally aligning and jointly modeling fish behavioral characteristics with water quality and meteorological data, it overcomes the limitations of existing technologies that rely solely on single-point physicochemical sensors for dissolved oxygen prediction. The model can simultaneously capture changes in the aquatic environment and the biological responses of fish, acquiring forward-looking behavioral warning information before dissolved oxygen stress occurs. This effectively overcomes the problems of single perception dimension and poor local representativeness, significantly improving the comprehensiveness, timeliness, and accuracy of prediction. Based on this, a sparse dynamics identification method is used to establish a dynamic equation describing the pattern of dissolved oxygen concentration changes from historical data. This equation is then transformed into physical constraints and embedded into the training process of the prediction model. This allows the network to adhere to objective physical and biochemical laws such as dissolved oxygen consumption and reoxygenation while fitting the data distribution. This physical constraint plays a mechanistic fallback role in non-stationary scenarios such as sudden weather, drastic temperature changes, or abnormal operating conditions, effectively suppressing drastic fluctuations and physical inaccuracies in prediction results, significantly enhancing the model's generalization ability and robustness, and giving the prediction results stronger physical interpretability. By deeply integrating multimodal biological behavior perception with sparse dynamic physical constraints, this invention achieves high-precision and high-stability prediction of dissolved oxygen dynamics in complex aquaculture environments, providing a more reliable decision-making basis for pond oxygenation regulation. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a pond dissolved oxygen prediction method based on SINDy physical constraints, as an embodiment of the present invention. Detailed Implementation
[0017] The application scenarios targeted by this invention can include, but are not limited to, the following scenarios: Early warning scenario for high-density intensive aquaculture: In response to the situation that high-density aquaculture ponds consume oxygen quickly and are prone to sudden oxygen deficiency, this invention uses the dissolved oxygen prediction values for multiple consecutive future moments to detect the trend of declining dissolved oxygen in advance, providing early warning information for aquaculture management and preventing fish from surfacing or dying due to lack of oxygen.
[0018] Intelligent feedforward and energy-saving control scenario for aeration equipment: Based on the predicted future dissolved oxygen change trajectory of this invention, the pond aeration equipment is controlled in a coordinated manner. The aeration equipment is started in advance before the predicted dissolved oxygen concentration reaches the safe lower limit, and the equipment is stopped when the predicted dissolved oxygen is sufficient, realizing on-demand start-up and shutdown of the aeration equipment and energy saving.
[0019] Water quality monitoring scenarios under complex meteorological conditions: When facing complex environmental conditions such as rainfall, low air pressure or drastic temperature changes, the explicit dynamic physical constraints introduced in this invention can ensure the robustness of the model under non-stationary environmental inputs and output reliable dissolved oxygen change results to guide the adjustment of feeding amount and water quality management under extreme weather conditions.
[0020] To achieve high-precision and high-stability prediction of dissolved oxygen dynamics in complex aquaculture environments, one embodiment of the present invention provides a pond dissolved oxygen prediction method based on SINDy physical constraints, such as... Figure 1 As shown, it includes the following steps: S1, obtain the historical multimodal feature vector and the current multimodal feature vector of the aquaculture pond. The multimodal feature vector is composed of water quality data, meteorological data and biological behavior feature data.
[0021] Here, the multimodal feature vector includes both historical and current multimodal feature vectors.
[0022] In real pond aquaculture environments, dissolved oxygen changes are driven by both water quality and biochemical conditions, as well as external meteorological conditions. Meanwhile, fish, as the primary agents responding directly to changes in the aquatic environment, exhibit significant stress behaviors (such as large-scale surfacing and surfacing for air) when faced with hypoxia stress. Therefore, fusing objective environmental data acquired by sensors with biological behavioral data extracted from monitoring videos allows for a more comprehensive and accurate understanding of the pond's true condition.
[0023] First, acquire water quality and meteorological data. Deploy water quality sensors and weather stations at the aquaculture pond site. Continuously collect water quality and meteorological data according to a set sampling cycle (e.g., every 10 minutes). The water quality data includes at least: dissolved oxygen concentration, water temperature, pH value, oxidation-reduction potential, and turbidity; the meteorological data includes at least: air temperature, wind speed, air pressure, light intensity, and rainfall.
[0024] After obtaining water quality and meteorological data, to ensure their accuracy, preprocessing can be performed on the collected data, including outlier detection, missing value imputation, noise smoothing, and standardization. The water quality and meteorological data in the subsequent multimodal feature vectors can be the preprocessed data. The implementation processes of each data preprocessing method are existing technologies and are not within the scope of this invention; therefore, they will not be described in detail here.
[0025] Secondly, biological behavioral characteristic data is acquired. This data refers to extracting behavioral features that reflect the spatial distribution and activity status of fish. Real-time video data of the pond is acquired using cameras mounted above or to the side of the pond. Since fish tend to gather in the upper water layers when oxygen is scarce, this step employs methods such as target detection, target tracking, image segmentation, or optical flow analysis to identify targets frame-by-frame in the acquired video data, counting the number of fish in a preset water area (such as the upper water surface area). Subsequently, the proportion of fish in the preset water area to the total number of fish detected in the image is calculated. To ensure system robustness, when encountering nighttime conditions, extremely turbid water, or blind spots that result in zero total fish detected, the proportion is directly set to zero, effectively avoiding computational crashes caused by a zero denominator.
[0026] As an example, assuming the total number of fish is not zero, taking the upper water surface area as an example, the formula for calculating the proportion of fish that rise to the surface can be: In the formula, This indicates the proportion of fish that have surfaced. This indicates the number of fish in the upper layer of the water. This indicates the total number of fish detected in the image.
[0027] In some optional embodiments, to more precisely characterize the dynamic response of fish to changes in the aquatic environment, in addition to the aforementioned proportions, one or more of the following biological behavioral characteristics can be further calculated as supplementary measures: the proportion of fish surfacing is calculated using time-difference to obtain the rate of change of the surfacing proportion; the proportion of fish in a preset lower water area is calculated using time-difference to obtain the rate of change of the sinking proportion; the fish school aggregation is measured by the reciprocal of the average distance between the center points of the fish school target frames, or the fish school dispersion is measured by the variance of the fish school target distribution; the average movement speed of the fish school is calculated based on the displacement of the center points of the fish school target frames between adjacent frames; and the activity intensity of the fish school is measured based on the variance of the fish school movement speed or the rate of change of the fish school target frame area.
[0028] Finally, the temporal alignment and vector construction of multimodal features are addressed. Since the frequency of feature extraction from video frames (typically on the order of seconds) is much higher than the frequency of sensor data collection of water quality and meteorological data (typically on the order of minutes), direct splicing would lead to temporal misalignment. Therefore, using the sampling periods of the water quality and meteorological data as a time reference, the average of the proportions extracted within the same period is calculated for downsampling. This downsampling operation yields time-step aligned biological behavioral feature data.
[0029] Time-aligned water quality data, meteorological data, and biological behavior data are concatenated to construct a multimodal feature vector. Based on the time period, this vector is divided into historical multimodal feature vectors for subsequent joint model training and current multimodal feature vectors for actual prediction and inference.
[0030] In this embodiment, the historical multimodal feature vector is the model training input data, and the corresponding supervision label is the dissolved oxygen prediction value at each prediction time within the future prediction time window. For ease of distinction, this is referred to as the dissolved oxygen training prediction value. The number of training samples can be set by the implementer according to the actual situation, such as setting it to 500.
[0031] In this embodiment, a sliding window is used to extract and construct sample data for a single training iteration. Assume there are 500 historical multimodal feature vectors arranged chronologically, with the historical time window length set to L (e.g., L=36) and the future prediction time window to h (e.g., h=6). For example, for the first training sample: the 1st to 36th historical multimodal feature vectors are taken as the network input sequence, and the observed dissolved oxygen concentration from the 37th to 42nd historical multimodal feature vectors is taken as the comparison label; simultaneously, the water quality data and meteorological data dimensions corresponding to this time window (times 37 to 42) are extracted and retained for subsequent calculation of the physical residual.
[0032] S2. Based on the water quality data and meteorological data in the historical multimodal feature vector, an explicit kinetic equation describing the variation law of dissolved oxygen concentration is established using the sparse kinetic identification method.
[0033] Traditional data-driven prediction models often lack constraints on the mechanisms of dissolved oxygen (DO) evolution, leading to fluctuations in prediction results. To address this issue, this step introduces the SINDy (Sparse Nonlinear Kinetic Identification) method. This method, without relying on prior mechanistic equations, extracts dominant features from water quality and meteorological data and constructs a candidate function library. It then uses sparse regression to automatically select ordinary differential equations describing the dynamic changes in DO concentration over time. The resulting explicit kinetic equation accurately reflects the physical and biochemical laws governing DO changes, providing reliable physical constraints for subsequent prediction model training. It should be noted that biological behavioral characteristic data, used as a response representation, is not involved in the establishment of this explicit kinetic equation.
[0034] As an exemplary implementation, step S2 above can be achieved through the following steps: S21, smooth the dissolved oxygen concentration data in the historical multimodal feature vector to obtain the dissolved oxygen concentration change rate.
[0035] As an example, for the t-th historical moment, the rate of change of dissolved oxygen concentration is estimated using the difference method, and the calculation formula is as follows: In the formula, This represents the rate of change in dissolved oxygen concentration. This represents the dissolved oxygen concentration at the (t+1)th historical moment. This represents the dissolved oxygen concentration at the t-th historical moment. Indicates the time step interval.
[0036] In another example, to reduce the impact of sensor noise on derivative estimation, the Savitzky-Golay method is used to perform smoothing derivative calculation on the dissolved oxygen concentration time series composed of multiple historical moments, and the smoothed first derivative sequence output by the calculation is directly used as the rate of change of dissolved oxygen concentration.
[0037] S22, extract the water quality data and the meteorological data to form an original state vector, and use a fixed mean and standard deviation to standardize the original state vector to obtain a standardized state vector.
[0038] As an example, the formula for calculating the standardized state vector can be: In the formula, This represents the standardized state vector at the t-th historical moment. Let represent the original state vector at the t-th historical moment. This represents the mean of all original state vectors in the training data. It represents the standard deviation of all original state vectors in the training data.
[0039] For core water quality meteorological variables such as dissolved oxygen, water temperature, and light intensity, in long-term training samples (such as several days or months), there are dynamic fluctuations due to the alternation of day and night, and the standard deviation objectively does not equal zero.
[0040] S23, Construct a candidate function library based on the standardized state vector.
[0041] Here, candidate function libraries It includes at least constant terms, polynomial terms, and variable cross terms.
[0042] For example, when the standardized state vector includes dissolved oxygen, water temperature, pH value, air temperature, wind speed, and light intensity, the candidate function library can include: Where C represents dissolved oxygen, Indicates water temperature. Indicates pH value, Indicates temperature, Indicates wind speed. Indicates light intensity.
[0043] S24. Using the sparse regression method, the candidate function library is screened for effective terms with the dissolved oxygen concentration change rate as the target, to obtain the explicit kinetic equation.
[0044] By using sequential threshold least squares, LASSO regression, or other sparse regression methods, effective terms that make the main contribution to the dissolved oxygen change rate are screened from the candidate function library, resulting in the SINDy sparse explicit kinetic equation. The expression of the explicit kinetic equation is as follows: In the formula, The value represents the rate of change of dissolved oxygen concentration, and x represents the original state vector. Indicates candidate function libraries, Represents the standardized state vector. The coefficients represent the fixed explicit dynamic equations.
[0045] The SINDy sparse explicit dynamic equations are objective physical and biochemical evolution laws independently identified based on historical pond observation data. If these parameters are allowed to continue updating during subsequent predictive model training, the dynamic equations will be assimilated by the gradients from the backpropagation of the predictive model, thus losing their original purpose of providing independent mechanistic constraints. Therefore, after completing the SINDy model identification, the candidate function library structure and coefficients of the SINDy sparse explicit dynamic equations are... The mean and standard deviation *k* used for standardization are fixed and will not be updated during subsequent training of the prediction model. Therefore, the SINDy model can be used as a freezing kinetics model to provide physical residual constraints for the rate of change of dissolved oxygen.
[0046] S3. Construct a prediction model by training the prediction model using the historical multimodal feature vectors and the physical constraints determined by the explicit dynamic equations to obtain a trained prediction model.
[0047] Here, the prediction model is a prediction model with temporal modeling capabilities, such as Long Short-Term Memory Networks, Gated Recurrent Unit Networks, Backpropagation (BP) prediction models, Transformer Networks, and Temporal Convolutional Networks.
[0048] Preferably, a Long Short-Term Memory (LSTM) network is used. Since the multimodal features have already been aligned across modal time steps and fused into a single state vector before input, the role of the LSTM network is to capture the long-term evolution and temporal cumulative effect of the aligned fused feature sequence within the historical time window through its internal gated memory units, thereby accurately predicting dissolved oxygen concentration with strong nonlinear and time-varying characteristics.
[0049] The network parameters of the prediction model are updated using the improved total loss function until the preset convergence condition is met, thus obtaining the trained prediction model.
[0050] The preset convergence conditions include any one or more combinations of the following: the number of iterations (Epoch) of network training reaches the preset maximum iteration threshold, such as 100 to 300 times; the total loss function value on the validation set fails to decrease significantly in a preset number of iterations (such as 10 to 20 consecutive Epochs), thus triggering the early stopping mechanism; the value of the total loss function is lower than the preset minimum error tolerance (such as 0.001).
[0051] In this embodiment, the improved total loss function mainly consists of a data loss term and a physical residual loss term, and its calculation formula is as follows: In the formula, L represents the total loss function value. Indicates data loss items, This represents the physical loss weighting coefficient. This represents the physical residual loss term.
[0052] It is worth noting that during network training, the parameters of the prediction model are updated through backpropagation, while the parameters of the SINDy model remain frozen and do not change during the training process. Therefore, the prediction model can learn the complex nonlinear relationships of multimodal data while also being constrained by explicit dynamic equations.
[0053] For the data loss term in the total loss function The data loss term is determined by calculating the mean square error between the dissolved oxygen prediction sequence and the dissolved oxygen observation sequence corresponding to the same training sample. This can make the prediction value of the prediction model closer to the actual observation value, and is used to constrain the fitting ability of the prediction model to the actual dissolved oxygen observation data.
[0054] As an example, the formula for calculating the data loss term can be: In the formula, N represents the number of training samples in a single training session. This represents the dissolved oxygen concentration predicted by the prediction model, i.e., the dissolved oxygen training prediction value at the i-th prediction time. This represents the dissolved oxygen concentration label value at the corresponding time, i.e., the dissolved oxygen observation value at the i-th prediction time.
[0055] For the physical loss weighting coefficient in the total loss function , which is a hyperparameter for measuring the importance of the SINDy physical residual term, that is, used to adjust the importance between the data loss term and the physical residual term.
[0056] when When the value is small, the gradient update proportion of the physical residual loss term decreases, indicating that the model focuses more on fitting the observed data in joint optimization; when When the value is large, the relative proportion of the physical residual loss term in the total loss increases, and the model places greater emphasis on the consistency between the predicted trajectory and the dynamic laws of SINDy.
[0057] In the total loss function, the fitting of the actual observed data (i.e., the data error term) is dominant. Therefore, the weight of the physical constraint term should not exceed 1, and is usually kept around 0.1, to ensure that a moderate physical dynamics smoothing constraint is introduced without compromising the network's prediction accuracy. For example, The empirical value is usually set to be between 0.01 and 0.5, with a preferred empirical value of 0.1.
[0058] For the physical residual loss term The rate of change of network prediction and the rate of change of model estimation are determined by the same prediction time during a single training session. This allows the prediction results of the prediction model to conform to the dissolved oxygen kinetic laws identified from water quality data and meteorological data.
[0059] As an exemplary implementation, the process for determining the physical residual loss term includes: S31, within the future prediction time window during a single training session, the network prediction change rate at each prediction time is calculated based on the dissolved oxygen training prediction value and time step interval at adjacent prediction times.
[0060] In this embodiment, for each prediction moment in the future prediction time window, the difference between the dissolved oxygen training prediction value and the current prediction moment is calculated, and then the ratio of the difference between the dissolved oxygen training prediction value and the time step interval between the two prediction moments is used as the network prediction change rate at the prediction moment.
[0061] S32, the water quality data and meteorological data corresponding to the same prediction time are merged with the dissolved oxygen training prediction value to generate prediction state data, and the prediction state data is standardized using the fixed mean and standard deviation to obtain the standardized prediction state vector for each prediction time.
[0062] In this embodiment, the calling conditions of the SINDy dynamic equation require that the data distribution scale be consistent with that at the time of establishment and contain complete environmental feature dimensions. The predicted state data is standardized using a fixed mean and standard deviation, which can complete the alignment of the data scale.
[0063] S33, input the standardized predicted state vector into the explicit dynamic equation with fixed coefficients, and output the model estimated rate of change for each prediction time.
[0064] Here, the model estimates the rate of change to characterize the trend and rate of change of dissolved oxygen concentration under specific physical and biochemical conditions such as water temperature and weather, according to the inherent objective dynamic laws of pond water.
[0065] In this embodiment, the generated standardized predicted state vector is directly substituted into the frozen SINDy model to output the model estimated rate of change, which is used as a reference to calculate the physical residual.
[0066] S34, calculate the mean square error between the network predicted rate of change and the model estimated rate of change for all prediction times, and use it as the physical residual loss term.
[0067] As an example, the formula for calculating the physical residual loss term can be: In the formula, This represents the physical residual at the k-th prediction time. and These represent the dissolved oxygen training prediction values at adjacent prediction times. Indicates the time step interval. This represents the standardized prediction state vector corresponding to the k-th prediction time. Represents the physical residual loss term. The explicit dynamic equations representing fixed coefficients. This represents the rate of change of the network prediction at the k-th prediction time. This represents the model estimate rate of change at the k-th prediction time; K represents the total number of prediction times within the future prediction time window.
[0068] It should be noted that, since the calculation of physical residuals depends on the differential rate of change between adjacent prediction times, a future prediction time window of length K constitutes K-1 time intervals, corresponding to K-1 physical residuals. The dissolved oxygen concentration at the last prediction time is used as the endpoint data and is used in conjunction with the previous time to calculate the physical residual of the K-1 time interval; the physical residual is not calculated separately for it.
[0069] This step constructs a two-layer prediction architecture that integrates physical mechanisms and data-driven approaches by using the SINDy model as a frozen kinetic operator. This architecture can fully exploit the potential features in massive multimodal data by leveraging the powerful nonlinear fitting capabilities of neural networks, and it can also enforce the predicted trajectory to conform to the natural biochemical and thermodynamic evolution of water quality through the explicit kinetic equations of SINDy. This fundamentally prevents the problems of prediction distortion and deviations in traditional pure data-driven models when encountering abnormal conditions, and significantly improves the model's generalization ability and prediction stability in complex aquaculture environments.
[0070] S4, input the current multimodal feature vector into the trained prediction model to obtain the dissolved oxygen prediction values for multiple consecutive future times.
[0071] Here, the input data of the prediction model is the current time series multimodal feature sequence containing the current time and multiple consecutive time steps preceding it, and the length of the sequence is consistent with the length L of the historical time window.
[0072] In this embodiment, after the joint training of the prediction model is completed, the actual inference stage is entered. The current multimodal feature vector, which has been acquired in real time and has been time-aligned, is directly input into the trained prediction model. Through forward calculation of the model, the dissolved oxygen prediction sequence for the next h consecutive time periods is output.
[0073] After obtaining the dissolved oxygen prediction sequence, it is compared with a preset safety threshold for early warning and coordinated control of pond hypoxia risk. The preset safety threshold is set according to the specific farmed fish species; for example, for conventional freshwater pond aquaculture, the reference range for the preset safety threshold is 3.0 to 4.0 mg / L. When the dissolved oxygen concentration in the prediction sequence is lower than the preset safety threshold, the system issues a basic hypoxia risk warning, providing a basis for decision-making regarding the early start / stop of aeration equipment, feeding adjustments, or pond patrol management.
[0074] Furthermore, the system combines fish behavior characteristics from the current multimodal feature vectors to conduct joint risk assessment: when the behavior characteristics show that the increase in the current proportion of fish surfacing compared to the previous sampling period is greater than a preset rise threshold, and the difference in dissolved oxygen concentration at the beginning and end of the predicted sequence is less than a preset negative deviation value, the system automatically raises the risk warning level to assist managers in intervening more accurately in advance to avoid fish hypoxia, surfacing, or death.
[0075] Among them, the preset rise threshold is used to quantify the severity of abnormal fish behavior, and its value is determined based on the normal fluctuation range of the proportion of fish rising to the surface during historical healthy aquaculture cycles; the preset negative deviation value is used to determine whether the downward trend of dissolved oxygen concentration has reached a dangerous level, and its value is determined based on the fitting accuracy of the dissolved oxygen prediction sequence and the dissolved oxygen safety boundary.
[0076] Another embodiment of the present invention provides a pond dissolved oxygen prediction system based on SINDy physical constraints, including a processor and a memory, wherein the processor is used to process instructions stored in the memory to implement a pond dissolved oxygen prediction method based on SINDy physical constraints.
[0077] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A pond dissolved oxygen prediction method based on SINDy physical constraints, characterized in that, Includes the following steps: The historical and current multimodal feature vectors of aquaculture ponds are obtained, and the multimodal feature vectors are composed of water quality data, meteorological data, and biological behavior feature data. Based on the water quality data and meteorological data in the historical multimodal feature vector, an explicit kinetic equation describing the variation law of dissolved oxygen concentration is established using the sparse kinetic identification method. A prediction model is constructed, and the prediction model is trained using the historical multimodal feature vectors and the physical constraints determined by the explicit dynamic equations to obtain a trained prediction model. The current multimodal feature vector is input into the trained prediction model to obtain the dissolved oxygen prediction values for multiple consecutive future time periods.
2. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 1, characterized in that, The water quality data shall include at least: dissolved oxygen concentration, water temperature, pH value, oxidation-reduction potential, and turbidity; the meteorological data shall include at least: air temperature, wind speed, air pressure, light intensity, and rainfall. Acquiring the biological behavioral characteristic data includes: Target identification is performed on the collected pond video data to count the number of fish in the preset water area; Calculate the proportion of the number of fish to the total number of detected fish, and when the total number of fish is zero, directly assign the proportion to zero; Using the sampling period of the water quality data and meteorological data as a time reference, the average value of the quantity ratio within the same period is calculated and downsampled to obtain time-aligned biological behavior characteristic data.
3. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 1, characterized in that, Based on the water quality data and meteorological data in the historical multimodal feature vectors, an explicit kinetic equation describing the variation law of dissolved oxygen concentration is established using a sparse kinetic identification method, including: The dissolved oxygen concentration data in the historical multimodal feature vector is smoothed to obtain the dissolved oxygen concentration change rate. The water quality data and the meteorological data are extracted to form an original state vector. The original state vector is then standardized using a fixed mean and standard deviation to obtain a standardized state vector. A candidate function library is constructed based on the standardized state vector, and the candidate function library includes at least constant terms, polynomial terms, and variable interaction terms. The sparse regression method is used to screen the candidate function library for effective terms with the rate of change of dissolved oxygen concentration as the target, and the explicit kinetic equation is obtained.
4. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 3, characterized in that, The expression for the explicit dynamic equation is: In the formula, The value represents the rate of change of dissolved oxygen concentration, and x represents the original state vector. Indicates candidate function libraries, Represents the standardized state vector. The coefficients represent the fixed explicit dynamic equations.
5. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 1, characterized in that, The prediction model is a prediction model with time series modeling capabilities.
6. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 4, characterized in that, The training process of the prediction model includes: The network parameters of the prediction model are updated with the improved total loss function until the preset convergence condition is met, and the trained prediction model is obtained. The improved total loss function is calculated using the following formula: In the formula, L represents the total loss function value. Indicates data loss items, This represents the physical loss weighting coefficient. Represents the physical residual loss term; The data loss term is obtained by calculating the mean square error between the dissolved oxygen prediction sequence and the dissolved oxygen observation sequence corresponding to the same training sample. The physical loss weight coefficient is a hyperparameter that measures the importance of the SINDy physical residual term. The physical residual loss term is determined by the network prediction change rate and the model estimation change rate at the same prediction time during a single training session.
7. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 6, characterized in that, The process of determining the physical residual loss term includes: Within the future prediction time window during a single training session, the network prediction change rate at each prediction time is calculated based on the dissolved oxygen training prediction value and time step interval between adjacent prediction times. The water quality data and meteorological data corresponding to the same prediction time are combined with the dissolved oxygen training prediction value to generate prediction state data. The prediction state data is then standardized using a fixed mean and standard deviation to obtain a standardized prediction state vector for each prediction time. The standardized predicted state vector is input into the explicit dynamic equation with fixed coefficients, and the model estimated rate of change at each prediction time is output. The mean square error between the network-predicted rate of change and the model-estimated rate of change at all prediction times is calculated and used as the physical residual loss term.
8. The pond dissolved oxygen prediction method based on SINDy physical constraints according to claim 7, characterized in that, The formula for calculating the physical residual loss term is as follows: In the formula, This represents the physical residual at the k-th prediction time. and These represent the dissolved oxygen training prediction values at adjacent prediction times. Indicates the time step interval. This represents the standardized prediction state vector corresponding to the k-th prediction time. The explicit dynamic equations representing fixed coefficients. This represents the rate of change of the network prediction at the k-th prediction time. This represents the model estimate rate of change at the k-th prediction time; K represents the total number of prediction times within the future prediction time window.
9. A pond dissolved oxygen prediction system based on SINDy physical constraints, characterized in that, It includes a processor and a memory, the processor being used to process instructions stored in the memory to implement a pond dissolved oxygen prediction method based on SINDy physical constraints as described in any one of claims 1-8.