Prediction method for growth of blue-green algae and intelligent regulation and control device

Through the weighted fusion of random forest and support vector machine models, a dynamically optimized fusion model is formed, which solves the shortcomings of the existing cyanobacter growth prediction methods in complex nonlinear relationship processing, realizes high-precision prediction and real-time regulation, and improves cyanobacter culture efficiency and stability.

CN119312274AActive Publication Date: 2025-01-14SHANGHAI JIAOTONG UNIV

Patent Information

Application Number
CN202411347580.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-14
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The existing cyanobacteria growth prediction methods are insufficient in dealing with complex nonlinear relationships, lack real-time adjustment and feedback mechanisms, and have low system integration, resulting in low cyanobacteria culture efficiency and stability.

Method used

The weighted fusion method of the random forest and support vector machine model is adopted to form a dynamically optimized fusion model through data preprocessing and model construction, and combined with real-time sensor data for prediction and regulation to achieve real-time adjustment and feedback of the model.

Benefits of technology

The accuracy and system response speed of cyanobacteria growth prediction are improved, dynamic adaptation to environmental changes is achieved, the efficiency and stability of cyanobacteria culture is improved, production costs are reduced, and greenhouse gas emissions are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312274A_ABST
    Figure CN119312274A_ABST
Patent Text Reader

Abstract

The invention discloses a blue-green algae growth prediction method and an intelligent regulation and control device, and relates to the field of blue-green algae growth prediction and regulation and control, and the method comprises the steps: carrying out the collection of blue-green algae growth related data, data preprocessing, random forest model construction, SVM model construction, and model weight fusion of a final random forest prediction model and a final SVM prediction model to obtain a fusion model. And dynamically optimizing the fusion model, finally obtaining the dynamically optimized fusion model, obtaining a real-time prediction result according to the dynamically optimized fusion model by using the blue-green algae growth related data collected by the sensor module in real time, and adjusting the blue-green algae growth culture conditions in real time. According to the method, the advantages of the random forest model and the SVM model are combined, a fusion model with dynamic optimization and real-time adjustment functions is developed, and the accuracy and adaptability of blue-green algae growth prediction are remarkably improved. And meanwhile, data acquisition, processing and prediction modules are integrated, so that the accuracy of blue-green algae growth prediction and the automation degree of the system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of cyanobacteria growth prediction and regulation, and in particular to a cyanobacteria growth prediction method and an intelligent regulation device. Background Art

[0002] Cyanobacteria, also known as blue-green algae, is an important class of photosynthetic prokaryotes that are widely distributed in various aquatic environments. Cyanobacteria can fix carbon dioxide and generate organic matter through photosynthesis, so they have important potential in biofuel production. Cultivating cyanobacteria to convert atmospheric carbon dioxide into biomass and then further convert it into biofuels not only helps reduce greenhouse gas emissions, but also provides a new way to develop renewable energy.

[0003] Traditional cyanobacteria growth prediction methods mainly rely on statistical models and empirical formulas based on physical and chemical parameters. Although these methods can reflect the growth trend of cyanobacteria to a certain extent, they are often not accurate enough when dealing with complex nonlinear relationships and lack real-time adjustment and feedback mechanisms.

[0004] Moreover, existing prediction systems are usually single modules that fail to effectively integrate multiple links such as sensor data collection, data processing, and model prediction. This decentralized system structure makes it difficult to achieve real-time adjustment and feedback, resulting in low efficiency and stability in the cyanobacteria cultivation process.

[0005] Existing cyanobacteria growth control technologies lack real-time feedback. On the one hand, existing cyanobacteria growth prediction technologies mainly rely on static models, which are not designed with real-time data processing capabilities in mind. Static models are usually trained based on historical data and lack a mechanism to process real-time input data, so they cannot respond to environmental changes in real time.

[0006] On the other hand, there are system design defects. Due to the low integration of data acquisition and processing systems, there are bottlenecks in the real-time feedback link. For example, the existing system may require manual data input and cannot automatically collect and process real-time sensor data.

[0007] Secondly, the level of automated control is low. In existing systems, the prediction model and the control system are usually separated. The results generated by the prediction model need to be manually interpreted and processed, and cannot directly drive the control system to operate. This is mainly due to the lack of effective interfaces and automated integration technologies. Manual operation not only increases reaction time, but also easily introduces human errors, resulting in unstable culture conditions. In addition, manual intervention makes it difficult for the system to achieve efficient and low-cost operation in large-scale production.

[0008] In recent years, with the development of machine learning technology, the use of data-driven methods to predict the growth of cyanobacteria has gradually become a research hotspot. In particular, the random forest (RF) model and the support vector machine (SVM) model, as two effective machine learning models, have shown strong application potential in improving the prediction accuracy of cyanobacteria growth rate and guiding cyanobacteria carbon fixation to convert biofuels because they can capture complex nonlinear relationships in data.

[0009] However, at present, the application of random forest (RF) and support vector machine (SVM) models in cyanobacteria growth prediction has certain limitations. Specifically, although the RF model can handle large-scale data sets well and reduce the risk of overfitting, it performs poorly in capturing complex nonlinear relationships; while the SVM model has advantages in handling nonlinear boundaries, it has high requirements for data scale and computing resources, and its application on large data sets is challenging. In addition, existing prediction methods usually lack real-time adjustment capabilities and are difficult to adapt to dynamically changing environmental conditions.

[0010] There are many shortcomings in the application of existing technologies in the prediction of cyanobacteria growth. First, a single prediction model often finds it difficult to capture both the global patterns and local details of environmental data at the same time, resulting in low prediction accuracy. Second, the existing system lacks real-time adjustment capabilities, making it difficult to cope with dynamic changes in the environment and unable to adjust the model prediction results in a timely manner. In addition, the system has a low degree of integration, and sensor data collection, data processing, and model prediction are handled separately, resulting in a slow system response speed and reducing the efficiency of cyanobacteria cultivation.

[0011] Therefore, technicians in this field are committed to developing a high-precision prediction method and intelligent control device. Summary of the invention

[0012] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is how to develop a high-precision prediction method and an intelligent control device.

[0013] To achieve the above object, the present invention provides a method for predicting the growth of cyanobacteria, the method comprising the following steps:

[0014] Step 1: Collect data related to cyanobacteria growth.

[0015] Step 2, data preprocessing, wherein the data preprocessing includes performing outlier processing, data normalization, and data format adjustment on the blue algae growth related data to obtain a preprocessed data set;

[0016] Step 3: Random forest model construction, including the following steps:

[0017] Step 3.1, randomly dividing the preprocessed data set into a first training set and a first test set at 70% and 30%;

[0018] Step 3.2, training a random forest model on the first training set, using the out-of-bag error to evaluate the performance of the random forest model, adjusting the hyperparameters of the random forest model, and completing the training when the out-of-bag error no longer decreases to obtain a trained random forest prediction model;

[0019] Step 3.3, using the first test set to evaluate the trained random forest prediction model, calculate the evaluation index, and determine whether the evaluation index meets the accuracy requirement. When the accuracy requirement is met, the final random forest prediction model is obtained, otherwise, return to step 3.2;

[0020] Step 3.4, training the final random forest prediction model with the preprocessed data set to obtain a random forest cyanobacteria biomass prediction result on the preprocessed data set;

[0021] Step 4: SVM model construction, including the following steps:

[0022] Step 4.1, combining the random forest cyanobacteria biomass prediction result on the preprocessed data set in step 3.4 with the preprocessed data set in step 2 to obtain a merged data set, normalizing the merged data set and randomly dividing it into a second training set and a second test set in a ratio of 70% and 30%;

[0023] Step 4.2, performing SVM model training on the second training set, using cross-validation to evaluate the performance of the SVM model, adjusting the hyperparameters of the SVM model, and completing the training when the cross-validation error no longer decreases to obtain a trained SVM prediction model;

[0024] Step 4.3: Use the second test set to evaluate the trained SVM prediction model, calculate the evaluation index, and determine whether the evaluation index meets the accuracy requirement. If the accuracy requirement is met,

[0025] Get the final SVM prediction model, otherwise return to step 4.2;

[0026] Step 5: performing model weighted fusion on the final random forest prediction model and the final SVM prediction model to obtain a fusion model, comprising the following steps:

[0027] Step 5.1, dividing the preprocessed data set into a third training set and a validation set;

[0028] Step 5.2, cross-validation is performed on the third training set, wherein the cross-validation is to perform training on the final random forest prediction model and the final SVM prediction model with the third training set, respectively, to obtain the random forest cyanobacteria biomass prediction result and the SVM model cyanobacteria biomass prediction result on the third training set, and the random forest cyanobacteria biomass prediction result and the SVM model cyanobacteria biomass prediction result on the third training set are set to different weight combinations, and the cross-validation mean square error and the cross-validation mean absolute error of each weight combination are calculated;

[0029] Step 5.3, performing experimental verification on the verification set, the experimental verification is to use the final random forest prediction model and the final SVM prediction model to perform predictions on the verification set, respectively, to obtain the random forest model cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the verification set, apply the different weight combinations to the random forest model cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the verification set, calculate and record the experimental verification mean square error and experimental verification mean absolute error under each weight combination;

[0030] Step 5.4, selecting the weight combination with the smallest cross-validation mean square error and the smallest cross-validation mean absolute error, and the smallest experimental verification mean square error and the smallest experimental verification mean absolute error as the weighted weights of the final random forest prediction model and the final SVM prediction model, to obtain the fusion model;

[0031] Step 6: Dynamic optimization of the fusion model, including the following steps:

[0032] Step 6.1, regularly inputting the real-time collected cyanobacteria growth related data into the fusion model to obtain a real-time prediction result of cyanobacteria biomass, comparing the real-time prediction result with the actual measured cyanobacteria biomass result, and calculating the error of the fusion model, wherein the error of the fusion model includes the fusion model mean square error and the fusion model mean absolute error;

[0033] Step 6.2: adjusting the fusion model parameters and assigning weights according to the fusion model error.

[0034] A dynamically optimized fusion model is obtained, wherein the model parameter adjustment includes kernel function parameter adjustment;

[0035] Step 7: inputting the blue algae growth related data collected in real time into the dynamically optimized fusion model to obtain the real-time prediction result of the blue algae biomass after dynamic optimization.

[0036] Furthermore, the cyanobacteria growth related data include ambient temperature, ambient CO2 concentration, light intensity, pH value of the culture solution and nitrate concentration of the culture solution.

[0037] Furthermore, the evaluation indicators include mean square error, mean absolute error, and determination coefficient.

[0038] Furthermore, the hyperparameters of the final random forest prediction model are set as the number of trees is 100 and the maximum depth of the trees is None.

[0039] Furthermore, the hyperparameters of the final SVM prediction model are set to an RBF kernel function, and the parameter C of the RBF kernel function is 1.0 and the parameter γ is scale.

[0040] Furthermore, the cyanobacteria biomass is optical density.

[0041] And an intelligent control device for the growth of cyanobacteria, the device comprising a sensor module, a data processing module, a prediction model training module, a real-time data input module, and an intelligent control module, the device being configured to be able to perform the method according to claim 1, wherein:

[0042] The sensor module is configured to collect data related to the growth of blue algae;

[0043] The data processing module is configured to acquire the blue algae growth related data from the sensor module in real time and perform the data preprocessing;

[0044] The prediction model training module includes:

[0045] A random forest model training unit, which is configured to be able to perform the random forest model construction,

[0046] A SVM model training unit, which is configured to be able to perform said SVM model building,

[0047] a model weighted fusion unit, which is configured to be able to perform the model weighted fusion,

[0048] A fusion model dynamic optimization unit, which is configured to be able to perform dynamic optimization of the fusion model;

[0049] The real-time data input module is configured to receive the blue algae growth related data collected by the sensor module in real time, and input the data into the dynamically optimized fusion model for prediction;

[0050] The intelligent control module is configured to adjust the cyanobacteria growth and culture conditions in real time according to the real-time prediction result of the cyanobacteria biomass after the dynamic optimization.

[0051] Furthermore, the sensor module includes a temperature sensor, a pH sensor, a CO2 sensor, a nitrate sensor, and a light sensor.

[0052] Furthermore, the device comprises:

[0053] A temperature control subsystem, which is configured to automatically adjust the ambient temperature through a heating or cooling device;

[0054] A CO2 injection subsystem, which is configured to adjust the amount of carbon dioxide injected and automatically adjust the ambient CO2 concentration;

[0055] a lighting control subsystem configured to automatically adjust the lighting intensity by adjusting the intensity and duration of the light source;

[0056] A pH adjustment subsystem, which is configured to automatically adjust the pH value of the culture solution by adding acid or alkali;

[0057] The nutrient solution supplement subsystem is configured to supplement nitrate and automatically adjust the nitrate concentration of the culture solution.

[0058] Furthermore, the device further comprises a user interaction module, and the user interaction module comprises:

[0059] A display screen configured to display the blue algae growth-related data collected in real time, the real-time prediction result of the blue algae biomass after the dynamic optimization, and the blue algae growth and culture conditions;

[0060] A control panel is configured to allow a user to manually input or adjust the cyanobacteria growth culture conditions and view the real-time prediction results and historical data of the cyanobacteria biomass after the dynamic optimization.

[0061] The technical effects of the present invention are as follows:

[0062] (1) Utilize the complementarity of the random forest (RF) model and the support vector machine (SVM) model: the RF model is good at capturing global patterns in large-scale data sets and reducing the risk of overfitting; the SVM model has advantages in dealing with small sample learning and nonlinear boundaries. By combining these two models, the fusion model can provide accurate predictions on both global trends and local details.

[0063] The multi-decision tree structure of the RF model can capture the complex patterns and nonlinear relationships in the data. At the same time, the SVM model further refines the data boundaries and extreme value processing by constructing a hyperplane in high-dimensional space. The weighted fusion of the two makes the modeling of complex data more accurate.

[0064] Moreover, the fusion model formed by reasonable weight distribution can make full use of the respective advantages of RF and SVM, further improve the accuracy of cyanobacteria growth prediction and system response speed, and overcome the shortcomings of a single model in complex nonlinear data processing.

[0065] (2) The fusion model can be dynamically optimized according to the characteristics of the cyanobacteria growth-related data and cyanobacteria biomass data at different growth stages, ensuring that the best prediction results can be provided at different cyanobacteria growth stages. This dynamic optimization significantly improves the prediction accuracy of the model and reduces the prediction error. However, the traditional model cannot process data in real time because it lacks adaptability to dynamic changes. The combination of the real-time data processing module and the fusion model of the present invention enables the system to dynamically adapt to changes in the environment, improving the accuracy and response speed of the prediction.

[0066] (3) The closed-loop system integrates real-time sensor data acquisition, fusion model prediction, and intelligent control, which can respond quickly to environmental changes within seconds. Real-time data is input through the system, and the fusion model immediately outputs the prediction results and feeds back to control the culture conditions, realizing the high automation and intelligence of the cyanobacteria cultivation process. Among them, by using high-precision sensors to collect environmental data (such as temperature, pH value, CO2 concentration, etc.) in real time, the data is pre-processed by the data processing module and directly input into the fusion model. The fusion model can make predictions immediately after receiving the data and adjust the culture conditions through the intelligent control module. Therefore, the system can process and feedback environmental data in real time, improving the accuracy of prediction and the response speed of the system. Compared with the existing technology, the system can quickly adjust the culture conditions to ensure that cyanobacteria grow in the best environment. The culture conditions can be automatically adjusted without manual intervention. Ensure the controllability and stability of the culture process. The automatic control of the system ensures the controllability and continuous stability of the culture process and reduces the fluctuations that may occur in the production process. Through optimized resource utilization, the system not only improves the production efficiency and output of cyanobacteria, but also reduces production costs and increases economic benefits; it also reduces greenhouse gas emissions and the negative impact on the environment.

[0067] The present invention combines the advantages of RF and SVM models to develop a fusion model with dynamic optimization and real-time adjustment functions, which significantly improves the accuracy and adaptability of cyanobacteria growth prediction. At the same time, it integrates data acquisition, processing and prediction modules, significantly improving the accuracy of cyanobacteria growth prediction and the automation of the system.

[0068] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1is a flow chart of a method for predicting the growth of cyanobacteria according to a preferred embodiment of the present invention;

[0070] Figure 2 Schematic diagram of an intelligent control device for the growth of blue algae according to a preferred embodiment of the present invention, wherein:

[0071] 1- stirring paddle, 2- ph sensor, 3- CO2 sensor, 4- nitrate sensor, 5- light sensor, 6- temperature sensor, 7- PLC control cabinet, 8- control cabinet display screen. DETAILED DESCRIPTION

[0072] The following describes several preferred embodiments of the present invention with reference to the drawings in the specification, so that the present invention is clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.

[0073] In the drawings, components with the same structure are indicated by the same numerical reference numerals, and components with similar structures or functions are indicated by similar numerical reference numerals. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, the thickness of the components is appropriately exaggerated in some places in the drawings.

[0074] Example 1

[0075] like Figure 1 As shown, it is a flow chart of the prediction method of cyanobacteria growth based on the machine learning model. The specific steps are as follows:

[0076] Step 1: Data Collection

[0077] During the growth of cyanobacteria, a high-precision monitoring system is used to obtain data related to cyanobacteria growth, including temperature, pH value, CO2 concentration, light intensity and nitrate concentration. Data is collected every minute to ensure data continuity and high accuracy.

[0078] Step 2: Data preprocessing to obtain the preprocessed data set

[0079] Data cleaning: Use the 3σ rule to filter data and delete outliers that exceed 3 times the standard deviation to ensure data quality and avoid adverse effects of outliers on model training.

[0080] Data normalization: Standardize the data to the same scale to eliminate the dimensional differences between different features so that the model can be trained and predicted more stably. The normalization formula is: X'=(X-X_min) / (X_max-X_min).

[0081] Data format adjustment: Adjust the data to floating-point tensor (float_tensor) format to ensure that the data can be correctly processed by the machine learning model.

[0082] Step 3: Random Forest Model Construction

[0083] Step 3.1, data segmentation: The preprocessed data set is randomly divided into the first training set and the first test set at 70% and 30% respectively.

[0084] Step 3.2, model training: Perform random forest model training on the first training set, and evaluate the model performance through the out-of-bag error (OOB error). Use the `scikit-learn` library in Python to adjust the number of hyperparameters of the random forest model (including the number of trees and the maximum depth of the tree). When the out-of-bag error is no longer significantly reduced, the training is completed to obtain the trained random forest prediction model.

[0085] Step 3.3, model evaluation: Evaluate the trained random forest prediction model on the first test set, and calculate the evaluation indicators of the trained random forest prediction model on the test set, including mean square error (MSE), mean absolute error (MAE), determination coefficient (R 2 ) to comprehensively evaluate the prediction performance of the trained random forest prediction model and ensure its generalization ability and accuracy on unseen data. If the evaluation indicators do not meet the expected performance standards (i.e., the generalization ability and accuracy are insufficient), return to step 3.2 to retrain, adjust the hyperparameters of the random forest model (including the number of trees and the maximum depth of the trees), and retrain the model until the MSE, MAE, and R on the test set are 2 The expected standards were met and a random forest prediction model that had been tested and evaluated was obtained.

[0086] Step 3.4, output results: output the random forest prediction model that has been tested and evaluated and the random forest cyanobacteria biomass prediction result obtained by using the random forest prediction model that has been tested and evaluated on the preprocessed data set. In this embodiment, the cyanobacteria biomass adopts the cyanobacteria optical density (OD value) to represent the growth trend of cyanobacteria.

[0087] The number of trees and the maximum depth of the trees are optimized to better capture the main trends and complex nonlinear relationships in the data. Experimental verification shows that the combination of setting the number of trees to 100 and the maximum depth of the trees to None performs best in balancing the complexity of the model and computational efficiency. This setting can fully capture the complex patterns in the data while avoiding overfitting.

[0088] Step 4: SVM model construction

[0089] Step 4.1, data preparation: Combine the random forest cyanobacteria biomass prediction results of step 3.4 with the original data (the data set preprocessed in step 2), perform normalization, and randomly divide them into the second training set and the second test set at 70% and 30%.

[0090] Step 4.2, model training: SVM model training is performed on the second training set, and the performance of the SVM model is evaluated through 10-fold cross validation. The performance of the SVM model is optimized by adjusting the hyperparameters of the SVM model (kernel function type, parameters C and γ, etc.). When the cross-validation error is no longer significantly reduced, the training is completed and the trained SVM prediction model is obtained.

[0091] Step 4.3, model evaluation: Use the second test set to evaluate the trained SVM prediction model, and calculate the evaluation indicators of the trained SVM prediction model on the second test set, including mean square error (MSE), mean absolute error (MAE), determination coefficient (R 2 ), comprehensively evaluate the prediction performance of the trained SVM prediction model to ensure its generalization ability and accuracy on unseen data. If the evaluation indicators do not meet the expected performance standards (i.e., the generalization ability and accuracy are insufficient), return to step 4.2 to retrain, adjust the hyperparameters of the SVM model (including the kernel function type, parameters C and γ, etc.), and retrain the model until the MSE, MAE, and R on the second test set are higher than the MSE, MAE, and R on the second test set. 2 The expected standards were met and a SVM prediction model that had been tested and evaluated was obtained.

[0092] Step 4.4, output results: output the SVM prediction model and SVM cyanobacteria biomass prediction results that have been tested and evaluated, that is, the cyanobacteria optical density (OD value), which are used to further accurately predict the growth trend of cyanobacteria.

[0093] After cross-validation, the kernel function is set to RBF kernel function, and the combination of RBF kernel function parameters C = 1.0 and γ = scale, the prediction effect of SVM prediction model is the best. By selecting an appropriate kernel function, namely RBF kernel, the model's ability to handle complex data structures can be enhanced. Setting the RBF kernel function parameters C = 1.0 and γ = scale can provide the best classification accuracy when processing complex nonlinear boundaries.

[0094] In support vector machines (SVMs), the main function of kernel functions is to map input data to a higher-dimensional feature space, so that nonlinear relationships in the original data become linearized, which is convenient for classification or regression. Common kernel functions include linear kernels, radial basis function (RBF) kernels, polynomial kernels, etc. The radial basis function (RBF) kernel function is a commonly used kernel function, especially when processing data with complex nonlinear relationships. The RBF kernel function can flexibly adjust the boundaries in high-dimensional space and capture complex patterns in the data. This is particularly important for applications such as cyanobacteria growth prediction that are affected by multiple nonlinear factors. The linear kernel function is only applicable to linearly separable data sets and cannot handle complex nonlinear relationships. In the application of cyanobacteria growth prediction, the relationship between environmental factors and cyanobacteria biomass is usually nonlinear, so the linear kernel is not suitable for this scenario. Although the polynomial kernel can also handle nonlinear relationships, it often requires the adjustment of the order of the polynomial, which has a large computational overhead and is prone to overfitting or underfitting of the model. The RBF kernel function provides a better balance between complexity and computational efficiency. After experiments and cross-validation, the RBF kernel function performs better than other kernel functions on actual data sets, can better adapt to the complex relationships in cyanobacteria growth prediction, and provide higher prediction accuracy and stability.

[0095] By combining the preliminary cyanobacterial biomass prediction results of the random forest prediction model, the SVM prediction model can further optimize and refine the prediction and handle complex boundary situations.

[0096] Step 5: Weighted fusion of models to obtain fusion model

[0097] The weighted fusion method is as follows:

[0098] Formula: Yfinal=wRF×YRF+wSVM×YSVM Wherein, Yfinal represents the final prediction result of the fusion model, that is, the prediction result of cyanobacteria biomass (optical density OD value in this embodiment) obtained by weighting the prediction results of the random forest (RF) model and the support vector machine (SVM) model that have been tested and evaluated, YRF represents the prediction result of cyanobacteria biomass (optical density OD value in this embodiment) generated by the random forest model alone, YSVM represents the prediction result of cyanobacteria biomass (optical density OD value in this embodiment) generated by the support vector machine model alone, wRF and wSVM represent the weights of the cyanobacteria biomass prediction results of random forest and SVM, respectively. Through cross-validation and experimental verification, the optimal wRF and wSVM are determined as the weighted weights of the random forest prediction model and the SVM prediction model to obtain the fusion model. The specific process is as follows:

[0099] The preprocessed dataset is divided into a third training set and a validation set.

[0100] 1. Cross validation: The third training set is used to train the random forest prediction model and the SVM prediction model obtained in step 3 and step 4, respectively, to obtain the cyanobacteria biomass prediction results of the random forest model and the cyanobacteria biomass prediction results of the SVM model on the third training set. Perform 10-fold cross validation. The cyanobacteria biomass prediction results of the random forest model and the cyanobacteria biomass prediction results of the SVM model on the third training set are set to different weight combinations (for example, wRF=0.4, wSVM=0.6, wRF=0.5, wSVM=0.5, etc.). In each fold of cross validation, the cross validation mean square error (MSE) and cross validation mean absolute error (MAE) of each weight combination are calculated, and the wRF and wSVM corresponding to the minimum cross validation MSE and cross validation MAE are recorded.

[0101] 2. Experimental verification: Experimentally verify the different weight combinations in the cross-validation on the validation set, that is, use the random forest prediction model and the SVM prediction model obtained in step 3 and step 4 to predict on the validation set, and obtain the cyanobacteria biomass prediction results of the random forest model and the cyanobacteria biomass prediction results of the SVM model on the validation set. Record the experimental verification MSE and experimental verification MAE of the cyanobacteria biomass prediction results of the random forest model and the SVM model for each different weight combination. When the experimental verification MSE and the experimental verification MAE are both minimum, the corresponding wRF and wSVM are consistent with those in the cross-validation. The group of wRF and wSVM weights is used as the weighted weights of the random forest prediction model and the SVM prediction model. Otherwise, continue to set different weight combinations to repeat the cross-validation and experimental verification process until the experimental verification MSE and the experimental verification MAE are both minimum, and the corresponding wRF and wSVM are consistent with those in the cross-validation.

[0102] 3. Result analysis: Comprehensively analyzing the results of cross-validation and experimental validation, in the 10-fold cross-validation, the average MSE of the weight combination wRF=0.5 and wSVM=0.5 is 0.02, and the average MAE is 0.015, while the average MSE of other weight combinations is greater than 0.02, and the average MAE is greater than 0.015. That is, when wSVM=0.5 and wRF=0.5, the average MSE and average MAE of the prediction results are both minimum, and the prediction accuracy is the highest. Therefore, wSVM and wRF=0.5 are selected as the final weights. Among them, the average MSE and average MAE are the average values ​​of the mean square error obtained after multiple experimental tests on each weight combination during the cross-validation process. Specifically, each weight combination will calculate the MSE and MAE values ​​multiple times under different data partitions, and then these MSE and MAE values ​​will be averaged to obtain the final average MSE and average MAE. This method can better evaluate the overall prediction performance of the model and avoid error deviations caused by the randomness of a single experiment.

[0103] Through cross-validation and experimental verification, the optimal weight coefficient is determined as the weighted weight of the tested and evaluated random forest prediction model and the tested and evaluated SVM prediction model to obtain a fusion model, so that the fusion model can provide high-precision prediction results in different scenarios.

[0104] Step 6: Real-time prediction

[0105] The real-time collected cyanobacteria growth-related data are input into the fusion model to generate real-time prediction results of cyanobacteria growth. The prediction results are expressed as optical density (OD value). Based on the results, the culture conditions (such as light, temperature, CO2 concentration, etc.) can be adjusted in real time to ensure that the cyanobacteria grow in the optimal environment.

[0106] Step 7: Dynamic optimization of fusion model

[0107] Comparative analysis: The cyanobacteria optical density (OD value) prediction results of the fusion model were compared with the actual measured cyanobacteria optical density (OD value) results, and the mean square error (MSE) and mean absolute error (MAE) were calculated to evaluate the prediction accuracy of the model.

[0108] Model tuning: Adjust the model parameters and weight distribution according to the comparison results (mean square error and mean absolute error). When the comparison results are no longer smaller, a dynamically optimized fusion model is obtained to further improve the prediction accuracy.

[0109] Regularly verify and tune the results to ensure their effectiveness and stability in practical applications. Through continuous monitoring and adjustment, ensure that the model can maintain high-precision prediction performance under different environmental conditions.

[0110] Example 2

[0111] like Figure 2 As shown, it is a schematic diagram of an intelligent control device for the growth of cyanobacteria based on a machine learning model, which includes a reactor body, a stirring system, a sensor module, a PLC control cabinet 7 and a control cabinet display screen 8. The stirring system and the sensor module are installed on the reactor. The PLC control cabinet 7 is provided with a data processing module, a prediction model module, a real-time data input module and an intelligent control module. The control cabinet display screen 8 includes a user interaction module. The reactor is connected to the PLC control cabinet 7, and the control cabinet display screen 8 is arranged on the PLC control cabinet 7. The sensor module is responsible for collecting environmental data and transmitting these data to the data processing module. After the data processing module pre-processes the received raw data, it is transmitted to the prediction model module for the prediction of the cyanobacteria biomass. The prediction results generated by the prediction model module will be updated through the real-time data input module and finally passed to the intelligent control module. According to the latest prediction results, the intelligent control module automatically adjusts the temperature control, CO2 injection, light control and other subsystems in the system to ensure that the cyanobacteria grow in the best environment.

[0112] The details are as follows:

[0113] 1.1 Reactor body

[0114] Reactor body: The reactor body is a cylindrical container with good sealing and corrosion resistance, ensuring the stability of the culture environment (i.e., data related to the growth of cyanobacteria). The material is highly corrosion-resistant glass.

[0115] 1.2 Mixing system

[0116] Stirring system: including a stirring paddle 1, which is installed on the top of the reactor and drives the stirring blades through a motor to ensure uniform mixing of the culture solution and prevent precipitation and uneven nutrients.

[0117] 1.3 Sensor module, including:

[0118] Temperature sensor 6: used to measure ambient temperature, the measuring range is -10℃ to 50℃, and the accuracy is ±0.1℃.

[0119] pH sensor 2: used to measure the pH value of the culture solution, with a measuring range of 0 to 14 and an accuracy of ±0.01.

[0120] CO2 sensor 3: used to measure the concentration of carbon dioxide in the device, with a measuring range of 0 to 5000ppm and an accuracy of ±50ppm.

[0121] Light sensor 5: used to measure the ambient light intensity, with a measurement range of 0 to 2000lx and an accuracy of ±1lx.

[0122] Nitrate sensor 4: used to measure the nitrate concentration of the culture solution, with a measurement range of 0 to 100 mg / L and an accuracy of ±0.1 mg / L.

[0123] 1.4 Data processing module, including:

[0124] Data acquisition unit: responsible for acquiring real-time data from each sensor of the sensor module and transmitting the data to the data preprocessing unit.

[0125] Data preprocessing unit: cleaning and standardizing the collected data related to cyanobacteria growth, including outlier processing, data normalization, and data format adjustment of the data related to cyanobacteria growth, to obtain preprocessed data to meet the input requirements of the machine learning model;

[0126] 1.5 Prediction model module, including:

[0127] Random Forest Model (RF) unit: Performs random forest model construction, which mainly makes preliminary predictions on preprocessed data and captures the main patterns and relationships in the data.

[0128] Support vector machine model (SVM) unit: executes SVM model construction, which combines the cyanobacteria biomass prediction results of the random forest prediction model with the original data to make a detailed prediction and improve the accuracy of the prediction.

[0129] Fusion model unit: executes the model weighted fusion step, performs model weighted fusion on the prediction results of the random forest prediction model and the SVM prediction model, and generates the final fusion model and cyanobacteria growth prediction results.

[0130] The fusion model dynamic optimization unit executes the dynamic optimization steps of the fusion model and ensures that the model can maintain high-precision prediction performance under different environmental conditions through continuous monitoring and adjustment.

[0131] 1.6 Real-time data input module and intelligent control module:

[0132] The real-time data input module includes a real-time data input unit (data acquisition unit): receiving real-time data from the sensor and inputting it into the fusion model for prediction.

[0133] The intelligent control module includes an intelligent control unit: based on the above cyanobacteria growth prediction results, the cyanobacteria growth and culture conditions can be adjusted in real time to ensure that the cyanobacteria grow in the best environment, including the following subsystems:

[0134] Temperature control subsystem: Automatically adjust the temperature of the culture medium through temperature control equipment (such as heating or cooling devices) to ensure that it is within the optimal ambient temperature range.

[0135] pH adjustment subsystem: Automatically adjusts the pH value of the culture medium by adding acid or alkali to maintain it within the optimal range.

[0136] CO2 injection subsystem: automatically adjusts the amount of carbon dioxide injected according to the prediction results to ensure that the CO2 concentration in the culture environment is appropriate.

[0137] Lighting control subsystem: Provides optimal lighting conditions by adjusting the intensity and duration of light sources.

[0138] Nutrient solution supplement subsystem: automatically supplements nutrients such as nitrates in the culture solution based on the prediction results to ensure the nutrient supply required for the growth of cyanobacteria.

[0139] 1.7 User interaction module, including:

[0140] Display screen: displays the real-time collected data related to the growth of cyanobacteria, the real-time prediction results of the cyanobacteria biomass and the control status (cyanobacteria growth and cultivation conditions), so that the user can understand the operation status of the device at any time.

[0141] Control panel: allows users to manually input or adjust the cyanobacteria growth and culture conditions, view the real-time prediction results and historical data of cyanobacteria biomass, and provide a flexible operation interface. Among them, historical data refers to the environmental data and cyanobacteria biomass data related to cyanobacteria growth that have been collected and saved before. These data may include but are not limited to ambient temperature, CO2 concentration, light intensity, pH value, and nitrate concentration. In the initial training of the model, these historical data are used to help the model identify the laws of cyanobacteria growth, and are used as a reference benchmark in real-time predictions, and compared with the currently collected data, so as to optimize and adjust the model.

[0142] The cyanobacteria growth prediction and intelligent control device based on machine learning model combines the fusion model, significantly improving the accuracy of cyanobacteria growth prediction and significantly reducing the prediction error rate. The real-time monitoring and intelligent control module can quickly respond to environmental changes and ensure timely adjustment of culture conditions, with a response time of less than seconds. Through cyanobacteria growth prediction and intelligent control to optimize culture conditions, the conversion rate and production efficiency of cyanobacteria biofuels are significantly improved. Compared with traditional methods, the production efficiency is increased by more than 20%. The device has high stability and reliability, can maintain high performance during long-term operation, and ensure the continuity of data processing and control processes.

[0143] It has shown excellent performance under different cyanobacteria species and culture conditions, and has strong potential for industrial application. The system can be customized according to needs to meet production needs of different scales.

[0144] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A method for predicting the growth of cyanobacteria, characterized in that: The method comprises the following steps: Step 1: Collect data related to cyanobacteria growth. Step 2, data preprocessing, wherein the data preprocessing includes performing outlier processing, data normalization, and data format adjustment on the blue algae growth related data to obtain a preprocessed data set; Step 3: Random forest model construction, including the following steps: Step 3.1, randomly dividing the preprocessed data set into a first training set and a first test set at 70% and 30%; Step 3.2, training a random forest model on the first training set, using the out-of-bag error to evaluate the performance of the random forest model, adjusting the hyperparameters of the random forest model, and completing the training when the out-of-bag error no longer decreases to obtain a trained random forest prediction model; Step 3.3, using the first test set to evaluate the trained random forest prediction model, calculate the evaluation index, and determine whether the evaluation index meets the accuracy requirement. When the accuracy requirement is met, the final random forest prediction model is obtained, otherwise, return to step 3.2; Step 3.4, training the final random forest prediction model with the preprocessed data set to obtain a random forest cyanobacteria biomass prediction result on the preprocessed data set; Step 4: SVM model construction, including the following steps: Step 4.1, combining the random forest cyanobacteria biomass prediction result on the preprocessed data set in step 3.4 with the preprocessed data set in step 2 to obtain a merged data set, normalizing the merged data set and randomly dividing it into a second training set and a second test set in a ratio of 70% and 30%; Step 4.2, performing SVM model training on the second training set, using cross-validation to evaluate the performance of the SVM model, adjusting the hyperparameters of the SVM model, and completing the training when the cross-validation error no longer decreases to obtain a trained SVM prediction model; Step 4.3, using the second test set to evaluate the trained SVM prediction model, calculate the evaluation index, and determine whether the evaluation index meets the accuracy requirement. When the accuracy requirement is met, the final SVM prediction model is obtained, otherwise, return to step 4.2; Step 5: performing model weighted fusion on the final random forest prediction model and the final SVM prediction model to obtain a fusion model, comprising the following steps: Step 5.1, dividing the preprocessed data set into a third training set and a validation set; Step 5.2, cross-validation is performed on the third training set, wherein the cross-validation is to perform training on the final random forest prediction model and the final SVM prediction model with the third training set, respectively, to obtain the random forest cyanobacteria biomass prediction result and the SVM model cyanobacteria biomass prediction result on the third training set, and the random forest cyanobacteria biomass prediction result and the SVM model cyanobacteria biomass prediction result on the third training set are set to different weight combinations, and the cross-validation mean square error and the cross-validation mean absolute error of each weight combination are calculated; Step 5.3, performing experimental verification on the verification set, the experimental verification is to use the final random forest prediction model and the final SVM prediction model to perform predictions on the verification set, respectively, to obtain the random forest model cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the verification set, apply the different weight combinations to the random forest model cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the verification set, calculate and record the experimental verification mean square error and experimental verification mean absolute error under each weight combination; Step 5.4, selecting the weight combination with the smallest cross-validation mean square error and the smallest cross-validation mean absolute error, and the smallest experimental verification mean square error and the smallest experimental verification mean absolute error as the weighted weights of the final random forest prediction model and the final SVM prediction model, to obtain the fusion model; Step 6: Dynamic optimization of the fusion model, including the following steps: Step 6.1, regularly inputting the real-time collected cyanobacteria growth related data into the fusion model to obtain the real-time prediction result of cyanobacteria biomass, comparing the real-time prediction result of cyanobacteria biomass with the actual measured cyanobacteria biomass result, and calculating the error of the fusion model, wherein the error of the fusion model includes the fusion model mean square error and the fusion model mean absolute error; Step 6.2, adjusting the fusion model parameters and assigning weights according to the fusion model error to obtain a dynamically optimized fusion model, wherein the model parameter adjustment includes kernel function parameter adjustment; Step 7: inputting the blue algae growth related data collected in real time into the dynamically optimized fusion model to obtain the real-time prediction result of the blue algae biomass after dynamic optimization.

2. The method for predicting the growth of cyanobacteria according to claim 1, characterized in that: The blue algae growth related data include environmental temperature, environmental CO2 concentration, light intensity, pH value of the culture solution and nitrate concentration of the culture solution.

3. The method for predicting the growth of cyanobacteria according to claim 1, characterized in that: The evaluation indicators include mean square error, mean absolute error, and determination coefficient.

4. The method for predicting the growth of cyanobacteria according to claim 1, characterized in that: The hyperparameters of the final random forest prediction model are set to 100 trees and None as the maximum depth of the trees.

5. The method for predicting the growth of cyanobacteria according to claim 1, characterized in that: The hyperparameters of the final SVM prediction model are set to the RBF kernel function, the parameter C of the RBF kernel function is 1.0, and the parameter γ is scale.

6. The method for predicting the growth of cyanobacteria according to claim 1, characterized in that: The cyanobacteria biomass is the optical density.

7. An intelligent control device for the growth of cyanobacteria, characterized in that: The device comprises a sensor module, a data processing module, a prediction model training module, a real-time data input module, and an intelligent control module, and the device is configured to be able to perform the method according to claim 1 and adjust the cyanobacteria growth and culture conditions in real time, wherein: The sensor module is configured to collect data related to the growth of blue algae; The data processing module is configured to acquire the blue algae growth related data from the sensor module in real time and perform the data preprocessing; The prediction model training module includes: A random forest model training unit, which is configured to be able to perform the random forest model construction, A SVM model training unit, which is configured to be able to perform said SVM model building, a model weighted fusion unit, which is configured to be able to perform the model weighted fusion, A fusion model dynamic optimization unit, which is configured to be able to perform dynamic optimization of the fusion model; The real-time data input module is configured to receive the blue algae growth related data collected by the sensor module in real time, and input the data into the dynamically optimized fusion model for prediction; The intelligent control module is configured to adjust the cyanobacteria growth and culture conditions in real time according to the real-time prediction result of the cyanobacteria biomass after the dynamic optimization.

8. The intelligent control device for blue algae growth according to claim 7, characterized in that: The sensor module includes a temperature sensor, a pH sensor, a CO2 sensor, a nitrate sensor, and a light sensor.

9. The intelligent control device for blue algae growth according to claim 7, characterized in that: The device comprises: A temperature control subsystem, which is configured to automatically adjust the ambient temperature through a heating or cooling device; A CO2 injection subsystem, which is configured to adjust the amount of carbon dioxide injected and automatically adjust the ambient CO2 concentration; a lighting control subsystem configured to automatically adjust the lighting intensity by adjusting the intensity and duration of the light source; A pH adjustment subsystem, which is configured to automatically adjust the pH value of the culture solution by adding acid or alkali; The nutrient solution supplement subsystem is configured to supplement nitrate and automatically adjust the nitrate concentration of the culture solution.

10. The intelligent control device for blue algae growth according to claim 7, characterized in that: The device further includes a user interaction module, and the user interaction module includes: A display screen configured to display the blue algae growth-related data collected in real time, the real-time prediction result of the blue algae biomass after the dynamic optimization, and the blue algae growth and culture conditions; A control panel is configured to allow a user to manually input or adjust the cyanobacteria growth culture conditions and view the real-time prediction results and historical data of the cyanobacteria biomass after the dynamic optimization.

Citation Information

Patent Citations

  • Lake and reservoir cyanobacterial bloom prediction method based on adaptive dynamic programming

    CN110532646A

  • Multi-factor cyanobacterial bloom prediction method based on remote sensing image 4D-FractalNet

    CN113011397A

Cited By

  • Microalgae growth prediction and optimization method and system based on machine learning

    CN119494085A

  • A method and system for predicting and optimizing microalgae growth based on machine learning

    CN119494085B

  • Method for manufacturing laminated chip inductor element from low-temperature co-fired ferrite raw material belt

    CN119626753A

  • Dynamic quality monitoring and intelligent regulation and control method and system for food processing process

    CN120765118A