Method, system and equipment for predicting photosynthetic rate of protected grapes and storage medium

By adopting a multi-model fusion model in the photosynthesis rate prediction of facilities, combined with the advantages of multiple machine learning algorithms, the problems of insufficient prediction accuracy and poor model robustness in the existing technology are solved, and higher prediction accuracy and model stability are achieved.

CN119760668AActive Publication Date: 2025-04-04HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510271840.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-04
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

The existing photosynthetic rate prediction methods are difficult to cope with complex and changeable environmental conditions, and there are problems such as insufficient prediction accuracy and poor model robustness.

Method used

A method for predicting photosynthetic rate of the facility grape is proposed. By inputting the multidimensional data features of the facility grape production environment into the multi-model fusion model, the model includes a base learner group and a meta-learner, using grid search optimization K nearest neighbor model, Kalman filter optimization Gaussian process regression model, long and short-term memory network model, support vector machine as the base learner group, and the limit gradient enhancement tree model as the meta-learner.

Benefits of technology

The photosynthesis rate prediction accuracy is significantly improved, the robustness and adaptability of the model are enhanced, and the problem of insufficient adaptability of a single model in complex data scenarios is effectively reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760668A_ABST
    Figure CN119760668A_ABST
Patent Text Reader

Abstract

The invention discloses a facility grape photosynthetic rate prediction method, system and device and a storage medium, and relates to the technical field of artificial intelligence and agriculture, and the method comprises the steps: inputting the multi-dimensional data features of a facility grape production environment into a multi-model fusion model, the multi-model fusion model comprises a base learning device group and a meta learning device, a grid search optimization K nearest neighbor model, a Kalman filtering optimization Gaussian process regression model, a long short-term memory network model and a support vector machine form a base learner group, and a limit gradient boosting tree model is used as a meta learner; each model in the base learner group outputs a temporary photosynthetic rate predicted value; all the temporary photosynthetic rate predicted values are superposed to serve as input of a meta-learner, so that a final photosynthetic rate predicted value is output; according to the prediction method, system and equipment and the storage medium, the accuracy of photosynthetic rate prediction is remarkably improved, and the problem of insufficient adaptability of a single model in a complex data scene is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and agricultural technology, and in particular to a method, system, device and storage medium for predicting photosynthetic rate of greenhouse grapes. Background Art

[0002] The photosynthetic rate of greenhouse grapes is an important indicator for measuring the growth status and yield of grapes. Real-time and accurate prediction of photosynthetic rate is of great significance for optimizing cultivation management and improving resource utilization efficiency. However, most existing photosynthetic rate prediction methods rely on a single model, which is difficult to cope with complex and changing environmental conditions, and has problems such as insufficient prediction accuracy and poor model robustness.

[0003] At present, the application of various machine learning algorithms in the field of photosynthetic rate prediction is gradually increasing, including support vector machine (SVM), long short-term memory network (LSTM), Gaussian process regression (GPR), etc. However, single models generally have the problems of single input feature selection and insufficient capture of nonlinear and time series characteristics. Summary of the invention

[0004] Based on the technical problems existing in the background technology, the present invention proposes a method, system, equipment and storage medium for predicting the photosynthetic rate of greenhouse grapes, which improves the prediction accuracy of the photosynthetic rate.

[0005] The present invention proposes a method, system, device and storage medium for predicting photosynthetic rate of greenhouse grapes, including: Inputting the multidimensional data features of the facility grape production environment into a multi-model fusion model, wherein the multi-model fusion model includes a base learner group and a meta-learner, a grid search optimized K nearest neighbor model, a Kalman filter optimized Gaussian process regression model, a long short-term memory network model, and a support vector machine as base learners to form a base learner group, and an extreme gradient boosting tree model as a meta-learner; Each base learner in the base learner group outputs a temporary photosynthetic rate prediction value; All temporary photosynthetic rate prediction values ​​are superimposed as the input of the meta-learner to output the final photosynthetic rate prediction value.

[0006] Furthermore, the multi-model fusion model fuses the base learner and the meta learner through the stacking framework. The training process of the multi-model fusion model is as follows: S1. Acquire multidimensional data characteristics of the facility grape production environment to construct an original data set, wherein the multidimensional data characteristics include temperature, relative humidity, photosynthetically active radiation, and CO2 concentration; S2, based on the original data set, perform K-fold cross validation on the current base learner in the base learner group, average and combine the obtained K prediction sets to construct a data set; S3, taking the next base learner in the base learner group as the current base learner and repeating step S2 until all base learners are traversed, thereby constructing M data sets, where M is the total number of base learners; S4. Merge the M data sets and input them into the meta-learner for training and prediction to obtain the photosynthetic rate prediction result.

[0007] Furthermore, the construction process of the grid search optimized K nearest neighbor model is as follows: Dividing the acquired first data set into a first training set and a first test set; Determine the basic structure of the K-nearest neighbor model, relevant parameters for hyperparameter optimization, and define cross-validation strategies; Perform hyperparameter optimization on the first training set: traverse each hyperparameter combination of the hyperparameter search grid, evaluate the performance of each set of hyperparameters through a cross-validation strategy, and select the optimal hyperparameter combination; The K nearest neighbor model is trained using the optimal hyperparameter combination, and the performance of the K nearest neighbor model on the first test set is verified. The verified K nearest neighbor model is used as a grid search to optimize the K nearest neighbor model.

[0008] Furthermore, the construction process of the Kalman filter optimized Gaussian process regression model is as follows: Dividing the acquired second data set into a second training set and a second test set; The second training set is smoothed by using Kalman filtering to obtain state prediction results and covariance prediction results; The kernel function hyperparameters of the Gaussian process regression model are optimized using the second training set; The state prediction results and covariance prediction results are used as inputs of the optimized Gaussian process regression model to perform non-parametric regression modeling; The Gaussian process regression model after non-parametric regression modeling is used as the Gaussian process regression model optimized by Kalman filtering.

[0009] Furthermore, the calculation formulas for the state prediction results and the covariance prediction results are as follows: ; ; in, is the time step, is the current time step The predicted photosynthetic rate, The previous time step The estimated photosynthetic rate, is the state transfer matrix, for The transpose of is the control matrix, is the multidimensional data feature vector of the current time step, is the current time step The covariance matrix of the state prediction, The previous time step The covariance matrix of the state estimate, is the process noise covariance matrix.

[0010] Furthermore, during the training process of each base learner in the base learner group, the stacking framework has implicit crossover in the data preprocessing stage, specifically: The original data set is smoothed using Kalman filtering, and the obtained state prediction value is used as the input feature of the Kalman filter optimized Gaussian process regression model, and is also shared with the long short-term memory network model as an input feature; The local neighborhood features extracted by the grid search optimized K nearest neighbor model and the temporal features extracted by the long short-term memory network model are spliced ​​into composite features, and the composite features are used as the input features of the support vector machine.

[0011] Furthermore, during the training process of the base learner group, a joint regularization term is introduced to construct a combined loss function to constrain the parameter update direction of each base learner. The formula is as follows: ; in, is the independent loss function of each base learner, is the index of the base learner, for Divergence, used to constrain grid search to optimize the predictions of the K nearest neighbor model Prediction with Support Vector Machine The distribution consistency of is the balance coefficient.

[0012] Furthermore, the correlation between each model in the multi-model fusion model is calculated as follows: Based on grid search to optimize the Pearson correlation coefficient between the K nearest neighbor model and the support vector machine, it is found that there is a positive correlation between the two; Based on the Pearson correlation coefficient between the long short-term memory network model and the support vector machine, it is found that there is a negative correlation between the two; Based on the fact that the Pearson correlation coefficient between the extreme gradient boosting tree model and other models in the multi-model fusion model tends to zero, it is found that the error independence of the extreme gradient boosting tree model is the strongest, which is used to enhance the diversity of the multi-model fusion model.

[0013] A greenhouse grape photosynthetic rate prediction system, which uses a multi-model fusion model to obtain the final photosynthetic rate prediction value; The multi-model fusion model includes a base learner group and a meta-learner, a grid search optimized K nearest neighbor model, a Kalman filter optimized Gaussian process regression model, a long short-term memory network model, and a support vector machine as a base learner group, and an extreme gradient boosting tree model as a meta-learner; Each model in the base learner group takes the multidimensional data characteristics of the facility grape production environment as input and outputs a temporary photosynthetic rate prediction value; All temporary photosynthetic rate prediction values ​​are superimposed as the input of the meta-learner to output the final photosynthetic rate prediction value.

[0014] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for predicting photosynthetic rate of greenhouse grapes as described above is implemented.

[0015] A computer-readable storage medium stores a plurality of classification programs, which are used to be called by a processor and execute the above-mentioned method for predicting photosynthetic rate of greenhouse grapes.

[0016] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes. The advantages of the method, system, device and storage medium for predicting photosynthetic rate of facility grapes provided by the present invention are that the diversity and complementarity of multiple learners are the key to improving the performance of multi-model fusion models. GridSearch-KNN reflects microscopic characteristics by capturing local changes, KF-GPR uses nonlinear modeling capabilities to characterize environmental complexity, LSTM effectively handles time series dependencies, SVM shows strong performance in high-dimensional nonlinear problems, and XGBoost has improved generalization capabilities. The multi-model fusion model not only significantly improves the robustness of the model, but also effectively reduces the problem of insufficient adaptability of a single model in complex data scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the structure flow of the present invention; Figure 2 Modeling flowchart for optimizing K-nearest neighbor model for grid search; Figure 3 Modeling flowchart for optimizing Gaussian process regression model for Kalman filtering; Figure 4Schematic diagram of correlation analysis of prediction errors of each learner; Figure 5a Comparison graph of the predicted and true values ​​of photosynthetic rate for the grid search optimized K nearest neighbor model; Figure 5b Comparison curve between the predicted value and the true value of photosynthetic rate of the Gaussian process regression model optimized by Kalman filter; Figure 5c This is a comparison curve between the predicted value and the actual value of the photosynthetic rate of the long short-term memory network model; Figure 5d This is a comparison curve between the predicted value of photosynthetic rate and the actual value of the support vector machine; Figure 5e This is a comparison curve between the predicted value and the true value of photosynthetic rate of the extreme gradient boosting tree model; Figure 5f This is a comparison curve between the predicted value and the true value of photosynthetic rate of the multi-model fusion model, where the SPM model corresponds to the multi-model fusion model; Figure 6a Comparison curve of the absolute error of the multi-model fusion model and the absolute error of the grid search optimized K nearest neighbor model; Figure 6b Comparison curve of the absolute error of the multi-model fusion model and the absolute error of the Kalman filter optimized Gaussian process regression model; Figure 6c It is a comparison curve of the absolute error of the multi-model fusion model and the absolute error of the long short-term memory network model; Figure 6d It is a comparison curve of the absolute error of the multi-model fusion model and the absolute error of the support vector machine; Figure 6e This is a comparison curve of the absolute error of the multi-model fusion model and the absolute error of the extreme gradient boosting tree model. DETAILED DESCRIPTION

[0018] Below, the technical solution of the present invention is described in detail through specific embodiments. Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific implementation disclosed below.

[0019] like Figures 1 to 6eAs shown, a method for predicting the photosynthetic rate of facility grapes proposed by the present invention inputs the multidimensional data features of the facility grape production environment into a multi-model fusion model, wherein the multi-model fusion model includes a base learner group and a meta-learner, a grid search optimized K nearest neighbor model, a Kalman filter optimized Gaussian process regression model, a long short-term memory network model, and a support vector machine as base learners to form a base learner group, and an extreme gradient boosting tree model is used as a meta-learner; each base learner in the base learner group outputs a temporary photosynthetic rate prediction value; all temporary photosynthetic rate prediction values ​​are superimposed as input to the meta-learner, thereby outputting a final photosynthetic rate prediction value.

[0020] This embodiment obtains multidimensional data features from the facility grape production environment, including key indicators such as temperature, relative humidity, photosynthetically active radiation, and CO2 concentration; secondly, a Stacking framework is constructed based on multiple machine learning models; finally, the effectiveness and superiority of this method in photosynthetic rate prediction are verified through experiments, which are described in detail below.

[0021] (A) Multi-model fusion model; The multi-model fusion model set in this embodiment is a technology that improves the overall prediction performance by combining the prediction results of multiple basic models. Multiple basic models are fused through stacking. Stacking, as a classic multi-model fusion method, can utilize the complementary characteristics of different models and further optimize the prediction accuracy by building a meta-learner. In the context of high complexity of agricultural data and significant nonlinearity of feature correlation, the Stacking method has significant advantages and can more comprehensively mine potential patterns in the data.

[0022] This embodiment selects the initial grid search optimized K nearest neighbor model, the Kalman filter optimized Gaussian process regression model, the long short-term memory network model, the support vector machine and the extreme gradient boosting tree model from many basic models to form a multi-model fusion model.

[0023] In the multi-model fusion model, the grid search optimized K nearest neighbor model (GridSearch-KNN), Kalman filter optimized Gaussian process regression model (KF-GPR), long short-term memory network model (LSTM), and support vector machine (SVM) are selected as base learners to form a base learner group based on comprehensive considerations of diversity and problem characteristics. GridSearch-KNN captures local patterns through neighboring samples and is suitable for describing the local variation characteristics of photosynthetic rate; KF-GPR uses the nonlinear modeling ability and probability of Gaussian process to handle the influence of complex environmental factors and provide prediction uncertainty; LSTM is good at processing time series data and can effectively capture the dynamic dependency between photosynthetic rate and historical conditions; and SVM maps complex nonlinear relationships through kernel methods, which is suitable for high-dimensional and nonlinear problems. These base learners have their own advantages and can characterize the variation law of photosynthetic rate from different angles to ensure the diversity and robustness of the model.

[0024] The Extreme Gradient Boosting Tree Model (XGBoost) was chosen as the meta-learner because of its powerful ensemble learning capabilities and advantages in handling nonlinear relationships. XGBoost effectively integrates the prediction results of base learners through gradient boosting decision trees, further extracts deep interactions between features, and has efficient computing performance and good generalization capabilities. The built-in regularization function can prevent the model from overfitting, making it stable in complex tasks. As a meta-learner for Stacking, XGBoost performs well in comprehensively optimizing the output of multiple base learners and can significantly improve the prediction performance of the final model.

[0025] In this embodiment, the grid search optimized K nearest neighbor model (GridSearch-KNN model) is constructed based on the K nearest neighbor algorithm and the grid search method. The K nearest neighbor algorithm (K-Nearest Neighbors, KNN) is a simple and commonly used supervised learning method, which is widely used in classification and regression tasks. The KNN algorithm determines the nearest neighbor by calculating the distance between samples. Commonly used distance metrics include Euclidean distance and Manhattan distance. Since the collected sample data is a continuous variable, the Euclidean distance is selected. In each sample input feature is temperature, relative humidity, photosynthetically active radiation, CO2 concentration, and the target value is a data set of photosynthetic rate. The weighted average calculation formula of the nearest sample is: ; In the formula is the predicted value of photosynthetic rate; is the number of neighbors, that is, the number of samples selected from the first training set that are closest to the input sample (test point); Rank The weight of the neighbors; For the The target value of each neighbor.

[0026] Since the performance of KNN is highly dependent on the selection of parameters, such as the number of neighbors, distance measurement method, and weight function, etc. To address this problem, this embodiment uses the grid search method to perform hyperparameter tuning, find the best parameter combination, and build a Grid Search-KNN model. The modeling flow chart is as follows: Figure 2 As shown in the figure, the specific construction process of the Grid Search-KNN model is (a1) to (a4): (a1) dividing the acquired first data set into a first training set and a first test set; (a2) Determine the basic structure of the K nearest neighbor model (including the number of neighbors, distance measurement method, weight type), the relevant parameters for hyperparameter optimization (including the hyperparameter search grid, defining all possible parameter combinations), define the cross-validation strategy and evaluation indicators; (a3) Perform hyperparameter optimization on the first training set: traverse each hyperparameter combination in the hyperparameter search grid, evaluate the performance of each set of hyperparameters through a cross-validation strategy, and select the optimal hyperparameter combination; the cross-validation strategy can be K-fold cross-validation.

[0027] (a4) Use the optimal hyperparameter combination to train the K nearest neighbor model, verify the performance of the K nearest neighbor model on the first test set, and use the verified K nearest neighbor model as a grid search to optimize the K nearest neighbor model.

[0028] In this embodiment, the Kalman filter optimized Gaussian process regression model (KF-GPR model) is constructed based on Gaussian process regression and Kalman filtering. Gaussian process regression (GPR) is a non-parametric model based on Bayesian inference, which uses kernel functions to process nonlinear relationships. The regression equation is: ; in, is the predicted value of photosynthetic rate; The input multidimensional data features include temperature, relative humidity, effective radiation of light and carbon dioxide concentration; is the mean function, describing The prior mean of ; is the covariance function (kernel function).

[0029] Kalman Filter (KF) is a recursive algorithm for estimating the state of a linear dynamic system. It is mainly used to process noisy signals and can provide the optimal estimate of the system state under noise and uncertainty conditions, which makes it particularly good when processing Gaussian noise observation data. Kalman filter also has good robustness and can effectively handle noise and model errors, and can provide accurate estimation results even when there is noise in the observation value. It is suitable for processing multi-dimensional state variables, so it can be widely used in the state estimation of complex systems. The Kalman filter algorithm assumes that the true state at the current moment is evolved from the state at the previous moment. The state prediction formula and covariance prediction formula are as follows: ; ; in, is the time step, is the current time step The predicted photosynthetic rate, The previous time step The estimated photosynthetic rate, is the state transfer matrix, for The transpose of is the control matrix, is the multidimensional data feature vector of the current time step, is the current time step The covariance matrix of the state prediction, The previous time step The covariance matrix of the state estimate, is the process noise covariance matrix.

[0030] This embodiment combines the noise processing capability of Kalman filtering and the nonlinear fitting capability of Gaussian process regression to propose a KF-GPR model. The modeling flow chart is as follows: Figure 3 As shown in Figure 2, the construction process of the KF-GPR model is as follows (b1) to (b5): (b1) dividing the acquired second data set into a second training set and a second test set; (b2) using Kalman filtering to smooth the second training set and obtain state prediction results and covariance prediction results; The specific details of the smoothing process are detailed in the above Kalman filter record; determine the basic framework of Kalman filtering (KF) and Gaussian process regression (GPR), including determining the state transfer matrix, control matrix, process noise covariance matrix, selecting the kernel function and setting the hyperparameters of the kernel function. Initialize the state variables (predicted photosynthetic rate) and covariance matrix of the Kalman filter, and perform KF state prediction and covariance prediction based on the input features for each time step.

[0031] (b3) optimizing the kernel function hyperparameters of the Gaussian process regression model using the second training set; Perform hyperparameter optimization on the second training set: traverse each hyperparameter in the Gaussian process regression model, evaluate the performance of each hyperparameter through a cross-validation strategy, select the optimal hyperparameter, use the optimal hyperparameter to train the Gaussian process regression model, and obtain the optimized Gaussian process regression model.

[0032] (b4) using the state prediction results and the covariance prediction results as inputs of the optimized Gaussian process regression model to perform non-parametric regression modeling; (b5) The Gaussian process regression model after non-parametric regression modeling is used as the Kalman filter optimized Gaussian process regression model.

[0033] This embodiment improves the stability, generalization performance and accuracy of the multi-model fusion model by constructing a grid search to optimize the K nearest neighbor model and a Kalman filter to optimize the Gaussian process regression model.

[0034] (B) The training process of the multi-model fusion model is as follows: S1, obtain the multidimensional data characteristics of the facility grape production environment to construct the original data set; Since there may be uncontrollable factors such as equipment failure, human operation error, transmission error, etc. during the test, there will be missing values ​​and abnormal values. Therefore, this embodiment measures the photosynthetic rate of the corresponding leaves of the grapes after planting 5 times, averages the data of the 5 repeated measurements, removes missing and abnormal data, and finally obtains 1000 sets of data. In the study of photosynthetic rate prediction of greenhouse grapes, the multi-model fusion model uses temperature, relative humidity, photosynthetically active radiation and CO2 concentration as input features, and takes photosynthetic rate as the output target value.

[0035] Considering that the numerical ranges of temperature, relative humidity, photosynthetically active radiation, and CO2 concentration vary greatly, the Z-score normalization method is suitable for scenarios with large differences in characteristic value ranges, especially in algorithms involving gradient descent (such as neural networks and support vector machines), which can significantly improve the convergence speed and prediction performance of the model. Therefore, this embodiment constructs the original data set after Z-score normalization of the above 1000 sets of data; the number of data obtained is selected according to the actual situation, and is not limited to 1000 sets.

[0036] S2, based on the original data set, perform K-fold cross validation on the current base learner in the base learner group, average and combine the obtained K prediction sets to construct a data set; In order to make full use of data, reduce the risk of overfitting, and generate robust prediction results as the input of the meta-learner, thereby improving the generalization ability and fusion effect of the multi-model fusion model, this embodiment uses K-fold cross-validation to train each base learner.

[0037] K-fold cross validation is an important method in machine learning for evaluating the generalization performance of models. It reduces the variance of evaluation results by effectively utilizing data.

[0038] K-fold cross-validation steps: Data partitioning: randomly divide the original data set into K subsets of similar size; Cycle training and validation: For each fold ( = 1 to K): Training set: Use all except The K-1 fold data outside the fold is used to train the model, and the validation set is: Evaluate model performance on the folded data; Result summary: Calculate the average of K evaluation results as the final performance indicator.

[0039] K is usually set to 5 or 10 to balance the computational cost and evaluation stability. This embodiment uses K=5 to illustrate (c1) to (c4): (c1) The original data set D is randomly divided into five subsets of roughly equal size D1, D2, D3, D4, and D5 after 5-fold cross validation. (c2) Select subset Dn (n=1,2,...,5) as the test set and the remaining 4 subsets as the training sets. Train the base learner GridSearch-KNN model, and then use the trained GridSearch-KNN model to predict the test set to obtain 1 prediction set. Repeat this cycle until all combinations are traversed and finally 5 prediction sets are obtained. At the same time, the 5 prediction sets are averaged and combined to construct a new data set P1.

[0040] (c3) Using different base learners including KF-GPR, LSTM and SVM, repeat step (c2) to obtain data sets P2, P3 and P4 respectively.

[0041] (c4) Merge the data sets P1, P2, P3, and P4 row-wise to obtain a new data set P = {P1, P2, P3, P4}.

[0042] S3, taking the next base learner in the base learner group as the current base learner and repeating step S2 until all base learners are traversed, thereby constructing M data sets, where M is the total number of base learners; During the training process of each base learner in the base learner group, there is implicit crossover in the data preprocessing stage of the stacking framework, specifically: the original data set is smoothed, and the obtained state prediction value is used as the input feature of the Kalman filter optimized Gaussian process regression model, and shared with the long short-term memory network model as the input feature; the local neighborhood features extracted by the grid search optimized K nearest neighbor model and the time series features extracted by the long short-term memory network model are spliced ​​into composite features, and the composite features are used as the input features of the support vector machine.

[0043] The core mechanisms of the existing stacking framework are: ① Independent training of base learners: Each base learner (such as KNN, SVM) learns independently from the original data, and there is no data or feature interaction between them; ② Meta-learner integrates prediction results: The output (prediction value) of the base learner is used as the input feature of the meta-learner, and the meta-learner (such as XGBoost) generates the final output by integrating these prediction results; ③ No preprocessing collaboration or feature sharing: The training process of the base learner is completely independent, and data preprocessing and feature engineering are only optimized for a single base learner and will not be shared across base learners.

[0044] Based on the traditional Stacking framework, this embodiment introduces the following implicit crossover mechanisms (1-1) to (1-2): (1-1) Collaboration in the data preprocessing stage; KF-GPR Kalman filter sharing: KF-GPR smoothes the original data (such as denoising), eliminates noise interference, and shares the processed data (such as state prediction values) with other base learners (such as LSTM), where the state prediction values ​​are smoothed sequences such as temperature and CO2 concentration.

[0045] Difference from the traditional Stacking framework: In the traditional Stacking framework, the base learner directly uses the original data and does not rely on the preprocessing results of other base learners; Effect: LSTM receives cleaner time series data and improves its ability to capture historical dependencies.

[0046] (1-2) Feature sharing mechanism; Composite feature concatenation: The time series features extracted by LSTM and the local neighborhood features of GridSearch-KNN (such as the neighborhood mean of photosynthetic rate at a certain moment) are concatenated into composite features, which are input into SVM as additional inputs to help SVM divide nonlinear boundaries more accurately in high-dimensional space and form a more comprehensive feature representation. Example: SVM input = [LSTM time series features, KNN neighborhood features] and the original data set of K-fold cross validation; Difference from the traditional Stacking framework: In the traditional Stacking framework, the output of the base learner is only the predicted value, not the intermediate feature.

[0047] During the training process of the base learner group, a joint regularization term is introduced to construct a combined loss function to constrain the parameter update direction of each base learner. The formula is as follows: ; in, is the independent loss function of each base learner, is the index of the base learner, for Divergence, used to constrain grid search to optimize the predictions of the K nearest neighbor model Prediction with Support Vector Machine The distribution consistency of is the balance coefficient.

[0048] The difference between the Stacking framework of this embodiment and the traditional Stacking framework: In the traditional Stacking framework, the training of the base learners is completely independent and there is no joint optimization goal.

[0049] This embodiment expands the scope of Stacking through data preprocessing collaboration, feature sharing and joint regularization, so that it not only relies on the prediction integration of the meta-learner, but also improves performance through collaborative optimization between base learners.

[0050] S4. Merge the M data sets and input them into the meta-learner for training and prediction to obtain the photosynthetic rate prediction result.

[0051] It should be noted that the original data set, the first data set, and the second data set involved in this embodiment have the same data source. The difference lies in the difference in the number of data in the data sets. The first data set and the second data set are data sets composed of some data randomly extracted from the original data set; or the data of the three are data sets composed of some data randomly extracted from a large data set, wherein the large data set is data obtained in a facility grape production environment, and the data is normalized by Z-score and stored. The data set used for training in this embodiment is extracted from the big data.

[0052] Indirect association of model output: The prediction results (temporary photosynthetic rate prediction values) of each base learner are summarized in the meta-learner (XGBoost). When integrating these results, the meta-learner actually utilizes the error complementarity between different base learners. For example: GridSearch-KNN may perform better on local samples; KF-GPR is more stable in noisy environments; the meta-learner indirectly achieves collaborative optimization between base learners by weighting these results.

[0053] During the meta-learner (XGBoost) training phase, define the weighted mean square error-diversity loss : ; in, is the weighted mean square error, which is used to measure the final photosynthetic rate prediction result With the true value The error, is the weight coefficient (the default is 0.7, which can be adjusted according to actual conditions), For the The photosynthetic rate prediction results of samples are: The photosynthetic rate prediction result set for all samples, is the diversity loss function, which is used to measure the relevance of the prediction results of the base learners. in is the Pearson correlation coefficient, For the The photosynthetic rate prediction results of samples.

[0054] This loss function This forces the meta-learner to maximize the diversity of the base learners while optimizing the prediction accuracy, further improving the generalization ability of the fusion model.

[0055] (C) Instructions for building a multi-model fusion model; The key to this embodiment is to select the five sub-models of this embodiment (grid search optimized K nearest neighbor model, Kalman filter optimized Gaussian process regression model, long short-term memory network model, support vector machine and extreme gradient boosting tree model) from many basic models, and divide these five sub-models into base learners and meta-learners based on certain rules, and finally obtain a multi-model fusion model.

[0056] The following further explains why five sub-models are selected to form a multi-model fusion model in this embodiment: This embodiment performs hyperparameter setting and correlation analysis on the five sub-models in the multi-model fusion model. Through reasonable hyperparameter setting, the performance of the model can be maximized; through correlation analysis, the complementarity between models can be understood and the integration strategy can be optimized. The combination of these two can significantly improve the prediction accuracy, stability and computational efficiency of the multi-model fusion model, providing more reliable support for practical applications. The prediction performance results of the five sub-models under hyperparameter conditions are shown in Table 1; Table 1

[0057] As shown in Table 1, the extreme gradient boosting tree model XGBoost performs best in terms of determination coefficient R², root mean square error RMSE and mean absolute error MAE, followed by the grid search optimized K nearest neighbor model GridSearch-KNN, the Kalman filter optimized Gaussian process regression model KF-GPR and the long short-term memory network model SVM. Among them, the Kalman filter optimized Gaussian process regression model KF-GPR performs well in terms of average error, while the long short-term memory network model LSTM performs relatively poorly, with a low determination coefficient R², a high root mean square error RMSE and a high mean absolute error MAE, indicating that its prediction performance is not as good as other sub-models. Overall, the extreme gradient boosting tree model XGBoost is the best choice, suitable for tasks that pursue high precision; the grid search optimized K nearest neighbor model GridSearch-KNN and the long short-term memory network model SVM are good choices for balancing performance and computational complexity; the Kalman filter optimized Gaussian process regression model KF-GPR is suitable for tasks that are sensitive to average error.

[0058] The core of the construction process of the multi-model fusion model lies in the diversity design of the base learners and the feature integration ability of the meta-learner. Different base learners are required to be different to reduce the error correlation. The correlation between different learners is explored and the Pearson correlation coefficient between the prediction errors of the five sub-models is calculated. The analysis can provide a scientific basis for sub-model selection and integration strategy. The results are as follows Figure 4 shown.

[0059] Depend on Figure 4 It can be seen that the correlation coefficient between GridSearch-KNN and SVM is 0.3305, indicating that there is a moderate positive correlation between the two, which means that when an error occurs in one sub-model, the other sub-model may also have a similar error. The correlation coefficient between LSTM and SVM is -0.04369, indicating that the errors of the two are slightly negatively correlated, that is, when the error of one sub-model increases, the error of the other sub-model may decrease, and this relationship helps to offset the errors. The error correlation between XGBoost and other models is close to zero, indicating that its error independence is strong and it is suitable for increasing the diversity of integrated models. Overall, the prediction error correlation between most learners is low, and some even show a slight negative correlation, which indicates that the errors of these sub-models are inconsistent when predicting and have different performances on different data points.

[0060] In summary, the five sub-models selected in this embodiment have good diversity and complementarity, and meet the sub-model fusion conditions. In addition, considering that XGBoost is essentially an integrated learning algorithm, XGBoost is more suitable as a meta-learner, and other models are used as base learners to build a multi-model fusion model based on Stacking.

[0061] The diversity and complementarity of multiple learners are the key to improving the performance of multi-model fusion models. GridSearch-KNN reflects microscopic characteristics by capturing local changes, KF-GPR uses nonlinear modeling capabilities to characterize environmental complexity, LSTM effectively handles time series dependencies, SVM shows strong performance in high-dimensional nonlinear problems, and XGBoost has improved generalization capabilities. The multi-model fusion model not only significantly improves the robustness of the model, but also effectively reduces the problem of insufficient adaptability of a single model in complex data scenarios.

[0062] (D) Experiments on multi-model fusion model; The first experimental comparison example: like Figure 5a to Figure 5f As shown in the figure, by comparing the photosynthetic rate prediction results of the multi-model fusion model with those of a single sub-model, it can be seen that the photosynthetic rate prediction value of the multi-model fusion model is highly consistent with the true value, and the prediction performance is better than other models. The prediction values ​​of GridSearch-KNN, KF-GPR, SVM and XGBoost on most samples are close to the true values, indicating that these models show high prediction accuracy in the photosynthetic rate prediction task. Specifically, the KF-GPR and SVM models have small prediction errors on most samples and show good stability; in contrast, the prediction performance of the LSTM model fluctuates greatly, and the prediction error on some samples is large, indicating that its prediction ability on some samples is poor. In order to more intuitively display the prediction accuracy of each model, the absolute error curve comparison results of the multi-model fusion model and other models are shown in the figure below. Figures 6a to 6e As shown in the figure, compared with other single models, the multi-model fusion model has a lower absolute error mean, avoids the extreme error points of other models, and the error curve is smoother and the error fluctuation is smaller.

[0063] Second experimental comparison example: In order to verify the superiority of the multi-model fusion model (SPM) proposed in this embodiment over the conventional hybrid model, two model hybrids in the field of regression prediction were selected: SVM-GMM (support vector machine-Gaussian mixture model), CNN-LSTM (convolutional neural network-long short-term memory network hybrid model), and CNN-SVR (convolutional neural network-support vector regression hybrid model) as the control group for prediction. The prediction performance results are shown in Table 2; Table 2

[0064] Combining Table 1 and Table 2, it can be seen that the multi-model fusion model proposed in this embodiment improves the determination coefficient R² by 0.004~0.193, and reduces the root mean square error RMSE and the mean absolute error MAE by 0.254~1.670 and 0.072~1.168 respectively compared with the GridSearch-KNN, KF-GPR, LSTM, SVM and XGBoost models; in addition, among the five learners in this embodiment, the XGBoost model has the highest prediction accuracy, with the root mean square error RMSE and the mean absolute error MAE being 0.382 and 0.160 respectively.

[0065] For the three hybrid models of SVM-GMM, CNN-LSTM and CNN-SVR, although the multi-model fusion model increased the determination coefficient R² by less than 0.035, the RMSE and MAE were reduced by 0.303~0.578 and 0.147~0.392 respectively. It is worth mentioning that the prediction performance of the hybrid model is usually better than that of the single model, but in this embodiment, the mean absolute error of SVM-GMM is higher than that of the KF-GPR model, and the prediction accuracy of CNN-SVR is not as good as that of the GridSearch-KNN model, indicating that the hybrid model is not always better than the single model. This depends on many factors, including the choice of model, the effectiveness of the hybrid strategy, the characteristics and scale of the data set, the tuning of hyperparameters, and the nature of the problem itself. Therefore, when selecting the model to use, this embodiment comprehensively considers these factors and conducts sufficient experiments and verifications.

[0066] The third experimental comparison example: To verify the superiority of the multi-model fusion model (SPM), it is further compared with three hybrid models and four hybrid models. The hybrid model is composed of the sub-models in the multi-model fusion model and other models, as follows: 3 models are mixed: GridSearch-KNN + KF-GPR + Random Forest (RF). Reason for selection: GridSearch-KNN (local pattern capture), KF-GPR (nonlinear modeling), and Random Forest (high robustness) complement each other.

[0067] 3 models mixed: LSTM + SVM + gradient boosted decision tree (GBDT). Reason for selection: LSTM (time series dependency), SVM (high-dimensional classification), GBDT (gradient boosting) cover different modeling directions.

[0068] 3 model mixtures: KF-GPR + SVM + decision tree (DT), selection reason: combination of KF-GPR (noise robustness), SVM (non-linearity), and decision tree (interpretability).

[0069] 4 models mixed: GridSearch-KNN + KF-GPR + LSTM + deep neural network (DNN), selection reasons: fusion of local features, nonlinear modeling, temporal dependency and deep feature extraction.

[0070] 4-model mixture: LSTM + SVM + GridSearch-KNN + Bayesian Linear Regression (BLR) Reason for selection: Combining time series, high-dimensional, local features and probabilistic modeling.

[0071] 4 model mixture: KF-GPR + SVM + XGBoost + Adaptive Boosting (AdaBoost) Reason for selection: integrating nonlinearity, classification, gradient boosting and adaptive weighting strategies.

[0072] The prediction performance of the multi-model fusion model and the newly added hybrid model are compared through experiments. The results are shown in Table 3: Table 3

[0073] Conclusion Analysis: The R² of GridSearch-KNN + KF-GPR + RF is 0.982, which is close to SPM, but the RMSE (0.155) and MAE (0.105) are still significantly higher than SPM. The R² of KF-GPR + SVM + DT is only 0.965, indicating that the simple model combination may lead to performance degradation due to feature conflicts. The R² of KF-GPR + SVM + XGBoost + AdaBoost is 0.985, but it is still lower than SPM, and the MAE (0.097) is high, indicating that the increase in the number of models may introduce redundant noise. The RMSE (0.173) of GridSearch-KNN + KF-GPR + LSTM + DNN is 35% higher than SPM, verifying the nonlinear relationship between multi-model complexity and performance.

[0074] Therefore, this embodiment compares the multi-model fusion model (SPM) with the above three or four models. As shown in Table 3, the prediction accuracy of SPM (R²=0.991) is significantly better than all hybrid models, and the error index (RMSE=0.128, MAE=0.088) is optimal. The experiment shows that the performance of the hybrid model is highly dependent on the effectiveness of the integration strategy, and SPM achieves the optimal balance through the Stacking framework and the diversity loss function (DivLoss).

[0075] In summary, the prediction results of the multi-model fusion model in this embodiment show extremely high accuracy and stability, with a determination coefficient (R²) of 0.991, a root mean square error (RMSE) and a mean absolute error (MAE) of 0.128 and 0.088 respectively, which are better than all the single models and traditional hybrid models proposed in this embodiment. By effectively integrating the advantages of the base learner, the multi-model fusion model significantly reduces the probability of occurrence of extreme error points and achieves more accurate photosynthetic rate prediction.

[0076] The multi-factor coupling and data complexity in facility agriculture scenarios require the model to have high robustness and generalization capabilities. The multi-model fusion model exhibits low error fluctuation and extremely high stability when dealing with complex and changing environmental conditions. Its predicted value is closer to the true value and is suitable for application in agricultural scenarios where multi-dimensional variables interact significantly.

[0077] This embodiment makes full use of the complementarity of different algorithms, which not only reflects the depth of algorithm development, but also reveals the multidimensionality of agricultural data analysis. The multi-model fusion model based on Stacking ensemble learning proposed in this embodiment is not only applicable to photosynthetic rate prediction, but can also be extended to other problems in facility agriculture (such as transpiration rate prediction, crop growth modeling, etc.). At the same time, this embodiment verifies the potential of multi-model fusion in processing nonlinear and multi-dimensional coupled data, and provides a reference path for other researchers to explore more complex agricultural problems.

[0078] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for predicting the photosynthetic rate of greenhouse grapes, characterized in that: include: Inputting the multidimensional data features of the facility grape production environment into a multi-model fusion model, wherein the multi-model fusion model includes a base learner group and a meta-learner, a grid search optimized K nearest neighbor model, a Kalman filter optimized Gaussian process regression model, a long short-term memory network model, and a support vector machine as base learners to form a base learner group, and an extreme gradient boosting tree model as a meta-learner; Each base learner in the base learner group outputs a temporary photosynthetic rate prediction value; All temporary photosynthetic rate prediction values ​​are superimposed as the input of the meta-learner to output the final photosynthetic rate prediction value.

2. The method for predicting photosynthetic rate of greenhouse grapes according to claim 1, characterized in that: The multi-model fusion model fuses the base learner and the meta learner through the stacking framework. The training process of the multi-model fusion model is as follows: S1. Acquire multidimensional data characteristics of the facility grape production environment to construct an original data set, wherein the multidimensional data characteristics include temperature, relative humidity, photosynthetically active radiation, and CO2 concentration; S2, based on the original data set, perform K-fold cross validation on the current base learner in the base learner group, average and combine the obtained K prediction sets to construct a data set; S3, taking the next base learner in the base learner group as the current base learner and repeating step S2 until all base learners are traversed, thereby constructing M data sets, where M is the total number of base learners; S4. Merge the M data sets and input them into the meta-learner for training and prediction to obtain the photosynthetic rate prediction result.

3. The method for predicting photosynthetic rate of greenhouse grapes according to claim 1, characterized in that: The construction process of the grid search optimized K nearest neighbor model is as follows: Dividing the acquired first data set into a first training set and a first test set; Determine the basic structure of the K-nearest neighbor model, relevant parameters for hyperparameter optimization, and define cross-validation strategies; Perform hyperparameter optimization on the first training set: traverse each hyperparameter combination of the hyperparameter search grid, evaluate the performance of each set of hyperparameters through a cross-validation strategy, and select the optimal hyperparameter combination; The K nearest neighbor model is trained using the optimal hyperparameter combination, and the performance of the K nearest neighbor model on the first test set is verified. The verified K nearest neighbor model is used as a grid search to optimize the K nearest neighbor model.

4. The method for predicting photosynthetic rate of greenhouse grapes according to claim 1, characterized in that: The construction process of the Kalman filter optimized Gaussian process regression model is as follows: Dividing the acquired second data set into a second training set and a second test set; The second training set is smoothed by using Kalman filtering to obtain state prediction results and covariance prediction results; The kernel function hyperparameters of the Gaussian process regression model are optimized using the second training set; The state prediction results and covariance prediction results are used as inputs of the optimized Gaussian process regression model to perform non-parametric regression modeling; The Gaussian process regression model after non-parametric regression modeling is used as the Gaussian process regression model optimized by Kalman filtering.

5. The method for predicting photosynthetic rate of greenhouse grapes according to claim 4, characterized in that: The calculation formulas for state prediction results and covariance prediction results are as follows: ; ; in, is the time step, is the current time step The predicted photosynthetic rate, The previous time step The estimated photosynthetic rate, is the state transfer matrix, for The transpose of is the control matrix, is the multidimensional data feature vector of the current time step, is the current time step The covariance matrix of the state prediction, The previous time step The covariance matrix of the state estimate, is the process noise covariance matrix.

6. The method for predicting photosynthetic rate of greenhouse grapes according to claim 2, characterized in that: During the training process of each base learner in the base learner group, the stacking framework has implicit crossover in the data preprocessing stage, specifically: The original data set is smoothed using Kalman filtering, and the obtained state prediction value is used as the input feature of the Kalman filter optimized Gaussian process regression model, and is also shared with the long short-term memory network model as an input feature; The local neighborhood features extracted by the grid search optimized K nearest neighbor model and the temporal features extracted by the long short-term memory network model are spliced ​​into composite features, and the composite features are used as the input features of the support vector machine.

7. The method for predicting photosynthetic rate of greenhouse grapes according to claim 1, characterized in that: During the training process of the base learner group, a joint regularization term is introduced to construct a combined loss function to constrain the parameter update direction of each base learner. The formula is as follows: ; in, is the independent loss function of each base learner, is the index of the base learner, for Divergence, used to constrain grid search to optimize the predictions of the K nearest neighbor model Prediction with Support Vector Machine The distribution consistency of is the balance coefficient.

8. A greenhouse grape photosynthetic rate prediction system, characterized in that: The final photosynthetic rate prediction value was obtained using the multi-model fusion model; The multi-model fusion model includes a base learner group and a meta-learner, a grid search optimized K nearest neighbor model, a Kalman filter optimized Gaussian process regression model, a long short-term memory network model, and a support vector machine as base learners to form a base learner group, and an extreme gradient boosting tree model as a meta-learner; Each base learner in the base learner group takes the multidimensional data characteristics of the facility grape production environment as input and outputs a temporary photosynthetic rate prediction value; All temporary photosynthetic rate prediction values ​​are superimposed as the input of the meta-learner to output the final photosynthetic rate prediction value.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for predicting the photosynthetic rate of greenhouse grapes according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of classification programs, which are used to be called by a processor and execute the greenhouse grape photosynthetic rate prediction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Offshore doubly fed wind power generator fault judging method based on GRA-LSTM-stacking model

    CN111237134A

  • Electromyogram gait recognition and evaluation method and system based on machine learning

    CN118902480A

  • Gradient decision tree-integrated Gaussian Bayesian warehouse cargo volume prediction method and system

    CN119338380A

  • Ship Motion Prediction Method Based on Long Short-Term Memory Network and Gaussian Process Regression

    US20210117796A1