A recommended method for planting barley crops
Through the combination of multimodal feature extraction, fusion and prediction output modules, the shortcomings of the existing barley planting recommendation methods in data utilization, feature extraction and timing information processing are solved, and more efficient and accurate barley planting density recommendations are achieved.
Patent Information
- Application Number
- CN202411251890.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-08
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-09-08
AI Technical Summary
The existing barley planting recommendation methods have shortcomings in data utilization, feature extraction, timing information processing and dynamic adaptability, resulting in low accuracy and practicality of recommended results.
A recommended method for planting barley crops is proposed. By obtaining soil properties and climatic conditions data of wheat fields, using multimodal feature extraction module, multimodal feature fusion module and prediction output module, dynamically adjusting feature weights, capturing nonlinear relationships and timing patterns, and finally outputting the appropriate planting density.
This method significantly improves the accuracy and adaptability of recommendations by integrating multimodal data and deep learning techniques, and can more effectively capture complex nonlinear relationships and timing patterns, providing more accurate and practical planting density recommendations.
Smart Images

Figure CN119066270B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart agriculture, and in particular relates to a method for recommending the planting of barley crops. Background Art
[0002] With the impact of population growth and climate change, barley, as an important food and feed crop, has become particularly important to improve its planting efficiency and yield. Traditional barley planting methods mainly rely on farmers' experience and simple soil tests, which are difficult to adapt to complex and changeable planting environments. In recent years, although some intelligent recommendation systems have begun to be applied in the agricultural field, they are still insufficient in barley planting. These systems often only consider a single or limited number of factors, such as soil or climate conditions, while ignoring other important influencing factors, such as comprehensive analysis of historical planting data and multimodal data. In addition, existing recommendation methods generally lack consideration of long-term trends and are difficult to adapt to climate change and dynamic changes in soil conditions. Existing technical attempts have the following defects:
[0003] 1. Insufficient data utilization: Existing technologies mainly rely on single or limited data sources, such as only considering soil data or climate data, ignoring the comprehensive analysis of multi-source data, resulting in one-sided and inaccurate recommendation results.
[0004] 2. Limited feature extraction capabilities: Traditional methods mostly use linear feature extraction technology, which is difficult to capture complex nonlinear relationships and cannot fully explore the deep features in the data, affecting the accuracy of recommendations.
[0005] 3. Insufficient processing of time series information: The processing of climate data often ignores the characteristics of time series and cannot effectively capture long-term and short-term time series patterns, resulting in insufficient ability to predict future trends.
[0006] 4. Lack of dynamic adaptability: Existing recommendation systems are mostly static models, which are difficult to adapt to dynamic factors such as climate change and changes in soil conditions. They are unable to adjust recommendation strategies in a timely manner, reducing the practicality and reliability of recommendations. Summary of the invention
[0007] In view of the above problems, the present invention provides a method for recommending barley crop planting, comprising the following steps:
[0008] S1, obtaining the soil property data and climate condition data of the most recent planting cycle of the wheat field to be tested;
[0009] S2, preprocessing the acquired soil property data and climate condition data to obtain standard input data for model training;
[0010] S3, inputting the standard input data into the trained barley crop planting intelligent recommendation model, and outputting the appropriate planting density of the tested wheat field;
[0011] The barley crop planting intelligent recommendation model includes a multimodal feature extraction module, a multimodal feature fusion module and a prediction output module;
[0012] The multimodal feature extraction module includes a soil modal feature extraction unit and a climate modal feature extraction unit;
[0013] The soil modal feature extraction unit captures the complex nonlinear relationship in the soil data and compresses the high-dimensional raw data into a low-dimensional feature space. The climate modal feature extraction unit compresses the climate data into a comprehensive climate characteristic parameter by capturing long-term and short-term temporal patterns.
[0014] The multimodal feature fusion module fuses the feature data obtained by the multimodal feature extraction module, dynamically adjusts their weights in the fusion process by learning the correlation between different modal features, and uses the attention mechanism to highlight important features, and finally realizes nonlinear feature fusion through a multi-layer perceptron;
[0015] The prediction output module outputs the appropriate planting density of the wheat field based on the input fusion features.
[0016] Preferably, the soil property data include the daily average soil pH value, the daily average organic matter content and the daily average nitrogen, phosphorus and potassium content, and the climate condition data include the daily average temperature, the daily average daily precipitation, the daily average relative humidity and the number of sunshine hours.
[0017] Preferably, when constructing a data set for training an intelligent recommendation model for barley crop planting, historical data of the above-mentioned soil property data and climate condition data of N wheat fields in one planting cycle are collected through records of relevant departments or actual experiments, and barley growth status data in the corresponding planting cycle are obtained, including the average height of wheat plants and the average accumulation of dry matter of wheat plants in seven growth stages of germination, seedling, jointing, booting, heading, filling and maturity, as well as the yield of wheat fields. The average height of wheat plants is represented by the average height of barley plants sampled from the wheat field, and the average accumulation of dry matter of wheat plants is represented by the average accumulation of dry matter of barley plants sampled from the wheat field; the barley growth status data is used to evaluate the appropriate planting density.
[0018] Preferably, the preprocessing includes missing value processing, outlier detection processing and data normalization;
[0019] The missing value processing is to fill in the short-term missing values in the soil property data and climate condition data by linear interpolation; the outlier detection processing is to determine whether it is an outlier by calculating the difference between the data point and the median of the data set and standardizing the difference to eliminate it; the data normalization is to use the Min-Max normalization method to scale the soil property data and climate condition data to a fixed range, that is, fixed to [0, 1], to eliminate the dimensional differences between different features.
[0020] Preferably, the soil modal feature extraction unit is designed to obtain a three-layer autoencoder, which consists of an encoder and a decoder; the input layer and the output layer of the autoencoder both contain neurons with the same number as the original features to ensure lossless reconstruction of the input data, and the number of neurons in the hidden layer is set to one third of the input layer, thereby effectively compressing the original data and extracting its most important features;
[0021] The encoder part of the autoencoder is used to map the raw soil data into a low-dimensional feature space; the extracted features are represented as:
[0022]
[0023] Among them, s soil The features extracted by the encoder of the autoencoder, Encoder soil is the encoder feature extraction function of the autoencoder, σ is the activation function, w soil is the encoder weight matrix of the autoencoder, b soil is the bias term;
[0024] The extracted low-dimensional features are then fused into a comprehensive soil characteristic parameter S by weighted summation:
[0025]
[0026] Among them, m is the dimension of low-dimensional features, is the weight of each feature, learned through back propagation, is the i-th eigenvalue.
[0027] Preferably, the climate modal feature extraction unit adopts an improved long short-term memory network Re-LSTM time series feature extraction method, comprising an input layer, a Re-LSTM layer and a fully connected output layer; the input layer is used to receive time series data, and the Re-LSTM layer is a neural network structure that can capture the long-term dependency relationship in the time series data, and is composed of a residual layer, a random inactivation layer and an LSTM layer. The residual layer makes R e-LSTM can retain the original input information while learning new features. This design simplifies the learning task of Re-LSTM and makes it easier for Re-LSTM to learn useful feature representations. The random inactivation layer randomly sets the output of some neurons in Re-LSTM to zero, which can reduce the synergy between neurons, thereby reducing the complexity of Re-LSTM and avoiding overfitting.
[0028] The hidden state of the last time step of the Re-LSTM layer is used as the extracted feature, which is expressed as:
[0029]
[0030] in, is the hidden state at the last time step, arrive is the input sample sequence data;
[0031] The features extracted by Re-LSTM are then mapped to a comprehensive historical crop performance feature parameter C through a fully connected layer:
[0032]
[0033] Among them, σ is the activation function, w climate is the weight matrix of the mapping layer in the Re-LSTM network, b climate is the bias term.
[0034] Preferably, the multimodal feature fusion module adopts a dynamic weighted adaptive attention network, including dynamic weight allocation, adaptive attention mechanism and multi-layer perceptron fusion; by learning the correlation between different modal features, dynamically adjusting their weights in the fusion process, and using the attention mechanism to highlight important features, and finally realizing nonlinear feature fusion through a multi-layer perceptron; the specific process is:
[0035] First, based on the dynamic weight allocation mechanism, the relative importance of different modal features is learned and the weight learning function f is defined w :
[0036] f w (S, C) = softmax(w w ·[S;C]+b w )
[0037] Among them, w w is the weight matrix, b w is the bias term, [S; C] is the feature concatenation of soil property data feature S and climate condition data feature C. The weight α of the two modal features is obtained through the softmax function. S and αC , and satisfy α S +α C =1;
[0038] Then, based on the designed adaptive attention mechanism, the importance of each feature is adaptively adjusted so that in the fusion process, an attention weight is assigned to each modal feature. This weight is determined by an attention function. For each modal feature Q∈{S, C}, the attention function f is defined as a :
[0039] f a (Q) = softmax(w a ·tanh(w q Q+b q )+b a )
[0040] Among them, w a and w q is a weight vector, which is used to adjust and transform the representation of the input feature Q; b a and bq are bias terms, providing a flexible translation parameter for the attention function; tanh is the hyperbolic tangent activation function, responsible for introducing nonlinearity; we get an attention weight vector w Q =f a (Q), the vector w Q represents the importance of each feature within the modality; next, the original feature Q is combined with the weight vector w Q Multiply element by element to get the adjusted feature representation Q`:
[0041] Q`=Q⊙w Q
[0042] Among them, ⊙ represents the element-by-element multiplication operation, Q`∈{S`,C`};
[0043] Finally, the multi-layer perceptron MLP is used to perform nonlinear fusion on the weighted features:
[0044] U=MLP(α S ·S`+α C ·C`)
[0045] Among them, the structure of MLP contains multiple fully connected layers and nonlinear activation functions:
[0046] U = ReLU(w 2 ReLU(w 1 ·(α S ·S`+α C ·C`)+b 1 )+b 2 )
[0047] Among them, w 1 and w 2 is the weight matrix, b 1 and b 2 is the bias term.
[0048] Preferably, in order to further improve the expression ability of the fusion feature U and reduce redundancy, the following fusion feature optimization process is also included:
[0049] Information bottleneck optimization: Use the information bottleneck theory to optimize the fusion feature U and define the objective function F:
[0050] F=I(U;Y)-β·I(Q;U)
[0051] Among them, I(U; Y) represents the mutual information between the fused feature U and the target variable Y, I(Q; U) represents the mutual information between the original feature Q and the fused feature U, β is the balance parameter, and the optimization goal is to maximize F, that is, maximize I(U; Y) and minimize I(Q; U), so as to obtain a feature representation U` with rich information but low complexity;
[0052] Sparse representation: The original fusion feature U is represented as a linear combination of sparse basis vectors:
[0053] U=D·μ
[0054] Where D is a sparse basis matrix, μ is a sparse coefficient vector, and the sparse representation is obtained by solving the following optimization problem:
[0055] min||U`-D·μ|| 2 2 +γ·||μ|| 1
[0056] Among them, ||·|| 2 represents the L2 norm, ||·|| 1 represents the L1 norm, γ is the regularization parameter;
[0057] Feature selection: Based on the results of sparse representation, feature selection is performed; k components μ with the largest absolute value in μ are selected * , the corresponding basis vectors constitute the optimized feature representation U * :
[0058] U * =D·μ *
[0059] Nonlinear mapping: Finally, a nonlinear mapping function g is used to further enhance the expressiveness of the features:
[0060] U final =g(U *).
[0061] Preferably, the prediction output module is a designed multi-scale attention output layer, including multi-scale feature decomposition, attention mechanism, feature aggregation, nonlinear transformation and output layer;
[0062] Multi-scale feature decomposition: In order to capture feature information from different scales, the fusion feature U final Perform multi-scale decomposition; introduce multi-scale feature extraction function F s Perform eigendecomposition:
[0063] U m =F m (U final ), m∈{1, 2, …, M}
[0064] Among them, F m It represents the feature extraction function at scale m. Features of different scales are obtained by applying convolution kernels of different sizes. m is the total number of scales.
[0065] Attention mechanism: It can automatically learn and assign weights so that the model can dynamically highlight the key features in each scale; for each feature U at each scale m m , define the attention function:
[0066] att m =softmax(W a tanh(W m ·U m +b m ))
[0067]
[0068] Among them, W a and W m is a learnable weight matrix used to adjust and transform the input features U m b m is the bias term; It is the feature representation after the attention mechanism;
[0069] Feature aggregation: By integrating information at different scales, the final feature representation contains multi-level and multi-angle feature information:
[0070]
[0071] Among them, Concat is a feature concatenation operation, which combines the attention-weighted features of all scales;
[0072] Nonlinear transformation: aggregated features U aggThis is processed through a nonlinear transformation layer using a ReLU activation function and a fully connected layer:
[0073] R = ReLU(W r ·U agg +b r )
[0074] Among them, W r is the weight matrix, b r is the bias term; ReLU is the activation function; the feature R after nonlinear transformation is the high-level feature representation finally used for prediction;
[0075] Output layer: The feature R is converted into a predicted output of the crop type through a fully connected layer and a softmax function. The output is the optimal planting density of the wheat field:
[0076] Y = softmax(W o ·R+b o )
[0077] Among them, W o is the weight matrix of the output layer, b o is the bias term; through the softmax function, the model can generate the optimal planting density Y for the wheat field.
[0078] Compared with the prior art, the present invention has the following beneficial effects:
[0079] 1. Comprehensive multimodal data collection and labeling method: The present invention proposes a comprehensive multimodal data collection and labeling method that goes beyond the limitations of traditional single data source collection. By integrating three types of data: soil properties, climate conditions, and historical crop performance, and using high-precision sensors for real-time monitoring, this method ensures the diversity and accuracy of the data. In terms of data labeling, the present invention innovatively introduces a comprehensive scoring mechanism that dynamically integrates expert knowledge and historical data analysis results, effectively overcoming the limitations of traditional methods that rely solely on expert experience or historical data, thereby greatly improving the accuracy and consistency of data labeling. Experimental results show that compared with the traditional single-source labeling method, the consistency between the labels generated by this method and the actual planting results has been significantly improved, thereby providing a solid data foundation for subsequent model training and optimization.
[0080] 2. Efficient multimodal feature extraction framework: The feature extraction module of the present invention captures key information in different modal data, making the extracted features significantly better than traditional methods in terms of information richness and expression ability. In particular, it performs well in terms of information retention of soil characteristics and the prediction contribution of temporal correlation of climate characteristics. This high-quality feature provides strong support for the final prediction of the model.
[0081] 3. Novel multimodal feature fusion mechanism: This paper designs a dynamic weighted adaptive attention network (DWAAN) to achieve effective fusion of multimodal features. Different from the traditional simple feature splicing or fixed weight weighted summation method, this mechanism can adaptively adjust the weights of different modal features and dynamically optimize the fusion process through the back propagation algorithm, thereby ensuring the flexibility and accuracy of feature fusion under different conditions. Adaptive weight adjustment ensures that the model can dynamically respond to changes in different environmental conditions, and the fused features show excellent prediction performance in cross-regional tests and extreme climate conditions.
[0082] 4. Multi-scale attention output module (prediction output module) based on deep learning: This paper proposes an innovative multi-scale attention output layer (MSA0L) for efficient prediction of barley crop types. Different from the traditional output layer, MSA0L can capture important information of different scales from the fused features through multi-scale feature decomposition and adaptive attention mechanism, and enhance the expression ability of the model through nonlinear transformation. This module not only improves the accuracy of prediction, but also enhances the adaptability of the model under different regions and environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 The figure is an overall logic block diagram of the recommended method for growing barley crops of the present invention.
[0084] Figure 2 This is a diagram of the autoencoder network structure of the present invention.
[0085] Figure 3 This is the Re-LSTM network structure diagram of the present invention.
[0086] Figure 4 This is the network structure diagram of the multimodal feature fusion module of the present invention.
[0087] Figure 5 This is a comparison chart of the experimental results of the intelligent recommendation model of the present invention and other models. DETAILED DESCRIPTION
[0088] The invention will be further described below in conjunction with specific embodiments.
[0089] The present invention aims to solve the problems existing in the existing barley crop planting recommendation method through an innovative technical solution, and provide a new solution for the field of intelligent recommendation of barley crop planting. Figure 1As shown. First, obtain historical data sets, including soil property data, climate condition data, and barley growth status data; then preprocess the data sets, including missing value processing, outlier detection processing, data normalization, and label the data based on the barley growth status data, with the label being the planting density, to obtain standard input data for model training; then build a barley crop planting intelligent recommendation model, which includes a multimodal feature extraction module, a multimodal feature fusion module, and a prediction output module. Train and deploy the model, and predict the appropriate planting density of the wheat field to be tested based on the newly acquired historical data of the wheat field to be tested.
[0090] 1. Dataset Construction
[0091] This phase aims to collect, process and label data for training the intelligent recommendation model for barley crop planting. High-quality and diverse data is the basis for building an effective intelligent recommendation model for barley crop planting, so this process is crucial to the performance of the model.
[0092] 1. Overview of target area:
[0093] The present invention selects the temperate semi-arid region located at 33°-42°N and 82°-108°E as the target area for barley planting. This region has typical continental climate characteristics, with an annual average temperature between 8°C and 15°C and an annual precipitation between 300-600mm, which is very suitable for the growth of barley.
[0094] 2. Multimodal data acquisition:
[0095] Collect multimodal historical data of one planting cycle of N wheat fields from the records of relevant departments. For a certain wheat field, it is necessary to collect the soil property data (X soil ), climate condition data (X climate ) and barley growth data (X growth ), as follows:
[0096] (1) Soil property data (X soil ): Soil property data are collected from the agricultural sector, including daily average soil pH, daily average organic matter content, and daily average nitrogen, phosphorus and potassium content. Soil property data are stored in CSV format.
[0097] (2) Climate condition data (X climate ): Historical climate condition data collected from the agricultural sector include daily average temperature, daily average precipitation, daily average relative humidity and sunshine hours. Climate condition data are stored in NetCDF (Network Common Data Form) format.
[0098] (3) Barley growth data (Xgrowth ): The average height of wheat plants, the average accumulation of dry matter of wheat plants and the yield of wheat fields in seven growth stages, namely germination, seedling, jointing, booting, heading, filling and maturity, were collected from the agricultural department; the average height of wheat plants was represented by the average height of barley plants sampled from the wheat field, and the average accumulation of dry matter of wheat plants was represented by the average accumulation of dry matter of barley plants sampled from the wheat field; the barley growth status data was stored in CSV format.
[0099] 2. Data Preprocessing
[0100] 1. Missing value processing:
[0101] Time series data: When there are short-term missing values in soil property data and climate condition data, linear interpolation is used to fill them. This method estimates the missing value by calculating and drawing a straight line between the known data points before and after the missing value. This is very effective for continuous time series data such as soil property data and climate condition data.
[0102] 2. Outlier detection and processing:
[0103] The modified Z-score method is used to detect outliers in soil property data and climate condition data. This method calculates the difference between the data point and the median of the data set and standardizes the difference to determine whether it is an outlier and remove it.
[0104] 3. Data normalization: The Min-Max normalization method is used to scale the soil property data and climate condition data to a fixed range, that is, fixed to [0, 1]. This normalization method helps to eliminate the dimensional differences between different features and is suitable for subsequent model training.
[0105] The soil property data and climate condition data obtained after data preprocessing are recorded as and
[0106] 4. Data labeling:
[0107] Tag definition:
[0108] According to the requirements of the barley crop planting intelligent recommendation task, the label is defined as the recommended planting density of barley in the wheat field. This label will reflect the optimal planting density of barley plants under given wheat field conditions (including soil and climate). Agricultural experts are invited to evaluate the optimal planting density of the wheat field based on the soil condition data, climate condition data and barley growth condition data of the wheat field, which is recorded as Score. expert .
[0109] Label update mechanism:
[0110] Designing a dynamic update mechanism allows existing labels to be updated and optimized as new implant data or expert feedback becomes available. This ensures that the labeling system can continue to improve its accuracy and usefulness over time.
[0111] The label after label arbitration is recorded as L.
[0112] 5. Dataset construction:
[0113] In order to divide the labeled data into training set, validation set and test set, and prepare for model training, evaluation and testing, it is necessary to construct a dataset: the labeled dataset is recorded as The training set, validation set, and test set are divided into 8:1:1 ratios. This division ensures that there is sufficient data for parameter adjustment and optimization during the model training process. After the model training, the validation set is evaluated and the final performance of the test set is verified to ensure the generalization ability and effectiveness of the model.
[0114] 3. Construction of intelligent recommendation model for barley crop planting and its data processing
[0115] The intelligent recommendation model for barley crop planting includes a multimodal feature extraction module, a multimodal feature fusion module and a prediction output module; the multimodal feature extraction module includes a soil modal feature extraction unit and a climate modal feature extraction unit; the soil modal feature extraction unit captures the complex nonlinear relationship in the soil data and compresses the high-dimensional original data into a low-dimensional feature space, and the climate modal feature extraction unit compresses the climate data into a comprehensive climate feature parameter by capturing long-term and short-term time series patterns; the multimodal feature fusion module fuses the feature data obtained by the multimodal feature extraction module, dynamically adjusts their weights in the fusion process by learning the correlation between different modal features, and uses the attention mechanism to highlight important features, and finally realizes nonlinear feature fusion through a multi-layer perceptron; the prediction output module outputs the suitable planting density of the wheat field based on the input fusion features.
[0116] 1. Multimodal feature extraction module
[0117] (1) Soil modal feature extraction unit:
[0118] In order to effectively extract the soil characteristics of the wheat field, a nonlinear feature extraction method based on autoencoder was used to extract This method can capture the complex nonlinear relationship in soil data and compress the high-dimensional raw data into a low-dimensional feature space. The details are as follows:
[0119] Autoencoder structure design: The autoencoder network structure is as follows: Figure 2 As shown in the figure. A three-layer autoencoder is designed, consisting of an encoder and a decoder. The input layer and output layer of the autoencoder both contain the same number of neurons as the original features to ensure lossless reconstruction of the input data. The number of neurons in the hidden layer is set to one-third of the input layer, which effectively compresses the original data and extracts its most important features. This design enables the autoencoder to perform well in tasks such as data dimensionality reduction, feature extraction, and noise removal.
[0120] The core advantage of autoencoders is that they can automatically learn low-dimensional representations of data in an unsupervised learning environment. This not only improves the training efficiency of the model, but also reduces the complexity of the model and reduces the risk of overfitting. In addition, the symmetrical structure design of the encoder and decoder ensures that the original information can be well restored while compressing the data, making it have strong application potential in tasks such as signal reconstruction and data generation.
[0121] Model training: Use mean square error (MSE) as the loss function and use Adam optimizer for model training. The training process can be expressed as minimizing the following objective function:
[0122]
[0123] in, is the input sample of preprocessed soil property data, is the actual reconstructed output during the autoencoder training process, is the predicted reconstruction output of the autoencoder of the soil feature extraction mechanism, θ is the model parameter, and n is the number of samples.
[0124] Feature extraction: After the autoencoder training is completed, the encoder part of the autoencoder is used to map the raw soil data to a low-dimensional feature space. The extracted features can be expressed as:
[0125]
[0126] Among them, s soil The features extracted by the encoder of the autoencoder, Encoder soil is the encoder feature extraction function of the autoencoder, σ is the activation function, w soil is the encoder weight matrix of the autoencoder, b soil is the bias term.
[0127] Feature fusion: The extracted low-dimensional features are fused into a comprehensive soil feature parameter S by weighted summation:
[0128]
[0129] Among them, m is the dimension of low-dimensional features, is the weight of each feature (learned by back-propagation), is the i-th eigenvalue.
[0130] Through the feature extraction method of the autoencoder, the complex soil property data (including the daily average soil pH value, the daily average organic matter content and the daily average nitrogen, phosphorus and potassium content) are compressed into a comprehensive soil characteristic parameter S, which contains the key information in the original data.
[0131] (2) Climate mode feature extraction unit
[0132] Climate modal feature extraction uses a time series feature extraction method based on the improved long short-term memory network (Re-LSTM). This method is particularly suitable for processing climate condition data with time dependence and can capture long-term and short-term time series patterns. Through this method, climate data (including daily average temperature, daily precipitation, relative humidity and sunshine hours) are compressed into a comprehensive climate characteristic parameter C. The specific steps are as follows:
[0133] Re-LSTM network structure design: Design and build a network structure that includes an input layer, a Re-LSTM layer, and a fully connected output layer. The input layer is used to receive time series data, and the Re-LSTM layer is the core part of the network; the input layer is used to receive time series data, and the Re-LSTM layer is a neural network structure that can capture long-term dependencies in time series data. The model structure is as follows Figure 3 As shown in the figure, it consists of a residual layer, a random inactivation layer and an LSTM layer. The residual layer allows Re-LSTM to retain the original input information while learning new features. This design simplifies the learning task of Re-LSTM and makes it easier for Re-LSTM to learn useful feature representations. The random inactivation layer randomly sets the output of some neurons in Re-LSTM to zero, which can reduce the synergy between neurons, thereby reducing the complexity of Re-LSTM and avoiding overfitting. Unlike traditional RNN (recurrent neural network), Re-LSTM can effectively remember and utilize key information over a long time span through its unique gating mechanism, while suppressing irrelevant or redundant information, which is particularly important for processing time series data.
[0134] In this design, the number of units in the Re-LSTM layer is set to 64. This setting is the result of multiple experimental verifications, with the goal of achieving the best balance between model complexity and performance. The design of 64 units can fully explore the temporal patterns in historical crop performance data without excessively increasing the computational cost. This structural design enables the Re-LSTM network to not only effectively respond to short-term changes in the data, but also capture long-term trends, providing a solid foundation for subsequent feature extraction and decision-making.
[0135] Model training: Use mean square error (MSE) as the loss function and use Adam optimizer for model training. The training process can be expressed as minimizing the following objective function:
[0136]
[0137] in, is the input sample of climate condition data, is the real output during the Re-LSTM network training process, is the predicted output of the Re-LSTM network, θ is the model parameter, and n is the number of samples.
[0138] Feature extraction: After the Re-LSTM network training is completed, the hidden state of the last time step of the LSTM layer is used as the extracted feature. This feature can be expressed as:
[0139]
[0140] in, is the hidden state of the last time step, Re-LSTM is the Re-LSTM network, arrive is the input sample sequence data.
[0141] Feature fusion: The features extracted by Re-LSTM are mapped to a comprehensive historical crop performance feature parameter C through a fully connected layer:
[0142]
[0143] Among them, σ is the activation function, w climate is the weight matrix of the mapping layer in the Re-LSTM network, b climate is the bias term.
[0144] Through this Re-LSTM-based approach, climate condition data are compressed into a comprehensive feature parameter C, which not only contains the information of the original data but also captures the temporal patterns and long-term dependencies in the data.
[0145] This multimodal feature extraction method can effectively extract key information from different types of data, laying the foundation for subsequent feature fusion and intelligent recommendation.
[0146] 2. Multimodal feature fusion module
[0147] In order to effectively fuse soil property data feature S and climate condition data feature C, this study proposed an innovative multimodal feature fusion method - Dynamic Weighted Adaptive Attention Network (DWAAN). This method combines dynamic weight allocation, adaptive attention mechanism and multi-layer perceptron, which can make full use of the interaction between different modal features and automatically adjust the importance of each feature during the fusion process. Its network structure is as follows: Figure 4 shown.
[0148] The core idea of DWAAN is to learn the correlation between features of different modalities, dynamically adjust their weights in the fusion process, and use the attention mechanism to highlight important features, and finally realize nonlinear feature fusion through multi-layer perceptron. The specific steps are as follows:
[0149] Dynamic weight allocation: First, a dynamic weight allocation mechanism is introduced to learn the relative importance of different modal features. Define the weight learning function f w :
[0150] f w (S, C) = softmax(w w ·[S;C]+b w )
[0151] Among them, w w is the weight matrix, b w is the bias term, and [S; C] is the concatenation of the soil property data feature S and the climate condition data feature C. The weight α of the two modal features is obtained through the softmax function. S and α C , and satisfy α S +α C =1.
[0152] Adaptive attention mechanism: Next, the importance of each feature in the two modalities is not completely consistent. In order to effectively capture the key features in each modality, an adaptive attention mechanism is designed, which can adaptively adjust the importance of each feature so that the truly important features can be given a higher weight during the fusion process. Specifically, the core of the adaptive attention mechanism is to assign an attention weight to each modal feature, which is determined by an attention function. For each modal feature Q∈{S, C}, define the attention function f a :
[0153] f a (Q) = softmax(w a ·tanh(w q Q+b q )+b a )
[0154] Among them, w a and w q are weight vectors, which are used to adjust and transform the representation of the input feature Q. a and b q is a bias term that provides a flexible translation parameter for the attention function. tanh is a hyperbolic tangent activation function that is responsible for introducing nonlinearity, thereby enhancing the model's ability to capture complex feature relationships.
[0155] Through this process, we can get an attention weight vector w Q =f a (Q), the vector w Q Indicates the importance of each feature within the modality. Next, the original feature Q is combined with the weight vector w Q Multiply element by element to get the adjusted feature representation Q`:
[0156] Q`=Q⊙w Q
[0157] Among them, ⊙ represents the element-by-element multiplication operation (i.e., Hadamard product). This step can effectively amplify the influence of important features and weaken the role of unimportant features.
[0158] Multilayer Perceptron Fusion: Finally, a multilayer perceptron (MLP) is used to perform nonlinear fusion on the weighted features:
[0159] U=MLP(α S ·S`+α C ·C`)
[0160] Among them, the structure of MLP contains multiple fully connected layers and nonlinear activation functions:
[0161] U = ReLU(w 2 ReLU(w 1 ·(α S ·S`+α C ·C`)+b 1 )+b 2 )
[0162] Among them, w 1 and w 2 is the weight matrix, b 1 and b 2 is the bias term.
[0163] In order to further improve the expressive power of the fusion feature U and reduce redundancy, a feature optimization method based on information bottleneck theory and sparse representation is proposed. This method aims to retain the most relevant information while minimizing the complexity of the features. The specific steps are as follows:
[0164] (1) Information bottleneck optimization: Use the information bottleneck theory to optimize the fusion feature U. Define the objective function F:
[0165] F=I(U;Y)-β·I(Q;U)
[0166] Among them, I(U; Y) represents the mutual information between the fused feature U and the target variable Y, I(Q; U) represents the mutual information between the original feature Q and the fused feature U, and β is a balance parameter. The optimization goal is to maximize F, that is, maximize I(U; Y) and minimize I(Q; U), so as to obtain a feature representation U` with rich information but low complexity.
[0167] (2) Sparse representation: In order to further reduce the redundancy of features, a sparse representation method is introduced. The original fusion feature U is represented as a linear combination of sparse basis vectors:
[0168] U=D·α
[0169] Where D is the sparse basis matrix and α is the sparse coefficient vector. The sparse representation is obtained by solving the following optimization problem:
[0170] min||U`-D·α|| 2 2 +γ.||α|| 1
[0171] Among them, ||·|| 2 represents the L2 norm, ||·|| 1 represents the L1 norm and γ is the regularization parameter.
[0172] (3) Feature selection: Based on the results of sparse representation, feature selection can be performed. Select the k components α with the largest absolute value in α *, the corresponding basis vectors constitute the optimized feature representation U * :
[0173] U * =D·α *
[0174] (4) Nonlinear mapping: Finally, a nonlinear mapping function g is used to further enhance the expressiveness of the features:
[0175] U final =g(U * )
[0176] Through the innovative dynamic weighted adaptive attention network (DWAAN) and the feature optimization method based on information bottleneck theory and sparse representation, an optimized fusion feature U final , which not only retains the key information of the original features, but also has stronger expression ability and lower redundancy. It achieves efficient fusion and optimization of multimodal features. This lays a solid foundation for the subsequent barley crop planting recommendation task.
[0177] 3. Prediction output module
[0178] In order to achieve efficient and accurate intelligent recommendation task of barley crop planting, a new multi-scale attention output layer (MSAOL) is designed. This architecture makes full use of the fusion feature U through multi-scale feature decomposition, attention mechanism, feature aggregation, nonlinear transformation and output layer. final The rich information in , especially the feature representation at different scales, significantly improves the prediction accuracy and generalization ability of the model.
[0179] (1) Multi-scale feature decomposition: First, in order to capture feature information from different scales, the fusion feature U final Perform multi-scale decomposition. This process aims to obtain local and global information of features so that the model can identify key features at different scales. Specifically, the multi-scale feature extraction function F is introduced s Perform eigendecomposition:
[0180] U m =F m (U final ), m∈{1, 2, …, M}
[0181] Among them, F m represents the feature extraction function at scale m. Features of different scales can be obtained by applying convolution kernels of different sizes. m is the total number of scales to balance the fine-grainedness of feature extraction and the computational cost.
[0182] (2) Attention mechanism: In order to further enhance the model's attention to important features, an attention mechanism is introduced for each scale feature. The attention mechanism can automatically learn and assign weights, allowing the model to dynamically highlight the key features at each scale. For each scale m feature U m , define the attention function:
[0183] α m =softmax(W a tanh(W m ·U m +b m ))
[0184]
[0185] Among them, W a and W m is a learnable weight matrix used to adjust and transform the input features U m b m is the bias term. It is the feature representation after the attention mechanism.
[0186] Through this attention mechanism, important information at each scale can be effectively amplified, while secondary information is weakened accordingly, thereby improving the accuracy of the model in feature selection.
[0187] (3) Feature aggregation: After weighting the features at each scale, the weighted features at all scales are aggregated. This step integrates information at different scales so that the final feature representation contains multi-level and multi-angle feature information:
[0188]
[0189] Among them, Concat is a feature concatenation operation, which combines the attention-weighted features of all scales and provides rich input for subsequent nonlinear transformations.
[0190] (4) Nonlinear transformation: aggregated feature U agg It is processed through a nonlinear transformation layer to enhance the expressiveness of the model. The ReLU activation function and the fully connected layer are used for this transformation:
[0191] R = ReLU(W r ·U agg +b r )
[0192] Among them, W r is the weight matrix, b ris the bias term. The ReLU activation function can effectively introduce nonlinearity, allowing the model to handle more complex feature interactions. The feature R after nonlinear transformation is the high-level feature representation ultimately used for prediction.
[0193] (5) Output layer: The final output layer converts the feature R into a predicted output of the crop type through a fully connected layer and a softmax function. The output is the optimal planting density of the wheat field:
[0194] Y = softmax(W o ·R+b o )
[0195] Among them, W o is the weight matrix of the output layer, b o is the bias term. Through the softmax function, the model can generate the optimal planting density Y of the wheat field;
[0196] This innovative multi-scale attention output layer design not only makes full use of the multi-scale information of the fused features, but also significantly improves the expressiveness and prediction accuracy of the model through the attention mechanism and nonlinear transformation layer.
[0197] 4. Model Training and Deployment
[0198] 1. Model training:
[0199] Based on the multi-feature-based intelligent recommendation model for barley crop planting described above, the labeled training dataset is input into the model, and the model is trained end-to-end using an autoregressive approach.
[0200] Data input and feature extraction: The labeled training data set is input into the model, and the input data is processed for missing values, outlier detection and processing, and time alignment. Then, feature extraction is performed using an autoencoder and Re-LSTM network to obtain soil features S and climate features C. The final fused feature representation U is obtained based on the feature fusion mechanism and the optimization of fused features. final .
[0201] Get the recognition result: The fused feature U final The data is sent to the prediction output module to obtain the recommended planting density Y of the final output wheat field;
[0202] Define the loss function: Design a suitable loss function, compare the result Y obtained by the model with the manually annotated label L, and thus construct the loss function loss:
[0203]
[0204] Where N is the training batch size, Y i and Li The predicted results and labeled labels of the model in the i-th training batch;
[0205] Loss calculation and gradient update: Adopt Adam optimization algorithm to update the gradient of model parameters according to loss function:
[0206]
[0207] Among them, θ represents the parameters to be updated, including all weight matrices and bias vectors in the proposal model. is the learning rate, which controls the step size of each parameter update. Represents the gradient of the loss function loss to the parameter θ, which represents the rate of change of the loss function to the parameter, by multiplying it by the learning rate The parameter θ can be updated according to the direction and size of the gradient, so that the loss function is gradually reduced and the model can better adapt to the training data. The updated parameter θ′ will be used in the next iteration of the training process;
[0208] Adaptive learning rate: Different learning rates are assigned to different layers. The learning rate of the lower layer is smaller than that of the higher layer. This can protect the basic features obtained by the lower layer from being destroyed.
[0209] Training termination condition: According to the loss function value of the validation set, when the loss cannot be reduced for N consecutive epochs, the training process is terminated;
[0210] Model saving: Save the final model parameters at the end of training as the final deployment model for the proposal.
[0211] 2. Model deployment:
[0212] After completing model training and verification, the next step is to deploy the barley crop planting intelligent recommendation model to the actual application environment. The goal of model deployment is to enable the model to run efficiently and stably in the actual production environment and provide users with accurate barley planting density. The deployment process includes the following key steps:
[0213] Environment preparation: Choose a suitable deployment environment, which can be a cloud server, edge device, or local server. Ensure that the deployment environment has sufficient computing resources and storage space, and install necessary dependent libraries and frameworks.
[0214] Model packaging: Encapsulate the model into a standalone service or application. This may involve using Docker containerization technology to ensure that the model runs consistently in different environments.
[0215] API Development: Develop a RESTful API interface that allows external systems or applications to interact with the model. The API should be able to receive requests containing soil, climate, and historical planting data and return barley planting density results.
[0216] Data preprocessing module integration: Integrate the data preprocessing module into the deployment environment to ensure that the input data is properly processed and standardized before entering the model. This includes missing value processing, outlier detection, and time alignment steps.
[0217] Multimodal feature extraction module deployment: Deploy feature extraction modules for soil properties and climate conditions, including autoencoders and improved long short-term memory networks (Re-LSTM). Ensure that these modules can efficiently extract key features from input data.
[0218] Inference engine deployment: Deploy an inference engine that can process multi-feature inputs and generate recommendation results. This engine should be able to integrate features from different modalities and generate the final barley variety recommendation based on the trained model.
[0219] Load balancing and scalability configuration: Configure the load balancing mechanism to ensure that the system can handle multiple concurrent requests. At the same time, design the system architecture to have good scalability and be able to increase computing resources according to demand.
[0220] Monitoring and logging system: Deploy monitoring and logging systems to track the performance, resource usage, and prediction results of the model in real time. This helps to discover and solve potential problems in a timely manner and provide a basis for subsequent model updates.
[0221] Deployment testing and verification: Conduct comprehensive deployment testing in the actual production environment to verify the performance, stability, and reliability of the model. Make necessary adjustments and optimizations based on the test results.
[0222] Through the above steps, the multi-feature-based intelligent recommendation model for barley crop planting can be effectively deployed in the actual application environment to provide users with accurate and reliable barley planting recommendation services.
[0223] 200 wheat fields were used as validation sets to verify the accuracy of the method proposed in this invention. The comparison methods used long short-term memory network (LSTM), echo state network (ESN) and extreme learning machine (ELM). MSE and MAE were used as evaluation indicators. The results are shown in Figure 2. Figure 5 As shown, the method of the present invention has the smallest MSE and MAE, which verifies the effectiveness of the method.
[0224] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0225] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for recommending barley crop planting, characterized in that: The following steps are involved: S1, obtaining the soil property data and climate condition data of the most recent planting cycle of the wheat field to be tested; S2, preprocessing the acquired soil property data and climate condition data to obtain standard input data for model training; S3, inputting the standard input data into the trained barley crop planting intelligent recommendation model, and outputting the appropriate planting density of the tested wheat field; The barley crop planting intelligent recommendation model includes a multimodal feature extraction module, a multimodal feature fusion module and a prediction output module; The multimodal feature extraction module includes a soil modal feature extraction unit and a climate modal feature extraction unit; The soil modal feature extraction unit captures the complex nonlinear relationship in the soil data and compresses the high-dimensional raw data into a low-dimensional feature space. The climate modal feature extraction unit compresses the climate data into a comprehensive climate characteristic parameter by capturing long-term and short-term temporal patterns. The multimodal feature fusion module fuses the feature data obtained by the multimodal feature extraction module, dynamically adjusts their weights in the fusion process by learning the correlation between different modal features, and uses the attention mechanism to highlight important features, and finally realizes nonlinear feature fusion through a multi-layer perceptron; the multimodal feature fusion module adopts a dynamic weighted adaptive attention network, including dynamic weight allocation, adaptive attention mechanism and multi-layer perceptron fusion; in order to further improve the expression ability of the fusion feature U and reduce redundancy, it also includes the following fusion feature optimization process: Information bottleneck optimization: Use the information bottleneck theory to optimize the fusion feature U and obtain a feature representation U` that is rich in information but less complex; Sparse representation: The original fusion feature U is represented as a linear combination of sparse basis vectors: U=D·μ Where D is a sparse basis matrix, μ is a sparse coefficient vector, and the sparse representation is obtained by solving the following optimization problem: min||U`-D·μ||2 2 +γ·||μ||1 Among them, ‖·‖2 represents the L2 norm, ‖·‖1 represents the L1 norm, and γ is the regularization parameter; Feature selection: Based on the results of sparse representation, feature selection is performed; k components μ with the largest absolute value in μ are selected * , the corresponding basis vectors constitute the optimized feature representation U * : The * =D·μ * Nonlinear mapping: Finally, a nonlinear mapping function g is used to further enhance the expressiveness of the features; The prediction output module outputs the appropriate planting density of the wheat field based on the input fusion features.
2. A method for recommending barley crop planting according to claim 1, characterized in that: The soil property data include daily average soil pH value, daily average organic matter content and daily average nitrogen, phosphorus and potassium content, and the climate condition data include daily average temperature, daily average daily precipitation, daily average relative humidity and sunshine hours.
3. A barley crop planting recommendation method according to claim 1 or 2, characterized in that: When constructing a data set for training an intelligent recommendation model for barley crop planting, historical data of the above-mentioned soil property data and climate condition data of N wheat fields in one planting cycle are collected through records of relevant departments or actual experiments, and barley growth status data in the corresponding planting cycle are obtained, including the average height of wheat plants and the average accumulation of dry matter of wheat plants in seven growth stages of germination, seedling, jointing, booting, heading, filling and maturity, as well as the yield of wheat fields. The average height of wheat plants is represented by the average height of barley plants obtained by sampling the wheat field, and the average accumulation of dry matter of wheat plants is represented by the average accumulation of dry matter of barley plants obtained by sampling the wheat field. The barley growth status data is used to evaluate the appropriate planting density.
4. The method for recommending barley crop planting according to claim 1, characterized in that: The preprocessing includes missing value processing, outlier detection processing and data normalization; The missing value processing is to fill in the short-term missing values in the soil property data and climate condition data by linear interpolation; the outlier detection processing is to determine whether it is an outlier by calculating the difference between the data point and the median of the data set and standardizing the difference to eliminate it; the data normalization is to use the Min-Max normalization method to scale the soil property data and climate condition data to a fixed range, that is, fixed to [0, 1], to eliminate the dimensional differences between different features.
5. The method for recommending barley crop planting according to claim 1, characterized in that: The soil modal feature extraction unit is designed to obtain a three-layer autoencoder, which consists of an encoder and a decoder; the input layer and the output layer of the autoencoder both contain the same number of neurons as the original features to ensure that the input data can be reconstructed losslessly, and the number of neurons in the hidden layer is set to one third of the input layer, so as to effectively compress the original data and extract its most important features; The encoder part of the autoencoder is used to map the raw soil data into a low-dimensional feature space; the extracted features are represented as: Among them, s soil The features extracted by the encoder of the autoencoder, Encoder soil is the encoder feature extraction function of the autoencoder, σ is the activation function, w soil is the encoder weight matrix of the autoencoder, b soil is the bias term; The extracted low-dimensional features are then fused into a comprehensive soil characteristic parameter S by weighted summation: Among them, m is the dimension of low-dimensional features, is the weight of each feature, learned through back propagation, is the i-th eigenvalue.
6. A barley crop planting recommendation method according to claim 1, characterized in that: The climate modal feature extraction unit adopts an improved long short-term memory network Re-LSTM time series feature extraction method, comprising an input layer, a Re-LSTM layer and a fully connected output layer; the input layer is used to receive time series data, the Re-LSTM layer is a neural network structure that can capture long-term dependencies in time series data, and is composed of a residual layer, a random inactivation layer and an LSTM layer. The residual layer enables the Re-LSTM to retain the original input information while learning new features, and the random inactivation layer randomly sets the output of a part of neurons in the Re-LSTM to zero; the number of LSTM layers in the Re-LSTM layer is set to 64 to fully explore the time series patterns in the historical crop performance data; The hidden state of the last time step of the Re-LSTM layer is used as the extracted feature, which is expressed as: in, is the hidden state at the last time step, arrive is the input sample sequence data; The features extracted by Re-LSTM are then mapped to a comprehensive historical crop performance feature parameter C through a fully connected layer: Among them, σ is the activation function, w climate is the weight matrix of the mapping layer in the Re-LSTM network, b climate is the bias term.
7. The method for recommending barley crop planting according to claim 1, characterized in that: The specific processing process of the multimodal feature fusion module is as follows: First, based on the dynamic weight allocation mechanism, the relative importance of different modal features is learned and the weight learning function f is defined w : f w (S,C)=softmax(w w ·[S;C]+b w ) Among them, w w is the weight matrix, b w is the bias term, [S; C] is the feature concatenation of soil property data feature S and climate condition data feature C. The weight α of the two modal features is obtained through the softmax function. S and α C , and satisfy α S +α C =1; Then, based on the designed adaptive attention mechanism, the importance of each feature is adaptively adjusted so that in the fusion process, an attention weight is assigned to each modal feature. This weight is determined by an attention function. For each modal feature Q∈{S, C}, the attention function f is defined as a : f a (Q)=softmax(w a ·tanh(w q ·Q+b q )+b a ) Among them, w a and w q is a weight vector, which is used to adjust and transform the representation of the input feature Q; b a and b q is a bias term, providing a flexible translation parameter for the attention function; tanh is a hyperbolic tangent activation function, responsible for introducing nonlinearity; an attention weight vector w is obtained Q =f a (Q), the vector w Q represents the importance of each feature within the modality; next, the original feature Q is combined with the weight vector w Q Multiply element by element to get the adjusted feature representation Q`: Q`=Q⊙w Q Among them, ⊙ represents the element-by-element multiplication operation, Q`∈{S`,C`}; Finally, the multi-layer perceptron MLP is used to perform nonlinear fusion on the weighted features: U=MLP(α S ·S`+α C ·C`) Among them, the structure of MLP contains multiple fully connected layers and nonlinear activation functions: U=ReLU(w2·ReLU(w1·(α S ·S`+α C ·C`)+b1)+b2) Among them, w1 and w2 are weight matrices, and b1 and b2 are bias terms.
8. A method for recommending barley crop planting according to claim 7, characterized in that: The information bottleneck theory is used to optimize the fusion feature U, which is to define the objective function F: F=I(U;Y)-β·I(Q;U) Among them, I(U; Y) represents the mutual information between the fused feature U and the target variable Y, I(Q; U) represents the mutual information between the original feature Q and the fused feature U, β is the balance parameter, and the optimization goal is to maximize F, that is, maximize I(U; Y) and minimize I(Q; U), so as to obtain a feature representation U` with rich information but low complexity.
9. The method for recommending barley crop planting according to claim 1, characterized in that: The prediction output module is a designed multi-scale attention output layer, including multi-scale feature decomposition, attention mechanism, feature aggregation, nonlinear transformation and output layer; Multi-scale feature decomposition: In order to capture feature information from different scales, the fusion feature U final Perform multi-scale decomposition; introduce multi-scale feature extraction function F s Perform eigendecomposition: U m =F m (U final ),m∈{1,2,...,M} Among them, F m It represents the feature extraction function at scale m. Features of different scales are obtained by applying convolution kernels of different sizes. m is the total number of scales. Attention mechanism: It can automatically learn and assign weights so that the model can dynamically highlight the key features in each scale; for each feature U at each scale m m , define the attention function: att m =softmax(W a ·tanh(W m ·U m +b m )) Among them, W a and W m is a learnable weight matrix used to adjust and transform the input features U m b m is the bias term; It is the feature representation after the attention mechanism; Feature aggregation: By integrating information at different scales, the final feature representation contains multi-level and multi-angle feature information: Among them, Concat is a feature concatenation operation, which combines the attention-weighted features of all scales; Nonlinear transformation: aggregated features U agg This is processed through a nonlinear transformation layer using a ReLU activation function and a fully connected layer: R=ReLU(W r ·AT agg +b r ) Among them, W r is the weight matrix, b r is the bias term; ReLU is the activation function; the feature R after nonlinear transformation is the high-level feature representation finally used for prediction; Output layer: The feature R is converted into a predicted output of the crop type through a fully connected layer and a softmax function. The output is the optimal planting density of the wheat field: Y =softmax(W o ·R+b o ) Among them, W o is the weight matrix of the output layer, b o is the bias term; through the softmax function, the model can generate the optimal planting density Y for the wheat field.
Citation Information
Patent Citations
Tranformer winter wheat yield prediction method in combination with meteorological suitability
CN118485321A