A method for predicting the number of tobacco plants based on deep learning

Through multi-source agricultural sensor data fusion and deep learning model, the accuracy and stability of tobacco number prediction are solved, and accurate prediction and real-time update of tobacco number are achieved.

CN119918023BActive Publication Date: 2025-07-25YANGO UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510407156.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-25
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

The existing method for predicting the number of tobacco plants depends on manual experience or simple statistical models, and cannot effectively integrate multi-source agricultural sensor data, resulting in inaccurate prediction results and difficult to adapt to complex and changeable planting environments.

Method used

Data is collected through multi-source agricultural sensors, dynamic feature selection network is used to fusion of multi-source feature, and multi-modal timing prediction model and adaptive weighted regression model are used, combined with a hierarchical correction model to achieve accurate prediction of the number of cigarettes.

Benefits of technology

It improves the accuracy and stability of the number of tobacco plants, can adapt to different tobacco environments and data conditions, provides reliable decision-making basis, and has real-time prediction and update capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918023B_ABST
    Figure CN119918023B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of agricultural production data prediction, and discloses a tobacco plant quantity prediction method based on deep learning. Environmental data of a tobacco field is collected through multi-source agricultural sensors such as soil humidity, meteorology, lidar point cloud, and multispectral. A dynamic feature selection network is used for multi-source feature fusion to generate an environmental feature vector. The environmental feature vector is input into a multi-modal time series prediction model adopting a spatio-temporal attention mechanism to model the growth trend of tobacco plants. An adaptive weighted regression model is constructed according to the prediction results, and the weights are dynamically adjusted by an improved particle swarm optimization algorithm. A hierarchical correction model is also constructed to optimize the predicted data. A real-time prediction update method is provided to process newly added data. The multispectral sensor data is processed through dimensionality reduction, correlation modeling, and interpolation fusion. This method makes full use of multi-source data to improve the accuracy, real-time performance, and stability of tobacco plant quantity prediction, providing strong support for tobacco planting management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural production data prediction, and specifically to a tobacco plant quantity prediction method based on deep learning. Background Art

[0002] In the tobacco planting industry, accurate prediction of tobacco plant numbers is crucial to improving production efficiency and ensuring economic benefits. Traditional tobacco plant number prediction methods mainly rely on manual experience or simple statistical models, which have many limitations.

[0003] From the perspective of manual experience, tobacco farmers mainly rely on their years of accumulated planting experience to estimate the number of tobacco plants. However, this method is greatly affected by subjective factors, the experience levels of different tobacco farmers vary, and it is difficult to adapt to the complex and changing planting environment. For example, soil conditions, climate differences and variety characteristics in different regions will affect the growth of tobacco plants. Manual experience is difficult to comprehensively and accurately consider these factors, resulting in the prediction results often deviating greatly from the actual situation. In some new tobacco areas, tobacco farmers lack sufficient planting experience, making manual predictions less reliable.

[0004] In terms of simple statistical models, although traditional statistical methods such as linear regression can use historical data for prediction to a certain extent, these models usually assume that there is a simple linear relationship between the data and cannot capture the complex nonlinear characteristics of the tobacco plant growth process. Tobacco plant growth is affected by the combined effects of many factors. Environmental factors such as soil moisture, temperature, light, and rainfall are interrelated and influence each other, and are not simple linear relationships. For example, soil moisture promotes tobacco plant growth within a certain range, but too high or too low humidity will inhibit tobacco plant growth. This complex nonlinear relationship is difficult to characterize with traditional statistical models. Moreover, traditional statistical models have strict requirements on data. When there are missing data, noise or outliers, the prediction accuracy of the model will drop significantly.

[0005] With the development of science and technology, intelligent agriculture has become a trend, and sensor technology has been widely used in the agricultural field. Multi-source agricultural sensors can collect a large amount of tobacco field environmental data in real time, including soil moisture, meteorological parameters, tobacco plant growth conditions, etc. However, how to effectively integrate and utilize these multi-source data and mine the information hidden behind the data has become an urgent problem to be solved. At present, most data processing methods simply analyze a single type of data and fail to give full play to the comprehensive advantages of multi-source data.

[0006] Deep learning technology has achieved remarkable results in fields such as image recognition and speech processing, but its application in predicting the number of tobacco plants is still in the exploratory stage. Existing deep learning models have problems such as insufficient feature extraction, low model training efficiency, and low prediction accuracy when dealing with the complex environmental data of tobacco fields. For example, when dealing with time series data, it is difficult to effectively capture long-term dependencies; when dealing with spatial data, it is unable to accurately model the mutual influence of tobacco plant growth among different regions. Therefore, developing a deep learning-based tobacco plant number prediction method that can fully utilize multi-source data has important practical significance for promoting the intelligent and precise development of the tobacco planting industry. Summary of the Invention

[0007] The purpose of the present invention is to provide a deep learning-based tobacco plant number prediction method to solve the problems raised in the above background technology.

[0008] To achieve the above purpose, the present invention provides the following technical solution: A deep learning-based tobacco plant number prediction method, the method includes:

[0009] Collect tobacco field environmental data through multi-source agricultural sensors, the multi-source agricultural sensors include soil humidity sensors, meteorological sensors, lidar point cloud sensors, and multispectral sensors; perform multi-source feature fusion on the tobacco field environmental data based on a dynamic feature selection network to generate a fused environmental feature vector; input the environmental feature vector into a pre-trained multi-modal time series prediction model, the multi-modal time series prediction model adopts a spatio-temporal attention mechanism, constructs a spatio-temporal correlation matrix through time series window division and spatial region division, and models the growth trend of tobacco plants based on the spatio-temporal correlation matrix;

[0010] Construct an adaptive weighted regression model according to the growth trend parameters output by the multi-modal time series prediction model, the adaptive weighted regression model takes the minimum tobacco plant number prediction error and the lowest model complexity as the optimization objectives, and uses an improved particle swarm optimization algorithm to dynamically adjust the model weights, where the improved particle swarm optimization algorithm introduces an inertia weight adaptive decay mechanism and a global optimal solution perturbation strategy; output the tobacco plant number prediction result based on the adaptive weighted regression model.

[0011] Preferably, the method further includes:

[0012] Construct a hierarchical correction model according to the tobacco plant number prediction result, the hierarchical correction model includes a trend layer, a residual layer, and a correction layer, where the trend layer smooths the prediction result based on a moving average algorithm, the residual layer dynamically compensates the prediction residuals based on a gated recurrent unit network, and the correction layer corrects the boundary of the final predicted value based on a constrained least squares method to generate optimized tobacco plant number prediction data.

[0013] Preferably, the multi-source feature fusion of the dynamic feature selection network for tobacco field environment data includes:

[0014] Obtain the original data of multi-source agricultural sensors, where the original data includes soil moisture time series, meteorological parameter matrix, lidar point cloud density distribution data, and multi-spectral reflectance curves; perform segmented processing on the original data based on a sliding time window, and extract the statistical features of each segment of data, including mean, variance, extreme value, and trend slope;

[0015] Construct a feature importance evaluation function, and calculate the correlation degree between each feature and the number of tobacco plants through a weighted combination of mutual information entropy and Pearson correlation coefficient; sort the features based on the correlation degree, and use the dynamic threshold truncation method to screen high-correlation features;

[0016] Construct a feature fusion network, which includes a parallel one-dimensional convolutional branch and a fully connected branch. Among them, the one-dimensional convolutional branch extracts temporal features through multi-scale convolutional kernels, and the fully connected branch extracts spatial features through non-linear mapping; use an adaptive weighting mechanism to fuse the outputs of the branches to generate a fused environmental feature vector.

[0017] Preferably, the training method of the multi-modal time series prediction model includes:

[0018] Construct a spatio-temporal correlation matrix, divide the time dimension into multiple overlapping windows, and divide the space dimension into grid regions. Calculate the spatio-temporal correlation weights based on the covariance between the environmental features within the window and the number of tobacco plants between regions;

[0019] Design a spatio-temporal attention module, extract time dependence and spatial correlation through the multi-head self-attention mechanism respectively, and optimize the attention output using residual connection and layer normalization;

[0020] Construct a hybrid prediction network, which includes a long short-term memory network branch and a Transformer branch. Among them, the long short-term memory network branch is used to capture local temporal patterns, and the Transformer branch is used to model global spatio-temporal dependencies; use a gated fusion unit to dynamically weight and merge the outputs of the branches to generate growth trend parameters.

[0021] Preferably, the dynamic adjustment of the model weights by the improved particle swarm optimization algorithm includes:

[0022] Initialize the particle swarm parameters. Each particle represents a set of weight vectors, and calculate the prediction error and complexity penalty term of the weight vectors through the fitness function;

[0023] Adopt an inertia weight adaptive decay mechanism, which dynamically adjusts the inertia weight according to the number of iterations and particle diversity, and its decay function is a piecewise exponential function;

[0024] Design a global optimal solution perturbation strategy. When the particle swarm falls into a local optimum, add Gaussian noise perturbation to the global optimal solution and re-evaluate the fitness through neighborhood search;

[0025] Update the particle swarm based on the elitist reservation strategy. Retain the top K particles with the highest fitness and directly enter them into the next generation, and generate a new population for the remaining particles through crossover and mutation operations.

[0026] Preferably, the residual layer of the hierarchical correction model dynamically compensates the prediction residuals based on the gated recurrent unit network, including:

[0027] Construct a residual sequence, use the difference between the prediction result and the actual number of tobacco plants as the input, and map the residual sequence to a high-dimensional space through the time embedding layer;

[0028] Design a gated recurrent unit network. The network includes a reset gate and an update gate, and dynamically adjusts the transmission ratio of historical residual information through the gating mechanism;

[0029] Adopt an attention enhancement mechanism, introduce time attention weights in the hidden state, and perform reinforcement learning on the residual features at key time points.

[0030] Preferably, the correction layer corrects the boundary of the final prediction value based on the constrained least squares method, including:

[0031] Construct boundary constraint conditions. The constraint conditions include the physical upper and lower limits of the number of tobacco plants, and the maximum change rate of the predicted values at adjacent time points;

[0032] Design an optimization objective function with constraints. Use the squared error between the predicted value and the corrected value as the target term, and add the boundary constraint as a penalty term to the Lagrange multiplier;

[0033] Adopt the iterative projection method to solve the constrained optimization problem, and alternately update the corrected value and the multiplier parameter until the convergence condition is satisfied.

[0034] Preferably, the method further includes a real-time prediction update method:

[0035] Based on the online learning framework, input the newly added tobacco field environment data into the sliding time window, and update the high-correlation feature set through the incremental feature selection algorithm;

[0036] Adopt an elastic weight update strategy to fine-tune the multi-modal time series prediction model. The strategy calculates the parameter importance through the Fisher information matrix and restricts the update amplitude of important parameters;

[0037] Construct a dynamic priority queue, sort the training samples according to the prediction error and data freshness, and give priority to training high-priority samples.

[0038] Preferably, the data processing method of the multispectral sensor includes:

[0039] Perform spectral dimensionality reduction on the multispectral reflectance curve, extract non-linear features using kernel principal component analysis, and generate a low-dimensional spectral feature vector;

[0040] Construct a spectral-environment correlation model, and establish a mapping relationship between spectral features and soil moisture and meteorological parameters through partial least squares regression;

[0041] Interpolate the missing spectral data based on the mapping relationship, and fuse the interpolation result and the actual measurement value using the adaptive weighted average method.

[0042] Compared with the prior art, the beneficial effects of the present invention are:

[0043] The present invention collects tobacco field environment data through multi-source agricultural sensors and performs multi-source feature fusion using a dynamic feature selection network. This network can not only obtain original data such as soil moisture, meteorology, lidar point cloud density distribution, and multispectral reflectance, but also extract statistical features through segmented processing of sliding time windows, then screen highly correlated features with the help of a feature importance evaluation function, and finally generate an environmental feature vector through a feature fusion network including a one-dimensional convolution branch and a fully connected branch using an adaptive weighting mechanism. This process fully exploits the useful information in multi-source data, and can more comprehensively and accurately reflect the characteristics of the tobacco plant growth environment compared with traditional single data processing methods, providing a solid data basis for subsequent prediction and greatly improving the prediction accuracy.

[0044] The multi-modal time series prediction model adopts a spatio-temporal attention mechanism and constructs a spatio-temporal correlation matrix through time series window division and spatial region division. This method can effectively capture the spatio-temporal dependence relationship in the growth process of tobacco plants and accurately model the growth trend of tobacco plants. For example, in the time dimension, it can identify the impact of environmental factors on the number of tobacco plants at different growth stages; in the spatial dimension, it can consider the interaction of tobacco plant growth in different regions. In addition, the model includes a long short-term memory network branch and a Transformer branch, which are used to capture local time series patterns and model global spatio-temporal dependencies respectively, and then dynamically weighted and merged through a gated fusion unit. This multi-branch structure design, combined with the attention mechanism, makes the model perform better when processing complex tobacco plant growth data, and the prediction accuracy is significantly improved compared with traditional prediction models.

[0045] The adaptive weighted regression model aims to minimize the prediction error of the number of tobacco plants and the lowest model complexity. It uses an improved particle swarm optimization algorithm to dynamically adjust the model weights. The improved particle swarm optimization algorithm introduces an inertial weight adaptive decay mechanism and a global optimal solution perturbation strategy, which can effectively avoid the algorithm falling into local optima, improve the search efficiency, and enable the model to quickly find the optimal weight combination under different tobacco field environments and data conditions. By continuously optimizing the model weights, the adaptive weighted regression model can better fit the relationship between the number of tobacco plants and environmental characteristics, further improving the accuracy and stability of prediction.

[0046] The hierarchical correction model includes a trend layer, a residual layer, and a correction layer, which optimizes the prediction results from multiple perspectives. The trend layer smooths the prediction results based on the moving average algorithm, removing the noise and fluctuations in the prediction data, making the prediction trend more in line with the actual situation; the residual layer uses a gated recurrent unit network to dynamically compensate for the prediction residuals. Through the gating mechanism and the attention enhancement mechanism, it effectively learns and utilizes historical residual information to finely adjust the prediction results; the correction layer corrects the boundaries of the final prediction value based on the constrained least squares method, considering the physical upper and lower limits of the number of tobacco plants and the maximum change rate of the predicted values at adjacent time points, ensuring that the prediction results are within a reasonable range and avoiding unreasonable predicted values. This complete set of correction mechanisms can greatly improve the accuracy of the prediction results and provide a more reliable decision-making basis for tobacco farmers and tobacco enterprises.

[0047] The present invention also has a real-time prediction update method. Based on an online learning framework, it can process newly added tobacco field environment data in a timely manner. By using an incremental feature selection algorithm to update the set of highly correlated features, it ensures that the model always uses the most valuable data for prediction; it uses an elastic weight update strategy to fine-tune the multi-modal time series prediction model, which can quickly adapt to data changes while ensuring the stability of the model; it constructs a dynamic priority queue, prioritizes the training samples according to the prediction error and data freshness, and gives priority to training high-priority samples to improve the model training efficiency and prediction real-time performance. In addition, the data processing method of the multi-spectral sensor effectively processes multi-spectral data through operations such as spectral dimensionality reduction, constructing a spectral-environment correlation model, and data interpolation and fusion, improving the data quality and further enhancing the performance of the overall prediction system. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is the working principle diagram of the tobacco plant number prediction method described in the present invention;

[0049] Figure 2 It is the flowchart of the multi-modal time series prediction model training;

[0050] Figure 3 It is the flowchart of the improved particle swarm optimization algorithm for adjusting the model weights;

[0051] Figure 4 It is a step diagram for dynamic compensation of the residual layer of the hierarchical correction model;

[0052] Figure 5 It is a step diagram for the correction layer to be corrected based on the constrained least squares method. Specific implementation manner

[0053] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0054] Please refer to Figures 1-5 , the present invention provides a tobacco plant number prediction method based on deep learning, and its overall implementation solution is as follows:

[0055] Tobacco field environment data collection: Use multi-source agricultural sensors to obtain tobacco field environment data. Among them, the soil humidity sensor monitors the soil humidity in real time, reflecting the soil moisture conditions for the growth of tobacco plants; the meteorological sensor collects meteorological parameters such as temperature, humidity, light, and wind speed, and these factors have a significant impact on the growth and development of tobacco plants; the lidar point cloud sensor can obtain the spatial distribution information of tobacco plants, such as plant spacing, planting density, etc.; the multi-spectral sensor collects spectral reflectance data in different bands for analyzing the physiological state and growth status of tobacco plants. Through the collaborative work of these multi-source sensors, the tobacco field environment data can be collected comprehensively and accurately.

[0056] Multi-source feature fusion: Based on the dynamic feature selection network, multi-source feature fusion is performed on the collected tobacco field environment data. First, obtain the original data of each sensor, including the soil humidity time series, meteorological parameter matrix, lidar point cloud density distribution data, and multi-spectral reflectance curve. Then, use a sliding time window to segment the original data and extract the statistical features of each segment, such as mean, variance, extreme value, and trend slope. These statistical features can effectively reflect the change law and feature information of the data. After that, construct a feature importance evaluation function, calculate the correlation degree between each feature and the number of tobacco plants through the weighted combination of mutual information entropy and Pearson correlation coefficient, sort the features based on this, and use the dynamic threshold truncation method to screen out the features with high correlation degree. Finally, construct a feature fusion network, which includes parallel one-dimensional convolution branches and fully connected branches. The one-dimensional convolution branch uses multi-scale convolution kernels to extract time series features, and the fully connected branch extracts spatial features through non-linear mapping. Then, an adaptive weighting mechanism is used to fuse the outputs of the two branches to generate a fused environmental feature vector.

[0057] Modeling the growth trend of tobacco plants: Input the fused environmental feature vector into a pre-trained multi-modal time series prediction model. This model adopts a spatio-temporal attention mechanism. First, the time dimension is divided into multiple overlapping windows, and the spatial dimension is divided into rasterized regions. Based on the covariance between the environmental features within the window and the number of tobacco plants between regions, the spatio-temporal correlation weights are calculated, and then a spatio-temporal correlation matrix is constructed. Through this spatio-temporal correlation matrix, the model can effectively capture the spatio-temporal dependence relationship in the growth process of tobacco plants. Then, the model designs a spatio-temporal attention module, uses the multi-head self-attention mechanism to extract time dependence and spatial correlation respectively, and optimizes the attention output using residual connection and layer normalization to improve the model performance. In addition, the model constructs a hybrid prediction network, including a long short-term memory network branch and a Transformer branch. The long short-term memory network branch is good at capturing local time series patterns, and the Transformer branch is used to model global spatio-temporal dependence. Finally, a gated fusion unit is used to dynamically weight and merge the outputs of the two branches to generate the growth trend parameters of tobacco plants.

[0058] Constructing an adaptive weighted regression model and making predictions: Construct an adaptive weighted regression model according to the growth trend parameters output by the multi-modal time series prediction model. This model takes the minimum prediction error of the number of tobacco plants and the lowest model complexity as the optimization objectives, and uses an improved particle swarm optimization algorithm to dynamically adjust the model weights. During the adjustment process, first initialize the particle swarm parameters. Each particle represents a set of weight vectors, and the prediction error and complexity penalty term of the weight vectors are calculated through the fitness function. An inertia weight adaptive decay mechanism is adopted, and the inertia weight is dynamically adjusted according to the number of iterations and particle diversity. Its decay function is a piecewise exponential function. At the same time, a global optimal solution perturbation strategy is designed. When the particle swarm falls into a local optimum, Gaussian noise perturbation is added to the global optimal solution, and the fitness is re-evaluated through neighborhood search. Finally, the particle swarm is updated based on the elitist retention strategy. The top K particles with the highest fitness are directly retained and enter the next generation, and the remaining particles generate a new population through crossover and mutation operations. After the above optimization process, the prediction result of the number of tobacco plants is output based on the adaptive weighted regression model.

[0059] The following further illustrates the implementation of the present invention in conjunction with Embodiments 1 to 5.

[0060] Embodiment 1:

[0061] After obtaining the prediction result of the number of tobacco plants, construct a hierarchical correction model. This model is divided into a trend layer, a residual layer, and a correction layer.

[0062] The trend layer smooths the prediction result based on the moving average algorithm. The moving average algorithm removes short-term fluctuations and noises in the data by calculating the average value of the prediction values within a certain time window, and highlights the long-term trend of the change in the number of tobacco plants. Assume the prediction result sequence is , the sliding window size is , then the smoothed sequence output by the trend layer , in (when or , boundary value filling or other reasonable processing methods are adopted). In this way, some random factors affecting the prediction results can be effectively filtered out, making the trend clearer.

[0063] The residual layer dynamically compensates the prediction residuals based on the gated recurrent unit network. First, a residual sequence is constructed, and the difference between the prediction result and the actual number of tobacco plants is used as the input. The residual sequence is mapped to a high-dimensional space through the time embedding layer to enhance the expression ability of residual features. Then, a gated recurrent unit network is designed, which includes a reset gate and an update gate. The reset gate determines how much past information is retained for the calculation of the current state, and the update gate controls the mixing ratio of the current input information and the past state information in the new state. The transmission ratio of historical residual information is dynamically adjusted through the gating mechanism, enabling the network to adaptively learn and adjust according to the residual features at different times. In addition, an attention enhancement mechanism is adopted, and temporal attention weights are introduced into the hidden state to perform reinforcement learning on the residual features at key time points. For example, during the critical periods of tobacco plant growth, such as the rapid growth period and the flowering period, the residual features are more important for correcting the prediction results, and the attention mechanism can highlight the residual information at these key time points, thereby more accurately compensating for the prediction errors.

[0064] The correction layer performs boundary correction on the final prediction value based on the constrained least squares method. First, boundary constraint conditions are constructed, including the physical upper and lower limits of the number of tobacco plants, which are determined based on actual factors such as the planting density limit of the tobacco field and the land carrying capacity; and the maximum change rate of the prediction values at adjacent time points to ensure that the changes in the prediction values conform to the natural laws of tobacco plant growth. Then, an optimization objective function with constraints is designed, taking the squared error between the prediction value and the correction value as the target term, and the boundary constraints are added as penalty terms to the Lagrange multiplier. Finally, the iterative projection method is used to solve the constrained optimization problem, and the correction value and the multiplier parameters are alternately updated until the convergence condition is satisfied. After being processed by the correction layer, optimized tobacco plant number prediction data is generated, significantly improving its accuracy and rationality.

[0065] Embodiment 2:

[0066] This embodiment details the specific process of the dynamic feature selection network for multi-source feature fusion of tobacco field environmental data, ensuring that high-value features for tobacco plant number prediction can be extracted from a large amount of complex raw data and these features can be effectively fused to provide high-quality input for the subsequent prediction model.

[0067] Obtain the original data of multi-source agricultural sensors. The soil moisture time series output by the soil moisture sensor records the changes in soil moisture content at different time points; the meteorological parameter matrix collected by the meteorological sensor contains data of multiple meteorological factors such as temperature, humidity, light, and wind speed at different times; the lidar point cloud density distribution data reflects the density of tobacco plants in space; the multi-spectral reflectance curve collected by the multi-spectral sensor contains the physiological information and growth status of tobacco plants.

[0068] Perform segmented processing on the original data based on a sliding time window to extract the statistical features of each segment of data. The size of the sliding time window can be reasonably set according to the time resolution of the data and actual requirements. For each segment of data, calculate its mean, variance, extreme values, and trend slope. The mean reflects the average level of the data during this time period, the variance reflects the degree of dispersion of the data, the extreme values show the maximum and minimum values of the data, and the trend slope describes the change trend of the data. For example, for the soil moisture time series , within a sliding time window of length , the mean , the variance , the maximum value , the minimum value , and the trend slope is obtained by calculating the ratio of the difference between adjacent data points to the time interval.

[0069] Construct a feature importance evaluation function, and calculate the correlation degree between each feature and the number of tobacco plants through a weighted combination of mutual information entropy and Pearson correlation coefficient. Mutual information entropy is used to measure the degree of information sharing between two variables, and Pearson correlation coefficient reflects the degree of linear correlation between two variables. Let the feature variable be , the tobacco plant number variable be , the mutual information entropy , the Pearson correlation coefficient , where is the and joint probability distribution, and are respectively the and marginal probability distributions, is the number of samples, and are respectively the and th sample values of , and are respectively the and sample means. By setting appropriate weights and , the mutual information entropy and Pearson correlation coefficient are combined to obtain the feature importance evaluation value . Based on this correlation degree, the features are sorted, and the dynamic threshold truncation method is used to screen the features with high correlation degree. The dynamic threshold can be dynamically adjusted according to the distribution of the feature importance evaluation value and practical experience to ensure that the selected features have both high correlation and are not overly redundant.

[0070] Construct a feature fusion network, which includes a parallel one-dimensional convolutional branch and a fully connected branch. The one-dimensional convolutional branch extracts temporal features through multi-scale convolutional kernels. Convolutional kernels of different scales can capture feature information at different time scales. For example, small-scale convolutional kernels can focus on short-term local changes, while large-scale convolutional kernels can grasp long-term trend changes. The fully connected branch extracts spatial features through non-linear mapping, effectively integrating the spatial relationships in the original data. Finally, an adaptive weighting mechanism is used to fuse the outputs of the branches. The adaptive weighting mechanism dynamically adjusts the weights according to the importance of the feature information output by the two branches, so that the fused environmental feature vector can better integrate temporal and spatial features and provide a more representative input for the subsequent prediction model.

[0071] Example 3:

[0072] This example details the training process of the multi-modal time series prediction model. By reasonably constructing the model structure and training method, the model can accurately learn the spatio-temporal laws of tobacco plant growth, improve the modeling ability of the growth trend of tobacco plants, and thus lay a foundation for accurately predicting the number of tobacco plants.

[0073] Construct a spatio-temporal correlation matrix. The time dimension is divided into multiple overlapping windows, and the size and overlapping degree of the windows can be adjusted according to the actual data characteristics and analysis requirements. At the same time, the spatial dimension is divided into grid regions, and each grid represents a spatial unit. Calculate the spatio-temporal correlation weights based on the covariance between the environmental features within the window and the number of tobacco plants between regions. Let the time window be , the spatial region be and , the environmental feature vector be , the number of tobacco plants vector be , then the spatio-temporal correlation weight , where represents the covariance, represents the variance. By calculating the correlation weights between different time windows and spatial regions, a complete spatio-temporal correlation matrix is constructed, which can effectively reflect the mutual relationship between spatio-temporal factors in the tobacco plant growth process.

[0074] Design a spatio-temporal attention module to extract temporal dependence and spatial correlation respectively through the multi-head self-attention mechanism. The multi-head self-attention mechanism can capture the relationships between features from different perspectives by parallel computing with multiple different attention heads. In the temporal dimension, the attention mechanism can focus on the dependence relationships of the tobacco plant growth states at different time points; in the spatial dimension, it can explore the correlation of the tobacco plant numbers in different spatial regions. Residual connection and layer normalization are used to optimize the attention output. Residual connection can avoid the problem of gradient disappearance during the training of deep neural networks, enabling the model to better learn long-term dependence relationships; layer normalization normalizes the input of each layer, accelerating the convergence speed of the model, and improving the training efficiency and stability of the model.

[0075] Construct a hybrid prediction network, which includes a long short-term memory network branch and a Transformer branch. The long short-term memory network branch is good at capturing local temporal patterns. Its internal memory units can effectively store past information and dynamically adjust the memory content according to the current input, so as to accurately model the change trend of tobacco plant growth in a short period of time. The Transformer branch utilizes the advantage of its self-attention mechanism and can model global spatio-temporal dependencies, capturing the dependencies spanning a long time and a large spatial range in the tobacco plant growth process. A gated fusion unit is used to dynamically weight and merge the outputs of the branches to generate growth trend parameters. The gated fusion unit dynamically adjusts the weights according to the importance of the feature information output by the two branches, so that the finally generated growth trend parameters can comprehensively consider local temporal patterns and global spatio-temporal dependencies and more accurately reflect the growth trend of tobacco plants. During the training process, a large amount of historical tobacco field environment data and corresponding tobacco plant number data are used to train the model, and the parameters of the model are continuously adjusted through the backpropagation algorithm, enabling the model to learn the optimal spatio-temporal correlation relationship and growth trend modeling method.

[0076] Example 4:

[0077] This example details the process of dynamically adjusting the model weights in the adaptive weighted regression model using an improved particle swarm optimization algorithm, so that the model can achieve a better balance between prediction accuracy and model complexity, improving the accuracy of tobacco plant number prediction and the generalization ability of the model.

[0078] Initialize the particle swarm parameters. Each particle represents a set of weight vectors, and the weight vectors correspond to the respective weights in the adaptive weighted regression model. The number of particles, initial positions, and velocities can be set according to the scale of the problem and practical experience. Calculate the prediction error and complexity penalty term of the weight vector through the fitness function. The fitness function , where is the weight vector, is the prediction error of the number of tobacco plants when using this weight vector, which can be calculated by common error measurement methods such as mean square error. is a measure of model complexity, which can be measured, for example, according to the number of parameters in the model or the structural complexity of the model. is the complexity penalty coefficient, which is used to balance the relationship between prediction error and model complexity, and can be optimized and selected through experiments.

[0079] Adopt an inertia weight adaptive decay mechanism, dynamically adjust the inertia weight according to the number of iterations and particle diversity, and its decay function is a piecewise exponential function. Let the number of iterations be , the maximum number of iterations be , the particle diversity index be (which can be measured by the standard deviation of particle positions, for example), the decay function of the inertia weight can be expressed as:

[0080]

[0081] where and are the maximum and minimum values of the inertia weight respectively, is the decay coefficient, is the particle diversity threshold. At the beginning of the algorithm, a larger inertia weight helps the particles to conduct global exploration in the search space; as the iteration progresses, according to the particle diversity situation, the inertia weight gradually decays, enabling the particles to focus more on local search and improving the search accuracy.

[0082] Design a global optimal solution perturbation strategy. When the particle swarm falls into a local optimum, add Gaussian noise perturbation to the global optimal solution and re-evaluate the fitness through neighborhood search. It can be judged whether the particle swarm falls into a local optimum by observing whether the global optimal solution changes little or the fitness value converges to a smaller range in continuous multiple iterations. Assume that the global optimal solution is , the added Gaussian noise is , where is the noise standard deviation, which can be adjusted according to the actual situation. After adding noise to , a new solution is obtained, and then search in the neighborhood of , re-evaluate the fitness, and search for a better solution. In this way, it can help the particle swarm jump out of the local optimum and continue to search for a better weight vector.

[0083] Update the particle swarm based on the elitist reservation strategy. Retain the top K particles with the highest fitness and directly transfer them to the next generation. The remaining particles generate a new population through crossover and mutation operations. The crossover operation simulates the gene exchange process in biological inheritance. Select two particles from the current population and exchange some of their genes (i.e., some elements of the weight vector) according to a certain crossover probability to generate new particles. The mutation operation randomly changes some genes of the particles with a certain mutation probability to introduce new gene information and prevent the algorithm from converging prematurely. Through the elitist reservation strategy, it can ensure that the optimal solution in each generation is not lost. At the same time, the crossover and mutation operations increase the diversity of the population, enabling the algorithm to search for the optimal solution in a broader search space and continuously optimize the weights of the adaptive weighted regression model.

[0084] Example 5:

[0085] This example covers the real-time prediction update method and the specific process of multi-spectral sensor data processing. The real-time prediction update method enables the model to adjust the prediction in a timely manner with the arrival of new data, maintaining the timeliness and accuracy of the prediction; the multi-spectral sensor data processing further explores the data value and provides a more reliable basis for the prediction of the number of tobacco plants.

[0086] Real-time prediction update method: Based on the online learning framework, when new tobacco field environment data arrives, input it into the sliding time window. The role of the sliding time window is to dynamically screen and process the data, retaining the data segments most relevant to the current prediction task. Update the high-correlation feature set through the incremental feature selection algorithm. The incremental feature selection algorithm quickly determines whether the features in the new data are of important value to the prediction based on the existing feature selection results. For example, use the previously constructed feature importance evaluation function to calculate the correlation between the new features and the number of tobacco plants, add the features with a correlation higher than the dynamic threshold to the high-correlation feature set, and at the same time remove the old features that have become unimportant due to the emergence of new data to ensure that the feature set always maintains a high correlation and effectiveness for the prediction of the number of tobacco plants.

[0087] Adopt the elastic weight update strategy to fine-tune the multi-modal time series prediction model. This strategy calculates the parameter importance through the Fisher information matrix and restricts the update amplitude of important parameters. The Fisher information matrix reflects the influence degree of the model parameters on the data distribution. For the important parameters that have a greater impact on the model performance, give a smaller update amplitude to avoid excessive fluctuations in the model parameters caused by the introduction of new data and damage the learned stable features; for relatively unimportant parameters, allow a larger update amplitude to enable them to adapt to the changes of new data faster. When calculating specifically, assume that the model parameters are , the Fisher information matrix , where is the input data, is the probability distribution of the data generated by the model under the parameters . Calculate the importance score of each parameter according to the Fisher information matrix, and then determine the update step size of the parameter , where is the learning rate , and is the loss function. In this way, robust fine-tuning of the model is achieved

[0088] Construct a dynamic priority queue, and sort the training samples according to the prediction error and data freshness. Samples with larger prediction errors mean that the model performs poorly on these data and need to be learned and improved first; data freshness takes into account that new data can more accurately reflect the current growth status of the tobacco plant, and new data has higher freshness. For example, the sample priority can be defined , where and are weight coefficients used to balance the influence of prediction error and data freshness is the prediction error of the model for this sample . It can be quantified according to the difference between the data acquisition time and the current time. The smaller the difference, the higher the freshness. Train high-priority samples first, so that the model can correct the problems in the current prediction faster, and at the same time absorb the information in the new data in a timely manner, continuously improving the prediction performance

[0089] Data processing method for multispectral sensors: Perform spectral dimensionality reduction on the multispectral reflectance curve, and use Kernel Principal Component Analysis (KPCA) to extract nonlinear features to generate low-dimensional spectral feature vectors. The multispectral reflectance curve contains data in multiple bands, with a high dimension and complex nonlinear relationships. KPCA maps the original data to a high-dimensional feature space and performs principal component analysis in the high-dimensional space, so as to more effectively extract the nonlinear features in the data. The specific steps are as follows: First, define the kernel function , where is the nonlinear mapping function that maps the original data to the high-dimensional space. Common kernel functions include Gaussian kernel etc. Then calculate the kernel matrix , and perform eigenvalue decomposition on the kernel matrix , where is the eigenvalue diagonal matrix is the eigenvector matrix. Select the eigenvectors corresponding to the first largest eigenvalues, calculate the projection coefficients , and project the original data in these projection directions to obtain low-dimensional spectral feature vectors , realize spectral dimensionality reduction, reduce data redundancy and retain key information.

[0090] Construct a spectral-environment correlation model, and establish a mapping relationship between spectral features and soil moisture and meteorological parameters through partial least squares regression (PLSR). Partial least squares regression can effectively establish a regression model between a dependent variable and multiple independent variables in the case of multicollinearity among the independent variables. Let the spectral feature matrix be , and the environmental parameter matrix composed of soil moisture and meteorological parameters be , PLSR decomposes and simultaneously, extracts the components with the maximum explanatory power for , and establishes a regression model. The specific process is as follows: First, calculate the score vectors and of and , as well as the loading vectors and , and maximize the covariance between and through iterative calculation. Then, construct a regression coefficient matrix based on the score vectors and loading vectors, and obtain the regression equation , where is the residual matrix. Through this model, spectral features can be used to predict soil moisture and meteorological parameters, or spectral data can be analyzed and interpreted based on known environmental parameters.

[0091] Impute missing spectral data based on the mapping relationship, and use the adaptive weighted average method to fuse the imputation results with the actual measured values. When there are missing spectral data, use the established spectral-environment correlation model to predict the missing values. For example, for a missing spectral band value, the missing value can be predicted through the regression model according to the spectral data of other bands and the corresponding soil moisture and meteorological parameters. Then, use the adaptive weighted average method to fuse the imputation results with the actual measured values. The adaptive weighted average method dynamically adjusts the weights according to the reliability of the imputed values and the actual measured values, and the reliability can be measured by indicators such as prediction error and coefficient of variation of the data. Let the imputed value be , the actual measured value be , the weights be and , and the fused result , where and satisfy , and and It changes dynamically according to the reliability of the data. If the prediction error of the imputed value is small, it indicates that the imputation result is relatively reliable, then is relatively large; on the contrary, if the coefficient of variation of the actual measured value is small, it indicates that the actual measured value is more stable and reliable, then is relatively large. In this way, the problem of missing values in multi-spectral sensor data can be processed more accurately, the data quality can be improved, and more reliable data support can be provided for the prediction of the number of tobacco plants.

[0092] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.

[0093] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A tobacco plant quantity prediction method based on deep learning, characterized in that, Including: Collecting tobacco field environment data through multi-source agricultural sensors, where the multi-source agricultural sensors include soil humidity sensors, meteorological sensors, lidar point cloud sensors, and multispectral sensors; performing multi-source feature fusion on the tobacco field environment data based on a dynamic feature selection network to generate a fused environmental feature vector; inputting the environmental feature vector into a pre-trained multi-modal time series prediction model, where the multi-modal time series prediction model adopts a spatio-temporal attention mechanism, constructs a spatio-temporal correlation matrix through time series window division and spatial region division, and models the growth trend of tobacco plants based on the spatio-temporal correlation matrix; Constructing an adaptive weighted regression model according to the growth trend parameters output by the multi-modal time series prediction model, where the adaptive weighted regression model takes the minimum prediction error of tobacco plant quantity and the lowest model complexity as the optimization objectives, and uses an improved particle swarm optimization algorithm to dynamically adjust the model weights, and the improved particle swarm optimization algorithm introduces an inertia weight adaptive decay mechanism and a global optimal solution perturbation strategy; outputting the tobacco plant quantity prediction result based on the adaptive weighted regression model; Constructing a hierarchical correction model according to the tobacco plant quantity prediction result, where the hierarchical correction model includes a trend layer, a residual layer, and a correction layer, where the trend layer smooths the prediction result based on the moving average algorithm, the residual layer dynamically compensates the prediction residuals based on a gated recurrent unit network, and the correction layer corrects the boundary of the final prediction value based on the constrained least squares method to generate optimized tobacco plant quantity prediction data; The multi-source feature fusion of the tobacco field environment data by the dynamic feature selection network includes: Obtaining the original data of the multi-source agricultural sensors, where the original data includes soil humidity time series, meteorological parameter matrix, lidar point cloud density distribution data, and multispectral reflectance curves; performing segmented processing on the original data based on a sliding time window, and extracting the statistical features of each segment of data, including mean, variance, extreme value, and trend slope; Constructing a feature importance evaluation function, where the function calculates the correlation degree between each feature and the tobacco plant quantity through a weighted combination of mutual information entropy and Pearson correlation coefficient; sorting the features based on the correlation degree, and using a dynamic threshold truncation method to screen high-correlation features; Constructing a feature fusion network, where the network includes parallel one-dimensional convolutional branches and fully connected branches, where the one-dimensional convolutional branches extract time series features through multi-scale convolutional kernels, and the fully connected branches extract spatial features through non-linear mapping; using an adaptive weighted mechanism to fuse the branch outputs to generate a fused environmental feature vector.

2. The method according to claim 1, wherein The training method of the multi-modal time series prediction model includes: Constructing a spatio-temporal correlation matrix, dividing the time dimension into multiple overlapping windows, dividing the spatial dimension into rasterized regions, and calculating the spatio-temporal correlation weights based on the covariance between the environmental features within the window and the tobacco plant quantity between regions; Designing a spatio-temporal attention module, respectively extracting time dependence and spatial correlation through a multi-head self-attention mechanism, and optimizing the attention output using residual connection and layer normalization; Construct a hybrid prediction network, which includes a long short-term memory network branch and a Transformer branch. The long short-term memory network branch is used to capture local temporal patterns, and the Transformer branch is used to model global spatio-temporal dependencies. A gated fusion unit is used to dynamically weight and combine the branch outputs to generate growth trend parameters.

3. The method according to claim 1, characterized in that, The dynamic adjustment of the model weights by the improved particle swarm optimization algorithm includes: Initialize the particle swarm parameters. Each particle represents a set of weight vectors, and the prediction error and complexity penalty term of the weight vectors are calculated through the fitness function. Adopt an inertial weight adaptive decay mechanism, which dynamically adjusts the inertial weight according to the number of iterations and particle diversity. Its decay function is a piecewise exponential function. Design a global optimal solution perturbation strategy. When the particle swarm falls into a local optimum, Gaussian noise perturbation is added to the global optimal solution, and the fitness is re-evaluated through neighborhood search. Update the particle swarm based on the elite retention strategy. The top K particles with the highest fitness are directly retained and enter the next generation, and the remaining particles generate a new population through crossover and mutation operations.

4. The method according to claim 1, characterized in that, The residual layer of the hierarchical correction model dynamically compensates the prediction residuals based on the gated recurrent unit network, including: Construct a residual sequence, use the difference between the prediction result and the actual number of tobacco plants as the input, and map the residual sequence to a high-dimensional space through the time embedding layer. Design a gated recurrent unit network, which includes a reset gate and an update gate, and dynamically adjusts the transmission ratio of historical residual information through the gating mechanism. Adopt an attention enhancement mechanism, introduce time attention weights in the hidden state, and perform reinforcement learning on the residual features at key time points.

5. The method according to claim 1, wherein The correction layer corrects the boundary of the final prediction value based on the constrained least squares method, including: Construct boundary constraint conditions, which include the physical upper and lower limits of the number of tobacco plants, and the maximum change rate of the predicted values at adjacent time points. Design an optimization objective function with constraints, use the squared error between the predicted value and the corrected value as the objective term, and add the boundary constraints as penalty terms to the Lagrange multiplier. Adopt the iterative projection method to solve the constrained optimization problem, and alternately update the corrected value and the multiplier parameter until the convergence condition is met.

6. The method according to claim 1, wherein It also includes a real-time prediction update method: Based on the online learning framework, input the newly added tobacco field environment data into the sliding time window, and update the high-correlation feature set through the incremental feature selection algorithm. Adopt an elastic weight update strategy to fine-tune the multi-modal time series prediction model. This strategy calculates the parameter importance through the Fisher information matrix and limits the update amplitude of important parameters. Construct a dynamic priority queue, prioritize the training samples according to the prediction error and data freshness, and give priority to training high-priority samples.

7. The method according to claim 1, characterized in that, The data processing method of the multi-spectral sensor includes: Perform spectral dimensionality reduction on the multi-spectral reflectance curve, extract non-linear features using kernel principal component analysis, and generate low-dimensional spectral feature vectors. Construct a spectral-environment correlation model, and establish the mapping relationship between spectral features and soil moisture and meteorological parameters through partial least squares regression. Interpolate the missing spectral data based on the mapping relationship, and use the adaptive weighted average method to fuse the interpolation results with the actual measured values.

Citation Information

Patent Citations

  • Subway passenger flow volume prediction method and device based on DCG and double-branch parallel

    CN118469079A

  • Intelligent agricultural planting decision support implementation method based on big data analysis

    CN118863578A

  • Artificial intelligence-based crop yield prediction method and system

    CN119312989A