A prediction method and intelligent control device for cyanobacteria growth

By combining the fusion method of random forest and support vector machine models with an intelligent control device, the accuracy and real-time problems in cyanobacteria growth prediction and control are solved, an efficient and automated cyanobacteria cultivation process is realized, and production efficiency and environmental friendliness are improved.

CN119312274BActive Publication Date: 2025-10-14SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

Smart Images

  • Figure CN119312274B_ABST
    Figure CN119312274B_ABST
Patent Text Reader

Abstract

The application discloses a kind of blue-green algae growth prediction method and intelligent regulation and control device, it is related to blue-green algae growth prediction and regulation and control field, including blue-green algae growth related data acquisition, data preprocessing, random forest model construction, SVM model construction, final random forest prediction model and final SVM prediction model are weighted fusion to obtain fusion model, dynamic optimization of fusion model, finally obtain the dynamic optimization of fusion model, and blue-green algae growth related data according to dynamic optimization of fusion model Real-time acquisition sensor module obtains real-time prediction result, according to this real-time adjustment blue-green algae growth culture condition.The application combines the advantages of random forest model and SVM model, develops a fusion model with dynamic optimization and real-time adjustment function, significantly improves the accuracy and adaptability of blue-green algae growth prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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, are an important class of photosynthetic prokaryotes widely distributed in various aquatic environments. Their ability to fix carbon dioxide and generate organic matter through photosynthesis holds significant potential for biofuel production. Cultivating cyanobacteria to convert atmospheric carbon dioxide into biomass, which can then be converted into biofuels, not only helps reduce greenhouse gas emissions but also provides a new avenue for the development of renewable energy.

[0003] Traditional methods for predicting cyanobacterial growth rely primarily on statistical models and empirical formulas based on physical and chemical parameters. While these methods can reflect cyanobacterial growth trends to a certain extent, they often lack accuracy when dealing with complex nonlinear relationships and lack real-time adjustment and feedback mechanisms.

[0004] Existing prediction systems are typically single-module systems that fail to effectively integrate multiple processes, including sensor data acquisition, data processing, and model prediction. This fragmented system structure makes real-time adjustments and feedback difficult, resulting in low efficiency and stability during cyanobacteria cultivation.

[0005] Existing technologies for regulating cyanobacteria growth lack real-time feedback. For one thing, existing cyanobacteria growth prediction technologies rely primarily on static models, which were not designed with real-time data processing capabilities in mind. Static models are typically trained on historical data and lack a mechanism for processing real-time input data, making them unable to respond to environmental changes in real time.

[0006] On the other hand, system design flaws and the low integration of data acquisition and processing systems create bottlenecks in the real-time feedback process. For example, existing systems may require manual data entry and are unable to automatically collect and process real-time sensor data.

[0007] Secondly, the level of automated control is low. In existing systems, predictive models and control systems are typically separated. The results generated by the predictive models require manual interpretation and processing 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 response time but also easily introduces human error, resulting in unstable culture conditions. Furthermore, manual intervention makes it difficult to achieve efficient and cost-effective operation of the system in large-scale production.

[0008] In recent years, with the development of machine learning technology, data-driven methods for predicting cyanobacterial growth have become a research hotspot. In particular, the random forest (RF) model and the support vector machine (SVM) model, two effective machine learning models, have shown strong potential for improving the accuracy of cyanobacterial growth rate prediction and guiding the conversion of cyanobacterial carbon sequestration into biofuels, due to their ability to capture complex nonlinear relationships in data.

[0009] However, the application of random forest (RF) and support vector machine (SVM) models in cyanobacteria growth prediction currently faces certain limitations. Specifically, while RF models can effectively handle large datasets and reduce the risk of overfitting, they perform poorly when capturing complex nonlinear relationships. While SVM models have advantages in handling nonlinear boundaries, they require high data size and computational resources, making their application to large datasets challenging. Furthermore, existing prediction methods often lack the ability to adjust in real time, making them difficult to adapt to dynamically changing environmental conditions.

[0010] The application of existing technologies for cyanobacteria growth prediction suffers from several shortcomings. First, a single prediction model often struggles to capture both the global patterns and local details of environmental data, resulting in low prediction accuracy. Second, existing systems lack real-time adjustment capabilities, making it difficult to cope with dynamic environmental changes and adjust model predictions in a timely manner. Furthermore, the system's low level of integration, with sensor data acquisition, data processing, and model prediction handled separately, results in slow system response and reduces 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 cyanobacteria growth, the method comprising the following steps:

[0014] Step 1: Collection of data related to cyanobacteria growth,

[0015] Step 2: data preprocessing, wherein the data preprocessing includes processing outliers, normalizing the data, and adjusting the data format 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: Perform random forest model training on the first training set, use the out-of-bag error to evaluate the performance of the random forest model, adjust the hyperparameters of the random forest model, and complete the training when the out-of-bag error no longer decreases to obtain a trained random forest prediction model;

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

[0020] Step 3.4, training the final random forest prediction model using 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 results on the preprocessed dataset described in step 3.4 with the preprocessed dataset described in step 2 to obtain a merged dataset, normalizing the merged dataset 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: Perform SVM model training on the second training set, use cross-validation to evaluate the performance of the SVM model, adjust the hyperparameters of the SVM model, and complete 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, including 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, performing cross-validation on the third training set, wherein the cross-validation is to train 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 results and the SVM model cyanobacteria biomass prediction results on the third training set, setting the random forest cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the third training set to different weight combinations, and calculating the cross-validation mean square error and cross-validation mean absolute error for each weight combination;

[0029] Step 5.3, performing experimental verification on the validation set, wherein the experimental verification is to use the final random forest prediction model and the final SVM prediction model to perform predictions on the validation set, respectively, to obtain the random forest model cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the validation 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 validation set, and calculate and record the experimental verification mean square error and experimental verification mean absolute error under each weight combination;

[0030] Step 5.4: Select the weight combination that minimizes both the cross-validation mean square error and the cross-validation mean absolute error, and minimizes both the experimental verification mean square error and the 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: Adjust the fusion model parameters and distribute the weights according to the fusion model error.

[0034] Obtaining a dynamically optimized fusion model, wherein the model parameter adjustment includes kernel function parameter adjustment;

[0035] Step 7: inputting the real-time collected cyanobacteria growth-related data into the dynamically optimized fusion model to obtain a real-time prediction result of the dynamically optimized cyanobacteria biomass.

[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 tree 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 cyanobacteria growth, 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 execute the method according to claim 1, wherein:

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

[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] An SVM model training unit, which is configured to be able to perform said SVM model building,

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

[0048] a fusion model dynamic optimization unit, 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 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 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 includes a user interaction module, and the user interaction module includes:

[0059] a display screen configured to display the real-time collected data related to the growth of cyanobacteria, the real-time prediction results of the dynamically optimized cyanobacteria biomass, and the cyanobacteria growth and cultivation conditions;

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

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

[0062] (1) Leveraging the complementarity of the random forest (RF) model and the support vector machine (SVM) model: The RF model excels at capturing global patterns in large datasets and reducing the risk of overfitting; the SVM model has advantages in handling 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 RF model's multiple decision tree structure captures complex patterns and nonlinear relationships in the data. Meanwhile, the SVM model, through the construction of hyperplanes in high-dimensional space, further refines data boundaries and extreme value processing. The weighted fusion of the two makes modeling of complex data more accurate.

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

[0065] (2) The fusion model can be dynamically optimized, and dynamic optimization setting is performed according to the characteristics of cyanobacteria growth related data and cyanobacteria biomass data in different growth stages, so that optimal prediction results can be provided in different cyanobacteria growth stages. The dynamic optimization significantly improves the prediction accuracy of the model and reduces the prediction error. The traditional model cannot process data in real time because of the lack of adaptability to dynamic changes. The combination of the real-time data processing module and the fusion model of the present application enables the system to dynamically adapt to environmental changes, thereby improving the accuracy and response speed of prediction.

[0066] (3) The closed-loop system integrating real-time sensor data acquisition, fusion model prediction, intelligent control and the like can quickly respond to environmental changes, and the response time is within seconds. Real-time data is input into the system, the fusion model outputs prediction results in real time, and the culture conditions are fed back to realize high automation and intelligentization of the cyanobacteria culture process. The high-precision sensor is used to collect environmental data (such as temperature, pH value, CO2 concentration and the like) in real time. After the data is preprocessed by the data processing module, it is directly input into the fusion model. The fusion model can make prediction immediately after receiving the data, and the culture conditions are adjusted through the intelligent control module, so that the system can process and feedback environmental data in real time, thereby improving the prediction accuracy and the response speed of the system. Compared with the prior art, the system can quickly adjust the culture conditions to ensure that the cyanobacteria grow in the best environment. The culture conditions can be automatically adjusted without manual intervention. The controllability and stability of the culture process are ensured. The automatic control of the system ensures the controllability and 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 yield of cyanobacteria, but also reduces the production cost and increases the economic benefit; the negative impact on the environment is also reduced.

[0067] The present application 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. Meanwhile, the data acquisition, processing and prediction modules are integrated, which significantly improves the accuracy of cyanobacteria growth prediction and the degree of automation of the system.

[0068] The concept, specific structure and technical effects of the present application will be further described below with reference to the accompanying drawings, so as to fully understand the purpose, features and effects of the present application. BRIEF DESCRIPTION OF DRAWINGS

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

[0070] Figure 2 Schematic diagram of an intelligent control device for cyanobacteria growth 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. DETAILED DESCRIPTION

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

[0073] In the drawings, components with identical structures are denoted by the same reference numerals, and components with similar structures or functions are denoted by similar reference numerals. The size and thickness of each component shown in the drawings are arbitrary and are not limited by the present invention. For clarity, the thickness of components in some places in the drawings is appropriately exaggerated.

[0074] Example 1

[0075] like Figure 1 The figure shows a flow chart of the prediction method for cyanobacteria growth based on a 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 relevant data on cyanobacteria growth, including temperature, pH, 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 preprocessed data sets

[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 prevent outliers from adversely affecting model training.

[0080] Data normalization: Normalize 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: Train the random forest model on the first training set and evaluate model performance using the out-of-bag error (OOB error). Using the scikit-learn Python library, adjust the random forest model's hyperparameters (including the number of trees and the maximum tree depth). Training is completed when the out-of-bag error no longer significantly decreases, resulting in a 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), coefficient of determination (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., 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 tree), and retrain the model until the MSE, MAE, and R on the test set are higher than the standard. 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 results 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 uses the cyanobacteria optical density (OD value) to represent the growth trend of cyanobacteria.

[0087] The number of trees and maximum tree depth are optimized to better capture key trends and complex nonlinear relationships in the data. Experimental results show that setting the number of trees to 100 and the maximum tree depth to None provides the best balance between model complexity and computational efficiency. This setting fully captures 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% respectively.

[0090] Step 4.2, Model Training: Train the SVM model on the second training set and evaluate its performance through 10-fold cross-validation. Optimize the performance of the SVM model by adjusting its hyperparameters (kernel function type, parameters C and γ, etc.). Complete training when the cross-validation error no longer significantly decreases, and obtain the trained SVM prediction model.

[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., generalization ability and accuracy are insufficient), return to step 4.2 to retrain, adjust the hyperparameters of the SVM model (including 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 expected performance. 2 The expected standards were met and a tested and evaluated SVM prediction model was obtained.

[0092] Step 4.4, output results: Output the tested and evaluated SVM prediction model and SVM cyanobacteria biomass prediction results, i.e., cyanobacteria optical density (OD value), for further accurate prediction of cyanobacteria growth trends.

[0093] Cross-validation revealed that the SVM prediction model achieved the best prediction results when using the RBF kernel function with parameters C = 1.0 and γ = scale. Choosing an appropriate kernel function, or RBF kernel, enhances the model's ability to handle complex data structures. Setting the RBF kernel parameters C = 1.0 and γ = scale provides optimal classification accuracy when handling complex nonlinear boundaries.

[0094] In support vector machines (SVM), the main role of the kernel function is to map the input data to a higher dimensional feature space, so that the non-linear relationship in the original data becomes linearized, facilitating classification or regression. Commonly used kernel functions include linear kernel, radial basis function (RBF) kernel, polynomial kernel, etc. The radial basis function (RBF) kernel function is a commonly used kernel function, especially in dealing with data with complex non-linear relationships. RBF kernel function can flexibly adjust the boundary in high-dimensional space and capture complex patterns in data. This is particularly important for applications such as cyanobacterial growth prediction, which is influenced by multiple nonlinear factors. Linear kernel function is only suitable for linearly separable data sets and cannot handle complex nonlinear relationships. In the application of cyanobacterial growth prediction, the relationship between environmental factors and cyanobacterial biomass is usually nonlinear, so linear kernel is not suitable for this scenario. Although the polynomial kernel can also handle nonlinear relationships, it often needs to adjust the order of the polynomial, which has a large computational overhead and is prone to model overfitting or underfitting. The RBF kernel function provides a better balance between complexity and computational efficiency. Through experiments and cross-validation, the RBF kernel function performs better than other kernel functions on real data sets, better adapts to the complex relationships in cyanobacterial growth prediction, and provides 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 conditions.

[0096] Step 5: Model weighted fusion to obtain a fusion model

[0097] The weighted fusion method is as follows:

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

[0099] Divide the preprocessed data set into a third training set and a validation set.

[0100] 1. Cross-validation: The random forest prediction model and the SVM prediction model obtained in step 3 and step 4 are trained on the third training set 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 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 Validation: Experimentally validate the different weight combinations used in the cross-validation on the validation set. This means using the random forest prediction model and the SVM prediction model obtained in steps 3 and 4, respectively, to predict the biomass of the cyanobacteria from the random forest model and the SVM model on the validation set. The MSE and MAE of the random forest model and the SVM model, respectively, for each weight combination are recorded. When the wRF and wSVM weights corresponding to the minimum experimental validation MSE and MAE are consistent with those in the cross-validation, the wRF and wSVM weights for that set are used as the weights for the random forest prediction model and the SVM prediction model. Otherwise, continue to set different weight combinations and repeat the cross-validation and experimental validation process until the wRF and wSVM weights corresponding to the minimum experimental validation MSE and MAE are consistent with those in the cross-validation.

[0102] 3. Results Analysis: Comprehensive analysis of the cross-validation and experimental validation results revealed that, in the 10-fold cross-validation, the weight combination wRF = 0.5 and wSVM = 0.5 achieved an average MSE of 0.02 and an average MAE of 0.015. Other weight combinations all achieved average MSEs greater than 0.02 and average MAEs greater than 0.015. Specifically, when wSVM = 0.5 and wRF = 0.5, the average MSE and average MAE of the prediction results were minimized, resulting in the highest prediction accuracy. Therefore, wSVM and wRF = 0.5 were selected as the final weight combinations. The average MSE and average MAE are the averages of the mean squared errors (MSEs) obtained from multiple experimental tests of each weight combination during the cross-validation process. Specifically, the MSE and MAE values ​​for each weight combination were calculated multiple times under different data partitions. These MSE and MAE values ​​were then averaged to obtain the final average MSE and average MAE. This approach better evaluates the overall predictive performance of the model and avoids errors caused by the randomness of individual experiments.

[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 is 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 this result, 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 the 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 no longer decrease, 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, we ensure that the model can maintain high-precision prediction performance under different environmental conditions.

[0110] Example 2

[0111] like Figure 2 Figure 2 shows a schematic diagram of an intelligent control device for cyanobacteria growth based on a machine learning model. The device comprises 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 sensor module are mounted on the reactor. The PLC control cabinet 7 houses 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 mounted on the PLC control cabinet 7. The sensor module is responsible for collecting environmental data and transmitting this data to the data processing module. The data processing module pre-processes the received raw data and then transmits it to the prediction model module for cyanobacteria biomass prediction. The prediction results generated by the prediction model module are updated via the real-time data input module and ultimately transmitted to the intelligent control module. Based on the latest prediction results, the intelligent control module automatically adjusts the system's temperature control, CO2 injection, lighting control, and other subsystems to ensure optimal growth of the cyanobacteria.

[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., the data related to cyanobacteria growth). The material is highly corrosion-resistant glass.

[0115] 1.2 Mixing system

[0116] Stirring system: includes 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 distribution of nutrients.

[0117] 1.3 Sensor module, including:

[0118] Temperature sensor 6: used to measure ambient temperature, the measurement 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 ambient light intensity, with a measurement range of 0 to 2000 lx and an accuracy of ±1 lx.

[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 obtaining real-time data from each sensor of the sensor module and transmitting the data to the data preprocessing unit.

[0125] Data preprocessing unit: performs data preprocessing such as cleaning and standardization on the collected cyanobacterial growth-related data, including outlier processing, data normalization, and data format adjustment, 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 primarily performs preliminary prediction on preprocessed data to capture the main patterns and relationships in the data.

[0128] Support vector machine model (SVM) unit: performs SVM model construction, which combines the cyanobacterial biomass prediction results of the random forest prediction model with the original data for fine prediction to improve the accuracy of the prediction.

[0129] Fusion model unit: performs model weighted fusion step, which performs model weighted fusion of the prediction results of the random forest prediction model and the SVM prediction model to generate the final fusion model and cyanobacterial growth prediction results.

[0130] Fusion model dynamic optimization unit: performs dynamic optimization step of the fusion model, which ensures high-precision prediction performance of the model under different environmental conditions through continuous monitoring and adjustment.

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

[0132] Real-time data input module includes real-time data input unit (data acquisition unit): receives real-time data from sensors and inputs them into the fusion model for prediction.

[0133] Intelligent control module includes intelligent control unit: can adjust cyanobacterial growth culture conditions in real time based on the above cyanobacterial growth prediction results to ensure optimal growth of cyanobacteria, including the following subsystems:

[0134] Temperature control subsystem: automatically adjusts the temperature of the culture solution through temperature control equipment (such as heating or cooling devices) to ensure it is within the optimal environmental 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 based on the prediction results to ensure the appropriate CO2 concentration in the culture environment.

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

[0138] Nutrient solution replenishment subsystem: automatically replenishes nutrients such as nitrate in the culture medium 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: This allows users to manually input or adjust cyanobacteria growth and cultivation conditions, view real-time cyanobacteria biomass predictions, and view historical data, providing a flexible interface. Historical data refers to previously collected and stored environmental data related to cyanobacteria growth and cyanobacteria biomass. This data may include, but is not limited to, ambient temperature, CO2 concentration, light intensity, pH, and nitrate concentration. During the initial model training, this historical data helps the model identify patterns in cyanobacteria growth and serves as a reference for real-time predictions, comparing it with currently collected data to optimize and adjust the model.

[0142] This machine learning-based cyanobacteria growth prediction and intelligent control device incorporates a fusion model, significantly improving the accuracy of cyanobacteria growth predictions and significantly reducing the prediction error rate. The real-time monitoring and intelligent control module can rapidly respond to environmental changes, ensuring timely adjustment of culture conditions, with a response time of less than seconds. By optimizing culture conditions through cyanobacteria growth prediction and intelligent control, the conversion rate and production efficiency of cyanobacteria biofuels are significantly improved, increasing production efficiency by over 20% compared to traditional methods. The device boasts high stability and reliability, maintaining high performance over long periods of operation and ensuring the continuity of data processing and control processes.

[0143] It demonstrates excellent performance across diverse cyanobacteria species and culture conditions, demonstrating strong potential for industrial application. The system can be customized to meet production needs of varying scales.

[0144] The above describes in detail the preferred embodiments of the present invention. It should be understood that numerous modifications and variations based on the concepts of the present invention are possible without inventive effort by those skilled in the art. Therefore, any technical solution that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A method for predicting cyanobacteria growth, 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 processing outliers, normalizing the data, and adjusting the data format 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: Perform random forest model training on the first training set, use the out-of-bag error to evaluate the performance of the random forest model, adjust the hyperparameters of the random forest model, and complete the training when the out-of-bag error no longer decreases to obtain a trained random forest prediction model; Step 3.3: Evaluate the trained random forest prediction model using the first test set, calculate an evaluation index, and determine whether the evaluation index meets the accuracy requirement. If the accuracy requirement is met, obtain the final random forest prediction model; otherwise, return to step 3.

2. Step 3.4, training the final random forest prediction model using 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 results on the preprocessed dataset described in step 3.4 with the preprocessed dataset described in step 2 to obtain a merged dataset, normalizing the merged dataset and randomly dividing it into a second training set and a second test set in a ratio of 70% and 30%; Step 4.2: Perform SVM model training on the second training set, use cross-validation to evaluate the performance of the SVM model, adjust the hyperparameters of the SVM model, and complete the training when the cross-validation error no longer decreases to obtain a trained SVM prediction model; Step 4.3: Evaluate the trained SVM prediction model using the second test set, calculate the evaluation index, and determine whether the evaluation index meets the accuracy requirement. If the accuracy requirement is met, obtain the final SVM prediction model; 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, including the following steps: Step 5.1, dividing the preprocessed data set into a third training set and a validation set; Step 5.2, performing cross-validation on the third training set, wherein the cross-validation is to train 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 results and the SVM model cyanobacteria biomass prediction results on the third training set, setting the random forest cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the third training set to different weight combinations, and calculating the cross-validation mean square error and cross-validation mean absolute error for each weight combination; Step 5.3, performing experimental verification on the validation set, wherein the experimental verification is to use the final random forest prediction model and the final SVM prediction model to perform predictions on the validation set, respectively, to obtain the random forest model cyanobacteria biomass prediction results and the SVM model cyanobacteria biomass prediction results on the validation 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 validation set, and calculate and record the experimental verification mean square error and experimental verification mean absolute error under each weight combination; Step 5.4: Select the weight combination that minimizes both the cross-validation mean square error and the cross-validation mean absolute error, and minimizes both the experimental verification mean square error and the 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 a 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: Adjust the fusion model parameters and distribute 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 real-time collected cyanobacteria growth-related data into the dynamically optimized fusion model to obtain a real-time prediction result of the dynamically optimized cyanobacteria biomass.

2. The method for predicting cyanobacteria growth according to claim 1, wherein: 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.

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

4. The method for predicting cyanobacteria growth according to claim 1, wherein: 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 cyanobacteria growth according to claim 1, wherein: 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 cyanobacteria growth according to claim 1, wherein: The cyanobacterial 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. The device is configured to execute 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 cyanobacteria; 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, An SVM model training unit, which is configured to be able to perform said SVM model building, a model weighted fusion unit, configured to be able to perform the model weighted fusion, a fusion model dynamic optimization unit, 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 configured to automatically adjust the ambient temperature through a heating or cooling device; A CO2 injection subsystem configured to adjust the amount of carbon dioxide injected to 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 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, which includes: a display screen configured to display the real-time collected data related to the growth of cyanobacteria, the real-time prediction results of the dynamically optimized cyanobacteria biomass, and the cyanobacteria growth and cultivation conditions; A control panel is configured to allow a user to manually input or adjust the cyanobacteria growth and cultivation conditions and view the real-time prediction results and historical data of the dynamically optimized cyanobacteria biomass.

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