Method and system for acquiring types of crops suitable for being planted in soil based on artificial intelligence
Through the soil data processing and classification model based on artificial intelligence, the problems of inefficiency and poor accuracy of traditional planting methods are solved, and the rapid and accurate acquisition of suitable crop species for soil cultivation is achieved, and the efficiency and accuracy of planting decisions are improved.
Patent Information
- Application Number
- CN202411252214.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional crop planting species selection methods rely on manual experience, are inefficient and have poor accuracy, making it difficult to quickly and accurately obtain suitable crop planting species with soil.
Using an artificial intelligence-based method, the soil fertility index and climate data are obtained, and the soil fertility index is standardized using classification models (such as decision trees, random forests, support vector machines, neural networks, etc.) to calculate the soil fertility index. , and adjust model parameters through cross-validation and grid search to predict suitable crop species for soil.
Improves the efficiency and accuracy of obtaining suitable crop species for soil cultivation, providing an automated and data-driven solution that enables faster acquisition of accurate planting recommendations.
Smart Images

Figure CN119128387A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more specifically to a method and system for obtaining soil types suitable for planting crops based on artificial intelligence. Background Art
[0002] At present, with the continuous growth of the world's population, the efficiency and intelligence level of agricultural production are receiving more and more attention. The traditional method of selecting crop varieties mainly relies on manual experience and observation, which has the problems of low efficiency and poor accuracy.
[0003] Therefore, how to provide a method and system for obtaining soil suitable for growing crops, which can improve the efficiency and accuracy of obtaining soil suitable for growing crops, is an urgent problem that technicians in this field need to solve. Summary of the invention
[0004] In view of this, the object of the present invention is to provide a method and system for obtaining soil suitable for planting crop types based on artificial intelligence.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A method for obtaining soil suitable for planting crops based on artificial intelligence, comprising the following steps:
[0007] Obtain pH value, soil fertility index and climate data of selected soils;
[0008] The pH value, soil fertility index and climate data of the selected soil are standardized and input into the trained classification model to obtain the types of crops suitable for planting in the selected soil; wherein the climate data includes the average annual temperature, the average annual water volume and the duration of sunshine.
[0009] Preferably, the calculation formula of the soil fertility index is:
[0010]
[0011] Where SFI stands for soil fertility index; x i represents the i-th index involved in calculating the soil fertility index; w i represents the weight of the ith indicator; n represents the number of indicators involved in the calculation of the soil fertility index; the indicators involved in the calculation of the soil fertility index include the standardized pH value, organic matter content, nitrogen content, phosphorus content and potassium content.
[0012] Preferably, the classification model is a decision tree, random forest, support vector machine, neural network, gradient boosting machine or XGBoost.
[0013] Preferably, the trained classification model is obtained based on the following steps:
[0014] Obtaining pH values, soil fertility indexes and climate data of different soils in different regions, and then performing data preprocessing; the data preprocessing includes removing outliers, deleting missing values and filling missing values;
[0015] The pre-processed pH value, soil fertility index and climate data were standardized;
[0016] A data set is constructed based on the standardized pH value, soil fertility index and climate data; wherein a set of standardized pH value, soil fertility index and climate data is used as an input of the classification model, and the corresponding suitable crop species are used as the output of the classification model;
[0017] Divide the dataset into training and testing sets;
[0018] Use the training set to train the classification model;
[0019] Use cross-validation and grid search to adjust classification model parameters;
[0020] The test set is used to evaluate the classification model after parameter adjustment to obtain a trained classification model; the evaluation indicators include accuracy, recall rate and F1 score.
[0021] Preferably, the formula for the normalization process adopts a minimum-maximum normalization formula or a Z-Score normalization formula;
[0022] The min-max normalization formula is:
[0023]
[0024] Among them, x norm represents the data after minimum-maximum standardization; x represents the data to be standardized; x min Indicates the minimum value; x max Indicates the maximum value;
[0025] The Z-Score normalization formula is:
[0026]
[0027] Among them, x represents the data to be standardized; z represents the data after Z-Score standardization, μ represents the mean, and σ represents the standard deviation.
[0028] A system for obtaining soil suitable for planting crops based on artificial intelligence, including a data acquisition unit, a standardization processing unit and a trained classification model;
[0029] The data acquisition unit is used to acquire the pH value, soil fertility index and climate data of the selected soil;
[0030] The standardization processing unit is used to perform standardization processing on the pH value, soil fertility index and climate data of the selected soil;
[0031] The trained classification model is used to output the types of crops suitable for planting on the selected soil based on the standardized pH value, soil fertility index and climate data; wherein the climate data includes the average annual temperature, the average annual water volume and the duration of sunshine.
[0032] Preferably, the above system further comprises a soil fertility index calculation unit;
[0033] The soil fertility index calculation unit is used to calculate the soil fertility index;
[0034] The soil fertility index is based on the following formula:
[0035]
[0036] Where SFI stands for soil fertility index; x i represents the i-th index involved in calculating the soil fertility index; w i represents the weight of the ith indicator; n represents the number of indicators involved in the calculation of the soil fertility index; the indicators involved in the calculation of the soil fertility index include the standardized pH value, organic matter content, nitrogen content, phosphorus content and potassium content.
[0037] Preferably, the above system further includes a model training unit:
[0038] The model training unit includes a data acquisition module, a preprocessing module, a standardization processing module, a data set construction module, a data set division module, a model training module, a parameter adjustment module and a model testing module;
[0039] The data acquisition module is used to obtain pH values, soil fertility index and climate data of different soils in different regions;
[0040] The preprocessing module is used to perform data preprocessing on the pH value, soil fertility index and climate data of different soils in different regions; wherein the data preprocessing includes removing outliers, deleting missing values and filling missing values;
[0041] The standardization processing module is used to perform standardization processing on the pre-processed pH value, soil fertility index and climate data;
[0042] The data set construction module is used to construct a data set based on the standardized pH value, soil fertility index and climate data; wherein a set of standardized pH value, soil fertility index and climate data is used as an input of the classification model, and the corresponding suitable crop species are used as the output of the classification model;
[0043] The data set division module is used to divide the data set into a training set and a test set;
[0044] The model training module is used to train the classification model using the training set;
[0045] The parameter adjustment module is used to adjust the classification model parameters by using cross-validation and grid search methods;
[0046] The model testing module is used to evaluate the classification model after parameter adjustment using the test set to obtain a trained classification model; wherein the evaluation indicators include accuracy, recall rate and F1 score.
[0047] Preferably, the standardization processing unit and the standardization processing module include a minimum-maximum standardization module or a Z-Score standardization module;
[0048] The minimum-maximum normalization module is used to perform minimum-maximum normalization on the data to be normalized; wherein the minimum-maximum normalization is implemented based on the following formula:
[0049]
[0050] Among them, x norm represents the data after minimum-maximum standardization; x represents the data to be standardized; x min Indicates the minimum value; x max Indicates the maximum value;
[0051] The Z-Score normalization module is used to perform Z-Score normalization on the data to be normalized; wherein the Z-Score normalization is implemented based on the following formula:
[0052]
[0053] Among them, x represents the data to be standardized; z represents the data after Z-Score standardization, μ represents the mean, and σ represents the standard deviation.
[0054] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for obtaining soil suitable for planting crop types based on artificial intelligence when executing the computer program.
[0055] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method and system for obtaining soil types suitable for growing crops based on artificial intelligence, which can improve the efficiency and accuracy of obtaining soil types suitable for growing crops. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0057] Figure 1 A flow chart of a method for obtaining soil suitable for planting crops based on artificial intelligence provided by the present invention;
[0058] Figure 2 A schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] like Figure 1 As shown, the embodiment of the present invention discloses a method for obtaining soil suitable for planting crops based on artificial intelligence, comprising the following steps:
[0061] Obtain pH value, soil fertility index and climate data of selected soils;
[0062] The pH value, soil fertility index and climate data of the selected soil are standardized and input into the trained classification model to obtain the types of crops suitable for planting in the selected soil; wherein the climate data includes the average annual temperature, the average annual water volume and the duration of sunshine.
[0063] It can be understood that: the selected soil includes topsoil and bottom soil;
[0064] The steps of obtaining the selected soil are:
[0065] Step 1: Use the depth indicator to set the desired soil collection depth.
[0066] Step 2: Choose a suitable drill bit for soil collection. Use a narrow-mouth drill bit for the topsoil and a wide-mouth drill bit for the bottomsoil.
[0067] Step 3: Transfer the collected soil sample into a built-in container, and seal the built-in container using a quick sealing machine.
[0068] Furthermore, the calculation formula of the soil fertility index is:
[0069]
[0070] Where SFI stands for soil fertility index; x i represents the i-th index involved in calculating the soil fertility index; w i represents the weight of the ith indicator; n represents the number of indicators involved in the calculation of the soil fertility index; the indicators involved in the calculation of the soil fertility index include the standardized pH value, organic matter content, nitrogen content, phosphorus content and potassium content.
[0071] It is understandable that:
[0072] 1) pH value determination: Use a pH meter or pH test paper for determination.
[0073] Specifically: the soil sample is mixed with deionized water in a certain ratio (usually a soil-water ratio of 1:2.5), shaken and allowed to stand, and then the pH value of the supernatant is measured.
[0074] 2) Determination of organic matter content: The commonly used method is potassium dichromate oxidation-external heating method.
[0075] Specifically: A certain amount of soil sample is mixed with potassium dichromate solution, heated, and the organic matter content is determined by colorimetry.
[0076] 3) Determination of nitrogen, phosphorus and potassium content:
[0077] Determination of nitrogen content: usually using the Kjeldahl method or the Dumas combustion method.
[0078] Determination of phosphorus content: using molybdenum blue colorimetry or ICP-OES (inductively coupled plasma optical emission spectroscopy).
[0079] Determination of potassium content: usually determined by ICP-OES or other atomic spectrometry.
[0080] Assume that the three indicators of organic matter content, phosphorus content and potassium content are selected to calculate the soil fertility index, and the weights and standardized values corresponding to organic matter content, phosphorus content and potassium content are shown in the following table:
[0081] index <![CDATA[Weight wi > Normalized value xi Organic matter content 0.4 0.8 Phosphorus content 0.3 0.6 Potassium content 0.3 0.7
[0082] Then SFI is calculated as follows: SFI = 0.4 × 0.8 + 0.3 × 0.6 + 0.3 × 0.7 = 0.72
[0083] According to the predetermined fertility classification, 0.72 may be classified as "medium fertility".
[0084] It is understandable that the indicators involved in calculating the soil fertility index may also include calcium content, magnesium content, sulfur content, trace element content, soil texture, soil structure and soil bulk density.
[0085] Furthermore, the classification model is a decision tree, a random forest, a support vector machine, a neural network, a gradient boosting machine, or XGBoost.
[0086] The classification model can be selected based on factors such as the actual data set size, the number of features (i.e. the number of indicators involved in calculating the soil fertility index), etc.:
[0087] The following is a brief introduction to the characteristics and usage scenarios of the above classification model:
[0088] 1) Decision Tree
[0089] Features: A decision tree is a simple and intuitive model that classifies data through a series of questions.
[0090] Usage scenario: Suitable for processing data sets with clear classification rules. Decision trees are easy to understand but prone to overfitting.
[0091] 2) Random Forest
[0092] Features: Random forest is an integrated model consisting of multiple decision trees, each of which is trained based on a random subset of the data set.
[0093] Application scenarios: Applicable to most classification problems, especially when there are many features and there is a certain correlation between the features. Random forests have a certain resistance to overfitting.
[0094] 3) Support Vector Machine (SVM)
[0095] Features: SVM is a model based on the maximum margin principle, which can effectively process high-dimensional data.
[0096] Use scenarios: Suitable for small and medium-sized data sets, especially when the data feature dimension is high. SVM is also effective in dealing with nonlinear problems, but it requires the selection of a suitable kernel function.
[0097] 4) Neural Network
[0098] Features: A neural network is a computational model that mimics the structure and function of the human brain and consists of multiple layers of neurons.
[0099] Use scenarios: Suitable for large-scale data sets, especially when the data has complex intrinsic structures. Neural networks require a lot of data to train, and the training process can be time-consuming.
[0100] 5) Gradient Boosting Machine (GBM)
[0101] Features: GBM is an integrated method that minimizes the loss function by iteratively training decision trees.
[0102] Usage scenarios: Applicable to various classification problems, especially when high prediction accuracy is required.
[0103] 6)XGBoost (eXtreme Gradient Boosting)
[0104] Features: XGBoost is an efficient implementation of GBM, which provides regularization terms and parallel computing to improve the performance and speed of the model.
[0105] Application scenarios: Suitable for scenarios that require high accuracy and fast training. XGBoost has performed well in many machine learning competitions.
[0106] Furthermore, the trained classification model is obtained based on the following steps:
[0107] Obtaining pH values, soil fertility indexes and climate data of different soils in different regions, and then performing data preprocessing; the data preprocessing includes removing outliers, deleting missing values and filling missing values;
[0108] It can be understood that the different soils in different regions include topsoil and bottomsoil, and the way of obtaining them is consistent with the selected soil.
[0109] The data preprocessing specifically includes:
[0110] 1) Eliminate outliers: Eliminate outliers including abnormal pH values, abnormal soil fertility index and abnormal climate data; for pH values, exclude pH values outside the range of 0-14. For soil fertility index (SFI), check the data according to the preset range and exclude soil fertility index that is not within the preset range. For climate data (average annual temperature, average annual water volume and sunshine duration), exclude impossible climate data based on common sense of region and season.
[0111] 2) Delete missing values: If there are not many missing data, delete the missing data directly;
[0112] 3) Filling missing values: If there are a lot of missing data, use the mean, median, mode or interpolation methods based on other variables to fill the missing values.
[0113] The pre-processed pH value, soil fertility index and climate data were standardized;
[0114] A data set is constructed based on the standardized pH value, soil fertility index and climate data; wherein a set of standardized pH value, soil fertility index and climate data is used as an input of the classification model, and the corresponding suitable crop species are used as the output of the classification model;
[0115] Divide the dataset into training and testing sets;
[0116] It is understandable that when performing machine learning tasks, an important first step is to divide the dataset into a training set and a test set. According to industry practice, 70-80% of the data is usually used as a training set, and the remaining 20%-30% is used as a test set. This division allows the model to learn data patterns during training and evaluate its generalization ability (i.e., the model's ability to handle unseen data) in an independent test set.
[0117] This can be easily accomplished using the train_test_split function of the scikit-learn library.
[0118] The specific procedures are as follows:
[0119] ˋˋˋpython
[0120] from sklearn.model_selection import train_test_split
[0121] X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2,random_state=42)
[0122] ˋˋˋ
[0123] Among them, ˋXˋ represents the feature dataset, ˋyˋ represents the target variable. The ˋtest_sizeˋ parameter represents the proportion of the test set, and ˋrandom_stateˋ is used to initialize the random number generator to obtain repeatable results.
[0124] Use the training set to train the classification model;
[0125] It is understandable that once the dataset is split, the model can be trained using the training set data. Choosing the right model framework (such as linear regression, decision tree, random forest, or neural network, etc.) and the right model library (such as scikit-learn, PyTorch, TensorFlow, etc.) is crucial to the task.
[0126] Training a model typically involves the following procedures:
[0127] ```Python
[0128] from sklearn.linear_model import LogisticRegression
[0129] Select a model (here we use logistic regression as an example)
[0130] model = LogisticRegression()
[0131] Training the model
[0132] model.fit(X_train,y_train)
[0133] ```
[0134] Use cross-validation and grid search to adjust classification model parameters;
[0135] It is understood that the adjustment of model parameters is a key step to improve model performance. The present invention is implemented by cross-validation and grid search to find the best parameter combination. The present invention implements this function based on the `GridSearchCV` tool in scikit-learn.
[0136] The specific procedures are as follows:
[0137]
[0138] The test set is used to evaluate the classification model after parameter adjustment to obtain a trained classification model; the evaluation indicators include accuracy, recall rate and F1 score.
[0139] It is understandable that when adjustments are needed after model evaluation, the following ideas can be followed:
[0140] Feature Engineering: If the main problem with the model is due to poor feature selection, consider optimizing the features, perhaps adding or removing certain features, and try using more advanced feature selection methods such as Recursive Feature Elimination (RFE).
[0141] Model tuning: If feature engineering has reached the limit of optimization, you may need to adjust the parameters of the model itself or try a different model type. For example, switch from a tree-based model to a neural network model, or from a linear model to a nonlinear model.
[0142] Dataset Update: In extreme cases, increasing the amount of data is also an effective strategy, especially when the dataset is small or the categories are unbalanced.
[0143] Ensemble learning: Ensemble methods such as random forests and gradient boosted decision trees can improve overall performance by combining the predictions of multiple models.
[0144] Introduction of expert knowledge: Consider incorporating domain knowledge into model design, such as manual feature design, specific rule systems, etc.
[0145] It is understandable that after obtaining the trained classification model, the model will be deployed:
[0146] Model deployment specifically includes:
[0147] Deploy the trained classification model to actual applications.
[0148] Design UI: Developers can use front-end frameworks (such as React, Vue, Angular) to design user interfaces, through which users can input information such as soil pH, SFI, average annual temperature, average annual precipitation, and sunshine duration.
[0149] Interaction design: Ensure that the interface is responsive and can adapt to different device screens (such as mobile phones, tablets, and computers).
[0150] Integrated API: The front-end interface needs to interact with the back-end API, which can be achieved through AJAX or other HTTP request methods.
[0151] Deployment and testing:
[0152] Deploy the API to a server (local or cloud server).
[0153] Use automated testing frameworks (such as pytest, Jest, etc.) to perform API testing to ensure the prediction accuracy of the model, performance stability, and correct response of the API.
[0154] Conduct user experience testing, collect feedback and make iterative improvements.
[0155] Furthermore, the formula for the normalization process adopts a minimum-maximum normalization formula or a Z-Score normalization formula;
[0156] The min-max normalization formula is:
[0157]
[0158] Among them, x norm represents the data after minimum-maximum standardization; x represents the data to be standardized; x min Indicates the minimum value; x max Indicates the maximum value;
[0159] The Z-Score normalization formula is:
[0160]
[0161] Among them, x represents the data to be standardized; z represents the data after Z-Score standardization, μ represents the mean, and σ represents the standard deviation.
[0162] The embodiment of the present invention discloses a system for obtaining soil suitable for planting crops based on artificial intelligence, including a data acquisition unit, a standardization processing unit and a trained classification model;
[0163] The data acquisition unit is used to acquire the pH value, soil fertility index and climate data of the selected soil;
[0164] The standardization processing unit is used to perform standardization processing on the pH value, soil fertility index and climate data of the selected soil;
[0165] The trained classification model is used to output the types of crops suitable for planting on the selected soil based on the standardized pH value, soil fertility index and climate data; wherein the climate data includes the average annual temperature, the average annual water volume and the duration of sunshine.
[0166] Furthermore, the classification model is a decision tree, a random forest, a support vector machine, a neural network, a gradient boosting machine, or XGBoost.
[0167] Furthermore, the above system also includes a soil fertility index calculation unit;
[0168] The soil fertility index calculation unit is used to calculate the soil fertility index;
[0169] The soil fertility index is based on the following formula:
[0170]
[0171] Where SFI stands for soil fertility index; x i represents the i-th index involved in calculating the soil fertility index; w irepresents the weight of the ith indicator; n represents the number of indicators involved in the calculation of the soil fertility index; the indicators involved in the calculation of the soil fertility index include the standardized pH value, organic matter content, nitrogen content, phosphorus content and potassium content.
[0172] Furthermore, the above system also includes a model training unit:
[0173] The model training unit includes a data acquisition module, a preprocessing module, a standardization processing module, a data set construction module, a data set division module, a model training module, a parameter adjustment module and a model testing module;
[0174] The data acquisition module is used to obtain pH values, soil fertility index and climate data of different soils in different regions;
[0175] The preprocessing module is used to perform data preprocessing on the pH value, soil fertility index and climate data of different soils in different regions; wherein the data preprocessing includes removing outliers, deleting missing values and filling missing values;
[0176] The standardization processing module is used to perform standardization processing on the pre-processed pH value, soil fertility index and climate data;
[0177] The data set construction module is used to construct a data set based on the standardized pH value, soil fertility index and climate data; wherein a set of standardized pH value, soil fertility index and climate data is used as an input of the classification model, and the corresponding suitable crop species are used as the output of the classification model;
[0178] The data set division module is used to divide the data set into a training set and a test set;
[0179] The model training module is used to train the classification model using the training set;
[0180] The parameter adjustment module is used to adjust the classification model parameters by using cross-validation and grid search methods;
[0181] The model testing module is used to evaluate the classification model after parameter adjustment using the test set to obtain a trained classification model; wherein the evaluation indicators include accuracy, recall rate and F1 score.
[0182] Further, the standardization processing unit and the standardization processing module include a minimum-maximum standardization module or a Z-Score standardization module;
[0183] The minimum-maximum normalization module is used to perform minimum-maximum normalization on the data to be normalized; wherein the minimum-maximum normalization is implemented based on the following formula:
[0184]
[0185] Among them, x norm represents the data after minimum-maximum standardization; x represents the data to be standardized; x min Indicates the minimum value; x max Indicates the maximum value;
[0186] The Z-Score normalization module is used to perform Z-Score normalization on the data to be normalized; wherein the Z-Score normalization is implemented based on the following formula:
[0187]
[0188] Among them, x represents the data to be standardized; z represents the data after Z-Score standardization, μ represents the mean, and σ represents the standard deviation.
[0189] The embodiment of the present invention also discloses a physical structure diagram of an electronic device, such as Figure 2 As shown, the electronic device may include: a processor 201, a communication interface 202, a memory 203 and a communication bus 204, wherein the processor 201, the communication interface 202 and the memory 203 communicate with each other via the communication bus 204. The processor 201 may call the logic instructions in the memory 203 to execute the above-mentioned method for obtaining the types of crops suitable for planting in soil based on artificial intelligence.
[0190] In addition, the logic instructions in the above-mentioned memory 203 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0191] On the other hand, an embodiment of the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the above-mentioned method for obtaining soil suitable for planting crop types based on artificial intelligence.
[0192] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0193] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for obtaining soil suitable for planting crops based on artificial intelligence, characterized in that: The following steps are involved: Obtain pH value, soil fertility index and climate data of selected soils; The pH value, soil fertility index and climate data of the selected soil are standardized and input into the trained classification model to obtain the types of crops suitable for planting in the selected soil; wherein the climate data includes the average annual temperature, the average annual water volume and the duration of sunshine.
2. The method for obtaining soil suitable for planting crops based on artificial intelligence according to claim 1, characterized in that: The calculation formula of the soil fertility index is: Where SFI represents soil fertility index; x i represents the i-th index involved in calculating the soil fertility index; w i represents the weight of the ith indicator; n represents the number of indicators involved in the calculation of the soil fertility index; the indicators involved in the calculation of the soil fertility index include the standardized pH value, organic matter content, nitrogen content, phosphorus content and potassium content.
3. The method for obtaining soil suitable for planting crops based on artificial intelligence according to claim 1, characterized in that: The classification model is decision tree, random forest, support vector machine, neural network, gradient boosting machine or XGBoost.
4. A method for obtaining soil suitable for planting crops based on artificial intelligence according to any one of claims 1 to 3, characterized in that: The trained classification model is obtained based on the following steps: Obtaining pH values, soil fertility indexes and climate data of different soils in different regions, and then performing data preprocessing; the data preprocessing includes removing outliers, deleting missing values and filling missing values; The pre-processed pH value, soil fertility index and climate data were standardized; A data set is constructed based on the standardized pH value, soil fertility index and climate data; wherein a set of standardized pH value, soil fertility index and climate data is used as an input of the classification model, and the corresponding suitable crop species are used as the output of the classification model; Divide the dataset into training and testing sets; Use the training set to train the classification model; Use cross-validation and grid search to adjust classification model parameters; The test set is used to evaluate the classification model after parameter adjustment to obtain a trained classification model; the evaluation indicators include accuracy, recall rate and F1 score.
5. The method for obtaining soil suitable for planting crops based on artificial intelligence according to claim 4, characterized in that: The formula for standardization processing adopts the minimum-maximum standardization formula or the Z-Score standardization formula; The min-max normalization formula is: Among them, x norm represents the data after minimum-maximum standardization; x represents the data to be standardized; x min Indicates the minimum value; x max Indicates the maximum value; The Z-Score normalization formula is: Among them, x represents the data to be standardized; z represents the data after Z-Score standardization, μ represents the mean, and σ represents the standard deviation.
6. A system for obtaining soil suitable for planting crops based on artificial intelligence, characterized in that: It includes a data acquisition unit, a standardization processing unit and a trained classification model; The data acquisition unit is used to acquire the pH value, soil fertility index and climate data of the selected soil; The standardization processing unit is used to perform standardization processing on the pH value, soil fertility index and climate data of the selected soil; The trained classification model is used to output the types of crops suitable for planting on the selected soil based on the standardized pH value, soil fertility index and climate data; wherein the climate data includes the average annual temperature, the average annual water volume and the duration of sunshine.
7. The system for obtaining soil suitable for planting crops based on artificial intelligence according to claim 6 is characterized in that: It also includes a soil fertility index calculation unit; The soil fertility index calculation unit is used to calculate the soil fertility index; The soil fertility index is based on the following formula: Where SFI represents soil fertility index; x i represents the i-th index involved in calculating the soil fertility index; w i represents the weight of the ith indicator; n represents the number of indicators involved in the calculation of the soil fertility index; the indicators involved in the calculation of the soil fertility index include the standardized pH value, organic matter content, nitrogen content, phosphorus content and potassium content.
8. The system for obtaining soil suitable for planting crops based on artificial intelligence according to claim 6 or 7, characterized in that: Also includes model training unit: The model training unit includes a data acquisition module, a preprocessing module, a standardization processing module, a data set construction module, a data set division module, a model training module, a parameter adjustment module and a model testing module; The data acquisition module is used to obtain pH values, soil fertility index and climate data of different soils in different regions; The preprocessing module is used to perform data preprocessing on the pH value, soil fertility index and climate data of different soils in different regions; wherein the data preprocessing includes removing outliers, deleting missing values and filling missing values; The standardization processing module is used to perform standardization processing on the pre-processed pH value, soil fertility index and climate data; The data set construction module is used to construct a data set based on the standardized pH value, soil fertility index and climate data; wherein a set of standardized pH value, soil fertility index and climate data is used as an input of the classification model, and the corresponding suitable crop species are used as the output of the classification model; The data set division module is used to divide the data set into a training set and a test set; The model training module is used to train the classification model using the training set; The parameter adjustment module is used to adjust the classification model parameters by using cross-validation and grid search methods; The model testing module is used to evaluate the classification model after parameter adjustment using the test set to obtain a trained classification model; wherein the evaluation indicators include accuracy, recall rate and F1 score.
9. The system for obtaining soil suitable for planting crops based on artificial intelligence according to claim 8, characterized in that: The standardization processing unit and the standardization processing module include a minimum-maximum standardization module or a Z-Score standardization module; The minimum-maximum normalization module is used to perform minimum-maximum normalization on the data to be normalized; wherein the minimum-maximum normalization is implemented based on the following formula: Among them, x norm represents the data after minimum-maximum standardization; x represents the data to be standardized; x min Indicates the minimum value; x max Indicates the maximum value; The Z-Score normalization module is used to perform Z-Score normalization on the data to be normalized; wherein the Z-Score normalization is implemented based on the following formula: Among them, x represents the data to be standardized; z represents the data after Z-Score standardization, μ represents the mean, and σ represents the standard deviation.
10. 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 computer program, the method for obtaining soil suitable for planting crop types based on artificial intelligence as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
A suitability evaluation method for peanut planting
CN109272201A
Intelligent agricultural planting data monitoring method
CN113295208A
Cultivation-target crop selection assisting apparatus, cultivation-target crop selection assisting method, and computer-readable recording medium
US20210027397A1
Cited By
Ecological monitoring method and system for vegetation restoration of degraded grassland
CN119624691A
Soil breeding and planting evaluation method based on Internet of Things
CN119940735A
