Flue-cured tobacco yield estimation method and electronic equipment
By constructing a GA-ST-LSTM model and combining a spatiotemporal fusion feature matrix and an adversarial training module, the problem of insufficient feature extraction in flue-cured tobacco yield prediction by BP neural networks and conventional LSTM networks is solved, achieving higher prediction accuracy and adaptability.
Patent Information
- Application Number
- CN202511868793.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-17
AI Technical Summary
Existing BP neural networks and conventional LSTM networks cannot effectively capture interannual climate trends and the growth characteristics of flue-cured tobacco in predicting flue-cured tobacco yield, resulting in insufficient prediction accuracy.
The GA-ST-LSTM model was adopted. By constructing a spatiotemporal fusion feature matrix and combining a growth period attention layer, a spatiotemporal fusion layer and an adversarial training module, the model was trained and validated to improve the accuracy and adaptability of flue-cured tobacco yield prediction.
It improves the accuracy of flue-cured tobacco yield forecasting and the regional adaptability of the model, enabling it to meet the yield forecasting needs under different geographical environments and climatic conditions.
Smart Images

Figure CN121684176A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural information technology, and more specifically, to a method and electronic device for predicting flue-cured tobacco yield. Background Technology
[0002] With the development of agricultural informatization and intelligentization, the prediction of flue-cured tobacco yield has gradually shifted from traditional experience-based judgment and statistical analysis to model-based prediction. With the development of deep learning technology, some studies have used models such as BP neural networks and conventional LSTM networks for flue-cured tobacco yield prediction. However, BP neural networks cannot capture the cumulative impact of interannual climate trends on yield; while conventional LSTM networks have time-series modeling capabilities, they cannot optimize for the growth characteristics of flue-cured tobacco and suffer from insufficient feature extraction specificity, thus limiting the accuracy of flue-cured tobacco yield prediction. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a method and electronic device for predicting flue-cured tobacco yield, which can improve the problem of insufficient targeting of feature extraction and help improve the prediction accuracy of flue-cured tobacco yield.
[0004] To achieve the above technical objectives, the technical solution adopted in this application is as follows:
[0005] In a first aspect, embodiments of this application provide a method for estimating flue-cured tobacco yield, the method comprising:
[0006] Obtain historical datasets for the target region, including meteorological data, tobacco crop data, and soil data;
[0007] The historical dataset is preprocessed to obtain a preprocessed grid dataset, wherein the grid dataset includes meteorological data, flue-cured tobacco crop data and soil data corresponding to the corresponding grid area in the target area;
[0008] Based on the grid dataset, an input dataset for model training and testing is constructed, which includes a spatiotemporal fusion feature matrix corresponding to each grid point and flue-cured tobacco yield data;
[0009] The input dataset is divided into training set, test set and validation set according to a preset ratio, and then input into the pre-built GA-ST-LSTM model for training, testing and validation to obtain a validated GA-ST-LSTM model as a prediction model. The GA-ST-LSTM model includes an input layer, a reproductive period attention layer, a spatiotemporal fusion layer, an adversarial training module and an output layer.
[0010] Obtain meteorological and soil data for the target region in a target year, where the target year is the current year or a specified future year;
[0011] The meteorological and soil data for the target year are converted into a current spatiotemporal fusion feature matrix and input into the prediction model to obtain the prediction results of flue-cured tobacco in the target region for the target year. The prediction results include flue-cured tobacco yield.
[0012] Secondly, embodiments of this application also provide an electronic device, which includes a processor and a memory coupled to each other, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device performs the method described above.
[0013] The invention employing the above technical solution has the following advantages:
[0014] The technical solution provided in this application, through the construction of a spatiotemporal fusion feature matrix, can cover multiple key factors affecting flue-cured tobacco yield, such as meteorology, soil, and crops. Combined with the GA-ST-LSTM model's accurate capture of key features of the growth period and spatiotemporal correlation features, the model can uncover complex coupling relationships between multiple factors, thereby improving the accuracy of flue-cured tobacco yield prediction. By adapting gridded data processing to the spatial characteristics of different planting areas, and combining spatiotemporal fusion features to capture regional correlations, the model can adapt to the needs of flue-cured tobacco yield prediction under different geographical environments and climatic conditions, thus improving the model's regional adaptability and generalization ability. Attached Figure Description
[0015] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.
[0016] Figure 1 This is a flowchart illustrating the method for estimating flue-cured tobacco yield provided in an embodiment of this application.
[0017] Figure 2 This is a schematic diagram of the network architecture of the GA-ST-LSTM model provided in the embodiments of this application.
[0018] Figure 3 for Figure 1 A flowchart illustrating the sub-step of step 130. Detailed Implementation
[0019] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] Please refer to the reference. Figure 1 and Figure 2 This application provides a method for estimating flue-cured tobacco yield, which can be applied to electronic devices and executed or implemented by the electronic devices. The electronic devices can be, but are not limited to, personal computers, servers or combinations thereof, and are not specifically limited here.
[0021] Please refer to Figure 1 The method for estimating flue-cured tobacco yield may include the following steps:
[0022] Step 110: Obtain historical datasets for the target area, including meteorological data, flue-cured tobacco crop data, and soil data;
[0023] Step 120: Preprocess the historical dataset to obtain a preprocessed grid dataset, wherein the grid dataset includes meteorological data, flue-cured tobacco crop data and soil data corresponding to the corresponding grid area in the target area;
[0024] Step 130: Based on the grid dataset, construct an input dataset for model training and testing. The input dataset includes a spatiotemporal fusion feature matrix corresponding to each grid point and flue-cured tobacco yield data.
[0025] Step 140: Divide the input dataset into a training set, a test set, and a validation set according to a preset ratio, and input them into the pre-built GA-ST-LSTM model for training, testing, and validation to obtain a validated GA-ST-LSTM model as a prediction model. The GA-ST-LSTM (Growth Stage Attention–Spatio Temporal-Long Short-Term Memory Network) model includes an input layer, a growth stage attention layer, a spatiotemporal fusion layer, an adversarial training module, and an output layer.
[0026] Step 150: Obtain meteorological and soil data for the target region in the target year, where the target year is the current year or a specified future year;
[0027] Step 160: Convert the meteorological data and soil data of the target year into the current spatiotemporal fusion feature matrix and input it into the prediction model to obtain the prediction result of flue-cured tobacco in the target region in the target year. The prediction result includes flue-cured tobacco yield.
[0028] The following is a detailed explanation of each step in the method for predicting flue-cured tobacco yield:
[0029] In this embodiment, some terms are explained as follows:
[0030] Target region: refers to the designated geographical area (such as a district or county, or the flue-cured tobacco planting area in the Three Gorges Reservoir area) where flue-cured tobacco production needs to be estimated. All subsequent data collection, grid division, model training and estimation will be carried out around this region.
[0031] Historical datasets refer to a set of basic data related to the growth and yield of flue-cured tobacco covering a continuous period in the past (such as 1997-2020) in the target area. They are the core data source for model training.
[0032] Grid / raster area: The target area is divided into equal rectangular geographic units according to a preset spatial resolution (such as 0.5°×0.5°). Each grid point corresponds to a unique latitude and longitude range, which is used to achieve spatial standardization of data.
[0033] Grid dataset: A three-dimensional structured dataset of "grid-data type-indicator" formed by matching scattered meteorological, crop and soil data according to grid point affiliation, which facilitates subsequent feature extraction and spatiotemporal correlation analysis.
[0034] Spatiotemporal fusion feature matrix: It is a set of features that integrates the time dimension (the time sequence of flue-cured tobacco growth period and interannual variation) and the spatial dimension (the correlation between grid points). It is a standardized data format that is adapted to the input of the GA-ST-LSTM model.
[0035] GA-ST-LSTM model: a spatiotemporal fusion long short-term memory network model for reproductive period attention mechanism, is a deep learning model designed for flue-cured tobacco yield prediction. Its core advantage is that it can accurately capture differences in reproductive period, spatiotemporal correlation and adaptability to extreme climates.
[0036] Prediction Model: After training, testing, and verification, the GA-ST-LSTM model, which meets the preset performance standards, can be directly used to predict the flue-cured tobacco yield of the target year.
[0037] Target year: The specific year in which the user needs to make production forecasts, including years in which some data has been obtained (such as the current year) or specified years in the future that need to be predicted based on climate scenarios.
[0038] In step 110, the historical dataset is acquired in a conventional manner, which will not be described in detail here. The historical dataset may include meteorological data, flue-cured tobacco crop data, and soil data.
[0039] Meteorological data are diurnal data and may include, but are not limited to, average temperature, maximum temperature, minimum temperature, precipitation, sunshine duration, and relative humidity. The data are sourced from the Meteorological Bureau and historical meteorological databases.
[0040] Data on flue-cured tobacco crops may include, but are not limited to, the tobacco development period (sowing / transplanting / flowering / maturity time), field biomass (measured biomass values at different stages during the growth period), and measured yield. Data is sourced from annual reports by agricultural statistics departments or field measurement records from agricultural meteorological observation stations. The growth period includes the root elongation stage, the vigorous growth stage, and the maturity stage.
[0041] Soil data refers to spatial static data for the target area, which may include, but is not limited to, soil texture (ratio of sand / silt / clay), bulk density, field capacity, available water storage, pH value, and organic matter content. Data may be sourced from soil databases or soil survey reports from the Ministry of Agriculture and Rural Affairs.
[0042] In step 120, preprocessing refers to a series of operations such as cleaning, transforming, and standardizing the historical dataset to eliminate data noise and format differences. Data cleaning includes missing value imputation and outlier correction, both of which are standard processing methods.
[0043] Step 120, preprocessing the historical dataset to obtain a preprocessed grid dataset, may include:
[0044] The meteorological data, flue-cured tobacco crop data, and soil data in the historical dataset are converted into meteorological data, flue-cured tobacco crop data, and soil data corresponding to grid points, forming a grid point dataset corresponding to each grid point, wherein the grid point is a raster region in the target area.
[0045] Specifically, methods for obtaining gridded datasets can include:
[0046] Based on the geographical range of the target area, grid points can be divided at 0.5°×0.5° latitude and longitude intervals, with each grid point labeled with unique geographical coordinates, forming a grid-divided map of the target area.
[0047] Next, the meteorological data is converted into grid data, that is, the inverse distance weighted interpolation (IDW) method is used to convert the station-based meteorological observation data into grid data. For example, the meteorological stations within the influence radius of each grid point are determined, and the contribution of each station's data to the grid point is calculated according to the distance attenuation coefficient (weight w=1 / d², where d is the distance between the grid point and the station); the meteorological data (such as daily average temperature and precipitation) of each grid point is obtained by weighted summation.
[0048] Next, the crop data grid is transformed. For example, the geographic coordinates (latitude and longitude) of the planting plots are extracted from the crop data; through geocoding matching, the crop data (development stage, biomass, yield) of each planting plot is associated with its corresponding grid point; if a grid point contains multiple planting plots, the average of the crop data of each plot is taken as the crop data of that grid point.
[0049] Next, the soil data grid is transformed. For example, based on the soil type zoning map, the geographical range of each soil zone is extracted; the soil zones are overlaid with the grid division map to determine the soil type corresponding to each grid point; the soil data (bulk density, water holding capacity, etc.) of that soil type is extracted as the soil data for the corresponding grid point.
[0050] Finally, gridded data integration is performed. For example, the transformed meteorological, crop, and soil data are integrated according to the "grid-year" dimension to form a gridded dataset corresponding to each grid point.
[0051] In this embodiment, raw data in different formats (site-based, plot-based, and zone-based) are uniformly converted into grid format to standardize the spatial dimension of the data. This provides a unified data carrier for subsequent cross-regional and cross-year feature extraction and model training, avoiding feature misalignment caused by differences in spatial format.
[0052] In step 130, the constructed input dataset refers to a data set that adapts to the training and testing requirements of the GA-ST-LSTM model, containing features (spatiotemporal fusion feature matrix) and labels (flue-cured tobacco yield data). The spatiotemporal fusion feature matrix refers to matrix data that integrates features of the time dimension (fertility period time series) and the spatial dimension (grid neighborhood association), which can accurately characterize the impact mechanism of flue-cured tobacco yield.
[0053] Please refer to Figure 3 Specifically, in step 130, constructing an input dataset for model training and testing based on the gridded dataset may include:
[0054] Step 131: Extract meteorological features, crop growth features, and soil features from the gridded dataset;
[0055] Step 132: Perform feature fusion and screening on the meteorological features, crop growth features and soil features to obtain the screened fused features;
[0056] Step 133: Encode the fusion features in the time dimension according to the growth sequence of flue-cured tobacco to obtain the time association features of each grid point in each year. The time association features include the fusion features of flue-cured tobacco in the growth period, which includes the root extension period, the vigorous growth period, and the maturity period.
[0057] Step 134: For any target grid point in the target region, calculate the similarity of the fusion features of all grid points adjacent to the target grid point to construct spatial association features;
[0058] Step 135: The spatial correlation features and the temporal correlation features are fused to obtain a spatiotemporal fusion feature matrix. The spatiotemporal fusion feature matrix is then combined with the corresponding flue-cured tobacco yield to form the input dataset for model training and testing.
[0059] Specifically, in step 131, meteorological features are extracted: according to the growth period of flue-cured tobacco (for example, root elongation period: 1-30 days after transplanting, vigorous growth period: 31-60 days, maturity period: 61-90 days), seven types of features are extracted from gridded meteorological data, namely, effective accumulated temperature during the growth period of flue-cured tobacco, total precipitation during the growth period, cumulative sunshine during the growth period, number of extreme high-temperature days during the growth period, average relative humidity during the growth period, precipitation anomaly rate, and average daily temperature range.
[0060] Extraction of crop growth characteristics: Four types of characteristics were extracted from gridded crop data, namely, growth period duration, biomass accumulation rate, development period synchronicity (the difference between the start date of the growth period at this gridded point and the regional average start date), and yield correlation coefficient (the Pearson correlation coefficient between the meteorological characteristics of the growth period at this gridded point and the measured yield in that year).
[0061] Soil feature extraction: Five types of static features (without interannual variation) were extracted from gridded soil data, including available water storage, soil bulk density, field capacity, soil pH, and organic matter content.
[0062] After feature extraction in step 131, we can obtain meteorological features (dimension: M×Y×3×7, where M is the number of grid points, Y is the number of years, and 3 is the growth period), crop growth features (dimension: M×Y×3×4), and soil features (dimension: M×1×1×5).
[0063] It should be noted that the extraction methods for meteorological characteristics, crop growth characteristics, and soil characteristics are conventional and will not be elaborated here.
[0064] Step 132 involves fusing and filtering the meteorological characteristics, crop growth characteristics, and soil characteristics to obtain the filtered fused characteristics, which may include:
[0065] The meteorological features, crop growth features, and soil features are spliced together according to feature dimensions to form an initial fused feature.
[0066] Calculate the Pearson correlation coefficient between each initial fusion feature and the flue-cured tobacco as measured yield, and retain the initial fusion features corresponding to Pearson correlation coefficients greater than a preset threshold to obtain the selected fusion features.
[0067] Specifically, during the splicing process by feature dimension, dimension completion is performed. For example, the soil feature tensor is static data (dimension: M×1×1×5), which is copied along the "year-growth period" dimension and expanded to M×Y×3×5, matching the dimensions of the meteorological feature tensor (M×Y×3×7) and the crop growth feature tensor (M×Y×3×4).
[0068] Next, the three types of features are merged into one feature by splicing according to the feature dimension. The dimension of the initial fused feature after splicing is M×Y×3×(7+4+5)=M×Y×3×16, that is, each grid point, each year, and each reproductive period contains 16 initial fused features.
[0069] Next, the Pearson correlation coefficient is calculated. For example, firstly, the data is flattened, that is, the initial fused feature tensor (M×Y×3×16) is flattened into two-dimensional data (number of samples × number of features), where the number of samples = M×Y×3 (each grid point-year-fertility period combination constitutes one sample), and the number of features = 16; at the same time, the measured yield data of flue-cured tobacco is flattened into a one-dimensional label array according to the corresponding sample dimensions. Then, the correlation is calculated, that is, using the Pearson correlation coefficient formula, the correlation coefficient r between the 16 initial fused features and the measured yield labels is calculated respectively, quantifying the degree of linear association between each feature and yield. The calculation method is conventional and will not be elaborated here.
[0070] Finally, initial fusion features with correlation coefficients greater than or equal to a preset threshold are retained, while features with weak correlation are discarded. For example, typically 12 core features are retained, resulting in a filtered fusion feature tensor (dimensions: M×Y×3×12). The preset threshold can be flexibly set according to actual conditions, and no specific limitation is made here.
[0071] In this embodiment, dimensionality completion ensures the fusion of multi-dimensional features, and Pearson correlation screening accurately removes redundant features with weak correlation to output. While retaining core value information, the feature dimensionality is reduced, the computational load of model training is reduced, and model overfitting caused by feature redundancy is avoided, thereby improving model training efficiency and generalization ability.
[0072] Step 133: Encode the fused features according to the growth sequence of flue-cured tobacco, obtaining the time-related features of each grid point in each year, which may include:
[0073] According to the growth sequence of flue-cured tobacco—root elongation period, vigorous growth period, and maturity period—the fused features are converted into grid point, year, and time sequence features as time-related features. Among them, the time-related features of each grid point in each year include the features corresponding to the root elongation period, vigorous growth period, and maturity period.
[0074] In this embodiment, the flue-cured tobacco growth sequence refers to the natural growth sequence of flue-cured tobacco from sowing to maturity, specifically the root elongation period → vigorous growth period → maturity period, which is the core time logic of flue-cured tobacco growth.
[0075] Specifically, verify the order of each growth stage in the screened fusion feature tensor to ensure consistency with the natural growth timeline (if there is a disorder in the order, reorder according to the standard timeline).
[0076] Next, a dimensional transformation is performed. For example, for each grid point and each year, the fused features of the three reproductive periods (12 features per reproductive period) of that grid point and year are concatenated temporally to form a temporal feature vector. Specifically, the fused feature tensor is reshaped from "grid point-year-reproductive period-feature" (M×Y×3×12) to "grid point-year-temporal feature" (M×Y×36) to serve as a time-related feature. Among them, the first 12 elements of the temporal feature vector are the rooting period features, the middle 12 elements are the vigorous growth period features, and the last 12 elements are the maturity period features.
[0077] After dimensional transformation, data verification can be performed. For example, 10 grid points and 5 years of time-series feature vectors can be randomly selected to check the temporal order and numerical integrity of the reproductive period features, ensuring that there are no feature misalignments or missing features.
[0078] In this embodiment, discrete growth period features are transformed into continuous time-series feature vectors, accurately preserving the dynamic changes of features at each stage of flue-cured tobacco growth. This makes the feature data more suitable for the LSTM layer of the GA-ST-LSTM model to model time-series data, helping the model to better learn the correlation between flue-cured tobacco growth time and yield.
[0079] Step 134: For any target grid point in the target region, calculate the similarity of the fusion features of all grid points adjacent to the target grid point to construct spatial association features, which may include:
[0080] For any target grid point in the target region, calculate the cosine similarity of the fusion features of all grid points adjacent to the target grid point;
[0081] For the target grid point, the cosine similarity of all adjacent grid points is weighted and summed to obtain the spatial association feature, where the weight of the weighted sum is the distance decay coefficient between grid points.
[0082] In this embodiment, cosine similarity is a quantitative indicator that measures the degree of similarity between two feature vectors by calculating the cosine of the angle between them (the value ranges from -1 to 1, with a value closer to 1 indicating higher similarity). Distance decay coefficient is a weighting coefficient in which the influence of adjacent grid points on the target grid point gradually decreases as the geographical distance between grid points increases (in this embodiment, w=1 / d², where d is the geographical distance between grid points and w represents the weight).
[0083] Specifically, step 134 may include the following steps:
[0084] The first step is to select four adjacent grid points G_j (j=1,2,3,4) above, below, left, and right of each target grid point G_i (coordinates (lat_i,lon_i)). If the target grid point is a boundary grid point (such as the northernmost grid point in the region), the missing adjacent grid points are replaced with the average value of the fusion features of all grid points in the region to ensure that there are four associated grid points.
[0085] The second step is to extract feature vectors. For example, extract the fused feature vectors (dimension: 1×12) of the target grid point G_i and each of its neighboring grid points G_j in the corresponding year and corresponding reproductive period.
[0086] The third step is to calculate the cosine similarity. For example, using the cosine similarity formula, the similarity Sim_ij between the feature vectors of G_i and each G_j is calculated, resulting in four similarity values, such as Sim_i1, Sim_i2, Sim_i3, and Sim_i4.
[0087] The fourth step is to calculate the distance attenuation coefficient. For example, based on the geographical coordinates of the target grid point G_i and the adjacent grid point G_j, calculate the straight-line distance d_ij between them, substitute it into the formula w=1 / d², and calculate the weight w_ij of each adjacent grid point (the closer the distance, the greater the weight).
[0088] The fifth step is to multiply the similarity Sim_ij of each adjacent grid point by the corresponding weight w_ij, and then sum the products to obtain the spatial correlation coefficient of the target grid point G_i. This coefficient is the spatial correlation feature of the target grid point.
[0089] Step 6: Repeat steps 1 to 5 above for all grid points and all years to obtain the spatial correlation features (dimension: M×Y×1) of each grid point in each year.
[0090] In this embodiment, the cosine similarity metric is used to quantify the feature correlation between the target grid point and its neighboring grid points. Combined with the distance decay coefficient for weighted summation, features that can reflect the spatial correlation patterns of the region are constructed. This makes up for the limitations of single grid point data, so that the feature matrix contains more comprehensive spatial information, adapts to the spatial information extraction requirements of the spatiotemporal fusion layer of the GA-ST-LSTM model, and improves the model's adaptability to the overall climate and soil conditions of the region.
[0091] In step 135, spatiotemporal fusion refers to the process of concatenating the temporal features of the time dimension with the spatial correlation features according to preset rules to form a composite feature matrix that simultaneously contains spatiotemporal information. Specifically, firstly, it is confirmed that the "grid point-year" dimension of the time correlation features (dimension: M×Y×36) and the spatial correlation features (dimension: M×Y×1) are consistent to ensure the correspondence of the fusion. After concatenating the spatial correlation features to the time correlation features according to the feature dimension, a "grid point-year-spatiotemporal feature" tensor (dimension: M×Y×37) is formed, where 37=36 (time correlation features)+1 (spatial correlation features); then, the "grid point-year-spatiotemporal feature" tensor is reshaped into a two-dimensional matrix to obtain the spatiotemporal fusion feature matrix. The row dimension is the number of samples (M×Y, each grid point-year combination is a sample), and the column dimension is the number of features (37). Each row of samples in the matrix is labeled with a "grid point-year" identifier. The spatiotemporal fusion feature matrix is output and combined with the corresponding flue-cured tobacco production data (labels) to form the input dataset for model training and testing.
[0092] In step 140, the training set, test set, and validation set can be divided according to a preset ratio of 7:2:1. The preset ratio can also be other ratios; no specific limitation is made here.
[0093] In step 140, the pre-built GA-ST-LSTM model is input for training, testing, and validation to obtain a validated GA-ST-LSTM model as the prediction model, including:
[0094] A10, the spatiotemporal fusion feature matrix in the training set is passed through the input layer into the reproductive period attention layer and forward propagated to obtain the adversarial loss and the yield prediction results of flue-cured tobacco.
[0095] A20. Based on the predicted results and the measured output and adversarial loss in the training set, the total loss value is obtained, and backpropagation is performed based on the total loss value to update the learnable parameters in the GA-ST-LSTM model.
[0096] A30, repeat steps A10 and A20 until the first specified number of iterations is completed or the first early stopping strategy is triggered, to obtain the GA-ST-LSTM model after the first round of training, which will serve as the initial training model;
[0097] A40, based on the Bayesian algorithm, selects N sets of parameters within the parameter range of the GA-ST-LSTM model obtained during the first round of training, where N is an integer greater than 2;
[0098] A50: Using N sets of parameters as the initial population, the optimal parameter combination is obtained through a genetic algorithm, and the parameters of the initial training model are updated to the optimal parameter combination to update the initial training model;
[0099] A60, based on the updated initial training model, repeat steps A10 to A50. When the second specified number of iterations is completed or the second early stopping strategy is triggered, the obtained GA-ST-LSTM model is used as the training finalized model.
[0100] A70, Input the test set into the training model, perform model testing and optimization, and obtain the optimized training model;
[0101] A80, input the validation set into the optimized training model. If the output prediction result obtained based on the validation set meets the preset standard, then the optimized training model is used as the prediction model. If the output prediction result obtained based on the validation set does not meet the preset standard, then repeat steps A40 to A70 until the output prediction result output by the optimized training model meets the preset standard.
[0102] In this embodiment, the Bayesian algorithm refers to a parameter search algorithm based on a Gaussian process model that quickly locates the optimal parameter space, offering the advantage of high search efficiency. The genetic algorithm refers to an optimization algorithm that simulates the biological evolution process (selection, crossover, mutation) to precisely search for the optimal parameter combination within the parameter space, offering the advantage of high search accuracy. The early stopping strategy refers to terminating training during model training if the validation set loss does not decrease for a specified number of consecutive iterations, thus preventing overfitting. Preset standards refer to threshold values used to evaluate the final performance of the model, such as R² ≥ 0.85, RMSE ≤ 3.7, and MAPE ≤ 5%.
[0103] Specifically, the spatiotemporal fusion feature matrix of the training set is input into the input layer of the GA-ST-LSTM model. The input layer validates the data format and converts it into a tensor format that the model can process. Then, forward propagation occurs, i.e., the reproductive period attention layer assigns weights to the feature sub-tensors of each reproductive period and concatenates them. The spatiotemporal fusion layer (convolutional layer + LSTM layer) extracts spatial and temporal features. The fully connected layer integrates the features. The adversarial training module outputs the adversarial loss, and the output layer outputs the yield prediction result.
[0104] In this embodiment, please refer to Figure 2The spatiotemporal fusion layer may include a one-dimensional convolutional layer and an LSTM layer. Step A10 involves passing the spatiotemporal fusion feature matrix from the training set through the input layer into the reproductive period attention layer and performing forward propagation to obtain the adversarial loss and the yield prediction results for flue-cured tobacco, which may include:
[0105] A11, the spatiotemporal fusion feature matrix in the training set is passed through the input layer and then into the reproductive period attention layer;
[0106] A12, through the reproductive period attention layer, assign weights to the feature sub-tensors corresponding to each reproductive period of flue-cured tobacco in the spatiotemporal fusion feature matrix, and concatenate the weighted feature sub-tensors into a unified feature tensor;
[0107] A13, input the unified feature tensor into the spatiotemporal fusion layer, extract spatial features through the convolutional layer, and extract temporal features through the LSTM layer;
[0108] A14 integrates the spatial and temporal features, and inputs the integrated features into the adversarial training module and the output layer. The adversarial loss is obtained through the adversarial training module, and the yield prediction result of flue-cured tobacco is obtained through the output layer.
[0109] Specifically, the spatiotemporal fusion feature matrix of the training set is received through the input layer, and format verification (ensuring correct dimensions and no missing values) and data type conversion (e.g., converting to a float32 tensor) are performed. The standardized feature tensor is then output to the reproductive attention layer.
[0110] The growth period attention layer splits the input feature tensor into three feature sub-tensors according to the growth period of flue-cured tobacco (root extension period sub-tensor: N×1×37, vigorous growth period sub-tensor: N×1×37, maturity period sub-tensor: N×1×37), with each sub-tensor corresponding to a complete spatiotemporal feature of a growth period. Then, based on prior data from agricultural meteorological literature, initial weights for each growth period are initialized. (0.2 for rooting stage, 0.5 for vigorous growth stage, and 0.3 for maturity stage), ensuring the weight sum is 1; the initial weights are optimized using the softmax function, and the weight values are adjusted based on the correlation score between the feature subtensor and the yield label (Pearson correlation coefficient), expressed as:
[0111]
[0112] In the formula, The final weight for the i-th reproductive period; Let be the Pearson correlation coefficient between the eigenvalue tensor and yield for the i-th reproductive stage; These are the initial weights. exp represents the natural exponential function, with its base being the natural constant e; for example, exp(x) = e^(-x). x .
[0113] Next, the feature sub-tensor of each reproductive period is coupled with its corresponding weight. Multiply (weighted enhancement of important features) to obtain 3 weighted feature sub-tensors (each with dimension N×1×37); merge the weighted sub-tensors into a unified feature tensor (dimension: N×3×37) through tensor concatenation operation (axis=1) to proceed to step A13.
[0114] In step A13, the convolutional layer can be a Conv1D convolutional layer (for spatial feature extraction), with the following configuration: 64 filters, kernel size 3, stride 1, padding "same" (ensuring the output dimension matches the input), and ReLU activation function. Feature extraction method: A unified feature tensor is input to the convolutional layer, capturing spatial correlation information between grid points (such as the collaborative influence of meteorological features of adjacent grid points) through convolution operations, and outputting a spatial feature tensor (dimension: N×3×64).
[0115] The LSTM layer (used for temporal feature extraction) can be configured as follows: a single-layer LSTM structure, 128 hidden units, a dropout rate of 0.1 (to prevent overfitting), and the return sequence is set to False (outputting features from the last time step). Feature extraction method: The spatial feature tensor (dimension: N×3×64) output from the convolutional layer is input into the LSTM layer. The LSTM uses a gating mechanism (input gate, forget gate, output gate) to capture the dynamic changes in temporal features during the growth period (such as the lagged effect of precipitation during the root extension period on biomass during the vigorous growth period), outputting a temporal feature vector (dimension: N×128).
[0116] In step A14, feature integration can be performed as follows: ① Spatial feature dimensionality reduction: The spatial feature tensor (N×3×64) is reduced to a spatial feature vector of dimension N×64 through a global average pooling layer; ② Feature concatenation: The dimensionality-reduced spatial feature vector (N×64) is concatenated with the temporal feature vector (N×128) output by the LSTM according to the feature dimension to obtain the integrated feature vector (dimension: N×192); ③ Feature mapping: The integrated feature vector is input into a fully connected layer (64 neurons, ReLU activation function) and mapped to a low-dimensional core feature vector (dimension: N×64).
[0117] Adversarial training module loss calculation: ① Discriminator configuration: 2 fully connected layers (64 neurons in the first layer, ReLU activation; 1 neuron in the second layer, Sigmoid activation), with Adam as the optimizer (learning rate 5e-5); ② Adversarial game: The core feature vector is input into the generator (outputting the output yield estimate). The discriminator receives the generator's estimate and the actual output labels from the training set, and calculates the discriminator loss using the cross-entropy loss function. The generator optimizes its own parameters through the feedback from the discriminator (backpropagating the discriminator loss to the generator), and finally outputs the adversarial loss L_adv (scalar).
[0118] Output layer yield prediction: Input the core feature vector into the output layer (1 neuron, linear activation function, adapted to the yield regression task), and obtain the flue-cured tobacco yield prediction value for each sample through linear mapping (dimension: N×1).
[0119] In this embodiment, the fertility period attention layer, through adaptive weight allocation, emphasizes the feature weights of the peak growth period (the fertility period with the greatest impact on flue-cured tobacco yield) (weight ratio 0.4-0.6), making the feature vectors more closely match the physiological laws of flue-cured tobacco growth. Compared with models without attention mechanisms, the feature representation accuracy is improved. The spatiotemporal fusion layer extracts spatial correlation features (such as regional climate consistency) using Conv1D and extracts temporal series features (such as dynamic changes during the fertility period) using LSTM. The integration of the two achieves "spatial-temporal information complementarity," enhancing the model's ability to capture complex spatiotemporal dependencies. The adversarial training module, through the game between the generator and the discriminator, enables the generator (the main body of the model) to maintain stable output even when faced with small data perturbations (such as ±5% fluctuations in meteorological data), adapting to scenarios with small data fluctuations in practical applications.
[0120] In step A20, the total loss value can be calculated as follows: First, the basic loss is calculated. The mean squared error (MSE) can be used to calculate the fitting loss value L_mse between the estimated output and the measured output labels in the training set, using the conventional calculation method. Next, the loss balance coefficient β is introduced, and the total loss value is calculated as L_total = L_mse + β × L_adv. In the formula, L_total refers to the total loss value; L_mse refers to the fitting loss value; L_adv refers to the adversarial loss value; and the loss balance coefficient β can be flexibly set according to the actual situation, for example, a value of 0.2.
[0121] The backpropagation update method can be: ① Optimizer configuration: using the Adam optimizer with an initial learning rate of 10. -4 Momentum parameters β1=0.9, β2=0.999, weighted decay coefficient 10. -5② Gradient calculation: Based on the total loss value L_total, calculate the gradients of all learnable parameters of the model (attention layer weights, convolution kernel parameters, LSTM gating parameters, fully connected layer weights, discriminator parameters) using the chain rule; ③ Parameter update: Update the parameters in the direction of gradient descent, and avoid gradient explosion by using gradient clipping (clipnorm=1.0).
[0122] In step A30, iterative execution may include: repeating the A10 and A20 processes in batches (e.g., batch_size=32), updating parameters once after each batch, and calculating the overall training set error (RMSE, MAPE, R²) once every 10 iterations. After each iteration, the loss is calculated using a temporary validation set (not involved in parameter updates) partitioned from the training set in an 8:2 ratio. If the temporary validation set loss does not decrease for three consecutive iterations (fluctuation ≤ 0.001), the first early stopping strategy is triggered, terminating training early; otherwise, the process continues until the first specified number of iterations (e.g., 100). After training terminates, the network structure of the current model, all learnable parameters, and iteration logs (including loss values and error metrics for each round) are saved, forming the initial training model.
[0123] In step A40, the parameter range refers to the effective fluctuation range of the learnable parameters extracted based on the iteration log of the initial trained model, which may include 64-256 LSTM hidden units; learning rate: 10. -5 Up to 10 -3 Attention layer weights during reproductive period: 0.1-0.3 during rooting stage, 0.4-0.6 during vigorous growth stage, and 0.2-0.4 during maturity stage (the sum of the three is 1); Loss balance coefficient β: 0.1-0.3; Number of Conv1D filters: 32-128.
[0124] Specifically, Gaussian process regression is used as the Bayesian algorithm model, and the Matern kernel (adapted to the nonlinear parameter space) is selected as the kernel function. The number of samplings is 50. An efficient search is performed within the above parameter range to calculate the model prediction error (based on the cross-validation error of the initial training model) corresponding to each set of parameters. N=5 sets of the best parameter combinations with the lowest error are selected to form a candidate parameter set, which is used as the initial population in step A50.
[0125] In step A50, the configuration of the genetic algorithm may include: ① Population initialization: using 5 sets of better parameters as the initial population, and generating a total population (size 50 sets) through random mutation; ② Evolutionary parameters: crossover probability 0.8 (using a single-point crossover strategy), mutation probability 0.1 (using a Gaussian mutation strategy, with the mutation amplitude being 10% of the parameter range), and 30 iterations; ③ Fitness function: using "0.5×RMSE+0.3×MAPE+0.2×(1-R²)" as the fitness value, the smaller the value, the better the parameter combination.
[0126] Specifically, the optimal parameter combination can be determined as follows: ① Selection operation: Use roulette wheel selection to retain the top 20% of individuals with the best fitness values in each generation; ② Crossover and mutation: Perform crossover and mutation operations on the retained individuals to generate a new generation of population; ③ Convergence judgment: When the fluctuation of the optimal fitness value is ≤0.0005 for 5 consecutive generations, stop evolution, select the parameter combination with the smallest final fitness value as the optimal parameter combination, and then replace the corresponding parameters of the initial training model with the optimal parameter combination to obtain the updated initial training model.
[0127] In step A60, the updated initial training model is used as a new starting point, and the complete process of A10 (forward propagation) → A20 (backward propagation) → A30 (first round of training) → A40 (Bayesian pre-search) → A50 (genetic algorithm optimization) is repeated. Termination conditions: The second specified number of iterations can be set to 100, and the second early stopping strategy can be consistent with the first early stopping strategy (the temporary validation set loss does not decrease for 3 consecutive iterations); training terminates when any of these conditions are met. After training terminates, the final model structure, parameters, and complete training logs are saved, and the model is confirmed as the finalized training model.
[0128] In step A70, the training model is set to evaluation mode and parameter updates are prohibited; the test set feature matrix is input into the model, and the yield estimates of each flue-cured tobacco sample are output through forward propagation; the estimated yields are compared with the measured yields, and the core error indicators RMSE, MAPE, and R² are calculated. At the same time, the error distribution is statistically analyzed according to the growth stage (rooting stage / vigorous growth stage / maturity stage) and grid location.
[0129] Next, model optimization is performed, for example: ① Preset test pass thresholds: RMSE≤4.0, MAPE≤6%, R²≥0.8; ② Pass handling: If the thresholds are met, the trained and finalized model is directly used as the test optimization model; ③ Fail handling: a. Error type analysis: Overfitting (training set RMSE<2.5, test set RMSE>4.5) → Increase the LSTM layer dropout rate to 0.2 and reduce the number of hidden units by 20%; Underfitting (training set RMSE>3.5, test set RMSE>4.5) → Increase the learning rate to 1.5 times the original and increase the number of iterations by 50; b. Parameter adjustment: Modify the corresponding parameters according to the error type; c. Retrain and test: Return the adjusted model to step A50 and repeat the "parameter update → training → test" process until the test set indicators meet the standards.
[0130] In step A80, the preset standards can be a coefficient of determination R² ≥ 0.85, root mean square error RMSE ≤ 3.7, and mean absolute percentage error MAPE ≤ 5%. The verification method is conventional and will not be described in detail here.
[0131] In this embodiment, a hybrid strategy of "Bayesian pre-search + genetic algorithm" is used to quickly locate the optimal parameter space and then accurately select the optimal combination. Compared with traditional grid search, the parameter optimization efficiency is improved, while avoiding getting trapped in local optima. An early stopping strategy is introduced to effectively prevent model overfitting, and gradient pruning avoids gradient explosion, ensuring stable convergence during training. Through a closed-loop "training-testing-validation" process, test set optimization addresses the problem of insufficient generalization ability, and independent evaluation on the validation set ensures that the model maintains high accuracy on unseen data.
[0132] After training, testing, and validation, the GA-ST-LSTM model is used as a prediction model.
[0133] In step 150, the target year refers to the year in which the flue-cured tobacco yield forecast needs to be made, which can be the current year or a specified future year. The meteorological data for the target year refers to the meteorological observation data (current year) or climate scenario simulation data (future year) of the target region in the target year, and is obtained in a conventional manner.
[0134] The soil data for the target year can be the same as the soil data in step 110, or it can be the estimated soil data, and the acquisition method is also conventional.
[0135] The meteorological and soil data for the target year can be preprocessed using the same methods as in step 120, such as cleaning, standardization, and grid conversion. Finally, the preprocessed meteorological data for the target year and the corresponding grid soil data are correlated and matched according to the "grid" dimension.
[0136] In step S160, the method for converting the meteorological and soil data of the target year into the current spatiotemporal fusion feature matrix can be found in step 130. That is, following the rules of step 130 (feature fusion filtering, temporal dimension encoding, spatial association construction, spatiotemporal fusion), the extracted features are converted into the current spatiotemporal fusion feature matrix, ensuring that the matrix dimension and format are consistent with the training set feature matrix. Next, the current spatiotemporal fusion feature matrix is input into the prediction model. The model outputs the estimated flue-cured tobacco yield for each grid point through forward propagation (attention layer weighting → spatiotemporal fusion layer feature extraction → adversarial module optimization → output layer mapping). Finally, the estimated yield is summarized according to the "grid point-region" dimension, and the overall average yield of the target region and the yield increase / decrease of each sub-region are calculated to form the prediction result, achieving an accurate prediction of the flue-cured tobacco yield for the target year and providing a scientific basis for agricultural production decisions.
[0137] This application provides an electronic device that may include a processing module and a storage module. The storage module stores a computer program, which, when executed by the processing module, enables the electronic device to perform the corresponding steps in the above-described method for estimating flue-cured tobacco yield.
[0138] In this embodiment, the processing module can be an integrated circuit chip with signal processing capabilities. The processing module can be a general-purpose processor. For example, the processor can be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0139] The storage module can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. In this embodiment, the storage module can be used to store historical datasets, prediction results, etc. Of course, the storage module can also be used to store programs, which the processing module executes after receiving execution instructions.
[0140] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding steps in the aforementioned method, and will not be elaborated further here.
[0141] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, electronic device, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.
[0142] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0143] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for estimating yield of flue-cured tobacco, characterized by, The method comprises: acquiring a historical data set of a target region, the historical data set comprising meteorological data, flue-cured tobacco crop data and soil data; preprocessing the historical data set to obtain a preprocessed grid data set, wherein the grid data set comprises meteorological data, flue-cured tobacco crop data and soil data corresponding to a respective grid region in the target region; based on the grid data set, constructing an input data set for model training and testing, the input data set comprising a spatio-temporal fusion feature matrix corresponding to each grid and yield data of flue-cured tobacco; dividing the input data set into a training set, a test set and a validation set according to a predetermined proportion, and inputting the pre-built GA-ST-LSTM model for training, testing and validation to obtain a validated GA-ST-LSTM model as a prediction model, the GA-ST-LSTM model comprising an input layer, a growth period attention layer, a spatio-temporal fusion layer, an adversarial training module and an output layer; acquiring meteorological data and soil data of the target region in a target year, the target year being the current year or a specified future year; converting the meteorological data and soil data of the target year into a current spatio-temporal fusion feature matrix, and inputting the prediction model to obtain a prediction result of flue-cured tobacco in the target region in the target year, the prediction result comprising flue-cured tobacco yield.
2. The method of claim 1, wherein, The preprocessing of the historical data set to obtain the preprocessed grid data set comprises: converting the meteorological data, flue-cured tobacco crop data and soil data in the historical data set into meteorological data, flue-cured tobacco crop data and soil data corresponding to the grid to form a grid data set corresponding to each grid, wherein the grid is a grid region in the target region.
3. The method of claim 1, wherein, Based on the grid data set, constructing an input data set for model training and testing comprises: extracting meteorological features, crop growth features and soil features from the grid data set, the meteorological features comprising effective accumulated temperature during the growth period of flue-cured tobacco, total precipitation during the growth period, accumulated value of daily sunshine during the growth period, number of extreme high temperature days during the growth period, average relative humidity during the growth period, precipitation anomaly rate and average daily temperature range, the crop growth features comprising growth period length, biomass accumulation rate, development period synchronicity and yield correlation coefficient, and the soil features comprising effective water storage, soil bulk density, field water holding capacity, soil pH value and organic matter content; performing feature fusion and selection on the meteorological features, crop growth features and soil features to obtain filtered fusion features; performing time dimension coding on the fusion features according to the growth timing of flue-cured tobacco to obtain time correlation features of each grid in each year, the time correlation features comprising fusion features corresponding to the growth period of flue-cured tobacco, the growth period comprising the root extension period, the vigorous growth period and the maturation period; for any target grid in the target region, calculating the similarity of the fusion features of all grids adjacent to the target grid to construct spatial correlation features; The spatial correlation feature and the time correlation feature are fused to obtain a space-time fusion feature matrix, and the space-time fusion feature matrix is combined with the corresponding flue-cured tobacco yield to form the input data set for model training and testing.
4. The method of claim 3, wherein, The weather features, crop growth features and soil features are fused and screened to obtain screened fusion features, including: The weather features, crop growth features and soil features are spliced according to feature dimensions to form initial fusion features; The Pearson correlation coefficient of each initial fusion feature and flue-cured tobacco as measured yield is calculated, and the initial fusion features corresponding to the Pearson correlation coefficients greater than a preset threshold are retained to obtain the screened fusion features.
5. The method of claim 3, wherein, The fusion features are time-dimensionally coded according to the flue-cured tobacco growth time sequence to obtain the time correlation feature of each grid point in each year, including: The fusion features are converted into grid, year and time sequence features as time correlation features according to the root extension period, the vigorous growth period and the maturation period of the flue-cured tobacco growth time sequence, wherein the time correlation feature of each grid point in each year includes the features corresponding to the root extension period, the vigorous growth period and the maturation period.
6. The method of claim 3, wherein, For any target grid point in the target area, the similarity of the fusion features of all grid points adjacent to the target grid point is calculated to construct a spatial correlation feature, including: For any target grid point in the target area, the cosine similarity of the fusion features of all grid points adjacent to the target grid point is calculated; For the target grid point, the cosine similarities of all adjacent grid points are weighted and summed to obtain a spatial correlation feature, wherein the weight of the weighted sum is a distance decay coefficient between grid points.
7. The method of claim 1, wherein, The pre-built GA-ST-LSTM model is input for training, testing and verification to obtain a verified GA-ST-LSTM model as a prediction model, including: A10, the space-time fusion feature matrix in the training set is input into the growth period attention layer through the input layer and forward propagated to obtain an adversarial loss and a yield prediction result of flue-cured tobacco; A20, based on the prediction result, the measured yield in the training set and the adversarial loss, a total loss value is obtained, and based on the total loss value, back propagation is performed to update the learnable parameters in the GA-ST-LSTM model; A30, steps A10 and A20 are repeated until a first specified number of iterations is completed or a first early stopping strategy is triggered to obtain a GA-ST-LSTM model after the first round of training as an initial training model; A40, based on the Bayesian algorithm, N groups of parameters are selected within the parameter range of the GA-ST-LSTM model obtained during the first round of training, N being an integer greater than 2; A50, the N groups of parameters are used as an initial population, and the optimal parameter combination is selected by a genetic algorithm, and the parameters of the initial training model are updated to the optimal parameter combination to update the initial training model; A60, based on the updated initial training model, steps A10 to A50 are repeated, and when a second specified number of iterations is completed or a second early stopping strategy is triggered, the obtained GA-ST-LSTM model is used as a training finalized model; A70, inputting the test set into the training and setting model, performing model testing and optimization, and obtaining an optimized training and setting model; A80, inputting the verification set into the optimized training and setting model, obtaining yield estimation results based on the verification set, and determining whether the yield estimation results meet preset standards; if the yield estimation results meet the preset standards, the optimized training and setting model is used as the estimation model; if the yield estimation results do not meet the preset standards, steps A40 to A70 are repeated until the yield estimation results output by the optimized training and setting model meet the preset standards.
8. The method of claim 7, wherein, The spatio-temporal fusion layer includes a convolution layer and an LSTM layer; Step A10 includes: inputting the spatio-temporal fusion feature matrix in the training set into the input layer and then into the growth period attention layer; allocating weights to feature sub-tensors corresponding to each growth period of flue-cured tobacco in the spatio-temporal fusion feature matrix through the growth period attention layer, and splicing the weighted feature sub-tensors into a unified feature tensor; inputting the unified feature tensor into the spatio-temporal fusion layer, extracting spatial features through the convolution layer, and extracting time features through the LSTM layer; integrating the spatial features and the time features, inputting the integrated features into an adversarial training module and an output layer, obtaining an adversarial loss through the adversarial training module, and obtaining yield estimation results of flue-cured tobacco through the output layer.
9. An electronic device, comprising: The electronic device includes a processor and a memory coupled to each other, and the memory stores a computer program. When the computer program is executed by the processor, the electronic device performs the method of any one of claims 1-8.