CN116307266A - Crop growth prediction method, device, electronic equipment and storage medium - Google Patents

Crop growth prediction method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116307266A
CN116307266A CN202310539515.8A CN202310539515A CN116307266A CN 116307266 A CN116307266 A CN 116307266A CN 202310539515 A CN202310539515 A CN 202310539515A CN 116307266 A CN116307266 A CN 116307266A
Authority
CN
China
Prior art keywords
growth
prediction
crop
feature
predicted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310539515.8A
Other languages
Chinese (zh)
Inventor
陈飞勇
李政道
刘汝鹏
宋杨
肖冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Jianzhu University
Original Assignee
Shandong Jianzhu University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Jianzhu University filed Critical Shandong Jianzhu University
Priority to CN202310539515.8A priority Critical patent/CN116307266A/en
Publication of CN116307266A publication Critical patent/CN116307266A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Mining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/68Food, e.g. fruit or vegetables
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/10Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in agriculture

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Multimedia (AREA)
  • General Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Tourism & Hospitality (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Mining & Mineral Resources (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Animal Husbandry (AREA)
  • Agronomy & Crop Science (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a crop growth prediction method, a device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligent information processing, wherein the method comprises the following steps: acquiring multiple groups of growth factor data of crops to be predicted; inputting multiple groups of growth factor data into the feature extraction layer to obtain multiple growth feature vectors; determining at least one vector group in a plurality of growth feature vectors, inputting the at least one vector group into a feature combination layer, and respectively fusing the growth feature vectors in each vector group to obtain each combination feature vector; inputting the combined feature vector and the plurality of growth feature vectors into a self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights; and inputting the prediction characteristic vector into a prediction layer to obtain a growth prediction result of the crop to be predicted. The invention reduces the labor cost during crop growth prediction.

Description

Crop growth prediction method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of artificial intelligence information processing technologies, and in particular, to a crop growth prediction method, a device, an electronic apparatus, and a storage medium.
Background
In agricultural production, it is necessary to predict the growth demand of crops, and to prepare in advance planting materials such as fertilizers, pesticides, etc. required for crops to improve the yield and quality of crops.
In the prior art, most of the growth prediction of crops is performed by observing the growth condition of the crops in the field and combining the experience by leading professionals with abundant experience to the crop growth field, and the method for predicting the growth of the crops by relying on manpower consumes a great deal of labor cost.
Disclosure of Invention
The invention provides a crop growth prediction method, a device, electronic equipment and a storage medium, which aim to solve the defect that a great deal of labor cost is required to be consumed in crop growth prediction in the prior art, realize automatic prediction of crop growth and reduce the labor cost.
The invention provides a crop growth prediction method, which comprises the following steps:
acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
Inputting the multiple groups of growth factor data into a trained prediction model, and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer, wherein the multiple groups of growth factor data are input into a trained prediction model, and the growth prediction result of the crop to be predicted, which is output by the prediction model, is obtained, and the method comprises the following steps:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
And inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
According to the crop growth prediction method provided by the invention, at least one vector group is determined in the plurality of growth characteristic vectors, and the method comprises the following steps:
obtaining the crop type of the crop to be predicted;
determining growth factor combination information corresponding to the crop to be predicted based on the crop type, wherein each growth factor combination related to the growth of the crop to be predicted is reflected in the growth factor combination information;
and determining at least one vector group in the plurality of growth characteristic vectors based on the growth factor combination information, wherein each vector group comprises the growth characteristic vectors respectively corresponding to the growth factors in the growth factor combination.
According to the crop growth prediction method provided by the invention, the crop species of the crop to be predicted is obtained, and the crop growth prediction method comprises the following steps:
inputting the image of the crop to be predicted into a trained classification model, and obtaining the crop type output by the classification model;
the classification model is trained based on a plurality of groups of first training data, and each group of training data comprises a sample crop to be predicted and a crop type label corresponding to the sample crop to be predicted.
According to the crop growth prediction method provided by the invention, the characteristic combination layer comprises a plurality of first convolution kernels; the feature combination layer is used for respectively fusing the growth feature vectors in each vector group to obtain each combined feature vector, and the method comprises the following steps:
determining a target convolution kernel corresponding to the vector group in the plurality of first convolution kernels according to the number of vectors in the vector group;
and performing convolution operation on a matrix formed by the growing eigenvectors in the vector group through the target convolution check to obtain the combined eigenvector.
According to the crop growth prediction method provided by the invention, the prediction layer comprises a second convolution kernel and a fusion module, the prediction feature vector is input into the prediction layer, and the growth prediction result of the crop to be predicted is obtained based on the prediction layer, and the method comprises the following steps:
performing convolution operation on a category vector corresponding to the crop category of the crop to be predicted based on the second convolution check to obtain a category characteristic vector;
and fusing the category characteristic vector and the prediction characteristic vector based on the fusion module to obtain a fusion result, and acquiring a growth prediction result of the crop to be predicted based on the fusion result.
According to the crop growth prediction method provided by the invention, the prediction model is trained based on a plurality of groups of second training data, and each group of second training data comprises sample growth factor data of a sample crop to be predicted and a growth prediction label corresponding to the sample crop to be predicted; the training process of the prediction model comprises the following steps:
determining a target training batch in the plurality of groups of second training data, wherein the target training batch comprises a plurality of groups of second training data;
respectively inputting the sample growth factor data in the target training batch to the prediction model to obtain each sample prediction result output by the prediction model;
obtaining training loss according to the sample prediction results and the growth prediction labels;
updating the learnable parameters of the prediction model according to the training loss to realize the training of the prediction model;
the learnable parameters of the prediction model comprise the attention mechanism parameters of the self-attention layer, the parameters of the target convolution kernels corresponding to the second training data in the target training batch and the parameters of the second convolution kernels.
According to the crop growth prediction method provided by the invention, the training loss is obtained according to the prediction results of each sample and each growth prediction label, and the method comprises the following steps:
acquiring a first loss according to the difference between each sample prediction result and the corresponding growth prediction label;
obtaining a first similarity score between the crops to be predicted of each sample in the target training batch and a second similarity score between the class feature vectors corresponding to the crops to be predicted of each sample in the target training batch, and obtaining a second loss according to the difference between the first similarity score and the second similarity score;
obtaining the difference of the attention weights of the combined feature vector and the growth feature vector corresponding to the sample crop to be predicted in the target training batch to obtain a third loss;
and acquiring the training loss according to the first loss, the second loss and the third loss.
The invention also provides a crop growth prediction device, comprising:
the data acquisition module is used for acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
The data prediction module is used for inputting the multiple groups of growth factor data into a trained prediction model and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer; the data prediction module is specifically configured to:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
And inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a crop growth prediction method as described in any one of the above when executing the program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor implements a crop growth prediction method as described in any of the above.
According to the crop growth prediction method, the device, the electronic equipment and the storage medium, the change information data of various growth factors of crops to be predicted are input into the prediction model, the characteristics are extracted based on the change information data of the various growth factors of the prediction model, the growth prediction result of the crops to be predicted is obtained after partial characteristics are combined, the influences of different growth factors of the crops to be predicted and the combination of the growth factors on the growth of the crops to be predicted are fully considered, the automatic prediction of the growth requirement of the crops through the neural network model is realized, the observation and the prediction are not needed from manual to the field, and the labor cost is reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a crop growth prediction method provided by the invention;
FIG. 2 is a second flow chart of the crop growth prediction method according to the present invention;
FIG. 3 is a flow chart illustrating the processing of feature vectors in an attention mechanism;
FIG. 4 is a schematic diagram of the structure of a memory gate in a BiGRU network;
FIG. 5 is a schematic diagram of a crop growth prediction apparatus according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The inventor finds that in agricultural production, the growth requirement of crops needs to be judged in advance so as to purchase and prepare growth materials, for example, when the crops need to be fertilized, sprayed with pesticides and the like in advance is predicted, and then corresponding fertilizers and pesticides are purchased, so that the yield and quality of the crops are ensured. At present, the prediction is carried out by observing the state of crops and the growth environment of the crops in the field by professionals with abundant experience, which requires high labor cost and is unfavorable for agricultural automatic production.
In order to solve the problem of high labor cost in crop growth prediction, the application provides a crop growth prediction method, a device, electronic equipment and a storage medium, wherein change information data of various growth factors of crops to be predicted are input into a prediction model, characteristics are extracted based on the change information data of the various growth factors of the crops to be predicted, partial characteristics are combined to obtain a growth prediction result of the crops to be predicted, influences of different growth factors of the crops to be predicted and the combination of the growth factors to the crops to be predicted are fully considered, automatic prediction of the growth requirement of the crops through a neural network model is realized, observation prediction from manual to field is not needed, and labor cost is reduced.
The crop growth prediction method provided by the invention is described below with reference to the accompanying drawings. As shown in fig. 1, the crop growth prediction method provided by the invention comprises the following steps:
s100, acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
s200, inputting the multiple groups of growth factor data into a trained prediction model, and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model.
The growth factors may include environmental factors reflecting the crop growth environment, such as air humidity, soil humidity, ambient temperature, duration of sunlight, rainfall, etc., and may also include crop condition characterization factors reflecting the crop condition, such as plant height, flowering status, leaf color, etc. Each set of the growth factor data comprises time series data of one growth factor in the growth process of the crop to be predicted, namely each set of the growth factor data can reflect time-varying information of one growth factor in the growth process of the crop to be predicted. The growth factor data may be acquired by sensors disposed in the crop growth field to be predicted, such as humidity sensors, temperature sensors, image sensors, etc. Specifically, as shown in fig. 2, the primarily collected data may be stored in an information base, and preprocessing, such as filling in missing values, removing abnormal values, etc., may be performed on the primarily collected data to obtain the growth factor data.
After a plurality of groups of growth factor data of the crops to be predicted are obtained, the plurality of groups of growth factor data are input into a trained prediction model, and a neural network model is adopted to mine the relation between the growth factor change data and the future growth demand of the crops so as to obtain a growth prediction result of the crops to be predicted, wherein the growth prediction result comprises the growth demand of the crops to be predicted at the subsequent time of the growth factor data acquisition time. In this way, an automated prediction of the growth demand of the crop to be predicted can be achieved, without the need for manual work.
Specifically, the prediction model includes a feature extraction layer, a feature combination layer, a self-attention layer, and a prediction layer. The following describes in detail the processing of data of the feature extraction layer, the feature combination layer, the self-attention, and the prediction layer according to the processing order of data input into the prediction model.
The step of inputting the multiple groups of growth factor data into a trained prediction model to obtain a growth prediction result of the crop to be predicted, which is output by the prediction model, comprises the following steps:
S210, inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors.
After the multiple sets of growth factor data are obtained, the multiple sets of growth factor data are input into the feature extraction layer of the prediction model, as shown in fig. 2, the feature extraction layer may be a convolutional neural network layer, and preliminary feature extraction of the multiple sets of growth factor data is achieved through one or more convolution operations, so as to obtain multiple growth feature vectors.
And forming a matrix S by multiple groups of growth factor data, and performing convolution operation on the convolutional neural network layer by using a convolution check matrix S with the size of m x k to extract a characteristic c. Setting r convolution kernels, wherein the convolution operation is as follows:
Figure SMS_1
wherein:
Figure SMS_2
representing local features obtained by convolution operations, f representing nonlinear operations by the activation function ReLU; />
Figure SMS_3
A weight matrix representing the convolution; />
Figure SMS_4
Representing m rows of vectors from i to i+m-1 in the matrix; b represents the offset.
In one possible implementation manner, after the primary feature extraction of the multiple sets of growth factor data is implemented through convolution operation, a maximum pooling method may be applied to the feature information of the primary features to retain the feature value with the largest weight, and other feature values are discarded, so as to obtain the multiple growth feature vectors. Specifically, the preliminary feature extraction result of each of the multiple sets of growth factor data may be divided into multiple local information, a feature value with the largest weight is reserved in each local information, other feature values are discarded, and the reserved feature values are spliced to obtain the growth feature vector.
S220, determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
s230, inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer to configure corresponding attention weights for the combined feature vector and the plurality of growth feature vectors respectively, and obtaining a prediction feature vector based on the attention weights.
As explained above, each growth feature vector reflects the variation information of one growth factor, and the variation information of different growth factors has different influence on the growth requirement of crops, so that different weight needs to be allocated to different growth feature vectors. The attention mechanism is a mechanism that can assign different weights to different feature vectors, as shown in fig. 3, in the attention mechanism, attention weights are calculated first, feature codes containing the attention weights are generated, and feature vectors are finally generated. Specifically, after the feature vectors are extracted by the feature extraction layer, each feature vector is input into the self-attention layer to execute an attention mechanism, a corresponding attention weight is allocated to each feature vector, and finally a new feature vector is generated based on the respective attention weight and a Value matrix corresponding to the feature vector. However, considering individual growth factor variations separately for crop growth predictions, assigning weights to each growth factor individually, results in a loss of prediction accuracy, because the impact on crop growth demand may be small when individual growth factor variations are considered individually, but if combined with other growth factor variations, a larger impact will result. For example, if only temperature is considered, a temperature which is not very high alone may not have a great influence on crops, but if temperature and humidity are combined together, even if not very high temperature and continuous high humidity are added, the influence on the yield of crops is much larger than the influence of the two factors alone.
Specifically, the determining at least one vector group in the plurality of growth feature vectors includes:
obtaining the crop type of the crop to be predicted;
determining growth factor combination information corresponding to the crop to be predicted based on the crop type, wherein each growth factor combination related to the growth of the crop to be predicted is reflected in the growth factor combination information;
and determining at least one vector group in the plurality of growth characteristic vectors based on the growth factor combination information, wherein each vector group comprises the growth characteristic vectors respectively corresponding to the growth factors in the growth factor combination.
The method provided by the invention is used for predetermining the growth factor combination information corresponding to various crop types, wherein the information can be marked in advance by a professional or obtained by adopting a crawler to capture and further process data on a professional website. Two or more growth factors may be included in each of the growth factor combinations. According to the crop types of the crops to be predicted, determining growth factor combination information corresponding to the crops to be predicted in growth factor combination information corresponding to various predetermined crop types, determining at least one vector group in the plurality of growth characteristic vectors according to growth factor combinations in the growth factor combination information, and combining the growth characteristic vectors in one vector group for subsequent input to an attention layer.
The crop types of the crops to be predicted can be obtained through manual identification, or can be obtained through the obtained planting information of the land block with the source of the growth factor data, but the automation degree is reduced through manual identification, time is consumed, the crop types are possibly wrong due to the fact that the planting information of the land block is not updated in time, and the accuracy of the finally obtained crop growth prediction result is reduced. In one possible implementation manner, the identifying of the category may be performed based on the image of the crop to be predicted, specifically, the obtaining the crop type of the crop to be predicted includes:
inputting the image of the crop to be predicted into a trained classification model, and obtaining the crop type output by the classification model;
the classification model is trained based on a plurality of groups of first training data, and each group of training data comprises a sample crop to be predicted and a crop type label corresponding to the sample crop to be predicted.
The image of the crop to be predicted can be obtained by imaging the crop to be predicted in real time, for example, the image of the crop to be predicted is obtained by shooting through a camera arranged in the field of the crop to be predicted, or the image of the crop to be predicted is obtained by acquiring a satellite imaging result through the geographic coordinates of the field of the crop to be predicted.
The method comprises the steps of acquiring an image of the crop to be predicted, inputting the image into a trained classification model, determining the crop type of the crop to be predicted based on the classification model, effectively improving the automation degree of the crop growth prediction process, reducing the labor cost, and avoiding the problem of low accuracy of the crop growth prediction result caused by the fact that the land parcel planting information is not updated in time.
The feature combination layer is used for respectively fusing the growth feature vectors in each vector group to obtain each combined feature vector, and the method comprises the following steps:
determining a target convolution kernel corresponding to the vector group in the plurality of first convolution kernels according to the number of vectors in the vector group;
performing convolution operation on a matrix formed by the growth feature vectors in the vector group through the target convolution check to obtain the combined feature vector;
the size of the processing matrix employed in the attention layer is determined during execution of the attention mechanism, so that the number of parameters of the self-attention layer to be trained is determined during model training, which is advantageous for training efficiency of the model. But the number of the growing feature vectors included in each of the vector groups is different, the method provided by the invention unifies the sizes of the feature vectors input to the attention layer. Specifically, for each growth factor, a plurality of data at the same time may be collected to form a set of growth factor data, so that each set of growth factor data has the same size, and after feature extraction, each growth feature vector with the same size may be formed. And the combination of growth factors affecting the growth of different crops is different, and the information of the combination of growth factors may comprise two or more growth factors, so as to form the vector group comprising two or more growth characteristic vectors. In the method provided by the invention, first convolution kernels with different sizes are set, corresponding target convolution kernels are determined according to the number of vectors in the vector group, and after the matrix formed by the growth feature vectors in the vector group is subjected to convolution operation through the target convolution kernel, the size of the obtained combined feature vector is consistent with the size of the growth feature vector. That is, the corresponding first convolution kernel is set according to the number of vectors that may exist in the vector group. If the growth factor combination information may include 2, 3 and 4 growth factors, 3 first convolution kernels are set, and the sizes of the 3 first convolution kernels are different, so that the sizes of vectors obtained after matrix convolution consisting of 2, 3 and 4 growth feature vectors are respectively consistent with the sizes of the growth feature vectors. In order to prevent excessive parameters of the model, when setting the growth factor combination information, a factor number constraint in a limiting combination can be set, namely, the growth factor combination information is set to comprise n growth factors at most, n can be 2, 3 and the like, and it is understood that the more n is, the more information related to crop growth can be extracted, but more model parameters can be generated, and the model training efficiency can be reduced.
After the combined feature vector is obtained, the combined feature vector and the plurality of growth feature vectors are input to the self-attention layer, an attention mechanism is executed based on the self-attention layer, corresponding attention weights are respectively configured for the combined feature vector and the plurality of growth feature vectors, and a prediction feature vector is obtained based on the attention weights. In this way, in the process of considering the influence of various growth factors on the growth demands of crops, the independent weight is set for the combined action of the growth factors, so that the accuracy of the prediction of the growth demands of the crops is improved.
The step of inputting the multiple groups of growth factor data into a trained prediction model to obtain a growth prediction result of the crop to be predicted, which is output by the prediction model, further comprises the steps of:
s240, inputting the prediction feature vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
An existing feature processing network may be adopted in the prediction layer to extract deep features from the prediction feature vector and output a final prediction vector, where the prediction vector may reflect a growth requirement of the crop to be predicted, for example, each element in the prediction vector represents a probability of generating a possible growth requirement of the crop to be predicted. In one embodiment as shown in fig. 2, the feature processing network employs a biglu model network. That is, after deriving the predictive feature vector based on the attention mechanism, the biglu model is contacted to output a final predictive vector for predicting the growth demand of the crop. Bigreu is a neural network model composed of unidirectional, oppositely directed, and outputs a GRU that is commonly determined by the states of two GRUs. At each instant, the input will simultaneously provide two GRUs in opposite directions, while the output is determined by both unidirectional GRUs. As shown in fig. 4, the GRU belongs to one type of RNN, and has two gates, namely an update gate and a reset gate, which retains the function of "memorization" and makes LSTM avoid the disadvantage of gradient explosion or disappearance during back propagation. The update gate is used for controlling the degree to which the state information of the previous moment is substituted into the current state, and the larger the value of the update gate is, the more the state information of the previous moment is substituted; the reset gate is used to control the degree to which state information at a previous time is ignored, a smaller value of the reset gate indicating more is ignored. The specific data processing process of the GRU is as follows:
Step 1-1, current State input x t Output h from the previous time t-1 A value of 0-1 is output through the update gate, wherein 0 indicates completely discarded information and 1 indicates completely retained information.
Step 1-2, x t And h t-1 The sigxmoid layer entering the reset gate outputs a value of 0-1, while the tanh layer creates a new candidate vector
Figure SMS_5
The calculation formula is expressed as:
Figure SMS_6
Figure SMS_7
step 1-3, using the update gate as a weight vector, and obtaining the output h of the GRU cell by weighted average of the candidate vector and the output vector at the previous moment t . The calculation formula is expressed as:
Figure SMS_8
wherein r is t Representing an update gate vector, z t Representing the vector of the reset gate,
Figure SMS_9
is an activation function, x t An input vector h representing time t t Output vector representing time t []Representing that 2 vectors are connected, +.>
Figure SMS_10
Representing the multiplication of matrix elements.
In one possible implementation manner, in the prediction layer, the prediction feature vector may be directly input into a feature processing network to be processed, and a final growth prediction result is output. However, the inventors found that, in practice, the mechanisms of action of various growth factors on growth requirements are different for different crops, and that, although different combinations of different environmental factors corresponding to the various crops were used to fuse different growth characteristic vectors, there is a lack of influence on the growth requirements by specific data of the growth factors of the different crops. In order to further improve accuracy of a growth demand prediction result of the crop to be predicted, in the method provided by the invention, the prediction layer comprises a second convolution kernel and a fusion module, the prediction feature vector is input into the prediction layer, and the growth prediction result of the crop to be predicted is obtained based on the prediction layer, and the method comprises the following steps:
Performing convolution operation on a category vector corresponding to the crop category of the crop to be predicted based on the second convolution check to obtain a category characteristic vector;
and fusing the category characteristic vector and the prediction characteristic vector based on the fusion module to obtain a fusion result, and acquiring a growth prediction result of the crop to be predicted based on the fusion result.
The type vector corresponding to the crop type of the crop to be predicted may reflect the type of the crop to be predicted, specifically, each element of the type vector corresponds to one crop type, in the type vector corresponding to the crop to be predicted, only one element corresponding to the type of the crop to be predicted is 1, and the other elements are 0. And carrying out convolution operation on the category vector corresponding to the crop to be predicted through the second convolution kernel to obtain the category feature vector reflecting the category information of the crop to be predicted. And then fusing the category characteristic vector and the prediction characteristic vector, and predicting the growth requirement of the crop to be predicted based on a fusion result. The fusion of the category feature vector and the prediction feature vector can be realized by adopting the existing neural network feature fusion mode.
In the method provided by the invention, the type feature vector reflecting the crop type of the crop to be predicted is fused with the prediction feature vector, and the growth prediction result of the crop to be predicted is obtained based on the fusion result, namely, the fusion result is input into a feature extraction network for further deep feature extraction, and the growth prediction result is output. Therefore, the influence of the data of the growth factors of different types of crops on the growth demands of the crops can be fully considered, and the accuracy of the finally output growth prediction result of the crops to be predicted is improved.
The prediction model is obtained by training in a supervised training mode, namely the prediction model is trained based on a plurality of groups of second training data, each group of second training data comprises rated sample growth factor data of a crop to be predicted by a sample and a growth prediction label corresponding to the crop to be predicted by the sample, and the training process of the prediction model comprises the following steps:
determining a target training batch in the plurality of groups of second training data, wherein the target training batch comprises a plurality of groups of second training data;
respectively inputting the sample growth factor data in the target training batch to the prediction model to obtain each sample prediction result output by the prediction model;
Obtaining training loss according to the sample prediction results and the growth prediction labels;
updating the learnable parameters of the prediction model according to the training loss to realize the training of the prediction model;
the learnable parameters of the prediction model comprise the attention mechanism parameters of the self-attention layer, the parameters of the target convolution kernels corresponding to the second training data in the target training batch and the parameters of the second convolution kernels.
Specifically, the prediction model is trained in an iterative manner, and the learnable parameters of the prediction model are updated once in each iteration. And in each iteration, inputting the sample growth factor data in each second training data in one training batch into the prediction model, outputting a sample prediction result by the prediction model based on the sample growth factor data, acquiring training loss based on the sample prediction result and the growth prediction label, carrying out back propagation, updating the leavable parameters of the prediction model, and realizing one-time iterative training of the prediction model. After repeated iterative training, the training of the prediction model is completed after the learnable parameters of the prediction model are converged. Through training, the prediction model can learn the deep relation between the growth factor data of crops and the demands of the crops, and realize automatic prediction of the growth demands of the crops.
The obtaining training loss according to the sample prediction results and the growth prediction labels comprises the following steps:
acquiring a first loss according to the difference between each sample prediction result and the corresponding growth prediction label;
obtaining a first similarity score between the crops to be predicted of each sample in the target training batch and a second similarity score between the class feature vectors corresponding to the crops to be predicted of each sample in the target training batch, and obtaining a second loss according to the difference between the first similarity score and the second similarity score;
obtaining the difference of the attention weights of the combined feature vector and the growth feature vector corresponding to the sample crop to be predicted in the target training batch to obtain a third loss;
and acquiring the training loss according to the first loss, the second loss and the third loss.
In order to improve training efficiency and enable parameters of the prediction model to quickly approach a better solution, in the method provided by the invention, training loss is not only obtained according to the difference between the sample prediction result and the corresponding growth prediction label, but also second loss is obtained according to the similarity score between the sample crops to be predicted, the similarity score between the type feature vectors corresponding to the sample crops to be predicted, and third loss is obtained according to the difference of the attention weights of the combined feature vectors and the growth feature vectors corresponding to the sample crops to be predicted.
Specifically, as described above, in the process of predicting the crop growth requirement by using the prediction model, the prediction is performed in combination with the crop type information, so that in order to ensure that the influence of the crop type information of different crops on the crop growth prediction result can be expressed, a clear distinction is required between the corresponding good type feature vectors of the different types of crops, so that the influence of the crop type information can be accurately considered in the process of crop growth prediction. In the method provided by the invention, in the training process of the prediction model, the second loss in the process of evaluating the type vector of the second convolution check crop to carry out convolution operation is independently set, so as to obtain the type feature vector. Specifically, the first similarity score between the crops to be predicted of each sample may be determined in advance based on the similarity of the growth habits between the crops to be predicted of each sample, and this process may be obtained by using a professional mark, or the first similarity score between the crops to be predicted of each sample may be automatically obtained according to keyword matching by automatically capturing keywords of the growth habits of the crops to be predicted of each sample, such as happiness, etc., through a computer program. And inputting the type vectors corresponding to the sample crops to be predicted to the prediction layer to obtain the type feature vectors, and obtaining the second similarity scores among the type feature vectors after obtaining the type feature vectors corresponding to the sample crops to be predicted, wherein the second similarity scores can be calculated by a cosine phase velocity calculation method. The second loss is determined from a difference between the first similarity score and the second similarity score. Specifically, for each crop to be predicted in each training batch, the samples may be grouped into crop groups, each crop group corresponds to one of the first similarity score and one of the second similarity scores, a value reflecting a difference between the first similarity score and the second similarity score corresponding to each crop group is obtained, and then summation is performed to obtain the second loss.
Further, as explained before, the combined feature vector is generated based on a combination of growth factors that have a greater impact on the crop growth requirements, and therefore should be made to have a higher weight than the growth feature vector alone. In order to achieve the object, in the method provided by the invention, when the prediction model is trained, a third loss is obtained based on the difference between the attention weight of the combined feature vector and the attention weight of the growth feature vector corresponding to the crop to be predicted by the sample. Specifically, the larger the difference between the combined feature vector and the growth feature vector is, the smaller the third loss is, and the larger the difference between the combined feature vector and the growth feature vector is, the larger the difference is, the third loss is, when the combined feature vector is smaller in attention weight than the growth feature vector is.
And summing the first loss, the second loss and the third loss to obtain the training loss, and updating the learnable parameters of the prediction model with the minimum training loss as an optimization purpose to realize the training of the prediction model.
In the method provided by the invention, besides the traditional method for training the model by acquiring the loss based on the difference between the model output result and the sample label, the loss of the intermediate result in the calculation process of the prediction model is increased based on the action and the characteristics of each module in the prediction model, so that the training efficiency of the prediction model can be improved.
The crop growth prediction apparatus provided by the present invention will be described below, and the crop growth prediction apparatus described below and the crop growth prediction method described above may be referred to correspondingly to each other. As shown in fig. 5, the crop growth prediction apparatus provided by the present invention includes: the data acquisition module 501 and the data prediction module 502.
The data acquisition module 501 is configured to acquire multiple sets of growth factor data of a crop to be predicted, where each set of growth factor data reflects variation information of one growth factor in a growth process of the crop to be predicted;
the data prediction module 502 is configured to input the multiple sets of growth factor data into a trained prediction model, and obtain a growth prediction result of the crop to be predicted output by the prediction model.
Specifically, the prediction model includes a feature extraction layer, a feature combination layer, a self-attention layer, and a prediction layer. The data prediction module 502 is specifically configured to:
Inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer to configure corresponding attention weights for the combined feature vector and the plurality of growth feature vectors respectively, and obtaining a prediction feature vector based on the attention weights;
and inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
Fig. 6 illustrates a physical schematic diagram of an electronic device, as shown in fig. 6, which may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a crop growth prediction method comprising: acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
Inputting the multiple groups of growth factor data into a trained prediction model, and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer, wherein the multiple groups of growth factor data are input into a trained prediction model, and the growth prediction result of the crop to be predicted, which is output by the prediction model, is obtained, and the method comprises the following steps:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
And inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer readable storage medium for sale or use by a product that is independent of the product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the crop growth prediction method provided by the methods described above, the method comprising: acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
Inputting the multiple groups of growth factor data into a trained prediction model, and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer, wherein the multiple groups of growth factor data are input into a trained prediction model, and the growth prediction result of the crop to be predicted, which is output by the prediction model, is obtained, and the method comprises the following steps:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
And inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor is implemented to perform the crop growth prediction method provided by the above methods, the method comprising: acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
inputting the multiple groups of growth factor data into a trained prediction model, and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer, wherein the multiple groups of growth factor data are input into a trained prediction model, and the growth prediction result of the crop to be predicted, which is output by the prediction model, is obtained, and the method comprises the following steps:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
Determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
and inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
The above described embodiments of the apparatus are merely illustrative, wherein the elements described by the crop separation elements may or may not be physically separate, and the elements shown by the crop elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of crop growth prediction comprising:
acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
inputting the multiple groups of growth factor data into a trained prediction model, and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer, wherein the multiple groups of growth factor data are input into a trained prediction model, and the growth prediction result of the crop to be predicted, which is output by the prediction model, is obtained, and the method comprises the following steps:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
Inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
and inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
2. The crop growth prediction method according to claim 1, wherein the determining at least one vector group among the plurality of growth feature vectors comprises:
obtaining the crop type of the crop to be predicted;
determining growth factor combination information corresponding to the crop to be predicted based on the crop type, wherein each growth factor combination related to the growth of the crop to be predicted is reflected in the growth factor combination information;
and determining at least one vector group in the plurality of growth characteristic vectors based on the growth factor combination information, wherein each vector group comprises the growth characteristic vectors respectively corresponding to the growth factors in the growth factor combination.
3. The crop growth prediction method according to claim 2, characterized in that the obtaining the crop species of the crop to be predicted comprises:
inputting the image of the crop to be predicted into a trained classification model, and obtaining the crop type output by the classification model;
the classification model is trained based on a plurality of groups of first training data, and each group of training data comprises a sample crop to be predicted and a crop type label corresponding to the sample crop to be predicted.
4. The crop growth prediction method according to claim 1, characterized in that the feature combination layer comprises a plurality of first convolution kernels; the feature combination layer is used for respectively fusing the growth feature vectors in each vector group to obtain each combined feature vector, and the method comprises the following steps:
determining a target convolution kernel corresponding to the vector group in the plurality of first convolution kernels according to the number of vectors in the vector group;
and performing convolution operation on a matrix formed by the growing eigenvectors in the vector group through the target convolution check to obtain the combined eigenvector.
5. The crop growth prediction method according to claim 4, wherein the prediction layer includes a second convolution kernel and a fusion module, the inputting the prediction feature vector to the prediction layer, obtaining a growth prediction result of the crop to be predicted based on the prediction layer, includes:
Performing convolution operation on a category vector corresponding to the crop category of the crop to be predicted based on the second convolution check to obtain a category characteristic vector;
and fusing the category characteristic vector and the prediction characteristic vector based on the fusion module to obtain a fusion result, and acquiring a growth prediction result of the crop to be predicted based on the fusion result.
6. The crop growth prediction method according to claim 5, wherein the prediction model is trained based on a plurality of sets of second training data, each set of second training data comprising sample growth factor data of a sample crop to be predicted and a growth prediction tag corresponding to the sample crop to be predicted; the training process of the prediction model comprises the following steps:
determining a target training batch in the plurality of groups of second training data, wherein the target training batch comprises a plurality of groups of second training data;
respectively inputting the sample growth factor data in the target training batch to the prediction model to obtain each sample prediction result output by the prediction model;
obtaining training loss according to the sample prediction results and the growth prediction labels;
Updating the learnable parameters of the prediction model according to the training loss to realize the training of the prediction model;
the learnable parameters of the prediction model comprise the attention mechanism parameters of the self-attention layer, the parameters of the target convolution kernels corresponding to the second training data in the target training batch and the parameters of the second convolution kernels.
7. The method of claim 6, wherein said obtaining training loss from each of said sample predictions and each of said growth prediction tags comprises:
acquiring a first loss according to the difference between each sample prediction result and the corresponding growth prediction label;
obtaining a first similarity score between the crops to be predicted of each sample in the target training batch and a second similarity score between the class feature vectors corresponding to the crops to be predicted of each sample in the target training batch, and obtaining a second loss according to the difference between the first similarity score and the second similarity score;
obtaining the difference of the attention weights of the combined feature vector and the growth feature vector corresponding to the sample crop to be predicted in the target training batch to obtain a third loss;
And acquiring the training loss according to the first loss, the second loss and the third loss.
8. A crop growth prediction apparatus, comprising:
the data acquisition module is used for acquiring multiple groups of growth factor data of crops to be predicted, wherein each group of growth factor data reflects the change information of one growth factor in the growth process of the crops to be predicted;
the data prediction module is used for inputting the multiple groups of growth factor data into a trained prediction model and obtaining a growth prediction result of the crop to be predicted, which is output by the prediction model;
the prediction model comprises a feature extraction layer, a feature combination layer, a self-attention layer and a prediction layer; the data prediction module is specifically configured to:
inputting the multiple groups of growth factor data into the feature extraction layer, and respectively carrying out feature extraction on the multiple groups of growth factor data based on the feature extraction layer to obtain multiple growth feature vectors;
determining at least one vector group in the plurality of growth feature vectors, wherein the vector group comprises at least two growth feature vectors, inputting the at least one vector group into the feature combination layer, and respectively fusing the growth feature vectors in each vector group based on the feature combination layer to obtain each combined feature vector;
Inputting the combined feature vector and the plurality of growth feature vectors to the self-attention layer, executing an attention mechanism based on the self-attention layer, respectively configuring corresponding attention weights for the combined feature vector and the plurality of growth feature vectors, and obtaining a prediction feature vector based on the attention weights;
and inputting the prediction characteristic vector into the prediction layer, and acquiring a growth prediction result of the crop to be predicted based on the prediction layer.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the crop growth prediction method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the crop growth prediction method of any of claims 1 to 7.
CN202310539515.8A 2023-05-15 2023-05-15 Crop growth prediction method, device, electronic equipment and storage medium Pending CN116307266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310539515.8A CN116307266A (en) 2023-05-15 2023-05-15 Crop growth prediction method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310539515.8A CN116307266A (en) 2023-05-15 2023-05-15 Crop growth prediction method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116307266A true CN116307266A (en) 2023-06-23

Family

ID=86817044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310539515.8A Pending CN116307266A (en) 2023-05-15 2023-05-15 Crop growth prediction method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116307266A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726051A (en) * 2024-02-08 2024-03-19 北京市农林科学院智能装备技术研究中心 Method, device and storage medium for predicting yield of special crops
CN117726051B (en) * 2024-02-08 2024-05-10 北京市农林科学院智能装备技术研究中心 Method, device and storage medium for predicting yield of special crops

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909862A (en) * 2019-10-11 2020-03-24 平安科技(深圳)有限公司 Attention weight calculation method and device based on convolutional neural network
CN112116080A (en) * 2020-09-24 2020-12-22 中国科学院沈阳计算技术研究所有限公司 CNN-GRU water quality prediction method integrated with attention mechanism
CN114169638A (en) * 2021-12-23 2022-03-11 中国农业大学 Water quality prediction method and device
CN114298615A (en) * 2022-03-09 2022-04-08 浙江大学 Crop planting risk prevention method and device, storage medium and equipment
CN115409252A (en) * 2022-08-24 2022-11-29 浙江天演维真网络科技股份有限公司 Plant growth data multi-step prediction method, device, medium and equipment based on LSTM
CN115860269A (en) * 2023-02-20 2023-03-28 南京信息工程大学 Crop yield prediction method based on triple attention mechanism
CN116051996A (en) * 2023-01-13 2023-05-02 大连东软信息学院 Two-stage crop growth prediction method based on multi-mode information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909862A (en) * 2019-10-11 2020-03-24 平安科技(深圳)有限公司 Attention weight calculation method and device based on convolutional neural network
CN112116080A (en) * 2020-09-24 2020-12-22 中国科学院沈阳计算技术研究所有限公司 CNN-GRU water quality prediction method integrated with attention mechanism
CN114169638A (en) * 2021-12-23 2022-03-11 中国农业大学 Water quality prediction method and device
CN114298615A (en) * 2022-03-09 2022-04-08 浙江大学 Crop planting risk prevention method and device, storage medium and equipment
CN115409252A (en) * 2022-08-24 2022-11-29 浙江天演维真网络科技股份有限公司 Plant growth data multi-step prediction method, device, medium and equipment based on LSTM
CN116051996A (en) * 2023-01-13 2023-05-02 大连东软信息学院 Two-stage crop growth prediction method based on multi-mode information
CN115860269A (en) * 2023-02-20 2023-03-28 南京信息工程大学 Crop yield prediction method based on triple attention mechanism

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726051A (en) * 2024-02-08 2024-03-19 北京市农林科学院智能装备技术研究中心 Method, device and storage medium for predicting yield of special crops
CN117726051B (en) * 2024-02-08 2024-05-10 北京市农林科学院智能装备技术研究中心 Method, device and storage medium for predicting yield of special crops

Similar Documents

Publication Publication Date Title
Arya et al. Deep learning: As the new frontier in high-throughput plant phenotyping
Hari et al. Detection of plant disease by leaf image using convolutional neural network
WO2017194399A1 (en) Recognition of weed in a natural environment
Khan et al. A novel semi-supervised framework for UAV based crop/weed classification
Jabir et al. Deep learning-based decision support system for weeds detection in wheat fields
Rathore et al. Automatic rice plant disease recognition and identification using convolutional neural network
Gonçalves et al. Automatic detection of Acacia longifolia invasive species based on UAV-acquired aerial imagery
CN116918546A (en) Corn high-yield planting and fertilizing method
Menezes et al. Pseudo-label semi-supervised learning for soybean monitoring
Lauguico et al. Machine vision-based prediction of lettuce phytomorphological descriptors using deep learning networks
Chikkamath et al. Benchmarking of Novel Convolutional Neural Network Models for Automatic Butterfly Identification
Toskova et al. DCNN against Wheat Weeds
CN112036437A (en) Rice seedling detection model based on improved YOLOV3 network and method thereof
CN116307266A (en) Crop growth prediction method, device, electronic equipment and storage medium
CN116167850A (en) Loan risk assessment method and device based on agricultural remote sensing image
Frank et al. Confidence-driven hierarchical classification of cultivated plant stresses
Mehta et al. Intensification of agriculture using deep learning and machine learning: A survey
Chaudhari et al. Bayesian optimization with deep learning based crop type classification on UAV imagery
Ahmed et al. Detection and classification of leaf disease using deep learning for a greenhouses’ robot
Tanaka et al. Deep learning-based estimation of rice yield using RGB image
Popescu et al. Comparative Study of Neural Networks Used in Halyomorpha Halys Detection
Kumar et al. Deep learning and computer vision in smart agriculture
Almola et al. Citrus diseases recognition by using CNN
Goel et al. Machine learning-based remote monitoring and predictive analytics system for monitoring and livestock monitoring
Pawar et al. Detection of leaf diseases for multiple plants using convolutional neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230623