A deep learning-based seedling mortality rate prediction method in flower cultivation process

By constructing a deep learning-based method for predicting seedling mortality in flower cultivation, and combining convolutional neural networks, bidirectional long short-term memory neural networks, and the XGBoost algorithm, the accuracy of seedling mortality prediction is solved and the seedling survival rate is improved.

CN114936699BActive Publication Date: 2026-05-22GUANGDONG VOCATIONAL & TECHNICAL COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG VOCATIONAL & TECHNICAL COLLEGE
Filing Date
2022-05-30
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing technologies make it difficult to effectively predict the mortality rate of flower seedlings during their growth cycle, preventing growers from taking preventative measures to improve seedling survival rates.

Method used

A deep learning-based approach was adopted, using convolutional neural networks and bidirectional long short-term memory neural networks to construct a first mortality prediction model, and combining the XGBoost algorithm to construct a second mortality prediction model. Data was acquired using environmental sensors and image sensors, and the prediction results of the two models were combined to obtain the comprehensive mortality rate.

Benefits of technology

This improves the accuracy of predicting seedling mortality rates, allowing growers to take preventative measures to increase seedling survival rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936699B_ABST
    Figure CN114936699B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on deep learning's seedling mortality prediction method in flower cultivation process, comprising: obtaining the characteristic data of seedling in whole growth cycle and its corresponding mortality, generates the death characteristic data set of seedling;According to death characteristic data set, establish first mortality prediction model, second mortality prediction model;Obtain the environmental data and growth data of seedling in current growth cycle, generate the current characteristic data set of seedling;According to current characteristic data set, first mortality prediction model predicts output first predicted mortality, and second mortality prediction model predicts output second predicted mortality;First weight, second weight are respectively given to first predicted mortality, second predicted mortality, and the integrated mortality of seedling in next growth cycle is obtained by accumulating both.The application can predict the mortality of seedling in advance, and the grower can take rescue measures according to the integrated mortality of seedling, to improve the survival rate of flower seedling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a method for predicting seedling mortality rate in flower cultivation based on deep learning. Background Technology

[0002] Flowers are herbaceous plants with ornamental value, typically preferring sunny locations and being cold-hardy. The term "flower" has both a broad and a narrow meaning. In a narrow sense, flowers refer to herbaceous plants with ornamental value (such as impatiens, chrysanthemums, and cockscomb). In a broader sense, flowers include not only ornamental herbaceous plants but also herbaceous or woody ground cover plants, flowering shrubs, flowering trees, and bonsai (such as liriope and sedum varieties). China has the world's largest area of ​​flower cultivation and a vast consumer market. In daily life, people often cultivate, purchase, and wear flowers in various ways because of their beautiful appearance and pleasant fragrance.

[0003] Throughout the entire growth cycle of flowers, growers need to ensure that the environmental parameters of the seedlings are within a suitable range and to regularly control pests and fertilize them to ensure robust growth. However, if the environmental parameters of the seedlings exceed the suitable range, or if the seedlings suffer from severe pest infestation or excessive fertilizer in the soil, these factors will increase the mortality rate of the seedlings in future growth cycles, leading to their failure to thrive and eventual death. How to predict the mortality rate of seedlings in the next growth cycle based on their current characteristics and environmental parameters, and thus take preventative measures to avoid flower death, has become a major challenge in the field of flower cultivation technology. Summary of the Invention

[0004] The purpose of this invention is to provide a method for predicting seedling mortality in flower cultivation based on deep learning, so as to solve one or more technical problems existing in the prior art, and at least provide a beneficial option or create conditions.

[0005] The solution to the technical problem of this invention is: to provide a method for predicting seedling mortality during flower cultivation based on deep learning, the method comprising the following steps:

[0006] S100. Based on big data of flowers, obtain the characteristic data of seedlings and their corresponding mortality data throughout the entire growth cycle, preprocess the characteristic data of seedlings and their corresponding mortality data, and generate a seedling mortality feature dataset.

[0007] The characteristic data include ambient temperature, ambient pH value, soil multi-ion concentration, soil enzyme biological concentration, number of seedling insect holes, and seedling chlorophyll concentration.

[0008] S200. Establish a first mortality rate prediction model and a second mortality rate prediction model based on the mortality feature dataset;

[0009] S300: Obtain the environmental and growth data of the seedlings in the current growth cycle, preprocess the environmental and growth data of the seedlings in the current growth cycle, and generate the current feature dataset of the seedlings.

[0010] S400. Based on the current feature dataset, the first mortality prediction model predicts the mortality rate of seedlings in the next growth cycle and outputs the first predicted mortality rate. The second mortality prediction model predicts the mortality rate of seedlings in the next growth cycle and outputs the second predicted mortality rate.

[0011] S500. Assign a first weight to the first predicted mortality rate and a second weight to the second predicted mortality rate. Add the first predicted mortality rate with the first weight and the second predicted mortality rate with the second weight to obtain the comprehensive mortality rate of the seedling in the next growth cycle.

[0012] As a further improvement to the above technical solution, in step S100, the step of pre-treating the seedling characteristic data and its corresponding mortality data is as follows:

[0013] S110. Find the missing values ​​of seedling characteristic data and corresponding mortality data, and fill in the missing values ​​using a regression algorithm;

[0014] S120. Find the characteristic data of seedlings and the corresponding mortality data, and discard the duplicate and outlier values.

[0015] S130. Dimensionality reduction is performed on the characteristic data of seedlings and their corresponding mortality data.

[0016] S140, standardized seedling characteristic data and their corresponding mortality data, generate seedling mortality characteristic dataset.

[0017] As a further improvement to the above technical solution, in step S200, the establishment of the first mortality prediction model and the second mortality prediction model based on the mortality feature dataset includes the first mortality prediction model establishment step and the second mortality prediction model establishment step.

[0018] The steps for establishing the first mortality prediction model include the following:

[0019] S210. Convert the format of the death feature dataset to conform to the input format of a convolutional neural network. After conversion, the death feature dataset is divided into the first training set and the first test set in an 8:2 ratio.

[0020] S211. Input the first training set into the convolutional neural network, train the convolutional neural network, and obtain the first feature vector;

[0021] S212. Convert the format of the first feature vector to conform to the input format of the bidirectional long short-term memory neural network, input the format-converted first feature vector into the bidirectional long short-term memory neural network, train the bidirectional long short-term memory neural network, and obtain the second feature vector.

[0022] S213. Construct a result classification layer and an attention layer based on the attention mechanism. The second feature vector is input into the attention layer, and the output of the attention layer is input into the result classification layer. The output of the result classification layer generates the first mortality prediction model.

[0023] S214. Set the first evaluation index and evaluate the performance of the first mortality prediction model based on the first test set and the first evaluation index.

[0024] The steps for establishing the second mortality prediction model include:

[0025] S220. Perform feature selection on the mortality feature dataset;

[0026] S221. The mortality dataset after feature selection is divided into a second training set and a second test set in an 8:2 ratio. The second training set is input into the XGBoost model to train the XGBoost model and generate a second mortality prediction model.

[0027] S222. Evaluate the performance of the second mortality prediction model based on the second test set and the second evaluation index.

[0028] As a further improvement to the above technical solution, the attention mechanism satisfies the following formula:

[0029]

[0030] in, This represents the output of the attention layer, K is the second feature vector, ω is the preset training parameter vector, and softmax represents the operation in the softmax classifier.

[0031] As a further improvement to the above technical solution, the step of performing feature selection on the death feature dataset is as follows: query the null values ​​in the death feature dataset, and fill them by calling the median of the column where the null values ​​are located; call the scoring function of the sklearn library to perform univariate feature selection on the death feature dataset after filling the null values, wherein the scoring function is the f_regression() function.

[0032] As a further improvement to the above technical solution, the first evaluation index satisfies the following formula:

[0033]

[0034]

[0035] α1 = 30% × α 12 +70%×α 11 ;

[0036] Where, α 11 Let α be the mean absolute error of the first mortality prediction model. 12 Let be the root mean square error of the first mortality prediction model, α1 be the error value of the first mortality prediction model, and n1 be the number of data points in the first test set. m is the predicted mortality rate output by the first mortality rate prediction model after inputting the first test set. i This represents the true mortality rate corresponding to the first test set.

[0037] The second evaluation index satisfies the following formula:

[0038]

[0039]

[0040] α2 = 30% × α 22 +70%×α 21 ;

[0041] Where, α 21 Let α be the mean absolute error of the second mortality prediction model. 22 denoted as the root mean square error of the second mortality prediction model, α² is the error value of the second mortality prediction model, and n² is the number of data points in the second test set. k is the predicted mortality rate output by the second mortality rate prediction model after inputting the second test set. i This represents the actual mortality rate for the second test set.

[0042] As a further improvement to the above technical solution, in step S500, the first weight satisfies the following formula:

[0043]

[0044] Where δ1 represents the first weight assigned to the first mortality prediction model, α 11 Let α be the mean absolute error of the first mortality prediction model. 12 Let α be the root mean square error of the first mortality prediction model. 21 Let α be the mean absolute error of the second mortality prediction model. 22 This represents the root mean square error of the second mortality prediction model.

[0045] The second weight satisfies the following formula:

[0046]

[0047] Where δ2 represents the second weight assigned to the second mortality prediction model, α 11 Let α be the mean absolute error of the first mortality prediction model. 12 Let α be the root mean square error of the first mortality prediction model. 21 Let α be the mean absolute error of the second mortality prediction model. 22 This represents the root mean square error of the second mortality prediction model.

[0048] The overall mortality rate of the seedlings in the next growth cycle satisfies the following formula:

[0049] D = δ1y1 + δ2y2;

[0050] Where D represents the comprehensive mortality rate, δ1 represents the first weight assigned to the first mortality prediction model, δ2 represents the second weight assigned to the second mortality prediction model, y1 is the first predicted mortality rate, and y2 is the second predicted mortality rate.

[0051] As a further improvement to the above technical solution, in step S300, the environmental data is environmental data acquired and output by a temperature sensor, pH sensor, sodium ion sensor, residual chlorine sensor, enzyme biosensor, and nitrate sensor. The temperature sensor is used to collect temperature data of the environment where the flowers are located; the pH sensor is used to collect pH data of the environment where the flowers are located; the sodium ion sensor is used to collect sodium ion concentration of the soil where the flowers are located; the residual chlorine sensor is used to collect chloride ion concentration of the soil where the flowers are located; the enzyme biosensor is used to collect enzyme concentration of the soil where the flowers are located; and the nitrate sensor is used to collect nitrate ion concentration of the soil where the flowers are located. The environmental data includes physical quantities such as temperature, pH value, sodium ion concentration, chloride ion concentration, nitrate concentration, and enzyme concentration.

[0052] The growth data is the growth data acquired and output by the first image sensor, the second image sensor, and the processing module. The first image sensor is a fluorescence image sensor, which is used to detect the chlorophyll concentration in the seedlings. The second image sensor is a high-resolution image sensor, which is used to detect the spectral characteristics of the seedlings and output them to the processing module. The processing module is used to obtain the number of seedling cavities based on the spectral characteristics. The key feature data includes chlorophyll concentration and the number of seedling cavities.

[0053] A computer-readable storage medium storing a computer program, wherein when executed by a processor, the computer program implements the steps of the deep learning-based seedling mortality prediction method in flower cultivation.

[0054] A deep learning-based seedling mortality prediction system for flower cultivation, the system comprising:

[0055] At least one processor;

[0056] At least one memory for storing at least one program;

[0057] When the at least one program is executed by the at least one processor, the at least one processor implements the deep learning-based seedling mortality prediction method in flower cultivation.

[0058] The beneficial effects of this invention are: it provides a deep learning-based method for predicting seedling mortality in flower cultivation. This invention constructs a first mortality prediction model based on CNN-BiLSTM and a second mortality prediction model based on the XGBoost algorithm. Based on the current feature dataset of seedlings in the current growth cycle, a first predicted mortality rate is obtained through the first mortality prediction model, and a second predicted mortality rate is obtained through the second mortality prediction model. By combining the first and second predicted mortality rates using the residual inverse method, a more accurate total mortality rate for the seedlings in the next growth cycle is obtained. This invention can predict the mortality rate of flower seedlings in advance, allowing growers to take rescue measures based on the comprehensive mortality rate, thereby improving the survival rate of flower seedlings. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly explained below. Obviously, the described drawings are only a part of the embodiments of the present invention, and not all of them. Those skilled in the art can obtain other design schemes and drawings based on these drawings without creative effort.

[0060] Figure 1 This is a flowchart illustrating the workflow of a deep learning-based method for predicting seedling mortality in flower cultivation.

[0061] Figure 2 This is a flowchart illustrating the process of preprocessing seedling feature data and corresponding mortality data for a deep learning-based seedling mortality prediction method in flower cultivation.

[0062] Figure 3 This is a structural diagram of a deep learning-based method for predicting seedling mortality in flower cultivation.

[0063] Figure 4 This is a flowchart of the first step in establishing a mortality prediction model for a deep learning-based seedling mortality prediction method in flower cultivation.

[0064] Figure 5 This is a flowchart of the second mortality prediction model establishment steps in a deep learning-based seedling mortality prediction method for flower cultivation. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0067] refer to Figures 1 to 5 This disclosure provides a method for predicting seedling mortality during flower cultivation based on deep learning. The method includes the following steps:

[0068] S100. Based on big data on flowers, obtain the characteristic data of flower seedlings and their corresponding mortality data throughout the entire growth cycle, preprocess the characteristic data of seedlings and their corresponding mortality data, and generate a seedling mortality characteristic dataset.

[0069] The characteristic data include ambient temperature, ambient pH value, soil multi-ion concentration, soil enzyme biological concentration, number of seedling insect holes, seedling chlorophyll concentration, and corresponding mortality rate.

[0070] S200. Establish a first mortality rate prediction model and a second mortality rate prediction model based on the mortality feature dataset;

[0071] S300: Obtain the environmental and growth data of the seedlings in the current growth cycle, preprocess the environmental and growth data of the seedlings in the current growth cycle, and generate the current feature dataset of the seedlings.

[0072] S400. Based on the current feature dataset, the first mortality prediction model predicts the mortality rate of seedlings in the next growth cycle and outputs the first predicted mortality rate. The second mortality prediction model predicts the mortality rate of seedlings in the next growth cycle and outputs the second predicted mortality rate.

[0073] S500. Assign a first weight to the first predicted mortality rate and a second weight to the second predicted mortality rate. Add the first predicted mortality rate with the first weight and the second predicted mortality rate with the second weight to obtain the comprehensive mortality rate of the seedling in the next growth cycle.

[0074] In this embodiment, step S100 involves acquiring the characteristic data of flower seedlings and their corresponding mortality data throughout the entire growth cycle based on big data on flowers. Before using the characteristic data and corresponding mortality data of the seedlings as input to the model, preprocessing is required. The preprocessing operations include data cleaning, data dimensionality reduction, and standardization. Data cleaning involves discarding, filling, replacing, and deduplicating the characteristic data and corresponding mortality data of the seedlings to remove outliers, correct erroneous values, and fill in missing values. Data dimensionality reduction reduces the dimensionality of the characteristic data and corresponding mortality data of the seedlings to improve the efficiency of subsequent prediction work. Standardization unifies the specifications of the characteristic data and corresponding mortality data of the seedlings.

[0075] For details, please refer to Figure 2 The steps for obtaining the characteristic data of the pretreated seedlings and their corresponding mortality data are as follows:

[0076] S110. Find the missing values ​​of seedling characteristic data and corresponding mortality data, and fill in the missing values ​​using a regression algorithm;

[0077] Specifically, this application uses a regression algorithm to complete missing values, predicting the missing fields of seedling feature data and their corresponding mortality data as target variables to obtain the most probable completed values. Since the seedling feature data and their corresponding mortality data are numerical variables, this application employs a regression algorithm to complete their missing values.

[0078] Preferably, the regression algorithm is a random forest.

[0079] S120. Find the characteristic data of seedlings and the corresponding mortality data, and discard the duplicate and outlier values.

[0080] Specifically, outliers in seedling characteristic data and their corresponding mortality data are defined as characteristic data that are outside the set range; outliers are also called noisy data. Duplicate values ​​are defined as multiple characteristic data with identical values. This application uses a removal method to process outliers and duplicate values ​​in seedling characteristic data and their corresponding mortality data.

[0081] S130. Dimensionality reduction is performed on the characteristic data of seedlings and their corresponding mortality data.

[0082] Specifically, the dimensionality reduction operation involves reducing the number of features in the seedling feature data and its corresponding mortality data. The purpose of dimensionality reduction is to improve the efficiency and effectiveness of subsequent prediction work. This application uses Principal Component Analysis (PCA) to reduce the dimensionality of the seedling feature data and its corresponding mortality data.

[0083] S140, standardized seedling characteristic data and their corresponding mortality data, generate seedling mortality characteristic dataset.

[0084] Specifically, the standardization process involves converting all seedling characteristic data and their corresponding mortality data to the same specification. The standardized characteristic data all fall within the [0,1] interval, and the standardization process satisfies the following formula:

[0085]

[0086] Where x' represents the characteristic data of the seedlings after standardization and its corresponding mortality data, and x represents the characteristic data of the seedlings that need to be standardized and its corresponding mortality data. min x represents the minimum value of the seedling characteristic data and its corresponding mortality data. max This represents the maximum value of the seedling's characteristic data and its corresponding mortality rate data.

[0087] Please refer to Figure 3 This application uses a combined model method to obtain the overall mortality rate of seedlings in the next growth cycle. This combined model method integrates the results of multiple prediction models, thereby fully utilizing the information from each model and effectively improving the accuracy of the final prediction result. In step S200, this application establishes a first mortality rate prediction model and a second mortality rate prediction model. These two models together constitute a combined model. Each model predicts the mortality rate of seedlings in the next growth cycle based on the characteristic data of the seedlings in the current growth cycle, and assigns different weight values ​​to the prediction results of the prediction models, ultimately obtaining the final overall mortality rate. This method can effectively improve the accuracy of the final overall mortality rate. Based on the overall mortality rate, growers can take rescue measures for seedlings with high mortality rates in advance to improve the survival rate of seedlings.

[0088] Please refer to Figure 4 Step S200 includes a first mortality prediction model establishment step, which is as follows:

[0089] S210. Convert the format of the death feature dataset to conform to the input format of a convolutional neural network. After conversion, the death feature dataset is divided into the first training set and the first test set in an 8:2 ratio.

[0090] S211. The first training set is input into the convolutional neural network to train the convolutional neural network and obtain the first feature vector.

[0091] S212. Convert the format of the first feature vector to conform to the input format of the bidirectional long short-term memory neural network, input the format-converted first feature vector into the bidirectional long short-term memory neural network, train the bidirectional long short-term memory neural network, and obtain the second feature vector.

[0092] S212. Construct a result classification layer and an attention layer based on the attention mechanism. The second feature vector is input into the attention layer, and the output of the attention layer is input into the result classification layer. The output of the result classification layer generates the first mortality prediction model.

[0093] S213. Set the first evaluation index and evaluate the performance of the first mortality prediction model based on the first test set and the first evaluation index.

[0094] This application converts the format of the mortality feature dataset into an input format that conforms to a convolutional neural network through a centralization process. The purpose of the centralization process is to center the dimension of all data in the mortality feature dataset to 0, so as to avoid the phenomenon of reduced performance of the first mortality prediction model.

[0095] This application constructs a first mortality prediction model based on a hybrid neural network (CNN-BiLSTM). The converted mortality feature dataset is divided into a first training set and a first test set in an 8:2 ratio. The first training set is used to train the neural network, while the first test set is used to test the performance of the trained neural network. In this embodiment, the process of constructing the first mortality prediction model is as follows:

[0096] First, we input the death feature dataset into a Convolutional Neural Network (CNN) to train the CNN to extract local features from the death feature dataset and output the first feature vector. A CNN generally consists of an input layer, convolutional layers, normalization layers, activation layers, pooling layers, and fully connected layers, with the convolutional layer being the key layer. In the convolutional layer, the CNN uses a one-dimensional convolutional kernel filter for convolution, pooling, and feature extraction based on local connectivity and weight sharing. The convolutional layer satisfies the following formula:

[0097]

[0098] Where f is the activation function, Hi For the feature output of the i-th layer of the convolutional neural network, the operator Represents convolution operation, a i For the bias term, q i The weight values ​​of the convolution kernel used in the i-th layer of the convolutional neural network.

[0099] Before inputting the first feature vector into the bidirectional long short-term memory (BSSM) neural network, its format needs to be converted to the BSSM input format to improve the training efficiency of the BSSM. The converted first feature vector is then input into the BSSM to train the network and obtain the second feature parameters.

[0100] The Bi-directional Long Short-Term Memory (BiLSTM) neural network consists of a feedforward long short-term memory neural network hidden layer and a feedback long short-term memory neural network hidden layer, with multiple shared weights. The feedforward long short-term memory neural network hidden layer is used to extract the positive features of the first feature vector, while the feedback long short-term memory neural network hidden layer is used to extract the negative features of the first feature vector. The first feature vector is input to the feedforward long short-term memory neural network hidden layer and the feedback long short-term memory neural network hidden layer, respectively. The two hidden layers extract the positive features and negative features of the first feature vector, respectively. The positive features and negative features are jointly connected to the output layer of the Bi-directional long short-term memory neural network to output the second feature vector.

[0101] Compared to Long Short-Term Memory (LSTM) neural networks, LSTM cannot extract features bidirectionally, nor can it capture more comprehensive features. When extracting features from the first feature vector, the overall information hidden within it needs to be considered. The bidirectional LSTM neural network used in this application extracts features in both forward and reverse directions, combining them in a specific way. This bidirectional approach can extract more data features, effectively improving the prediction accuracy of the first mortality rate prediction model.

[0102] In this embodiment, the bidirectional long short-term memory neural network includes a forget gate, an update gate, and an output gate. These three gates work together to select and forget feature information and update the current cell state. The feature information is stored in the cell state. Specifically, the update process of the hidden layer of the feedforward long short-term memory neural network is as follows:

[0103] i t =ρ(ω i ·[h t-1 xt ]+b i );

[0104] f t =ρ(ω f ·[h t-1 x t ]+b f );

[0105]

[0106]

[0107] O t =ρ(ω o ·[h t-1 x t ]+b o );

[0108]

[0109] Where, x t For the current input, i t f t O t These represent the outputs of the update gate, forget gate, and output gate of the feedforward long short-term memory neural network, respectively. For the positive feature, Candidate values ​​for updating the current cell state. b represents the current cell state. i b f b c b o Both are bias term vectors, ω i ω f ω c ω o All are weight matrices, and ρ is the Sigmoid activation function.

[0110] Similarly, the backward features are obtained by extracting features from the hidden layer of the backward long short-term memory neural network. The positive features and the reverse feature The fusion process yields a second feature vector, which satisfies the following formula:

[0111]

[0112] Among them, h t This is the second eigenvector.

[0113] After obtaining the second feature vector output by the bidirectional long short-term memory neural network, we construct a result classification layer and an attention layer based on an attention mechanism. The attention layer is used to filter out key information from the second feature vector and assign higher weights to this key information to improve the prediction accuracy of the first mortality prediction model. The attention mechanism satisfies the following formula:

[0114]

[0115] in, This represents the output of the attention layer, K is the second feature vector, ω is the preset training parameter vector, and softmax(·) represents the operation in the softmax classifier.

[0116] The second feature vector is input into the attention layer, and the output of the attention layer is input into the result classification layer for classification, ultimately generating the first mortality prediction model.

[0117] In this embodiment, step S213 evaluates the performance of the first mortality prediction model based on the first test set and the first evaluation index. This application sets the first evaluation index based on the formulas for mean absolute error and root mean square error, assigning different weights to mean absolute error and root mean square error, ultimately obtaining the performance evaluation result. The first evaluation index is specifically:

[0118]

[0119]

[0120] α1 = 30% × α 12 +70%×α 11 ;

[0121] Where, α 11 Let α be the mean absolute error of the first mortality prediction model. 12 Let be the root mean square error of the first mortality prediction model, α1 be the error value of the first mortality prediction model, and n1 be the number of data points in the first test set. m is the predicted mortality rate output by the first mortality rate prediction model after inputting the first test set. i This represents the actual mortality rate corresponding to the first test set.

[0122] In this embodiment, a first error threshold is set. If the error value of the first mortality prediction model is not less than or equal to the first error threshold, the hyperparameters of the convolutional neural network and the bidirectional long short-term memory neural network are reset, and the two networks are retrained to obtain a first mortality prediction model with a smaller error value.

[0123] Please refer to Figure 5Step S200 further includes a second mortality prediction model establishment step, which is as follows:

[0124] S220. Perform feature selection on the mortality feature dataset;

[0125] S221. The mortality dataset after feature selection is divided into a second training set and a second test set in an 8:2 ratio. The second training set is input into the XGBoost model to train the XGBoost model and generate a second mortality prediction model.

[0126] S222. Evaluate the performance of the second mortality prediction model based on the second test set and the second evaluation index.

[0127] This application establishes a second mortality prediction model based on the XGBoost algorithm. The XGBoost algorithm generates a strong learner through a regularization loss function. The regularization loss function reduces the variance of the XGBoost model, making the final trained model simpler and effectively preventing model overfitting.

[0128] Before establishing the second mortality prediction model, feature selection needs to be performed on the mortality feature dataset to improve the efficiency of the XGBoost algorithm and the prediction accuracy of the second mortality prediction model. The feature selection on the mortality feature dataset specifically involves: querying the null values ​​in the mortality feature dataset, filling them with the median of the column containing the null values; and using the scoring function of the sklearn library to perform univariate feature selection on the mortality feature dataset after filling the null values.

[0129] Preferably, the scoring function is the f_regression() function.

[0130] The death feature dataset after feature selection is input into the XGBoost model. The general parameters, booster parameters, and learning objective parameters of the XGBoost model are set, and the XGBoost model is trained. The general parameters determine the booster used in the XGBoost model's boosting process, the booster parameters define the booster type, and the learning objective parameters control the learning scenario of the XGBoost model. In this application, a tree model is selected as the booster type.

[0131] The XGBoost algorithm process is as follows: Initialize the mortality feature dataset; define a loss function and calculate the first derivative of the loss function with respect to each sample value in the mortality feature dataset; build a new decision tree based on the first derivative; predict sample values ​​using the new decision tree and accumulate them to the original predicted values; repeat the above steps until the set termination condition is met, generating a second mortality prediction model. The objective function of the XGBoost model satisfies the following formula:

[0132]

[0133]

[0134]

[0135] Where t is the number of iterations, λ and γ are both penalty strengths, λ is used to control the number of leaf nodes in each decision tree, λ is used to ensure that the node scores of the leaves in each decision tree are within the normal range, and g(·) is the loss function of the XGBoost model. For the i-th sample in the death feature dataset, Let A be the predicted value of the i-th sample after t-1 iterations, and let A be the set of leaf nodes of the r-th decision tree.

[0136] In this embodiment, step S222 evaluates the performance of the second mortality prediction model based on the second test set and the second evaluation index. To ensure consistency in the weights assigned to the first and second mortality prediction models in subsequent step S500, the benchmark for the second evaluation index is consistent with that of the first evaluation index. The second evaluation index is also set based on the formulas for mean absolute error and root mean square error. Specifically, the second evaluation index is:

[0137]

[0138]

[0139] α2 = 30% × α 22 +70%×α 21 ;

[0140] Where, α 21 Let α be the mean absolute error of the second mortality prediction model. 22 denoted as the root mean square error of the second mortality prediction model, α² is the error value of the second mortality prediction model, and n² is the number of data points in the second test set. k is the predicted mortality rate output by the second mortality rate prediction model after inputting the second test set. i This represents the actual mortality rate for the second test set.

[0141] Similarly, a second error threshold is set. If the error value of the second mortality prediction model is not less than or equal to the second error threshold, the hyperparameters of the XGBoost algorithm are readjusted and the model is retrained to obtain a second mortality prediction model with a smaller error.

[0142] In this embodiment, step S300 involves obtaining environmental and growth data of the seedlings in the current growth cycle, preprocessing the environmental and growth data of the seedlings in the current growth cycle, and generating a current feature dataset of the seedlings.

[0143] Furthermore, the environmental data includes environmental data acquired and output by temperature sensors, pH sensors, sodium ion sensors, residual chlorine sensors, enzyme biosensors, and nitrate sensors. The temperature sensor is used to collect temperature data of the environment in which the flowers are located; the pH sensor is used to collect pH data of the environment in which the flowers are located; the sodium ion sensor is used to collect sodium ion concentration of the soil in which the flowers are located; the residual chlorine sensor is used to collect chloride ion concentration of the soil in which the flowers are located; the enzyme biosensor is used to collect enzyme concentration of the soil in which the flowers are located; and the nitrate sensor is used to collect nitrate ion concentration of the soil in which the flowers are located. The environmental data includes physical quantities such as temperature, pH value, sodium ion concentration, chloride ion concentration, nitrate concentration, and enzyme concentration.

[0144] The growth data is the growth data acquired and output by the first image sensor, the second image sensor, and the processing module. The first image sensor is a fluorescence image sensor, which is used to detect the chlorophyll concentration in the seedlings. The second image sensor is a high-resolution image sensor, which is used to detect the spectral characteristics of the seedlings and output them to the processing module. The processing module is used to obtain the number of seedling cavities based on the spectral characteristics. The key feature data includes chlorophyll concentration and the number of seedling cavities.

[0145] In this embodiment, all flower seedlings and the soil they are in reflect a certain amount of light energy into the atmosphere during the growth of the flowers. The light energy they reflect is called spectral characteristics. A high-resolution image sensor is used to acquire and record the spectral characteristics of each flower seedling. When pests invade the seedlings, the pests absorb the light from the seedlings, causing the spectral characteristics of the seedlings to change. The high-resolution image sensor detects the spectral characteristics of the seedlings and outputs them to the processing module for processing, which can obtain the number of insect holes in the seedlings.

[0146] In this embodiment, the preprocessing method for the environmental data and growth data of the seedlings in the current growth cycle in step S300 is the same as the preprocessing method for the characteristic data and corresponding mortality data of the seedlings in step S100.

[0147] In this embodiment, step S400 involves using the current feature dataset as the input to the first mortality prediction model and the second mortality prediction model, respectively. The first mortality prediction model predicts and outputs the first predicted mortality rate, and the second mortality prediction model predicts and outputs the second predicted mortality rate.

[0148] In this embodiment, step S500 involves assigning weights to the first predicted mortality rate and the second predicted mortality rate, respectively, and then summing the first predicted mortality rate assigned the first weight and the second predicted mortality rate assigned the second weight to obtain the comprehensive mortality rate of the seedlings in the next growth cycle.

[0149] Specifically, this application assigns a first weight to the first predicted mortality rate and a second weight to the second predicted mortality rate based on the residual inverse method. According to the residual inverse method, the larger the error value of a certain mortality prediction model, the smaller its weight ratio in the combined model.

[0150] Based on the above, the first weight and the second weight satisfy the following formula:

[0151]

[0152]

[0153] Where δ1 represents the first weight assigned to the first mortality prediction model, δ2 represents the second weight assigned to the second mortality prediction model, and α 11 Let α be the mean absolute error of the first mortality prediction model. 12 Let α be the root mean square error of the first mortality prediction model. 21 Let α be the mean absolute error of the second mortality prediction model. 22 This represents the root mean square error of the second mortality prediction model.

[0154] Therefore, the overall mortality rate of the seedlings in the next growth cycle is:

[0155] D = δ1y1 + δ2y2;

[0156] Where D represents the comprehensive mortality rate, δ1 represents the first weight assigned to the first mortality prediction model, δ2 represents the second weight assigned to the second mortality prediction model, y1 is the first predicted mortality rate, and y2 is the second predicted mortality rate.

[0157] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the deep learning-based seedling mortality prediction method in flower cultivation.

[0158] Based on the above embodiments, this application also provides a seedling mortality prediction system for flowers, the system comprising: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the deep learning-based seedling mortality prediction method for flower cultivation.

[0159] The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for predicting seedling mortality rate in flower cultivation based on deep learning, characterized in that, The method includes the following steps: S100. Based on big data of flowers, obtain the characteristic data of seedlings and their corresponding mortality data throughout the entire growth cycle, preprocess the characteristic data of seedlings and their corresponding mortality data, and generate a seedling mortality feature dataset. The characteristic data include ambient temperature, ambient pH value, soil multi-ion concentration, soil enzyme biological concentration, number of seedling insect holes, and seedling chlorophyll concentration. S200. Establish a first mortality rate prediction model and a second mortality rate prediction model based on the mortality feature dataset; S300: Obtain the environmental and growth data of the seedlings in the current growth cycle, preprocess the environmental and growth data of the seedlings in the current growth cycle, and generate the current feature dataset of the seedlings. S400. Based on the current feature dataset, the first mortality prediction model predicts the mortality rate of seedlings in the next growth cycle and outputs the first predicted mortality rate. The second mortality prediction model predicts the mortality rate of seedlings in the next growth cycle and outputs the second predicted mortality rate. S500. Assign the first predicted mortality rate a first weight, assign the second predicted mortality rate a second weight, and sum the first predicted mortality rate with the first weight and the second predicted mortality rate with the second weight to obtain the comprehensive mortality rate of the seedling in the next growth cycle. In step S200, the establishment of the first mortality prediction model and the second mortality prediction model based on the mortality feature dataset includes the first mortality prediction model establishment step and the second mortality prediction model establishment step. The steps for establishing the first mortality prediction model include the following: S210. Convert the format of the death feature dataset to conform to the input format of a convolutional neural network. After conversion, the death feature dataset is divided into the first training set and the first test set in an 8:2 ratio. S211. Input the first training set into the convolutional neural network, train the convolutional neural network, and obtain the first feature vector; S212. Convert the format of the first feature vector to conform to the input format of the bidirectional long short-term memory neural network, input the format-converted first feature vector into the bidirectional long short-term memory neural network, train the bidirectional long short-term memory neural network, and obtain the second feature vector. S213. Construct a result classification layer and an attention layer based on the attention mechanism. The second feature vector is input into the attention layer, and the output of the attention layer is input into the result classification layer. The output of the result classification layer generates the first mortality prediction model. S214. Set the first evaluation index and evaluate the performance of the first mortality prediction model based on the first test set and the first evaluation index. The steps for establishing the second mortality prediction model include: S220. Perform feature selection on the mortality feature dataset; S221. The mortality dataset after feature selection is divided into a second training set and a second test set in an 8:2 ratio. The second training set is input into the XGBoost model to train the XGBoost model and generate a second mortality prediction model. S222. Evaluate the performance of the second mortality prediction model based on the second test set and the second evaluation index.

2. The method for predicting seedling mortality rate in flower cultivation based on deep learning according to claim 1, characterized in that, In step S100, the step of pre-treating the seedlings' characteristic data and their corresponding mortality data is as follows: S110. Find the missing values ​​of seedling characteristic data and corresponding mortality data, and fill in the missing values ​​using a regression algorithm; S120. Find the characteristic data of seedlings and the corresponding mortality data, and discard the duplicate and outlier values. S130. Dimensionality reduction is performed on the characteristic data of seedlings and their corresponding mortality data. S140, standardized seedling characteristic data and their corresponding mortality data, generate seedling mortality characteristic dataset.

3. The method for predicting seedling mortality rate in flower cultivation based on deep learning according to claim 1, characterized in that, The attention mechanism satisfies the following formula: in, This represents the output of the attention layer, where K is the second feature vector. For the preset training parameter vector, Representative at Operations in the classifier.

4. The method for predicting seedling mortality rate in flower cultivation based on deep learning according to claim 3, characterized in that, The steps for feature selection on the death feature dataset are as follows: query the null values ​​in the death feature dataset, and fill them with the median of the column containing the null values; call the scoring function of the sklearn library to perform univariate feature selection on the death feature dataset after filling the null values, and the scoring function is the f_regression() function.

5. The method for predicting seedling mortality rate in flower cultivation based on deep learning according to claim 4, characterized in that, The first evaluation index satisfies the following formula: in, This represents the mean absolute error of the first mortality prediction model. This represents the root mean square error of the first mortality prediction model. This represents the error value of the first mortality prediction model. The number of data points in the first test set. The predicted mortality rate output by the first mortality rate prediction model after inputting the first test set. This represents the true mortality rate corresponding to the first test set. The second evaluation index satisfies the following formula: in, This represents the mean absolute error of the second mortality prediction model. This represents the root mean square error of the second mortality prediction model. This represents the error value of the second mortality prediction model. This represents the number of data points in the second test set. The predicted mortality rate output by the second mortality rate prediction model after inputting the second test set. This represents the actual mortality rate for the second test set.

6. The method for predicting seedling mortality rate in flower cultivation based on deep learning according to claim 5, characterized in that, In step S500, the first weight satisfies the following formula: in, This indicates the first weight assigned to the first mortality prediction model. This represents the mean absolute error of the first mortality prediction model. This represents the root mean square error of the first mortality prediction model. This represents the mean absolute error of the second mortality prediction model. This represents the root mean square error of the second mortality prediction model. The second weight satisfies the following formula: in, This indicates the second weight assigned to the second mortality prediction model. This represents the mean absolute error of the first mortality prediction model. This represents the root mean square error of the first mortality prediction model. This represents the mean absolute error of the second mortality prediction model. This represents the root mean square error of the second mortality prediction model. The overall mortality rate of the seedlings in the next growth cycle satisfies the following formula: ; in, This represents the overall mortality rate. This indicates the first weight assigned to the first mortality prediction model. This indicates the second weight assigned to the second mortality prediction model. As the first predicted mortality rate, The second predicted mortality rate.

7. The method for predicting seedling mortality rate in flower cultivation based on deep learning according to claim 1, characterized in that, In step S300, the environmental data is the environmental data obtained and output by a temperature sensor, pH sensor, sodium ion sensor, residual chlorine sensor, enzyme biosensor, and nitrate sensor. The temperature sensor is used to collect the temperature data of the environment in which the flowers are located; the pH sensor is used to collect the pH data of the environment in which the flowers are located; the sodium ion sensor is used to collect the sodium ion concentration of the soil in which the flowers are located; the residual chlorine sensor is used to collect the chloride ion concentration of the soil in which the flowers are located; the enzyme biosensor is used to collect the enzyme concentration of the soil in which the flowers are located; and the nitrate sensor is used to collect the nitrate ion concentration of the soil in which the flowers are located. The environmental data includes physical quantities such as temperature, pH value, sodium ion concentration, chloride ion concentration, nitrate ion concentration, and enzyme concentration. The growth data is the growth data acquired and output by the first image sensor, the second image sensor, and the processing module. The first image sensor is a fluorescence image sensor, which is used to detect the chlorophyll concentration in the seedlings. The second image sensor is a high-resolution image sensor, which is used to detect the spectral characteristics of the seedlings and output them to the processing module. The processing module is used to obtain the number of wormholes in the seedlings based on the spectral characteristics. The growth data includes chlorophyll concentration and the number of wormholes in the seedlings.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the deep learning-based seedling mortality prediction method for flower cultivation as described in any one of claims 1 to 7.

9. A seedling mortality prediction system based on deep learning in flower cultivation, characterized in that, The system includes: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the seedling mortality prediction method based on deep learning in flower cultivation as described in any one of claims 1 to 7.