A water quality prediction system and method based on machine learning

Through the Shenchang differential equation model and trajectory similarity drive optimization mechanism, a lightweight student model was built, which solved the accuracy and deployment problems of the water quality prediction model in multi-source time series data processing, and achieved efficient and rapid water quality prediction results.

CN120338611BActive Publication Date: 2025-09-02SICHUAN ENVIRONMENTAL POLICY RES & PLANNING INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510788484.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-02
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

The existing water quality prediction model is not accurate when processing strong nonlinear, strongly coupled multi-source timing data, the model is bloated and difficult to deploy, and lacks the ability to respond to sudden water quality changes.

Method used

The Shenqifrequency Differential Equation Model is used as the teacher model, combined with the trajectory similarity-driven optimization mechanism and knowledge distillation technology, a lightweight student model is constructed, and structural optimization is carried out through the guidance of behavior consistency between the teacher model and the student model to achieve efficient modeling and lightweight prediction of multi-source water quality time series data.

Benefits of technology

It realizes high-precision and lightweight water quality prediction, has the ability to respond quickly to sudden changes, improves the deployment cost and prediction accuracy of the model, and has good engineering application prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120338611B_ABST
    Figure CN120338611B_ABST
Patent Text Reader

Abstract

The present invention discloses a water quality prediction system and method based on machine learning, comprising a data acquisition and preprocessing module for collecting and preprocessing multi-source monitoring data; a teacher model module for constructing a neural ordinary differential equation model as the teacher model and outputting prediction results for target water quality indicators; a student model module for constructing a lightweight neural network model as the student model and performing structural optimization training; a trajectory evaluation module for calculating the similarity of the prediction trajectories between the teacher model and the student model and optimizing the student model structural parameters; a model inference module for calling the optimized student model to generate prediction results for target water quality indicators; and a result output module for outputting prediction results and providing a display and storage interface. By integrating neural ordinary differential modeling with the trajectory similarity distillation optimization mechanism, the present invention achieves high-precision, lightweight, and sustainable adaptive prediction of water quality time series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of environmental monitoring technology, and in particular to a water quality prediction system and method based on machine learning. Background Art

[0002] Currently, water quality prediction, as a crucial component of water environment monitoring and pollution early warning, has become a key technology in smart water management and ecological governance. Traditional water quality prediction methods rely on static models such as linear regression, gray models, or support vector regression. These methods are significantly inadequate for addressing the nonlinear variations and multivariate coupling relationships in water quality time series data. Furthermore, with the widespread adoption of IoT sensor technology, water quality monitoring data exhibits multi-source heterogeneity and strong time-series dependencies. Traditional models are increasingly unable to meet practical needs in terms of data adaptability, expressiveness, and prediction accuracy.

[0003] In recent years, deep learning techniques have been introduced to the field of water quality prediction. Recurrent neural networks and long-short-term memory (LSTM) models, in particular, have made progress in modeling time-series data. However, these models are parameter-intensive and require long training times, making them unsuitable for deployment on edge devices or in real-time scenarios. Furthermore, most current mainstream methods employ a single model architecture, lacking interpretability and model simplification strategies, making it difficult to strike a balance between prediction accuracy and computational efficiency.

[0004] In terms of model optimization, some research has attempted to transfer the predictive power of complex models to simplified models through knowledge distillation techniques. However, most methods still rely on loss functions, such as mean squared error or cross entropy, and ignore the dynamic consistency of the model's overall predictive behavior. Furthermore, during structural optimization, traditional gradient optimization methods are still used, lacking a behavior-driven parameter control mechanism. For time-series prediction tasks such as water quality indicators, ensuring the simplified model's approximation of dynamic trajectories is a shortcoming of existing methods.

[0005] Therefore, how to provide a water quality prediction system based on machine learning is an urgent problem that needs to be solved by those skilled in the art. Summary of the Invention

[0006] One objective of this invention is to propose a water quality prediction system based on machine learning. This system combines a neural ordinary differential equation model, a trajectory similarity-driven optimization mechanism, and knowledge distillation techniques. It describes in detail how behavioral consistency between teacher and student models can be used to guide efficient modeling and lightweight prediction of multi-source water quality time series data. This method constructs a highly interpretable prediction framework with flexible structural optimization, resulting in high prediction accuracy, a lightweight model structure, low deployment cost, and rapid response to sudden water quality changes.

[0007] A water quality prediction system based on machine learning according to an embodiment of the present invention includes:

[0008] The data acquisition and preprocessing module is used to collect and preprocess multi-source monitoring data from multiple water quality monitoring points, with the target water quality indicators in the multi-source monitoring data as the real label data;

[0009] The teacher model module is used to construct a neural ordinary differential equation model as a teacher model and output the prediction results of the target water quality indicators;

[0010] The student model module is used to build a lightweight neural network model as a student model and perform structural optimization training based on the prediction results and real label data;

[0011] The trajectory evaluation module is used to calculate the similarity of the predicted trajectories of the teacher model and the student model and optimize the structural parameters of the student model;

[0012] The model inference module is used to receive real-time water quality data and call the optimized student model to generate prediction results of target water quality indicators;

[0013] The result output module is used to output the prediction results of the target water quality indicators and provide display and storage interfaces.

[0014] Optionally, modules can be connected using the following methods:

[0015] S1. Collect multi-source monitoring data from multiple water quality monitoring points, use the target water quality indicators as true label data in the multi-source monitoring data, pre-process the multi-source monitoring data, and generate a standardized time series training dataset;

[0016] S2. Based on the time series training dataset, a neural ordinary differential equation model is constructed and trained as a teacher model to output the prediction results of the target water quality indicators at each time point;

[0017] S3. Build a student model, which is a lightweight neural network with a simplified structure, and input the time series training data set into the student model for training;

[0018] S4. The prediction results of the target water quality indicators at each time point are used as soft label inputs. At the same time, real label data is introduced. By constructing an optimization mechanism based on the similarity between the prediction trajectories of the student model and the teacher model in the time dimension, the structural parameters of the student model are dynamically perturbed and updated.

[0019] S5. Put the optimized student model into actual water quality prediction operation, receive the latest collected water quality time series data in real time, and output the prediction results of the target water quality indicators at the corresponding time point;

[0020] S6. Monitor the prediction error of the student model during deployment and operation. When the prediction error exceeds the set threshold, re-execute steps S2 to S4, and perform incremental distillation training on the student model through the teacher model to dynamically improve the student model's ability to adapt to sudden changes in water quality.

[0021] Optionally, the multi-source monitoring data specifically includes joint time series data of water quality indicators and associated water body physical and chemical parameters, meteorological environmental factors and hydrodynamic information.

[0022] Optionally, the preprocessing of multi-source monitoring data specifically includes time synchronization, missing value filling, outlier removal and normalization.

[0023] Optionally, the S2 specifically includes:

[0024] S21. Define each input sequence in the generated standardized time series training dataset as ,in, Indicates the The sample in time steps dimensional input feature vector, is the set of real numbers;

[0025] S22. For each target water quality indicator Construct the corresponding hidden state function ,in Indicates the The prediction variable number is defined as ;

[0026] S23. Introduce the inter-variable coupling mechanism in state evolution and expand it to the evolution form of stage 1 ;

[0027] S24, introduce a multimodal input fusion mechanism to encode images, text or external environment data into potential vectors through feature encoding , used to initialize the state: ,in Indicates that the mth variable at the start time The initial hidden state at time t;

[0028] S25. Based on the evolution form of stage 1, the attention saliency regulation mechanism is introduced to form the final evolution expression ;

[0029] S26. Configure an ODE solver with a dynamic step size and error tolerance adjustment mechanism to adjust the integration granularity according to the degree of input change, achieving fine-grained solution in highly variable sections and low-computation solution in stable sections;

[0030] S27, predict the end time The state vector on Input to the corresponding prediction function , output target prediction value ,in, The mth variable at the end of the prediction time The hidden state vector of is the prediction function parameter;

[0031] S28. Generated attention weights , construct a significant heat map for the entire evolution time interval, and filter out those that meet The time segment of , extracts the corresponding prediction results as candidate soft labels, where, is the attention threshold parameter;

[0032] S29. Combining the predicted change trend with the significance distribution, a representative evolution path is selected for each variable to form a soft label subsequence;

[0033] S210, using the adjoint sensitivity method to calculate the gradient of each parameter in the final teacher model structure, for all evolution function parameter sets , coupling coefficient , attention network parameters and prediction function parameters Joint training is performed to complete the teacher model construction and output the predicted values ​​of the target water quality indicators at each time point as a soft label sequence.

[0034] Optionally, the S3 specifically includes:

[0035] S31. Construct a student model, where the student model is a lightweight neural network with a simplified structure, comprising an input layer, a time series modeling layer, and an output prediction layer, wherein the input layer receives the generated time series training dataset;

[0036] S32. In the time series modeling layer, a gated recurrent unit network structure is used to extract the dynamic representation of the input features at each time step and construct a unified hidden state sequence to represent the state evolution trajectory within each time period;

[0037] S33, setting a shallow fully connected network module with adjustable parameters in the output prediction layer, receiving the final value of the hidden state and outputting the prediction result of each target water quality indicator;

[0038] S34, obtain the predicted value of the teacher model at each time point of the target water quality index as a soft label sequence, and make a one-to-one correspondence with the prediction result of the student model at each time step, and calculate the error residual sequence at consecutive time points, recorded as ,in, represents the forecast indicator number, represents the time step;

[0039] S35. Based on the error residual sequence, construct a learnable residual response weight function , characterizes the student model's sensitivity to the error intensity at different time periods. The weight function serves as one of the state update gating parameters, guiding the time series modeling layer to adopt different learning steps at different time periods. It is constructed based on the prediction error residual of the student model at each time step.

[0040] S36. Introducing a structural distillation gating mechanism to dynamically adjust the state update frequency of the student model according to the residual response weight function, improving the model response accuracy in high residual time periods and automatically suppressing invalid updates in low residual time periods;

[0041] S37, the generated error residual sequence and the residual response weight function The results are output to the teacher model feedback interface to dynamically control the teacher model evolution path;

[0042] S38. According to the structural distillation gating mechanism and the residual response weight function, the parameters of the student model are iteratively updated to gradually enhance the perception of residual information and the adaptability to feedback control input, thereby generating a student model with residual response characteristics and regulatory feedback capabilities.

[0043] Optionally, the S4 specifically includes:

[0044] S41. The prediction results of the target water quality indicators output by the teacher model at each time point are used as soft label inputs to construct the teacher model prediction trajectory sequence, which is recorded as ,in, Represents the teacher model at time point For the first The target predicted value of each water quality indicator, To predict the end time, is the starting time;

[0045] S42, the corresponding prediction results output by the student model in step S3 constitute the student prediction trajectory, recorded as ,in, represents the target prediction value of the student model at the same time point;

[0046] S43. Constructing time trajectory similarity function , measures the evolutionary consistency between the prediction trajectories of the teacher model and the student model;

[0047] S44. Introduce real labeled data for supervised comparison and structure screening reference to improve the conservatism and accuracy coverage of structure sampling decisions;

[0048] S45. Construct a student model structural perturbation generator to perform combined sampling on the core structural parameters of the student model to form multiple candidate structural versions;

[0049] S46, perform inference on each candidate structure version, calculate the predicted output trajectory, and calculate the time trajectory similarity function Evaluate structural performance;

[0050] S47. Setting trajectory similarity threshold ,If the trajectory similarity of the alternative structure version is higher than the trajectory similarity threshold and is improved compared with the current structure, the current structure parameters are replaced; otherwise, the original structure is retained;

[0051] S48. Repeat the structural perturbation, trajectory evaluation and screening steps until the similarity converges or the number of iterations reaches the upper limit, and finally determine the student model structure parameters.

[0052] Optionally, the S5 specifically includes:

[0053] S51, taking the student model after trajectory optimization as the final structure, loading it into the water quality prediction system operating environment, completing the student model initialization and interface binding configuration;

[0054] S52, receiving the latest water quality time series data collected in real time from each water quality monitoring point, which contains historical observation values ​​of target water quality indicators and environmental monitoring characteristics consistent with the structure of the time series training data set;

[0055] S53, performing preprocessing operations on the received water quality time series data, including data standardization, missing value repair and time step reconstruction, to generate standardized input samples that can be directly input into the student model;

[0056] S54: Input the standardized input sample to the deployed student model, and the student model performs structured reasoning operations to output the prediction result of the target water quality index corresponding to the current time point;

[0057] S55. Bind the prediction result to the corresponding timestamp and output it as the online prediction response of the water quality prediction system. Record the prediction result for feedback analysis and anomaly detection.

[0058] S56. During the operation of the water quality prediction system, real-time input data is continuously received and processed, and the student model is periodically called for prediction output.

[0059] The beneficial effects of the present invention are:

[0060] The present invention solves the problems of low accuracy and bloated models that are difficult to deploy in existing water quality prediction models when processing highly nonlinear and strongly coupled multi-source time series data by constructing a water quality prediction method that integrates the neural ordinary differential equation model and the knowledge distillation mechanism. By using the neural ordinary differential equation model as a teacher model, its ability in continuous dynamic modeling is fully utilized to generate high-quality prediction trajectories; at the same time, a student model with a simplified structure is designed, and a trajectory similarity function is introduced to measure and compare the output behaviors of the two, thereby completing the structural parameter optimization of the student model without the need for a traditional loss function. This trajectory consistency-based optimization method breaks through the limitations of existing knowledge distillation technology on its reliance on loss functions, and improves the behavioral interpretability and optimization stability of the model training process.

[0061] In addition, the present invention also realizes the adaptive perception and feedback control of the prediction error of the student model through the residual response mechanism and structural gating strategy, so that it can adjust the learning structure according to the real-time error changes during operation, and enhances the adaptability to sudden changes in water quality. Ultimately, the optimized student model has higher generalization ability and operating efficiency, can be stably deployed in the actual water quality prediction environment, and supports continuous and high-precision prediction of target water quality indicators. Compared with the existing technology, the present invention has achieved significant improvements in model lightweight, prediction accuracy, dynamic adjustability and actual deployment feasibility, and has good engineering application prospects and promotion value. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0063] Figure 1 This is a flow chart of a water quality prediction method based on machine learning proposed in the present invention;

[0064] Figure 2 This is a schematic diagram of the structural optimization based on trajectory similarity between the teacher model and the student model of the water quality prediction method based on machine learning proposed in the present invention. DETAILED DESCRIPTION

[0065] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.

[0066] A water quality prediction system based on machine learning, comprising:

[0067] The data acquisition and preprocessing module is used to collect and preprocess multi-source monitoring data from multiple water quality monitoring points, with the target water quality indicators in the multi-source monitoring data as the real label data;

[0068] The teacher model module is used to construct a neural ordinary differential equation model as a teacher model and output the prediction results of the target water quality indicators;

[0069] The student model module is used to build a lightweight neural network model as a student model and perform structural optimization training based on the prediction results and real label data;

[0070] The trajectory evaluation module is used to calculate the similarity of the predicted trajectories of the teacher model and the student model and optimize the structural parameters of the student model;

[0071] The model inference module is used to receive real-time water quality data and call the optimized student model to generate prediction results of target water quality indicators;

[0072] The result output module is used to output the prediction results of the target water quality indicators and provide display and storage interfaces.

[0073] refer to Figure 1 and Figure 2 In this embodiment, the modules are connected through the following methods:

[0074] S1. Collect multi-source monitoring data from multiple water quality monitoring points, use the target water quality indicators as true label data in the multi-source monitoring data, pre-process the multi-source monitoring data, and generate a standardized time series training dataset;

[0075] S2. Based on the time series training dataset, a neural ordinary differential equation model is constructed and trained as a teacher model to output the prediction results of the target water quality indicators at each time point;

[0076] S3. Build a student model, which is a lightweight neural network with a simplified structure, and input the time series training data set into the student model for training;

[0077] S4. The prediction results of the target water quality indicators at each time point are used as soft label inputs. At the same time, real label data is introduced. By constructing an optimization mechanism based on the similarity between the prediction trajectories of the student model and the teacher model in the time dimension, the structural parameters of the student model are dynamically perturbed and updated.

[0078] S5. Put the optimized student model into actual water quality prediction operation, receive the latest collected water quality time series data in real time, and output the prediction results of the target water quality indicators at the corresponding time point;

[0079] S6. Monitor the prediction error of the student model during deployment and operation. When the prediction error exceeds the set threshold, re-execute steps S2 to S4, and perform incremental distillation training on the student model through the teacher model to dynamically improve the student model's ability to adapt to sudden changes in water quality.

[0080] By introducing the neural ordinary differential equation model as the teacher model, the present invention can accurately model the dynamic change patterns in multi-source water quality time series data and output a continuous, smooth and physically consistent prediction trajectory. By constructing a lightweight student model with a simplified structure, combining the soft labels output by the teacher model with the real label data, and adopting an optimization mechanism based on trajectory similarity to dynamically perturb and update the student model structure, an efficient knowledge transfer process without relying on traditional loss functions is achieved, and the prediction ability of the student model under streamlined structure conditions is improved. At the same time, the present invention realizes online prediction output of real-time water quality data by deploying the optimized student model, and continuously monitors the prediction error during operation. When the model responds insufficiently to sudden changes in water quality, the incremental distillation training process can be automatically triggered to achieve adaptive correction of the student model, significantly enhancing the robustness and generalization ability of the model in complex environments. The overall solution has the advantages of high prediction accuracy, flexible structure, low deployment cost and strong self-learning ability. It is suitable for building intelligent water quality prediction application scenarios with continuous updating capabilities.

[0081] In this embodiment, the multi-source monitoring data specifically includes joint time series data of water quality indicators and associated water body physical and chemical parameters, meteorological environmental factors and hydrodynamic information.

[0082] In this embodiment, the preprocessing of multi-source monitoring data specifically includes time synchronization, missing value filling, outlier removal and normalization processing. The time synchronization, missing value filling, outlier removal and normalization processing specifically refer to time synchronization of data from different sources to ensure that the data of each monitoring point are accurately aligned at the same time step; then linear interpolation or statistical methods are used to fill the missing values ​​to ensure data continuity; then outlier detection means are used to eliminate noise data and improve sample quality; finally, normalization processing is performed on all features to make the distribution of data in each dimension consistent, thereby providing standardized and structurally unified time series input data for subsequent model training.

[0083] In this embodiment, S2 specifically includes:

[0084] S21. Define each input sequence in the generated standardized time series training dataset as ,in, Indicates the The sample in time steps dimensional input feature vector, is the set of real numbers;

[0085] S22. For each target water quality indicator Construct the corresponding hidden state function ,in Indicates the The prediction variable number is defined as :

[0086] ;

[0087] in, For the A differential function of a variable, is the set of differential function parameters;

[0088] Basic evolutionary form The formula defines the dynamic state evolution of the neural ordinary differential equation model for each target water quality indicator. Its practical significance lies in constructing a hidden state function that can model continuous time changes, describing the underlying trends in the evolution of water quality indicators. By mapping water quality monitoring data into time-varying hidden states, the internal driving forces of water quality changes are characterized. Compared with traditional discrete time series models, this model can simulate state evolution at any point in time, achieving higher temporal resolution and modeling accuracy. The hidden state vector represents the internal representation of the mth prediction target at time t, and the evolution function reflects how this state changes over time, with trainable parameters controlling its dynamic behavior. This formula lays the foundation for time series modeling of the teacher model, building upon which the subsequent coupling mechanism, multimodal initialization, and attention control are developed. This continuous modeling approach enables the mathematical construction of the evolution path of water quality indicators, providing theoretical support and a dynamic expression framework for achieving accurate, smooth, and interpretable prediction outputs.

[0089] S23. Introduce the inter-variable coupling mechanism in state evolution and expand it to the evolution form of stage 1 :

[0090] ;

[0091] in, For the The variable The coupling coefficient of the variables, is the total number of target predictor variables, is the hidden state vector of the j-th variable at time t;

[0092] Stage 1 Evolutionary Form The formula introduces a coupling mechanism between variables based on basic neural ordinary differential modeling. Its practical significance lies in simulating the dynamic influence of different water quality indicators over time. In real-world environments, water quality indicators often do not change independently but exhibit complex coupling characteristics among multiple variables. For example, indicators such as dissolved oxygen, ammonia nitrogen, and chemical oxygen demand exhibit significant interactions. By introducing linear combinations of the states of other variables into the state evolution equation of each predictor variable, a coupled propagation path between multidimensional states is constructed, thereby modeling the diffusion, reaction, and linkage effects of pollutants in water systems. Each coupling coefficient represents the strength of the influence of one variable on the evolution of another. The model automatically learns these coupling weights during training, enabling the dynamic capture of causal or synergistic relationships between variables during the prediction process. This mechanism significantly enhances the model's ability to express the physical plausibility and system linkages of the pollution diffusion process, improves overall prediction accuracy, and provides a more structured modeling foundation for the subsequent introduction of attention mechanisms and trajectory optimization. This extends the neural ordinary differential model from single-variable modeling to a dynamic system model capable of modeling multivariable collaborative models.

[0093] S24, introduce a multimodal input fusion mechanism to encode images, text or external environment data into potential vectors through feature encoding , used to initialize the state: ,in Indicates that the mth variable at the start time The initial hidden state at time t;

[0094] S25. Based on the evolution form of stage 1, the attention saliency regulation mechanism is introduced to form the final evolution expression :

[0095] ;

[0096] in, For time point Previous The attention weight of each target indicator;

[0097] Final evolution expression The formula introduces an attention saliency control mechanism based on coupled modeling. Its practical significance lies in dynamically adjusting the influence weights of different time periods during the evolution of water quality indicators, thereby improving the model's responsiveness to critical time segments. Specifically, the attention weight function, a time-varying adjustment factor, automatically determines which time points are most important to the prediction results based on the temporal characteristics of the input state and gives greater modeling attention to these critical moments. This mechanism effectively alleviates the problems of information dilution and noise interference in long-term series prediction, enabling the model to focus on time segments that are crucial to the target variable's changing trend, thereby improving prediction accuracy and model interpretability. Furthermore, this saliency control mechanism possesses certain visualization capabilities. By analyzing the distribution of attention, it can assist in analyzing high-sensitivity periods during pollution events, facilitating source tracing and intervention by environmental management agencies. The final evolutionary structure constructed integrates three dynamic factors: variable evolution, inter-variable coupling, and saliency control. This gives the neural ordinary differential model not only the expressive continuous modeling characteristics, but also balances temporal selectivity and feature focus. This embodies the principle of behavior-driven intelligent modeling and is the core foundation for achieving high-quality trajectory output and distillation optimization.

[0098] S26. Configure an ODE solver with a dynamic step size and error tolerance adjustment mechanism to adjust the integration granularity according to the degree of input change, achieving fine-grained solution in highly variable sections and low-computation solution in stable sections;

[0099] S27, predict the end time The state vector on Input to the corresponding prediction function , output target prediction value ,in, The mth variable at the end of the prediction time The hidden state vector of is the prediction function parameter;

[0100] S28. Generated attention weights , construct a significant heat map for the entire evolution time interval, and filter out those that meet The time segment of , extracts the corresponding prediction results as candidate soft labels, where, is the attention threshold parameter;

[0101] S29. Combining the predicted change trend with the significance distribution, a representative evolution path is selected for each variable to form a soft label subsequence;

[0102] S210, using the adjoint sensitivity method to calculate the gradient of each parameter in the final teacher model structure, for all evolution function parameter sets , coupling coefficient , attention network parameters and prediction function parameters Joint training is performed to complete the teacher model construction and output the predicted values ​​of the target water quality indicators at each time point as a soft label sequence.

[0103] This paper constructs a neural ordinary differential equation model with dynamic modeling capabilities to achieve continuous representation and high-precision prediction of the temporal evolution of water quality indicators. During teacher model construction, independent evolution trajectories for each water quality indicator category are first defined. A coupling mechanism between variables is then introduced to model the dynamic relationships between multiple factors, effectively enhancing the model's ability to depict complex pollution diffusion behaviors. By integrating image, text, and external environmental data, the model's initial state information source is enriched, enhancing its adaptability to multimodal scenarios. Furthermore, a temporal attention mechanism is introduced into the evolution path to regulate the salience of key time periods, focusing the model on time segments with the greatest impact on the prediction task. Representative prediction results are screened using attention heat maps to construct high-quality soft labels, and valid paths are further selected based on trajectory trends, significantly improving the representativeness and compression quality of the soft labels. Finally, an adjoint sensitivity method is employed for efficient reverse training, achieving joint optimization of model structural parameters. This approach not only improves the continuity, interpretability, and controllability of the teacher model's prediction trajectories but also provides behavior-driven structural guidance for subsequent distillation training, resulting in high accuracy, refined modeling, and scientific path selection.

[0104] In this embodiment, S3 specifically includes:

[0105] S31. Construct a student model, where the student model is a lightweight neural network with a simplified structure, comprising an input layer, a time series modeling layer, and an output prediction layer, wherein the input layer receives the generated time series training dataset;

[0106] S32. In the time series modeling layer, a gated recurrent unit network structure is used to extract the dynamic representation of the input features at each time step and construct a unified hidden state sequence to represent the state evolution trajectory within each time period;

[0107] S33, setting a shallow fully connected network module with adjustable parameters in the output prediction layer, receiving the final value of the hidden state and outputting the prediction result of each target water quality indicator;

[0108] S34, obtain the predicted value of the teacher model at each time point of the target water quality index as a soft label sequence, and make a one-to-one correspondence with the prediction result of the student model at each time step, and calculate the error residual sequence at consecutive time points, recorded as ,in, represents the forecast indicator number, Representing a time step, the error residual sequence calculated at consecutive time points specifically refers to comparing the target water quality indicator prediction value output by the teacher model at each time point with the prediction result of the student model at the same time point, calculating the difference value at each time step using methods such as Euclidean distance, absolute error, or mean square error, to form an error sequence about time step t. For each prediction indicator number k, the error residual sequence represents the performance deviation of the student model compared to the teacher model over the entire prediction time window, thereby providing an accurate error information foundation for subsequent residual perception mechanisms and dynamic learning strategies;

[0109] S35. Based on the error residual sequence, construct a learnable residual response weight function , characterizes the response sensitivity of the student model to the error intensity of different time periods. The weight function serves as one of the state update gating parameters, guiding the time series modeling layer to take different learning steps in different time periods. It is constructed based on the prediction error residual of the student model at each time step. The characterization of the response sensitivity of the student model to the error intensity of different time periods specifically refers to analyzing the prediction error residual of the student model at each time step, and using the function mapping method to construct a nonlinear relationship between the time step and the response intensity to form a learnable weight vector. The weight vector reflects the degree of attention of the model to the high residual time period. The higher the weight value, the more actively the model should respond to the error signal of the time period and enhance the learning intensity. The lower the weight value, the lower the error information of the time period has a lower value for model training, and the update frequency needs to be reduced, so as to dynamically adapt the learning strategy of different time periods.

[0110] S36. Introduce a structural distillation gating mechanism to dynamically adjust the state update frequency of the student model according to the residual response weight function, improve the model response accuracy in the high residual time period, and automatically suppress invalid updates in the low residual time period. The dynamic adjustment of the state update frequency of the student model according to the residual response weight function specifically refers to the process of model time series modeling, using the residual response weight corresponding to each time step as a gating coefficient, introducing it into the state transfer function or gating structure, and determining whether to perform a state update operation based on the size of the weight value: when the residual response weight is greater than the set threshold, the state unit is allowed to perform a full update to enhance the fitting of the error information; when the weight is small, the current state is skipped or partially retained to reduce the sensitivity to redundant data, thereby achieving dynamic control of the learning frequency and efficient use of resources;

[0111] S37, the generated error residual sequence and the residual response weight function The student model outputs the error residual sequence and the corresponding residual response weight function as feedback signals to the teacher model. The teacher model is dynamically regulated by the teacher model feedback interface. By adjusting the coupling coefficient, attention weight or input sensitivity parameter in the state evolution equation, the state evolution intensity and focus of different time steps are dynamically corrected, thereby enhancing the teacher model's expressive power in critical time periods, optimizing its modeling accuracy for sudden changes or abnormal trends, and improving the overall soft label quality and distillation guidance effect.

[0112] S38. According to the structural distillation gating mechanism and the residual response weight function, the parameters of the student model are iteratively updated to gradually enhance the perception of residual information and the adaptability to feedback control input, thereby generating a student model with residual response characteristics and regulatory feedback capabilities. The iterative updating of the parameters of the student model specifically refers to using the error residual sequence and the residual response weight function as guiding signals in each round of training, dynamically adjusting the state update frequency and gradient propagation path in the timing modeling layer, and gradually adjusting the weight matrix, bias terms and gating parameters in the model to enhance the feature extraction capability of the model in the high residual segment and suppress invalid learning in the low residual segment, thereby continuously optimizing the model's perception of error signals and its ability to adapt to teacher feedback in multiple rounds of iterations.

[0113] This paper addresses the issues of traditional distillation models' insensitivity to local errors in time series and rigid learning processes by constructing a lightweight student model with residual awareness and dynamic feedback control capabilities. A gated recurrent unit network is introduced into the student model structure as a time series modeling layer to effectively extract dynamic features at each time step. Predictive output is achieved through a shallow fully connected network. By calculating the error residuals between the student and teacher models at each time point, a residual response weight function is constructed to clarify the model's sensitivity to errors in different time periods, guiding the model to dynamically adjust its stride and state update intensity during learning. A structural distillation gating mechanism further utilizes this weight function to enhance the model's responsiveness in high-error regions and suppress ineffective updates in low-error regions, thereby achieving precise and energy-efficient learning control. Furthermore, the residual information and weight function are fed back to the teacher model to dynamically adjust the evolution path, establishing an adaptive bidirectional control mechanism between the teacher and the student. Overall, this paper improves the student model's local responsiveness to error changes and its structural self-adjustment capabilities, achieving a more stable, flexible, and efficient knowledge transfer process. It offers benefits such as high prediction accuracy, rapid model convergence, and user-friendly deployment.

[0114] In this embodiment, the S4 specifically includes:

[0115] S41. The prediction results of the target water quality indicators output by the teacher model at each time point are used as soft label inputs to construct the teacher model prediction trajectory sequence, which is recorded as ,in, Represents the teacher model at time point For the first The target predicted value of each water quality indicator, To predict the end time, is the starting time;

[0116] S42, the corresponding prediction results output by the student model in step S3 constitute the student prediction trajectory, recorded as ,in, represents the target prediction value of the student model at the same time point;

[0117] S43. Constructing time trajectory similarity function , which measures the evolutionary consistency between the prediction trajectories of the teacher model and the student model:

[0118] ;

[0119] Among them, the closer the similarity value is to 1, the more consistent the two trajectories are;

[0120] Time trajectory similarity function The practical significance of this formula lies in providing a non-loss-function-driven behavioral evaluation metric for the structural optimization of the student model. Traditional optimization methods often rely on point-to-point prediction errors (such as mean squared error), ignoring the model's overall prediction trends and patterns of change over time. By constructing the prediction results of the teacher and student models as complete time series trajectories and introducing the normalized squared difference ratio to construct a similarity function, this method comprehensively reflects the degree of global matching between the two along their temporal evolution paths. The closer this similarity value is to 1, the more consistent the shapes and trends of the two trajectories, indicating a more effective fit of the student model to the teacher model's behavior. Therefore, this function not only provides behavioral interpretability but also enables quantitative comparison of structural adjustment results, making it suitable for multiple processes such as structural sampling optimization, soft label screening, and path-driven distillation. Through this function, the student model can achieve fine-grained control based on trajectory behavior, effectively improving the model's overall performance and response consistency in time series prediction tasks.

[0121] S44. Introduce real labeled data for supervised comparison and structure screening reference to improve the conservatism and accuracy coverage of structure sampling decisions;

[0122] S45. Construct a student model structural perturbation generator, perform combined sampling on the core structural parameters of the student model, and form multiple candidate structural versions. Specifically, the combined sampling on the core structural parameters of the student model refers to selecting its key structural parameters such as the number of hidden layer units, the depth of the temporal modeling layer, the activation function type, the gating mechanism parameters, etc., while keeping the overall structural framework of the student model unchanged, and using strategies such as Bayesian optimization or random search to generate multiple sets of parameter combinations, thereby constructing multiple candidate versions of the student model with different structural characteristics;

[0123] S46, perform inference on each candidate structure version, calculate the predicted output trajectory, and calculate the time trajectory similarity function Evaluating structural performance: performing inference on each candidate structural version and calculating the predicted output trajectory involves sequentially inputting standardized time series training data into the candidate student model structure. The model then completes forward propagation according to the set network layer parameters and activation functions to generate a corresponding sequence of predicted values ​​for the target water quality indicator. Subsequently, a complete output trajectory is constructed based on the prediction results at each time step for subsequent one-to-one comparison and similarity evaluation with the teacher model prediction trajectory in the time dimension.

[0124] S47. Setting trajectory similarity threshold ,If the trajectory similarity of the alternative structure version is higher than the trajectory similarity threshold and is improved compared with the current structure, the current structure parameters are replaced; otherwise, the original structure is retained;

[0125] S48. Repeat the structural perturbation, trajectory evaluation and screening steps until the similarity converges or the number of iterations reaches the upper limit, and finally determine the student model structure parameters.

[0126] This invention addresses the lack of behavioral-level evaluation of student model structure adjustment in traditional distillation processes by constructing a structure optimization mechanism guided by trajectory similarity. A complete trajectory is constructed using the prediction results of the teacher and student models at consecutive time points, and the trajectory similarity between the two models over the entire time period is calculated. This replaces the traditional optimization method that relies on a loss function, improving the model's ability to express behavioral-level consistency. Furthermore, the system incorporates real-world labeled data as an auxiliary reference for structure screening, enhancing the supervision and robustness of the structure perturbation screening process. During the student model optimization process, a structure perturbation generator is used to sample the model's structural parameters in a combined manner, generating multiple candidate versions. Each version is then behaviorally evaluated using a trajectory similarity function. Structure selection is performed by setting a trajectory similarity threshold, ensuring that the retained structure version has the best behavioral fit. Ultimately, through repeated iterations, the student model structure continuously approaches the teacher model's behavior without relying on a loss function. This mechanism significantly improves the student model's behavioral consistency, structural flexibility, and optimization efficiency. It offers advantages such as strong interpretability, no gradient dependency, and suitability for exploring multiple structure spaces. It is suitable for deployment in water quality prediction tasks that prioritize both model responsiveness and structural compactness.

[0127] In this embodiment, the S5 specifically includes:

[0128] S51, taking the student model after trajectory optimization as the final structure, loading it into the water quality prediction system operating environment, completing the student model initialization and interface binding configuration;

[0129] S52, receiving the latest water quality time series data collected in real time from each water quality monitoring point, which contains historical observation values ​​of target water quality indicators and environmental monitoring characteristics consistent with the structure of the time series training data set;

[0130] S53, performing preprocessing operations on the received water quality time series data, including data standardization, missing value repair and time step reconstruction, to generate standardized input samples that can be directly input into the student model, wherein the data standardization, missing value repair and time step reconstruction refer to normalizing the received water quality time series data using Z-score standardization, repairing missing values ​​using K-nearest neighbor interpolation, and finally reconstructing the input sample sequence with a unified time step using a sliding window technique;

[0131] S54: Input the standardized input sample to the deployed student model, and the student model performs structured reasoning operations to output the prediction result of the target water quality index corresponding to the current time point;

[0132] S55. Bind the prediction result to the corresponding timestamp and output it as the online prediction response of the water quality prediction system. Record the prediction result for feedback analysis and anomaly detection.

[0133] S56. During the operation of the water quality prediction system, real-time input data is continuously received and processed, and the student model is periodically called for prediction output.

[0134] By implementing a trajectory-optimized student model into a real-world operational environment, this invention achieves efficient and continuous prediction of water quality indicators, addressing the challenges of difficult deployment and slow response times associated with traditional models. The student model, after structural optimization, is lightweight, facilitating rapid deployment and low-cost operation in water quality prediction scenarios. In actual operation, the system receives the latest time series data from each water quality monitoring point in real time. Incorporating preprocessing mechanisms such as standardization, missing value repair, and time-step reconstruction, it ensures the consistency and integrity of the input data quality, thereby guaranteeing the stability of the model's prediction accuracy. After receiving standardized input, the student model rapidly outputs predictions of the target water quality indicator at the current point in time, meeting the response speed and real-time requirements of online prediction. The prediction results are combined with timestamps to generate a continuous response stream, which is recorded for subsequent error analysis and anomaly identification, providing a data foundation for subsequent adaptive update mechanisms. The entire operational process is highly automated and scalable, capable of supporting water quality prediction tasks involving multiple monitoring points and multiple variables. This invention significantly improves the real-time performance, stability, and deployment flexibility of the prediction process, making it suitable for a variety of practical application scenarios, including dynamic water quality monitoring, pollution warning, and smart water services.

[0135] In this embodiment, S6 specifically includes:

[0136] The system continuously monitors the student model's predicted output during actual operation and compares it with real-world observed water quality data. When the prediction error for consecutive time steps exceeds a preset threshold, it is identified as a sign of sudden water quality changes or model performance degradation. At this point, the model retraining mechanism is automatically triggered, re-executing the teacher model construction and training, student model construction and initial training, and trajectory similarity optimization processes. By introducing the latest data and performing incremental learning on the student model based on a distillation optimization strategy, the student model is ensured to quickly adapt to environmental changes while maintaining a lightweight structure, improving prediction accuracy and robustness, thereby ensuring the system's stable operation and efficient response under complex water quality dynamics.

[0137] Example 1:

[0138] To verify the feasibility of this invention, a two-week water quality monitoring test was conducted using 10 representative monitoring points. The goal was to predict changes in the concentrations of key water indicators, including chemical oxygen demand, ammonia nitrogen, and total phosphorus, in real time. Data collection at each monitoring point was set to once an hour. Each data point simultaneously recorded historical water quality indicator values, ambient temperature, rainfall, and water flow velocity, forming a complete multi-source time series input sample.

[0139] To compare and evaluate performance, we built and deployed a traditional LSTM model and a lightweight student model based on trajectory optimization and distillation. Under identical conditions, both models were trained on historical monitoring data from the same time period and subsequently used the same real-time data for prediction.

[0140] During testing, traditional models generally exhibited slow response speeds and poor adaptability to dramatic water quality changes, particularly under conditions of multivariate coupled fluctuations, leading to significant increases in prediction errors. However, the proposed model uses the output trajectory of the teacher model to guide the optimization structure. Combined with an attention mechanism and residual gating, the student model can accurately fit the changing trends of the target indicator and demonstrate greater prediction sensitivity during critical periods.

[0141] Furthermore, under sudden changes such as continuous rainfall and sudden pollution inputs, the proposed model was able to promptly respond to and predict water quality fluctuations, successfully capturing multiple abnormal trends, whereas traditional models often suffer from delayed responses or misjudgments. This testing validated the accuracy of the proposed model in time series modeling, its sensitivity in responding to dynamic changes, and its practicality in edge deployment environments, demonstrating its suitability for accurate identification of high-frequency trends and real-time early warning in actual water quality monitoring scenarios.

[0142] Table 1 Water quality prediction model performance comparison

[0143]

[0144] According to the results shown in the data of Table 1, it can be clearly seen that the model of the present invention has significant advantages over the traditional model in terms of key performance indicators. First, in terms of average prediction error, the prediction error of the traditional model in all 10 monitoring points is between 0.78 and 0.91 mg / L, showing a certain high trend, especially at points such as M2, M4 and M5, the error exceeds 0.85 mg / L, indicating that the accuracy of the model is insufficient in the face of complex fluctuation conditions. Under the same data input and scenario conditions, the average prediction error of the model of the present invention is maintained in a lower range of 0.36 to 0.43 mg / L as a whole, with stronger stability and smaller error fluctuation amplitude, proving that it has more precision advantages in fitting the time evolution trend of the target water quality indicators.

[0145] Secondly, the difference is particularly obvious in terms of response time. The response time of traditional models is generally above 250 milliseconds, and the highest is 265 milliseconds, which may lead to delayed output or even response accumulation when processing high-frequency data streams. The model of the present invention greatly shortens the reasoning time with the help of lightweight network structure and structural distillation optimization strategy. The response time of all monitoring points is controlled within 100 milliseconds, and many points are less than 95 milliseconds, which significantly improves real-time performance and computing efficiency. It is particularly suitable for edge computing or deployment in resource-constrained water quality monitoring terminals.

[0146] Overall, the proposed model outperforms traditional water quality prediction methods in both accuracy and real-time performance. It also demonstrates consistent performance across all monitoring points and robust error control, significantly enhancing its ability to predict sudden changes in water quality and its adaptability to practical applications. This performance advantage validates the practical value of trajectory similarity optimization, residual control, and dynamic gating mechanisms in water quality prediction tasks, providing technical support for the construction of intelligent water quality prediction models with high responsiveness, high precision, and low computational load.

[0147] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A water quality prediction method based on machine learning, characterized in that: The steps include: S1. Collect multi-source monitoring data from multiple water quality monitoring points, use the target water quality indicators as true label data in the multi-source monitoring data, pre-process the multi-source monitoring data, and generate a standardized time series training dataset; S2. Based on the time series training dataset, a neural ordinary differential equation model is constructed and trained as a teacher model to output the prediction results of the target water quality indicators at each time point; S3. Build a student model, which is a lightweight neural network with a simplified structure, and input the time series training data set into the student model for training; S4. The prediction results of the target water quality indicators at each time point are used as soft label inputs. At the same time, real label data is introduced. By constructing an optimization mechanism based on the similarity between the prediction trajectories of the student model and the teacher model in the time dimension, the structural parameters of the student model are dynamically perturbed and updated. S5. Put the optimized student model into actual water quality prediction operation, receive the latest collected water quality time series data in real time, and output the prediction results of the target water quality indicators at the corresponding time point; S6. Monitor the prediction error of the student model during deployment and operation. When the prediction error exceeds the set threshold, re-execute steps S2 to S4, and perform incremental distillation training on the student model through the teacher model to dynamically improve the student model's ability to adapt to sudden changes in water quality. The S3 specifically includes: S31. Construct a student model, where the student model is a lightweight neural network with a simplified structure, comprising an input layer, a time series modeling layer, and an output prediction layer, wherein the input layer receives the generated time series training dataset; S32. In the time series modeling layer, a gated recurrent unit network structure is used to extract the dynamic representation of the input features at each time step and construct a unified hidden state sequence to represent the state evolution trajectory within each time period; S33, setting a shallow fully connected network module with adjustable parameters in the output prediction layer, receiving the final value of the hidden state and outputting the prediction result of each target water quality indicator; S34, obtain the predicted value of the teacher model at each time point of the target water quality index as a soft label sequence, and make a one-to-one correspondence with the prediction result of the student model at each time step, and calculate the error residual sequence at consecutive time points, recorded as ,in, represents the forecast indicator number, represents the time step; S35. Based on the error residual sequence, construct a learnable residual response weight function , characterizes the student model's sensitivity to the error intensity at different time periods. The weight function serves as one of the state update gating parameters, guiding the time series modeling layer to adopt different learning steps at different time periods. It is constructed based on the prediction error residual of the student model at each time step. S36. Introducing a structural distillation gating mechanism to dynamically adjust the state update frequency of the student model according to the residual response weight function, improving the model response accuracy in high residual time periods and automatically suppressing invalid updates in low residual time periods; S37, the generated error residual sequence and the residual response weight function The results are output to the teacher model feedback interface to dynamically control the teacher model evolution path; S38. According to the structural distillation gating mechanism and the residual response weight function, the parameters of the student model are iteratively updated to gradually enhance the perception of residual information and the adaptability to feedback control input, thereby generating a student model with residual response characteristics and regulatory feedback capabilities.

2. The water quality prediction method based on machine learning according to claim 1, characterized in that: The multi-source monitoring data specifically includes joint time series data of water quality indicators and associated water body physical and chemical parameters, meteorological environmental factors and hydrodynamic information.

3. The water quality prediction method based on machine learning according to claim 1, characterized in that: The preprocessing of multi-source monitoring data specifically includes time synchronization, missing value filling, outlier removal and normalization.

4. The water quality prediction method based on machine learning according to claim 1, characterized in that: The S2 specifically includes: S21. Define each input sequence in the generated standardized time series training dataset as ,in, Indicates the The sample in time steps dimensional input feature vector, is the set of real numbers; S22. For each target water quality indicator Construct the corresponding hidden state function ,in Indicates the The prediction variable number is defined as ; ; in, For the A differential function of a variable, is the set of differential function parameters; S23. Introduce the inter-variable coupling mechanism in state evolution and expand it to the evolution form of stage 1 ; ; in, For the The variable The coupling coefficient of the variables, is the total number of target predictor variables, is the hidden state vector of the j-th variable at time t; S24, introduce a multimodal input fusion mechanism to encode images, text or external environment data into potential vectors through feature encoding , used to initialize the state: ,in Indicates that the mth variable at the start time The initial hidden state at time t; S25. Based on the evolution form of stage 1, the attention saliency regulation mechanism is introduced to form the final evolution expression ; ; in, For time point Previous The attention weight of each target indicator; S26. Configure an ODE solver with a dynamic step size and error tolerance adjustment mechanism to adjust the integration granularity according to the degree of input change, achieving fine-grained solution in highly variable sections and low-computation solution in stable sections; S27, predict the end time The state vector on Input to the corresponding prediction function , output target prediction value ,in, The mth variable at the end of the prediction time The hidden state vector of is the prediction function parameter; S28. Generated attention weights , construct a significant heat map for the entire evolution time interval, and filter out those that meet The time segment of , extracts the corresponding prediction results as candidate soft labels, where, is the attention threshold parameter; S29. Combining the predicted change trend with the significance distribution, a representative evolution path is selected for each variable to form a soft label subsequence; S210, using the adjoint sensitivity method to calculate the gradient of each parameter in the final teacher model structure, for all evolution function parameter sets , coupling coefficient , attention network parameters and prediction function parameters Joint training is performed to complete the teacher model construction and output the predicted values ​​of the target water quality indicators at each time point as a soft label sequence.

5. The water quality prediction method based on machine learning according to claim 4, characterized in that: The S4 specifically includes: S41. The prediction results of the target water quality indicators output by the teacher model at each time point are used as soft label inputs to construct the teacher model prediction trajectory sequence, which is recorded as ,in, Represents the teacher model at time point For the first The target predicted value of each water quality indicator, To predict the end time, is the starting time; S42, the corresponding prediction results output by the student model in step S3 constitute the student prediction trajectory, recorded as ,in, represents the target prediction value of the student model at the same time point; S43. Constructing time trajectory similarity function , measures the evolutionary consistency between the prediction trajectories of the teacher model and the student model; S44. Introduce real labeled data for supervised comparison and structure screening reference to improve the conservatism and accuracy coverage of structure sampling decisions; S45. Construct a student model structural perturbation generator to perform combined sampling on the core structural parameters of the student model to form multiple candidate structural versions; S46, perform inference on each candidate structure version, calculate the predicted output trajectory, and calculate the time trajectory similarity function Evaluate structural performance; S47. Setting trajectory similarity threshold ,If the trajectory similarity of the alternative structure version is higher than the trajectory similarity threshold and is improved compared with the current structure, the current structure parameters are replaced; otherwise, the original structure is retained; S48. Repeat the structural perturbation, trajectory evaluation and screening steps until the similarity converges or the number of iterations reaches the upper limit, and finally determine the student model structure parameters.

6. The water quality prediction method based on machine learning according to claim 4, characterized in that: The S5 specifically includes: S51, taking the student model after trajectory optimization as the final structure, loading it into the water quality prediction system operating environment, completing the student model initialization and interface binding configuration; S52, receiving the latest water quality time series data collected in real time from each water quality monitoring point, which contains historical observation values ​​of target water quality indicators and environmental monitoring characteristics consistent with the structure of the time series training data set; S53, performing preprocessing operations on the received water quality time series data, including data standardization, missing value repair and time step reconstruction, to generate standardized input samples that can be directly input into the student model; S54: Input the standardized input sample to the deployed student model, and the student model performs structured reasoning operations to output the prediction result of the target water quality index corresponding to the current time point; S55. Bind the prediction result to the corresponding timestamp and output it as the online prediction response of the water quality prediction system. Record the prediction result for feedback analysis and anomaly detection. S56. During the operation of the water quality prediction system, real-time input data is continuously received and processed, and the student model is periodically called for prediction output.

7. A water quality prediction system based on machine learning, applied to a water quality prediction method based on machine learning according to claims 1-6, characterized in that: include: The data acquisition and preprocessing module is used to collect and preprocess multi-source monitoring data from multiple water quality monitoring points, with the target water quality indicators in the multi-source monitoring data as the real label data; The teacher model module is used to construct a neural ordinary differential equation model as a teacher model and output the prediction results of the target water quality indicators; The student model module is used to build a lightweight neural network model as a student model and perform structural optimization training based on the prediction results and real label data; The trajectory evaluation module is used to calculate the similarity of the predicted trajectories of the teacher model and the student model and optimize the structural parameters of the student model; The model inference module is used to receive real-time water quality data and call the optimized student model to generate prediction results of target water quality indicators; The result output module is used to output the prediction results of the target water quality indicators and provide display and storage interfaces.

Citation Information

Patent Citations

  • A multi-parameter environmental quality intelligent monitoring system and control method thereof

    CN119756489A

  • Water environment monitoring method and system based on Internet of Things, and storage medium

    CN120028506A