Method, device, equipment and storage medium for evaluating similarity of tobacco flavorings
By converting the GC-MS spectrum into a two-dimensional plaintext data matrix and dividing the time window, the similarity of flavors and fragrances is calculated, and the problems of overlapping peaks and artificial dependence are solved, and efficient and accurate evaluation of flavors and fragrances is achieved.
Patent Information
- Application Number
- CN202310491816.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-05-04
AI Technical Summary
When evaluating the similarity of flavors and flavors for tobacco, the prior art has problems such as overlapping peaks, embedded peaks, and small peaks that are difficult to quantify accurately, and relying on artificial experience leads to poor reproducibility and repetition, and low efficiency.
Gas chromatography-mass spectrometry is used to convert it into a two-dimensional plaintext data matrix, and the time window is divided after noise reduction processing. The cosine value, abundance ratio and similarity weight are calculated by the abundance of mass-core ratio and retention time, and the spectral similarity of flavors and fragrances are automatically calculated.
High accuracy and efficiency reduce the dependence on artificial experience, can objectively reflect the similarity of flavors and fragrances, and improve data comparability and computing efficiency.
Smart Images

Figure CN116756581B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flavor and fragrance, and particularly to a method, device, equipment and storage medium for evaluating the similarity of tobacco flavor and fragrance. Background Art
[0002] Tobacco flavor and fragrance are important factors affecting the style and quality of cigarettes. The stability of the quality of tobacco flavor and fragrance has an important impact on the stability of cigarette style. However, due to the extremely complex components of tobacco flavor and fragrance, the method of controlling product quality by specific components is not suitable in most cases. And indicators such as relative density, refractive index, acid value, and volatile components are also difficult to sensitively reflect the product quality fluctuations.
[0003] Currently, using gas chromatography / mass spectrometry to analyze the components of flavor and fragrance is a conventional and effective technical means. When comparing the differences between different samples, due to the retention time shift, the responses of different spectra in the time series are not in a one-to-one correspondence relationship. Therefore, the original spectrum data cannot be directly compared. Generally, it is necessary to first convert the spectrum into a series of response values (peak area, peak height, content, etc.) of different components, and then use methods such as cosine of the included angle, correlation coefficient, and spatial distance to measure the sample similarity. This indirect method has the following deficiencies: First, it requires good separation between chromatographic peaks. For samples with complex components such as tobacco flavor, there are often a large number of overlapping peaks and embedded peaks in the chromatogram, making it difficult to accurately determine the qualitative and quantitative; Second, for chromatographic peaks with small peak areas, it is difficult to fully integrate and qualitatively analyze, which may cause the loss of key information; Third, in most cases, it is necessary for the tester to complete this conversion based on their own experience and habits, and the objectivity and reproducibility of the measurement will be affected, resulting in a large consumption of manpower and low efficiency.
[0004] For the above reasons, it is necessary to establish an evaluation method that can be automatically processed by a computer to evaluate the stability of flavor and fragrance. Summary of the Invention
[0005] To solve or partially solve the problems existing in the related technologies, the present invention provides a method, device, equipment and storage medium for evaluating the similarity of tobacco flavor and fragrance.
[0006] First of all, the present invention provides a method for evaluating the similarity of tobacco flavor and fragrance, which includes the steps:
[0007] S11. Under the same conditions, respectively obtain the GC-MS spectra of two tobacco flavor and fragrance substances to be evaluated; convert the GC-MS spectra into two-dimensional plaintext data matrices, obtaining the plaintext data matrices dat1[m,n] and dat2[m,n] corresponding to the two tobacco flavor and fragrance substances; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence;
[0008] S12. Perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m,n] on the retention time sequence, obtaining the noise-reduced data matrix dat1_dn[m,n];
[0009] S13. Divide the noise-reduced data matrix dat1_dn[m,n] on the retention time sequence into multiple time windows; assume the window width of the time window is 2t, the moving step size of the time window is half of the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2,n], (1 ≤ i ≤ wn);
[0010] S14. Calculate the data matrix dat1_wd i [2t,n] of the i-th time window, obtaining the mass-to-charge ratio abundance sum dat1_wd s _ms of each mass-to-charge ratio on the i-th time window, and obtaining the single-time-window abundance sum dat1_wd i _tms of the i-th time window;
[0011] S15. Calculate the sum of the single-time-window abundance sums of wn time windows, obtaining the total time-window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m,n];
[0012] S16. Referring to steps S12 to S15, calculate the plaintext data matrix dat2[m,n], obtaining the mass-to-charge ratio abundance sum dat2_wd i _ms of each mass-to-charge ratio on the i-th time window corresponding to this plaintext data matrix, the single-time-window abundance sum dat2_wd i _tms of the i-th time window, and the total time-window abundance sum dat2_tms;
[0013] S17. Calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance sums dat1_wd i _ms and dat2_wd i _ms;
[0014] Calculate through the single-time-window abundance sums dat1_wd i _tms and dat2_wdi _tms calculates the abundance ratio tms(i) of the i-th time window;
[0015] S18. Through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms, as well as the total-time-window abundance and dat1_tms and dat2_tms, calculate the similarity weight w(i) of the i-th time window;
[0016] S19. Calculate the similarity sml of the spectra of two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i takes values from 1 to wn.
[0017] Further, the specific steps of step S14 are as follows:
[0018] Sum the data of dat1_wd i [2t,n] on the retention time series to obtain an n-dimensional vector dat1_wd i _ms[n], that is, on the i-th time window, the abundance sum of each mass-to-charge ratio is dat1_wd i _ms;
[0019] Sum the data of dat1_wd i _ms on the mass-to-charge ratio series to obtain dat1_wd i _tms, that is, the single-time-window abundance sum of the i-th time window.
[0020] Further, in step S17, according to Equation I, through the mass-to-charge ratio abundance sum dat1_wd i _ms and dat2_wd i _ms, calculate the cosine value cos(i) of the i-th time window:
[0021]
[0022] Further, in step S17, according to Equation II, through the single-time-window abundance sum dat1_wd i _tms and dat2_wd i _tms, calculate the abundance ratio tms(i) of the i-th time window;
[0023]
[0024] Further, in step S18, according to Equation III, through the single-time-window abundance sum dat1_wd i _tms and dat2_wd i_tms, and calculate the similarity weight w(i) of the i-th time window based on all time window abundances and dat1_tms and dat2_tms;
[0025]
[0026] Further, in the step S19, calculate the similarity sml of the spectra of two tobacco flavorings according to Equation IV based on the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window;
[0027]
[0028] Further, in the step S12, perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m,n] in the retention time series by using the moving median method.
[0029] Secondly, the present invention also provides a device for evaluating the similarity of tobacco flavorings, which includes:
[0030] A data acquisition and conversion unit, configured to obtain the GC-MS spectra of two tobacco flavorings to be evaluated as objects under the same conditions; and convert the spectra into a two-dimensional plaintext data matrix to obtain the plaintext data matrices dat1[m,n] and dat2[m,n] corresponding to the two tobacco flavorings; the elements of the plaintext data matrix are abundances, n is the number of sequences in the mass-to-charge ratio sequence, and m is the number of sequences in the retention time series;
[0031] A data processing unit, configured to perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m,n] in the retention time series to obtain a noise reduction data matrix dat1_dn[m,n]; then divide the noise reduction data matrix dat1_dn[m,n] into multiple time windows in the retention time series; assume that the window width of the time window is 2t, the moving step of the time window is half of the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2t,n], (1≤i≤wn); then calculate the mass-to-charge ratio abundance sum dat1_wd of each mass-to-charge ratio in the i-th time window i [2t,n], and obtain the single time window abundance sum dat1_wd of the i-th time window i _ms, and, obtain the single time window abundance sum dat1_wd of the i-th time window i_tms; Calculate the sum of the abundances of a single time window for wn time windows to obtain the total time window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m,n]; and calculate the plaintext data matrix dat2[m,n] in the above manner to obtain the mass-to-charge ratio abundance sum dat2_wd of each mass-to-charge ratio on the i-th time window corresponding to this plaintext data matrix i _ms, the abundance sum of a single time window of the i-th time window dat2_wd i _tms, and the total time window abundance sum dat2_tms;
[0032] Similarity calculation unit, for passing through the mass-to-charge ratio abundance sum dat1_wd i _ms and dat2_wd i _ms
[0033] Calculate the cosine value cos(i) of the i-th time window, and calculate the abundance ratio tms(i) of the i-th time window through the abundance sum dat1_wd i _tms and dat2_wd i _tms; Then calculate the similarity weight w(i) of the i-th time window through the abundance sum dat1_wd i _tms and dat2_wd i _tms, and the total time window abundance sum dat1_tms
[0034] And dat2_tms calculate the similarity sml of the spectra of two tobacco flavorings for the i-th time window. i takes values from 1 to wn.
[0035] Again, the present invention also provides a device for evaluating the similarity of tobacco flavorings, which includes:
[0036] Memory, for storing computer programs;
[0037] Processor, for calling and executing the computer program to implement the steps of the method described in any one of the above.
[0038] Finally, the present invention provides a computer-readable storage medium, including a software program, and the software program is adapted to be executed by a processor to implement the steps of the method described in any one of the foregoing.
[0039] The technical solution provided by the present invention may include the following beneficial effects:
[0040] 1). This method calculates the similarity by directly comparing the spectral data instead of peak selection, solving the problems of difficult qualitative and quantitative analysis of overlapping peaks, embedded peaks, small peaks, etc.; it also solves the problems of poor reproducibility and repeatability caused by the dependence of testers on experience for qualitative and quantitative analysis. After determining the calculation parameters using the method of the present invention, for the same data, different operators will obtain exactly the same similarity, improving the comparability of the data. Moreover, this method has low requirements for peak resolution and can appropriately shorten the spectral acquisition time.
[0041] 2). This method first converts the GC-MS spectra of flavor and fragrance into a plain text data matrix containing the abundance information of ions with different mass-to-charge ratios at different retention times. After noise reduction processing, it is divided into multiple time windows for calculation to solve the problem of retention time shift between two spectra at the same retention time. At the same time, setting the moving step size of the time window to half of the window width can ensure that as many data with retention time deviations as possible can be accommodated within one time window, further improving the inclusiveness of subsequent operations for the aforementioned retention time deviations; subsequently, a certain similarity weight is assigned according to the substance content within the time window. For the time window containing substances with higher content, a higher weight is assigned when calculating the similarity, and for the time window containing substances with lower content, a lower weight is assigned; finally, the similarity of the spectra of two tobacco flavor and fragrance is calculated through the cosine value, abundance ratio, and similarity weight of each time window. Therefore, using this method can more accurately and objectively reflect the similarity of two tobacco flavor and fragrance, and the calculation process can be completely handled by a computer, greatly improving the similarity calculation efficiency and saving labor costs.
[0042] In summary, the method for evaluating the similarity of tobacco flavor and fragrance provided by the present invention has the advantages of high accuracy, high efficiency, wide application range, and low participation of manual experience.
[0043] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] By describing the exemplary embodiments of the present invention in more detail in conjunction with the drawings, the above and other objects, features, and advantages of the present invention will become more obvious. Among them, in the exemplary embodiments of the present invention, the same reference numerals generally represent the same components.
[0045] Figure 1 is a schematic diagram of the steps of the method for evaluating the similarity of tobacco flavor and fragrance shown in the embodiments of the present invention;
[0046] Figure 2 is the GC-MS spectra of four essential oil flavor and fragrance in Embodiment 1 of the present invention;
[0047] Figure 3 It is a schematic structural diagram of an apparatus for evaluating the similarity of tobacco flavor and fragrance according to an embodiment of the present invention;
[0048] Figure 4 It is a hardware structural block diagram of a device for evaluating the similarity of tobacco flavor and fragrance according to an embodiment of the present invention. Detailed implementation manners
[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0050] The terms used in the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "the" and "said" used in the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0051] It should be understood that although the terms "first", "second", "third", etc. may be used in the present invention to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.
[0052] In order to improve the accuracy of the quality evaluation of tobacco flavor and fragrance and reduce the dependence on manual experience, an embodiment of the present invention provides a method for evaluating the similarity of tobacco flavor and fragrance. Please refer to Figure 1 and the method includes the following steps:
[0053] S11. Under the same conditions, respectively obtain the GC-MS spectra of two tobacco flavor and fragrance to be evaluated; convert the GC-MS spectra into two-dimensional plaintext data matrices to obtain the plaintext data matrices dat1[m,n] and dat2[m,n] corresponding to the two tobacco flavor and fragrance; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence;
[0054] S12. Perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m,n] in the retention time series to obtain the noise-reduced data matrix dat1_dn[m,n].
[0055] S13. Divide the noise-reduced data matrix dat1_dn[m,n] in the retention time series into multiple time windows; assume the window width of the time window is 2t, the moving step size of the time window is half of the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2,n], (1 ≤ i ≤ wn);
[0056] S14. Calculate the data matrix dat1_wd of the i-th time window i [2t,n] to obtain the mass-to-charge ratio abundance sum dat1_wd of each mass-to-charge ratio in the i-th time window i _ms, and obtain the single-time-window abundance sum dat1_wd of the i-th time window i _tms;
[0057] S15. Calculate the sum of the single-time-window abundance sums of wn time windows to obtain the total time-window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m,n];
[0058] S16. Referring to steps S12 to S15, calculate the plaintext data matrix dat2[m,n] to obtain the mass-to-charge ratio abundance sum dat2_wd of each mass-to-charge ratio in the i-th time window corresponding to this plaintext data matrix i _ms, the single-time-window abundance sum dat2_wd of the i-th time window i _tms, and the total time-window abundance sum dat2_tms;
[0059] S17. Calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance sums dat1_wd i _ms and dat2_wd i _ms;
[0060] Calculate the abundance ratio tms(i) of the i-th time window through the single-time-window abundance sums dat1_wd i _tms and dat2_wd i _tms;
[0061] S18. Through the single-time-window abundance sums dat1_wd i _tms and dat2_wd i_tms, and the similarity weight w(i) of the i-th time window is calculated based on the abundances of all time windows and dat1_tms and dat2_tms;
[0062] S19. Calculate the similarity sml of the spectra of two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i ranges from 1 to wn.
[0063] In the above method provided by the present invention, first, the GC-MS spectra of two tobacco flavorings to be evaluated are obtained according to step S11. Specifically, under the same conditions, a gas chromatography-mass spectrometry instrument is used to analyze and detect the samples of two tobacco flavorings to be evaluated respectively, and the corresponding GC-MS spectra are obtained. Then, the GC-MS spectra are converted into a two-dimensional plaintext data matrix, the elements of which are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence. The abundance can reflect the abundances of different mass-to-charge ratio ions at different retention times. This step can be specifically: first, the GC-MS spectra are converted into two-dimensional data, the abscissa of which is the mass-to-charge ratio and the ordinate is the retention time. The two-dimensional data can be shown in Table 1.
[0064] Table 1 Two-dimensional data
[0065]
[0066] Then, the abundance information in the two-dimensional database is extracted to obtain a two-dimensional plaintext data matrix dat u [m, n], u = 1 or 2, and the two-dimensional plaintext data matrix dat u [m, n] obtained according to Table 1 is as follows:
[0067]
[0068] In this way, the plaintext data matrices dat1[m, n] and dat2[m, n] corresponding to the GC-MS spectra of two tobacco flavorings can be obtained. Then, data processing is performed on the plaintext data matrix dat1[m, n] obtained according to steps S12 to S16. Specifically, step S12 is a step of performing noise reduction processing on the plaintext data matrix to reduce the noise in the data. Preferably, step S12 preferably uses the moving median method to perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m, n] on the retention time sequence. Using this method can effectively correct baseline drift, reduce the influence of background noise data on the calculation results, and improve data accuracy.
[0069] Step S13 is a step of dividing the denoised data matrix processed in step S12 into time windows to form a time-window data matrix. Specifically, in this step, the width of the wide time window is set to 2t, and the moving step size of the time window is set to half of the window width t. Thus, the original denoised data matrix is divided into wn time-window matrices. In subsequent operations and comparisons, calculations are performed in units of time windows. The main function of dividing the denoised data matrix into time windows in this step is to solve the problem that the actually flowing substances may not be exactly the same at the same retention time, that is, there is a retention time shift between the two spectra to be compared. For example, if the similarity is compared at each time point, for the same retention time, the first spectrum has already peaked, and the same peak in the second spectrum starts to peak after 100 retention time points. Then, at these 100 points, both the overall similarity and the abundance ratio will be very small. However, if the same substance peaks in the two spectra are grouped into one time window and the similarity is calculated after ion summation, the two spectra meet the condition of substance correspondence, and the time shift problem is solved. In addition, calculating in units of time windows can also reduce the computational amount. At the same time, the function of setting the moving step size of the time window to half of the window width t is to make part of the data overlap in adjacent time windows by setting the moving step size to half of the window width t, so that as many data with retention time deviations as possible can be accommodated in one time window, thereby improving the tolerance of subsequent operations to the aforementioned retention time deviations. Those skilled in the art can understand that there may be a situation where the number of retention time series cannot be divided evenly by 2t, that is, the width of the last time window is less than 2t. In this case, the part with a window width less than 2t can be filled with 0, or this time window can be discarded, and the previous time window of this time window is used as the last time window. After this step, the data matrix of the i-th time window of the plaintext data matrix dat1[m,n] is dat1_wd i [2t,n], which is specifically as follows:
[0070]
[0071] Step S14 is a step of calculating the data matrix dat1_wd i [2t,n] of the i-th time window. This step is used to obtain the mass-to-charge ratio abundance sum dat1_wd i _ms of each mass-to-charge ratio on the i-th time window, and to obtain the single-time-window abundance sum dat1_wd i _tms of the i-th time window. Preferably, this step is specifically:
[0072] Sum the data of dat1_wd i [2t,n] on the retention time series to obtain an n-dimensional vector dat1_wd i_ms[n], that is, the abundance of each mass-to-nuclear ratio in the i-th time window and dat1_wd i _ms; that is, dat1_wd i Sum each column of data in [2t,n] to get the n-dimensional vector dat1_wd i _ms[n], the n-dimensional vector dat1_wd i _ms[n] is the aforementioned mass-to-nuclear ratio abundance and dat1_wd i _ms;
[0073] dat1_wd i _ms data summation on the mass-to-nuclear ratio sequence Get dat1_wd i _tms, that is, the single time window abundance sum of the i-th time window. That is, for the n-dimensional vector dat1_wd i _ms[n] is the n-dimensional vector dat1_wd i Sum the data in _ms[n] to get the single time window abundance and dat1_wd of the i-th time window i _tms.
[0074] According to step S14, the abundance sum of each single time window can be obtained, and then the single time window abundance sums of each time window are summed according to step S15, that is, the sum of the single time window abundance sums of w n time windows is calculated, and the total time window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m,n] is obtained.
[0075] Then, according to the above steps S12 to S15, the plaintext data matrix dat2[m,n] is calculated in the same way to obtain the mass-to-nuclear ratio abundance and dat2_wd of each mass-to-nuclear ratio in the i-th time window corresponding to the plaintext data matrix. i _ms, single time window abundance of the i-th time window and dat2_wd i _tms, as well as all time window abundances and dat2_tms.
[0076] The above step S17 is obtained by the mass-to-nuclear ratio abundance and dat1_wd i _ms and dat2_wd i _ms calculates the cosine value cos(i) of the i-th time window; the cosine value cos(i) is used as one of the parameters for evaluating the similarity sml of the spectra of two tobacco flavors and fragrances. This step is preferably performed according to formula I by using the above mass-to-nuclear ratio abundance and dat1_wd i _ms and dat2_wd i _ms calculates the cosine value cos(i) of the i-th time window:
[0077]
[0078] Step S17 also calculates the abundance ratio tms(i) of the i-th time window through the above single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms; the abundance ratio tms(i) of the i-th time window is also one of the parameters for evaluating the similarity sml of the spectra of two tobacco flavorings; in this step, preferably, the abundance ratio tms(i) of the i-th time window is calculated according to Formula II through the above single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms; those skilled in the art can understand that in Formula II, min means taking the minimum value.
[0079]
[0080] Step S18 is a step of calculating the similarity weight w(i) of the i-th time window through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms, as well as the total-time-window abundance and dat1_tms and dat2_tms; the similarity weight w(i) is also one of the parameters for evaluating the similarity sml of the spectra of two tobacco flavorings. The function of setting this similarity weight w(i) is as follows: for the time window containing substances with higher contents, a higher weight is given when calculating the similarity, and for the time window containing substances with lower contents, a lower weight is given to improve the accuracy of the similarity result; for example, for the time window part containing small spectral peaks (substances with lower contents) in the two spectra, a smaller weight is given, and the weight ratio it occupies when calculating the similarity is also relatively small; for the time window part containing large spectral peaks (substances with higher contents) in the two spectra, a higher weight is given, and the weight ratio it occupies when calculating the similarity is also relatively large. In this step, preferably, the similarity weight w(i) of the i-th time window is calculated according to Formula III through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms, as well as the total-time-window abundance and dat1_tms and dat2_tms;
[0081]
[0082] Through the foregoing steps, the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window corresponding to two tobacco flavorings have been obtained. Then, according to step S19, the similarity sml of the spectrograms of the two tobacco flavorings is calculated based on the foregoing data. The cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window can calculate the similarity contribution amount at the i-th time window. Then, the similarity contributions of all time windows (i ranges from 1 to wn) are summed up to obtain the similarity sml of the spectrograms of the two tobacco flavorings; that is, the similarity sml between the two spectrograms should be the sum of cos(i)*tms(i)*w(i) for wn time windows. Specifically, in this step, it is preferably to calculate the similarity sml of the spectrograms of the two tobacco flavorings according to Equation IV based on the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window.
[0083]
[0084] The similarity between two tobacco flavorings can be calculated by the above method. One of the two tobacco flavorings described as the object to be evaluated in the application can be a standard tobacco flavoring, and the other can be a sample flavoring to be tested. At this time, the quality of the sample flavoring to be tested can be evaluated according to the similarity sml calculated according to the method of the present invention. Or, the two tobacco flavorings described as the object to be evaluated in the application can be the similarity of the same tobacco flavoring in different batches. At this time, the quality stability of the flavorings between different batches can be evaluated according to the similarity sml calculated according to the method of the present invention. In addition, this method can also be applied to fields such as selecting alternative samples from a large number of samples and discriminating the usability of samples.
[0085] Those skilled in the art can understand that: the similarity described in this application is actually a pairwise comparison of the abundances at the mass-to-charge ratios, and the dimensions need to be consistent. Therefore, the mass-to-charge ratios corresponding to each row of the two plaintext data matrices should also be the same, that is, n in dat1[m,n] and dat2[m,n] is the same. There may be a millisecond-level deviation in the retention time series. This millisecond-level deviation refers to the time deviation recorded at the same position (such as the 5000th time point) of two spectrograms under the same instrument conditions. This deviation can be ignored in the calculation. Therefore, it can be considered that m in dat1[m,n] and dat2[m,n] is also basically the same. If the mass-to-charge ratio ranges are not completely consistent during data acquisition, there are two strategies at this time. One is to fill in the missing mass-to-charge ratio data with 0, and the other is to only take the overlapping mass-to-charge ratios.
[0086] As can be seen from the above, the method for evaluating the similarity of tobacco flavorings provided by the present invention has the following advantages:
[0087] 1) This method calculates the similarity by directly comparing the spectral data instead of peak selection, which solves the problems of difficult qualitative and quantitative analysis of overlapping peaks, embedded peaks, small peaks, etc.; it also solves the problems of poor reproducibility and repeatability caused by qualitative and quantitative analysis relying on the experience of testers. After determining the calculation parameters using the method of the present invention, for the same data, different operators will obtain exactly the same similarity, improving the comparability of the data. And this method has low requirements for peak resolution, and can appropriately shorten the spectral acquisition time.
[0088] 2) This method first converts the GC-MS spectra of flavor and fragrance into a plain text data matrix containing the abundance information of ions with different mass-to-charge ratios at different retention times. After noise reduction processing, it is divided into multiple time windows for calculation to solve the problem of retention time offset between two spectra at the same retention time. At the same time, setting the moving step of the time window to half of the window width can make as much data with retention time deviation as possible be accommodated in one time window, further improving the inclusiveness of subsequent operations for the aforementioned retention time deviation; subsequently, a certain similarity weight is assigned according to the substance content in the time window. For the time window containing substances with higher content, a higher weight is assigned when calculating the similarity, and for the time window containing substances with lower content, a lower weight is assigned; finally, the similarity of the spectra of two tobacco flavor and fragrance is calculated through the cosine value, abundance ratio and similarity weight of each time window. Therefore, using this method can more accurately and objectively reflect the similarity of two tobacco flavor and fragrance, and the calculation process can be completely handled by a computer, greatly improving the similarity calculation efficiency and saving labor costs.
[0089] In summary, the method for evaluating the similarity of tobacco flavor and fragrance provided by the present invention has the advantages of high accuracy, high efficiency, wide application range and low participation of manual experience.
[0090] The technical solution of the present invention will be further described below in conjunction with specific embodiments:
[0091] Example 1
[0092] Two groups of samples were selected and the similarity was calculated using the indirect integration method and the method of the present invention respectively. Considering that it is easy to have peaks that are difficult to accurately integrate or qualitatively analyze in samples with complex components, essential oil spices were selected for the control experiment. The basic information of the samples is shown in Table 2.
[0093] Table 2 Sample Information
[0094]
[0095] Each essential oil flavor was processed as follows to obtain the samples to be analyzed: Weigh 1.000 g of the sample, dilute it to 5.000 g with 95% ethanol, shake well, filter the solution through a 0.45 μm microporous filter membrane, and wait for instrumental analysis.
[0096] Analyze and detect the four samples to be analyzed using an Agilent 7890-5975 gas chromatography-mass spectrometry (GC-MS) instrument. The instrument conditions are as follows: Chromatographic column: DB-5MS (60 m × 0.25 mm × 0.25 μm), inlet temperature 250 °C, split ratio 15:1, injection volume 1 μL, carrier gas is helium, constant flow mode 1 mL / min; Programmed temperature rise, initial temperature 50 °C held for 2 min, heated at 8 °C / min to 280 °C and held for 25 min; Transfer line temperature 280 °C; Ion source (EI) temperature 230 °C; Ionization voltage: 70 eV; Solvent delay: 4.8 min; Scanning range: 33 - 400. Other conditions use the default parameters of the instrument. The GC-MS spectra of the four samples to be analyzed are shown in Figure 2 .
[0097] Calculate the similarity according to the following two methods respectively
[0098] Method 1: Indirect integration method
[0099] Use the default parameters of the GCMS workstation to automatically integrate by the indirect integration method, and use the NIST standard spectral library method combined with the retention time to judge the same components in the two spectra. The integration results are shown in Table 3 and Table 4. Calculate the similarity by multiplying the cosine value by the abundance ratio. According to this method, the similarity between Clary Sage Oil A1 and A2 is 92.87%, and the similarity between Clove Bud Oil B1 and B2 is 81.58%.
[0100] Table 3 Integration results of Clary Sage Oil
[0101]
[0102]
[0103] Table 4 Integration results of Clove Bud Oil
[0104]
[0105]
[0106] Method 2: Direct comparison method of spectral data
[0107] 1. Use the OpenChrom Community Edition software to convert the four spectra into two-dimensional data respectively. Each two-dimensional data has 11,818 rows in the time series and 368 columns in the mass-to-charge ratio series. Since there is a large amount of data content, only a part of the two-dimensional data of sclareolide oil A1 is shown in this embodiment. The partial two-dimensional data of the GC-MS spectrum of sclareolide oil A1 is listed in Table 5:
[0108] Table 5 Partial two-dimensional data of the GC-MS spectrum of perilla oil A1
[0109]
[0110]
[0111] Then extract the abundance information from the two-dimensional data (that is, delete the header part and retain the bold data in Table 5), and the corresponding plaintext data matrix is obtained.
[0112] 2. Calculate and subtract the spectral background noise for each plaintext data matrix using the moving median method, and set the window width to 2000 to obtain the corresponding noise-reduced data matrix.
[0113] 3. Set the time window length to 200 (converted according to the sampler sampling rate, retaining the time of about 50 s), and the step size to 100 (retaining the time of about 25 s). According to the aforementioned steps S13 to S15, use the GNU OCTAVE data analysis software to process and calculate each noise-reduced data matrix to obtain the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of sclareolide oil A1 and A2 in each time window. From this, the similarity of sclareolide oil A1 and A2 is calculated. The specific calculation formula is shown in the aforementioned Formulas I to IV. Calculate the similarity of clove bud oil B1 and B2 in the same way. According to this method of calculation, the similarity of sclareolide oil A1 and A2 is 95.86%, and the similarity of clove bud oil B1 and B2 is 80.65%.
[0114] The calculation results of the two methods show that under the condition of good spectral integration, the similarities are basically the same, and both can better reflect the sample differences. However, if the spectral integration condition is poor, it will bring greater uncontrollable factors to the indirect method.
[0115] Example 2
[0116] 1. Select 8 batches of flavoring essences prepared for a certain cigarette brand as the objects to be compared. The information of the flavoring essences is listed in Table 6.
[0117] Table 6 Information of flavoring essence samples
[0118]
[0119] 2. Calculate the similarity pairwise in the same manner as in Method 2 of Example 1 (including instrument detection and data processing parameters), and the phase velocity results are shown in Table 7.
[0120] Table 7 Similarity of Flavorings Added in Different Batches
[0121]
[0122] 3. For the above 64 similarity values, the total time consumed for data import and calculation is 28 minutes (Intel(R) Core i5-4590 CPU, 8G RAM, Win10), and the calculation efficiency is much higher than that of traditional calculation methods.
[0123] As can be seen from Table 7, the similarity of the flavorings added in different batches is higher than 96%, indicating good preparation stability.
[0124] Corresponding to the method embodiments, on the other hand of the embodiments of the present invention, there is also provided a device for evaluating the similarity of tobacco flavorings. Please refer to Figure 3 , and this device is the device corresponding to the method in the corresponding embodiment of Figure 1 , that is, the method in the corresponding embodiment of Figure 1 is implemented in the form of a virtual device. Each virtual module constituting the device for evaluating the similarity of tobacco flavorings can be executed by an electronic device, such as a network device, a terminal device, or a server. Specifically, the device for evaluating the similarity of tobacco flavorings in the embodiments of the present invention includes:
[0125] A data acquisition and conversion unit 01, configured to obtain the GC-MS spectra of two tobacco flavorings to be evaluated as objects under the same conditions; and convert the spectra into a two-dimensional plaintext data matrix to obtain the plaintext data matrices dat1[m,n] and dat2[m,n] corresponding to the two tobacco flavorings; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence.
[0126] A data processing unit 02, configured to perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m,n] on the retention time sequence to obtain a noise-reduced data matrix dat1_dn[m,n]; then divide the noise-reduced data matrix dat1_dn[m,n] into multiple time windows on the retention time sequence; assume that the window width of the time window is 2t, the moving step size of the time window is half of the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2t,n], (1≤i≤wn); then perform further processing on the data matrix dat1_wd of the i-th time window iPerform calculations on [2t, n] to obtain the mass-to-charge ratio abundance of each mass-to-charge ratio in the i-th time window and dat1_wd i _ms, and obtain the single-time-window abundance sum of the i-th time window and dat1_wd i _tms; Calculate the sum of the single-time-window abundance sums of wn time windows to obtain the total time-window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m, n]; And, perform calculations on the plaintext data matrix dat2[m, n] in the above manner to obtain the mass-to-charge ratio abundance sum dat2_wd i _ms of each mass-to-charge ratio in the i-th time window corresponding to this plaintext data matrix, the single-time-window abundance sum dat2_wd i _tms of the i-th time window, and the total time-window abundance sum dat2_tms;
[0127] Similarity calculation unit 03 is used to calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance sums dat1_wd i _ms and dat2_wd i _ms, and calculate the abundance ratio tms(i) of the i-th time window through the single-time-window abundance sums dat1_wd i _tms and dat2_wd i _tms; Then, through the single-time-window abundance sums dat1_wd i _tms and dat2_wd i _tms, and the total time-window abundance sums dat1_tms
[0128] and dat2_tms calculate the similarity weight w(i) of the i-th time window; Finally, calculate the similarity sml of the spectra of two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i takes values from 1 to wn.
[0129] It should be noted that the specific implementation manners and technical effects in the embodiments of the present invention can refer to Figure 1 the corresponding method, which will not be elaborated here.
[0130] Corresponding to the method embodiments, in the embodiments of the present invention, there is also provided a device for evaluating the similarity of tobacco flavor and fragrance, which includes: a memory for storing a computer program; a processor for calling and executing the computer program to implement the steps of the method described in the above embodiments. The device for evaluating the similarity of tobacco flavor and fragrance can be a terminal, a server, etc. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto.
[0131] An example diagram of the hardware structure block diagram of the device for evaluating the similarity of tobacco flavor and fragrance provided in the embodiments of the present application is as Figure 4 shown, and may include:
[0132] Processor 1, communication interface 2, memory 3, and communication bus 4;
[0133] Among them, the processor 1, communication interface 2, and memory 3 complete mutual communication through the communication bus 4;
[0134] Optionally, the communication interface 2 can be an interface of a communication module, such as an interface of a GSM module;
[0135] The processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0136] The memory 3 may include a high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0137] Among them, the processor 1 is specifically configured to execute the computer program stored in the memory 3 to perform the following steps:
[0138] S11. Under the same conditions, respectively obtain the GC-MS spectra of two tobacco flavor and fragrance to be evaluated; convert the GC-MS spectra into two-dimensional plaintext data matrices to obtain the plaintext data matrices dat1[m,n] and dat2[m,n] corresponding to the two tobacco flavor and fragrance; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence;
[0139] S12. Perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m, n] in the retention time series to obtain a noise-reduced data matrix dat1_dn[m, n].
[0140] S13. Divide the noise-reduced data matrix dat1_dn[m, n] in the retention time series into multiple time windows; assume the window width of the time window is 2t, the moving step of the time window is half the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2, n], (1 ≤ i ≤ wn);
[0141] S14. Calculate the data matrix dat1_wd of the i-th time window i [2t, n] to obtain the mass-to-charge ratio abundance sum dat1_wd of each mass-to-charge ratio in the i-th time window i _ms, and obtain the single-time-window abundance sum dat1_wd of the i-th time window i _tms;
[0142] S15. Calculate the sum of the single-time-window abundance sums of wn time windows to obtain the total time-window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m, n];
[0143] S16. Referring to steps S12 to S15, calculate the plaintext data matrix dat2[m, n] to obtain the mass-to-charge ratio abundance sum dat2_wd of each mass-to-charge ratio in the i-th time window corresponding to this plaintext data matrix i _ms, the single-time-window abundance sum dat2_wd of the i-th time window i _tms, and the total time-window abundance sum dat2_tms;
[0144] S17. Calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance sums dat1_wd i _ms and dat2_wd i _ms;
[0145] Calculate the abundance ratio tms(i) of the i-th time window through the single-time-window abundance sums dat1_wd i _tms and dat2_wd i _tms;
[0146] S18. Through the single-time-window abundance sums dat1_wd i _tms and dat2_wd i_tms, and calculate the similarity weight w(i) of the i-th time window based on all time window abundances and dat1_tms and dat2_tms;
[0147] S19. Calculate the similarity sml of the spectra of two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i ranges from 1 to wn.
[0148] The above products can execute the method provided by the embodiments of the present invention, and have the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the method for evaluating the similarity of tobacco flavorings provided by the embodiments of the present invention.
[0149] In an embodiment of the present invention, there is also provided a computer-readable storage medium, which can store a program suitable for execution by a processor, and the program is used to execute the following steps:
[0150] S11. Under the same conditions, respectively obtain the GC-MS spectra of two tobacco flavorings to be evaluated; convert the GC-MS spectra into two-dimensional plaintext data matrices to obtain the plaintext data matrices dat1[m,n] and dat2[m,n] corresponding to the two tobacco flavorings; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence;
[0151] S12. Perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m,n] on the retention time sequence to obtain a noise-reduced data matrix dat1_dn[m,n];
[0152] S13. Divide the noise-reduced data matrix dat1_dn[m,n] into multiple time windows on the retention time sequence; assume that the window width of the time window is 2t, the moving step size of the time window is half of the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2t,n], (1 ≤ i ≤ wn);
[0153] S14. Calculate the data matrix dat1_wd of the i-th time window i [2t,n] to obtain the mass-to-charge ratio abundance sum dat1_wd of each mass-to-charge ratio in the i-th time window i _ms, and obtain the single time window abundance sum dat1_wd of the i-th time window i _tms;
[0154] S15. Calculate the sum of the abundances of individual time windows for wn time windows to obtain the total time window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m, n].
[0155] S16. Refer to steps S12 to S15 to calculate the mass-to-charge ratio abundance sum dat2_wd i _ms of each mass-to-charge ratio on the i-th time window corresponding to the plaintext data matrix, the single time window abundance sum dat2_wd i _tms of the i-th time window, and the total time window abundance sum dat2_tms.
[0156] S17. Calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance sums dat1_wd i _ms and dat2_wd i _ms.
[0157] Calculate the abundance ratio tms(i) of the i-th time window through the single time window abundance sums dat1_wd i _tms and dat2_wd i _tms.
[0158] S18. Calculate the similarity weight w(i) of the i-th time window through the single time window abundance sums dat1_wd i _tms and dat2_wd i _tms, and the total time window abundance sums dat1_tms and dat2_tms.
[0159] S19. Calculate the similarity sml of the spectra of two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i takes values from 1 to wn.
[0160] Optionally, the refinement function and expansion function of the program can be referred to the above description.
[0161] The above product can execute the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the methods provided in other embodiments of the present invention.
[0162] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0163] In several embodiments provided by this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. Additionally, the couplings, direct couplings, or communication connections shown or discussed among each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, in each embodiment of this application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0166] It should be understood that in the embodiments of this application, each embodiment and feature can be combined with each other to achieve the solution of the foregoing technical problems.
[0167] If the described functions are implemented in the form of software functional units and sold or used as independent products, they 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 this 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 enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this application. And the foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, and other various media that can store program codes.
[0168] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for evaluating the similarity of tobacco flavorings, characterized in that, Including the steps: S11. Under the same conditions, respectively obtain the GC-MS spectra of two tobacco flavorings to be evaluated; convert the GC-MS spectra into two-dimensional plaintext data matrices to obtain the plaintext data matrices dat1[m, n] and dat2[m, n] corresponding to the two tobacco flavorings; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence; S12. Perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m, n] on the retention time sequence to obtain a noise-reduced data matrix dat1_dn[m, n]; S13. Divide the noise reduction data matrix dat1_dn[m, n] into multiple time windows on the retention time series; assume that the window width of the time window is 2t, the moving step of the time window is half the window width t, and the number of time windows is wn. At this time, the data matrix of the i-th time window is dat1_wd i [2t, n], 1 ≤ i ≤ wn; S14. Calculate the data matrix dat1_wd i [2t, n] of the i-th time window to obtain the mass-to-charge ratio abundance of each mass-to-charge ratio on the i-th time window and dat1_wd i _ms, and obtain the single-time-window abundance sum of the i-th time window and dat1_wd i _tms; S15. Calculate the sum of the abundances in a single time window for wn time windows to obtain the total time window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m, n]; S16. Referring to steps S12 to S15, calculate the mass-to-charge ratio abundance and dat2_wd of each mass-to-charge ratio on the i-th time window corresponding to the plaintext data matrix for the plaintext data matrix dat2[m, n]. i _ms, the single-time window abundance sum dat2_wd i _tms of the i-th time window, and the total time window abundance sum dat2_tms; S17. Calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance and dat1_wd i _ms and dat2_wd i _ms Through the single time window abundance and dat1_wd i _tms and dat2_wd i _tms, calculate the abundance ratio tms(i) of the i-th time window; S18. Calculate the similarity weight w(i) for the ith time window through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms, and the overall time-window abundance and dat1_tms and dat2_tms S19. Calculate the similarity sml of the spectra of the two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i takes values from 1 to wn.
2. The method for evaluating the similarity of tobacco flavorings according to claim 1, characterized in that The specific content of step S14 is as follows: For dat1_wd i Sum the data on the retention time series [2t, n] to obtain the n-dimensional vector dat1_wd i _ms[n], that is, on the i-th time window, the abundance sum of each mass-to-charge ratio is dat1_wd i _ms; Sum the data of dat1_wd i _ms on the mass-to-charge ratio sequence to obtain dat1_wd i _tms, that is, the single-time-window abundance sum of the i-th time window.
3. The method for evaluating the similarity of tobacco flavorings according to claim 2, characterized in that In the step S17, according to Formula I, the cosine value cos(i) of the i-th time window is calculated by the mass-to-charge ratio abundance and dat1_wd i _ms and dat2_wd i _ms:
4. The method for evaluating the similarity of tobacco flavorings according to claim 3, characterized in that In the step S17, according to formula II, the abundance ratio tms(i) of the i-th time window is calculated by using the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms 5. The method for evaluating the similarity of tobacco flavorings according to claim 4, characterized in that, In the step S18, according to Equation III, calculate the similarity weight w(i) of the i-th time window through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms, as well as the total-time-window abundances and dat1_tms and dat2_tms 6. The method for evaluating the similarity of tobacco flavorings according to claim 5, characterized in that In step S19, calculate the similarity sml of the spectra of the two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window according to formula IV; 7. The method for evaluating the similarity of tobacco flavorings according to claim 1, characterized in that In step S12, use the moving median method to perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m, n] on the retention time sequence.
8. An apparatus for evaluating the similarity of tobacco flavor and fragrance, characterized in that Including: A data acquisition and conversion unit, configured to obtain the GC-MS spectra of two tobacco flavorings to be evaluated under the same conditions; and convert the spectra into two-dimensional plaintext data matrices to obtain the plaintext data matrices dat1[m, n] and dat2[m, n] corresponding to the two tobacco flavorings; the elements of the plaintext data matrix are abundances, n is the number of sequences on the mass-to-charge ratio sequence, and m is the number of sequences on the retention time sequence; A data processing unit is used to perform noise reduction processing on the n mass-to-charge ratios in the plaintext data matrix dat1[m, n] on the retention time series to obtain a noise-reduced data matrix dat1_dn[m, n]; then the noise-reduced data matrix dat1_dn[m, n] is divided into multiple time windows on the retention time series; assuming that the window width of the time window is 2t, the moving step of the time window is half of the window width t, and the number of time windows is wn, at this time, the data matrix of the i-th time window is dat1_wd i [2t, n], 1 ≤ i ≤ wn; then calculate the data matrix dat1_wd i [2t, n] to obtain the mass-to-charge ratio abundance sum dat1_wd i _ms of each mass-to-charge ratio on the i-th time window, and obtain the single-time-window abundance sum dat1_wd i _tms of the i-th time window; calculate the sum of the single-time-window abundance sums of wn time windows to obtain the total time-window abundance sum dat1_tms corresponding to the plaintext data matrix dat1[m, n]; and calculate the plaintext data matrix dat2[m, n] in the above manner to obtain the mass-to-charge ratio abundance sum dat2_wd i _ms of each mass-to-charge ratio on the i-th time window corresponding to this plaintext data matrix, the single-time-window abundance sum dat2_wd i _tms of the i-th time window, and the total time-window abundance sum dat2_tms; A similarity calculation unit, configured to calculate the cosine value cos(i) of the i-th time window through the mass-to-charge ratio abundance and dat1_wd i _ms and dat2_wd i _ms, and calculate the abundance ratio tms(i) of the i-th time window through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms; then calculate the similarity weight w(i) of the i-th time window through the single-time-window abundance and dat1_wd i _tms and dat2_wd i _tms, as well as the total-time-window abundance and dat1_tms and dat2_tms; finally, calculate the similarity sml of the spectrograms of two tobacco flavorings according to the cosine value cos(i), abundance ratio tms(i), and similarity weight w(i) of the i-th time window, where i ranges from 1 to wn.
9. An apparatus for evaluating the similarity of tobacco flavor and fragrance, characterized in that, Including: A memory, configured to store a computer program; A processor, configured to call and execute the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, including a software program, where the software program is adapted to be executed by a processor to implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cigarette fingerprint spectrum analysis method based on GC-MSQQQ (gas chromatography-triple tandem quadrupole mass spectrometry)
CN105651892A