A method, system, computer equipment, and storage medium for identifying the origin of tobacco leaves.
By combining weighted estimation of the direction matrix and the RBF-SVM classification model with ACGAN data augmentation, the problem of low accuracy in tobacco origin identification was solved, achieving higher identification accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-26
Smart Images

Figure CN122084569A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of tobacco spectral analysis, specifically relating to a method, system, computer equipment, and storage medium for determining the origin of tobacco leaves. Background Technology
[0002] Tobacco leaves from different origins are influenced by unique local ecological factors such as soil, climate, and farming methods, resulting in distinctive "fingerprint" characteristics in their chemical composition, aroma compounds, and physical properties. This allows for the scientific practice of tracing and identifying the "birthplace" of tobacco leaves based on these characteristics, thus enabling the determination of tobacco origin. Since tobacco is a specialty cash crop, its production areas span multiple regions, and tobacco leaves from different origins exhibit significant differences in quality and price. Accurate origin identification is fundamental to ensuring consistent quality of raw materials procured for industrial use and achieving premium pricing. It is crucial for formulation design and quality control in industrial production and is also a key technological support for combating smuggling, identifying counterfeit products, and regulating market circulation.
[0003] To address the need for origin identification, existing technologies combine logistic regression, support vector machines, random forests, extreme gradient boosting, and neural networks to extract features and integrate them with pre-trained machine learning models to determine the origin of tobacco leaves. However, this approach of simplifying high-dimensional data through feature selection not only loses high-dimensional information but also ignores the complex nonlinear correlations inherent in the data. Consequently, the trained model suffers from low accuracy in origin identification when faced with near-infrared spectra containing interference such as overlapping spectral peaks, baseline drift, and intertwined light scattering noise. Summary of the Invention
[0004] To address the problem of low accuracy in identifying the origin of tobacco leaves in existing methods, this invention provides a method, system, computer equipment, and medium for identifying the origin of tobacco leaves.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for determining the origin of tobacco leaves includes: Obtain near-infrared spectral data of the tobacco leaves to be identified; Near-infrared spectral data is transformed into a metric space by weighted estimation of the direction matrix, resulting in a spatially transformed vector. The weighted estimation of the direction matrix is pre-decomposed by singular value decomposition of the gradient vector of the training data to obtain initial estimates and initial weight matrices for each dimension reduction direction. The initial estimates are then optimized to minimize the squared loss, resulting in optimized estimates, which are determined by the optimized estimates and the initial weight matrix. The vector after spatial transformation is mapped to a high-dimensional space. In the high-dimensional space, the maximum margin hyperplane is used as the boundary line. The origin of the tobacco leaf to be judged is determined by the side of the hyperplane boundary where the vector after spatial transformation falls, which corresponds to the candidate origin. The dimension of the high-dimensional space is higher than that of the original space where the vector after spatial transformation is located.
[0006] Optionally, the present invention provides a method for identifying the origin of tobacco leaves, which uses a pre-trained tobacco leaf origin identification model to determine the origin of the tobacco leaves to be identified from near-infrared spectral data; the tobacco leaf origin identification model includes a spatial transformation module and an RBF-SVM classification module connected in sequence; Near-infrared spectral data is transformed into metric space by using the weighted estimation direction matrix in the spatial transformation module, resulting in a spatially transformed vector. The weighted estimation direction matrix is pre-decomposed from the gradient vector singular value decomposition of the training data to obtain an initial estimate and an initial weight matrix. The initial estimate is then optimized by minimizing the squared loss to obtain an optimized estimate. The optimized estimate is then multiplied by the corresponding elements of the initial weight matrix to determine the final value. The origin of the tobacco leaves to be identified is determined by the spatially transformed vector using the RBF-SVM classification module.
[0007] Optionally, the method for determining the origin of tobacco leaves provided by the present invention further includes: Acquire training data from known tobacco-producing regions; Augmented data is constructed from training data using ACGAN; The augmented data and training data are input into the untrained tobacco origin identification model for loss calculation. The untrained tobacco origin identification model is then optimized based on the loss calculation results to obtain the pretrained tobacco origin identification model.
[0008] Optionally, the method for determining the origin of tobacco leaves provided by the present invention further includes: The discriminator of ACGAN identifies the authenticity of training data and augmented data respectively, resulting in the loss for judging the authenticity of training data and the loss for judging the authenticity of augmented data. The discriminator of ACGAN predicts the origin category of the training data and the augmented data respectively. The category judgment loss of the training data and the category judgment loss of the augmented data are calculated from the origin category prediction results of the training data and the augmented data and the corresponding real origin.
[0009] Optionally, the method for determining the origin of tobacco leaves provided by the present invention further includes: The augmented data and training data are input into the first multilayer perceptron neural network to predict the corresponding first response variable. The first multilayer perceptron neural network is adjusted with the optimization objective of minimizing the squared loss function of the predicted first response variable and the corresponding first true response variable, and the optimized first multilayer perceptron neural network is obtained. The gradient vectors of the augmented data and training data are calculated using the optimized first multilayer perceptron neural network; the gradient covariance matrix of multiple gradient vectors is calculated. The gradient covariance matrix is decomposed into singular values to obtain eigenvectors and their corresponding eigenvalues. The eigenvectors are used as the initial estimates for each dimension reduction direction, and the initial weight matrix is constructed from the eigenvalues.
[0010] Optionally, the method for determining the origin of tobacco leaves provided by the present invention further includes: Using the initial estimate of each dimension reduction direction as the initial value of the dimension reduction direction, the corresponding second response variable is predicted through the second multilayer perceptron neural network. The optimization objective is to minimize the squared loss function of the predicted second response variable and the corresponding second true response variable. The parameters of the second multilayer perceptron neural network and the dimension reduction direction are jointly optimized to obtain the optimized estimate of each dimension reduction direction. The weighted estimation direction matrix is obtained by multiplying the optimized estimated values of each dimension reduction direction with the corresponding elements of the initial weight matrix.
[0011] Optionally, the method for determining the origin of tobacco leaves provided by the present invention further includes: The spatially transformed vector is input into an SVM using radial basis functions as the kernel to determine the origin of the tobacco leaves to be identified.
[0012] The present invention also provides a tobacco leaf origin identification system, comprising: The data acquisition module is used to acquire the near-infrared spectral data of the tobacco leaves to be identified; The spatial transformation module is used to transform near-infrared spectral data into metric space through a weighted estimated direction matrix, resulting in a spatially transformed vector. The weighted estimated direction matrix is pre-decomposed by singular value decomposition of the gradient vector of the training data to obtain initial estimates and initial weight matrices for each dimension reduction direction. The initial estimates are then optimized to minimize the squared loss, resulting in an optimized estimate, which is determined by the optimized estimate and the initial weight matrix. The origin prediction module is used to map the spatially transformed vectors to a high-dimensional space. In the high-dimensional space, the origin of the tobacco leaf to be judged is determined by the side of the hyperplane interface where the spatially transformed vector falls and corresponds to the candidate origin. The dimension of the high-dimensional space is higher than that of the original space where the spatially transformed vector is located.
[0013] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps in a method for determining the origin of tobacco leaves.
[0014] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, can execute any step of a method for determining the origin of tobacco leaves.
[0015] The method for determining the origin of tobacco leaves provided by this invention has the following beneficial effects: The tobacco origin determination method provided by this invention uses singular value decomposition (SVD) of the gradient vector of the training data to obtain initial estimates and initial weight matrices for each dimensionality reduction direction. Subsequently, through an optimization process aimed at minimizing the squared loss, more accurate estimates are obtained, and these estimates are finally combined with the initial weights to determine the weighted estimation direction matrix. This matrix is then used to transform the spectral data of the tobacco leaves to be determined into a new metric space, and the origin is determined using an SVM classification model. Specifically, because this invention determines the weighted estimation direction matrix through singular value decomposition and optimization, it integrates the gradient information and statistical characteristics of the data. When faced with near-infrared spectral data requiring prediction, spatial transformation using this weighted estimation direction matrix makes the high-dimensional distances of samples of the same category closer, facilitating subsequent classification decisions to determine the origin and ensuring the accuracy of tobacco origin determination. Attached Figure Description
[0016] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of a method for determining the origin of tobacco leaves provided in an embodiment of the present invention; Figure 2 This is an example of a tobacco leaf origin identification process provided in an embodiment of the present invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0019] Traditional tobacco identification methods include sensory evaluation based on experts in the relevant fields and chemical analysis methods using chromatography combined with mass spectrometry. However, the former has inherent drawbacks such as high requirements for the experience of the evaluation experts, large individual threshold differences, difficulty in regional coordination, and inability to conduct retrospective verification. The latter has complex operation procedures and high technological difficulty, making it difficult to deploy on a large scale in on-site stages such as ports, warehouses, and production lines. Machine learning models are affected by the size of the tobacco sample, resulting in problems such as small sample origin span and severe imbalance in category distribution. This makes the empirical risk minimization process approximate "majority class risk minimization," affecting the accuracy of identification. Furthermore, for near-infrared spectra of one-dimensional continuous absorbance sequences, high-dimensional data simplification is carried out through dimensionality reduction, point selection, and feature extraction, leading to the loss of information in the data and limiting the potential of the original data. The trained model cannot fully realize its discriminative performance, and its accuracy and robustness are often significantly suppressed.
[0020] To address the aforementioned shortcomings, the tobacco origin discrimination method provided by this invention introduces an auxiliary classifier generative adversarial network (ACGAN) into the tobacco spectral domain. This adds an auxiliary classification branch to the generator-discriminator binary game of the standard GAN. During training, the generator receives a concatenated vector of random noise and the target class label as input, generating synthetic samples corresponding to the target class. The discriminator then determines the authenticity of the input sample and the probability of its origin class based on the input sample and the class label. These generated simulated samples are ultimately incorporated into the original dataset, participating in subsequent classification model training and construction along with the original samples. This expands the number of minority class samples and avoids problems such as small sample origin spans and severe class imbalance.
[0021] Furthermore, considering that near-infrared spectroscopy is essentially sequential data, feature selection may sacrifice the nonlinear correlation between different dimensions, thus affecting the predictive performance of the classification model. Therefore, this invention utilizes a weighted deep learning dimensionality reduction method to transform the sample space of the original data. Subsequently, based on the RBF-SVM model, a tobacco origin identification model is constructed using the transformed data, thereby improving the model's classification and prediction performance.
[0022] Example 1 This invention provides a method for determining the origin of tobacco leaves, specifically as follows: Figure 1 As shown, it includes the following steps: Step 11: Obtain training data from known tobacco-producing areas; construct augmented data from the training data using ACGAN; Step 12: Input the augmented data and training data into the untrained tobacco origin identification model for loss calculation. Optimize the untrained tobacco origin identification model based on the loss calculation results to obtain a pre-trained tobacco origin identification model. The pre-trained tobacco origin identification model determines the origin of the tobacco leaves to be identified using near-infrared spectral data. The tobacco origin identification model includes a spatial transformation module, a kernel function calculation module, and a classification decision module connected in sequence. The near-infrared spectral data is transformed into a metric space using the weighted estimation direction matrix in the spatial transformation module, resulting in a spatially transformed vector. The weighted estimation direction matrix is pre-calculated using the singular value decomposition of the gradient vector of the training data to obtain an initial estimate and an initial weight matrix. The initial estimate is then optimized by minimizing the squared loss to obtain an optimized estimate. The optimized estimate is then multiplied by the corresponding elements of the initial weight matrix to determine the final value.
[0023] The loss calculation includes: Step 121: The discriminator of ACGAN identifies the authenticity of the training data and the augmented data respectively, and obtains the authenticity judgment loss of the training data and the authenticity judgment loss of the augmented data.
[0024] Step 122: The discriminator of ACGAN predicts the origin category prediction results corresponding to the training data and the augmented data respectively. The category judgment loss of the training data and the category judgment loss of the augmented data are calculated based on the origin category prediction results corresponding to the training data and the augmented data and the corresponding real origin.
[0025] Specifically, the tobacco origin identification model provided by this invention includes a data augmentation module for imbalanced sample categories and a distance model classification prediction module based on weighted deep learning and fully optimized dimensionality reduction. The data augmentation module uses the ACGAN model, whose generator follows the same principle as GANs, while the discriminator adds a classification loss function to determine the origin category of the generated data. Both the generator and discriminator of the ACGAN model are fully connected neural networks. By setting different numbers of layers and neurons, the model's capacity can be freely scaled, thereby adjusting the model's parameters and fitting ability. The total loss of the discriminator is shown in formula (1):
[0026] (1) in, The loss is for judging the authenticity of real samples, i.e., the training data. To generate samples for the generator, i.e., to enhance the loss for judging the authenticity of data. and These are the category determination losses for real samples and generator-generated samples, respectively. The above loss function can be calculated using cross-entropy loss, or it can be replaced with other classification loss functions; this invention does not impose any limitations.
[0027] Step 13: Obtain the near-infrared spectral data of the tobacco leaves to be identified.
[0028] Step 14: Transform the near-infrared spectral data into the metric space by using the weighted estimation direction matrix to obtain the spatially transformed vector; wherein, the weighted estimation direction matrix is obtained in advance by the singular value decomposition of the gradient vector of the training data to obtain the initial estimate and initial weight matrix of each dimension reduction direction, and the initial estimate is optimized to obtain the optimized estimate by minimizing the squared loss, and is determined by the optimized estimate and the initial weight matrix.
[0029] The weighted estimation direction matrix can be constructed through the following steps: Step 141: Input the augmented data and training data into the first multilayer perceptron neural network to predict the corresponding first response variable. Adjust the first multilayer perceptron neural network with the optimization objective of minimizing the squared loss function of the predicted first response variable and the corresponding first true response variable to obtain the optimized first multilayer perceptron neural network. Step 142: Calculate the gradient vectors of the augmented data and training data using the optimized first multilayer perceptron neural network; calculate the gradient covariance matrix of multiple gradient vectors; Step 143: Perform singular value decomposition on the gradient covariance matrix to obtain eigenvectors and corresponding eigenvalues; use the eigenvectors as initial estimates for each dimension reduction direction, and construct the initial weight matrix from the eigenvalues.
[0030] Step 144: Using the initial estimates of each dimensionality reduction direction as the initial values of the dimensionality reduction direction, predict the corresponding second response variable through the second multilayer perceptron neural network. With minimizing the squared loss function of the predicted second response variable and the corresponding second true response variable as the optimization objective, jointly optimize the parameters of the second multilayer perceptron neural network and the dimensionality reduction direction to obtain the optimized estimates of each dimensionality reduction direction.
[0031] Step 145: Multiply the optimized estimated values of each dimension reduction direction with the corresponding elements of the initial weight matrix to obtain the weighted estimated direction matrix.
[0032] Specifically, during the model training phase, this invention employs a weighted deep learning-sufficient dimensionality reduction method to spatially transform the augmented samples. For the sample X augmented by the ACGAN model, it is divided into a training set, a validation set, and a test set. Then, in the first stage of the weighted deep learning-sufficient dimensionality reduction, samples from the validation set are input into the MLP model, and the objective function is minimized. Learn the parameters of the MLP to obtain Optimal estimate to determine Estimate , where the objective function As shown in formula (2), the estimate As shown in formula (3):
[0033] (2) (3) in, The squared loss function, For the first stage of the MLP model estimator, the estimator result is The predicted value, This is the set of weights and biases for each neuron in the MLP model.
[0034] After that, Perform SVD decomposition on the eigenvalues and arrange the corresponding eigenvectors in descending order of eigenvalues, using these as initial estimates for the first stage of sufficient dimensionality reduction direction. The weight matrix composed of eigenvalues is denoted as The weight matrix is a diagonal matrix, with the elements on the diagonal representing the eigenvalues in descending order. The neural network parameters of the MLP model can be optimized using stochastic gradient descent, and this invention does not impose any restrictions.
[0035] After the first stage of training is completed, the initial estimate of the sufficient dimensionality reduction direction obtained in the first stage is... Further iterations are performed, and the objective function is shown in formula (4): (4) in, The squared loss function, For the second stage MLP model estimator, This is the set of weights and biases for each neuron in the second-stage MLP model. and The structures are the same, and the initial values before the iteration start are the initial estimates of the direction of sufficient dimensionality reduction. By minimizing the objective function , can obtain Optimal estimate The stochastic gradient descent method is used to train neural networks as shown in equation (5): (5) in, To obtain the optimal and sufficient dimensionality reduction direction estimation result, Compared with the initial weight matrix obtained in the first stage Multiplying these matrices yields a weighted estimated direction matrix. Combining this matrix with the ACGAN-enhanced sample X, we obtain the result after metric space transformation. .
[0036] Step 15: Map the spatially transformed vector to a high-dimensional space. In the high-dimensional space, the origin of the tobacco leaf to be identified is determined by the side of the hyperplane boundary where the spatially transformed vector falls, corresponding to the candidate origin. The dimension of the high-dimensional space is higher than the original space containing the spatially transformed vector. For example, a pre-trained tobacco origin identification model can be used to determine the origin of the tobacco leaf to be identified from near-infrared spectral data. The tobacco origin identification model includes a spatial transformation module and an RBF-SVM classification module connected in sequence. The near-infrared spectral data is transformed into a metric space using a weighted estimation direction matrix in the spatial transformation module, resulting in a spatially transformed vector. The weighted estimation direction matrix is pre-calculated using the singular value decomposition of the gradient vector of the training data to obtain an initial estimate and an initial weight matrix. The initial estimate is then optimized by minimizing the squared loss to obtain an optimized estimate, which is multiplied by the corresponding elements of the initial weight matrix. The RBF-SVM classification module then uses the spatially transformed vector to determine the origin of the tobacco leaf to be identified.
[0037] The RBF-SVM classification includes: Step 151: Input the spatially transformed vector into an SVM using radial basis functions as the kernel to determine the origin of the tobacco leaves to be identified.
[0038] Specifically, the distance model classification prediction module also includes the RBF-SVM classification prediction model. SVM is a linear classifier with the largest margin defined in a high-dimensional space. By incorporating kernel tricks, it can evolve into a nonlinear classifier. Considering the complexity of near-infrared spectroscopy, this invention chooses to utilize a nonlinear SVM algorithm with kernel functions to process the data after metric space transformation. The final origin prediction result is obtained. The learning strategy of the SNM algorithm is margin maximization, which can be formalized as a problem of solving a convex quadratic programming problem as shown in formula (6):
[0039] (6) Among them, the training set , The first feature vector in the training set, Let hyperplane be the class label for the i-th sample point. , is a slack variable used to characterize the degree to which each sample does not meet the constraints, and C is a penalty parameter used to adjust the model's fault tolerance. By selecting an appropriate kernel function and penalty parameter C, a Lagrangian function is constructed, the optimization problem is dualized, and the classification decision function shown in formula (7) is obtained by using the KKT conditions:
[0040] (7) in, To obtain the Lagrange operator, For the selected kernel function, To obtain the hyperplane parameters. Penalty strength. and kernel function parameters The error tolerance of the model to the training data and the influence range of the kernel function on the data points can be controlled separately. They can be adjusted to achieve the best classification prediction performance. The kernel function can be the RBF radial basis function.
[0041] Example 2 The present invention also provides a tobacco leaf origin identification system, comprising: The data acquisition module is used to acquire the near-infrared spectral data of the tobacco leaves to be identified; The spatial transformation module is used to transform near-infrared spectral data into metric space through a weighted estimated direction matrix, resulting in a spatially transformed vector. The weighted estimated direction matrix is pre-decomposed by singular value decomposition of the gradient vector of the training data to obtain initial estimates and initial weight matrices for each dimension reduction direction. The initial estimates are then optimized to minimize the squared loss, resulting in an optimized estimate, which is determined by the optimized estimate and the initial weight matrix. The origin prediction module is used to map the spatially transformed vectors to a high-dimensional space. In the high-dimensional space, the origin of the tobacco leaf to be judged is determined by the side of the hyperplane interface where the spatially transformed vector falls and corresponds to the candidate origin. The dimension of the high-dimensional space is higher than that of the original space where the spatially transformed vector is located.
[0042] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps in an embodiment of a method for determining the origin of tobacco leaves. Specific implementation methods can be found in the method embodiments, and will not be repeated here.
[0043] Furthermore, the present invention also provides a non-transitory computer-readable storage medium containing instructions, on which a computer program is stored. For example, a memory containing instructions that can be executed by a processor of a computer device to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the computer program is executed by the processor, it can implement the steps in an embodiment of a method for determining the origin of tobacco leaves. Specific implementation methods can be found in the method embodiments, which will not be repeated here.
[0044] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0045] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0046] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0047] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0048] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention patent. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A method for determining the origin of tobacco leaves, characterized in that, include: Obtain near-infrared spectral data of the tobacco leaves to be identified; The near-infrared spectral data is transformed into a metric space by using a weighted estimation direction matrix to obtain a spatially transformed vector. The weighted estimation direction matrix is obtained in advance by using the singular value decomposition of the gradient vector of the training data to obtain initial estimates and initial weight matrices for each dimension reduction direction. The initial estimates are then optimized to minimize the squared loss, and the optimized estimates are determined by the optimized estimates and the initial weight matrix. The transformed vector is mapped to a high-dimensional space. In the high-dimensional space, the origin of the tobacco leaf to be judged is determined by the side of the hyperplane interface where the transformed vector falls, which corresponds to the candidate origin. The dimension of the high-dimensional space is higher than that of the original space where the transformed vector is located.
2. The method for determining the origin of tobacco leaves according to claim 1, characterized in that, The origin of the tobacco leaves to be identified is determined by the near-infrared spectral data using a pre-trained tobacco origin identification model; the tobacco origin identification model includes a spatial transformation module and an RBF-SVM classification module connected in sequence. The near-infrared spectral data is transformed into the metric space using the weighted estimation direction matrix in the spatial transformation module, resulting in a spatially transformed vector. The weighted estimation direction matrix is pre-decomposed from the gradient vector singular value decomposition of the training data to obtain an initial estimate and an initial weight matrix. The initial estimate is then optimized to minimize the squared loss, and the optimized estimate is determined by multiplying the corresponding elements of the initial weight matrix. The origin of the tobacco leaf to be identified is determined by the spatially transformed vector through the RBF-SVM classification module.
3. The method for determining the origin of tobacco leaves according to claim 2, characterized in that, Before determining the origin of the tobacco leaf to be identified using the near-infrared spectral data through a pre-trained tobacco origin identification model, the process also includes: Obtain the training data with known tobacco leaf producing areas; Augmented data is constructed from the training data using ACGAN; The enhanced data and training data are input into the untrained tobacco origin identification model for loss calculation. The untrained tobacco origin identification model is then optimized based on the loss calculation results to obtain the pre-trained tobacco origin identification model.
4. The method for determining the origin of tobacco leaves according to claim 3, characterized in that, The process of inputting the augmented data and training data into the untrained tobacco origin identification model for loss calculation includes: The discriminator of the ACGAN identifies the authenticity of the training data and the augmented data respectively, and obtains the authenticity judgment loss of the training data and the authenticity judgment loss of the augmented data. The discriminator of the ACGAN predicts the origin category of the training data and the augmented data respectively. The category judgment loss of the training data and the category judgment loss of the augmented data are calculated based on the origin category prediction results of the training data and the augmented data and the corresponding real origin.
5. The method for determining the origin of tobacco leaves according to claim 3, characterized in that, Before converting the near-infrared spectral data to the metric space using the weighted estimated direction matrix in the spatial transformation module, the following steps are also included: The enhanced data and training data are input into the first multilayer perceptron neural network to predict the corresponding first response variable. The first multilayer perceptron neural network is adjusted with the optimization objective of minimizing the squared loss function of the predicted first response variable and the corresponding first true response variable to obtain the optimized first multilayer perceptron neural network. The gradient vectors of the augmented data and training data are calculated using the optimized first multilayer perceptron neural network; the gradient covariance matrix of multiple gradient vectors is calculated. The gradient covariance matrix is subjected to singular value decomposition to obtain eigenvectors and corresponding eigenvalues; the eigenvectors are used as the initial estimates of each dimensionality reduction direction, and the initial weight matrix is constructed from the eigenvalues.
6. The method for determining the origin of tobacco leaves according to claim 5, characterized in that, Using the eigenvectors as initial estimates for each dimensionality reduction direction, and after constructing the initial weight matrix from the eigenvalues, the method further includes: Using the initial estimate of each dimensionality reduction direction as the initial value of the dimensionality reduction direction, the corresponding second response variable is predicted through the second multilayer perceptron neural network. The parameters of the second multilayer perceptron neural network and the dimensionality reduction direction are jointly optimized with the goal of minimizing the squared loss function of the predicted second response variable and the corresponding second real response variable, so as to obtain the optimized estimate of each dimensionality reduction direction. The weighted estimation direction matrix is obtained by multiplying the optimized estimated values of each dimensionality reduction direction with the corresponding elements of the initial weight matrix.
7. The method for determining the origin of tobacco leaves according to claim 2, characterized in that, The RBF-SVM classification module determines the origin of the tobacco leaf to be identified by transforming the spatial vector, including: The spatially transformed vector is input into an SVM using radial basis functions as the kernel to determine the origin of the tobacco leaves to be identified.
8. A tobacco leaf origin identification system, characterized in that, include: The data acquisition module is used to acquire the near-infrared spectral data of the tobacco leaves to be identified; The spatial transformation module is used to transform the near-infrared spectral data into the metric space through a weighted estimated direction matrix to obtain a spatially transformed vector. The weighted estimated direction matrix is pre-decomposed by singular value decomposition of the gradient vector of the training data to obtain initial estimates and initial weight matrices for each dimension reduction direction. The initial estimates are then optimized to minimize the squared loss to obtain optimized estimates, which are determined by the optimized estimates and the initial weight matrix. The origin prediction module is used to map the spatially transformed vector into a high-dimensional space. In the high-dimensional space, the origin of the tobacco leaf to be judged is determined by the side of the hyperplane interface where the spatially transformed vector falls, which corresponds to the candidate origin. The dimension of the high-dimensional space is higher than that of the original space where the spatially transformed vector is located.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the tobacco leaf origin identification method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is loaded by the processor, it is able to execute the steps of the tobacco leaf origin identification method according to any one of claims 1 to 7.