A method for determining the drying strength of cut tobacco based on a double gradient-continual projection algorithm

By combining the dual gradient-continuous projection algorithm with linear discriminant analysis, the problems of real-time performance and accuracy in leaf drying intensity discrimination were solved, achieving efficient leaf drying intensity discrimination and supporting real-time control and homogenization of the production line.

CN122241547APending Publication Date: 2026-06-19ZHENGZHOU TOBACCO RES INST OF CNTC +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU TOBACCO RES INST OF CNTC
Filing Date
2026-03-20
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve rapid, non-destructive, and real-time determination of drying intensity during leaf drying. Traditional methods suffer from insufficient information utilization, high computational load, and high model complexity.

Method used

A leaf drying intensity discrimination method based on the dual gradient-continuous projection algorithm is adopted. By calculating local gradient changes and regional gradient changes, feature values ​​are fused for full-band initial screening, and continuous projection algorithm is combined for fine screening to construct a linear discriminant analysis model.

Benefits of technology

It enables rapid and accurate determination of leaf drying intensity, reduces data processing volume and model complexity, provides highly interpretable determination results, and supports real-time control and homogenization of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241547A_ABST
    Figure CN122241547A_ABST
Patent Text Reader

Abstract

This invention provides a method for discriminating leaf filament drying intensity based on a dual-gradient-continuous projection algorithm, comprising the following steps: acquiring leaf filament spectral data with different drying intensities using a hyperspectral imaging system; preprocessing the leaf filament spectral data based on standard normal variable transformation; selecting feature bands from the preprocessed leaf filament spectral data using a dual-gradient-continuous projection algorithm; constructing a leaf filament drying intensity discrimination model from the selected leaf filament spectral data using a linear discriminant analysis classification algorithm; identifying the leaf filaments to be discriminated based on the established leaf filament drying intensity discrimination model, and outputting the leaf filament drying intensity discrimination result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of leaf drying intensity discrimination technology, and in particular to a leaf drying intensity discrimination method based on a dual gradient-continuous projection algorithm. Background Technology

[0002] Tobacco drying involves heating and drying the tobacco shreds as they pass through a drum, using steam as the heating source. Heat is transferred through the drum wall and forced convection of hot air, while a dust removal and dehumidification system rapidly removes evaporated moisture and dust from the drum. The parameter system for tobacco drum drying encompasses incoming material parameters (moisture content, temperature, flow rate, etc.), drying process parameters (drum wall temperature, hot air conditions, dehydration rate, etc.), equipment structural parameters (drum speed, drum tilt angle, etc.), and workshop environmental indicators (temperature, humidity, etc.). These multidimensional and heterogeneous data exhibit complex coupling relationships, making it difficult to establish a mechanistic model linking the parameter system to drying intensity.

[0003] Although the intrinsic quality indicators (physicochemical properties, sensory quality, etc.) of leaf filaments after drum drying can reflect the level of drying intensity to some extent, their definitions are too broad and cannot be quantified. Furthermore, the intrinsic quality indicators have limitations in detection, subjective bias, and time lag, making it difficult to comprehensively, accurately, and in real time reflect the drying intensity of leaf filaments. This further increases the difficulty of characterizing the drying intensity through intrinsic quality, and there is an urgent need for a new detection technology to achieve accurate mapping of the drying intensity of leaf filaments.

[0004] Against this backdrop, spectral analysis-based techniques have gained attention due to their potential for rapid, non-destructive, and real-time monitoring, particularly in extracting effective information from high-dimensional spectral data. High-dimensional spectral data is characterized by its high dimensionality, and typically only a few key bands out of hundreds contain the most relevant information to the target. Without filtering, noise can overwhelm useful signals, while also imposing a significant computational burden, making model training and prediction inefficient and hindering practical deployment. The continuous projection algorithm is a well-known, classic, and commonly used feature band selection algorithm. For example, CN202510719907.1 uses the continuous projection algorithm to perform dimensionality reduction on a denoised spectral image dataset. Through a forward loop search mechanism, the continuous projection algorithm effectively filters out feature bands with low collinearity and strong representativeness, achieving dimensionality reduction and information condensation. However, when using this algorithm to screen characteristic bands in the spectral data of dried leaf filaments, the selected bands are easily concentrated in the spectral space. Although it can accurately capture strong response signals in local areas, it is difficult to fully reflect the overall spectral characteristics of the sample due to the limited coverage, and there is a risk of insufficient information integrity.

[0005] To overcome the limitations of the continuous projection algorithm in utilizing global information, an effective strategy is to combine it with other algorithms. For example, CN202010745439.2 proposes a near-infrared non-destructive testing method for malic acidity based on a fusion feature wavelength selection algorithm. This method utilizes both the continuous projection algorithm and the competitive adaptive reweighted sampling algorithm for feature wavelength selection, and then fuses the selected feature wavelengths. However, this method fails to resolve the fundamental conflict in the underlying principles of the two algorithms—the continuous projection algorithm pursues low collinearity, while the competitive adaptive reweighted sampling algorithm pursues high correlation. This difference in core logic leads to the selected band sets potentially being both highly redundant and inherently conflicting. Simple merging fails to fundamentally reconcile the differences between the two algorithms and may instead introduce redundancy and contradictions into the final feature set. Furthermore, the fusion process requires repeatedly building a correction model and calculating the determination coefficients in a loop, resulting in a large computational burden.

[0006] In order to solve the above problems, people have been seeking an ideal technological solution. Summary of the Invention

[0007] Therefore, it is necessary to propose a leaf drying state discrimination method based on the dual gradient-continuous projection algorithm to address the above-mentioned technical problems.

[0008] To achieve the above objectives, the first aspect of the present invention provides a method for determining the drying intensity of leaf filaments based on a dual gradient-continuous projection algorithm, comprising the following steps:

[0009] S1: Acquire leaf filament spectral data at different drying intensities using a hyperspectral imaging system;

[0010] S2: Preprocessing of leaf filament spectral data based on standard normal variable transformation;

[0011] S3: Feature band selection is performed on the preprocessed leaf filament spectral data based on the dual gradient-continuous projection algorithm;

[0012] The dual-gradient-continuous projection algorithm includes:

[0013] For the preprocessed leaf filament spectral data, the local gradient change and regional gradient change are calculated respectively to obtain the local gradient characteristic value and the regional gradient characteristic value;

[0014] By fusing local and regional gradient feature values ​​of leaf filament spectral data, the leaf filament spectral data are initially screened across the entire spectrum based on this fused feature.

[0015] For the characteristic bands obtained after the initial screening of the entire band, a continuous projection algorithm is used for further screening to obtain the final characteristic bands;

[0016] S4: Construct a discriminant model for leaf filament spectral data after feature band selection based on linear discriminant analysis classification algorithm;

[0017] S5: Based on the established leaf filament drying intensity discrimination model, identify the leaf filaments to be discriminated and output the leaf filament drying intensity discrimination results.

[0018] In the above scheme, firstly, by calculating local gradient changes and regional gradient changes, the system systematically captures local gradient feature values ​​representing physical details and regional gradient feature values ​​reflecting overall trends across the entire spectral band, and fuses them to obtain a fused feature. Then, a coarse screening is performed across the entire spectral band based on this fused feature. This pre-fusion coarse screening mechanism fundamentally overcomes the shortcomings of directly using the continuous projection algorithm for feature band selection, such as limited selectivity and insufficient information utilization, ensuring the comprehensiveness and high signal-to-noise ratio of the feature base. Subsequently, the continuous projection algorithm performs fine screening on this high-quality feature base, further selecting the core band subset with the lowest collinearity and strongest discriminative power. This coherent design enables the final model to achieve optimal discriminative performance with a very small number of feature bands. This method not only theoretically guarantees the comprehensiveness and physical interpretability of the feature set, but also significantly reduces the amount of data processing and model complexity in engineering applications. Based on this, the further constructed linear discriminant analysis model has extremely high operating efficiency and fast response capability, which can match the stringent requirements of modern production lines for real-time and non-destructive testing, realizing a value loop from theoretical innovation to industrial application.

[0019] Furthermore, the establishment of this efficient discrimination model provides a direct impetus for improving the homogenization level of leaf processing: on the one hand, it enables rapid online discrimination of drying intensity, allowing operators to immediately detect deviations and adjust process parameters, effectively preventing continuous deviations in batch quality due to diagnostic delays, and ensuring homogenization from the perspective of dynamic process control. On the other hand, the characteristic bands selected by the model have clear physical meanings, such as being related to the characteristic absorption regions of key components like moisture and cellulose. This strong interpretability transforms black-box discrimination into understandable process knowledge, providing a solid technical basis and theoretical support for continuously optimizing drying processes and consolidating homogenization standards.

[0020] In one possible embodiment, the local gradient change and regional gradient change are calculated respectively on the preprocessed leaf filament spectral data to obtain local gradient feature values ​​and regional gradient feature values, including:

[0021] The local gradient changes in leaf filament spectral data are calculated using second-order difference methods to obtain local gradient eigenvalues;

[0022] The size n of the regional gradient window is dynamically adjusted according to the spectral change rate, where n is an odd number. Gaussian weights are generated for each position within the window. The neighborhood spectra of each band are weighted and averaged using the Gaussian weights. Based on the smoothed spectral values, the regional gradient change is calculated by first-order difference to obtain the regional gradient characteristic value.

[0023] In one possible embodiment, the local gradient feature values ​​and regional gradient feature values ​​of the fused leaf filament spectral data are used to perform a full-band initial screening of the leaf filament spectral data based on the fused features, including:

[0024] The mean absolute values ​​of the local gradient eigenvalues ​​and the regional gradient eigenvalues ​​are calculated separately and then normalized to obtain the local gradient importance score and the regional gradient importance score.

[0025] The local gradient importance score and the regional gradient importance score are combined to obtain a dual gradient importance score, and the entire band is sorted according to the score.

[0026] The optimal initial screening ratio was determined using a partial least squares regression model, and the entire spectrum of leaf filaments was used for initial screening.

[0027] It is understandable that spectral curves are essentially complex signals superimposed with high-frequency details and mid-to-low-frequency trends. High-frequency features manifest as rapid fluctuations such as sharp absorption peaks and troughs, while mid-to-low-frequency features reflect macroscopic trends such as the overall slope and broad envelope of the spectrum. The core purpose of dual-gradient coarse screening is to systematically capture multi-dimensional and multi-scale variations in spectral data by fusing local and regional gradient features. Local gradient features, calculated point-by-point, accurately capture rapidly changing details; regional gradient features, derived through regional moving averages, effectively extract overall trends and broad-amplitude characteristics. The fusion of these two methods preserves both local spectral details and macroscopic morphology, thus avoiding the omission of crucial information that might occur from a single gradient perspective, laying a comprehensive and reliable information foundation for subsequent precise selection of feature bands.

[0028] This coarse screening strategy also significantly improves the efficiency and model performance of subsequent fine screening. Dual-gradient coarse screening provides a high-quality, highly representative initial feature set for fine screening methods such as the continuous projection algorithm. Compared to single-gradient initial screening, dual-gradient fusion features can more comprehensively describe spectral characteristics, thus helping the continuous projection algorithm to more stably and efficiently select core features with strong discriminative power, thereby constructing a more accurate and robust prediction model.

[0029] Furthermore, the dual-gradient coarse screening strategy effectively overcomes the inherent limitations of traditional feature selection methods. Traditional methods, such as competitive adaptive reweighted sampling algorithms and genetic algorithms, often face problems of feature redundancy or missing key information; while continuous projection algorithms can effectively compress the number of features, their results are sometimes too concentrated in a few specific bands, leading to insufficient utilization of important information in other spectral regions. In contrast, the combined scheme of dual-gradient coarse screening and continuous projection algorithms can ensure broad coverage of multiple key peak and valley regions across the entire spectrum in the initial screening stage. The final selected feature set not only has low redundancy but also a more uniform spectral distribution. This not only mathematically reduces the risk of collinearity among features but also physically ensures that the selected feature set has stronger representativeness and discriminative power.

[0030] In one possible embodiment, the step of further refining the characteristic bands obtained after the initial screening of the entire band using a continuous projection algorithm to obtain the final characteristic bands includes:

[0031] Based on the characteristic bands after initial screening, the characteristic bands with the highest correlation to drying intensity are selected to form an initial feature set, and the performance of the initial feature set is evaluated.

[0032] Calculate the projection vector for each remaining feature band, select the feature band with the largest projection vector to form a subset of feature bands, and evaluate the performance.

[0033] The optimal feature subset is determined by using a partial least squares regression model, which enables further fine screening of feature bands after the initial screening.

[0034] It should be noted that the continuous projection algorithm was chosen for fine-tuning based on its comprehensive advantages in efficiency, theoretical consistency, and target consistency. As a highly efficient forward selection algorithm, the continuous projection algorithm has extremely low computational complexity and can achieve rapid convergence on the feature subset provided by the dual-gradient coarse selection. Its efficiency is far higher than that of competitive adaptive reweighted sampling algorithms that rely on repeated sampling, iterative information-preserving variable algorithms, or computationally cumbersome genetic algorithms.

[0035] At the theoretical level, the continuous projection algorithm and the linear discriminant analysis (LDA) classification algorithm are highly synergistic. The core principle of the continuous projection algorithm is to select a subset of variables by minimizing the multicollinearity among features. This directly satisfies the core requirement of the LDA classification algorithm for the numerical stability of input data—effectively avoiding the ill-conditioned problem of the intra-class scatter matrix, thus providing the LDA classification algorithm with reliable and highly interpretable feature input.

[0036] More importantly, the optimization objective of the continuous projection algorithm is inherently consistent with the modeling objective of the linear discriminant analysis (LDA) classification algorithm: both are dedicated to building a robust and efficient linear model. This deep alignment ensures a seamless workflow from feature selection to model construction, ultimately providing a solid foundation for establishing a high-performance, high-generalization classification model.

[0037] To achieve the above objectives, a second aspect of the present invention provides a leaf filament drying intensity discrimination system based on a dual gradient-continuous projection algorithm, comprising:

[0038] The data acquisition module is used to collect leaf filament spectral data of different drying intensities based on the hyperspectral imaging system.

[0039] The data preprocessing module is used to preprocess leaf filament spectral data based on standard normal variable transformation;

[0040] The feature band selection module is used to select feature bands from the preprocessed leaf filament spectral data based on the dual gradient-continuous projection algorithm.

[0041] The dual-gradient-continuous projection algorithm includes:

[0042] For the preprocessed leaf filament spectral data, the local gradient change and regional gradient change are calculated respectively to obtain the local gradient characteristic value and the regional gradient characteristic value;

[0043] By fusing local and regional gradient feature values ​​of leaf filament spectral data, the leaf filament spectral data are initially screened across the entire spectrum based on this fused feature.

[0044] For the characteristic bands obtained after the initial screening of the entire band, a continuous projection algorithm is used for further screening to obtain the final characteristic bands;

[0045] The model building module is used to build a discriminant model based on the linear discriminant analysis classification algorithm for leaf filament spectral data after feature band selection;

[0046] The drying intensity discrimination module is used to identify the leaf filaments to be discriminated based on the established leaf filament drying intensity discrimination model, and output the leaf filament drying intensity discrimination result.

[0047] To achieve the above objectives, a third aspect of the present invention provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the steps of the method described in the first aspect.

[0048] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0049] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0050] The beneficial effects of this invention are as follows:

[0051] Compared with traditional feature band selection methods, the dual-gradient-continuous projection algorithm accurately locates feature bands closely related to the drying intensity of the filaments. This ensures both the simplicity of the feature bands and the maximum retention of discriminative spectral information, effectively overcoming the limitations of traditional feature band selection methods in controlling the number of bands and capturing key information. This further improves the discrimination accuracy of the filament drying intensity discrimination model, enabling rapid and accurate determination of filament drying intensity. This allows production line operators to take timely measures for filaments with different drying intensities, preventing the filament processing state from continuously deviating from the homogenization standard due to excessively long discrimination times, thus strongly guaranteeing the homogenization level of filament processing. Furthermore, the good interpretability provided by the selected feature bands offers strong technical support for the homogenization of filament processing. Attached Figure Description

[0052] Figure 1 This is a flowchart illustrating the leaf filament drying intensity discrimination method based on the dual gradient-continuous projection algorithm described in an embodiment of the present invention.

[0053] Figure 2 This is a hyperspectral image of a single sample of leaf filament with low (0) drying intensity collected in an embodiment of the present invention.

[0054] Figure 3 This is a schematic diagram of a masked image after removing the background from a single sample hyperspectral image of a leaf filament with low (0) drying intensity collected in an embodiment of the present invention.

[0055] Figure 4 This is the original spectral curve of a single sample of leaf filament with low (0) drying intensity collected in an embodiment of the present invention.

[0056] Figure 5 These are the original spectral curves of all leaf filament samples with drying intensities in this embodiment of the invention.

[0057] Figure 6 This is a graph showing the original spectral curves of all leaf filament samples in this embodiment of the invention after standard normal variable transformation.

[0058] Figure 7This is a flowchart illustrating the dual gradient-continuous projection algorithm in an embodiment of the present invention.

[0059] Figure 8 This is a distribution map of local gradient feature values ​​and regional gradient feature values ​​in an embodiment of the present invention.

[0060] Figure 9 This is a graph showing the distribution curves of the dual-gradient importance score and the single-gradient importance score when both the local weight and the regional weight range are 0.5 in this embodiment of the invention.

[0061] Figure 10 This is a graph showing the trend of mean square error as a function of the initial screening retention ratio under the optimal local weight and regional weight settings in this embodiment of the invention.

[0062] Figure 11 This is a distribution curve of the initial screening feature set under the optimal retention feature band ratio α, local weight, and regional weight settings in this embodiment of the invention.

[0063] Figure 12 This is the optimal feature band distribution diagram in the embodiment of the present invention.

[0064] Figure 13 It is the normalized confusion matrix of the validation set of the leaf drying intensity discrimination model established based on the dual gradient-continuous projection algorithm in the embodiments of the present invention. Detailed Implementation

[0065] During the drying process of leaf filaments, their internal moisture, organic matter, and microstructure undergo dynamic changes with drying intensity, which manifest as complex multi-scale response patterns in the leaf filament spectrum. Among these, the broad and gradual trends caused by the overall migration of chemical components and moisture removal constitute the regional gradient features of the spectrum, while the subtle fluctuations caused by differences in local functional groups and physical structures form the local gradient features. The core challenge for achieving rapid online identification and quality control in production lines lies in efficiently and accurately extracting key features strongly correlated with drying intensity from high-dimensional spectral data.

[0066] This invention proposes a strategy combining coarse screening using dual-gradient (local gradient and regional gradient) features with fine screening using a continuous projection algorithm, and constructs a linear discriminant analysis (LDA) classification model. First, dual-gradient analysis deconstructs the entire spectral band from both local and regional gradient dimensions, ensuring the completeness of spectral information capture and laying the foundation for a high-value feature pool for subsequent screening. Then, based on the criterion of minimizing collinearity, the continuous projection algorithm selects a small subset of feature bands with the strongest discriminative power from this feature pool. This process not only overcomes the potential problems of feature redundancy or missing key information in traditional feature band selection methods, but also possesses extremely high computational efficiency due to its forward search mechanism. Finally, the leaf drying intensity discrimination model established in this study achieves excellent classification performance using only a very small number of feature bands.

[0067] The technical solution of the present invention will be further described in detail below through specific embodiments.

[0068] Example 1

[0069] This embodiment provides a method for determining the drying intensity of leaf filaments based on a dual gradient-continuous projection algorithm, such as... Figure 1 As shown, it includes the following steps:

[0070] S1: Acquire leaf filament spectral data at different drying intensities using a hyperspectral imaging system.

[0071] Specifically, the hyperspectral imaging system is the hyperspectral imaging system of the Key Laboratory of Tobacco Industry Processes platform, with a wavelength range of 1000.8 nm - 2512.8 nm, a wavelength interval of 5.6 nm, and a total of 270 bands. The hyperspectral imaging system mainly includes a stage unit, a hyperspectral camera unit, a computer processing unit, and a vertical host unit. The leaf filament sample is laid flat on the motorized stage, which moves at a speed of 1.35 cm / s with the motorized stage belt. The hyperspectral information of the leaf filament is acquired using SpecView image acquisition software.

[0072] The drying intensity of the leaf filament spectral data is no less than five, and the moisture content of the leaf filaments with different drying intensities remains consistent. In this embodiment, five different gradients of cylinder wall temperature are set: 117℃, 122℃, 127℃, 132℃, and 135℃, representing five gradients of drying intensity: low (0), low-medium (1), medium (2), medium-high (3), and high (4), respectively. By adjusting the dehumidification negative pressure parameter, which has a relatively small impact on the drying intensity, and by fine-tuning the hot air flow rate parameter, which has a relatively large impact on the drying intensity, the moisture content of the leaf filaments after drying is controlled to be consistent, thus ensuring the consistency of the leaf filament state after drying.

[0073] Specifically, hyperspectral images of single samples of leaf filaments with low (0) drying intensity were acquired, such as... Figure 2 As shown; after removing the background, it is converted into a mask image, as shown. Figure 3 As shown; calculate the average reflectance of non-zero pixel regions in the mask image, and use this to generate the original spectral curve of the single sample of leaf filament at this drying intensity, as shown. Figure 4 As shown, the data were extracted as the single-sample spectral data of the leaf filaments at this drying intensity. The spectral data of all leaf filament samples within the low (0) drying intensity were pooled together as the spectral data of the leaf filaments at the low (0) drying intensity.

[0074] For each drying intensity, 130 spectral data points were obtained. Using the Kennard-Stone (KS) algorithm, 91 data points (70%) were selected as the training set and 39 data points (30%) as the validation set. The hyperspectral data from the five drying intensities constituted the total experimental dataset, comprising 650 leaf filament samples. The training set contained 455 leaf filament samples, and the validation set contained 195 leaf filament samples. The original spectral curves of all leaf filament samples at all drying intensities are shown below. Figure 5 As shown.

[0075] S2: Preprocessing of leaf filament spectral data based on standard normal variable transformation.

[0076] The original spectrum still contains some background interference and noise, so it needs to be preprocessed to eliminate the influence of useless information and uncertain variables.

[0077] This embodiment uses standard normal transformation to preprocess the original spectra. Specifically, it eliminates spectral intensity variations between different samples caused by differences in optical path length, particle scattering, and other factors by standardizing each spectral vector. The original spectral curves of all leaf filament samples after standard normal transformation are shown below. Figure 6 As shown.

[0078] S3: Selecting characteristic bands for preprocessed leaf filament spectral data based on the dual gradient-continuous projection algorithm.

[0079] Spectral data contains multi-scale information ranging from macroscopic trends to microscopic details. To comprehensively characterize its chemical and physical properties, this step designs a dual-gradient feature extraction scheme, targeting low- and mid-frequency features that reflect the overall morphology and high-frequency features that reflect local details. Through a combination of adaptive smoothing and differential operations, accurate and robust spectral analysis is achieved.

[0080] Here, dual gradients refer to local gradients and regional gradients. Local gradient changes are captured by solving the gradient point by point on the spectral curve, thus revealing rapid changes in the spectrum at local gradients. Regional gradient changes are extracted by taking the derivative of the regional moving average of the spectral curve, aiming to extract the overall trend and wide-range characteristics of the spectrum at regional gradients. By fusing the local and regional gradient feature values ​​of the spectrum, a preliminary feature set can be obtained, and a systematic characterization of the multi-gradient features of spectral data can be initially achieved.

[0081] like Figure 7 As shown, the dual gradient-continuous projection algorithm includes:

[0082] S31. For the preprocessed leaf filament spectral data, calculate the local gradient change and regional gradient change respectively to obtain the local gradient characteristic value and regional gradient characteristic value.

[0083] (1) Calculation of local gradient eigenvalues

[0084] Specifically, the local gradient changes in the leaf filament spectral data are calculated using second-order difference to obtain local gradient eigenvalues;

[0085] The formula for calculating the local gradient eigenvalue is:

[0086]

[0087] In the formula, i is the i-th band, X(i) is the spectral value of the i-th band, and Δλ is the wavelength interval.

[0088] Local gradient eigenvalues ​​correspond to subtle fluctuations in spectral curves that are short-span and rapidly changing, such as noise, sharp peaks and valleys, and local abrupt changes. Extracting these features requires highly sensitive methods capable of keenly capturing changes. Compared to first-order differencing, which is only sensitive to slope and easily smooths out rapid, subtle fluctuations, second-order differencing demonstrates a more pronounced response and enhancement effect to the high-frequency components of the signal. It further reveals the rate of slope change and directly quantifies the curvature of the spectrum. It is this focus on curvature that allows it to strongly respond to local bulges (peaks) or depressions (valleys) in the spectrum, thereby highlighting high-frequency components. Therefore, in local gradient eigenvalue extraction, using second-order differencing ensures the sensitivity of the initial feature set to subtle spectral fluctuations, aligning with the design goals of local gradients.

[0089] (2) Calculation of regional gradient

[0090] First, the size n of the regional gradient window is dynamically adjusted according to the spectral change rate. n is an odd number. A small window is used for spectra with high change rate, a medium window is used for spectra with medium change rate, and a large window is used for spectra with low change rate, to ensure that the window matches the spectral characteristics.

[0091] Secondly, Gaussian weights are generated for each position within the window by using the window size n. The neighborhood spectra of each band are then weighted and averaged using the Gaussian weights. Based on the smoothed spectral values, the regional gradient change is calculated by first-order differential to obtain the regional gradient characteristic value.

[0092] The steps for generating Gaussian weights are as follows: Let the center position of the window be 0, and the index of the positions extending to both sides be k= , ..., 0, ..., Calculate the Gaussian weight at position k:

[0093]

[0094] In the formula, n: window size; σ: standard deviation of the Gaussian function, with a value of n / 6; k: position index within the window.

[0095] Then, let the intensity of the original spectrum at band i+k be X(i+k). A Gaussian weighted average is applied to the neighborhood spectra of each band, with the center band having the highest weight and the weight decreasing towards the edge bands, thus smoothing the original spectrum. The formula for calculating the smoothed spectral value of each band is as follows:

[0096]

[0097] Finally, based on the smoothed spectral values, the regional gradient characteristic value is obtained by calculating the regional gradient change through first-order difference differentiation. The formula for calculating the regional gradient characteristic value of each band is as follows:

[0098]

[0099] It is understandable that regional gradient eigenvalues ​​correspond to the overall trend, wide-range characteristics, or slow changes in the spectrum. These changes typically span a wide wavelength range and are easily affected by high-frequency noise; therefore, smoothing is the primary step. This embodiment employs a Gaussian-weighted sliding window averaging method, a highly efficient low-pass filtering technique. By assigning the highest weight to the center band of the window and decreasing it towards the edges, noise is smoothed while minimizing distortion at the spectral edges.

[0100] To further optimize the results, this embodiment introduces a dynamic balancing mechanism that adaptively adjusts the window size based on the local spectral change rate. In regions of rapid spectral change (high rate of change), a smaller window is used to retain more detail; conversely, in regions of smooth spectral change (low rate of change), a larger window is used to enhance the smoothing effect. This dynamic strategy ensures that the smoothing parameters match the local characteristics of the spectrum, achieving an optimal balance between noise suppression and preservation of effective information, avoiding over-smoothing or under-smoothing caused by fixed parameters.

[0101] Based on the smoothed spectrum, this embodiment quantifies the direction and rate of change of the spectral trend by calculating the first-order difference. The first-order difference is essentially a discretized first derivative, which clearly reveals the slope of the spectral curve in each band.

[0102] It is understandable that after the aforementioned adaptive smoothing process, high-frequency noise has been significantly suppressed. At this point, the first-order difference result can stably and reliably reflect the trend changes of the mid-to-low frequency characteristics themselves, such as the rising and falling edges of the wide absorption peak. Compared with the second-order difference, the first-order difference is less sensitive to residual noise, and its output signal is more stable. Therefore, it is particularly suitable for characterizing and extracting those slowly changing overall trends and wide-range characteristics.

[0103] Therefore, this combined approach, through the concatenation of adaptive smoothing and first-order differencing, constructs an efficient regional gradient feature extractor. It not only cleanses the data and highlights core trends but also adapts to the changing characteristics of different spectral ranges through a dynamic balancing mechanism, ultimately achieving a multi-scale, robust representation of the overall spectral shape and wide-range gradient variations. Thus, in regional gradient feature extraction, the combination of sliding window, dynamic balancing, and first-order differencing can effectively extract the overall trend and wide-range feature variations of the spectrum, while adapting to different spectral change rates, achieving multi-gradient feature representation.

[0104] Then, based on the local gradient change and the regional gradient change, the local gradient eigenvalues ​​and the regional gradient eigenvalues ​​are obtained, and their distribution is shown in the figure below. Figure 8 As shown.

[0105] S32, integrates the local gradient feature value and the regional gradient feature value of the leaf filament spectral data, and performs full-band initial screening of the leaf filament spectral data based on the fused feature.

[0106] First, the absolute mean values ​​of the local gradient eigenvalues ​​and the regional gradient eigenvalues ​​are calculated and normalized to obtain the local gradient importance score and the regional gradient importance score.

[0107] The formula for calculating the absolute mean is:

[0108]

[0109]

[0110] G local, j (i) represents the local gradient value of the j-th sample in each band; G region, j (i) represents the regional gradient value of the j-th sample in each band; N is the total number of samples.

[0111] The formula for calculating importance score is:

[0112]

[0113]

[0114] Secondly, the local gradient importance score and the regional gradient importance score are merged to obtain the dual gradient importance score, and the entire band is sorted according to the score.

[0115] The formula for calculating the importance score of the two gradients is:

[0116]

[0117] Score fusion (i) represents the importance score with two gradients.

[0118] ω local For local importance weights,

[0119] ω region This represents the weighting of regional importance.

[0120] Finally, the optimal initial screening ratio was determined using a partial least squares regression model, and preliminary screening was conducted across the entire band.

[0121] In practical implementation, the following dual search mechanism is established: To avoid a single weight being too high or too low, the range of local weight and regional weight is set to 0.3-0.8, the sum of local weight and regional weight is 1, the step size is 0.05, and grid search is used to search the local weight and regional weight step by step to obtain the dual gradient importance score under different weights.

[0122] Based on the importance scores of the two gradients under different weights, in order to avoid the initial screening ratio α being too high or too low, the range of α value is set to 0.3-0.8 with a step size of 0.05. Grid search is used to search for α value step by step to obtain the mean square error of the partial least squares regression model under different α values.

[0123] It is important to note that when using the partial least squares regression model, an early stopping mechanism is incorporated. The model stops when the mean squared error has not improved after 5 iterations. The optimal initial screening ratio α, local gradient, and regional gradient weights are determined when the mean squared error of the 5-fold cross-validation is minimized.

[0124] The formula for calculating the retention of characteristic bands in the initial screening is as follows:

[0125]

[0126] α represents the proportion of characteristic bands retained, and M represents the total number of characteristic bands.

[0127] like Figure 9As shown, the distribution curves of the dual gradient importance score and the single gradient importance score are obtained when both the local weight and the regional weight range are 0.5.

[0128] like Figure 10 As shown, the mean square error varies with the initial screening retention ratio under the optimal local weight and regional weight settings.

[0129] like Figure 11 The figure shows the distribution curve of the initial screening feature set under the optimal retention feature band ratio α, local weight, and regional weight settings.

[0130] S33, for the characteristic bands obtained after the initial screening of the entire band, a continuous projection algorithm is used for further screening to obtain the final characteristic bands, including the following steps:

[0131] Based on the characteristic bands after initial screening, the characteristic bands with the highest correlation to drying intensity are selected to form an initial feature set, and the performance of the initial feature set is evaluated.

[0132] Calculate the projection vector for each remaining feature band, select the feature band with the largest projection vector to form a subset of feature bands, and evaluate the performance.

[0133] The optimal feature subset is determined by using a partial least squares regression model, which enables further fine screening of feature bands after the initial screening.

[0134] It is important to note that when using the partial least squares regression model, an early stopping mechanism is incorporated. The process stops when the mean squared error (MSE) shows no improvement after five iterations. The optimal feature subset is retained when the MSE value is minimized using 5-fold cross-validation. The MSE is lowest when 38 optimal feature bands are retained. This indicates that the 38 optimal feature bands selected through the dual-gradient-continuous projection algorithm not only lock in the key spectral range information identified in the initial screening stage of the dual-gradient common features, but also further eliminate redundant features through the continuous projection algorithm's fine screening stage, achieving precise optimization of the final feature bands. The optimal feature band distribution is as follows: Figure 12 As shown.

[0135] S4: Construct a discriminant model for leaf filament spectral data after feature band selection based on linear discriminant analysis classification algorithm;

[0136] S5: Based on the established leaf filament drying intensity discrimination model, identify the leaf filaments to be discriminated and output the leaf filament drying intensity discrimination results.

[0137] It is understandable that before using the constructed leaf filament drying intensity discrimination model, it is necessary to first obtain the spectral data of the leaf filament to be identified, and then process the spectral data using steps S2 and S3 to obtain the leaf filament spectral data after feature band selection, and then input it into the trained leaf filament drying intensity discrimination model for discrimination.

[0138] like Figure 13 As shown, this is the normalized confusion matrix of the validation set for the leaf drying intensity discrimination model established based on the dual gradient-continuous projection algorithm.

[0139] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0140] Example 2

[0141] Based on the same inventive concept, this application also provides a leaf drying state discrimination system based on the dual gradient-continuous projection algorithm.

[0142] The leaf filament drying intensity discrimination system based on the dual gradient-continuous projection algorithm includes:

[0143] The data acquisition module is used to collect leaf filament spectral data of different drying intensities based on the hyperspectral imaging system.

[0144] The data preprocessing module is used to preprocess leaf filament spectral data based on standard normal variable transformation;

[0145] The feature band selection module is used to select feature bands from the preprocessed leaf filament spectral data based on the dual gradient-continuous projection algorithm.

[0146] The dual-gradient-continuous projection algorithm includes:

[0147] For the preprocessed leaf filament spectral data, the local gradient change and regional gradient change are calculated respectively to obtain the local gradient characteristic value and the regional gradient characteristic value;

[0148] By fusing local and regional gradient feature values ​​of leaf filament spectral data, the leaf filament spectral data are initially screened across the entire spectrum based on this fused feature.

[0149] For the characteristic bands obtained after the initial screening of the entire band, a continuous projection algorithm is used for further screening to obtain the final characteristic bands;

[0150] The model building module is used to build a discriminant model based on the linear discriminant analysis classification algorithm for leaf filament spectral data after feature band selection;

[0151] The drying intensity discrimination module is used to identify the leaf filaments to be discriminated based on the established leaf filament drying intensity discrimination model, and output the leaf filament drying intensity discrimination result.

[0152] Example 3

[0153] This embodiment discloses a computer device, including a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is used to store computer programs. When the processor executes the program stored in the memory, it implements the steps of the method described in Embodiment 1.

[0154] Example 4

[0155] Based on the above embodiments, this embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0156] Example 5

[0157] Based on the above embodiments, this embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.

Claims

1. A method for discriminating the drying strength of cut tobacco based on a double gradient-continuation projection algorithm, characterized in that, Includes the following steps: Leaf filament spectral data at different drying intensities were acquired using a hyperspectral imaging system; Preprocessing of leaf filament spectral data based on standard normal variable transformation; Feature band selection is performed on the preprocessed leaf filament spectral data based on the dual gradient-continuous projection algorithm; The dual-gradient-continuous projection algorithm includes: For the preprocessed leaf filament spectral data, the local gradient change and regional gradient change are calculated respectively to obtain the local gradient characteristic value and the regional gradient characteristic value; By fusing local and regional gradient feature values ​​of leaf filament spectral data, the leaf filament spectral data are initially screened across the entire spectrum based on this fused feature. For the characteristic bands obtained after the initial screening of the entire band, a continuous projection algorithm is used for further screening to obtain the final characteristic bands; A discriminant model is constructed based on the linear discriminant analysis classification algorithm for the leaf filament spectral data after feature band selection; Based on the established leaf filament drying intensity discrimination model, the leaf filaments to be discriminated are identified, and the leaf filament drying intensity discrimination results are output.

2. The method according to claim 1, wherein, The preprocessed leaf filament spectral data are used to calculate local gradient changes and regional gradient changes, respectively, to obtain local gradient feature values ​​and regional gradient feature values, including: The local gradient changes in leaf filament spectral data are calculated using second-order difference methods to obtain local gradient eigenvalues; The size n of the regional gradient window is dynamically adjusted according to the spectral change rate, where n is an odd number. Gaussian weights are generated for each position within the window. The neighborhood spectra of each band are weighted and averaged using the Gaussian weights. Based on the smoothed spectral values, the regional gradient change is calculated by first-order difference to obtain the regional gradient characteristic value.

3. The method according to claim 1, wherein the method is characterized by, The local gradient feature value and regional gradient feature value of the fused leaf filament spectral data are used to perform a full-band initial screening of the leaf filament spectral data based on the fused feature, including: The mean absolute values ​​of the local gradient eigenvalues ​​and the regional gradient eigenvalues ​​are calculated separately and then normalized to obtain the local gradient importance score and the regional gradient importance score. The local gradient importance score and the regional gradient importance score are combined to obtain a dual gradient importance score, and the entire band is sorted according to the score. The optimal initial screening ratio was determined using a partial least squares regression model, and the entire spectrum of leaf filaments was used for initial screening.

4. The method for determining the drying state of leaf filaments based on the dual gradient-continuous projection algorithm according to claim 1, characterized in that, The characteristic bands obtained after the initial screening of the entire band are further refined using a continuous projection algorithm to obtain the final characteristic bands, including: Based on the characteristic bands after initial screening, the characteristic bands with the highest correlation to drying intensity are selected to form an initial feature set, and the performance of the initial feature set is evaluated. Calculate the projection vector for each remaining feature band, select the feature band with the largest projection vector to form a subset of feature bands, and evaluate the performance. The optimal feature subset is determined by using a partial least squares regression model, which enables further fine screening of feature bands after the initial screening.

5. The method for determining leaf drying intensity based on a dual gradient-continuous projection algorithm according to claim 1, characterized in that, The acquisition wavelength range of the hyperspectral imaging system is 1000.8nm - 2512.8nm; the drying intensity of the leaf filament spectral data is no less than 5, and the moisture content of the leaf filaments with different drying intensities remains consistent.

6. A leaf filament drying intensity discrimination system based on a dual gradient-continuous projection algorithm, characterized in that, include: The data acquisition module is used to collect leaf filament spectral data of different drying intensities based on the hyperspectral imaging system. The data preprocessing module is used to preprocess leaf filament spectral data based on standard normal variable transformation; The feature band selection module is used to select feature bands from the preprocessed leaf filament spectral data based on the dual gradient-continuous projection algorithm. The dual-gradient-continuous projection algorithm includes: For the preprocessed leaf filament spectral data, the local gradient change and regional gradient change are calculated respectively to obtain the local gradient characteristic value and the regional gradient characteristic value; By fusing local and regional gradient feature values ​​of leaf filament spectral data, the leaf filament spectral data are initially screened across the entire spectrum based on this fused feature. For the characteristic bands obtained after the initial screening of the entire band, a continuous projection algorithm is used for further screening to obtain the final characteristic bands; The model building module is used to build a discriminant model based on the linear discriminant analysis classification algorithm for leaf filament spectral data after feature band selection; The drying intensity discrimination module is used to identify the leaf filaments to be discriminated based on the established leaf filament drying intensity discrimination model, and output the leaf filament drying intensity discrimination result.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.