A method, device, equipment and medium for identifying a flavor source of a seasoned food

By combining gas chromatography-mass spectrometry detection and data enhancement processing with a flavor source discrimination model, a flavor quadrant diagram is generated, which solves the problem of rapid and accurate discrimination between natural and artificial flavors in seasoned foods, reduces hardware costs and manual analysis workload, and improves discrimination accuracy and model adaptability.

CN121431745BActive Publication Date: 2026-05-15CHINESE ACAD OF INSPECTION & QUARANTINE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINESE ACAD OF INSPECTION & QUARANTINE
Filing Date
2025-11-28
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and accurately distinguish between natural and artificial flavors in seasoned foods, and suffer from issues such as high subjectivity, expensive equipment, scarce samples, and poor model adaptability.

Method used

Flavor fingerprint data was obtained by gas chromatography-mass spectrometry, and after data enhancement processing, it was combined with a flavor source discrimination model to generate a flavor quadrant map for discrimination.

Benefits of technology

It enables rapid, accurate, and robust discrimination between natural extracts and artificial additives, reducing hardware costs and manual analysis workload, and improving discrimination accuracy and model adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121431745B_ABST
    Figure CN121431745B_ABST
Patent Text Reader

Abstract

The application discloses a seasoning food flavor source discrimination method, device, equipment and medium, and relates to the cross technical field of computer technology and analytical chemistry, and comprises the following steps: performing gas chromatography mass spectrometry on a seasoning food sample to obtain gas chromatography mass spectrometry flavor fingerprint data of the seasoning food; performing data enhancement processing based on the gas chromatography mass spectrometry flavor fingerprint data of the seasoning food to obtain a gas chromatography mass spectrometry flavor fingerprint enhanced data set; and combining the gas chromatography mass spectrometry flavor fingerprint enhanced data set with a flavor source discrimination model to obtain a seasoning food flavor source discrimination result. The application solves the problem of poor data comparability under different detection conditions by time retention calibration, greatly improves the discrimination accuracy by combining model analysis, simplifies the detection process, realizes efficient conversion from samples to results, is suitable for large-scale sample detection, and provides reliable technical support for food quality control and supervision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of computer technology and analytical chemistry, and in particular to a method, apparatus, equipment and medium for identifying the source of flavor in seasoned foods. Background Technology

[0002] In the field of flavored foods, flavor compounds are categorized into two types: natural products and artificially synthesized compounds. Natural flavors primarily originate from endogenous secondary metabolic pathways in plants and microbial fermentation processes. Specifically, during the ripening and post-ripening stages, plants generate key aroma components such as geraniol, linalool, and methyl salicylate through metabolic networks of terpenes, fatty acids, and amino acids. In traditional fermented foods, yeast and lactic acid bacteria further transform these precursors into characteristic aromas through reactions such as esterification and glycoside hydrolysis. In contrast, artificially synthesized flavors mainly rely on petrochemical or renewable sugar bases, obtaining compounds with identical or similar molecular structures to natural ones through multi-step organic reactions or directed biocatalysis (lipases, β-glucosidases, and recombinant microorganisms). Their advantages lie in low cost and high batch stability. However, consumers are willing to pay over 70% for "natural and additive-free" labels, and regulatory agencies such as the FDA and EFSA are increasingly stringent in their requirements for "natural" labeling, demanding that companies provide non-artificially synthesized chemical evidence. Therefore, the ability to quickly and accurately distinguish between natural and artificially derived flavors in complex food matrices has become an urgent need in the fields of food authenticity verification and product quality evaluation.

[0003] Existing identification techniques mainly rely on sensory evaluation, chromatography-mass spectrometry (GC-MS), stable isotope ratio mass spectrometry (IRMS), and sensors. Specifically, they have the following drawbacks: (1) Sensory evaluation is highly subjective and has poor repeatability, making it impossible to quantify the differences. (2) The sensitivity of sensor arrays such as electronic noses is affected by environmental temperature and humidity and sensor drift, resulting in weak quantitative capabilities. The misjudgment rate is high when peaks overlap in complex mixtures, and the equipment is not miniaturized or commercialized. (3) Although GC-MS has high sensitivity, aging of different batches of chromatographic columns, fluctuations in carrier gas pressure, and changes in laboratory temperature and humidity can cause nonlinear retention time drift of 0.5–2.0 min. Traditional linear or manual calibration errors are large, and the feature matching error rate increases by 15–30%. In addition, traditional spectral library comparison requires a list of candidate compounds in advance, and if key flavor substances are missed, the correct results cannot be given. (4) High-resolution mass spectrometry (HRMS) relies on commercial spectral libraries (NIST, Wiley, mzCloud, etc.) and self-built libraries. When the library is missing new synthetic flavors or fermentation by-products, it cannot be qualitatively identified. The library construction cost is high, and it is necessary to purchase high-purity standards and correct the retention index and mass spectrometry response. The instruments are expensive and the maintenance is complicated, making them unsuitable for high-throughput screening in the field or for small and medium-sized enterprises. (4) In terms of machine learning, existing methods such as CNN and SVM rely on large-scale labeled data. However, the variety of seasoning foods is rich, the data acquisition cost is high, and the sample size is small, which leads to model overfitting and poor field adaptability. Traditional spectral interpretation methods lack an effective mathematical model for the nested structure of "mixtures within mixtures", and cannot fully distinguish the essential differences between "natural spectra vs. artificial spectra", and lack a robust extraction mechanism for multi-scale features. Non-targeted LC-MS / GC-MS combined with multivariate statistics can reveal the differential metabolites between "natural and artificial", but it also faces the challenges of a small number of clearly labeled samples, batch drift, and incomplete libraries.

[0004] Therefore, there is an urgent need for a method, device, equipment, and medium for identifying the source of flavor in seasoned foods to address the shortcomings of existing technologies. Summary of the Invention

[0005] The purpose of this invention is to propose a method, device, equipment and medium for identifying the flavor source of seasoning foods, so as to solve the bottlenecks of retention time drift, sample scarcity, strong equipment dependence and difficulty in interpreting results in the prior art, to ensure classification accuracy of ≥85%, while reducing labor and hardware costs.

[0006] On the one hand, to achieve the above objectives, the present invention provides a method for identifying the flavor source of seasoned foods, comprising the following steps:

[0007] S1. Use gas chromatography-mass spectrometry (GC-MS) to detect the flavor fingerprint data of the seasoning food by performing GC-MS on the seasoning food samples.

[0008] S2. Perform data enhancement processing on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0009] S3. Based on the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset and the flavor source discrimination model of the seasoning food sample to be tested, obtain the flavor quadrant map of the seasoning food sample to be tested. The flavor quadrant map of the seasoning food sample to be tested is the flavor source discrimination result of the seasoning food.

[0010] Optionally, S1, gas chromatography-mass spectrometry (GC-MS) is used to detect the flavor fingerprint data of the seasoned food sample, including:

[0011] Pre-process the seasoning food samples to obtain the pre-processed seasoning food samples;

[0012] Gas chromatography-mass spectrometry was performed on the pretreated seasoned food samples to obtain total ion chromatogram data of the seasoned food samples.

[0013] Preprocessing is performed on the total ion chromatogram data of the seasoned food samples to extract the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food.

[0014] Optionally, S2, data enhancement processing is performed based on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset, including:

[0015] The retention time of the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food was calibrated to obtain standard gas chromatography-mass spectrometry flavor fingerprint data.

[0016] Based on the standard gas chromatography-mass spectrometry flavor fingerprint data, a food matrix library and a flavor library were constructed.

[0017] Data enhancement processing is performed based on the food matrix spectral library and the flavor spectral library to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0018] Optionally, the retention time of the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food is calibrated to obtain standard gas chromatography-mass spectrometry flavor fingerprint data, including:

[0019] We selected a mixture of n-alkane standards as internal standards and obtained the original retention time data corresponding to the internal standards.

[0020] Based on the original data of the retention time corresponding to the internal standard, local extremum detection combined with dynamic intensity threshold is used to obtain the effective internal standard peak table and the corresponding retention time information;

[0021] Based on the effective internal standard peak table and the corresponding retention time information, a target mapping function is established;

[0022] The gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food is segmented and time-calibrated in combination with the target mapping function to obtain initial standard gas chromatography-mass spectrometry flavor fingerprint data.

[0023] The calibration error was assessed based on the initial standard gas chromatography-mass spectrometry flavor fingerprint data, and standard gas chromatography-mass spectrometry flavor fingerprint data was obtained.

[0024] Optionally, data enhancement processing is performed based on the food matrix library and the flavor library to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset, including:

[0025] Matrix spectra and flavor spectra were obtained based on the food matrix spectrum library and the flavor spectrum library, respectively.

[0026] The matrix spectrum and the flavor spectrum are mixed and simulated to obtain a basic mixed spectrum;

[0027] Data augmentation processing is performed based on the basic mixed spectrum to obtain an initial gas chromatography-mass spectrometry flavor fingerprint enhancement dataset, which includes an initial training set, an initial validation set, and an initial test set of gas chromatography-mass spectrometry flavor fingerprint data.

[0028] Based on the initial training set of the gas chromatography-mass spectrometry flavor fingerprint data, combined with the food matrix spectral library and the flavor spectral library, a validation set of the gas chromatography-mass spectrometry flavor fingerprint data is obtained.

[0029] The initial training set, validation set, and initial test set of the gas chromatography-mass spectrometry flavor fingerprint data are obtained as the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0030] Optionally, S3, based on the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset and the flavor source discrimination model of the seasoning food sample to be tested, obtain the flavor quadrant map of the seasoning food sample to be tested, including:

[0031] The gas chromatography-mass spectrometry flavor fingerprint enhancement dataset was used for model training to obtain a flavor source discrimination model;

[0032] The sample of the seasoning food to be tested was subjected to gas chromatography-mass spectrometry (GC-MS) to obtain the GC-MS flavor fingerprint data of the seasoning food to be tested.

[0033] The retention time of the gas chromatography-mass spectrometry flavor fingerprint data of the food to be tested is calibrated to obtain the standard gas chromatography-mass spectrometry flavor fingerprint data of the food to be tested.

[0034] Based on the standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested, the flavor source discrimination model is used to obtain the flavor quadrant map of the seasoning food sample to be tested.

[0035] Optionally, based on the standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested, the flavor source discrimination model is used to obtain a flavor quadrant map of the seasoning food sample to be tested, including:

[0036] The standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested is input into the flavor source discrimination model to obtain the flavor source discrimination result of the seasoning food to be tested;

[0037] The flavor source discrimination results of the tested seasoned food are subjected to probability mapping to obtain the mapping results of the flavor source discrimination results;

[0038] The mapping results based on the flavor source discrimination results are visualized through a flavor quadrant diagram to obtain the flavor quadrant diagram of the seasoned food sample to be tested.

[0039] Secondly, to achieve the above objectives, the present invention provides a flavor source discrimination device for seasoned foods, comprising: a sample processing module, a data augmentation module, and a discrimination analysis module;

[0040] The sample processing module is used to perform gas chromatography-mass spectrometry detection on the seasoning food sample to obtain gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food.

[0041] The data enhancement module is used to perform data enhancement processing based on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0042] The discriminant analysis module is used to obtain the flavor quadrant map of the seasoning sample to be tested by combining the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset with the flavor source discrimination model of the seasoning sample to be tested. The flavor quadrant map of the seasoning sample to be tested is the flavor source discrimination result of the seasoning.

[0043] Thirdly, to achieve the above objectives, the present invention provides an electronic device, comprising: one or more processors; and a storage device having stored one or more programs thereon, which, when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation of the first aspect.

[0044] Fourthly, to achieve the above objectives, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method as described in any implementation of the first aspect.

[0045] Compared with the closest existing technology, the present invention has the following advantages:

[0046] This invention achieves rapid, accurate, and robust differentiation between natural extracts and artificial additives without requiring prior knowledge of the specific chemical composition of flavoring substances in seasoning foods. Through a closed-loop design of "spectral acquisition and data preprocessing + data augmentation and classification + model visualization," it significantly outperforms traditional GC-MS analysis and existing machine learning solutions, possessing comprehensive advantages such as high accuracy, low sample size, strong robustness, and ease of interpretation. Compared to existing mainstream methods, this invention offers the following specific technical advantages:

[0047] (1) High accuracy and robustness: The accuracy on the pure test set is 86-98%, and the accuracy is still 89.5% when there are ≤10 training samples per class; the retention time drift RMSE is reduced from 8.41 min to 0.046 min, and the model performance does not degrade when 4 new flavors are added (the conventional method decreases by 5-10%).

[0048] (2) Low sample and equipment dependence: The original dataset can be expanded by 10-100 times through data augmentation. High-resolution mass spectrometry is not required. Ordinary single quadrupole GC-MS can be used, saving 30% of hardware investment.

[0049] (3) High efficiency and easy operation: The time from sampling to result is less than 60 minutes. The visualization quadrant chart reduces the manual verification time by 90%. No professional flavor chemist is required to operate it.

[0050] (4) Wide applicability: It can be extended to food, tobacco, daily chemical and other fields, supports incremental learning to deal with new artificial flavors, and helps enterprises' QC system to connect with regulatory agencies for on-site screening.

[0051] (5) Technical benefits: For the first time, the identification of “natural vs. artificial” flavors in complex mixtures by GC-MS without prior knowledge was realized, breaking through the bottleneck of traditional peak-library comparison; piecewise linear RT calibration and data augmentation together endow the model with scale invariance across batches, devices and dilutions; the confirmatory spectrum presents the results as a flavor quadrant diagram.

[0052] (6) Economic benefits: Enterprises can reduce manual analysis workload by more than 80%; no need to purchase additional high-resolution or TOF instruments, saving 25-40% of hardware investment; supports direct detection of commercially available diluted beer, reducing pretreatment consumables and labor costs by ≥60%.

[0053] (7) Social benefits: The scheme can serve as an identification tool for the food, beverage, and flavor and fragrance industries, reducing reliance on senior flavor chemists and alleviating the shortage of professional talent; at the same time, it strengthens the authenticity of product labels, helps to combat adulteration and substandard products, and significantly enhances consumer trust and corporate brand reputation. Attached Figure Description

[0054] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0055] Figure 1 This is a flowchart illustrating a method for determining the flavor source of a seasoned food according to an embodiment of the present invention;

[0056] Figure 2 An overall flowchart for flavor source identification is provided for embodiments of the present invention;

[0057] Figure 3 This is a comparison chart of the saturated alkane curves under condition A and condition B proposed in this embodiment of the invention;

[0058] Figure 4 This is a comparison chart of the saturated alkane curve under condition A and the corrected saturated alkane curve under condition B, as proposed in the embodiments of the present invention.

[0059] Figure 5 This is a comparison chart of the original curve of the actual sample under condition B and the corrected curve of the actual sample under condition B, as proposed in the embodiments of the present invention.

[0060] Figure 6 A comparison chart of the actual sample curve under condition A and the actual sample corrected curve under condition B is provided for embodiments of the present invention.

[0061] Figure 7 This is a schematic diagram of the network architecture of the flavor source discrimination model proposed in an embodiment of the present invention;

[0062] Figure 8 The training results of the four-class classification model proposed in this embodiment of the invention are shown in the figure, where (a) is the accuracy curve of the training set and the test set, (b) is the loss curve of the training set and the test set, and (c) is the confusion matrix;

[0063] Figure 9 The present invention provides comparative results of model training methods in its embodiments.

[0064] Figure 10 A flavor quadrant diagram is proposed for embodiments of the present invention;

[0065] Figure 11 This is a schematic diagram of a flavor source discrimination device for seasoned foods according to an embodiment of the present invention;

[0066] Figure 12 This is a schematic diagram of the structure of the electronic device proposed in an embodiment of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0068] The terminology used in the embodiments section of this invention is for the purpose of explaining specific embodiments of the invention only, and is not intended to limit the invention.

[0069] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for determining the source of flavor in seasoned foods, specifically including the following steps:

[0070] S1. Use gas chromatography-mass spectrometry (GC-MS) to detect the flavor fingerprint data of the seasoning food by performing GC-MS on the seasoning food samples.

[0071] This step involves preprocessing the flavored food samples, such as sampling and extraction, and then sending the processed samples into a gas chromatography-mass spectrometry (GCMS) instrument. The instrument separates and detects flavor substances in the samples, generating a total ion chromatogram containing key information such as the retention time and ion intensity of each flavor component. After baseline correction to remove noise interference, effective feature segments are extracted and dimensions are unified, and samples from the same process are normalized to eliminate minor fluctuations. Thus, the GCMS flavor fingerprint data of the flavored food is extracted, providing an initial basis for subsequent data enhancement and discriminant analysis.

[0072] S2. Perform data enhancement processing on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0073] Because retention times during GCMS detection are easily affected by factors such as instrument status, ambient temperature, and column aging, they can fluctuate, leading to differences in retention times for the same flavor compound across different batches, thus affecting data comparability. This step employs a n-alkane segmental mapping calibration method to achieve accurate correction of retention times. Based on this, data augmentation is performed by randomly selecting multiple spectra from existing flavor category and food matrix libraries, which can expand the original dataset by tens to hundreds of times, addressing the modeling challenges posed by sample scarcity and batch variations.

[0074] S3. Based on the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset and the flavor source discrimination model of the seasoning food sample to be tested, obtain the flavor quadrant map of the seasoning food sample to be tested. The flavor quadrant map of the seasoning food sample to be tested is the flavor source discrimination result of the seasoning food.

[0075] This step uses the GC-MS flavor fingerprint enhancement dataset as a basis to train a flavor source discrimination model. Then, the flavor food samples to be tested are processed according to the detection preprocessing in step S1 and the time calibration process in step S2, and then input into the model to obtain the probability vectors of their natural / artificial and category dimensions. The high-dimensional probabilities are mapped into two-dimensional coordinates to generate an intuitive flavor quadrant map. This quadrant map is the flavor source discrimination result of the sample to be tested, which is convenient for rapid screening.

[0076] In summary, taking flavored foods (such as beer) as an example, steps S1 to S3 begin with sample collection. First, GC-MS is used to obtain total ion flow map data of the flavored food samples, including data on original beer and flavorings. Then, preprocessing operations such as baseline correction and retention time calibration are performed on the raw data to obtain standardized flavor fingerprint data. Based on this data, a food matrix spectral library and a flavor spectral library are constructed. Food matrix data and flavor fingerprint data are randomly acquired, and data augmentation is performed through spectral mixing simulation and noise injection to expand the training dataset. Next, the augmented dataset is input into a machine learning network (bidirectional GRU architecture) to train a discriminant model. Finally, a visual discriminant result is output through a flavor quadrant diagram, such as... Figure 2 As shown in the figure, this process is applicable to the identification of flavor sources in various types of condiments. It effectively solves the problems of retention time drift, sample scarcity, and insufficient accuracy in traditional flavor source identification methods. It does not rely on expensive high-resolution detection equipment, significantly reducing the cost of manual analysis and the hardware investment threshold. At the same time, it provides an intuitive visualization of the identification results through flavor quadrant diagrams, providing reliable technical support for the rapid and accurate identification of natural extracts and artificial additives in condiments.

[0077] As one possible implementation, in the above embodiments, step S1 may specifically include the following steps:

[0078] S1-1. Perform pretreatment on the seasoning food sample to obtain the pretreated seasoning food sample;

[0079] Sampling: Take 5-10 mL of seasoning food sample. If it is a gaseous sample such as flavored beer, it needs to be degassed by standing at 4℃ for 24 hours first, and then immediately transferred to a 20 mL headspace vial. Add 5-10 μL of internal standard solution (such as 100 μg / mL of 2-methyl-3-heptanone or 1 mg / mL of 2-octanol) to the headspace vial, and then seal the headspace vial with a cap with a tetrafluoroethylene (TFE) silica gel headspace diaphragm to complete the sample encapsulation.

[0080] Extraction: Solid phase microextraction (SPME) was used to extract flavor substances. The headspace vial was incubated at 40°C for 10 minutes, and then 50 / 30μm divinylbenzene / carboxylic acid / polydimethylsiloxane (DVB / CAR / PDMS) fibers were exposed to the sample headspace at 40°C for 20 minutes (fiber aging for 15 minutes) to obtain the pre-treated flavored food sample that can be used for subsequent detection.

[0081] S1-2. Perform gas chromatography-mass spectrometry detection on the pretreated seasoning food sample to obtain the total ion chromatogram data of the seasoning food sample;

[0082] A gas chromatography-mass spectrometry (GC-MS) system equipped with a 60m × 0.25mm inner diameter × 0.25μm DB-WAX MS capillary column was used to detect the pretreated samples. Detection parameters were set as follows: high-purity helium gas with a purity of 99.999% was used as the carrier gas, and the injection port temperature was maintained at 250℃. The furnace temperature program was set to an initial temperature of 40℃ and held for 3 minutes, followed by a temperature increase to 200℃ at a rate of 5℃ / min, then to 230℃ at a rate of 10℃ / min and held for 15 minutes, and finally to 250℃ at a rate of 20℃ / min and held for 4 minutes. The ionization mode was 70eV electron impact (EI) mode, the ion source temperature was set to 250℃, the transfer line temperature was set to 150℃, and the mass spectrometry signal was recorded using full scan mode (Full MS). Through this detection process, total ion chromatogram (TIC) data of the seasoned food samples were obtained.

[0083] S1-3. Based on the total ion chromatogram data of the seasoned food sample, preprocess the data to extract the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food.

[0084] The acquired total ion flow map (TIC) data were preprocessed sequentially: firstly, the airPLS (adaptive iterative reweighted penalized least squares) algorithm (regularization parameter λ=10) was used. 4 Remove TIC baseline drift and eliminate baseline interference; then perform global L2 normalization according to formula S. norm (t)=S(t) / |S(t)|2 This unifies the signal strength scale, ensuring data comparability, where S norm (t) represents the normalized signal intensity value, S(t) represents the original signal intensity, and |S(t)|2 represents the L2 norm of the original signal. Subsequently, according to the analysis requirements, an effective retention time window of 10.0-40.0 min is extracted, and data in invalid time intervals are removed. Finally, the extracted effective data is downsampled to a fixed dimension (e.g., 4096 points). Through the above series of preprocessing operations, gas chromatography-mass spectrometry flavor fingerprint data of seasoned foods containing information such as retention time of flavor substances and ion intensity are extracted.

[0085] In summary, steps S1-1 to S1-3 can effectively eliminate sample matrix interference, unify data scale, and screen out effective flavor information. This lays a reliable foundation for subsequent data stability improvement through retention time calibration and the construction of a discriminative model by combining data augmentation and machine learning. In turn, it helps to achieve the goal of quickly and accurately identifying the source of flavor without prior knowledge of the chemical composition of food flavor, while reducing reliance on complex equipment and manual analysis costs.

[0086] As one possible implementation, in the above embodiments, step S2 may specifically include the following steps:

[0087] S2-1. The retention time of the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food is calibrated to obtain standard gas chromatography-mass spectrometry flavor fingerprint data.

[0088] To eliminate retention time drift caused by factors such as column aging, carrier gas pressure fluctuations, and changes in the laboratory environment, and to ensure data consistency and comparability, retention time calibration was performed on the extracted gas chromatography-mass spectrometry (GC-MS) flavor fingerprint data of seasoned foods. A mixture of continuously carbon-numbered n-alkanes was used as internal standards. False peaks in the data were removed through local maximum detection combined with dynamic threshold filtering, accurately identifying the retention time information of the internal standard peaks. A local linear mapping function was established for adjacent internal standard peak pairs. This function was used to perform segment-by-segment correction of the original flavor fingerprint data, correcting retention time deviations under different detection conditions. Finally, standardized GC-MS flavor fingerprint data was obtained, laying a reliable foundation for subsequent spectral library construction and data enhancement.

[0089] S2-2. Based on the standard gas chromatography-mass spectrometry flavor fingerprint data, construct a food matrix library and a flavor library;

[0090] Based on calibrated standard gas chromatography-mass spectrometry flavor fingerprint data, two specialized spectral libraries were constructed according to data attributes. The food matrix library specifically includes standard flavor fingerprint data corresponding to pure food matrices without added flavors, focusing on presenting the inherent matrix characteristics of the food itself. The flavor library, on the other hand, categorizes standard flavor fingerprint data corresponding to various flavor substances according to flavor source (natural extracts, artificial additives) and specific flavor category, clearly distinguishing the characteristic differences between different flavors. The construction of these two libraries achieves structured storage of food matrix and flavor characteristics, providing accurate basic data support for subsequent spectral combination and simulation in the data enhancement process.

[0091] S2-3. Perform data enhancement processing based on the food matrix library and the flavor library to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0092] Based on the established food matrix and flavor spectral libraries, the dataset size was expanded through a series of data augmentation operations. First, spectral samples were randomly selected from the two libraries and linearly mixed in appropriate proportions to simulate the complex combination of food matrix and flavor substances. Then, controllable noise was injected into the mixed spectra, and appropriate intensity perturbations were applied to simulate signal fluctuations that might occur during actual detection, improving the robustness of the data. Finally, the generated simulated spectra were automatically labeled with corresponding category tags, and the dataset was divided into training, validation, and test sets according to preset proportions, forming a sufficiently large and comprehensive gas chromatography-mass spectrometry flavor fingerprint data augmentation dataset, effectively solving the model training bottleneck caused by the scarcity of original samples.

[0093] In summary, steps S2-1 to S2-3 first calibrate the retention time of the gas chromatography-mass spectrometry flavor fingerprint data of seasoned foods, and eliminate drift caused by factors such as column aging and instrument fluctuations through internal standard localization and mapping correction to obtain standardized flavor fingerprint data. Then, based on this standardized data, a food matrix spectral library focusing on the inherent characteristics of the food and a flavor spectral library distinguishing between natural / artificial sources and specific flavor categories are constructed. Finally, relying on the two types of spectral libraries, data enhancement is completed through spectral mixing simulation, noise injection, and intensity perturbation to generate a large-scale enhanced dataset. This process effectively solves the core problems of poor data consistency and sample scarcity in traditional flavor identification. It ensures the comparability of data under different detection scenarios through calibration, provides accurate support for data enhancement with structured spectral libraries, significantly improves the generalization ability and robustness of subsequent machine learning models through data expansion, reduces the dependence on a large number of real labeled samples, and lays a solid data foundation for the accurate identification of natural extracts and artificial additives in seasoned foods. At the same time, it optimizes the practicality and scenario adaptability of the identification technology.

[0094] As one possible implementation, in the above embodiments, step S2-1 may specifically include the following steps:

[0095] S2-1-1. Select a mixture of n-alkane standards as internal standards and obtain the original retention time data corresponding to the internal standards.

[0096] Internal standard compounds with continuous or uniform carbon number were selected as internal standards, such as a 100 ppm C10-C26 mixed standard with n-hexane as the solvent. This can accurately anchor the calibration nodes for different retention time intervals. Subsequently, synchronous detection was carried out under the same GC-MS detection conditions as the seasoning food samples. 1 μL of n-alkane mixed standard was taken and detected by full scan of the GC-MS system to obtain the original retention time data corresponding to each carbon number compound in the n-alkane mixed standard, providing an internal standard benchmark for subsequent calibration.

[0097] S2-1-2. Based on the original data of the retention time corresponding to the internal standard, local extremum detection combined with dynamic intensity threshold is used to obtain the effective internal standard peak table and the corresponding retention time information.

[0098] First, peak detection was performed on the acquired internal standard retention time raw data. A local maximum detection method with a 5-point window was used to identify the chromatographic peak positions of compounds with different carbon numbers in the n-alkane mixed standard. Simultaneously, a dynamic intensity threshold (based on the peak intensity mean μ minus 1.5 times the standard deviation σ) was introduced to filter out spurious peaks caused by instrument noise and matrix interference, avoiding the influence of invalid peaks on calibration. Finally, a retention time (RT) including the old column / pre-calibration retention time was generated. old ), Retention time after new column / calibration (RT) new The effective internal standard peak table with corresponding carbon number (CarbonNum) and peak area (PeakArea) clarifies the accurate retention time information of each calibration node, laying the data foundation for establishing the mapping function.

[0099] S2-1-3. Based on the effective internal standard peak table and the corresponding retention time information, establish the target mapping function;

[0100] Based on the obtained effective internal standard peak table, adjacent carbon peaks (such as C) are arranged in order of carbon number. k With C k+1 The time intervals are divided into independent calibration intervals. Because the retention time drift patterns differ across intervals, a local linear or low-order polynomial mapping function needs to be established for each interval. The calculation formula is as follows:

[0101] RT new =a k ・RT old +b k

[0102] This embodiment calculates the slope 'a' using the least squares method. k With intercept b k That is, slope a k =covariance (RT) old RT new ) / variance (RT) old ), intercept b k =mean (RT) new ) –a k • Mean (RT) old This ensures that the mapping function can accurately fit the drift pattern of retention time within the interval, thereby achieving differentiated calibration for different intervals.

[0103] S2-1-4. The gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food is segmented and time-calibrated in combination with the target mapping function to obtain the initial standard gas chromatography-mass spectrometry flavor fingerprint data.

[0104] First, the raw GC-MS flavor fingerprint data of the seasoned food is segmented according to the adjacent internal standard carbon peak intervals defined in step S2-1-3, so that each retention time point can be matched with the corresponding calibration interval. Then, the flavor fingerprint retention time data in each segment is substituted into the locally linear or low-order polynomial mapping function established for that interval to complete the segment-by-segment retention time correction, eliminate the time drift caused by column aging, carrier gas fluctuations, and environmental changes, and obtain the initial standard gas chromatography-mass spectrometry flavor fingerprint data.

[0105] S2-1-5. Evaluate the calibration error based on the initial standard gas chromatography-mass spectrometry flavor fingerprint data, and obtain standard gas chromatography-mass spectrometry flavor fingerprint data.

[0106] Using root mean square error (RMSE) and coefficient of determination (R²) 2 The initial standard data were evaluated for calibration effectiveness using indicators such as RMSE, which reflects the deviation between the retention time after calibration and the true value. 2 This reflects the goodness of fit of the mapping function; if the evaluation results meet the preset error requirements, such as RMSE decreasing to a low level and R... 2 If the value is close to 1, the accuracy of the initial standard data is confirmed, and it is used as the final standard GC-MS flavor fingerprint data; if the error does not meet the standard, return to step S2-1-2 to re-optimize the peak detection threshold or step S2-1-3 to adjust the mapping function parameters until the calibration effect meets the requirements of subsequent data augmentation and modeling.

[0107] like Figures 3-6 As shown, Figure 3 A comparison of the saturated alkane curves under conditions A and B shows a significant time difference between the corresponding peaks, confirming the retention time drift phenomenon. Figure 4 The curves of saturated alkanes under condition A and the corrected curves of saturated alkanes under condition B are compared. The corresponding peak times are completely aligned, which shows the effectiveness of the correction function F(t). Figure 5 The comparison between the original curve and the corrected curve of the actual sample under condition B shows that the corresponding peaks have time differences, highlighting the necessity of correction. Figure 6 The curves of the actual samples under condition A and the corrected curves of the actual samples under condition B are compared. The main corresponding peaks have no time difference, which verifies the reliability of the correction function again. Finally, the error of the main peak is reduced to 0.046 min after correction.

[0108] In summary, steps S2-1-1 to S2-1-5 first select a mixture of C10-C26 n-alkanes with consecutive carbon numbers as internal standards. Under the same conditions, gas chromatography-mass spectrometry is performed simultaneously with the seasoning food samples to obtain the original retention time data of the internal standards. Then, false peaks are eliminated by local extremum detection combined with dynamic intensity threshold filtering, and the effective internal standard peak table and corresponding retention time information are screened out. Subsequently, a local linear mapping function is constructed for adjacent effective internal standard peak pairs. The original flavor fingerprint data of the seasoning food is segmented and calibrated according to the retention time interval to obtain the initial standard data. Finally, the calibration error is evaluated by the root mean square error and the coefficient of determination until the error reaches the standard to obtain the final standard data. This process, through a closed-loop design of internal standard synchronous detection, precise peak screening, piecewise linear mapping, and error verification, effectively eliminates retention time drift caused by factors such as column aging, carrier gas fluctuations, and changes in the laboratory environment. It achieves standardization and unification of flavor fingerprint data, significantly improving data consistency and accuracy. This provides reliable basic data support for the subsequent construction of food matrix and flavor libraries, data augmentation, and machine learning model training, thereby ensuring the accuracy and stability of the distinction between natural extracts and artificial additives in seasoning foods.

[0109] As one possible implementation, in the above embodiments, step S2-3 may specifically include the following steps:

[0110] S2-3-1. Obtain matrix spectrum and flavor spectrum respectively based on the food matrix spectrum library and the flavor spectrum library;

[0111] Based on the established food matrix and flavor libraries, basic data were obtained through random sampling. Standard spectra of pure food matrices without added flavors were extracted from the food matrix libraries, such as 100 sets of commercially available unflavored beer spectra B={B1,…,B...} for flavored beer. 100 The spectrum only contains the inherent matrix characteristics of the food itself; 40 flavor spectra of corresponding categories were extracted from the flavor spectrum library, F={F1,…,F…} 40 Furthermore, this process clearly identifies the flavor source attributes (natural extracts or artificial additives) and specific flavor category information of the extracted spectra, ensuring the accuracy of category labeling for subsequent augmentation data and providing precise basic spectral material for mixing simulations. This step, through targeted access to two spectral libraries, accurately obtains the pure matrix and pure flavor paired spectra required for subsequent mixing simulations, laying the data foundation for recreating the matrix and flavor mixing system of realistic seasoned foods.

[0112] S2-3-2. Perform a mixing simulation of the matrix spectrum and the flavor spectrum to obtain a basic mixed spectrum;

[0113] For the obtained matrix spectrum (e.g., beer spectrum B) and pure flavor spectrum (e.g., flavor spectrum F), a basic mixture spectrum is constructed using a linear weighted mixing method. The specific formula is as follows:

[0114] M = α・B + (1-α)・F

[0115] Where M is the basic mixed spectrum, and α∈[0.1,0.9] represents the weighting coefficient. By adjusting α, different flavor addition amounts can be simulated in the context of seasoned food.

[0116] The mixing process essentially restores the complex spectral characteristics of the coexistence of matrix components and flavor components in real seasoned foods, avoiding the problem of deviating from the actual matrix caused by directly using a single pure spectrum for modeling, and finally generating a basic mixed spectrum with a real matrix background.

[0117] S2-3-3. Based on the basic mixed spectrum, perform data augmentation processing to obtain an initial gas chromatography-mass spectrometry flavor fingerprint enhancement dataset. The initial gas chromatography-mass spectrometry flavor fingerprint enhancement dataset includes an initial training set, an initial validation set, and an initial test set of gas chromatography-mass spectrometry flavor fingerprint data.

[0118] First, noise injection and intensity perturbation are applied to the basic mixed spectrum M: Gaussian noise or Poisson noise with controllable amplitude is injected, while an intensity perturbation of ±5% is applied to improve the robustness of the spectrum to actual detection interference. Then, combined with the natural / artificial labels of the flavor spectrum, category labels are automatically assigned to the enhanced spectrum. Finally, the sample size is expanded by a preset number, and the enhanced samples are divided according to a preset ratio of 8:1:1 to obtain an initial gas chromatography-mass spectrometry flavor fingerprint enhancement dataset containing initial training, initial validation, and initial test sets of gas chromatography-mass spectrometry flavor fingerprint data. This process simulates signal interference and fluctuation scenarios in actual detection, expanding the original scarce sample size by tens of times without the need for additional experiments to collect new samples. This not only enriches the data diversity but also improves the robustness of the spectrum to actual detection interference, providing basic data support for subsequent model training and initially alleviating the overfitting risk caused by insufficient samples in traditional machine learning.

[0119] S2-3-4. Based on the initial training set of the gas chromatography-mass spectrometry flavor fingerprint data, combined with the food matrix spectral library and the flavor spectral library, obtain the validation set of the gas chromatography-mass spectrometry flavor fingerprint data.

[0120] Based on the initial training set of gas chromatography-mass spectrometry flavor fingerprint data, combined with the constructed food matrix spectral library and flavor spectral library, food matrix samples and flavor samples in the library are determined by random sample selection. Flavors are added to the food matrix at a preset volume ratio range (0.1-5 parts per thousand) to construct model validation samples (optionally, a preset number of samples can be constructed). The original data of the validation set is collected using a preset data acquisition method (step S1), and then the original data is corrected using a preset data correction method (step S2-1) to obtain the validation set of gas chromatography-mass spectrometry flavor fingerprint data. This validation set can be extracted at a preset ratio (such as 20% of the initial training set data) for model validation during the model construction process according to actual needs.

[0121] S2-3-5. Obtain the initial training set, validation set and initial test set of the gas chromatography-mass spectrometry flavor fingerprint data as the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0122] Based on the initial training and test sets of the obtained gas chromatography-mass spectrometry (GC-MS) flavor fingerprint data, combined with the obtained validation set, the data is processed using a data integration and summarization method. This combines the three types of data to obtain an enhanced GC-MS flavor fingerprint dataset. This process integrates the data-enhanced initial training and test sets with a validation set that fits the actual scenario, forming a structurally complete and reliable enhanced dataset. This dataset possesses sufficient sample size and rich diversity, while the validation set ensures the accuracy of model evaluation. It effectively solves the core problems of scarce original labeled samples and insufficient scenario coverage in flavor identification of condiments, reduces reliance on large-scale real-world sample collection, lowers experimental costs and data acquisition barriers, and provides solid data support for the high generalization ability and robustness to detection fluctuations of subsequent flavor source discrimination models. This lays the foundation for the accurate and stable discrimination of natural extracts and artificial additives in condiments.

[0123] In summary, steps S2-3-1 to S2-3-5 first randomly extract pure matrix spectra containing only the inherent characteristics of the food and flavor spectra from the constructed food matrix spectral library and flavor spectral library, respectively; then, based on the composition and structure of the actual seasoned food matrix and flavor, perform linear mixing simulation on the two types of spectra with adjustable weights of 0.1-0.9 to generate a basic mixed spectrum that retains both the basic matrix characteristics and flavor-specific characteristics, and reproduces scenarios with different flavor addition concentrations; finally, inject controllable Gaussian noise or Poisson noise into the basic mixed spectrum and apply an intensity perturbation within the range of ±5%. This process simulates signal fluctuations in actual detection, automatically labels categories based on the original flavor spectrum information, and expands the data scale by repeating the above operations, dividing the data into an initial training set, an initial validation set, and an initial test set according to a preset ratio. To further improve the reliability of validation, a food matrix spectral library and a flavor spectral library are combined, and samples from these libraries are randomly selected to construct model validation samples at flavor volume additions of 0.1-5‰. After processing with preset data acquisition and correction methods, a dedicated validation set is obtained. Finally, the initial training set, the dedicated validation set, and the initial test set are integrated to form a complete gas chromatography-mass spectrometry flavor fingerprint enhancement dataset. This process, by accurately simulating the spectral structure and detection scenario of actual seasoned foods, solves the core pain points of scarce original labeled samples and insufficient scenario coverage in flavor identification of seasoned foods from the source. The generated augmented dataset has both sufficient sample size and rich diversity, and the data reliability is guaranteed by a dedicated validation set. It can not only significantly improve the generalization ability and robustness to detection fluctuations of subsequent machine learning models, but also greatly reduce the dependence on large-scale real sample collection, effectively reducing experimental costs and data acquisition thresholds, and laying a solid data foundation for the accurate and stable discrimination between natural extracts and artificial additives in seasoning foods.

[0124] As one possible implementation, in the above embodiments, step S3 may specifically include the following steps:

[0125] S3-1. Use the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset to train the model and obtain a flavor source discrimination model;

[0126] This step uses the GC-MS flavor fingerprint enhancement dataset as the training basis and employs a sequence modeling framework to construct the model, which includes an input layer, an encoding layer, a regularization layer, and an output layer. For example... Figure 7As shown, the input layer receives fixed-length or variable-length TIC vectors; in this implementation, the received vector dimension is 4096×1. The coding layer can use any sequence model such as bidirectional RNN, LSTM, GRU, Temporal-CNN, or Transformer to capture the preceding and following contextual information. In this embodiment, the first layer uses a 128×2 bidirectional gated recurrent unit (GRU) structure to simultaneously capture the forward and reverse temporal information of the TIC sequence, combined with Dropout. A regularization strategy of 0.2 is used to reduce the risk of overfitting and initially extract the contextual features of the sequence. The second layer adopts a 64×2 bidirectional GRU structure, which only outputs the final state features, further refining and compressing the features of the previous layer to focus on the key temporal information of the sequence. The regularization layer includes techniques such as residual connection, Dropout, and LayerNorm to prevent overfitting. In this embodiment, the ReLU activation function is used, which contains 64 neurons to perform nonlinear transformation on the features extracted by GRU, thereby enhancing the expressive power of the model. The output layer gives the natural / artificial or multi-class probabilities through activation functions such as Softmax and Sigmoid. In this embodiment, 4 neurons are set, and the probability distribution of four flavor categories (natural flower, natural tea, artificial flower, and artificial tea) is output through the Softmax activation function to achieve the classification and discrimination of flavor sources.

[0127] During training, the cross-entropy loss function combined with L2 regularization is used as the loss function, and the Adam optimizer is used to adjust the model parameters. K-fold cross-validation, early stopping or learning rate decay are used to prevent overfitting. Grid search, Bayesian optimization or evolutionary algorithms are used to optimize hyperparameters such as the number of GRU layers and the learning rate. Finally, a flavor source discrimination model that can stably output the probability of flavor source category is obtained.

[0128] like Figure 8 As shown, it presents the training results of a four-category model for classifying natural flowers, natural tea, floral essences, and tea essences. Figure 8 (a)- Figure 8 (b) It can be seen that the model achieves effective convergence within 20 epochs, the training set accuracy eventually reaches 100%, and the test set accuracy is stably maintained in the range of 92%-94%; the training loss monotonically decreases from 0.008 to below 0.004, and the test loss decreases synchronously from 0.020 and then remains at around 0.016. Figure 8 (c) shows that the recognition accuracy rates for the four categories of flowers, tea, flower essence, and tea essence are 93%, 98%, 92%, and 86%, respectively, demonstrating excellent recognition performance for each category. By combining Dropout (0.2) regularization and early stopping mechanism, the model effectively suppresses overfitting and exhibits strong generalization ability on unseen data, making it accurate for four-category prediction of natural / artificial flower tea.

[0129] like Figure 9As shown, this diagram presents a comparison of ROC curves for different model training methods in four classification tasks: natural flowers, natural tea, artificial flowers, and artificial tea. The horizontal axis represents the false positive rate (FPR), and the vertical axis represents the true positive rate (TPR). Each curve is the macro-average ROC under a "one-to-many" approach, calculated using a One-vs-Rest strategy and then averaged. The gray diagonal line represents the random guess baseline, and the area under the curve (AUC) is 0.50. The bidirectional GRU model proposed in this embodiment is represented by a solid line, achieving an AUC of 0.98. The reference traditional models (XGBoost, SVM, Random Forest, Linear Regression, and AdaBoost) are represented by dashed lines, with AUCs ranging from 0.63 to 0.69. The ROC curve of this bidirectional GRU model is closest to the upper left corner, demonstrating stronger discriminative ability in "natural vs. artificial" and category segmentation tasks. When FPR=5%, its TPR reaches 92%, while the control model's TPR is less than 60% at the same FPR. It can maintain a high detection rate with an extremely low false alarm rate, meeting the high sensitivity requirements of commodity sampling inspection. At the same time, it still has good generalization performance for boundary samples with low fragrance content or large interference from natural matrices, verifying the rationality of the bidirectional GRU network design. It is significantly better than traditional methods and can meet the high sensitivity requirements for identifying the authenticity of flower tea.

[0130] S3-2. Perform gas chromatography-mass spectrometry detection on the sample of the seasoning food to be tested to obtain gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested;

[0131] The samples of the seasoning food to be tested were pretreated according to the training sample procedure. After headspace incubation and SPME extraction, the total ion current chromatographic data were obtained by detection through the GC-MS system. After baseline correction, normalization and other preprocessing, the gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested were extracted.

[0132] S3-3. Perform retention time calibration on the gas chromatography-mass spectrometry flavor fingerprint data of the tested seasoning food to obtain standard gas chromatography-mass spectrometry flavor fingerprint data of the tested seasoning food.

[0133] To ensure consistency between the test sample data and the model training data, the retention time of the original flavor fingerprint data of the test sample was calibrated using the same method as the training data calibration. Specifically, the C10-C26 n-alkanes mixed standard internal standard method was used. After spurious peak filtering and construction of a local linear mapping function, the original flavor fingerprint data of the test sample was calibrated in segments to eliminate drift caused by instrument fluctuations and other factors, thus obtaining standard flavor fingerprint data.

[0134] S3-4. Based on the standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested, the flavor source discrimination model is used to obtain the flavor quadrant map of the seasoning food sample to be tested.

[0135] This step inputs the calibrated gas chromatography-mass spectrometry flavor fingerprint data of the tested seasoning food into a trained flavor source discrimination model. The model extracts the temporal and categorical features of the sample through an encoding layer, and outputs a probability vector of natural / artificial source and specific flavor category after processing by a fully connected layer. This high-dimensional probability vector is then mapped to two-dimensional coordinates, and the Euclidean distance from the sample point to the origin is calculated and combined with a preset threshold to create a flavor quadrant diagram. Based on the position of the sample in the quadrant diagram, its flavor source can be intuitively determined as either a natural extract or an artificial additive, and the specific flavor category can be clearly identified. This flavor quadrant diagram is the final discrimination result of the flavor source of the tested seasoning food, achieving visualization and precision of the identification results.

[0136] In summary, steps S3-1 to S3-4 first use the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset as a basis to train a flavor source discrimination model with stable classification ability. Then, the test seasoning food samples undergo the same preprocessing, GC-MS detection, baseline correction, and normalization as the training samples to extract the original flavor fingerprint data. Next, the n-alkane mixed standard segmented calibration method is used to eliminate retention time drift and obtain standardized test data with the same format as the training data. Finally, the standard data is input into the trained discrimination model. After time-series feature extraction and category probability calculation, the high-dimensional probability vector is mapped to a flavor quadrant map as the final discrimination result. This process effectively addresses the core issue of scarce original labeled samples by enhancing the dataset. The unified calibration mechanism eliminates data bias caused by instrument fluctuations and column aging. The bidirectional GRU model accurately captures the temporal characteristics of flavor fingerprints, significantly improving the accuracy of flavor source identification and model generalization ability in seasoned foods, enhancing robustness to complex matrices and detection fluctuations, and providing intuitive visualization of the identification results through flavor quadrant diagrams. This greatly reduces the professional threshold and time cost of manual analysis, and eliminates the need for expensive equipment such as high-resolution mass spectrometry, providing reliable technical support for the rapid and efficient identification of natural extracts and artificial additives.

[0137] As one possible implementation, in the above embodiments, step S3-3 may specifically include the following steps:

[0138] S3-3-1. Input the standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested into the flavor source discrimination model to obtain the flavor source discrimination result of the seasoning food to be tested;

[0139] The preprocessed, retention-time-calibrated, and format-consistent standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested is used as input parameters into a trained and converged flavor source discrimination model, such as a bidirectional GRU architecture model. This model is built on a sequence modeling framework, capturing the temporal contextual features of the spectra through encoding layers such as bidirectional GRU and Temporal-CNN. After regularization layers suppress overfitting, the output layer's Softmax activation function outputs a probability distribution vector p=[p1,p2,p3,p4] corresponding to four categories: natural flowers, natural tea, artificial flowers, and artificial tea. This probability vector is the core discrimination result of the flavor source of the seasoning food to be tested, directly reflecting the confidence level of the sample belonging to each flavor source category.

[0140] S3-3-2. Perform probability mapping on the flavor source discrimination results of the seasoned food to be tested, and obtain the mapping results of the flavor source discrimination results;

[0141] A two-dimensional mapping is performed based on the obtained category probability vectors to transform high-dimensional probability information into intuitive coordinate data. The specific mapping rule is: Horizontal axis X = (p... nat_tea +p art_tea )-(p nat_flower +p art_flower ), used to characterize the differences in category dimensions between tea and flower tea; the vertical axis Y = (p nat_flower +p nat_tea )-(p art_flower +p art_tea ), used to characterize the differences in the source dimensions between natural and artificial sources; where p nat_tea p represents the probability of natural tea. art_tea Let p be the probability of artificially produced tea. nat_flower Let p be the probability of a natural flower. art_flower The probability of artificial flower planting is calculated; simultaneously, the Euclidean distance from the sample point to the origin is calculated. As an auxiliary basis for judgment, it is also clear that the judgment threshold of the Euclidean distance should be flexibly set according to the actual detection scenario, food matrix type and flavor characteristics. For example, when the calculated Euclidean distance is less than the set threshold (such as 0.1), the corresponding sample is judged to be a pure matrix sample without additional flavor addition. Finally, a complete mapping result containing the sample's two-dimensional coordinates (X,Y) and the corresponding Euclidean distance is obtained.

[0142] S3-3-3: The mapping result based on the flavor source discrimination result is visualized through the flavor quadrant diagram to obtain the flavor quadrant diagram of the seasoned food sample to be tested;

[0143] The quadrant diagram uses the horizontal axis X (category dimension) and the vertical axis Y (source dimension) as coordinate axes to divide the sample into four quadrants, clearly defining the physical meaning of each quadrant. The two-dimensional coordinates (X, Y) of the sample are labeled as data points on the quadrant diagram. Simultaneously, the diagram delineates the pure matrix region (the area surrounding the origin corresponding to D<0.1) and the confidence boundaries for each category, making the flavor source of the sample readily apparent. This flavor quadrant diagram transforms abstract probability discrimination results into intuitive visual graphics, allowing for rapid deriving of discrimination conclusions without the need for professional interpretation, facilitating efficient screening through integration with enterprise QC systems.

[0144] like Figure 10 As shown, the positive X-axis represents a high degree of naturalness, and the negative X-axis represents a high degree of artificiality. The positive Y-axis represents a strong floral flavor, and the negative Y-axis represents a strong tea flavor. The area within the threshold circle represents a flavorless pure matrix, such as pure beer. Sample 1 falls in the first quadrant (jasmine flavor quadrant), indicating that this sample is a natural jasmine flavored beer. Sample 1 is far from the origin of the graph, indicating a strong jasmine flavor. The pie chart shows that the floral flavor of Sample 1 has 95% similarity to the standard data of floral flavor 1 in the database, and low similarity to the standard data of floral flavor 2 and floral flavor 3 in the database. Samples 2-5 fall in the second quadrant (floral tea flavor quadrant), indicating that these samples are natural jasmine tea flavored beers. The farther the sample is from the origin of the graph, the stronger the jasmine tea flavor. Sample 6 falls in the third quadrant (floral tea flavor quadrant), indicating that this sample is a beer with artificially added jasmine tea flavor. Sample 7 falls in the fourth quadrant (floral flavor quadrant), indicating that this sample is a beer with artificially added jasmine flavor.

[0145] In summary, steps S3-3-1 to S3-3-3 first input the standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested into the flavor source discrimination model to obtain discrimination results containing the probability distribution of various flavor sources; then, probability mapping is performed on the results to convert the high-dimensional probability into two-dimensional coordinates of natural and artificial source dimensions and specific flavor category dimensions; finally, a flavor quadrant diagram is constructed based on this coordinate to visualize the discrimination results. This process accurately distinguishes between natural extracts and artificial additives and specific flavor categories using the model, while making the abstract results intuitive through probability mapping and quadrant diagrams, significantly reducing the professional threshold for manual analysis. It ensures the accuracy of the identification results while improving readability and ease of use, providing strong technical support for the efficient and accurate determination of flavor sources in seasoning foods.

[0146] This invention discloses an embodiment of a device for determining the flavor source of seasoned foods, which is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0147] like Figure 11As shown, a flavor source discrimination device for seasoned food in this embodiment includes: a sample processing module, a data augmentation module, and a discrimination analysis module;

[0148] The sample processing module is used to perform gas chromatography-mass spectrometry detection on the seasoning food sample to obtain gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food.

[0149] The sample processing module, as the basic data acquisition unit of the device, typically includes a gas chromatography-mass spectrometry (GC-MS) system, supporting sample pretreatment equipment (such as an extraction device), and a data preprocessing sub-component. Upon receiving a flavored food sample, the sample pretreatment equipment first removes matrix interference and enriches flavor compounds. The processed sample is then introduced into the GC-MS system. Through the instrument's chromatographic separation and mass spectrometric detection functions, a total ion chromatogram is generated. The data preprocessing sub-component performs baseline correction, effective feature segment extraction, and intra-category normalization, rapidly purifying the data and obtaining GC-MS flavor fingerprint data. This provides a stable and unified basic data source for the data enhancement module, effectively eliminating raw data bias caused by instrument fluctuations and matrix interference.

[0150] The data enhancement module is used to perform data enhancement processing based on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset.

[0151] The data augmentation module is a key unit in the device for achieving data standardization and large-scale expansion. It integrates retention time calibration and data augmentation as dual core functions to ensure the stability and richness of subsequent modeling data. This module first receives the preprocessed raw data output from the sample processing module and performs retention time calibration: a mixture of n-alkanes with continuous or uniform carbon number intervals is selected as an internal standard. Retention time data of the internal standard is acquired under the same GC-MS detection conditions. False peaks are eliminated through local extremum detection combined with dynamic intensity thresholding to generate an effective internal standard peak table. A local linear mapping function is established based on adjacent carbon peak pairs. The retention times of the raw data are calibrated by substituting them into the function piecewise. The calibration is then performed using RMSE and R... 2 Errors were evaluated using various metrics to obtain calibrated and standardized GC-MS flavor fingerprint data, completely eliminating retention time drift caused by column aging and carrier gas fluctuations. Subsequently, data augmentation was performed based on the calibrated and standardized data: pure matrix and pure flavor spectra were randomly extracted from food matrix and flavor libraries, linearly mixed with adjustable weights to simulate complex matrix systems, Gaussian noise with controllable amplitude was injected, and ±5% intensity perturbation was applied to reduce detection fluctuations. Samples were automatically labeled with flavor category tags, and the original dataset was expanded by tens to hundreds of times to achieve the final high-quality GC-MS flavor fingerprint augmented dataset, addressing the model overfitting problem caused by sample scarcity and batch variations.

[0152] The discriminant analysis module is used to obtain the flavor quadrant map of the seasoning sample to be tested based on the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset and the flavor source discrimination model of the seasoning sample to be tested. The flavor quadrant map of the seasoning sample to be tested is the flavor source discrimination result of the seasoning.

[0153] The discriminant analysis module is the core decision-making and output unit of the device, responsible for model training, sample discrimination and visualization, and enabling accurate and efficient determination of flavor sources. This module first uses the augmented dataset output by the data augmentation module to train a flavor source discrimination model based on sequence modeling frameworks (such as bidirectional GRU and Temporal-CNN). Through regularization techniques such as residual connections and Dropout, combined with optimization strategies such as early stopping and hyperparameter optimization, the model's adaptability to complex matrices and unknown flavors is improved. For the seasoned food samples to be tested, the module first calls the standardized process of the sample processing module to obtain the raw GC-MS data, and then obtains the standard data through the retention time calibration logic of the data augmentation module. This standard data is then input into the trained discrimination model, which outputs a probability vector containing natural / artificial and specific flavor categories. Finally, the high-dimensional probability vector is transformed into two-dimensional coordinates through a probability mapping algorithm to generate a flavor quadrant map, which clearly marks the sample location, pure matrix region, and confidence boundary. This quadrant map is the final discrimination result, which can be directly connected to the enterprise QC system to achieve rapid, intuitive, and accurate screening of the flavor source of the sample to be tested, greatly reducing the cost of manual interpretation and reliance on professional talents.

[0154] In summary, the flavor source discrimination device for condiments achieves end-to-end discrimination from sample to result through the close collaboration of three modules: the sample processing module first performs gas chromatography-mass spectrometry (GC-MS) detection on the condiment samples to be tested and used for training to obtain basic flavor fingerprint data, providing raw data support for subsequent steps; the data augmentation module takes this raw data and generates an augmented dataset through operations such as event calibration, spectral library construction, hybrid simulation, and noise perturbation, solving the problem of scarce original samples and laying the foundation for model training; the discriminant analysis module trains the flavor source discrimination model with the augmented dataset, then performs inference on the standard data of the test samples after the same detection and calibration, and finally outputs a flavor quadrant diagram as the discrimination result. The entire device realizes a closed-loop operation of sample detection, data augmentation, model discrimination, and result visualization. It not only ensures the automation and coherence of the discrimination process through module collaboration, but also improves the model's generalization ability through data augmentation. At the same time, it effectively solves the problems of insufficient samples and unintuitive results in traditional discrimination, and has strong practicality and popular science value.

[0155] In this embodiment, the specific processing of a flavor source discrimination device for seasoned foods and its resulting technical effects can be referred to separately. Figure 1The relevant descriptions of steps S1, S2 and S3 in the corresponding embodiments will not be repeated here.

[0156] It should be noted that the implementation details and technical effects of each module and unit in the device provided in the embodiments of this disclosure can be referred to the description of other embodiments in this disclosure, and will not be repeated here.

[0157] The following is for reference. Figure 12 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing the electronic device of the present disclosure. Figure 12 The computer system 500 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0158] like Figure 12 As shown, the computer system 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the computer system 500. The processing device 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0159] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows computer system 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 A computer system 500 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0160] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0161] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0162] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0163] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 1The illustrated embodiments and their alternative implementations demonstrate a method for identifying the source of flavor in seasoned foods.

[0164] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0166] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units or modules do not necessarily limit the unit itself; for example, an acquisition module can also be described as "acquiring preset prompts, including modality fusion prompts, attention mechanism prompts, and / or time-related prompts."

[0167] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A method for identifying the source of flavor in seasoned foods, characterized in that, include: S1. Use gas chromatography-mass spectrometry (GC-MS) to detect the flavor fingerprint data of the seasoning food by performing GC-MS on the seasoning food samples. S2. Perform data enhancement processing on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset, including: The retention time of the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food is calibrated to obtain standard gas chromatography-mass spectrometry flavor fingerprint data, including: We selected a mixture of n-alkane standards as internal standards and obtained the original retention time data corresponding to the internal standards. Based on the original data of the retention time corresponding to the internal standard, local extremum detection combined with dynamic intensity threshold is used to obtain the effective internal standard peak table and the corresponding retention time information; Based on the effective internal standard peak table and the corresponding retention time information, a target mapping function is established; The gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food is segmented and time-calibrated in combination with the target mapping function to obtain initial standard gas chromatography-mass spectrometry flavor fingerprint data. The calibration error was evaluated based on the initial standard gas chromatography-mass spectrometry flavor fingerprint data, and standard gas chromatography-mass spectrometry flavor fingerprint data was obtained. Based on the standard gas chromatography-mass spectrometry flavor fingerprint data, a food matrix library and a flavor library were constructed. Data enhancement processing is performed based on the food matrix library and the flavor library to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset, including: Matrix spectra and flavor spectra were obtained based on the food matrix spectrum library and the flavor spectrum library, respectively. The matrix spectrum and the flavor spectrum are mixed and simulated to obtain a basic mixed spectrum; Data augmentation processing is performed based on the basic mixed spectrum to obtain an initial gas chromatography-mass spectrometry flavor fingerprint enhancement dataset, which includes an initial training set, an initial validation set, and an initial test set of gas chromatography-mass spectrometry flavor fingerprint data. Based on the initial training set of the gas chromatography-mass spectrometry flavor fingerprint data, combined with the food matrix spectral library and the flavor spectral library, a validation set of the gas chromatography-mass spectrometry flavor fingerprint data is obtained. The initial training set, validation set, and initial test set of the gas chromatography-mass spectrometry flavor fingerprint data are obtained as the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset; S3. Based on the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset and the flavor source discrimination model of the seasoning food sample to be tested, obtain the flavor quadrant map of the seasoning food sample to be tested. The flavor quadrant map of the seasoning food sample to be tested is the flavor source discrimination result of the seasoning food.

2. The method for determining the flavor source of a seasoned food according to claim 1, characterized in that, S1. Using gas chromatography-mass spectrometry (GC-MS) analysis on seasoning food samples to obtain GC-MS flavor fingerprint data of the seasoning foods, including: Pre-process the seasoning food samples to obtain the pre-processed seasoning food samples; Gas chromatography-mass spectrometry was performed on the pretreated seasoned food samples to obtain total ion chromatogram data of the seasoned food samples. Preprocessing is performed on the total ion chromatogram data of the seasoned food samples to extract the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food.

3. The method for determining the flavor source of a seasoned food according to claim 1, characterized in that, S3. Based on the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset and the flavor source discrimination model of the seasoning food sample to be tested, obtain the flavor quadrant map of the seasoning food sample to be tested, including: The gas chromatography-mass spectrometry flavor fingerprint enhancement dataset was used for model training to obtain a flavor source discrimination model; The sample of the seasoning food to be tested was subjected to gas chromatography-mass spectrometry (GC-MS) to obtain the GC-MS flavor fingerprint data of the seasoning food to be tested. The retention time of the gas chromatography-mass spectrometry flavor fingerprint data of the food to be tested is calibrated to obtain the standard gas chromatography-mass spectrometry flavor fingerprint data of the food to be tested. Based on the standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested, the flavor source discrimination model is used to obtain the flavor quadrant map of the seasoning food sample to be tested.

4. The method for determining the flavor source of a seasoned food according to claim 3, characterized in that, Based on the standard gas chromatography-mass spectrometry flavor fingerprint data of the tested seasoning food, the flavor source discrimination model is used to obtain the flavor quadrant map of the tested seasoning food sample, including: The standard gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food to be tested is input into the flavor source discrimination model to obtain the flavor source discrimination result of the seasoning food to be tested; The flavor source discrimination results of the tested seasoned food are subjected to probability mapping to obtain the mapping results of the flavor source discrimination results; The mapping results based on the flavor source discrimination results are visualized through a flavor quadrant diagram to obtain the flavor quadrant diagram of the seasoned food sample to be tested.

5. A device for determining the source of flavor in seasoned foods, using the method described in any one of claims 1-4, characterized in that, include: Sample processing module, data augmentation module, and discriminant analysis module; The sample processing module is used to perform gas chromatography-mass spectrometry detection on the seasoning food sample to obtain gas chromatography-mass spectrometry flavor fingerprint data of the seasoning food. The data enhancement module is used to perform data enhancement processing based on the gas chromatography-mass spectrometry flavor fingerprint data of the seasoned food to obtain a gas chromatography-mass spectrometry flavor fingerprint enhancement dataset. The discriminant analysis module is used to obtain the flavor quadrant map of the seasoning sample to be tested by combining the gas chromatography-mass spectrometry flavor fingerprint enhancement dataset with the flavor source discrimination model of the seasoning sample to be tested. The flavor quadrant map of the seasoning sample to be tested is the flavor source discrimination result of the seasoning.

6. An electronic device, characterized in that, include: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by one or more processors, implements the method as described in any one of claims 1-4.