Machine learning model-based algae proliferation risk prediction method

By employing a machine learning-based method for predicting algal proliferation risk, and utilizing graph neural networks and meta-learning techniques, the problem of lagging algal proliferation risk prediction in existing technologies has been solved. This method achieves high-precision and highly adaptable risk prediction, and optimizes resource allocation and environmental monitoring in aquaculture.

WO2026006974A1PCT designated stage Publication Date: 2026-01-08ANHUI SCI & TECH UNIV +1

Patent Information

Application Number
PCT/CN2024/103055
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

Existing technologies cannot effectively capture the dynamic relationship of algal proliferation risk, leading to lag and bias in risk prediction, which affects the quality of aquatic products and increases economic losses.

Method used

A machine learning-based method for predicting algal proliferation risk was adopted. By collecting and preprocessing water quality data and geographic information, a graph neural network model was constructed. The model was trained using meta-learning methods, and an attention mechanism was integrated to optimize model parameters, thereby improving the model's adaptability and prediction accuracy.

Benefits of technology

It significantly improves the accuracy and adaptability of algal proliferation risk prediction, enabling rapid adaptation to new data distributions and environmental changes, optimizing resource allocation, and improving monitoring and control efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103055_08012026_PF_FP_ABST
    Figure CN2024103055_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of algae proliferation risk prediction. Disclosed is a machine learning model-based algae proliferation risk prediction method. The present invention comprises collecting water quality data, geographic information and historical algae proliferation event data and preprocessing the collected data. In the present invention, a graph structure between monitoring points is constructed on the basis of spatial features, each monitoring point is represented as a node in a graph, and a relationship between nodes is represented as an edge, so that spatial dependency between monitoring points can be effectively captured. The weight of each edge is defined as the reciprocal of the distance between the nodes, so that the model can more accurately reflect the effect of adjacent monitoring points on each other. By constructing the graph structure to represent the relationship between the monitoring points, large-scale spatial data can be efficiently processed. A graph neural network is capable of performing a convolution operation on a graph structure, effectively aggregating information of adjacent nodes, thereby improving the spatial relationship expression capability and the model prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Algal proliferation risk prediction method based on machine learning model TECHNICAL FIELD

[0001] The present application belongs to the field of algal proliferation risk prediction, and in particular relates to an algal proliferation risk prediction method based on a machine learning model. BACKGROUND

[0002] Aquaculture relies on clean water environment, and algal outbreak can lead to water quality deterioration, affecting the growth and quality of aquatic products. Algal proliferation risk prediction can help aquaculture enterprises to respond to potential risks in advance, adjust breeding plans, take prevention and control measures, reduce economic losses, and protect the quality of aquatic products. Algal outbreak in an area may affect adjacent areas through water flow and diffusion. Conventional techniques cannot fully capture this dynamic relationship, resulting in lag and deviation in risk prediction, so that aquaculture enterprises cannot take effective measures in time, which may eventually lead to decreased quality of aquatic products and increased economic losses.

[0003] Therefore, the present application is proposed.

[0004] SUMMARY

[0005] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art and provide an algal proliferation risk prediction method based on a machine learning model, which solves the problems raised in the background.

[0006] To solve the above technical problems, the basic idea of the technical solution of the present application is as follows:

[0007] An algal proliferation risk prediction method based on a machine learning model comprises the following steps:

[0008] S1, collecting water quality data, geographic information and historical algal proliferation event data and preprocessing the collected data;

[0009] S2, extracting time features and space features from the preprocessed data and dividing the preprocessed data into a training set, a validation set and a test set;

[0010] S3, constructing a graph structure between monitoring points based on the space features, representing each monitoring point as a node in the graph, representing the relationship between nodes as edges, and defining the weight of the edges as the reciprocal of the distance between nodes;

[0011] S4, constructing a graph neural network model using the data obtained in steps S2 and S23;

[0012] S5, training the initial model using a meta-learning method to enable it to quickly adapt to new data distribution and environmental changes;

[0013] S6, training the graph neural network model using the training set data to optimize the model parameters, the training process including hyperparameter tuning and early stopping by the validation set data;

[0014] S7, using the trained model to predict the test set data and calculating the accuracy, precision, recall and F1 score of the model.

[0015] Optionally, the water quality data in step S1 includes water temperature, pH value, dissolved oxygen, nitrogen, phosphorus and other parameters, the geographic information includes the latitude and longitude of the monitoring points, and the historical algal proliferation event data records the algal proliferation situation of each monitoring point. The time features in step S2 include daily, weekly or monthly average values of water quality parameters, and the spatial features include geographic proximity relationships between monitoring points.

[0016] Optionally, the graph neural network model includes an input layer, a graph convolution layer and an output layer, the input layer accepts node features, the graph convolution layer is used for propagating and aggregating node features, and the output layer is used for predicting the algal proliferation risk of each node.

[0017] Optionally, after the graph neural network model is constructed, an attention mechanism is integrated into the graph neural network model to automatically focus on the most important spatio-temporal features for prediction, the attention mechanism including time attention i,t and spatial attention i,j , and the important features h A are determined by calculating feature weighted sum through formula .

[0018] Optionally, the steps of constructing a graph structure between monitoring points based on spatial features, representing each monitoring point as a node in the graph, representing the relationship between nodes as an edge, and defining the weight of the edge as the reciprocal of the distance between nodes are as follows:

[0019] Obtain the latitude and longitude data of the monitoring points and the related water quality parameters, calculate the geographic distance d ij between each pair of monitoring points, and calculate the latitude difference ij and the longitude difference ij between each pair of monitoring points, calculate the edge weight w ij between each pair of monitoring points using formula , and add edges between each pair of monitoring points with a distance less than a certain threshold according to the calculated weight w ij , wherein h i and h i respectively represent the water quality parameters of monitoring points i and j, and

[0020] Optionally, the meta-learning method comprises model-agnostic meta-learning, which quickly adjusts model parameters through a small amount of task data.

[0021] Optionally, the meta-training phase comprises the following steps

[0022] A plurality of tasks are sampled from the task distribution p(T), each task representing data of a different monitoring point or time period;

[0023] For each task, a few steps of gradient descent are performed using the current model parameters θ, obtaining task-specific parameters θ'i, expressed as Wherein, alpha is the learning rate of the inner loop, is the loss function of the task T i , f θ is the model with parameters θ.

[0024] The loss on the validation set using the task-specific parameters θ'i is used to calculate the gradient relative to the initial parameters θ, and the initial parameters θ are updated.

[0025] Optionally, the steps in the task fine-tuning phase are

[0026] The initial parameters θ are obtained using meta-training;

[0027] A few steps of gradient descent are performed through a small amount of data of the new task to adjust the model parameters, expressed as Wherein, θ' represents the updated model parameters. By adjusting the initial parameters θ, the model parameters on the new task are obtained, alpha represents the learning rate for controlling the step size of parameter updating, and L new task represents the loss function on the new task.

[0028] Optionally, the prediction result is further explained by calculating attention weights to determine which spatio-temporal features have a large impact on the prediction.

[0029] After the above technical solutions are adopted, the present application has the following advantages compared with the prior art. Of course, any product implementing the present application does not necessarily need to achieve all the advantages described below:

[0030] 1. By constructing a graph structure between monitoring points based on spatial features, each monitoring point is represented as a node in the graph, and the relationship between nodes is represented as an edge, which can effectively capture the spatial dependency between monitoring points. The weight of the edge is defined as the reciprocal of the distance between the nodes, so that the model can more accurately reflect the influence of neighboring monitoring points on each other. By constructing a graph structure to represent the relationship between monitoring points, large-scale spatial data can be efficiently processed. The graph neural network can perform convolution operations on the graph structure, effectively aggregating the information of neighboring nodes, thereby improving the expression ability of spatial relationships and the prediction accuracy of the model.

[0031] 2. By using meta-learning methods to train the initial model, it can quickly adapt to new data distributions and environmental changes, significantly enhancing the model's adaptability. Meta-learning learns a good parameter initialization by training on multiple different but related tasks, allowing the model to quickly adjust parameters with limited data and training steps when facing new tasks, maintaining high performance.

[0032] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0033] The accompanying drawings described below are merely some embodiments. Those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0034] In the picture:

[0035] Figure 1 is a flowchart illustrating the method for predicting the risk of algal proliferation.

[0036] It should be noted that these accompanying drawings and textual descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art by referring to specific embodiments. Detailed Implementation

[0037] The invention will now be described in further detail with reference to the accompanying drawings.

[0038] Please refer to Figure 1. This embodiment provides a method for predicting algal proliferation risk based on a machine learning model, including the following steps:

[0039] S1. Collect water quality data, geographic information, and historical algal proliferation event data, and preprocess the collected data. By collecting various types of data, including water quality parameters (such as water temperature, pH, dissolved oxygen, nitrogen, phosphorus, etc.), geographic information (such as the latitude and longitude of monitoring points), and historical algal proliferation event data, a comprehensive understanding of the various factors affecting algal proliferation can be achieved. This comprehensive data collection helps to build more accurate models and improve the accuracy and reliability of predictions.

[0040] Preprocessing steps clean and standardize data, handling missing values, outliers, and noisy data to ensure data consistency and integrity. This not only improves data quality but also enhances model stability and predictive performance. Standardization normalizes all features to the same scale, helping to avoid the impact of dimensional differences between features on model training.

[0041] By preprocessing, data of different sources and formats are integrated into a unified input format, which helps to improve the generalization ability of the model and make it adapt to different monitoring environments and data distributions. This is crucial for building a risk prediction model that can run stably in different regions and time periods.

[0042] S2, extract time features and spatial features from preprocessed data and divide preprocessed data into training set, validation set and test set; by extracting time features and spatial features, multi-dimensional factors affecting algae proliferation can be more comprehensively represented. Time features (such as seasonality, diurnal variation, long-term trend, etc.) help capture the regularity in time series, and spatial features (such as distance between monitoring points, geographical location, etc.) help understand the spatial relationship. This comprehensive feature representation helps the model more accurately capture potential patterns and trends.

[0043] The extraction of time features and spatial features enables the model to utilize more useful information, thereby improving the prediction performance. For example, seasonal features can help the model understand the algae proliferation patterns in different seasons, and geographical location features can help the model understand the environmental differences in different regions. Through the introduction of these features, the model can more accurately predict the risk of algae proliferation.

[0044] S3, based on spatial features, construct a graph structure between monitoring points, represent each monitoring point as a node in the graph, represent the relationship between nodes as edges, and define the weight of edges as the inverse of the distance between nodes; spatial features play a crucial role in environmental monitoring. By incorporating spatial features into the graph structure, the model can more effectively utilize geographical location information and improve prediction performance. Specifically, graph neural networks can perform convolution operations on graph structures, effectively aggregating information from neighboring nodes, thereby improving prediction accuracy. In environmental monitoring and management, the optimal allocation of resources is critical. By constructing a graph structure based on spatial features, key monitoring points and high-risk areas can be identified, thereby optimizing the allocation and use of resources and improving the efficiency of monitoring and management.

[0045] S4, use the data obtained in steps S2 and S23 to build a graph neural network model;

[0046] S5, train the initial model using meta-learning methods to enable it to quickly adapt to new data distributions and environmental changes; learn a good parameter initialization by training on multiple different but related tasks. This initial model can be quickly adjusted with a small amount of new data to achieve rapid adaptation to new tasks, thereby greatly reducing the training time. Meta-learning methods train on multiple tasks, enabling the model to have stronger generalization ability when facing new tasks. Compared with traditional methods, meta-learning can better handle different data distributions and environmental changes, improving the model's performance on unknown tasks. Meta-learning methods train on different tasks and environments, enabling the model to better handle changes in data distribution and environment. Such a model has higher robustness and can maintain stable performance in various situations.

[0047] S6, train the graph neural network model using the training set data to optimize the model parameters, the training process includes hyperparameter tuning and early stopping through validation set data; by using training set data to train the model, the complex patterns and relationships in the data can be effectively captured, and a model with high expression ability can be constructed. This process ensures that the model can learn useful features and rules from rich data, thereby improving its prediction performance. Hyperparameter tuning through validation set can select the best combination of hyperparameters during model training. This includes adjusting learning rate, regularization parameter, number of hidden layers and number of nodes, etc. to achieve the best state of model performance. Hyperparameter tuning is a key step to improve the generalization ability of the model, avoiding overfitting of the model on the training set, making its performance on unknown data more stable and reliable.

[0048] S7, use the trained model to predict the test set data and calculate the accuracy, precision, recall and F1 score of the model. The prediction results are further explained by calculating the attention weight to determine which spatio-temporal features have a large impact on the prediction

[0049] In this embodiment, the water quality data in step S1 includes water temperature, pH value, dissolved oxygen, nitrogen, phosphorus and other parameters, the geographic information includes the latitude and longitude of the monitoring points, and the historical algal proliferation event data records the algal proliferation situation of each monitoring point. The time features in step S2 include daily, weekly or monthly average values of water quality parameters, and the spatial features include geographical proximity relationships between monitoring points.

[0050] The graph neural network model of the embodiment includes an input layer, a graph convolution layer, and an output layer. The input layer accepts node features. The graph convolution layer is used to propagate and aggregate node features. The output layer is used to predict the algae proliferation risk of each node. By including the input layer, the graph convolution layer, and the output layer, an effective and powerful structure is constructed to predict the algae proliferation risk of each node. The input layer accepts node features, ensuring that the model can comprehensively receive and utilize water quality parameters, geographic information, and other data of monitoring points. The graph convolution layer utilizes graph structure to propagate and aggregate node features, integrates the information of adjacent nodes through convolution operation, captures the spatial relationship and mutual influence between nodes, and improves the accuracy and richness of feature expression. The output layer maps the aggregated features to prediction values and directly outputs the algae proliferation risk of each node. This structured method not only improves the model's ability to capture complex relationships and patterns, but also enhances the model's prediction performance and generalization ability.

[0051] In the embodiment, after the graph neural network model is constructed, an attention mechanism is integrated into the graph neural network model to automatically focus on the most important spatio-temporal features for prediction. The attention mechanism includes temporal attention i,t and spatial attention i,j . The important features h A are determined by calculating the weighted sum of features using the formula . By integrating the attention mechanism into the model, the model automatically focuses on the most important spatio-temporal features for prediction, which has significant benefits. The attention mechanism, including temporal attention and spatial attention, can determine important features by calculating the weighted sum of features using the formula. This integration not only significantly enhances the model's understanding and capture ability of complex spatio-temporal relationships, but also improves the model's prediction accuracy and interpretability. Temporal attention can help the model identify key change points in time series, such as seasonal trends or the impact of sudden events; spatial attention enables the model to focus on the mutual influence between monitoring points in close geographical proximity. The introduction of this dual attention mechanism enables the model to dynamically adjust feature weights, highlighting important features and ignoring noise, thereby improving the model's robustness and adaptability under different environments and data distributions.

[0052] In the embodiment, the graph structure between monitoring points is constructed based on spatial features. Each monitoring point is represented as a node in the graph, the relationship between nodes is represented as an edge, and the weight of the edge is defined as the reciprocal of the distance between nodes. The steps are as follows:

[0053] Obtain the latitude and longitude data of the monitoring points and related water quality parameters, calculate the geographical distance d ij between each pair of monitoring points, and calculate the latitude difference ij and longitude difference ij between each pair of monitoring points. Use the formula Calculate the edge weight w between each pair of monitoring points ij Add edges for each pair of monitoring points with distance less than a certain threshold according to the calculated weight w ij where h i and h j represent the water quality parameters of monitoring points i and j respectively, and α, β, γ are hyperparameters that need to be tuned to balance the influence of each part. By obtaining the latitude and longitude data of monitoring points and related water quality parameters, the geographical distance between each pair of monitoring points is calculated, and the latitude difference and longitude difference between each pair of monitoring points are calculated. The edge weight between each pair of monitoring points is calculated using the formula, and edges are added for each pair of monitoring points with distance less than a certain threshold according to the calculated weight, which can significantly improve the spatial feature capture ability and prediction performance of the model. This method accurately reflects the spatial relationship and mutual influence between monitoring points by considering geographical distance and environmental parameters, ensuring that the model can focus on the most important neighboring relationships. The introduction of adjustable hyperparameters can flexibly balance the influence of each part, making the model maintain high adaptability and generalization ability under different environments and data distributions. The rationalization of edge weights and threshold control not only avoids the excessive complexity of the graph structure, but also preserves the key spatial relationships and improves the computational efficiency. In addition, through the explicit edge weight calculation formula, the decision-making process of the model is more transparent and interpretable, enhancing the user's understanding and trust in the model's prediction results.

[0054] In this embodiment, the meta-learning method includes model-agnostic meta-learning, which quickly adjusts model parameters through a small amount of task data. The meta-training phase includes the following steps

[0055] Sample multiple tasks from the task distribution p(T), each task representing data of different monitoring points or time periods; for each task, perform several steps of gradient descent using the current model parameters θ to obtain task-specific parameters θ'i, expressed as where α is the learning rate of the inner loop, is the loss function on task T i , f θ is the model with parameters θ; use the task-specific parameters θ'i iThe loss on the validation set is calculated, the gradient relative to the initial parameters θ is calculated, and the initial parameters θ are updated. Through multi-task sampling and training, the model can learn general features and patterns from different tasks, enhancing the generalization ability and robustness of the model. Second, task-specific parameter adjustment enables the model to quickly adapt to the data distribution of new tasks, enabling efficient transfer learning. The inner loop gradient descent optimization enables the model to quickly update with a small amount of data and a small number of training steps, greatly improving the model's adaptation speed on new tasks. Finally, this meta-learning-based method, through repeated training and adjustment on different tasks, enables the model to maintain stable high-performance performance when facing changing environments and data distributions, significantly enhancing adaptability and flexibility.

[0056] The steps of the embodiment in the task fine-tuning stage are

[0057] The initial parameters θ are obtained using meta-training; a few steps of gradient descent are performed on a small amount of data of the new task to adjust the model parameters, and the expression is where θ' represents the updated model parameters. By adjusting the initial parameters θ, the model parameters on the new task are obtained, α represents the learning rate, which is used to control the step size of parameter updating, and L new task represents the loss function on the new task. Through a small amount of data and fast gradient descent steps, the model can quickly adjust itself to adapt to the data distribution of the new task, greatly shortening the training time and improving efficiency. This method effectively utilizes the existing initial parameters, enabling the model to quickly achieve good performance on the new task, embodying efficient transfer learning capability. The learning rate α controls the step size of parameter updating, ensuring that the adjustment process is stable and effective. Through subtle adjustment of the initial parameters, the model can quickly optimize on the new task, greatly enhancing the flexibility and generalization ability of the model, adapting to changing environments and data distributions, and providing a solid foundation for fast response and efficient decision-making in practical applications.

[0058] The present application is not limited to the above embodiments, and anyone should know that structural changes made under the inspiration of the present application fall within the scope of the present application. Any technical, shape, or structure not described in detail in the present application is a known technology.

Claims

1. A method of predicting algal proliferation risk based on a machine learning model, characterized by, The method comprises the following steps: S1, collecting water quality data, geographic information and historical algal proliferation event data and preprocessing the collected data; S2, extracting time features and space features from the preprocessed data and dividing the preprocessed data into a training set, a validation set and a test set; S3, constructing a graph structure between monitoring points based on space features, representing each monitoring point as a node in the graph, representing the relationship between nodes as an edge, and defining the weight of the edge as the reciprocal of the distance between nodes; S4, constructing a graph neural network model using the data obtained in steps S2 and S23; S5, training the initial model using a meta-learning method to quickly adapt to new data distribution and environmental changes; S6, training the graph neural network model using the training set data to optimize the model parameters, the training process including hyperparameter tuning and early stopping through validation set data; S7, using the trained model to predict the test set data and calculating the accuracy, precision, recall and F1 score of the model. 2.The algal proliferation risk prediction method based on a machine learning model according to claim 1, characterized in that, The water quality data in step S1 includes water temperature, pH, dissolved oxygen, nitrogen, phosphorus and other parameters, the geographic information includes the latitude and longitude of the monitoring points, and the historical algal proliferation event data records the algal proliferation of each monitoring point. The time features in step S2 include daily, weekly or monthly water quality parameter averages, and the space features include geographic proximity relationships between monitoring points.

3. The method of claim 1, wherein the method is based on a machine learning model. The graph neural network model includes an input layer, a graph convolution layer and an output layer, the input layer accepts node features, the graph convolution layer is used to propagate and aggregate node features, and the output layer is used to predict the algal proliferation risk of each node. 4.The algal proliferation risk prediction method based on a machine learning model according to claim 1, wherein, After the graph neural network model is constructed, an attention mechanism is integrated into the graph neural network model to automatically focus on the most important spatiotemporal features for prediction, the attention mechanism including time attention alpha i,t and spatial attention beta i,j , and important features h A are determined by calculating feature weighted summation through formula . 5.The algal proliferation risk prediction method based on a machine learning model according to claim 1, wherein, The step of constructing a graph structure between monitoring points based on space features, representing each monitoring point as a node in the graph, representing the relationship between nodes as an edge, and defining the weight of the edge as the reciprocal of the distance between nodes is: Obtain the latitude and longitude data of the monitoring points and the related water quality parameters, calculate the geographical distance d between each pair of monitoring points ij , and calculate the latitude difference θ ij and the longitude difference φ ij between each pair of monitoring points, using the formula Compute edge weights w between each pair of monitoring points ij , according to the computed weights w ij Add edges between each pair of monitoring points with distance less than a certain threshold, where h i and h j are the water quality parameters of monitoring points i and j, respectively, and a, b, g are hyperparameters that need to be tuned to balance the influence of each part. 6.The algal proliferation risk prediction method based on a machine learning model according to claim 1, wherein, The meta-learning method includes model-agnostic meta-learning, which quickly adjusts model parameters through a small amount of task data.

7. The algal proliferation risk prediction method based on a machine learning model according to claim 6, characterized in that, The meta-training phase comprises the following steps Sample multiple tasks from the task distribution p(T), each task representing data of different monitoring points or time periods; For each task, a few steps of gradient descent are performed using the current model parameters θ to obtain task-specific parameters θ' i whose expression is where a is the learning rate of the inner loop, is the loss function of task T i fθ is the model with parameters θ; Using task-specific parameters θ' i Loss on the validation set, compute the gradient with respect to the initial parameters θ, and update the initial parameters θ. 8.The algal proliferation risk prediction method based on a machine learning model according to claim 6, wherein, The steps in the task fine-tuning phase are Use the initial parameters θ obtained by meta-training; A few steps of gradient descent are performed on the new task with a small amount of data to adjust the model parameters, expressed as where θ' represents the updated model parameters. By adjusting the initial parameters θ, the model parameters on the new task are obtained, and α represents the learning rate, which is used to control the step size of parameter updating, L new task represents the loss function on the new task. 9.The algal proliferation risk prediction method based on a machine learning model according to claim 1, wherein, The prediction result is further explained by calculating the attention weight to determine which spatio-temporal features have a large impact on the prediction.

Citation Information

Patent Citations

  • Water quality prediction method and device and server

    CN112529296A

  • Marine harmful algae concentration prediction method and system based on deep learning

    CN116050645A

  • Water quality early warning method based on improved meta learning

    CN116628444A

  • Method for intelligently predicting dynamic state of cyanobacteria population in reservoir

    CN117493942A

Cited By

  • Chuzhou crucian carp sporozoiasis risk early warning method and system based on multiple environmental factors

    CN121836396A

  • Dissolved oxygen prediction correction method fusing graph neural network and extreme value distribution

    CN121859024A

  • Intensive breeding precise feeding control method based on fuzzy-MPC control

    CN121900193A

  • Drainage basin water quality multi-step forecast uncertainty quantification method and system based on double-flow graph state space model

    CN122113761A