Crop planting density decision-making method, device and equipment and storage medium
The planting density decision model constructed through image recognition technology and random forest algorithm solves the subjectivity and accuracy of planting density determination in traditional methods, realizes efficient and accurate planting density decisions in different environments, and improves crop yield and work efficiency.
Patent Information
- Application Number
- CN202411326229.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-10
AI Technical Summary
The determination of planting density in traditional crops depends on farmers' empirical judgment or manual statistical calculations. There are problems such as incomplete data acquisition and low analysis accuracy, and it is difficult to determine the appropriate planting density in different planting environments.
By collecting crop growth image data and environmental data, using image recognition technology to analyze planting density and growth data, establish a multivariate data set, and construct a planting density decision model based on a random forest algorithm to predict the optimal planting density under different environmental conditions.
More accurate optimal planting density decisions are achieved, crop yield and quality are improved, manual intervention is reduced, and work efficiency is improved, and it is suitable for a variety of target environments.
Smart Images

Figure CN119295923A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of precision agriculture technology, and in particular to a method, device, equipment and storage medium for determining crop planting density. Background Art
[0002] In modern agriculture, when planting crops, choosing a reasonable planting density is of great significance to improving the yield and quality of crops. At present, the traditional determination of crop planting density mainly relies on farmers' experience judgment or statistical calculations. However, for different planting environments and climatic conditions, personal experience judgment is not necessarily accurate, and there is a large degree of subjectivity and error. Manual statistical calculations are time-consuming and labor-intensive, and there are still problems such as incomplete data acquisition and low analysis accuracy. Therefore, it is difficult to determine the appropriate planting density that can achieve higher yields under the target planting environment. Summary of the invention
[0003] The present application aims to propose a crop planting density decision method, device, equipment and storage medium, which can more accurately obtain the appropriate planting density that can achieve a higher yield under the target planting environment.
[0004] A crop planting density decision method according to an embodiment of the first aspect of the present application includes:
[0005] Collecting crop growth image data and environmental data, wherein the crop growth image data includes field high-definition image data, and the environmental data includes a variety of environmental parameters monitored by a field weather station and a variety of soil parameters detected by a soil sensor;
[0006] Analyzing the crop growth image data using image recognition technology to obtain crop planting density data and growth data, wherein the growth data includes a plurality of growth index parameters, each of which is used to characterize different development and yield conditions of the crop;
[0007] Establishing a multivariate data set based on the environmental data, the planting density data and the growth potential data;
[0008] Based on the random forest algorithm, a planting density decision model is constructed using the multivariate data set, wherein the planting density decision model is used to fit the nonlinear relationship among the planting density data, the multiple environmental parameters, the multiple soil parameters and the multiple growth index parameters, and based on the nonlinear relationship, the optimal planting density of the crop that can achieve the maximum expected yield under the conditions of the multiple environmental parameters and the multiple soil parameters is predicted;
[0009] The target environmental data is collected and input into the random forest decision model to obtain the target optimal planting density of the crop.
[0010] According to some embodiments of the present application, obtaining crop planting density data by image recognition technology based on the crop growth data includes the following steps:
[0011] Preprocessing steps of denoising, correcting, segmenting and sharpening the crop growth image data;
[0012] Using image recognition technology to perform soil recognition on the preprocessed crop growth image data to obtain a soil recognition result;
[0013] Using image recognition technology to perform crop plant canopy recognition on the preprocessed crop growth image data, and then complete plant unit recognition to obtain a plant unit recognition result;
[0014] Calculating plant spacing according to the soil identification result and the plant unit identification result;
[0015] The planting density data of the crop is obtained according to the plant spacing.
[0016] According to some embodiments of the present application, establishing a multivariate data set according to the environmental data, the planting density data and the growth data includes:
[0017] A preprocessing step of vectorizing and scaling the environmental data, the planting density data, and the growth potential data;
[0018] A multivariate data set is constructed based on the preprocessed environmental data, the planting density data and the growth potential data.
[0019] According to some embodiments of the present application, after constructing the planting density decision model by the random forest algorithm according to the multivariate data training sample, the following steps are also included:
[0020] Using feature selection technology to evaluate the importance of feature values in the multivariate data set, obtaining the importance scores of the feature values, and optimizing the planting density decision model according to the importance scores of the feature values;
[0021] Adding a penalty term to the loss function using regularization technology, and optimizing the planting density decision model according to the penalty term;
[0022] The multivariate data set is segmented, cyclically trained and validated using cross-validation technology to optimize the planting density decision model.
[0023] According to some embodiments of the present application, the multiple environmental parameters include temperature, humidity, precipitation, and light intensity; the multiple soil parameters include soil moisture, pH value, and nutrient content; and the multiple growth indicator parameters include leaf area index, plant height, and ear length.
[0024] According to the crop planting density decision-making device of the second aspect embodiment of the present application, the device includes:
[0025] A collection module, used to collect crop growth image data and environmental data, wherein the crop growth image data includes field high-definition image data, and the environmental data includes a variety of environmental parameters monitored by a field weather station and a variety of soil parameters detected by a soil sensor;
[0026] An image recognition module is used to analyze the crop growth image data using image recognition technology to obtain crop planting density data and growth data, wherein the growth data includes a plurality of growth index parameters, each of which is used to characterize different development and yield conditions of the crop;
[0027] An establishment module, used for establishing a multivariate data set according to the environmental data, the planting density data and the growth data;
[0028] A construction module is used to construct a planting density decision model using the multivariate data set based on a random forest algorithm, wherein the planting density decision model is used to fit the nonlinear relationship among the planting density data, a plurality of the environmental parameters, a plurality of the soil parameters and a plurality of the growth index parameters, and to predict based on the nonlinear relationship the optimal planting density of the crop that can achieve the maximum expected yield under the conditions of the plurality of the environmental parameters and the plurality of the soil parameters;
[0029] The decision module is used to collect target environmental data and input it into the random forest decision model to obtain the target optimal planting density of the crop.
[0030] According to some embodiments of the present application, the image recognition module includes:
[0031] An image preprocessing unit, used for performing preprocessing steps of denoising, correcting, segmenting and sharpening the crop growth image data;
[0032] A soil identification unit, used for performing soil identification on the pre-processed crop growth image data using image recognition technology to obtain a soil identification result;
[0033] A crop identification unit, used to use image recognition technology to perform crop plant canopy identification on the preprocessed crop growth image data, and then complete plant unit identification to obtain a plant unit identification result;
[0034] A spacing calculation unit, used for calculating the plant spacing according to the soil identification result and the plant unit identification result;
[0035] The planting density acquisition unit is used to acquire the planting density data of the crop according to the plant spacing.
[0036] According to some embodiments of the present application, the establishing module includes:
[0037] A preprocessing unit, used for preprocessing steps of vectorizing and scaling the environmental data, the planting density data and the growth potential data;
[0038] The data set construction unit is used to construct a multivariate data set according to the pre-processed environmental data, the planting density data and the growth data.
[0039] According to an electronic device of an embodiment of the third aspect of the present application, the device includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the crop planting density decision method as described in any one of the embodiments of the first aspect are implemented.
[0040] According to the computer-readable storage medium of the fourth aspect embodiment of the present application, computer-executable instructions are stored, and the computer-executable instructions are used to execute the crop planting density decision method as described in the first aspect embodiment above.
[0041] In the embodiments of the present application, compared with the current method of relying on farmers' experience judgment or determining crop planting density through statistical calculation, the present application collects data extensively and accurately to train a planting density decision model based on a random forest algorithm, and scientifically calculates crop planting density, thereby obtaining more accurate optimal planting density results, thereby improving crop yield and quality, rationally utilizing land resources, and realizing precision agriculture; at the same time, it can be used to obtain the optimal planting density under a variety of different target environmental conditions, and has a wide range of applications; in addition, through automated data collection and analysis, it can reduce manual intervention and improve work efficiency.
[0042] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or may be understood by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0044] Figure 1 is a flow chart of an embodiment of a method for determining crop planting density of the present application;
[0045] Figure 2 It is a structural schematic diagram of an embodiment of a crop planting density decision-making device of the present application;
[0046] Figure 3It is a schematic diagram of the hardware structure of an embodiment of the electronic device of the present application. DETAILED DESCRIPTION
[0047] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0048] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0049] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0050] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.
[0051] The technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments.
[0052] Figure 1 A schematic diagram of a process flow of a crop planting density decision method according to an embodiment of the present application; Figure 2 It is a structural schematic diagram of an embodiment of a crop planting density decision-making device of the present application; Figure 3 It is a schematic diagram of the hardware structure of an embodiment of the electronic device of the present application.
[0053] See below Figure 1 , the embodiments of the present application are further described.
[0054] The present application embodiment proposes a crop planting density decision method, and the crop planting density decision method includes the following steps:
[0055] Step 101: collecting crop growth image data and environmental data, wherein the crop growth image data includes field high-definition image data, and the environmental data includes a variety of environmental parameters monitored by a field weather station and a variety of soil parameters detected by a soil sensor;
[0056] Step 102: Analyze the crop growth image data using image recognition technology to obtain crop planting density data and growth data, where the growth data includes a variety of growth index parameters, each of which is used to characterize different development and yield conditions of the crop;
[0057] Step 103, establishing a multivariate data set based on the environmental data, the planting density data and the growth data;
[0058] Step 104: Based on the random forest algorithm, a planting density decision model is constructed using a multivariate data set. The planting density decision model is used to fit the nonlinear relationship among the planting density data, multiple environmental parameters, multiple soil parameters, and multiple growth index parameters, and to predict the optimal planting density of the crop that can achieve the maximum expected yield under the conditions of multiple environmental parameters and multiple soil parameters based on the nonlinear relationship;
[0059] Step 105: Collect target environmental data and input it into the random forest decision model to obtain the target optimal planting density of crops.
[0060] The crop planting density decision method of the embodiment of the present application collects relevant image data and environmental data in the crop growth process through a meteorological station and sensor equipment, and uses image recognition technology to analyze the collected image data to obtain planting density and growth data. Subsequently, a planting density decision model based on a random forest algorithm is constructed and trained through the obtained multiple data, and the optimal planting density of crops under the target environment is scientifically calculated based on this model.
[0061] In the embodiments of the present application, compared with the current method of relying on farmers' experience judgment or determining crop planting density through statistical calculation, the present application collects data extensively and accurately to train a planting density decision model based on a random forest algorithm, and scientifically calculates crop planting density, thereby obtaining more accurate optimal planting density results, thereby improving crop yield and quality, rationally utilizing land resources, and realizing precision agriculture; at the same time, it can be used to obtain the optimal planting density under a variety of different target environmental conditions, and has a wide range of applications; in addition, through automated data collection and analysis, it can reduce manual intervention and improve work efficiency.
[0062] In the above step 101, crop growth image data and environmental data are collected, the crop growth image data includes field high-definition image data, and the environmental data includes various environmental parameters monitored by a field weather station and various soil parameters detected by a soil sensor.
[0063] The above-mentioned collected crop growth image data can reflect the current growth status of crops in the field. It can be obtained by using drone aerial photography, by ground robots or fixed cameras, or by satellite remote sensing technology.
[0064] For example, the crop growth image data can be collected by flying a drone equipped with a high-resolution camera over the farmland to capture high-definition images of the crop growth in the field. The crop growth image data can be collected by installing a fixed camera in the field to automatically capture images regularly or by remote control to obtain high-definition images of the crop growth in the field.
[0065] The above environmental data can reflect the current growth environment of crops, including climate and soil environment. Installing a field weather station can monitor temperature, humidity, wind speed, rainfall, sunshine duration and other environmental parameters in real time. Using soil sensors can monitor soil humidity, pH value, conductivity, temperature, organic matter content and other soil parameters in real time. The above field weather stations and soil sensors can automatically record data and upload data regularly as monitoring equipment.
[0066] In the above step 102, the crop growth image data is analyzed using image recognition technology to obtain crop planting density data and growth data. The growth data includes a variety of growth index parameters, and each growth index parameter is used to characterize different development and yield conditions of the crop.
[0067] The above growth data can reflect the current growth of the crop, and the current growth of the crop is related to the expected yield of the crop, so it also reflects the future yield of the crop to a certain extent. The above growth data may include the height, stem thickness, leaf condition, fruiting condition, etc. of the crop plant.
[0068] In the above step 103, a multivariate data set is established based on the environmental data, the planting density data and the growth data.
[0069] The above multivariate data set includes crop planting density data, environmental data, and growth data. In some cases, yield data of harvested fields can also be added to the multivariate data set.
[0070] In the above step 104, based on the random forest algorithm, a planting density decision model is constructed using a multivariate data set. The planting density decision model is used to fit the nonlinear relationship among planting density data, multiple environmental parameters, multiple soil parameters and multiple growth index parameters, and based on the nonlinear relationship, the optimal planting density that can achieve the maximum expected yield of crops under the conditions of multiple environmental parameters and multiple soil parameters is predicted.
[0071] The above random forest algorithm is an ensemble learning method based on decision trees, which is mainly used for classification and regression tasks. It performs particularly well in processing data sets with high-dimensional features and complex data structures. It is suitable for data sets containing a large number of samples and features. This is because random forests improve the overall accuracy by constructing multiple decision trees and combining their prediction results.
[0072] In the analysis of crop planting density and environmental data, random forest estimates the value of the target variable by constructing multiple decision trees and combining their prediction results. This allows the model to fit the complex nonlinear relationship between crop growth and the environment, such as temperature, humidity, precipitation, soil fertility, and light intensity, under different planting densities. This allows the model to analyze and give predictions of the optimal planting density for maximum crop yield under this type of environmental data.
[0073] In the above step 105, target environmental data is collected and input into the random forest decision model to obtain the target optimal planting density of crops.
[0074] The target environmental data may be the environmental data of the field currently planned for planting, and the target optimal planting density may be the crop planting density that is suitable for the environment of the field currently planned for planting and is expected to achieve the maximum yield. After training, the random forest decision model can input the target environmental data, obtain the target optimal planting density, and provide planting suggestions to the farmers who plan to plant the current field.
[0075] The above-mentioned crop may be a rice crop.
[0076] In some embodiments, obtaining crop planting density data through image recognition technology based on crop growth data includes the following steps:
[0077] Preprocessing steps for denoising, rectifying, segmenting and sharpening crop growth image data;
[0078] Using image recognition technology to perform soil recognition on the preprocessed crop growth image data to obtain soil recognition results;
[0079] Using image recognition technology to identify the plant canopy of crops on the preprocessed crop growth image data, and then completing plant unit recognition to obtain plant unit recognition results;
[0080] Calculate the plant spacing based on the soil identification results and plant unit identification results;
[0081] Get crop planting density data based on plant spacing.
[0082] In this embodiment, the soil and crop plants are identified through image recognition technology, the distance between plants can be calculated, and then the planting density of crops can be obtained based on the plant distance. Compared with manual measurement of field planting density, the calculation efficiency and accuracy are improved.
[0083] The denoising step may use a filter to perform Gaussian filtering or median filtering to remove random noise in the image and improve image quality. The correction step may be a geometric correction or a radiation correction to ensure that the image is consistent with the actual scene and eliminate the effects of uneven lighting and lens distortion. The segmentation step may be to cut the image according to different fields. The sharpening step may be to enhance the edges and details of the image to make the boundaries between crops and soil clearer. The preprocessing step of the crop growth image data may also include adjusting brightness, contrast, etc. for subsequent analysis.
[0084] In some embodiments, a multivariate data set is established based on environmental data, planting density data, and growth data, including:
[0085] Preprocessing steps to vectorize and scale the environmental data, planting density data, and growth data;
[0086] A multivariate data set was constructed based on the preprocessed environmental data, planting density data, and growth data.
[0087] In this implementation, by performing preprocessing steps of vectorization and scale standardization on a variety of data, data cleaning can be performed to improve the accuracy of data in the multivariate data set.
[0088] The above-mentioned vectorization preprocessing step can generate vector boundaries through edge detection. The above-mentioned scale standardization preprocessing step can standardize data of different scales to ensure the stability of model training. The above-mentioned scale standardization preprocessing step can use a standardization or normalization method, and can scale the data so that features of different scales have equal importance in the model.
[0089] The above preprocessing steps can be further combined with the rice planting knowledge question and answer database to correct and optimize erroneous data, improve data accuracy, and achieve data cleaning.
[0090] The above multivariate dataset can be divided into a training set and a validation set, generally in a ratio of 8:2 or 7:3.
[0091] In some embodiments, the multivariate data set includes a training set; and based on a random forest algorithm, a planting density decision model is constructed using the multivariate data set, including:
[0092] Use the training set as the root node to build multiple decision trees;
[0093] The importance of the feature values in the training set is calculated based on the information gain, and the split nodes of multiple decision trees are set according to the importance of each feature value to complete the construction of multiple decision trees;
[0094] A random forest constructed based on multiple decision trees is used to obtain a planting density decision model.
[0095] In some embodiments, the model can be generated using Python's scikit-learn library, and GridSearchCV is introduced for hyperparameter optimization, mean_squared_error and r2_score are used for model evaluation. Subsequently, the random forest regression model object is instantiated. In the early stage of model training, only some basic hyperparameters, such as the number and depth of trees, can be set, and training optimization is performed through a multivariate data set, and the training set of the multivariate data set is used as the root node of the tree. Subsequently, the importance of the features in the training set of the multivariate data set is calculated using information gain, the information gain of the features in the training set of each multivariate data set is calculated, the feature with the largest information gain is selected as the split node, and the split node of the decision tree is set. For each decision tree, the input sample is traversed along the branch node feature value of the decision tree, and finally reaches the leaf node, which contains a group of training samples, and its regression value is obtained by calculating the average value of the leaf node according to the corresponding training samples and features. Each decision tree performs independent regression prediction, and the average value of all decision tree regression values is calculated as the final prediction value.
[0096] In some embodiments, the multivariate data set includes a validation set; and constructing a planting density decision model using the multivariate data set based on a random forest algorithm further includes:
[0097] Input the validation set into the planting density decision model to obtain the predicted value;
[0098] Obtain the mean square error and determination coefficient based on the predicted value and the actual value of the validation set;
[0099] The accuracy of the prediction results is determined based on the mean square error and the coefficient of determination.
[0100] In this implementation, the performance of the planting density decision model is verified by using the test set data, while focusing on the mean square error and determination coefficient indicators to measure the goodness of fit of the model.
[0101] In some embodiments, after constructing a planting density decision model using a random forest algorithm based on multivariate data training samples, the following steps are also included:
[0102] The feature selection technology is used to evaluate the importance of feature values in multivariate data sets, obtain the importance scores of feature values, and optimize the planting density decision model according to the importance scores of feature values;
[0103] Regularization technology is used to add penalty terms to the loss function, and the planting density decision model is optimized based on the penalty terms.
[0104] Cross-validation technology is used to segment the multivariate data set, perform cyclic training and validation, and optimize the planting density decision model.
[0105] In this embodiment, the planting density decision model can be further optimized through feature selection technology, regularization technology and cross-validation technology to achieve a better optimal planting density prediction effect.
[0106] The above feature selection can be used to calculate the correlation coefficient matrix between each feature and the target variable. Through correlation analysis, we can determine which features are more closely related to the target variable. Then, we can use the built-in method of the model or a separate feature selection technique to evaluate the importance of the feature. Taking the gradient boosting regression tree as an example, it can naturally provide feature importance scores, and then select features that have a greater impact on the model, such as humidity, soil fertility, etc., to continuously optimize the prediction accuracy of the model.
[0107] The above-mentioned regularization techniques include ridge regression and lasso regression, which can prevent overfitting and can limit the complexity of the model by adding a penalty term to the loss function. For example, ridge regression uses L2 regularization to reduce the contribution of each feature to the prediction by "shrinking" the weight of the feature value, thereby reducing the complexity of the model and avoiding the noise caused by some reasonable abnormal data. In this application, the regression coefficients of temperature, humidity, precipitation, light, soil fertility, etc. in the environment can be corrected.
[0108] The above cross-validation can be done by reasonably dividing the data set, and then performing cyclic training and validation. For example, if there are k data sets in total, k-2 data sets can be used as training sets each time, and the remaining 2 can be used as validation sets, and training and validation can be performed in rotation to iterate the prediction ability of the model. The hyperparameters of the model can also be optimized through technologies such as grid search to improve the generalization ability of the model.
[0109] In some embodiments, the multiple environmental parameters include temperature, humidity, precipitation, and light intensity; the multiple soil parameters include soil moisture, pH value, and nutrient content; and the multiple growth indicator parameters include leaf area index, plant height, and ear length.
[0110] In this implementation, environmental parameters and soil parameters that have a greater impact on crop growth, as well as parameters that can reflect crop growth conditions, are selected as growth indicator parameters, which can achieve a better training effect of the planting density decision model.
[0111] The ear length mentioned above refers to the straight-line distance from the base to the top of the ear, usually measured in centimeters. It can be used as an intuitive indicator to measure the size of the ear, which can reflect the length of the ear and indirectly indicate the volume of the ear and the possible number of grains. In agricultural research and production practice, ear length is one of the important indicators for evaluating crop variety characteristics and yield potential.
[0112] The above leaf area index is the total leaf area per unit ground area. In agriculture, forestry and ecological research, the leaf area index is a very important parameter because it is closely related to plant photosynthesis, water use efficiency, energy exchange and biomass production.
[0113] The crop planting density decision method provided in the embodiment of the present application can be executed by the crop planting density decision device 200. In the embodiment of the present application, the crop planting density decision device 200 is used as an example to illustrate the crop planting density decision method provided in the embodiment of the present application.
[0114] See also Figure 2 , is a structural schematic diagram of a crop planting density decision-making device 200 provided in an embodiment of the present application.
[0115] like Figure 2 As shown, the crop planting density decision device 200 includes:
[0116] The acquisition module 201 is used to acquire crop growth image data and environmental data, wherein the crop growth image data includes field high-definition image data, and the environmental data includes various environmental parameters monitored by a field weather station and various soil parameters detected by a soil sensor;
[0117] The image recognition module 202 is used to analyze the crop growth image data using image recognition technology to obtain the crop planting density data and growth data. The growth data includes a variety of growth index parameters, each of which is used to characterize different development and yield conditions of the crop.
[0118] Establishing module 203, for establishing a multivariate data set according to environmental data, planting density data and growth data;
[0119] A construction module 204 is used to construct a planting density decision model using a multivariate data set based on a random forest algorithm, wherein the planting density decision model is used to fit the nonlinear relationship among planting density data, multiple environmental parameters, multiple soil parameters, and multiple growth index parameters, and to predict the optimal planting density of crops that can achieve the maximum expected yield under the conditions of multiple environmental parameters and multiple soil parameters based on the nonlinear relationship;
[0120] The decision module 205 is used to collect target environmental data and input it into the random forest decision model to obtain the target optimal planting density of crops.
[0121] In some implementations, the image recognition module 202 includes:
[0122] An image preprocessing unit, used for preprocessing crop growth image data; the preprocessing includes denoising, correction, segmentation and sharpening processing steps;
[0123] A soil identification unit, used for performing soil identification on the pre-processed crop growth image data using image recognition technology to obtain a soil identification result;
[0124] The crop recognition unit is used to use image recognition technology to perform crop plant canopy recognition on the preprocessed crop growth image data, and then complete plant unit recognition to obtain a plant unit recognition result;
[0125] A spacing calculation unit, used for calculating the plant spacing according to the soil identification result and the plant unit identification result;
[0126] The planting density acquisition unit is used to obtain the planting density data of the crop according to the plant spacing.
[0127] In some implementations, establishing module 203 includes:
[0128] A preprocessing unit, used for preprocessing environmental data, planting density data and growth data; the preprocessing steps include vectorization and scale standardization;
[0129] The data set construction unit is used to construct a multivariate data set according to the preprocessed environmental data, planting density data and growth data.
[0130] In some implementations, the construction module 204 may also be used to:
[0131] The feature selection technology is used to evaluate the importance of feature values in multivariate data sets, obtain the importance scores of feature values, and optimize the planting density decision model according to the importance scores of feature values;
[0132] Regularization technology is used to add penalty terms to the loss function, and the planting density decision model is optimized based on the penalty terms.
[0133] Cross-validation technology is used to segment the multivariate data set, perform cyclic training and validation, and optimize the planting density decision model.
[0134] In some embodiments, the multiple environmental parameters include temperature, humidity, precipitation, and light intensity; the multiple soil parameters include soil moisture, pH value, and nutrient content; and the multiple growth indicator parameters include leaf area index, plant height, and ear length.
[0135] Since the crop planting density decision device 200 adopts all the technical solutions of the crop planting density decision method of the above-mentioned embodiment, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiment, which will not be described in detail here.
[0136] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0137] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0138] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0139] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0140] In some embodiments, the memory 302 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0141] The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement any one of the crop planting density decision methods in the above embodiments.
[0142] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 3As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0143] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0144] Bus 310 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0145] The electronic device can execute the crop planting density decision method in the embodiment of the present application, thereby realizing the combination of Figure 1 and Figure 2 A method and device for determining the planting density of crops are described.
[0146] In addition, in combination with the crop planting density decision method in the above embodiment, the present application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any crop planting density decision method in the above embodiment is implemented.
[0147] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0148] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0149] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0150] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0151] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for deciding crop planting density, characterized in that: include: Collecting crop growth image data and environmental data, wherein the crop growth image data includes field high-definition image data, and the environmental data includes a variety of environmental parameters monitored by a field weather station and a variety of soil parameters detected by a soil sensor; Analyzing the crop growth image data using image recognition technology to obtain crop planting density data and growth data, wherein the growth data includes a plurality of growth index parameters, each of which is used to characterize different development and yield conditions of the crop; Establishing a multivariate data set based on the environmental data, the planting density data and the growth potential data; Based on the random forest algorithm, a planting density decision model is constructed using the multivariate data set, wherein the planting density decision model is used to fit the nonlinear relationship among the planting density data, the multiple environmental parameters, the multiple soil parameters and the multiple growth index parameters, and based on the nonlinear relationship, the optimal planting density of the crop that can achieve the maximum expected yield under the conditions of the multiple environmental parameters and the multiple soil parameters is predicted; The target environmental data is collected and input into the random forest decision model to obtain the target optimal planting density of the crop.
2. The crop planting density decision method according to claim 1, characterized in that: The method of obtaining crop planting density data by image recognition technology based on the crop growth data comprises the following steps: Preprocessing steps of denoising, correcting, segmenting and sharpening the crop growth image data; Using image recognition technology to perform soil recognition on the preprocessed crop growth image data to obtain a soil recognition result; Using image recognition technology to perform crop plant canopy recognition on the preprocessed crop growth image data, and then complete plant unit recognition to obtain a plant unit recognition result; Calculating plant spacing according to the soil identification result and the plant unit identification result; The planting density data of the crop is obtained according to the plant spacing.
3. The crop planting density decision method according to claim 1, characterized in that: The step of establishing a multivariate data set based on the environmental data, the planting density data and the growth potential data comprises: A preprocessing step of vectorizing and scaling the environmental data, the planting density data, and the growth potential data; A multivariate data set is constructed based on the preprocessed environmental data, the planting density data and the growth potential data.
4. The crop planting density decision method according to claim 1, characterized in that: After constructing the planting density decision model by random forest algorithm according to the multivariate data training samples, the following steps are also included: Using feature selection technology to evaluate the importance of feature values in the multivariate data set, obtaining the importance scores of the feature values, and optimizing the planting density decision model according to the importance scores of the feature values; Adding a penalty term to the loss function using regularization technology, and optimizing the planting density decision model according to the penalty term; The multivariate data set is segmented, cyclically trained and validated using cross-validation technology to optimize the planting density decision model.
5. The crop planting density decision method according to claim 1, characterized in that: The multiple environmental parameters include temperature, humidity, precipitation, and light intensity; the multiple soil parameters include soil moisture, pH value, and nutrient content; and the multiple growth indicator parameters include leaf area index, plant height, and ear length.
6. A crop planting density decision-making device, characterized in that: include: A collection module, used to collect crop growth image data and environmental data, wherein the crop growth image data includes field high-definition image data, and the environmental data includes a variety of environmental parameters monitored by a field weather station and a variety of soil parameters detected by a soil sensor; An image recognition module is used to analyze the crop growth image data using image recognition technology to obtain crop planting density data and growth data, wherein the growth data includes a plurality of growth index parameters, each of which is used to characterize different development and yield conditions of the crop; An establishment module, used for establishing a multivariate data set according to the environmental data, the planting density data and the growth data; A construction module is used to construct a planting density decision model using the multivariate data set based on a random forest algorithm, wherein the planting density decision model is used to fit the nonlinear relationship among the planting density data, a plurality of the environmental parameters, a plurality of the soil parameters and a plurality of the growth index parameters, and to predict based on the nonlinear relationship the optimal planting density of the crop that can achieve the maximum expected yield under the conditions of the plurality of the environmental parameters and the plurality of the soil parameters; The decision module is used to collect target environmental data and input it into the random forest decision model to obtain the target optimal planting density of the crop.
7. The planting density optimization device according to claim 6, characterized in that: The image recognition module comprises: An image preprocessing unit, used for performing preprocessing steps of denoising, correcting, segmenting and sharpening the crop growth image data; A soil identification unit, used for performing soil identification on the pre-processed crop growth image data using image recognition technology to obtain a soil identification result; A crop identification unit, used to use image recognition technology to perform crop plant canopy identification on the preprocessed crop growth image data, and then complete plant unit identification to obtain a plant unit identification result; A spacing calculation unit, used for calculating the plant spacing according to the soil identification result and the plant unit identification result; The planting density acquisition unit is used to acquire the planting density data of the crop according to the plant spacing.
8. The crop planting density decision-making device according to claim 6, characterized in that: The establishment module comprises: A preprocessing unit, used for preprocessing steps of vectorizing and scaling the environmental data, the planting density data and the growth potential data; The data set construction unit is used to construct a multivariate data set according to the pre-processed environmental data, the planting density data and the growth data.
9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the crop planting density decision method as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the crop planting density decision method as described in any one of claims 1 to 5.