Facility hydroponic lettuce yield prediction method and device based on machine learning

By using lettuce images and environmental calorie index values ​​of hydroponic lettuce, the number of plants and growth index sets of each growth stage are determined, and the corresponding lettuce yield model is input, the calculation resource demand caused by the multiple growth stages of hydroponic lettuce in greenhouse is solved. The problem of increasing and reducing prediction accuracy has achieved the effect of reducing computing resource requirements and improving prediction accuracy.

CN119494437AActive Publication Date: 2025-02-21BEIJING JINGWA AGRICULTURAL SCIENCE & TECHNOLOGY INNOVATION CENTER
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411522968.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-21
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

Since hydroponic lettuce in greenhouses is in different growth stages, multiple feature parameters need to be input into machine learning algorithms, resulting in increased computing resource demand and increased training costs, and affecting the prediction accuracy of the model.

Method used

Based on the lettuce images and environmental calorie index values ​​of hydroponic lettuce in the greenhouse to be predicted, the number of plants and growth index sets of each growth stage are determined, and these data are input into lettuce such as random forest, support vector machine regression and extreme gradient enhancement, respectively. In the yield model, the predicted value of lettuce yield for each growth stage is obtained, and the final predicted value of lettuce yield for hydroponic lettuce is finally obtained.

Benefits of technology

It reduces the computing resource requirements and training costs of machine learning algorithms, and improves the accuracy of lettuce yield prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494437A_ABST
    Figure CN119494437A_ABST
Patent Text Reader

Abstract

The invention provides a facility hydroponic lettuce yield prediction method and device based on machine learning, and the method comprises the steps: obtaining an environment heat index value in a to-be-predicted greenhouse in a current growth period, and respectively inputting the growth index set of the plants in each growth stage, the number of the plants in each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model in each growth stage to obtain a lettuce yield prediction value in each growth stage, and calculating the yield of the lettuce according to the lettuce yield prediction values in all the growth stages. And obtaining a final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted. According to the method, the problem that various characteristic parameters need to be input into a machine learning algorithm due to the fact that vegetable crops in a greenhouse are in different growth stages is solved, the machine learning algorithm does not need large computing resources, the training and computing cost is reduced, and the prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of network technology, and more particularly to a method and device for predicting the yield of hydroponic lettuce based on machine learning. Background Art

[0002] Hydroponic lettuce is mostly cultivated in greenhouses, which can provide a relatively stable microclimate environment for the growth and development of horticultural crops, and can achieve multiple crop production of vegetable crops, thereby improving the yield and quality of products. In greenhouses, due to the different planting times of vegetable crops, there are multiple growth stages coexisting. Machine learning algorithms can realize features that cannot be fully summarized under manual statistics, and have been widely used in multidisciplinary cross-research fields. With the application of machine learning and deep learning in agriculture, related algorithms are also applied to the prediction of agricultural yields. However, since vegetable crops in greenhouses are at different growth stages, multiple feature parameters need to be input into the machine learning algorithm. The machine learning algorithm requires larger computing resources and the training cost increases. However, when some feature parameters are used, the prediction accuracy of the model is affected.

[0003] Application Contents

[0004] This application describes a method and device for predicting the yield of hydroponic lettuce in facilities based on machine learning, which can solve the above-mentioned technical problems.

[0005] According to a first aspect, a method for predicting the yield of hydroponic lettuce in a facility based on machine learning is provided, the method comprising:

[0006] Based on the lettuce images of the hydroponic lettuce in the greenhouse to be predicted in the current growth period, determining the number of plants in each growth stage and the growth indicator set of the plants in each growth stage in the hydroponic lettuce in the greenhouse to be predicted;

[0007] Acquire the environmental heat index value in the greenhouse to be predicted during the current growth period, wherein the environmental heat index value includes daily photosynthetically active radiation product, daily effective accumulated temperature and daily radiant heat product;

[0008] Inputting the growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model of each growth stage to obtain the lettuce yield prediction value of each growth stage, wherein the lettuce yield model includes a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model;

[0009] According to the lettuce yield prediction values ​​at all growth stages, the final prediction value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted is obtained.

[0010] In some embodiments, the growth stages of the hydroponic lettuce include the germination stage, the seedling stage, and the growth stage;

[0011] The growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted are respectively input into the corresponding lettuce yield model of each growth stage to obtain the lettuce yield prediction value of each growth stage, specifically including:

[0012] When the growth stage of the hydroponic lettuce is in the budding stage, a first growth indicator subset, the number of plants in the budding stage, and the environmental heat index value in the current growth stage are input into the random forest lettuce yield model to obtain a first yield prediction result, wherein the first growth indicator subset is extracted from the growth indicator set of the hydroponic lettuce in the greenhouse to be predicted;

[0013] When the growth stage of the hydroponic lettuce is in the seedling stage, the second growth index subset, the number of plants in the seedling stage, and the environmental heat index value in the current growth period are input into the support vector machine regression lettuce yield model to obtain a second yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0014] When the growth stage of the hydroponic lettuce is in the growth period, the third growth index subset and the environmental heat index value in the current growth period are input into the extreme gradient boosting lettuce yield model to obtain a third yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0015] Among them, the random forest lettuce yield model is trained based on the first sample growth indicator subset and the first sample prediction value; the support vector machine regression lettuce yield is trained based on the second sample growth indicator subset and the second sample prediction value; the extreme gradient boosting lettuce yield model is trained based on the third sample growth indicator subset and the third sample prediction value.

[0016] In some embodiments, obtaining the final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted based on the predicted values ​​of the lettuce yield at all growth stages specifically includes:

[0017] According to the first yield prediction result, the second yield prediction result and the third yield prediction result, a final prediction value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted is obtained.

[0018] In some embodiments, the method of determining the number of plants at each growth stage and the growth indicator set of the plants at each growth stage in the hydroponic lettuce in the greenhouse to be predicted based on the lettuce image in the current growth period of the hydroponic lettuce in the greenhouse to be predicted specifically includes:

[0019] Dividing the image of the hydroponic lettuce in the current growth stage according to a preset growth stage division rule to obtain a first sub-lettuce image, a second sub-lettuce image and a third sub-lettuce image, wherein the first sub-lettuce image is an image of the lettuce in the budding stage in the lettuce image, the second sub-lettuce image is an image of the lettuce in the seedling stage in the lettuce image, and the third sub-lettuce image is an image of the lettuce in the growth stage in the lettuce image;

[0020] Extracting a first growth index subset of lettuce in the budding stage from the first sub-lettuce image, extracting a second growth index subset of lettuce in the seedling stage from the second sub-lettuce image, and extracting a third growth index subset of lettuce in the growing stage from the third sub-lettuce image;

[0021] Among them, the first growth indicator subset includes plant height and leaf number of the plant, the second growth indicator subset includes leaf number and leaf area index characteristics of the plant, and the third growth indicator subset includes crown width and leaf area index characteristics of the plant.

[0022] In some embodiments, the method further comprises:

[0023] Establishing a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model, wherein the random forest lettuce yield model is based on a random forest model, the support vector machine regression lettuce yield model is based on a support vector regression model, and the extreme gradient boosting lettuce yield model is based on an extreme gradient boosting model;

[0024] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the random forest lettuce yield model respectively, to obtain a first prediction value of the random forest lettuce yield model, a second prediction value of the random forest lettuce yield model and a third prediction value of the random forest lettuce yield model;

[0025] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the support vector machine regression lettuce yield model respectively, to obtain a first prediction value of the support vector machine regression lettuce yield model, a second prediction value of the support vector machine regression lettuce yield model and a third prediction value of the support vector machine regression lettuce yield model;

[0026] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the extreme gradient boosting lettuce yield model respectively, to obtain a first prediction value of the extreme gradient boosting lettuce yield model, a second prediction value of the extreme gradient boosting lettuce yield model and a third prediction value of the extreme gradient boosting lettuce yield model;

[0027] Respectively calculating the first prediction value of the random forest lettuce yield model, the first prediction value of the support vector machine regression lettuce yield model, and the first prediction value of the extreme gradient boosting lettuce yield model, and the first evaluation index value of the actual yield value of the sample, and determining, according to the first evaluation index value, that the prediction model corresponding to the first growth indicator subset is the random forest lettuce yield model;

[0028] Respectively calculating the second prediction value of the random forest lettuce yield model, the second prediction value of the support vector machine regression lettuce yield model, and the second prediction value of the extreme gradient boosting lettuce yield model, and the second evaluation index value of the actual yield value of the sample, and determining, according to the second evaluation index value, that the prediction model corresponding to the second growth indicator subset is the support vector machine regression lettuce yield model;

[0029] The third prediction value of the random forest lettuce yield model, the third prediction value of the support vector machine regression lettuce yield model and the third prediction value of the extreme gradient boosting lettuce yield model are calculated respectively, and the third evaluation index value of the actual yield value of the sample is compared. According to the third evaluation index value, it is determined that the prediction model corresponding to the third growth indicator subset is the extreme gradient boosting lettuce yield model.

[0030] In some embodiments, the method further comprises:

[0031] According to the plant's lower limit temperature Tb, upper limit temperature Tm, optimum lower limit temperature Tob, and optimum upper limit temperature Tou, input the function:

[0032]

[0033] Get the relative thermal effect ERTE(T) of the current average temperature T;

[0034] The daily radiant heat product is obtained based on the relative thermal effect ERTE(T) of the current average temperature T and the daily average photosynthetically active radiation value during the current growing season;

[0035] The daily effective accumulated temperature is obtained based on the current average temperature T, the lower limit temperature of development Tmin and the preset growth days.

[0036] According to a second aspect, a device for predicting the yield of hydroponic lettuce based on machine learning is provided, the device comprising:

[0037] The first processing module is used to determine the number of plants at each growth stage and the growth index set of the plants at each growth stage in the hydroponic lettuce in the greenhouse to be predicted based on the lettuce image in the current growth period of the hydroponic lettuce in the greenhouse to be predicted;

[0038] The second processing module is used to obtain the environmental heat index value in the greenhouse to be predicted during the current growth period, wherein the environmental heat index value includes daily photosynthetically active radiation product, daily effective accumulated temperature, and daily radiant heat product;

[0039] The third processing module is used to input the growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model of each growth stage, so as to obtain the predicted value of lettuce yield at each growth stage, wherein the lettuce yield model includes a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model;

[0040] The fourth processing module is used to obtain the final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted according to the predicted values ​​of the lettuce yield at all growth stages.

[0041] In some embodiments, the growth stages of the hydroponic lettuce include the germination stage, the seedling stage, and the growth stage;

[0042] The third processing module is specifically used for inputting the first growth index subset, the number of plants in the budding stage and the environmental heat index value in the current growth period into the random forest lettuce yield model to obtain a first yield prediction result when the growth stage of the hydroponic lettuce is in the budding stage, wherein the first growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0043] When the growth stage of the hydroponic lettuce is in the seedling stage, the second growth index subset, the number of plants in the seedling stage, and the environmental heat index value in the current growth period are input into the support vector machine regression lettuce yield model to obtain a second yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0044] When the growth stage of the hydroponic lettuce is in the growth period, the third growth index subset and the environmental heat index value in the current growth period are input into the extreme gradient boosting lettuce yield model to obtain a third yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0045] Among them, the random forest lettuce yield model is trained based on the first sample growth indicator subset and the first sample prediction value; the support vector machine regression lettuce yield is trained based on the second sample growth indicator subset and the second sample prediction value; the extreme gradient boosting lettuce yield model is trained based on the third sample growth indicator subset and the third sample prediction value.

[0046] In a third aspect, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for predicting the yield of hydroponic lettuce based on machine learning as described above is implemented.

[0047] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting the yield of hydroponic lettuce based on machine learning.

[0048] In the above-mentioned system and method provided in the embodiments of this specification, the problem of needing to input multiple feature parameters into the machine learning algorithm because the vegetable crops in the greenhouse are at different growth stages is solved. The machine learning algorithm does not require large computing resources, the training and computing costs are reduced, and the prediction accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 A flow chart of a method for predicting the yield of hydroponic lettuce based on machine learning provided in an embodiment of this specification is shown;

[0051] Figure 2 A module schematic diagram of a device for predicting the yield of hydroponic lettuce based on machine learning provided in an embodiment of this specification is shown;

[0052] Figure 3 A schematic diagram showing an example of a sensor installation position provided in an embodiment of this specification;

[0053] Figure 4 A schematic diagram showing the random forest principle provided by an embodiment of this specification;

[0054] Figure 5 A schematic diagram showing the support vector principle provided by the embodiments of this specification;

[0055] Figure 6 A schematic diagram showing the extreme gradient boosting principle provided by an embodiment of this specification;

[0056] Figure 7 A schematic diagram showing the flow of model training provided in the embodiments of this specification is shown;

[0057] Figure 8 A schematic diagram showing a data set segmentation process provided in an embodiment of this specification. DETAILED DESCRIPTION

[0058] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0060] In the description of the embodiments of the present application, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.

[0061] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "plurality" means two or more.

[0062] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0063] Figure 1 The figure shows a processing flow of a method for predicting the yield of hydroponic lettuce based on machine learning provided by the present invention, including:

[0064] 110. Based on the lettuce image of the hydroponic lettuce in the greenhouse to be predicted in the current growth period, determine the number of plants in each growth stage of the hydroponic lettuce in the greenhouse to be predicted and the growth indicator set of the plants in each growth stage;

[0065] 120. Obtain the environmental heat index value in the greenhouse to be predicted during the current growth period, the environmental heat index value including daily photosynthetically active radiation product, daily effective accumulated temperature and daily radiant heat product;

[0066] 130. Input the growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model of each growth stage to obtain the predicted value of lettuce yield at each growth stage, wherein the lettuce yield model includes a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model;

[0067] 140. According to the lettuce yield prediction values ​​at all growth stages, the final prediction value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted is obtained.

[0068] In some embodiments, the growth stages of the hydroponic lettuce include the germination stage, the seedling stage, and the growth stage;

[0069] Step 130 specifically includes:

[0070] When the growth stage of the hydroponic lettuce is in the budding stage, the first growth indicator subset, the number of plants in the budding stage, and the environmental heat index value in the current growth period are input into the random forest lettuce yield model to obtain a first yield prediction result, wherein the first growth indicator subset is extracted from the growth indicator set of the hydroponic lettuce in the greenhouse to be predicted;

[0071] When the growth stage of the hydroponic lettuce is in the seedling stage, the second growth index subset, the number of plants in the seedling stage, and the environmental heat index value in the current growth period are input into the support vector machine regression lettuce yield model to obtain a second yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0072] When the growth stage of the hydroponic lettuce is in the growth period, the third growth index subset and the environmental heat index value in the current growth period are input into the extreme gradient boosting lettuce yield model to obtain a third yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0073] Among them, the random forest lettuce yield model is trained based on the first sample growth indicator subset and the first sample prediction value; the support vector machine regression lettuce yield is trained based on the second sample growth indicator subset and the second sample prediction value; the extreme gradient boosting lettuce yield model is trained based on the third sample growth indicator subset and the third sample prediction value.

[0074] In some embodiments, step 140 specifically includes:

[0075] According to the first yield prediction result, the second yield prediction result and the third yield prediction result, a final prediction value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted is obtained.

[0076] In some embodiments, step 110 specifically includes:

[0077] The lettuce image of the hydroponic lettuce in the current growth period is divided according to a preset growth stage division rule to obtain a first sub-lettuce image, a second sub-lettuce image and a third sub-lettuce image, wherein the first sub-lettuce image is an image of the lettuce in the budding period in the lettuce image, the second sub-lettuce image is an image of the lettuce in the seedling period in the lettuce image, and the third sub-lettuce image is an image of the lettuce in the growth period in the lettuce image.

[0078] Extracting a first growth index subset of lettuce in the budding stage from the first sub-lettuce image, extracting a second growth index subset of lettuce in the seedling stage from the second sub-lettuce image, and extracting a third growth index subset of lettuce in the growing stage from the third sub-lettuce image;

[0079] Among them, the first growth indicator subset includes the plant height and the number of leaves of the plant, the second growth indicator subset includes the number of leaves and the leaf area index characteristics of the plant, and the third growth indicator subset includes the crown width and the leaf area index characteristics of the plant.

[0080] In some embodiments, it also includes:

[0081] Establishing a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model, wherein the random forest lettuce yield model is based on a random forest model, the support vector machine regression lettuce yield model is based on a support vector regression model, and the extreme gradient boosting lettuce yield model is based on an extreme gradient boosting model;

[0082] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the random forest lettuce yield model respectively, to obtain a first prediction value of the random forest lettuce yield model, a second prediction value of the random forest lettuce yield model and a third prediction value of the random forest lettuce yield model;

[0083] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the support vector machine regression lettuce yield model respectively, to obtain a first prediction value of the support vector machine regression lettuce yield model, a second prediction value of the support vector machine regression lettuce yield model and a third prediction value of the support vector machine regression lettuce yield model;

[0084] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the extreme gradient boosting lettuce yield model respectively, to obtain a first prediction value of the extreme gradient boosting lettuce yield model, a second prediction value of the extreme gradient boosting lettuce yield model and a third prediction value of the extreme gradient boosting lettuce yield model;

[0085] Respectively calculating the first prediction value of the random forest lettuce yield model, the first prediction value of the support vector machine regression lettuce yield model, and the first prediction value of the extreme gradient boosting lettuce yield model, and the first evaluation index value of the actual yield value of the sample, and determining, according to the first evaluation index value, that the prediction model corresponding to the first growth indicator subset is the random forest lettuce yield model;

[0086] Respectively calculating the second prediction value of the random forest lettuce yield model, the second prediction value of the support vector machine regression lettuce yield model, and the second prediction value of the extreme gradient boosting lettuce yield model, and the second evaluation index value of the actual yield value of the sample, and determining, according to the second evaluation index value, that the prediction model corresponding to the second growth indicator subset is the support vector machine regression lettuce yield model;

[0087] The third prediction value of the random forest lettuce yield model, the third prediction value of the support vector machine regression lettuce yield model and the third prediction value of the extreme gradient boosting lettuce yield model are calculated respectively, and the third evaluation index value of the actual yield value of the sample is compared. According to the third evaluation index value, it is determined that the prediction model corresponding to the third growth indicator subset is the extreme gradient boosting lettuce yield model.

[0088] In some embodiments, including:

[0089] According to the plant's lower limit temperature Tb, upper limit temperature Tm, optimum lower limit temperature Tob, and optimum upper limit temperature Tou, input the function:

[0090]

[0091] Get the relative thermal effect ERTE(T) of the current average temperature T;

[0092] The daily radiant heat product is obtained based on the relative thermal effect ERTE(T) of the current average temperature T and the daily average photosynthetically active radiation value during the current growing season;

[0093] The daily effective accumulated temperature is obtained based on the current average temperature T, the lower limit temperature of development Tmin and the preset growth days.

[0094] Hydroponic lettuce is mostly cultivated in greenhouses, which can provide a relatively stable microclimate environment for the growth and development of horticultural crops, enable multiple crop production of vegetable crops, and improve product yield and quality. However, in greenhouse cultivation management and yield prediction, empirical methods are mostly used, lacking analysis of multiple factors in the entire process of crop growth. It is necessary to apply modeling methods to the growth research of horticultural crops to provide more accurate predictions.

[0095] The model established by computer simulation of the growth and development process of crops using several relationship equations is the plant growth model, which is an important tool for studying the growth laws of crops and horticultural crops. my country is very lacking in independent modeling of mechanism models and often relies on or improves foreign crop mechanism models. The computer code is not fully disclosed, and the adjustment and calculation process of the mechanism model parameters are relatively complex, covering many factors. The lack of in-depth understanding of crop characteristics may affect the accuracy of the model. Machine learning algorithms can realize features that cannot be fully summarized under manual statistics, and have been widely used in multidisciplinary cross-research fields. With the application of machine learning and deep learning in agriculture, related algorithms are also applied to the prediction of agricultural yields. Machine learning methods such as artificial neural networks ANN, random forests, support vector machines, extreme gradient boosting, etc. are used to predict crop yields, and can complete yield analysis under the influence of multiple factors, with the characteristics of low training cost and high efficiency.

[0096] At present, there is a great lack of independent modeling of mechanism models, which often rely on or improve foreign crop mechanism models, the computer code is not fully disclosed, and the adjustment and calculation process of the mechanism model parameters are complicated, covering many factors, and the lack of in-depth understanding of crop characteristics affects the accuracy of the model. Therefore, the present invention studies the relationship between lettuce growth and climate environment through the growth characteristics of annual production of hydroponic lettuce in large-span plastic greenhouses, predicts the leaf area and yield of lettuce based on the Logistic regression function and three machine learning algorithms such as random forest, support vector regression, and extreme gradient boosting, and selects a suitable model according to the evaluation index.

[0097] Specifically, in the environmental data collection of hydroponic lettuce, a set of indoor recorders (HOBOH21-USB) were placed on the east and west sides of the planting area, including temperature and humidity sensors (HOBOS-THC-M00x), photosynthetically active radiation sensors (HOBOS-LIA-M003), total radiation sensors (HOBOS-LIB-M003), and carbon dioxide sensors (EspecE2020255). Sensor installation locations are as follows: Figure 3 shown.

[0098] Specifically, the radiant heat product is calculated as:

[0099] The relative thermal effect (ERTE) per day is calculated by using a piecewise function. The relative thermal effect and radiant heat product (TEP, Accumulated Product of Thermal Effectiveness and PAR) are calculated using the following formula:

[0100]

[0101] Among them, ERTE(T) represents the relative thermal effect at temperature T. Tb represents the lower limit temperature of development. Tm represents the upper limit temperature of development. Tob and Tou represent the optimum lower limit and optimum upper limit temperature of growth respectively. The values ​​of Tob and Tou are 8℃, 40℃, 25℃, and 30℃ respectively. The unit of daily radiant heat product is MJ / m2.

[0102] TTEP=ERTE*PAR*10*60

[0103] DTEP=∑(HETEP*10 -6 )

[0104] Among them, TTEP is the radiant heat product every ten minutes, ERTE is the relative thermal effect, PAR is the average photosynthetically active radiation within ten minutes (W / m2), and DTEP is the radiant heat product per day.

[0105] The calculation process is implemented through Python statements. First, import the Pandas library; read the temperature data in the directory and create a list to store the results; then use the if nested statement to complete the calculation of the piecewise function; finally, append each result to the list, create a new data frame, and complete the saving.

[0106] Calculation method of effective accumulated temperature:

[0107] HU=d*(T-Tb)

[0108] HU is the effective accumulated temperature (℃·d: degree day); T is the average daily temperature; Tb is the lower limit temperature of development; d is the number of growing days.

[0109] Calculation method of photosynthetically active radiation product:

[0110] PAR=Q*0.5

[0111] DPARA=∑PAR (t) *10 -6

[0112] Among them, Q is the average total solar radiation within ten minutes (W / m2), PAR is the average photosynthetically active radiation within ten minutes (W / m2), PAR(t) is the photosynthetically active radiation every ten minutes (J / m2), and DPARA is the daily accumulated photosynthetically active radiation (MJ / m2).

[0113] Growth indicators include:

[0114] Fresh weight: The above-ground and underground parts of the lettuce plants were separated and the fresh weight was measured.

[0115] Dry weight: The above-ground and underground parts of lettuce were dried in an oven at 105°C for 20 min, then adjusted to 72°C and dried to constant weight, and the dry weight was measured.

[0116] Number of leaves: Record the number of leaves.

[0117] Leaf area: Leaf area was measured by scanning with a leaf flat scanner (Epson DS-5000) and analyzing with leaf area measurement software (Leaf1000).

[0118] Plant height: Measure the height from the base of the lettuce stem to the canopy.

[0119] Crown width: Measure the spread of the lettuce canopy in the horizontal plane under its natural state.

[0120] The nonlinear regression yield model uses the nonlinear model Logistic growth function, with photosynthetically active radiation product, effective accumulated temperature and radiant heat product as input variables and aboveground fresh weight as output value to establish a nonlinear yield model.

[0121] The logistic function is calculated using the following formula:

[0122]

[0123] Among them, Y is the fresh weight of the aboveground parts, b and k are constants, A is the maximum fresh weight of the aboveground parts, and t is the number of growing days.

[0124] Machine learning can capture the relationship between each feature variable. By training on an existing data set, it can predict points outside the data set and has a certain degree of learning. Compared with nonlinear regression models, machine learning models can analyze the relationship between more feature variables, have better interpretability of output results, and have better model fitting effects.

[0125] The present invention selects three machine learning regression algorithms that are widely studied in the agricultural field: random forest (SF), support vector regression (SVR), and extreme gradient boosting (XGBoost) to model lettuce yield, leaf area, etc.

[0126] Random Forest (RF) improves the accuracy and stability of prediction by integrating multiple CART regression decision trees. Figure 4, each decision tree is established based on the process of random sampling of the data set (extracting multiple subsamples) and randomly selecting split features (tree node splitting). For regression problems, the square errors of all possible split points are calculated on each feature, and the split point that can minimize the sum of the square errors of the two child nodes after the node split is selected as the best split point. The node splitting criterion is as follows:

[0127]

[0128] Where K represents the number of samples, represents the actual value, and yi represents the predicted value.

[0129] Each time the data set is randomly taken out with replacement, each decision tree produces a result. The final result of the random forest is the average of the prediction results of multiple decision trees, as shown below:

[0130]

[0131] Among them, Y represents the model prediction value, K represents the number of decision regression trees, and h(x) represents the result of each decision tree.

[0132] Support Vector Machine (Support Vector Regression, SVM) is a supervised learning algorithm for classification and regression, which finds the optimal hyperplane by maximizing the margin. Figure 5 The SVR model can be simply understood as creating an "interval band" on both sides of the linear function. The values ​​inside the dotted line can be considered to be correct predictions. The ultimate goal is to maximize the value that falls within the interval band and minimize the loss. That is, the sample should be as close as possible to f(x-)-ε and f(x-)+ε, where ε is the hyperparameter of SVR.

[0133] The calculation formula of the linear function is:

[0134] f(x)=ωtx+b

[0135] Among them, f(x) represents the predicted value, ωt is the transpose of the weight vector ω, x is the aboveground fresh weight or leaf area containing each eigenvector, and b is the bias term.

[0136] Extreme Gradient Boosting (XGBoost) is an optimization ensemble algorithm based on decision trees. Figure 6 , mainly by gradually increasing the complexity of the model and training the residuals at each step to optimize the prediction performance, that is, the decision trees that make up XGBoost are in order.

[0137] In the XGBoost algorithm, the objective function determines the training process of the model, which usually consists of two parts: the loss function and the regularization term. The regularization term is used to control the complexity of the model. The formula is:

[0138]

[0139] in, is the predicted value of the i-th sample, fk is the prediction function of the K-th tree, represents the loss function, Ω(f) represents the regularization term for a single tree, γ and λ are regularization parameters, T is the number of leaf nodes, and ω is the weight of the leaf node.

[0140] XGBoost uses the gradient boosting algorithm to generate weak classifiers. In this model, for a training set, it first uses a decision tree to train a model, so that a residual value is generated for each sample; then the sample residual value is used as a new training set, and the decision tree is used to train a new model; this is repeated until a certain exit condition is reached. Therefore, the prediction value of each tree is the sum of the prediction values ​​of all previous trees. The formula for the prediction value is:

[0141]

[0142] where xi is the aboveground fresh weight or leaf area containing each eigenvector, is the predicted value of the i-th sample in the i-th iteration, is the sum of the prediction values ​​of the first t-1 trees, and ft is the prediction function of the tth tree.

[0143] The experimental data set was taken from the growth data and environmental data of lettuce from April 2023 to April 2024. During the planting process, the conductivity and pH value of the nutrient solution fluctuated slightly within a certain range and were relatively stable, so they were regarded as constants in the modeling process. Environmental parameters such as photosynthetically active radiation product, carbon dioxide concentration, daily average air temperature, effective accumulated temperature, and radiant heat product will have a direct impact on plant growth during the planting process, and have their own characteristics, so they are directly used as input variables; and some growth indicators such as crown width, plant height, number of leaves, leaf area, planting days, and aboveground fresh weight are parameters that reflect the overall growth of the plant, so they are also used as input variables. The final output variables are aboveground fresh weight and leaf area, respectively. 22 batches of experimental lettuce varieties were planted, 20 of which were used as training sets, 1 as validation sets, and 1 as test sets. The data sets for the lettuce yield and leaf area models contain 1,870 data respectively.

[0144] The model training flow chart is as follows Figure 7First, preprocess the raw data to remove outliers and null values. To ensure the repeatability of the model, it is necessary to determine that Random_State is in the range of 100-600, and determine different random states with a step size of 100 to obtain 6 different training sets and test sets, that is, to determine the sampling rules. The same Random_State value has the same sampling batch.

[0145] The training set segmentation flow chart is as follows Figure 8 ,Through 10-fold cross validation, divided into 9 training sets and 1 validation set, the performance of different hyperparameter combinations is evaluated to ensure the generalization ability of the model, which helps avoid overfitting or underfitting.

[0146] After the training set, validation set, and test set are divided, grid search is performed on different parameter combinations, and the parameter combinations found by exhaustive search are substituted into the validation set for evaluation. The one with the best model evaluation performance is the optimal model parameter combination. Finally, each set of parameters is input into each model test set to obtain the final performance result of the model.

[0147] The hyperparameters in random forest are the depth of each decision tree max_depth, the maximum number of features used by each decision tree max_features, the minimum number of samples contained in the internal node min_samples_split, and the number of trees n_estimators. The depth of the decision tree is generally not limited to the maximum depth when the number of samples or features is small; the number of trees is the number of weak classifiers. The larger the value, the better the accuracy. If it is too large, the improvement is limited and the computing resources are greatly wasted.

[0148] In the SVR model, after comparing the performance results of the three kernel functions, the poly kernel is used as the model kernel function, and the hyperparameters are the penalty coefficient C and the constant value coef0 in the kernel function. The rest of the parameters are the default values. The larger the penalty coefficient, the higher the attention paid to the total error during the optimization process, and the higher the requirement for reducing the error; the constant value in the kernel function is only used when the kernel function is poly or sigmoid.

[0149] The hyperparameters in extreme gradient boosting are learning rate learning_rate and the maximum depth of the tree max_depth. The learning rate is a value in the range of (0, 1] that XGBoost needs to multiply the residual value of each weak learner (tree) to prevent overfitting. Setting a smaller learning rate can learn several weak learners to make up for the insufficient residual. A reasonable maximum depth of the tree (weak learner) can prevent overfitting.

[0150] At the beginning of each model establishment, the hyperparameters of each model algorithm must be determined first, and the model parameters with the best evaluation are obtained through the grid search method. Generally, only the hyperparameters are selected, and the other parameters are the default values. The preset hyperparameter combinations of the three machine learning models are shown in Table 1.

[0151]

[0152] Table 1 Model hyperparameter combinations

[0153] After establishing each model, the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE) and determination coefficient (R 2 ) and other evaluation criteria were used to comprehensively evaluate each model. The smaller the mean square error and root mean square error, the smaller the model error and the better the model prediction effect. The linear relationship between the predicted value and the measured value was expressed as R 2 Indicates that the closer it is to 1, the closer the predicted value is to the measured value. Select the parameter value based on the optimal result. The evaluation index formula is as follows:

[0154]

[0155] in, represents the predicted value, yi represents the true value, n is the number of samples, is the average of all yi.

[0156] The photosynthetically active radiation product, effective accumulated temperature and radiant heat product during the growth period of lettuce were used as input, and the aboveground fresh weight was used as output to obtain the initial data set. After data processing to remove outliers, the initial data set was calculated using the SPSS nonlinear regression algorithm to obtain the values ​​of the various parameters of the Logistic model. The calculation model is as follows:

[0157] Photosynthetically active radiation product-aboveground fresh weight model:

[0158] Effective accumulated temperature-aboveground fresh weight model:

[0159] Radiant heat accumulation-aboveground fresh weight model:

[0160] Where Y is the fresh weight of the aboveground part; t is the photosynthetic active radiation product, effective accumulated temperature, and radiant heat product.

[0161] Based on the above calculation model, the yield prediction model of lettuce was evaluated. The results are shown in Table 2. The effective accumulated temperature-ground fresh weight model has the highest R2 of 0.832 and the lowest RMSE of 18.693g, which has the best overall performance. The model comparison results show that when the effective accumulated temperature is used as an input variable, the prediction value is more accurate, and the effect of the effective accumulated temperature on the growth of lettuce is relatively stable.

[0162]

[0163] Table 2 Evaluation of three aboveground fresh weight models of lettuce

[0164] Table 3 shows that the random_state setting in the validation set of lettuce aboveground fresh weight performs best at 600 and worst at 400, so random_state can be determined to be 600, and the hyperparameters are set to max_depth = 6, max_features = 0.5, min_samples_split = 4, and n_estimators = 50. The evaluation index RMSE of the validation set is 4.363g and R2 is 0.991.

[0165]

[0166] Table 3 Parameter settings and evaluation indicators of random forest lettuce yield model

[0167] Table 4 shows that the performance of random_state set at 600 in the validation set of lettuce fresh weight above ground is the best, and the performance is the worst at 500, so random_state can be determined to be 600, and the hyperparameters are set to C = 20 and coef0 = 7. The evaluation index RMSE of the validation set is 2.165g, and R2 is 0.998, indicating that the support vector regression (SVR) model has a good fitting effect on lettuce yield.

[0168]

[0169] Table 4 Support vector regression lettuce yield model parameter settings and evaluation indicators

[0170]

[0171] Table 5 Parameter settings and evaluation indicators of the extreme gradient boosting lettuce yield model

[0172] Table 5 shows that the evaluation performance of the lettuce validation set varies greatly. The performance of each evaluation index is the best when the random_state is set to 600, and the performance is the worst when the random_state is set to 400. Therefore, the random_state value is determined to be 600, and the hyperparameters are set to Gamma = 0.7, Learning_rate = 0.1, max_depth = 12, min_child_weight = 3, and subsample = 0.6. The evaluation index RMSE of the validation set is 4.509g, R 2 It is 0.991.

[0173] The lower the mean square error (MSE), root mean square error (RMSE), and mean absolute error (MAE), the lower the error and the better the model prediction accuracy; 2 The higher the value, the closer the predicted value is to the measured value, and the better the model fit is. As shown in Table 6, the performance of the three lettuce yield prediction models is very good, with RMSE and MAE not exceeding 5g; R2 values ​​are all over 0.99. This shows that the three models can be used to predict lettuce yield and the effect is very good.

[0174]

[0175] Table 6 Evaluation indexes of each model for lettuce yield

[0176] As a branch of artificial intelligence, machine learning can handle the complex relationship between climate change and crop growth and development, and has great potential for establishing a smart agricultural system. The machine learning regression models used in the present invention, such as the Logistic regression model, random forest, support vector regression, and extreme gradient boosting, are all black box models. The black box model does not require understanding of complex physiological processes, and the prediction results can be obtained by parameterizing the growth process and influencing factors. It is convenient, fast, simple and practical in practical applications.

[0177] Crop yield models based on a variety of methods are of great significance to agricultural production. They predict future lettuce yields by collecting and analyzing historical yield data and various factors that affect crop growth (such as climate, soil conditions, fertilization, pests and diseases, etc.). They help managers make production plans, arrange resources and make decisions reasonably, and decide when to plant, when to harvest, and how to manage, thereby improving production efficiency and crop quality. Yield models can also provide ideas for market supply. By understanding expected yields, market personnel can better predict changes in crop supply and adjust procurement plans, inventory management, and pricing strategies accordingly. They help reduce losses caused by imbalances in supply and demand, optimize supply chain efficiency, and improve market stability.

[0178] Figure 2 It is shown that the present invention provides a device for predicting the yield of hydroponic lettuce based on machine learning, and the device comprises:

[0179] The first processing module is used to determine the number of plants at each growth stage and the growth index set of the plants at each growth stage in the hydroponic lettuce in the greenhouse to be predicted based on the lettuce image in the current growth period of the hydroponic lettuce in the greenhouse to be predicted;

[0180] The second processing module is used to obtain the environmental heat index value in the greenhouse to be predicted during the current growth period, wherein the environmental heat index value includes daily photosynthetically active radiation product, daily effective accumulated temperature, and daily radiant heat product;

[0181] The third processing module is used to input the growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model of each growth stage, so as to obtain the predicted value of lettuce yield at each growth stage, wherein the lettuce yield model includes a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model;

[0182] The fourth processing module is used to obtain the final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted according to the predicted values ​​of the lettuce yield at all growth stages.

[0183] In some embodiments, the growth stages of the hydroponic lettuce include the germination stage, the seedling stage, and the growth stage;

[0184] The third processing module is specifically used for inputting the first growth index subset, the number of plants in the budding stage and the environmental heat index value in the current growth period into the random forest lettuce yield model to obtain a first yield prediction result when the growth stage of the hydroponic lettuce is in the budding stage, wherein the first growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0185] When the growth stage of the hydroponic lettuce is in the seedling stage, the second growth index subset, the number of plants in the seedling stage, and the environmental heat index value in the current growth period are input into the support vector machine regression lettuce yield model to obtain a second yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0186] When the growth stage of the hydroponic lettuce is in the growth period, the third growth index subset and the environmental heat index value in the current growth period are input into the extreme gradient boosting lettuce yield model to obtain a third yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted;

[0187] Among them, the random forest lettuce yield model is trained based on the first sample growth indicator subset and the first sample prediction value; the support vector machine regression lettuce yield is trained based on the second sample growth indicator subset and the second sample prediction value; the extreme gradient boosting lettuce yield model is trained based on the third sample growth indicator subset and the third sample prediction value.

[0188] In some embodiments, the fourth processing module is specifically used to obtain a final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted based on the first yield prediction result, the second yield prediction result and the third yield prediction result.

[0189] In some embodiments, the first processing module is specifically used to divide the image of the hydroponic lettuce in the current growth period according to a preset growth stage division rule to obtain a first sub-lettuce image, a second sub-lettuce image and a third sub-lettuce image, wherein the first sub-lettuce image is an image of the lettuce in the budding stage in the lettuce image, the second sub-lettuce image is an image of the lettuce in the seedling stage in the lettuce image, and the third sub-lettuce image is an image of the lettuce in the growth period in the lettuce image;

[0190] Extracting a first growth index subset of lettuce in the budding stage from the first sub-lettuce image, extracting a second growth index subset of lettuce in the seedling stage from the second sub-lettuce image, and extracting a third growth index subset of lettuce in the growing stage from the third sub-lettuce image;

[0191] Among them, the first growth indicator subset includes plant height and leaf number of the plant, the second growth indicator subset includes leaf number and leaf area index characteristics of the plant, and the third growth indicator subset includes crown width and leaf area index characteristics of the plant.

[0192] In some embodiments, a pre-verification module is further included, for establishing a random forest lettuce yield model, a support vector machine regression lettuce yield model, and an extreme gradient boosting lettuce yield model, wherein the random forest lettuce yield model is based on a random forest model, the support vector machine regression lettuce yield model is based on a support vector regression model, and the extreme gradient boosting lettuce yield model is based on an extreme gradient boosting model;

[0193] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the random forest lettuce yield model respectively, to obtain a first prediction value of the random forest lettuce yield model, a second prediction value of the random forest lettuce yield model and a third prediction value of the random forest lettuce yield model;

[0194] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the support vector machine regression lettuce yield model respectively, to obtain a first prediction value of the support vector machine regression lettuce yield model, a second prediction value of the support vector machine regression lettuce yield model and a third prediction value of the support vector machine regression lettuce yield model;

[0195] Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the extreme gradient boosting lettuce yield model respectively, to obtain a first prediction value of the extreme gradient boosting lettuce yield model, a second prediction value of the extreme gradient boosting lettuce yield model and a third prediction value of the extreme gradient boosting lettuce yield model;

[0196] Respectively calculating the first prediction value of the random forest lettuce yield model, the first prediction value of the support vector machine regression lettuce yield model, and the first prediction value of the extreme gradient boosting lettuce yield model, and the first evaluation index value of the actual yield value of the sample, and determining, according to the first evaluation index value, that the prediction model corresponding to the first growth indicator subset is the random forest lettuce yield model;

[0197] Respectively calculating the second prediction value of the random forest lettuce yield model, the second prediction value of the support vector machine regression lettuce yield model, and the second prediction value of the extreme gradient boosting lettuce yield model, and the second evaluation index value of the actual yield value of the sample, and determining, according to the second evaluation index value, that the prediction model corresponding to the second growth indicator subset is the support vector machine regression lettuce yield model;

[0198] The third prediction value of the random forest lettuce yield model, the third prediction value of the support vector machine regression lettuce yield model and the third prediction value of the extreme gradient boosting lettuce yield model are calculated respectively, and the third evaluation index value of the actual yield value of the sample is compared. According to the third evaluation index value, it is determined that the prediction model corresponding to the third growth indicator subset is the extreme gradient boosting lettuce yield model.

[0199] In some embodiments, the first processing module is further used to input a function according to the plant's lower limit temperature Tb, upper limit temperature Tm, optimum lower limit temperature Tob, and optimum upper limit temperature Tou:

[0200]

[0201] Get the relative thermal effect ERTE(T) of the current average temperature T;

[0202] The daily radiant heat product is obtained based on the relative thermal effect ERTE(T) of the current average temperature T and the daily average photosynthetically active radiation value during the current growing season;

[0203] Based on the current average temperature T, the lower limit temperature of development and the preset growth days, the daily effective accumulated temperature is obtained.

[0204] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 1 The method described.

[0205] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the Figure 1 The method described.

[0206] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this application can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0207] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation methods of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.

Claims

1. A method for predicting the yield of hydroponic lettuce based on machine learning, characterized in that: The method comprises: Based on the lettuce images of the hydroponic lettuce in the greenhouse to be predicted in the current growth period, determining the number of plants in each growth stage and the growth indicator set of the plants in each growth stage in the hydroponic lettuce in the greenhouse to be predicted; Acquire the environmental heat index value in the greenhouse to be predicted during the current growth period, wherein the environmental heat index value includes daily photosynthetically active radiation product, daily effective accumulated temperature and daily radiant heat product; Inputting the growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model of each growth stage to obtain the lettuce yield prediction value of each growth stage, wherein the lettuce yield model includes a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model; According to the lettuce yield prediction values ​​at all growth stages, the final prediction value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted is obtained.

2. The method according to claim 1, characterized in that The growth stages of hydroponic lettuce include germination, seedling and growth stages; The growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted are respectively input into the corresponding lettuce yield model of each growth stage to obtain the lettuce yield prediction value of each growth stage, specifically including: When the growth stage of the hydroponic lettuce is in the budding stage, a first growth indicator subset, the number of plants in the budding stage, and the environmental heat index value in the current growth stage are input into the random forest lettuce yield model to obtain a first yield prediction result, wherein the first growth indicator subset is extracted from the growth indicator set of the hydroponic lettuce in the greenhouse to be predicted; When the growth stage of the hydroponic lettuce is in the seedling stage, the second growth index subset, the number of plants in the seedling stage, and the environmental heat index value in the current growth period are input into the support vector machine regression lettuce yield model to obtain a second yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted; When the growth stage of the hydroponic lettuce is in the growth period, the third growth index subset and the environmental heat index value in the current growth period are input into the extreme gradient boosting lettuce yield model to obtain a third yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted; Among them, the random forest lettuce yield model is trained based on the first sample growth indicator subset and the first sample prediction value; the support vector machine regression lettuce yield is trained based on the second sample growth indicator subset and the second sample prediction value; the extreme gradient boosting lettuce yield model is trained based on the third sample growth indicator subset and the third sample prediction value.

3. The method according to claim 2, characterized in that The method of obtaining the final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted based on the predicted values ​​of the lettuce yield at all growth stages specifically includes: According to the first yield prediction result, the second yield prediction result and the third yield prediction result, a final prediction value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted is obtained.

4. The method according to claim 3, characterized in that The method of determining the number of plants at each growth stage and the growth indicator set of the plants at each growth stage in the hydroponic lettuce in the greenhouse to be predicted based on the lettuce image in the current growth period of the hydroponic lettuce in the greenhouse to be predicted specifically includes: Dividing the image of the hydroponic lettuce in the current growth stage according to a preset growth stage division rule to obtain a first sub-lettuce image, a second sub-lettuce image and a third sub-lettuce image, wherein the first sub-lettuce image is an image of the lettuce in the budding stage in the lettuce image, the second sub-lettuce image is an image of the lettuce in the seedling stage in the lettuce image, and the third sub-lettuce image is an image of the lettuce in the growth stage in the lettuce image; Extracting a first growth index subset of lettuce in the budding stage from the first sub-lettuce image, extracting a second growth index subset of lettuce in the seedling stage from the second sub-lettuce image, and extracting a third growth index subset of lettuce in the growing stage from the third sub-lettuce image; Among them, the first growth indicator subset includes plant height and leaf number of the plant, the second growth indicator subset includes leaf number and leaf area index characteristics of the plant, and the third growth indicator subset includes crown width and leaf area index characteristics of the plant.

5. The method according to claim 4, characterized in that The method further comprises: Establishing a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model, wherein the random forest lettuce yield model is based on a random forest model, the support vector machine regression lettuce yield model is based on a support vector regression model, and the extreme gradient boosting lettuce yield model is based on an extreme gradient boosting model; Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the random forest lettuce yield model respectively, to obtain a first prediction value of the random forest lettuce yield model, a second prediction value of the random forest lettuce yield model and a third prediction value of the random forest lettuce yield model; Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the support vector machine regression lettuce yield model respectively, to obtain a first prediction value of the support vector machine regression lettuce yield model, a second prediction value of the support vector machine regression lettuce yield model and a third prediction value of the support vector machine regression lettuce yield model; Inputting the first sample growth index subset, the second sample growth index subset and the third sample growth index subset into the extreme gradient boosting lettuce yield model respectively, to obtain a first prediction value of the extreme gradient boosting lettuce yield model, a second prediction value of the extreme gradient boosting lettuce yield model and a third prediction value of the extreme gradient boosting lettuce yield model; Respectively calculating the first prediction value of the random forest lettuce yield model, the first prediction value of the support vector machine regression lettuce yield model, and the first prediction value of the extreme gradient boosting lettuce yield model, and the first evaluation index value of the actual yield value of the sample, and determining, according to the first evaluation index value, that the prediction model corresponding to the first growth indicator subset is the random forest lettuce yield model; Respectively calculating the second prediction value of the random forest lettuce yield model, the second prediction value of the support vector machine regression lettuce yield model, and the second prediction value of the extreme gradient boosting lettuce yield model, and the second evaluation index value of the actual yield value of the sample, and determining, according to the second evaluation index value, that the prediction model corresponding to the second growth indicator subset is the support vector machine regression lettuce yield model; The third prediction value of the random forest lettuce yield model, the third prediction value of the support vector machine regression lettuce yield model and the third prediction value of the extreme gradient boosting lettuce yield model are calculated respectively, and the third evaluation index value of the actual yield value of the sample is compared. According to the third evaluation index value, it is determined that the prediction model corresponding to the third growth indicator subset is the extreme gradient boosting lettuce yield model.

6. The method according to claim 5, characterized in that The method further comprises: According to the plant's lower limit temperature Tb, upper limit temperature Tm, optimum lower limit temperature Tob, and optimum upper limit temperature Tou, input the function: Get the relative thermal effect ERTE(T) of the current average temperature T; The daily radiant heat product is obtained based on the relative thermal effect ERTE(T) of the current average temperature T and the daily average photosynthetically active radiation value during the current growing season; Based on the current average temperature T, the lower limit temperature of development and the preset growth days, the daily effective accumulated temperature is obtained.

7. A device for predicting the yield of hydroponic lettuce based on machine learning, characterized in that: The device comprises: The first processing module is used to determine the number of plants at each growth stage and the growth index set of the plants at each growth stage in the hydroponic lettuce in the greenhouse to be predicted based on the lettuce image in the current growth period of the hydroponic lettuce in the greenhouse to be predicted; The second processing module is used to obtain the environmental heat index value in the greenhouse to be predicted during the current growth period, wherein the environmental heat index value includes daily photosynthetically active radiation product, daily effective accumulated temperature, and daily radiant heat product; The third processing module is used to input the growth index set of plants at each growth stage, the number of plants at each growth stage and the environmental heat index value in the greenhouse to be predicted into the corresponding lettuce yield model of each growth stage, so as to obtain the predicted value of lettuce yield at each growth stage, wherein the lettuce yield model includes a random forest lettuce yield model, a support vector machine regression lettuce yield model and an extreme gradient boosting lettuce yield model; The fourth processing module is used to obtain the final predicted value of the lettuce yield of the hydroponic lettuce in the greenhouse to be predicted according to the predicted values ​​of the lettuce yield at all growth stages.

8. The device according to claim 7, characterized in that The growth stages of hydroponic lettuce include germination, seedling and growth stages; The third processing module is specifically used for inputting the first growth index subset, the number of plants in the budding stage and the environmental heat index value in the current growth period into the random forest lettuce yield model to obtain a first yield prediction result when the growth stage of the hydroponic lettuce is in the budding stage, wherein the first growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted; When the growth stage of the hydroponic lettuce is in the seedling stage, the second growth index subset, the number of plants in the seedling stage, and the environmental heat index value in the current growth period are input into the support vector machine regression lettuce yield model to obtain a second yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted; When the growth stage of the hydroponic lettuce is in the growth period, the third growth index subset and the environmental heat index value in the current growth period are input into the extreme gradient boosting lettuce yield model to obtain a third yield prediction result, wherein the second growth index subset is extracted from the growth index set of the hydroponic lettuce in the greenhouse to be predicted; Among them, the random forest lettuce yield model is trained based on the first sample growth indicator subset and the first sample prediction value; the support vector machine regression lettuce yield is trained based on the second sample growth indicator subset and the second sample prediction value; the extreme gradient boosting lettuce yield model is trained based on the third sample growth indicator subset and the third sample prediction value.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for predicting the yield of hydroponic lettuce based on machine learning as described in any one of claims 1 to 6 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the yield of hydroponic lettuce based on machine learning as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for predicting biomass of woody plant seedlings

    CN113609776A

  • Leaf vegetable yield prediction method, device, equipment and medium

    CN116757332A

  • Method and program for predicting growth, and information processing device

    JP2021179983A

  • Method for predicting developmental stage and program for predicting developmental stage

    JP2024011156A

  • Method for predicting yield performance of a crop plant

    US20220155298A1