Tobacco feature similarity analysis method and device based on multivariate gaussian distribution modeling
By using a multivariate Gaussian distribution modeling method, a tobacco leaf similarity analysis dataset was constructed and standardized. Multivariate Gaussian distribution models were then built in groups to calculate the distribution distance between production areas. This solved the bias problem in existing tobacco leaf similarity analysis technologies and enabled a refined assessment and similarity analysis of tobacco production area characteristics.
Patent Information
- Application Number
- CN202611392429.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-27
AI Technical Summary
Existing tobacco leaf similarity analysis methods cannot fully reflect the comprehensive characteristics of tobacco leaf quality, resulting in a discrepancy between the similarity judgment results and the actual industrial use value. Furthermore, traditional methods suffer from overfitting and the curse of dimensionality when processing high-dimensional data, and cannot accurately characterize the differences in multivariate probability distributions.
Multivariate Gaussian distribution modeling was adopted. By constructing a tobacco leaf similarity analysis dataset, standardizing it, and grouping it according to aroma type, part, and origin, a multivariate Gaussian distribution model was constructed to calculate the distribution distance between origins. Dimensionality reduction and cluster analysis were then performed to obtain the similarity analysis results.
It enables a refined and quantitative similarity assessment of the comprehensive characteristics of tobacco producing areas, breaking through the limitations of traditional methods. It can accurately depict the multi-dimensional differences in characteristics between producing areas and provide data support for tobacco raw material substitution and formulation design.
Smart Images

Figure CN123178996A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of tobacco quality analysis, specifically relating to a method and apparatus for analyzing the similarity of tobacco leaf features based on multivariate Gaussian distribution modeling. Background Technology
[0002] As the core raw material of the tobacco industry, tobacco leaves exhibit significant regional differences in quality characteristics due to multiple factors, including the ecological environment of the producing area, cultivation practices, and varietal characteristics. Accurately quantifying the similarities between tobacco leaves from different producing areas has important industrial application value for targeted procurement of tobacco raw materials, construction of formulation modules, and screening of alternative raw materials.
[0003] Currently, tobacco leaf similarity analysis mainly employs the following methods: First, simple comparisons based on single chemical component indicators, such as judging solely by differences in the content of conventional chemical components like nicotine, total sugar, and chlorine; second, methods based on multivariate statistical analysis, such as principal component analysis, cluster analysis, and discriminant analysis, which measure the similarity between samples by calculating Euclidean distance, Mahalanobis distance, etc.; and third, subjective evaluation methods based on sensory evaluation, relying on the experience and judgment of evaluation experts.
[0004] However, existing technologies have the following significant drawbacks: First, comparisons using a single indicator cannot comprehensively reflect the overall characteristics of tobacco leaf quality, easily leading to overgeneralization and discrepancies between similarity judgments and actual industrial applications. Second, traditional distance metrics (such as Euclidean distance and Mahalanobis distance) are essentially point-to-point distance metrics, treating tobacco leaves from each production area as a point in a high-dimensional space, ignoring the probability distribution characteristics of tobacco leaf quality features within the same production area, and failing to characterize the true differences between two multivariate probability distributions. Third, when the sample size of production areas is small, covariance matrix estimation suffers from severe overfitting, resulting in unstable distance calculation results and poor reliability of the similarity matrix. Fourth, traditional methods are insufficient for processing high-dimensional data, easily leading to the curse of dimensionality when fusing multi-source heterogeneous features (categorical attributes and continuous indicators), and exhibiting weak model generalization ability. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a method and apparatus for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling, so as to solve the above problems.
[0006] To solve the above-mentioned technical problems, this application adopts the following technical solution: Firstly, this application provides a method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling. The method for comprehensive tobacco leaf feature similarity analysis includes: Step S1: Constructing a tobacco leaf similarity analysis dataset and standardizing the physicochemical indicators of tobacco leaves in the tobacco leaf similarity analysis dataset to obtain a standardized dataset; Step S2: Grouping the standardized dataset according to aroma type, part, and origin, and constructing a multivariate Gaussian distribution model for the physicochemical indicators of tobacco leaves for each group of origin samples; Step S3: Calculating the distribution distance between origins based on the multivariate Gaussian distribution model to form a tobacco leaf origin distance matrix; Step S4: Performing dimensionality reduction and cluster analysis on the tobacco leaf origin distance matrix to obtain the similarity analysis results of tobacco leaves with the same aroma type and part between different origins.
[0007] Further, step S1 includes: Step S11: Grouping the original tobacco leaf samples by aroma type, part, and origin, and selecting origin samples with more samples in each group than the number of tobacco leaf physicochemical indicators as standard tobacco samples; Step S12: Performing Z-score global standardization on the tobacco leaf physicochemical indicators to obtain dimensionless standardized tobacco leaf physicochemical indicators; Step S13: Using the standard tobacco samples and standardized tobacco leaf physicochemical indicators as a standardized dataset.
[0008] Furthermore, the construction steps of the multivariate Gaussian distribution model include: Step M1: For each group of origin samples, using the physicochemical indicators of tobacco leaves as random variables, fit a multivariate Gaussian distribution and calculate the mean vector and covariance matrix of the origin samples; Step M2: Determine whether the origin samples are less than the preset sample size threshold; if so, correct the covariance matrix corresponding to the origin samples according to the covariance shrinkage algorithm; Step M3: Construct a multivariate Gaussian distribution model based on the mean vector and covariance matrix.
[0009] Furthermore, the covariance shrinkage algorithm is the Ledoit-Wolf shrinkage algorithm.
[0010] Furthermore, the tobacco origin distance matrix includes at least one of the following: Wasserstein distance matrix, KL distance matrix, and JS distance matrix. Step S3 includes: Step S31: Calculate the distribution distance between the multivariate Gaussian distribution models corresponding to each origin using the second-order Wasserstein distance algorithm to obtain the Wasserstein distance matrix; Step S32: Calculate the relative information difference between the multivariate Gaussian distribution models corresponding to each origin using the KL divergence algorithm to obtain the KL distance matrix; Step S33: Calculate the symmetric information difference between the multivariate Gaussian distribution models corresponding to each origin using the JS divergence algorithm to obtain the JS distance matrix.
[0011] Furthermore, step S3 also includes: step S34: performing cross-consistency verification on each group of origin samples based on the Wasserstein distance matrix and the JS divergence algorithm.
[0012] Furthermore, step S4 includes: step S41: according to the dimensionality reduction algorithm, the distance matrix of tobacco origin is reduced to a low-dimensional space to obtain the dimensionality reduction result; step S42: according to the origin, the dimensionality reduction result is clustered to obtain the similarity analysis result and the similarity analysis result is visualized.
[0013] Furthermore, the aroma types include strong aroma, medium aroma, and light aroma; the parts include upper leaves, middle leaves, and lower leaves; and the physicochemical indicators of tobacco leaves include sugar-alkali ratio, total sugar, total potassium, two sugar ratio, total appearance score, total sensory score, length, length-to-width ratio, single leaf weight, and leaf stem content.
[0014] Secondly, this application provides a tobacco leaf feature similarity analysis device based on multivariate Gaussian distribution modeling. The tobacco leaf comprehensive feature similarity analysis device includes: a data processing module, a grouping modeling module, a similarity calculation module, and an analysis output module. The data processing module is used to construct a tobacco leaf similarity analysis dataset and standardize the physicochemical indicators of tobacco leaves in the tobacco leaf similarity analysis dataset to obtain a standardized dataset. The grouping modeling module is used to group the standardized dataset according to aroma type, part, and origin, and construct a multivariate Gaussian distribution model for the physicochemical indicators of tobacco leaves for each group of origin samples. The similarity calculation module is used to calculate the distribution distance between origins based on the multivariate Gaussian distribution model to form a tobacco leaf origin distance matrix. The analysis output module is used to perform dimensionality reduction and cluster analysis on the tobacco leaf origin distance matrix to obtain the similarity analysis results of tobacco leaves with the same aroma type and part between different origins.
[0015] Thirdly, this application provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the above-described method for analyzing tobacco leaf feature similarity based on multivariate Gaussian distribution modeling.
[0016] As can be seen from the above technical solutions, the advantages and positive effects of the tobacco leaf feature similarity analysis method and device based on multivariate Gaussian distribution modeling proposed in this application are as follows: This application abstracts multiple physicochemical indicators of tobacco leaves from different producing areas within the same aroma profile and part of the plant into a multivariate Gaussian distribution in a high-dimensional space. By measuring the distance between these distributions, it quantifies the similarity of comprehensive characteristics of producing areas, overcoming the limitations of traditional methods that rely solely on sample means or single indicator comparisons. This method can simultaneously capture differences between producing areas at both the mean level and fluctuation structure levels, enabling a refined and quantitative similarity assessment of the comprehensive characteristics of tobacco producing areas. This provides data support for tobacco raw material substitution, producing area classification, and formulation design. Attached Figure Description
[0017] The above description of this application and the following detailed embodiments will be better understood when read in conjunction with the accompanying drawings. It should be noted that the drawings are merely examples of the claimed technical solutions.
[0018] Figure 1 This is a flowchart of a tobacco leaf feature similarity analysis method based on multivariate Gaussian distribution modeling; Figure 2 It is a JavaScript distance matrix clustering and dimensionality reduction dendrite; Figure 3 It is a JavaScript distance matrix clustering and dimensionality reduction space structure diagram; Figure 4 It is a KNN network graph with JS distance matrix (K=3); Figure 5 It is a Wasserstein distance matrix clustering and a dimension-reduced dendrite; Figure 6 This is a Wasserstein distance matrix clustering and dimensionality reduction spatial structure diagram; Figure 7 This is a Wasserstein distance matrix KNN network diagram (K=3). Detailed Implementation
[0019] The detailed features and advantages of this application are described below in the specific embodiments. The content of this description is sufficient to enable any person skilled in the art to understand the technical content of this application and implement it accordingly. Based on the specification, claims and drawings disclosed in this specification, a person skilled in the art can easily understand the related objectives and advantages of this application.
[0020] The invention will now be described with reference to the accompanying drawings, in which similar reference numerals denote similar elements. While specific structures and arrangements are discussed, it should be understood that this is done merely for illustrative purposes. Those skilled in the art will recognize that other structures and arrangements can be used without departing from the spirit and scope of the invention. It will be apparent to those skilled in the art that the invention can also be used in a variety of other applications.
[0021] In this specification and claims, several terms will be used, and unless otherwise indicated, these terms will be defined to have the following meanings: The singular forms “a” and “the” include their corresponding plural forms. “At least one” means one or more, and “more” means two or more. “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be expressed as: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0022] All figures used to represent component amounts, properties (e.g., molecular weight), reaction conditions, etc., should be considered to be modified in all cases by the terms "within the unavoidable margin of error" or "about". Therefore, the numerical values set forth herein are approximate and may vary depending on the desired properties sought to be obtained by the present invention. The principle of equivalents, which is applied to a minimum and not intended to limit the scope of the claims, should be applied, for example, each value should be interpreted at least according to the specified significant digits and by applying conventional rounding techniques.
[0023] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0024] In the description of this embodiment, it should be noted that the terms "upper", "lower", "inner", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product is usually placed during use. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0025] Unless otherwise indicated, the following abbreviations have the following meanings, and any other abbreviations used herein but not defined have their generally accepted standard meanings: All other terms used herein that are specifically defined herein shall have the general meaning understood by one of ordinary skill in the art, in particular meaning that, upon reading the claims, specification and drawings of this patent, one can directly and without doubt determine how the technical solution of this patent can be implemented.
[0026] Even if there are incomplete descriptions, omissions, or ambiguities in the grammar, words, punctuation, graphics, symbols, etc. of the claims, specification, and drawings of this patent, a person skilled in the art can still arrive at the only correct understanding by reading the claims, specification, and drawings as a whole without extensive reasoning or experimentation, and effectively exclude various incorrect interpretations that are not aimed at achieving the purpose of this patent.
[0027] Those skilled in the art would first choose to read the claims, specification, and drawings of this patent to reasonably interpret the terms; secondly, they would choose to refer to the relevant definitions in other documents published by the applicant before the filing date to reasonably interpret the terms; thirdly, they would choose the references cited in this patent to reasonably interpret the terms; and finally, they would choose to combine the technical dictionaries, technical manuals, reference books, textbooks, national or industry technical standards, etc., commonly used by those skilled in the art to reasonably interpret the terms.
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0029] Please refer to Figure 1 This application provides a method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling. The specific steps of this comprehensive tobacco leaf feature similarity analysis method are as follows: Step S1: Construct a tobacco leaf similarity analysis dataset and standardize the physicochemical indicators of tobacco leaves in the tobacco leaf similarity analysis dataset to obtain a standardized dataset.
[0030] Step S1 includes: Step S11: Group the original tobacco leaf samples according to aroma type, part, and origin, and select the origin samples with more samples in each group than the number of physicochemical indicators of tobacco leaves as standard tobacco samples.
[0031] Aroma types include strong aroma, medium aroma, and light aroma; leaf parts include upper leaves, middle leaves, and lower leaves; and physicochemical indicators of tobacco leaves include sugar-alkali ratio, total sugar, total potassium, two sugar ratio, total appearance score, total sensory score, length, length-to-width ratio, single leaf weight, and leaf stem content.
[0032] By grouping samples by aroma type, part of the plant, and place of origin, samples from each place of origin with a sample size greater than the number of core physicochemical indicators are retained. This ensures that the subsequent estimation of the covariance matrix of the multivariate Gaussian distribution is statistically significant, avoids distribution fitting distortion due to insufficient sample size, and improves the reliability of the modeling.
[0033] Step S12: Perform Z-score global standardization on the physicochemical indicators of tobacco leaves to obtain dimensionless standardized physicochemical indicators of tobacco leaves.
[0034] The formula for Z-score is as follows: (1) Among them, Z ij X represents the standardized value of the j-th dimension feature of the i-th sample. ij This represents the j-th dimension feature of the original i-th sample. j Let σ represent the mean of the j-th feature of all samples. j Let represent the standard deviation of the j-th dimension feature of all samples.
[0035] It is understandable that global standardization of physicochemical indicators such as sugar-alkali ratio, total sugar, total potassium, disaccharide ratio, total appearance score, total sensory score, length, aspect ratio, single leaf weight, and leaf stem content using Z-score effectively eliminates the differences in dimensions and numerical ranges between different indicators (for example, sugar-alkali ratio is a dimensionless ratio, single leaf weight is in grams, and length is in millimeters). This ensures that the contribution scale of each physicochemical characteristic in distance calculation is consistent, avoiding the dominance of indicators with large numerical ranges in similarity judgment results.
[0036] Step S13: Use standard tobacco samples and standardized tobacco leaf physicochemical indicators as a standardized dataset.
[0037] By performing global standardization before calculating distances, standard tobacco samples and standardized physicochemical indicators of tobacco leaves are obtained, which facilitates the subsequent calculation of mean vector and covariance matrix based on standardized data to construct a Gaussian distribution model.
[0038] Step S2: Group the standardized dataset according to aroma type, part of the plant and origin, and construct a multivariate Gaussian distribution model for the physicochemical indicators of tobacco leaves for each group of origin samples.
[0039] Specifically, the steps for constructing a multivariate Gaussian distribution model include: Step M1: For each group of origin samples, with the physicochemical indicators of tobacco leaves as random variables, fit a multivariate Gaussian distribution and calculate the mean vector and covariance matrix of the origin samples.
[0040] The samples were grouped by three major aroma types (strong aroma, medium aroma, and light aroma), parts of the plant (upper, middle, and lower parts), and place of origin. For each group of place of origin samples, the mean vector μ and covariance ∑ were calculated for each place of origin. The mean vector μ and covariance matrix ∑ represent the comprehensive characteristic distribution of a place of origin, rather than using a single sample or sample mean to represent the place of origin and constructing a multivariate Gaussian distribution model. This fully preserves the fluctuation level of various indicators within the place of origin and the correlation structure between physicochemical indicators.
[0041] Step M2: Determine whether the number of origin samples is less than the preset sample size threshold. If so, correct the covariance matrix corresponding to the origin samples according to the covariance shrinkage algorithm.
[0042] It is understandable that, in order to cope with the situation where the number of samples from some production areas is insufficient, the covariance shrinkage algorithm is the Ledoit-Wolf shrinkage algorithm. By introducing the Ledoit-Wolf covariance shrinkage algorithm, when the sample size of the production area is less than a preset threshold, the empirical covariance matrix is shrunk to the diagonal target matrix to obtain a positive definite covariance estimate with good condition number.
[0043] The formula for the Ledoit-Wolf shrinkage algorithm is shown below: (2) Where, Σ LW Let represent the contracted covariance matrix obtained after Ledoit-Wolf contraction, S represent the empirical covariance matrix of the samples (ordinary sample covariance), λ∈[0,1] represent the contraction coefficient, d represent the feature dimension, I represent the d×d identity matrix, and tr(S) represent the trace of the empirical covariance matrix.
[0044] Meanwhile, the Ledoit-Wolf shrinkage algorithm effectively solves the engineering problem of singular and non-invertible covariance matrices in small sample production areas (especially niche production areas), ensuring the numerical stability of matrix inversion, determinant and matrix square root operations in subsequent KL divergence, JS divergence and Wasserstein distance calculations, and expanding the range of production areas applicable to the method.
[0045] Step M3: Construct a multivariate Gaussian distribution model based on the mean vector and covariance matrix.
[0046] The formula for the multivariate Gaussian distribution model is shown below: (3) Where μ is the mean vector and ∑ is the covariance.
[0047] Step S3: Based on the multivariate Gaussian distribution model, calculate the distribution distance between production areas to form a tobacco production area distance matrix.
[0048] The mean vectors μ1, μ2, ∑1, and ∑2 for different origins are the parameters used for the final calculation. Now, the P distribution (origin of P) and the Q distribution (origin of Q) follow a multidimensional Gaussian distribution, and the following similarity formula is given.
[0049] (4)
[0050] Specifically, the distance matrix of tobacco producing areas includes at least one of the following: Wasserstein distance matrix, KL distance matrix and JS distance matrix. These matrices can be used individually or in combination.
[0051] Step S3 may include: Step S31: Calculate the distribution distance between the multivariate Gaussian distribution models corresponding to each production area according to the second-order Wasserstein distance algorithm, and obtain the Wasserstein distance matrix.
[0052] As shown in Table 1, the second-order Wasserstein distance, also known as the bulldozer distance, is used to calculate the distribution distance between production areas. This distance reflects both the positional differences of the mean vector and the shape / scattering differences of the covariance matrix, and has good geometric interpretation. The larger the value, the greater the difference in the Gaussian distribution between the two production areas.
[0053] Table 1: Second-order Wasserstein distance matrix.
[0054]
[0055] The formula for the second-order Wasserstein distance algorithm is as follows: (5) Where P represents the P-origin, Q represents the Q-origin, W2²(P,Q) represents the square of the second-order Wasserstein distance, μ1 represents the mean vector of the P-origin, μ2 represents the mean vector of the Q-origin, ∑1 represents the covariance of the P-origin, and ∑2 represents the covariance of the Q-origin. The L2 squared norm represents the difference between the means. tr represents the square root of a matrix Σ1. ) represents the matrix trace.
[0056] (6)
[0057] Where, max( ,0) indicates to avoid errors caused by taking the square root of a very small negative number due to numerical error. W2(P,Q) represents the second-order Wasserstein distance, which is non-negative and symmetric.
[0058] Step S32: Calculate the relative information differences between the multivariate Gaussian distribution models corresponding to each production area according to the KL divergence algorithm, and obtain the KL distance matrix.
[0059] As shown in Table 2, KL divergence measures the information loss of one distribution P relative to another Q, and measures the relative difference between two origin distributions. It should be noted that KL is asymmetric and does not satisfy the triangle inequality. Therefore, bidirectional calculation is needed to fill in the upper and lower triangles of the distance matrix to compensate for the asymmetry of KL divergence and make the distance matrix complete and usable.
[0060] Table 2: KL distance matrix.
[0061]
[0062] Specifically, simultaneous calculation This is used to fill the upper and lower triangles of the matrix; the larger the value, the greater the difference in distribution between the samples from the two production areas.
[0063] The formula for the KL divergence algorithm is as follows: (7) in, Denotes the KL divergence of P with respect to Q (asymmetric). ), The matrix representing the inverse of the covariance matrix of distribution Q is... Represents the trace of a matrix, characterizing the difference in the covariance matrix. This represents the squared Mahalanobis distance, characterizing the difference between the mean vectors. Representing feature dimension, Let ln denote the matrix determinant, and ln denote the natural logarithm.
[0064] Step S33: Based on the JS divergence algorithm, calculate the symmetric information difference between the multivariate Gaussian distribution models corresponding to each production area to obtain the JS distance matrix.
[0065] As shown in Table 3, the JS divergence algorithm is a symmetric improvement of the KL divergence algorithm, used to solve the KL asymmetric problem. The JS divergence values are bounded and symmetric. A value of 0 represents that the Gaussian distributions of the two production areas are completely consistent, and the larger the value, the greater the difference, which facilitates horizontal comparisons between production areas and across measurement units.
[0066] Table 3: JS distance matrix.
[0067]
[0068] The formula for the JS divergence algorithm is as follows: (8) (9) (10) Where M represents an intermediate mixture Gaussian distribution, Represents the covariance of the mixed distribution. Represents the covariance of the mixed distribution. Represents the original JS divergence, in units of nat; symmetric distance. This represents the normalized JS divergence (program return value); dividing by ln2 maps the value range to [0,1].
[0069] Step S34: Perform cross-consistency verification on each set of origin samples based on the Wasserstein distance matrix and the JS divergence algorithm.
[0070] It is understandable that cross-consistency verification based on the Wasserstein distance matrix and the JS distance matrix utilizes the complementarity of the two measures in the two dimensions of geometric distance and information difference to reduce the risk of misjudgment caused by the limitations of the mathematical properties of a single measure, thereby improving the robustness and reliability of the determination of similarity between production areas.
[0071] Step S4: Perform dimensionality reduction and cluster analysis on the distance matrix of tobacco origin to obtain the similarity analysis results of tobacco leaves with the same aroma and part in different origins.
[0072] Step S4 includes: Step S41: Based on the dimensionality reduction algorithm, the distance matrix of tobacco producing areas is reduced to a lower dimensional space to obtain the dimensionality reduction result.
[0073] By reducing the dimensionality of the high-dimensional production area distance matrix to a low-dimensional space, the problem of the difficulty in intuitively perceiving the similarity relationship under multiple production areas and multiple indicators is solved, making the proximity relationship between production areas observable in two-dimensional or three-dimensional space.
[0074] Step S42: Based on the place of origin, cluster the dimensionality reduction results to obtain similarity analysis results and visualize the similarity analysis results.
[0075] By clustering and visualizing production areas based on dimensionality reduction results, it is possible to automatically identify production area groups with similar characteristics under the same aroma type and part of the plant, providing an intuitive basis for decision-making regarding the selection of production area substitutions for tobacco raw materials, the merging of formulation modules, and raw material procurement strategies.
[0076] Please refer to Figure 2 , Figure 3 and Figure 4 The tobacco production areas show significant differentiation, with the Linkou production area in Mudanjiang, Heilongjiang exhibiting extremely high heterogeneity. In the K-nearest neighbor network, the Linkou node in Mudanjiang, Heilongjiang has only a few long-distance weak connections, and is not closely related to the other samples. The hierarchical clustering tree and MDS ordination diagram also show that Linkou in Mudanjiang, Heilongjiang forms an independent branch, and its MDS1 axis deviates significantly from other production areas. This indicates that the distribution pattern of tobacco indicators in this production area is very different from that in Sichuan, Chongqing, and Hubei. The difference in probability distribution represented by JS divergence is significantly higher than the difference between other production areas.
[0077] The community structure of most Hubei tobacco samples is highly similar. Most Hubei samples cluster together in the MDS space, and a large number of Hubei samples are grouped into the same large cluster in hierarchical clustering. The dense connections between nodes in the K-nearest neighbor network indicate that the JS divergence between samples is small and the probability distribution characteristics are similar. This shows that the multi-index probability distribution patterns of tobacco leaves in different counties of Hubei are relatively similar and the community heterogeneity within the production area is low.
[0078] The samples from Jiange, Guangyuan, Sichuan and Wanzhou, Chongqing are located between Hubei and Heilongjiang, and are closer to the Hubei group. The samples from Jiange, Guangyuan, Sichuan and Wanzhou, Chongqing are embedded near the Hubei sample cluster in the MDS ordination space, and the hierarchical clustering also belongs to the Hubei-dominated category. There are a large number of nearest neighbor connections with the Hubei production area in the K-nearest neighbor network. This indicates that the probability distribution of indicators of tobacco leaves in Sichuan and Chongqing is more similar to that of Hubei production area, and is very different from that of Linkou, Mudanjiang, Heilongjiang.
[0079] Overall Pattern: There is a good correlation between geographical origin and the heterogeneity of sample distribution characterized by JS divergence. Geographically neighboring tobacco-producing areas such as Hubei, Chongqing, and Sichuan show relatively small JS divergences and similar sample structures. However, geographically distant areas like Mudanjiang and Linkou in Heilongjiang exhibit significantly different probability distribution patterns compared to the central and southwestern tobacco-producing regions. JS divergence distance can effectively characterize the differences in the distribution patterns of multi-dimensional indicators of tobacco leaves from different producing areas, enabling the grouping and differentiation of samples from different origins.
[0080] Please refer to Figure 5 , Figure 6 and Figure 7 The Linkou tobacco production area in Mudanjiang, Heilongjiang Province, still exhibits extremely strong sample distribution specificity. In the K-nearest neighbor network, the node of this production area has only a few long-distance red lines with high distance values, and almost no close-distance connections with other production area nodes. In the hierarchical clustering tree, it is divided into a separate branch. In the MDS ordination diagram, this sample is significantly far away from all samples in Sichuan, Chongqing, and Hubei along the MDS1 axis. This indicates that from the perspective of Wasserstein distance (the transport distance of the probability distribution), the probability distribution of multiple indicators of tobacco leaves from Linkou, Mudanjiang, Heilongjiang Province, differs greatly from that of tobacco production areas in central and southwestern China.
[0081] The samples from different production areas in Hubei Province show high similarity in their internal distribution, forming a main cluster. In the MDS ranking space, the vast majority of Hubei production area samples are closely clustered. In hierarchical clustering, the vast majority of Hubei county samples belong to the same large cluster. The K-nearest neighbor network shows dense connections between nodes, with the connection color leaning towards light blue, indicating small Wasserstein distance values and similar probability distribution patterns. Overall, the heterogeneity of the distribution among samples within Hubei production areas is low.
[0082] The samples from Jiange County, Guangyuan City, Sichuan Province, and Wanzhou City, Chongqing Province, are embedded in the Hubei cluster, showing a closer resemblance to the distribution characteristics of Hubei production areas. In MDS spatial location, these samples fall near the Hubei sample cluster, and the clustering results classify them into a predominantly Hubei category. The K-nearest neighbor network shows numerous nearest-neighbor connections with Hubei production areas. Wasserstein distance results indicate that the probability distribution of indicators for the Sichuan and Chongqing samples is highly similar to that of Hubei production areas, but significantly different from that of Heilongjiang production areas.
[0083] The results for JS divergence and Wasserstein distance matrix show a high degree of consistency, particularly in the following areas: The overall grouping pattern is completely consistent: under both distance measures, Mudanjiang and Linkou in Heilongjiang are highly outlier samples, independent of all other producing areas; most producing areas in Hubei form highly similar main clusters; samples from Jiange in Guangyuan, Sichuan, and Wanzhou in Chongqing are attached to the Hubei cluster. The correspondence between geographical proximity and sample distribution heterogeneity holds true under both distance measures. The geographically distant producing areas of Heilongjiang show the greatest difference in distribution between tobacco samples from central and southwestern China, while the geographically close samples from Hubei, Sichuan, and Chongqing show smaller differences in distribution.
[0084] The core hierarchical logic of clustering and ranking is the same: HCA clustering tree, MDS ranking, and K-nearest neighbor network are three visualization methods. Under the two distance matrices, they can distinguish that "Heilongjiang is independent, while Hubei, Sichuan and Chongqing are clustered into a large category", which proves that the differentiation pattern of production areas is robust and is not affected by the switching of the two probability distribution distance indicators.
[0085] Subtle differences: The different physical meanings of distance values lead to subtle differences. JS divergence focuses on measuring the difference in information entropy between two probability distributions; Wasserstein distance measures the "optimal transport cost" between distributions and is more sensitive to positional shifts in distributions. Observing color scales, the distance value ranges of Wasserstein and JS divergences differ, resulting in local differences in the color details of network connections. There are also slight variations in the strength of nearest neighbor connections between samples from individual origins and the subdivision order of subclusters within clusters.
[0086] Minor shifts in local subsample ranking: Within the MDS diagram, there are slight differences in the relative positions of a few Hubei county samples in the two-dimensional plane and the merging order of secondary subclusters within hierarchical clusters, but these do not change the overall category classification.
[0087] In summary, the Wasserstein distance and JS divergence distribution distances show a high degree of consistency in the macroscopic grouping results of tobacco producing areas, confirming that the differentiation pattern of the multi-index probability distribution of tobacco leaves from different producing areas is stable and reliable. The two methods only show minor differences in the subtle ranking of local samples and the sub-clustering, which stems from the difference in the mathematical definitions of the two distance algorithms themselves.
[0088] As is understandable, since KL does not satisfy the symmetric matrix, only the dimensionality reduction, clustering, and adjacency visualization results of the JS distance matrix and the second-order Wasserstein distance matrix are shown here.
[0089] Based on the same inventive concept, this application also provides a tobacco leaf feature similarity analysis device based on multivariate Gaussian distribution modeling. The tobacco leaf comprehensive feature similarity analysis device includes: a data processing module, a group modeling module, a similarity calculation module, and an analysis output module.
[0090] The data processing module is used to construct a tobacco leaf similarity analysis dataset and to standardize the physicochemical indicators of tobacco leaves in the tobacco leaf similarity analysis dataset to obtain a standardized dataset.
[0091] The grouping modeling module is used to group standardized datasets according to aroma type, part of the plant, and origin, and to construct a multivariate Gaussian distribution model for the physicochemical indicators of tobacco leaves for each group of origin samples.
[0092] The similarity calculation module is used to calculate the distribution distance between tobacco production areas based on a multivariate Gaussian distribution model, forming a distance matrix between tobacco production areas.
[0093] The analysis output module is used to perform dimensionality reduction and cluster analysis on the distance matrix of tobacco origins, and obtain the similarity analysis results of tobacco leaves with the same aroma and part in different origins.
[0094] The data processing module is also used to group the original tobacco leaf samples by aroma type, part, and origin, and select the origin samples with more samples in each group than the number of tobacco leaf physicochemical indicators as standard tobacco samples; to perform Z-score global standardization on the tobacco leaf physicochemical indicators to obtain dimensionless standardized tobacco leaf physicochemical indicators; and to use the standard tobacco samples and standardized tobacco leaf physicochemical indicators as a standardized dataset.
[0095] The group modeling module is also used to fit a multivariate Gaussian distribution for each group of origin samples, using the physicochemical indicators of tobacco leaves as random variables, and to calculate the mean vector and covariance matrix of the origin samples; determine whether the origin sample size is less than the preset sample size threshold; if so, correct the covariance matrix corresponding to the origin sample according to the covariance shrinkage algorithm; and construct a multivariate Gaussian distribution model based on the mean vector and covariance matrix.
[0096] The similarity calculation module is also used to calculate the distribution distance between the multivariate Gaussian distribution models corresponding to each production area according to the second-order Wasserstein distance algorithm, and obtain the Wasserstein distance matrix; to calculate the relative information difference between the multivariate Gaussian distribution models corresponding to each production area according to the KL divergence algorithm, and obtain the KL distance matrix; to calculate the symmetric information difference between the multivariate Gaussian distribution models corresponding to each production area according to the JS divergence algorithm, and obtain the JS distance matrix; and to perform cross-consistency verification on each group of production area samples according to the Wasserstein distance matrix, KL distance matrix and JS divergence algorithm.
[0097] The similarity calculation module is also used to reduce the dimension of the tobacco origin distance matrix to a low-dimensional space according to the dimension reduction algorithm to obtain the dimension reduction result; based on the origin, the dimension reduction result is clustered to obtain the similarity analysis result and the similarity analysis result is visualized.
[0098] It is understood that the tobacco leaf feature similarity analysis device based on multivariate Gaussian distribution modeling provided in this application corresponds to the tobacco leaf feature similarity analysis method based on multivariate Gaussian distribution modeling provided in this application. For the sake of brevity, the same or similar parts can be referred to the content of the tobacco leaf feature similarity analysis method based on multivariate Gaussian distribution modeling, and will not be repeated here.
[0099] The modules in the tobacco leaf feature similarity analysis device based on multivariate Gaussian distribution modeling described above can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the server in hardware form or independent of it, or stored in the server's memory in software form, so that the processor can call and execute the corresponding operations of each module. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, etc.
[0100] The aforementioned method and / or device for analyzing tobacco leaf feature similarity based on multivariate Gaussian distribution modeling can be implemented as a computer-readable instruction that can run on a computer system.
[0101] This application also provides a computer system including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling.
[0102] The computer system can be a server. The computer system includes a processor, non-volatile storage medium, internal memory, input devices, a display screen, and a network interface connected via a system bus. The non-volatile storage medium of the computer system can store the operating system and computer-readable instructions. When executed, these computer-readable instructions cause the processor to execute a tobacco leaf feature similarity analysis method based on multivariate Gaussian distribution modeling, as described in various embodiments of this application. The specific implementation process of this method can be found in [reference needed]. Figure 1 The specific details will not be elaborated here.
[0103] The processor of this computer system provides computational and control capabilities, supporting the operation of the entire system. The internal memory can store computer-readable instructions, which, when executed by the processor, enable the processor to perform a tobacco leaf feature similarity analysis method based on multivariate Gaussian distribution modeling. The computer system's input devices are used for inputting various parameters, the display screen is used for display, and the network interface is used for network communication.
[0104] Based on the same inventive concept, this application provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps in the above-described method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling.
[0105] The memory in the embodiments of this application can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), sync link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
[0106] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs.
[0107] When computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means.
[0108] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives (SSDs).
[0109] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0110] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0111] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0112] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0113] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0114] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0115] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0116] In this specification, references to "an embodiment" or "a specific implementation" mean that a particular feature, structure, or characteristic described in connection with that embodiment / specific implementation is included in at least one embodiment / specific implementation of the invention. Therefore, the phrase "in one embodiment / specific implementation" appearing in various places in this specification does not necessarily refer to the same embodiment / setting, but rather to potentially different embodiments. Furthermore, specific features, structures, or characteristics may be combined in one or more embodiments / settings in any suitable manner, as will be apparent to those skilled in the art from this disclosure.
[0117] Similarly, it should be understood that in the above description of exemplary embodiments / specific implementations of the invention, various features of the invention are sometimes combined in a single embodiment / specific implementation or its figures and description, with the aim of simplifying the disclosure and aiding in the understanding of one or more of the various aspects of the invention. However, the method of description in this patent should not be construed as reflecting an intention that the claimed features of the invention are more than those expressly stated in each claim, except where explicitly stated otherwise or in obvious technical contradiction or exclusion. Rather, the inventive aspect reflected in the claims lies in not all the features of a single foregoing disclosed embodiment / specific implementation. Therefore, the claims following the detailed description are expressly incorporated herein by reference, each claim existing independently as a separate embodiment / specific implementation of the invention.
[0118] Furthermore, while some embodiments / specific implementations described herein include, but are not limited to, other features included in other embodiments / specific implementations, combinations of features from different embodiments / specific implementations are intended to be within the scope of the invention and form different embodiments / specific implementations, as will be understood by those skilled in the art. For example, in the following claims, embodiments / specific implementations of any claim can be used in any combination.
[0119] The terms and expressions used in this specification are for illustrative purposes and not for limitation. In using these terms and expressions, it is not intended to exclude any equivalents of the features or portions thereof shown and described, but rather to recognize that various modifications may be possible within the scope of the invention.
[0120] Therefore, it should be understood that although the invention has been specifically disclosed through preferred embodiments, exemplary embodiments and optional features, those skilled in the art may take variations or modifications of the concepts disclosed herein, and such variations and modifications are therefore considered to be within the scope of the invention as defined by the appended claims.
[0121] The specific embodiments given in this specification are examples of useful implementations of the present invention. It will be apparent to those skilled in the art that the present invention can be implemented using many variations of the devices, device components, and method steps disclosed in this specification.
[0122] The foregoing description of specific embodiments fully discloses the general features of the present invention, enabling others to easily modify and / or adapt such specific embodiments for various applications by applying knowledge within the scope of the art, without conducting excessive experimentation and without departing from the general concept of the present invention.
[0123] Therefore, based on the teachings and guidance provided herein, it is intended that such modifications and alterations be included within the meaning and scope of equivalents of the disclosed embodiments. It should be understood that the wording or terminology used herein is for descriptive purposes and is not intended to be limiting; thus, the wording or terminology in this specification will be interpreted by those skilled in the art based on the foregoing teachings and guidance.
[0124] Furthermore, the scope of the invention should not be limited to any of the exemplary embodiments described above, but only to the appended claims and their equivalents.
Claims
1. A method for analyzing the similarity of tobacco leaf features based on multivariate Gaussian distribution modeling, characterized in that, The method for analyzing the similarity of comprehensive characteristics of tobacco leaves includes: Step S1: Construct a tobacco leaf similarity analysis dataset, and standardize the physicochemical indicators of tobacco leaves in the tobacco leaf similarity analysis dataset to obtain a standardized dataset; Step S2: Group the standardized dataset according to aroma type, part of the plant, and place of origin, and construct a multivariate Gaussian distribution model for the physicochemical indicators of tobacco leaves for each group of origin samples; Step S3: Based on the multivariate Gaussian distribution model, calculate the distribution distance between the production areas to form a tobacco production area distance matrix; Step S4: Perform dimensionality reduction and cluster analysis on the distance matrix of tobacco origin to obtain the similarity analysis results of tobacco leaves with the same aroma and part in different origins.
2. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 1, characterized in that, Step S1 includes: Step S11: Group the original tobacco leaf samples according to aroma type, part and origin, and select the origin samples with more samples in each group than the number of the physicochemical indicators of the tobacco leaves as standard tobacco samples. Step S12: Perform Z-score global standardization on the physicochemical indicators of the tobacco leaves to obtain dimensionless standardized physicochemical indicators of the tobacco leaves; Step S13: Use the standard tobacco sample and the standardized tobacco leaf physicochemical indicators as the standardized dataset.
3. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 1, characterized in that, The steps for constructing the multivariate Gaussian distribution model include: Step M1: For each group of origin samples, using the physicochemical indicators of the tobacco leaves as random variables, fit a multivariate Gaussian distribution to calculate the mean vector and covariance matrix of the origin samples; Step M2: Determine whether the number of origin samples is less than a preset sample size threshold; if so, then correct the covariance matrix corresponding to the origin samples according to the covariance shrinkage algorithm. Step M3: Construct the multivariate Gaussian distribution model based on the mean vector and the covariance matrix.
4. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 3, characterized in that, The covariance shrinkage algorithm is the Ledoit-Wolf shrinkage algorithm.
5. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 1, characterized in that, The tobacco origin distance matrix includes at least one of the following: Wasserstein distance matrix, KL distance matrix, and JS distance matrix. Step S3 includes: Step S31: Calculate the distribution distance between the multivariate Gaussian distribution models corresponding to each production area according to the second-order Wasserstein distance algorithm, and obtain the Wasserstein distance matrix; Step S32: Calculate the relative information differences between the multivariate Gaussian distribution models corresponding to each production area according to the KL divergence algorithm, and obtain the KL distance matrix; Step S33: Calculate the symmetric information difference between the multivariate Gaussian distribution models corresponding to each production area according to the JS divergence algorithm, and obtain the JS distance matrix.
6. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 5, characterized in that, Step S3 further includes: Step S34: Perform cross-consistency verification on each group of origin samples based on the Wasserstein distance matrix and the JS divergence algorithm.
7. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 1, characterized in that, Step S4 includes: Step S41: According to the dimensionality reduction algorithm, the distance matrix of tobacco origin is reduced to a low-dimensional space to obtain the dimensionality reduction result; Step S42: Based on the place of origin, cluster the dimensionality reduction results to obtain similarity analysis results and visualize the similarity analysis results.
8. The method for tobacco leaf feature similarity analysis based on multivariate Gaussian distribution modeling according to claim 1, characterized in that, The fragrance types include strong fragrance, medium fragrance, and light fragrance; The aforementioned parts include the upper leaf, middle leaf, and lower leaf; The physicochemical indicators of the tobacco leaves include sugar-alkali ratio, total sugar, total potassium, two sugar ratio, total appearance score, total sensory score, length, length-width ratio, single leaf weight, and leaf stem content.
9. A tobacco leaf feature similarity analysis device based on multivariate Gaussian distribution modeling, characterized in that, The tobacco leaf comprehensive feature similarity analysis device includes: a data processing module, a grouping modeling module, a similarity calculation module, and an analysis output module. The data processing module is used to construct a tobacco leaf similarity analysis dataset and to standardize the physicochemical indicators of tobacco leaves in the tobacco leaf similarity analysis dataset to obtain a standardized dataset. The grouping modeling module is used to group the standardized dataset according to aroma type, part, and origin, and to construct a multivariate Gaussian distribution model for the physicochemical indicators of tobacco leaves for each group of origin samples. The similarity calculation module is used to calculate the distribution distance between the production areas based on the multivariate Gaussian distribution model, forming a tobacco production area distance matrix; The analysis output module is used to perform dimensionality reduction and cluster analysis on the tobacco origin distance matrix to obtain similarity analysis results of tobacco leaves with the same aroma and part in different origins.
10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the tobacco leaf feature similarity analysis method based on multivariate Gaussian distribution modeling as described in any one of claims 1-8.
