Screening method of flavor compound for identification
Through a multi-step method of screening flavor compounds, combining odor activity value, SHAP value and consistency screening, and using machine learning model training and testing, the problem of complex screening of flavor compounds and inaccurate identification results in the existing Jinhua ham quality identification method is solved, achieving higher screening accuracy and model generalization ability.
Patent Information
- Application Number
- CN202411811312.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-28
AI Technical Summary
In the existing Jinhua ham quality identification method, the process of screening flavor compounds is complicated, resulting in large training volumes of models and inaccurate identification results, making it difficult to improve the training efficiency and identification accuracy of the model.
Through a multi-step screening method, including screening flavor compounds based on odor activity values and SHAP values, and calculating their consistency, and finally using machine learning models to train and test, ensuring that the selected compounds have significant contributions and high discrimination.
It improves the accuracy and reliability of flavor compound screening, ensures that the selected compounds can accurately distinguish samples from different years, and improves the robustness and generalization ability of the model.
Smart Images

Figure CN119724427A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of food identification, and in particular relates to a method for screening flavor compounds for identification. Background Art
[0002] The identification of the year or origin of food by flavor compound content has been widely used. Take Jinhua ham as an example. Jinhua ham is a geographical indication product in China. Jinhua ham originates from Jinhua City, Zhejiang Province. It has a long history and unique production process. It enjoys a high reputation in China and internationally for its unique flavor and quality. The current quality identification methods of Jinhua ham include the following: First, the flavor components in Jinhua ham are extracted by solid phase microextraction (SPME) technology, and then the characteristic fingerprint peaks of Jinhua ham are collected by gas chromatography-mass spectrometry (GC-MS), and the standard flavor fingerprint of Jinhua ham is established. The quality of ham is determined by fingerprint technology and principal component analysis. This identification method requires the collection of odor characteristic fingerprint peaks, and the operation process is complicated: Second, the model is trained by the content of flavor compounds to identify the year of ham. This process requires the collection of all flavor substances. Not only is the collection process complicated, but multiple flavor compounds will increase the amount of training required for the model, and will also lead to inaccurate identification results. If representative flavor compounds are screened out to improve the model training efficiency and subsequent identification accuracy, it has become an important issue currently faced. Summary of the invention
[0003] In view of this, the present invention aims to provide a method for screening flavor compounds for identification, in order to solve at least one of the above-mentioned technical problems.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0005] The first aspect of the present invention provides a method for screening flavor compounds for identification, comprising the following steps:
[0006] S1. Collect flavor compound data of samples from different years;
[0007] S2. screening out a first flavor compound data set according to the odor activity value of the flavor compound;
[0008] S3, filtering out a second flavor compound data set according to the SHAP value of the first flavor compound;
[0009] S4, calculating the consistency of each flavor compound in the second flavor compound data set, and selecting the second flavor compound data set as the identification flavor compound according to the consistency;
[0010] S5. Using the flavor compounds identified in S4 as discriminant feature values, using the flavor compound data of the samples in S1 to train multiple machine learning models, and judging the accuracy of the flavor compound screening based on the recognition accuracy of the machine learning models.
[0011] Furthermore, the S1 comprises the following steps:
[0012] S11, obtaining samples from different years, each year including a plurality of samples as a sample group, and using a gas chromatography-mass spectrometer to collect the content of flavor compounds as flavor compound data;
[0013] S12. Normalize the data of samples in the same group.
[0014] Furthermore, in said S2, flavor compounds whose odor activity values are greater than the activity value threshold are selected as the first flavor compound data set;
[0015] The activity threshold value ranges from 0.5 to 3.
[0016] Further, the S3 comprises the following steps:
[0017] S31, training an XGBoost model using the first flavor compound data set obtained in S2;
[0018] S32, calculating the SHAP value of each flavor compound data;
[0019] S33, selecting the first flavor compound data set whose SHAP value is greater than a SHAP threshold as the second flavor compound data set, where the SHAP threshold is in the range of 0.5-4;
[0020] Alternatively, the first flavor compound data set is sorted from high to low according to the SHAP values of the flavor compound data, and the first n flavor compound data are selected as the second flavor compound data set, where the value range of n is 2-6.
[0021] Further, the S4 comprises the following steps:
[0022] S41, calculating the consistency of each data in the second flavor compound data set;
[0023] S42. Sort the second flavor compound data set from low to high according to consistency, and select the first n flavor compound data as a data set for identifying flavor compounds, where the value range of n is 2-6.
[0024] Further, the S5 comprises the following steps:
[0025] S51, dividing the dataset for identifying flavor compounds in S1 into a training set and a validation set;
[0026] S52, using the training set data to train multiple machine learning models respectively;
[0027] S53. Use validation set data to test multiple machine learning models separately;
[0028] S54, calculating the accuracy of multiple machine learning models;
[0029] If the accuracy of all machine learning models is greater than the accuracy threshold, the flavor compound in the selected flavor compound identification data set is used as an identification compound;
[0030] Otherwise, the flavor compound data in the flavor compound identification data set is regarded as abnormal flavor compound data, at least one set of abnormal flavor compound data in the first flavor compound data set is deleted, and the process returns to step S3.
[0031] A second aspect of the present invention provides a method for identifying the age of food based on flavor compounds, comprising the following steps:
[0032] B1. Collect the content value of the identification compound of the sample to be identified;
[0033] The compound for identification is obtained by screening the flavor compound for identification according to the first aspect;
[0034] B2, inputting the content value of the identification compound collected in B1 into the machine learning model, and the machine learning model outputs the identification year of the sample to be identified;
[0035] The machine learning model is the machine learning model trained in the method for screening flavor compounds for identification described in the first aspect.
[0036] The third aspect of the present invention provides a device for identifying the age of food based on flavor compounds, characterized in that it comprises:
[0037] A collection module configured to collect the content value of the identification compound of the sample to be identified, where the identification compound is obtained by screening the identification flavor compound screening method described in the first aspect;
[0038] The analysis module is fully configured to receive the content value of the identification compound collected by the collection module, and output the identification year of the sample to be identified through a machine learning model. The machine learning model is the machine learning model trained in the method for screening flavor compounds for identification described in the first aspect.
[0039] The fourth aspect of the present invention provides a server, comprising at least one processor, and a memory communicatively connected to the processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the processor so that the at least one processor executes a method as described in any one of the first aspect or the second aspect.
[0040] A fifth aspect of the present invention provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, it implements any method described in the first aspect or the second aspect.
[0041] Compared with the prior art, the method for screening flavor compounds for identification described in the present invention has the following beneficial effects:
[0042] The method for screening flavor compounds for identification described in the present invention gradually screens out flavor compounds for identification through multiple steps, ensuring that the compounds finally screened out have a significant contribution to the flavor and have a high degree of discrimination, and uses a machine learning model for training and testing to ensure that the screened compounds can accurately distinguish samples from different years, thereby improving the accuracy and reliability of screening, and by comparing the accuracy of different models, ensuring that the screened compounds have high robustness and generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0044] Figure 1 This is a schematic diagram of the screening method according to an embodiment of the present invention;
[0045] Figure 2 A visualization diagram of the SHAP feature selection for identifying flavor compounds described in an embodiment of the present invention;
[0046] Figure 3 Schematic diagram of the distribution of two flavor compounds identified in the embodiments of the present invention. DETAILED DESCRIPTION
[0047] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0048] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0049] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0050] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0051] Embodiment 1:
[0052] like Figure 1 As shown, a method for screening flavor compounds for identification comprises the following steps:
[0053] S1. Collect flavor compound data of samples from different years;
[0054] S2. screening out a first flavor compound data set according to the odor activity value of the flavor compound;
[0055] S3, filtering out a second flavor compound data set according to the SHAP value of the first flavor compound;
[0056] S4, calculating the consistency of each flavor compound in the second flavor compound data set, and selecting the second flavor compound data set as the identification flavor compound according to the consistency;
[0057] S5. Using the flavor compounds identified in S4 as discriminant feature values, using the flavor compound data of the samples in S1 to train multiple machine learning models, and judging the accuracy of the flavor compound screening based on the recognition accuracy of the machine learning models.
[0058] The S1 comprises the following steps:
[0059] S11, obtaining samples from different years, each year including a plurality of samples as a sample group, and using a gas chromatography-mass spectrometer to collect the content of flavor compounds as flavor compound data;
[0060] S12. Normalize the data of samples in the same group.
[0061] In said S2, flavor compounds whose odor activity values are greater than the activity value threshold are selected as the first flavor compound data set;
[0062] The activity threshold value ranges from 0.5 to 3.
[0063] The S3 comprises the following steps:
[0064] S31, training an XGBoost model using the first flavor compound data set obtained in S2;
[0065] S32, calculating the SHAP value of each flavor compound data;
[0066] S33, selecting the first flavor compound data set whose SHAP value is greater than a SHAP threshold as the second flavor compound data set, where the SHAP threshold is in the range of 0.5-4;
[0067] Alternatively, the first flavor compound data set is sorted from high to low according to the SHAP values of the flavor compound data, and the first n flavor compound data are selected as the second flavor compound data set, where the value range of n is 2-6.
[0068] The S4 comprises the following steps:
[0069] S41, calculating the consistency of each data in the second flavor compound data set;
[0070] S42. Sort the second flavor compound data set from low to high according to consistency, and select the first n flavor compound data as a data set for identifying flavor compounds, where the value range of n is 2-6.
[0071] The S5 comprises the following steps:
[0072] S51, dividing the dataset for identifying flavor compounds in S1 into a training set and a validation set;
[0073] S52, using the training set data to train multiple machine learning models respectively;
[0074] S53. Use validation set data to test multiple machine learning models separately;
[0075] S54, calculating the accuracy of multiple machine learning models;
[0076] If the accuracy of all machine learning models is greater than the accuracy threshold, the flavor compound in the selected flavor compound identification data set is used as an identification compound;
[0077] Otherwise, the flavor compound data in the flavor compound identification data set is regarded as abnormal flavor compound data, at least one set of abnormal flavor compound data in the first flavor compound data set is deleted, and the process returns to step S3.
[0078] The following is an example of the screening of flavor compounds of Jinhua ham from different years:
[0079] S1. Collect flavor compound data of samples from different years;
[0080] 12 samples of Jinhua ham from different years were obtained. The harvesting time of the Jinhua ham collected in this experiment was fermentation for half a year (3 samples), fermentation for one year (3 samples), fermentation for two years (3 samples), and fermentation for three years (3 samples). The Jinhua ham samples were ground into powder after being frozen with liquid nitrogen, and 2g of Jinhua ham samples were taken in a 20ml sample bottle, and 3g of pure water was added to obtain the sample to be tested. The Jinhua ham samples to be tested from different years were measured using a gas chromatograph-mass spectrometer to collect raw data.
[0081] The chromatographic conditions were as follows: initial temperature 40°C, maintained for 5 min, then heated to 250°C at a rate of 3°C / min and maintained for 10 min. The carrier gas was helium, the gas flow rate was 1.0 mL / min, the split ratio was 5.0, and the injection chamber temperature was 250°C. The voltage of the electron ionization mass spectrometer was 70 eV, the quadrupole scanning range was 35-400 m / z, the ion source temperature was 200°C, the interface temperature was 250°C, the injection volume was 1 μL, and the solvent delay time was 3 min.
[0082] According to the above conditions, each sample was repeated three times, and a total of 36 sets of raw data were obtained.
[0083] Data processing
[0084] The data preprocessing step is to perform normalization processing on the flavor compound quantitative analysis data in the raw data after the raw data collection step. The normalization formula is as follows:
[0085]
[0086] In the above formula, x_new represents the normalized data, x represents the data before normalization, x_min represents the maximum value of the data, and x_min represents the minimum value of the data.
[0087] S2. screening out a first flavor compound data set according to the odor activity value of the flavor compound;
[0088] The initial screening step of flavor compounds after data normalization processing specifically includes the following steps: 1) screening out 54 flavor compounds under the condition of OAV>1; 2) performing secondary screening on the 54 flavor compounds to screen out compounds with significant differences in compound concentration content between groups and no significant differences within groups as flavor compounds for distinguishing the years of Jinhua ham, a total of 18 compounds.
[0089] The identified flavor compounds in the first flavor compound data set include: (E)-2-octen-1-ol, 1-nonanol, 1-octen-3-ol, 2,4-decadienal, 2-pentanone, 3-octanone, acetophenone, γ-nonalactone, γ-octanolactone, p-cresol, nonanal, octanol, octanoic acid, isovaleraldehyde, lauric acid, n-heptanol, n-decanoic acid and n-hexanol.
[0090] S3, filtering out a second flavor compound data set according to the SHAP value of the first flavor compound;
[0091] SHAP feature selection is a tool for explaining the predictions of machine learning models. The implementation steps are: 1) train the XGBoost model using the dataset; 2) calculate the SHAP value of each feature; 3) display the SHAP value through visualization methods (such as Figure 2 shown).
[0092] The distribution diagram of vintage samples and the identified flavor compounds they contain includes: 1) a bar chart of the content of each identified flavor compound and the year of the sample; 2) combining the identified flavor compounds in pairs and visualizing their content distribution in samples of different years.
[0093] The first flavor compound data set having a SHAP value greater than 1.5 may be selected as the second flavor compound data set;
[0094] The first flavor compound data set may also be sorted from high to low according to the SHAP values of the flavor compound data, and the top five flavor compound data may be selected as the second flavor compound data set.
[0095] S4, calculating the consistency of each flavor compound in the second flavor compound data set, and selecting the second flavor compound data set as the identification flavor compound according to the consistency;
[0096] Statistical methods such as ANOVA (analysis of variance) or t-test can be used to evaluate whether the concentrations of these compounds in the third year Jinhua ham are significantly different from those in samples from other years, calculate the consistency of each compound in the second flavor compound data set, and calculate the p-value.
[0097] Flavor compounds with p values greater than 0.05 were selected as identified flavor compounds;
[0098] The distribution diagram of vintage samples and the flavor compounds they contain includes: 1) a bar chart of the content of each identified flavor compound and the year of the sample; 2) combining the identified flavor compounds in pairs and visualizing their content distribution in samples of different years. Figure 3 shown.
[0099] Figure 3 The upper middle picture is a bar chart of the year content of decanoic acid, the middle picture is a bar chart of the year content of 1-octen-3-ol, and the lower picture is a scatter plot of the combined years of the two.
[0100] Combining the SHAP feature selection and the distribution results of vintage samples and the identified flavor compounds they contained, the identified flavor compounds were selected as 1-octen-3-ol and n-decanoic acid.
[0101] S5. Use the flavor compound identification data in S1 to train multiple machine learning models, and determine the accuracy of the flavor compound identification screening based on the recognition accuracy of the machine learning models.
[0102] Step 1: Randomly select a small amount of sample data from the two types of samples in each data set in proportion to form a test set, and use the other samples to form a training set. The training set and test set are used for training and testing the model in step 2, respectively.
[0103] Step 2: Train and test several Jinhua ham vintage identification models based on machine learning algorithms, and calculate and record the specific indicators of each model.
[0104] Step 3: Repeat steps 1 and 2 several times.
[0105] Step 4: Calculate the average value of the model-specific indicators to achieve the evaluation and identification of flavor compounds for the Jinhua ham vintage identification model.
[0106] The data set described in step 1 includes raw data, key compound data and identified flavor compound data. The test set, training set and cycle number settings described in step 1 and step 3 are shown in Table 1.
[0107] Table 1 Test set, training set and number of cycles settings
[0108]
[0109]
[0110] The training and testing process described in step 2 is: 1) using the training set data to train the year identification model; 2) calculating and recording the training evaluation indicators of the model; 3) using the test data set to test the year identification model obtained in 1); 4) calculating and recording the test evaluation indicators of the model.
[0111] The machine learning algorithm in step 2 includes: 1) logistic regression algorithm; 2) support vector machine algorithm; 3) naive Bayes algorithm; 4) decision tree algorithm. The specific evaluation index is model accuracy, the calculation formula is as follows, and the relevant parameters are shown in Table 2.
[0112]
[0113] Table 2 Model accuracy related parameters
[0114]
[0115] Step 3: Repeat steps 1 and 2 several times.
[0116] The validation indicators for flavor compound identification described in step 4 include: 1) identification feasibility; 2) algorithm universality; 3) effectiveness in simplifying high-dimensional complex raw data.
[0117] The model-specific indicator results described in step 4 are shown in Table 3.
[0118] Table 3 Model specific indicator results
[0119]
[0120] Regarding the verification index 1 (identification feasibility): the experimental accuracy of the selected identification flavor compounds in the year identification model based on logistic regression, support vector machine, naive Bayes and decision tree algorithm is above 90% for both the training set and the test set, and there is no significant decrease in the evaluation index relative to the original data, which verifies the feasibility of the selected identification flavor compounds for the identification of the year of Jinhua ham. In addition, compared with the original data and the selected identification flavor compounds, the average accuracy of the selected identification flavor compounds for training and testing is closer, indicating that it may have better generalization ability, which indirectly proves the feasibility of the selected identification flavor compounds for year identification.
[0121] Regarding the verification index 2 (algorithm universality): compared with the original data and the experimental results of the selected identified flavor compounds, the selected identified flavor compounds in the year identification model based on logistic regression, support vector machine, naive Bayes and decision tree algorithms, not only the experimental accuracy of the training set and the test set are both above 90%, but also the average accuracy of each model training and test is closer. This shows that the selected identified flavor compounds are generally applicable to the year classification model implementation of various machine learning algorithms, and the data has strong algorithm universality.
[0122] Regarding the verification indicator 3 (the effectiveness of simplifying high-dimensional complex original data): compared with the fitting phenomenon obtained from the original data and the selected identification flavor compounds experiment, the selected identification flavor compounds in the year identification model based on the decision tree algorithm increased the average test accuracy to more than 90%, which narrowed the accuracy indicators obtained by its training and testing, which reflects the effectiveness of the selected identification flavor compounds in simplifying high-dimensional complex original data.
[0123] Based on the evaluation and verification results obtained in step 4, the flavor compounds are identified and the appropriate model is selected based on the actual application scenario for the subsequent design of related equipment.
[0124] Use the above trained model as the year identification model.
[0125] This method of identifying flavor compounds has the following benefits:
[0126] Beneficial effects:
[0127] Through multiple steps (OAV value screening, SHAP value screening, consistency screening), flavor compounds are gradually screened and identified to ensure that the final screened compounds have a significant contribution to the flavor and have a high degree of discrimination.
[0128] Multi-model validation: Use multiple machine learning models for training and testing. By comparing the accuracy of different models, ensure that the screened compounds can accurately distinguish samples from different years, improve the accuracy and reliability of screening, and have high robustness and generalization ability.
[0129] Abnormal data processing: When the model accuracy does not meet the standard, the abnormal flavor compound data will be deleted and re-screened to ensure the stability and accuracy of the model.
[0130] Applicable to different samples: This method is not only suitable for Jinhua ham, but can also be applied to the screening of flavor compounds in other foods or products, and has wide applicability.
[0131] Flexibility: By adjusting the threshold and screening steps, it can be flexibly adjusted according to different needs and conditions to adapt to different research and application needs.
[0132] A method for training an identification model based on flavor compounds comprises the following steps:
[0133] A1. Collect flavor compound data of samples and normalize the data;
[0134] A2. Calculate the SHAP values of flavor compound data from different years, and sort the first flavor compound data set from high to low according to the SHAP values of the flavor compound data to form a sorting feature; and obtain identification compounds by screening using the above-mentioned flavor compound screening method for identification.
[0135] A3, using flavor compound data and ranking features to train a neural network model as a sample type identification model;
[0136] A4. Use the identification compound data to train a neural network model to obtain a year identification model. The identification compound is obtained by screening through the above-mentioned identification flavor compound screening method.
[0137] An identification method based on flavor compounds comprises the following steps:
[0138] The flavor compound data of samples to be identified in different years are collected and input into the identification model based on the flavor compounds to identify the year and type of the samples.
[0139] The identification model based on flavor compounds is trained by the above-mentioned identification model training method based on flavor compounds.
[0140] Embodiment 2:
[0141] A method for identifying the age of food based on flavor compounds comprises the following steps:
[0142] B1. Collect the content value of the identification compound of the sample to be identified;
[0143] The compounds for identification are obtained by screening the flavor compounds for identification described in Example 1;
[0144] B2, inputting the content value of the identification compound collected in B1 into the machine learning model, and the machine learning model outputs the identification year of the sample to be identified;
[0145] The machine learning model is the machine learning model trained in the flavor compound screening method for identification described in Example 1.
[0146] Embodiment three:
[0147] A device for identifying the age of food based on flavor compounds, comprising:
[0148] A collection module, which is configured to collect the content value of the identification compound of the sample to be identified, and the identification compound is obtained by screening the identification flavor compound screening method described in Example 1;
[0149] The analysis module is fully configured to receive the content value of the identification compound collected by the collection module, and output the identification year of the sample to be identified through the machine learning model. The machine learning model is the machine learning model trained in the method for screening flavor compounds for identification described in Example 1.
[0150] Embodiment 4:
[0151] A server includes at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to enable the at least one processor to execute the method described in Example 1 or Example 2.
[0152] Embodiment five:
[0153] A computer-readable storage medium stores a computer program, wherein the computer program implements the method described in Embodiment 1 or Embodiment 2 when executed by a processor.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
[0155] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for screening flavor compounds for identification, characterized in that: The following steps are involved: S1. Collect flavor compound data of samples from different years; S2. screening out a first flavor compound data set according to the odor activity value of the flavor compound; S3, filtering out a second flavor compound data set according to the SHAP value of the first flavor compound; S4, calculating the consistency of each flavor compound in the second flavor compound data set, and selecting the second flavor compound data set as the identification flavor compound according to the consistency; S5. Using the flavor compounds identified in S4 as discriminant feature values, using the flavor compound data of the samples in S1 to train multiple machine learning models, and judging the accuracy of the flavor compound screening based on the recognition accuracy of the machine learning models.
2. The method for screening flavor compounds for identification according to claim 1, characterized in that: The S1 comprises the following steps: S11, obtaining samples from different years, each year including a plurality of samples as a sample group, and using a gas chromatography-mass spectrometer to collect the content of flavor compounds as flavor compound data; S12. Normalize the data of samples in the same group.
3. The method for screening flavor compounds for identification according to claim 1, characterized in that: In said S2, flavor compounds whose odor activity values are greater than the activity value threshold are selected as the first flavor compound data set; The activity threshold value ranges from 0.5 to 3.
4. The method for screening flavor compounds for identification according to claim 1, characterized in that: The S3 comprises the following steps: S31, training an XGBoost model using the first flavor compound data set obtained in S2; S32, calculating the SHAP value of each flavor compound data; S33, selecting the first flavor compound data set whose SHAP value is greater than a SHAP threshold as the second flavor compound data set, where the SHAP threshold is in the range of 0.5-4; Alternatively, the first flavor compound data set is sorted from high to low according to the SHAP values of the flavor compound data, and the first n flavor compound data are selected as the second flavor compound data set, where the value range of n is 2-6.
5. The method for screening flavor compounds for identification according to claim 1, characterized in that: The S4 comprises the following steps: S41, calculating the consistency of each data in the second flavor compound data set; S42. Sort the second flavor compound data set from low to high according to consistency, and select the first n flavor compound data as a data set for identifying flavor compounds, where the value range of n is 2-6.
6. The method for screening flavor compounds for identification according to claim 1, characterized in that: The S5 comprises the following steps: S51, dividing the dataset for identifying flavor compounds in S1 into a training set and a validation set; S52, using the training set data to train multiple machine learning models respectively; S53. Use validation set data to test multiple machine learning models separately; S54, calculating the accuracy of multiple machine learning models; If the accuracy of all machine learning models is greater than the accuracy threshold, the flavor compound in the selected flavor compound identification data set is used as an identification compound; Otherwise, the flavor compound data in the flavor compound identification data set is regarded as abnormal flavor compound data, at least one set of abnormal flavor compound data in the first flavor compound data set is deleted, and the process returns to step S3.
7. A method for identifying the age of food based on flavor compounds, characterized in that: The following steps are involved: B1. Collect the content value of the identification compound of the sample to be identified; The compound for identification is obtained by screening the flavor compound for identification according to any one of claims 1 to 6; B2, inputting the content value of the identification compound collected in B1 into the machine learning model, and the machine learning model outputs the identification year of the sample to be identified; The machine learning model is a machine learning model trained in the method for screening flavor compounds for identification described in any one of claims 1-6.
8. A device for identifying the age of food based on flavor compounds, characterized in that: include: A collection module, which is configured to collect the content value of the identification compound of the sample to be identified, and the identification compound is obtained by screening the identification flavor compound screening method according to any one of claims 1 to 6; The analysis module is fully configured to receive the content value of the identification compound collected by the collection module, and output the identification year of the sample to be identified through a machine learning model, wherein the machine learning model is a machine learning model trained in the method for screening flavor compounds for identification described in any one of claims 1-6.
9. A server, characterized in that: It includes at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes the method described in any one of claims 1-6 or 7 or 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 6 or 7 or 8 is implemented.