Crop fertilization amount prediction method and device based on deep learning
Through deep learning-based methods, crop growth data are divided and processed, missing data is filled, abnormal data is eliminated, and deep neural network model is constructed, which solves the problem of inaccurate prediction of crop fertilizer volume in traditional methods and achieves precise fertilization.
Patent Information
- Application Number
- CN202510411852.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Traditional methods have difficulty accurately predicting the amount of fertilizer required for crops at different growth stages based on historical data.
Using a deep learning-based method, by dividing the soil nutrient and climatic conditions data sets, filling in missing data, removing abnormal data, and constructing a deep neural network model to predict the amount of fertilizer applied.
It improves the accuracy and pertinence of the prediction of fertilizer application volume, and avoids the waste of fertilizer caused by blind fertilization.
Smart Images

Figure CN120256873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crop fertilization, and specifically, to a method and device for predicting crop fertilization amount based on deep learning. Background Art
[0002] With the advancement of the agricultural modernization process, a vast amount of data resources have been accumulated in the agricultural field. The wide application of sensor technology makes it possible to monitor in real time soil fertility indicators (such as pH value, organic matter, nitrogen, phosphorus, and potassium content, etc.), meteorological conditions (temperature, precipitation, sunlight, etc.), and crop growth conditions (plant height, leaf area, biomass, etc.);
[0003] At the same time, long-term agricultural planting records also preserve rich historical data, including fertilization information and crop yield data for different years and different plots, etc. A large amount of data provides a basis for more scientific fertilization decisions. However, traditional data analysis methods are difficult to fully explore the complex internal connections and rules therein, and thus cannot predict the fertilization amount required by crops at different growth stages. In view of this, we propose a method and device for predicting crop fertilization amount based on deep learning. Summary of the Invention
[0004] The purpose of the present invention is to solve the problem that the fertilization amount of crops cannot be predicted based on historical data.
[0005] To achieve the above purpose, the present invention provides a method for predicting crop fertilization amount based on deep learning, including the following method steps:
[0006] S1. Divide the data corresponding to soil nutrient content and climate conditions into multiple historical data sets according to different growth stages, and traverse each historical data in the multiple historical data sets to check for missing data in the historical data sets;
[0007] S2. Call out the historical data set corresponding to the missing data, define it as the missing data set, and then sequentially remove the missing data existing in the multiple complete historical data, and define it as the removed data set;
[0008] Calculate multiple cosine similarities between the data in the missing data set and the removed data set, the average cosine similarity of the multiple cosine similarities, call out the removed data set with the largest average cosine similarity to the missing data set, and fill in the missing data in the missing data set;
[0009] S3. When calculating multiple cosine similarities between the missing data set and the corresponding data in the excluded data set, calculate the average cosine similarity between multiple cosine similarities in an increasing manner, and set an abnormal data judgment threshold. If the cosine similarity between two data in the missing data set and the excluded data set > the abnormal data judgment threshold, then judge the two data as abnormal data, exclude the abnormal data as missing data, and fill the missing data again;
[0010] S4. Calculate the cosine similarity Z between the end of the current growth stage and the previous soil data at the end, and the cosine similarity X between the end of the current growth stage and the soil data at the beginning of the next growth stage. If Z > X, adjust the soil data at the end of the current growth stage to the next growth stage;
[0011] S5. Normalize the historical data set after filling the missing data for different growth stages, and construct a deep neural network model through the normalized historical data set;
[0012] As a further improvement of this technical solution, the historical data set is divided by different growth stages, and all data corresponding to soil nutrient content, climate conditions, and growth stages are listed one by one, and classified and summarized according to different growth stages to form historical data sets containing soil nutrient content and climate conditions.
[0013] As a further improvement of this technical solution, the steps to check for missing data in the historical data set are as follows:
[0014] Sort out the historical data set to find out the number of historical data sets and the number of data contained in the historical data;
[0015] Define a judgment function and set a judgment logic. If the data in the historical data conforms to the judgment logic, then judge that the data is not missing; if it does not conform to the judgment logic, then judge that the data is missing;
[0016] Traverse multiple historical data sets and judge one by one.
[0017] As a further improvement of this technical solution, for the similarity between the missing data set and the excluded data set, regard the missing data set and the excluded data set as vectors composed of multiple data, and calculate the cosine similarity to judge the similarity in direction between the two data sets. The specific calculation steps are as follows:
[0018] Missing data set D miss The corresponding data set is expressed as {X1, X2,, X j}, where X j is the data corresponding to the jth record;
[0019] Excluded data set The corresponding data set is represented as {Y1, Y2,..., Y j}, where Y j is the data corresponding to the j-th record;
[0020] X j and Y j The cosine similarity between them is:
[0021] where n miss is the number of data records in the missing data set D miss , is the number of data records in the i-th eliminated data set , k trim represents the number of data items in each record in the eliminated data set , x jl represents the l-th data in the data x j , y jl represents the l-th data in the data y j ;
[0022] Co sin eSimilarity(X j , Y j ) is to calculate the cosine similarity between X j and Y j ;
[0023] The average cosine similarity between the missing data set and the eliminated data set is:
[0024]
[0025] where is to calculate the average cosine similarity between the missing data set and the i-th eliminated data set.
[0026] As a further improvement of this technical solution, the process of filling the missing data in the missing data set specifically includes:
[0027] Traverse all the eliminated data sets after eliminating the complete historical data sets, calculate the similarity between the missing data set and the eliminated data sets, and select the eliminated data set with the maximum similarity;
[0028] The eliminated data set with the maximum similarity is the closest to the missing data set in terms of data characteristics, distribution rules, etc., and is most suitable for filling the missing data;
[0029] The eliminated data in the eliminated data set is the missing data in the missing data set, and there are multiple eliminated data. Fill the missing data according to the mean value of the multiple eliminated data.
[0030] As a further improvement of this technical solution, the steps for setting the abnormal data judgment threshold are as follows:
[0031] Calculate the cosine similarity CosineSimilarity(X1, Y1) between X1 and Y1, and the cosine similarity CosineSimilarity(X2, Y2) between X2 and Y2;
[0032] Calculate the average cosine similarity CosineSimilarity(D1, D1) between the latter two cosine similarities, and set it as the abnormal data judgment threshold CosineSimilarity(D1, D1);
[0033] Calculate the cosine similarity CosineSimilarity(X3, Y3) between X3 and Y3;
[0034] If CosineSimilarity(X3, Y3) < CosineSimilarity(D1, D1), it is determined that the data corresponding to X3 and Y3 is normal. At this time, set the abnormal data judgment threshold as the average cosine similarity CosineSimilarity(D2, D2) from X1 and Y1 to X3 and Y3, until X j and Y j The corresponding data is compared with the abnormal data judgment threshold CosineSimilarity(D j-1 , D j-1 ) and the comparison is completed;
[0035] If CosineSimilarity(X j , Y j ) > CosineSimilarity(D j-1 , D j-1 ), it is determined that the data corresponding to X j and Y j is abnormal data.
[0036] As a further improvement of this technical solution, the steps for normalizing historical data are as follows:
[0037] Mine the minimum and maximum values of soil nutrient content, climate conditions, and growth stages in historical data;
[0038] Map the soil nutrient content, climate conditions, and growth stages to the [0, 1] interval.
[0039] As a further improvement of this technical solution, the working process of constructing the deep neural network model is as follows:
[0040] The working principle of the crop fertilization amount prediction method based on deep learning is mainly to construct a deep neural network model to learn the complex mapping relationship between a large amount of crop growth data, soil data, meteorological data, etc. and the fertilization amount, so as to achieve accurate prediction of the fertilization amount;
[0041] The input layer receives the data corresponding to the soil nutrient content, meteorological data, and growth stage in the historical data set. After the data is weighted and summed, it is passed to the hidden layer. The neurons in the hidden layer perform non-linear transformation on the input data through the activation function to enhance the expression ability of the model. After being processed by multiple hidden layers, the output layer finally outputs the predicted fertilization amount.
[0042] The crop fertilization amount prediction device based on deep learning includes a crop data division module, a missing data filling module, an abnormal data elimination module, a data division adjustment module, and a deep neural network model construction module;
[0043] The crop data division module is used to divide the data corresponding to the soil nutrient content and climate conditions into historical data sets according to the growth stage;
[0044] The missing data filling module calculates the data set with the largest cosine similarity to the missing data set and fills the missing data;
[0045] The abnormal data elimination module is used to set an abnormal data judgment threshold during the calculation of the cosine similarity, then identify the abnormal data in the historical data, eliminate the abnormal data, and then fill the eliminated historical data set;
[0046] The data division adjustment module adjusts the growth stage of the data in the historical data set according to the cosine similarity between the end and the start of adjacent historical data sets;
[0047] The deep neural network model construction module constructs a deep neural network model based on multiple historical data sets to predict the fertilization amount required for crops at different growth stages.
[0048] Compared with the prior art, the beneficial effects of the present invention are:
[0049] In the crop fertilization amount prediction method and device based on deep learning, the data corresponding to the soil nutrient content and climate conditions are divided into data sets according to the growth stage, the missing data is filled through the average cosine similarity between the data sets, and the abnormal data judgment threshold is set through the average cosine similarity to judge the abnormal data in the data set. The abnormal data is adjusted by filling the missing data, and the abnormal data judgment threshold is set by means of the average cosine similarity, so as to judge and adjust the abnormal data, eliminate the interference of data that does not conform to the actual law in the historical data set, and make the data participating in the subsequent analysis and modeling more real and reliable;
[0050] In the process of calculating the cosine similarity between data, according to the cosine similarity of adjacent growth stages and the changing trend of crop growth, analyze whether the growth stage division is correct and adjust it. For example, when the changes in soil nutrients and climatic conditions during the transition of some stages do not conform to the growth law of crops, and then optimize and adjust the growth stage division. Precise growth stage division helps to analyze the needs of crops in each stage more in line with the actual situation, improve the pertinence of fertilizer application amount prediction. Then, normalize the data in the historical data set and different growth stages, and explore the complex relationship between soil nutrient content, climatic conditions and crop fertilizer application amount requirements to construct a deep neural network model, so as to more accurately predict the fertilizer application amount required by crops in different growth stages. Precise prediction of the fertilizer application amount in different growth stages enables farmers or agricultural producers to perform precise fertilization operations according to the actual situation and avoid waste of fertilizers caused by blind fertilization. Brief Description of the Drawings
[0051] Figure 1 It is a schematic diagram of the overall method flow of the present invention
[0052] Figure 2 It is a schematic diagram of the overall module of the present invention.
[0053] The meanings of each label in the figure are as follows:
[0054] 100, Crop data division module; 200, Missing data filling module; 300, Abnormal data elimination module; 400, Data division adjustment module; 500, Deep neural network model construction module. Detailed Embodiments
[0055] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0056] The terms in the exemplary embodiments shown in the drawings are not limiting to the present invention. In the drawings, the same unit / element uses the same reference numeral.
[0057] Unless otherwise determined, the terms used herein, including technical terms, have the ordinary meaning understood by those skilled in the art in the technical field. In addition, it can be understood that the terms defined in the commonly used dictionary should be understood as having a meaning consistent with the context of its related field, and should not be understood as idealized or overly formal meanings.
[0058] The following are the definitions of some terms:
[0059] Soil nutrient content: content data of specific elements such as nitrogen, phosphorus, potassium, etc.;
[0060] Climatic conditions: quantitative data such as average temperature, precipitation, etc.;
[0061] Historical yield: yield data of past harvest seasons;
[0062] Growth stages of crops: sowing stage, seedling stage, jointing stage, booting stage, heading stage, filling stage, and maturity stage, etc.;
[0063] A method for predicting the fertilization amount of crops based on deep learning, including the following method steps:
[0064] S1. Divide the data corresponding to the soil nutrient content and climatic conditions into multiple historical data sets according to different growth stages, and traverse each historical data in the multiple historical data sets to check for missing data in the historical data sets;
[0065] S2. Call out the historical data set corresponding to the missing data, define it as the missing data set, and then sequentially remove the missing data existing in the multiple complete historical data, and define it as the removed data set;
[0066] Calculate multiple cosine similarities between the data in the missing data set and the removed data set, the average cosine similarity of the multiple cosine similarities, call out the removed data set with the largest average cosine similarity to the missing data set, and fill in the missing data in the missing data set;
[0067] When calculating multiple cosine similarities between the data in the missing data set and the removed data set, calculate the average cosine similarity between the multiple cosine similarities in an increasing manner, and set an abnormal data judgment threshold. If the cosine similarity between two data in the missing data set and the removed data set > the abnormal data judgment threshold, then judge the two data as abnormal data, remove the abnormal data as missing data, and fill in the missing data again;
[0068] S4. Calculate the cosine similarity Z between the end of the current growth stage and the soil data at the end of the previous stage, and the cosine similarity X between the end of the current growth stage and the soil data at the beginning of the next growth stage. If Z > X, adjust the soil data at the end of the current growth stage to the next growth stage;
[0069] The growth of crops is a continuous process, and the change of soil data should match the transition of growth stages. When Z > X, it means that the soil data at the end of the current growth stage is more similar to the data at the end of the previous stage, and is more different from the data at the beginning of the next stage, resulting in a mismatch between the growth stage division and the actual change of soil data. Then it is determined that the current crop growth stage corresponds to the soil data;
[0070] After adjustment, when the soil data can more reasonably correspond to the growth stage, reasonable data can be provided for the growth stage of crops.
[0071] S5. Normalize the historical data set after filling in the missing data for different growth stages, and construct a deep neural network model through the normalized historical data set.
[0072] The historical data set is divided by different growth stages, and all data corresponding to soil nutrient content, climate conditions, and growth stages are listed one by one, and classified and summarized according to different growth stages to form historical data sets containing soil nutrient content and climate conditions. The specific working principle is as follows:
[0073] The data corresponding to soil nutrient content and climate conditions is (S i , C j , G n ), where S i represents the i-th soil nutrient content record, and C j represents the j-th climate condition record;
[0074] The historical data set divided according to different growth stages is represented in the following way:
[0075] The soil nutrient content set S m (1 ≤ m ≤ n) for the growth stage G m , S m = {S i | G ijk = G m}, that is, S m contains all soil nutrient content records in the growth stage G m ;
[0076] The climate condition set C m for the growth stage G m , C m = {C i | G ijk = G m}, which contains all climate condition records of this growth stage.
[0077] The steps to check for missing data in the historical data set are as follows:
[0078] Sort out the historical data set to find out the number of historical data sets and the number of data contained in the historical data;
[0079] Define a judgment function and set the judgment logic. If the data in the historical data conforms to the judgment logic, it is judged that the data is not missing; if it does not conform to the judgment logic, it is determined that the data is missing;
[0080] Traverse multiple historical data sets and make judgments one by one;
[0081] The historical data sets m are respectively denoted as D1, D2, D3, …, D m , and each historical data set D i (i = 1, 2, …, m) contains n i historical data records, and each record contains multiple data items;
[0082] Define a judgment function I(x) to determine whether the data x is missing. If x is missing data, then I(x) = 1; if x is not missing data, then I(x) = 0.
[0083] The similarity between the missing data set and the excluded data set. Regard the missing data set and the excluded data set as vectors composed of multiple data, and calculate the cosine similarity to judge the similarity in direction between the two data sets. The specific calculation steps are as follows:
[0084] The corresponding data set of the missing data set D miss is expressed as {X1, X2, …, X j}, where X j is the data corresponding to the jth record;
[0085] The excluded data set The corresponding data set is expressed as {Y1, Y2, …, Y j}, where Y j is the data corresponding to the jth record;
[0086] The cosine similarity between X j and Y j is:
[0087] where, n miss is the number of data records in the missing data set D miss , is the number of data records in the ith excluded data set , k trim represents the number of data items in each record of the excluded data set , x jl represents the lth data in the data x j , y jl represents the lth data in the data y j ;
[0088] CosineSimilarity(X j , Y j ) is to calculate the cosine similarity between X j and Y jThe cosine similarity between them. Cosine similarity measures the similarity degree of two data sets in terms of direction, and its value ranges from -1 to 1. When the directions of two data sets are exactly the same, the cosine similarity is 1, indicating complete similarity; when the directions of two data sets are exactly opposite, the cosine similarity is -1; when two vectors are orthogonal, the cosine similarity is 0. In this scenario, it is used to measure the similarity degree between the corresponding record vectors in the missing data set and the excluded data set to judge the overall similarity of the two data sets.
[0089] The average cosine similarity between the missing data set and the excluded data set is:
[0090]
[0091] where is to calculate the average cosine similarity between the missing data set and the i-th excluded data set.
[0092] The process of filling the missing data in the missing data set specifically includes:
[0093] Traverse all the excluded data sets obtained after excluding from the complete historical data sets, calculate the similarity between the missing data set and the excluded data sets, and select the excluded data set with the maximum similarity.
[0094] The excluded data set with the maximum similarity is the closest to the missing data set in terms of data characteristics, distribution rules, etc., and is most suitable for filling the missing data.
[0095] The excluded data in the excluded data set is the missing data in the missing data set, and there are multiple excluded data. Fill the missing data according to the mean value of the multiple excluded data.
[0096] The calculation formula is as follows:
[0097] where arg max is an operation to find the index of the maximum value, traversing the p excluded data sets obtained after excluding from all the complete historical data sets For each calculate the average cosine similarity with the missing data set D miss Then find the index i that makes the average cosine similarity the largest The corresponding excluded data set max , is the data set with the maximum similarity to the missing data set; The excluded data set with the maximum similarity to the missing data set D
[0098] is D miss The excluded data set with the maximum similarity to the missing data set D t arg et is D t arg etThere are n data records, and for the missing data set D miss calculate the mean value of the missing data item x in D t arg et for x Fill it as the missing data in the missing data, and the calculation formula is as follows:
[0099] where x i is the value of the x data item of the i-th record in D t arg et
[0100] The steps to set the abnormal data judgment threshold are as follows:
[0101] Calculate the cosine similarity CosineSimilarity(X1,Y1) between X1 and Y1, and the cosine similarity CosineSimilarity(X2,Y2) between X2 and Y2;
[0102] Calculate the average cosine similarity CosineSimilarity(D1,D1) between the latter two cosine similarities, and set it as the abnormal data judgment threshold CosineSimilarity(D1,D1);
[0103] Calculate the cosine similarity CosineSimilarity(X3,Y3) between X3 and Y3;
[0104] If CosineSimilarity(X3,Y3) < CosineSimilarity(D1,D1), it is determined that the data corresponding to X3 and Y3 is normal. At this time, set the abnormal data judgment threshold as the average cosine similarity CosineSimilarity(D2,D2) from X1 and Y1 to X3 and Y3, until X j and Y j The corresponding data is compared with the abnormal data judgment threshold CosineSimilarity(D j-1 ,D j-1 ) and completed;
[0105] If CosineSimilarity(X j ,Y j ) > CosineSimilarity(D j-1 ,D j-1 ), it is determined that the data corresponding to X j and Y j is abnormal data.
[0106] The steps to normalize historical data are as follows:
[0107] Mining the minimum and maximum values of soil nutrient content, climate conditions, and growth stages in historical data;
[0108] Mapping soil nutrient content, climate conditions, and growth stages to the interval [0, 1];
[0109] The calculation formula for mapping:
[0110] where x is the original data of historical data, x min and x max are the minimum and maximum values of the original data in the historical data, and x new is the normalized data.
[0111] The steps to construct a deep neural network model are as follows:
[0112] The working principle of the deep learning-based crop fertilization amount prediction method is mainly to construct a deep neural network model to learn the complex mapping relationship between a large amount of crop growth data, soil data, meteorological data, etc. and the fertilization amount, so as to achieve accurate prediction of the fertilization amount;
[0113] The input layer receives the data corresponding to soil nutrient content, meteorological data, and growth stages in the historical data set. After weighted summation, the data is passed to the hidden layer. The neurons in the hidden layer perform non-linear transformation on the input data through the activation function to enhance the expression ability of the model. After processing by multiple hidden layers, the output layer finally outputs the predicted fertilization amount;
[0114] The input historical data set is x = (x1, x2, …, x n ), representing n different input features, specifically soil nutrient content, climate conditions, and historical yield;
[0115] x1 is the nitrogen content in the soil, x2 is the nitrogen content in the soil, m is the number of neurons in the hidden layer, and y is the predicted fertilization amount;
[0116] The output of the hidden layer neurons where w ij is the weight from the i-th input feature in the input layer to the j-th neuron in the hidden layer, which determines the magnitude of the influence of the corresponding input feature on this neuron. The initial value of the weight is randomly set; b j is the bias of the j-th neuron in the hidden layer, which plays a role in adjusting the activation threshold of the neuron; f is the activation function. The activation function can introduce non-linear factors into the neural network, enabling the network to fit complex non-linear relationships. f(x) = max(0, x), that is, when x > 0, it outputs x, and when x ≤ 0, it outputs 0;
[0117] The calculation formula for the output y of the output layer is: where wjy is the weight from the j-th neuron in the hidden layer to the output layer, and b y is the bias of the output layer, and g is the activation function of the output layer. For predicting the fertilization amount, the linear activation function g(x) = x is used, that is, the result of weighted summation is directly output as the final predicted fertilization amount.
[0118] A device for predicting the fertilization amount of crops based on deep learning, including a crop data division module 100, a missing data filling module 200, an abnormal data elimination module 300, a data division adjustment module 400, and a deep neural network model construction module 500;
[0119] The crop data division module 100 is used to divide the corresponding data of soil nutrient content and climate conditions into a historical data set according to the growth stage;
[0120] The missing data filling module 200 calculates the data set with the maximum cosine similarity to the missing data set and fills the missing data;
[0121] The abnormal data elimination module 300 is used to set an abnormal data judgment threshold during the calculation of cosine similarity, then identify the abnormal data in the historical data, eliminate the abnormal data, and then fill the eliminated historical data set;
[0122] The data division adjustment module 400 adjusts the growth stage of the data in the historical data set according to the cosine similarity between the end and the start of adjacent historical data sets;
[0123] The deep neural network model construction module 500 constructs a deep neural network model based on multiple historical data sets to predict the fertilization amount required for crops at different growth stages.
[0124] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art of this industry should understand that the present invention is not limited by the above embodiments. The above embodiments and the descriptions in the specification are only preferred examples of the present invention and are not used to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for predicting the fertilization amount of crops based on deep learning, characterized in that, It includes the following method steps: S1. Divide the data corresponding to soil nutrient content and climate conditions into multiple historical data sets according to different growth stages, and traverse each historical data in the multiple historical data sets to check for missing data in the historical data sets; S2. Call out the historical data set corresponding to the missing data, define it as the missing data set, and then sequentially remove the missing data existing in the multiple complete historical data, and define it as the removed data set; Calculate multiple cosine similarities between the data in the missing data set and the removed data set, the average cosine similarity of the multiple cosine similarities, call out the removed data set with the largest average cosine similarity to the missing data set, and fill in the missing data in the missing data set; S4. When calculating multiple cosine similarities between the data in the missing data set and the removed data set, calculate the average cosine similarity between the multiple cosine similarities in an increasing manner, and set an abnormal data judgment threshold. If the cosine similarity between two data in the missing data set and the removed data set > the abnormal data judgment threshold, then judge the two data as abnormal data, remove the abnormal data as missing data, and fill in the missing data again; S5. Calculate the cosine similarity Z between the end of the current growth stage and the previous soil data at the end, and the cosine similarity X between the end of the current growth stage and the soil data at the beginning of the next growth stage. If Z > X, adjust the soil data at the end of the current growth stage to the next growth stage; S6. Normalize the historical data sets after filling in the missing data for different growth stages, and construct a deep neural network model through the normalized historical data sets.
2. The method for predicting the fertilization amount of crops based on deep learning according to claim 1, wherein: The historical data sets are divided by different growth stages, list all the data corresponding to soil nutrient content, climate conditions and growth stages one by one, and classify and summarize them according to different growth stages to form historical data sets containing soil nutrient content and climate conditions.
3. The method for predicting the fertilization amount of crops based on deep learning according to claim 2, characterized in that: The steps for checking for missing data in the historical data sets are as follows: Sort out the historical data sets, and sort out the number of historical data sets and the number of data included in the historical data; Define a judgment function, set a judgment logic. If the data in the historical data conforms to the judgment logic, then judge that the data is not missing. If it does not conform to the judgment logic, then determine that the data is missing; Traverse multiple historical data sets and judge one by one.
4. The method for predicting the fertilization amount of crops based on deep learning according to claim 3, wherein: Regarding the similarity between the missing data set and the removed data set, regard the missing data set and the removed data set as vectors composed of multiple data, calculate the cosine similarity to judge the similarity in direction between the two data sets. The specific calculation steps are as follows: Missing data set D miss The corresponding data set is represented as {X1, X2,, X j}, where X j is the data corresponding to the j-th record; Eliminate data sets The corresponding data set is represented as {Y1, Y2, Y j }, where Y j is the data corresponding to the jth record; X j and Y j The cosine similarity between them is: Among them, n miss is the number of data records in the missing data set D miss , is the number of data records in the i-th excluded data set , k trim represents the number of data items in each record of the excluded data set , x jl represents the l-th data in the data x j , y jl represents the l-th data in the data y j ; CosineSimilarity(X j ,Y j ) calculates the cosine similarity between X j and Y j ; The average cosine similarity between the missing data set and the removed data set is: where is to calculate the average cosine similarity between the missing data set and the i-th excluded data set.
5. The method for predicting the fertilization amount of crops based on deep learning according to claim 4, characterized in that: The process of filling in the missing data in the missing data set specifically includes: Traverse the removed data sets after removing all the complete historical data sets, calculate the similarity between the missing data set and the removed data sets, and call out the removed data set with the largest similarity; The removed data set with the largest similarity is the closest to the missing data set in terms of data characteristics, distribution rules, etc., and is most suitable for filling in the missing data; The data excluded from the data set are the missing data in the missing data set, and there are multiple excluded data. The missing data are filled according to the mean of the multiple excluded data.
6. The method for predicting the fertilization amount of crops based on deep learning according to claim 4, characterized in that: The steps of setting the abnormal data judgment threshold are as follows: Calculate the cosine similarity CosineSimilarity(X1, Y1) between X1 and Y1, and the cosine similarity CosineSimilarity(X2, Y2) between X2 and Y2; Calculate the average cosine similarity CosineSimilarity(D1, D1) between the latter two cosine similarities, and set it as the abnormal data judgment threshold CosineSimilarity(D1, D1); Calculate the cosine similarity CosineSimilarity(X3, Y3) between X3 and Y3; If CosineSimilarity(X3, Y3) < CosineSimilarity(D1, D1), it is determined that the data corresponding to X3 and Y3 is normal. At this time, the abnormal data judgment threshold is set to the average cosine similarity CosineSimilarity(D2, D2) from X1 and Y1 to X3 and Y3, until X j and Y j The data corresponding to is compared with the abnormal data judgment threshold CosineSimilarity(D j-1 , D j-1 ) is completed; If CosineSimilarity(X j ,Y j ) > CosineSimilarity(D j-1 ,D j-1 ), then it is determined that the data corresponding to X j and Y j is abnormal data.
7. The method for predicting the fertilization amount of crops based on deep learning according to claim 6, wherein: The steps of normalizing historical data are as follows: Mine the minimum and maximum values of soil nutrient content, climate conditions, and growth stages in historical data; Map the soil nutrient content, climate conditions, and growth stages to the interval [0, 1].
8. The method for predicting the fertilization amount of crops based on deep learning according to claim 7, wherein: The working process of constructing the deep neural network model is as follows: The working principle of the deep learning-based crop fertilization amount prediction method is mainly to construct a deep neural network model to learn the complex mapping relationship between a large amount of crop growth data, soil data, meteorological data, etc. and the fertilization amount, so as to achieve accurate prediction of the fertilization amount; The input layer receives the data corresponding to the soil nutrient content, meteorological data, and growth stage in the historical data set. After the data are weighted and summed, they are passed to the hidden layer. The neurons in the hidden layer perform non-linear transformation on the input data through the activation function to enhance the expression ability of the model. After being processed by multiple hidden layers, the output layer finally outputs the predicted fertilization amount.
9. A method for predicting the fertilization amount of crops based on deep learning, which is applied to the device for predicting the fertilization amount of crops based on deep learning described in any one of claims 1-8, characterized in that, It includes a crop data division module (100), a missing data filling module (200), an abnormal data exclusion module (300), a data division adjustment module (400), and a deep neural network model construction module (500); The crop data division module (100) is used to divide the data corresponding to the soil nutrient content and climate conditions into a historical data set according to the growth stage; The missing data filling module (200) calculates the data set with the largest cosine similarity to the missing data set and fills the missing data; The abnormal data exclusion module (300) is used to set an abnormal data judgment threshold during the calculation of the cosine similarity, then identify the abnormal data in the historical data, exclude the abnormal data, and then fill the excluded historical data set through (200); The data division adjustment module (400) adjusts the growth stage of the data in the historical data set according to the cosine similarity between the end and the start of adjacent historical data sets; The deep neural network model construction module (500) constructs a deep neural network model based on multiple historical data sets to predict the fertilization amount required for crops at different growth stages.
Citation Information
Patent Citations
Risk prediction method based on operation log
CN117972596A
Crop disease risk assessment method and device
CN119169611A
Internal threat detection method based on hypergraph representation learning
CN119312321A
Crop growth period big data analysis and fertilizer optimization method and device
CN119514807A
Flexible imputation of missing data
US20210182602A1
Cited By
Crop whole growth period nutrient demand prediction method based on multi-source data fusion
CN121365365A
A crop whole growth period nutrient requirement prediction method based on multi-source data fusion
CN121365365B