Food flavor feature prediction method, device, electronic device and storage medium
Through the kernel density estimation method and the preset food flavor prediction model, combined with the correlation analysis method and the flavor scoring model, the flavor characteristics of the food are calculated, solving the high cost, low efficiency and complex operating procedures of the existing food flavor detection methods, and achieving accurate and rapid prediction of food flavor.
Patent Information
- Application Number
- CN202411454162.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-17
AI Technical Summary
The existing food flavor detection methods have problems such as high cost, low efficiency, complex operational procedures and in some cases it is difficult to fully reflect the true flavor of the food.
Through the kernel density estimation method and the preset food flavor prediction model, the flavor characteristics of the food to be tested were calculated based on the flavor score obtained by the first key component obtained by the correlation analysis method and the preset flavor score model.
Accurate and rapid prediction of food flavors are achieved, the efficiency of food flavor prediction is improved, and the high cost, low efficiency and complex operating procedures of existing methods are solved.
Smart Images

Figure CN118966484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of predicting food flavor, and in particular, to a method, device, electronic device and storage medium for predicting food flavor characteristics. Background Art
[0002] The Internet of Things technology can effectively combine hardware devices and artificial intelligence models, and has rich application potential in the food field. Advanced spectroscopic detection technologies such as chromatography-mass spectrometry and spectroscopy can conduct targeted and comprehensive analysis of flavor-related substances in food. On this basis, the Internet of Things technology can combine a variety of spectroscopic detection methods with artificial intelligence algorithm models to screen key components and their combinations that affect food quality and flavor from the huge components contained in food, and realize functions such as rapid detection of food flavor and quality evaluation.
[0003] However, existing food flavor detection methods based on multiple spectral detection have problems such as high cost, low efficiency, and complex operation procedures. The key components that affect food flavor are often complex and very trace, resulting in the challenge of identifying and detecting food flavors. It is difficult to fully simulate the complexity and subjectivity of human senses. Therefore, in some cases, existing food flavor detection methods may not be able to fully reflect the true flavor of food.
[0004] Therefore, in order to solve the technical problems of existing food flavor detection methods, such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the true flavor of food under certain circumstances, there is an urgent need for a food flavor characteristic prediction method, device, electronic device and storage medium. Summary of the invention
[0005] The purpose of the present application is to provide a method, device, electronic device and storage medium for predicting food flavor characteristics. By using a kernel density estimation method and a preset food flavor prediction model, the flavor characteristics of the food to be tested are calculated based on a first key component obtained by a correlation analysis method and a flavor score obtained by a preset flavor scoring model. The present application solves the problems of existing food flavor detection methods such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the true flavor of the food under certain circumstances. The present application can accurately and quickly predict the flavor characteristics of the food, thereby improving the prediction efficiency of the food flavor.
[0006] In a first aspect, the present application provides a method for predicting food flavor characteristics, comprising:
[0007] Obtaining component data and spectral data of the food to be tested;
[0008] According to the ingredient data, a correlation analysis method is used to calculate the first key component that affects the flavor of the food;
[0009] Inputting the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data;
[0010] Matching the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method to obtain a second key component that matches the flavor score;
[0011] The extended connected molecular fingerprint converted from the second key component is input into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0012] The food flavor characteristic prediction method provided in the present application can realize the prediction of food flavor. Through the kernel density estimation method and the preset food flavor prediction model, the flavor characteristics of the food to be tested are calculated according to the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor scoring model. The shortcomings of the existing food flavor detection methods, such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the true flavor of the food under certain circumstances, are solved. The food flavor characteristics can be predicted accurately and quickly, and the prediction efficiency of food flavor is improved.
[0013] Optionally, according to the ingredient data, a correlation analysis method is used to calculate the first key component affecting the flavor of the food, including:
[0014] By using a correlation analysis method, based on the ingredient data, a first key ingredient affecting the flavor of the food is calculated;
[0015] Combining the components in the component data in pairs to obtain multiple component combinations;
[0016] According to the combination of ingredients, a component network is constructed to extract the second key ingredient affecting the flavor of food from the combination of ingredients through the correlation analysis method;
[0017] The first key component and the second key component are determined as a first key component.
[0018] The food flavor characteristic prediction method provided in the present application can realize the prediction of food flavor. Through the correlation analysis method, the first key component that affects the food flavor is calculated, and a component network is constructed through the combination of components to extract the second key component that affects the food flavor from the combination of components. The food flavor is analyzed through the first key component of the combination of the first key component and the second key component, which is beneficial to improving the prediction efficiency of food flavor.
[0019] Optionally, the first key component affecting the food flavor is calculated based on the component data by a correlation analysis method, including:
[0020] Calculate the mean value and standard deviation of the content of each component in the component data;
[0021] Using the correlation analysis method, based on the content mean and the standard deviation, calculate the significant value of each of the components;
[0022] A single component whose significant value is less than a preset relevant threshold is extracted from the component data to obtain a first key component affecting the flavor of the food.
[0023] Optionally, a component network is constructed according to the component combination to extract a second key component affecting food flavor from the component combination by the correlation analysis method, including:
[0024] Taking individual components in the component data as nodes, constructing a component network;
[0025] When the component combination includes one of the first key components and one non-first key component, connecting the nodes corresponding to the two components in the component combination to obtain a connected component combination;
[0026] The connected component combination is regarded as a single component, so as to extract the connected component combination whose significant value is less than the preset correlation threshold from the connected component combination through the correlation analysis method, so as to obtain the second key component affecting the flavor of the food.
[0027] Optionally, matching the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method to obtain a second key component matching the flavor score comprises:
[0028] Using a Gaussian kernel function, a probability distribution graph of the key component content corresponding to each of the first key components and a probability distribution graph of the spectral score corresponding to the flavor score are plotted;
[0029] The correlation analysis method is used to match the key component content probability distribution map and the spectral score probability distribution map to obtain a second key component that matches the flavor score.
[0030] The food flavor characteristic prediction method provided in the present application can realize the prediction of food flavor. The probability distribution map of the key component content and the probability distribution map of the spectral score are matched by the kernel density estimation method to obtain mutually matching flavor scores and second key components. The food flavor is analyzed by the mutually matching flavor scores and second key components, which is conducive to improving the prediction efficiency of food flavor.
[0031] Optionally, the extended connected molecular fingerprint converted from the second key component is input into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested, including:
[0032] Obtaining molecular structure information of the second key component;
[0033] Converting the molecular structure information into a corresponding extended connected molecular fingerprint;
[0034] The extended connected molecular fingerprint is input into the preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0035] Optionally, the preset flavor scoring model and the preset food flavor prediction model are both models constructed based on machine learning algorithms.
[0036] In a second aspect, the present application provides a food flavor characteristic prediction device, comprising:
[0037] An acquisition module, used to acquire component data and spectral data of the food to be tested;
[0038] A calculation module, used for calculating the first key component affecting the food flavor by using a correlation analysis method according to the component data;
[0039] An input module, used for inputting the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data;
[0040] A matching module, configured to match the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method, to obtain a second key component that matches the flavor score;
[0041] The prediction module is used to input the extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0042] The food flavor characteristic prediction device calculates the flavor characteristics of the food to be tested based on the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor score model through the kernel density estimation method and the preset food flavor prediction model, and solves the problems of the existing food flavor detection methods such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the real flavor of the food under certain circumstances. The device can accurately and quickly predict the flavor characteristics of the food, and improves the prediction efficiency of the food flavor.
[0043] In a third aspect, the present application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the food flavor characteristic prediction method described above.
[0044] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the food flavor characteristic prediction method as described above are executed.
[0045] Beneficial effects: The food flavor characteristics prediction method, device, electronic device and storage medium provided in the present application calculate the flavor characteristics of the food to be tested based on the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor scoring model through the kernel density estimation method and the preset food flavor prediction model, thereby solving the problems of the existing food flavor detection methods such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the true flavor of the food under certain circumstances. The method can accurately and quickly predict the flavor characteristics of the food and improve the prediction efficiency of the food flavor. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of the food flavor characteristics prediction method provided in an embodiment of the present application.
[0047] Figure 2 A schematic diagram of the structure of a food flavor characteristic prediction device provided in an embodiment of the present application.
[0048] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0049] Explanation of reference numerals: 1. Acquisition module; 2. Calculation module; 3. Input module; 4. Matching module; 5. Prediction module; 301. Processor; 302. Memory; 303. Communication bus. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0051] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0052] Please refer to Figure 1 , Figure 1 A method for predicting food flavor characteristics in some embodiments of the present application is used to predict food flavor, comprising the steps of:
[0053] Step S101, obtaining component data and spectrum data of the food to be tested;
[0054] Step S102, calculating the first key component affecting the food flavor by using a correlation analysis method based on the ingredient data;
[0055] Step S103, inputting the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data;
[0056] Step S104, matching the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method, to obtain a second key component that matches the flavor score;
[0057] Step S105, inputting the extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0058] The food flavor characteristic prediction method calculates the flavor characteristics of the food to be tested based on the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor scoring model through the kernel density estimation method and the preset food flavor prediction model, and solves the problems of the existing food flavor detection methods such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the real flavor of the food under certain circumstances. The method can accurately and quickly predict the flavor characteristics of the food, and improves the prediction efficiency of the food flavor.
[0059] Specifically, in step S101, the component data and spectral data of the food to be tested are obtained, wherein the component data include the various components (such as water and tea polyphenols in black tea, or water, ethanol and other components in wine) and content of the food to be tested, and multiple samples of the food to be tested are measured using GC-MS (gas chromatography-mass spectrometry), and the components and contents of the multiple samples can be measured, that is, the component data of the food to be tested is obtained. Among them, the multiple samples include samples with qualified flavor and samples with unqualified flavor. Since the flavor difference between the samples with qualified flavor and the samples with unqualified flavor is very small, and these differences often need to be captured by professional tasters with rich experience and keen taste, and are also easily affected by personal subjective feelings, therefore, selecting samples with qualified flavor and samples with unqualified flavor for testing can distinguish the flavor difference between the samples with qualified flavor and the samples with unqualified flavor of the food to be tested.
[0060] Specifically, in step S102, a correlation analysis method is used according to the ingredient data to calculate the first key component affecting the flavor of the food, including:
[0061] Through correlation analysis method, based on ingredient data, the first key ingredient affecting food flavor is calculated;
[0062] Combining each component in the component data in pairs to obtain multiple component combinations;
[0063] According to the combination of ingredients, a component network is constructed to extract the second key ingredient that affects the flavor of food from the combination of ingredients through correlation analysis method;
[0064] The first key component and the second key component are determined as the first key component.
[0065] Specifically, in step S102, the first key component affecting the flavor of food is calculated based on the component data by using a correlation analysis method, including:
[0066] Calculate the mean and standard deviation of the content of each component in the component data;
[0067] The correlation analysis method was used to calculate the significant value of each component based on the content mean and standard deviation;
[0068] A single component whose significant value is less than a preset relevant threshold is extracted from the component data to obtain the first key component affecting the flavor of the food.
[0069] In step S102, firstly, the mean value and standard deviation of the content of each component in multiple samples are calculated respectively according to the components and contents of the samples, and then the significant values of each component are calculated by using the mean value and standard deviation of the content through a correlation analysis method (such as a t-test method, an f-test method, or a chi-square test method, etc.), and when the significant value of any component is less than a preset correlation threshold (generally set to 0.05, which can be set according to actual needs), the component is considered to be significantly correlated, and the component is determined to be a key component affecting the flavor of the food, and the first key component is obtained. Among them, the correlation analysis method is a prior art and will not be described in detail here.
[0070] For non-first key ingredients, the significant value calculated from the perspective of a single ingredient may be smaller than the preset correlation threshold. However, from the perspective of food flavor, there is a complex nonlinear relationship between the various components. The overall flavor experience is not the result of a simple addition of a single component, but a comprehensive reflection of the synergy and mutual influence between the components. Therefore, when the significant value of the interaction between two components (a first key ingredient and a non-first key ingredient) is still smaller than the preset correlation threshold, it can also be considered that the interaction between the two components is sufficient to affect the food flavor. Therefore, the components in the ingredient data are combined in pairs to obtain multiple component combinations.
[0071] Specifically, in step S102, a component network is constructed according to the component combination, so as to extract the second key component affecting the food flavor from the component combination by a correlation analysis method, including:
[0072] Take individual components in the component data as nodes to construct a component network;
[0073] When the component combination includes a first key component and a non-first key component, the nodes corresponding to the two components in the component combination are connected to obtain a connected component combination;
[0074] The connected component combination is regarded as a single component, and a connected component combination with a significant value less than a preset correlation threshold is extracted from the connected component combination through a correlation analysis method to obtain a second key component that affects food flavor.
[0075] In step S102, a single component in the component data is taken as a node, and a graph data structure is constructed from each node to obtain a component network, and all component combinations are traversed. When the component combination contains a first key component and a non-first key component, an edge is added between the nodes corresponding to the two components in the component combination as a connection to obtain a connected component combination. The connected component combination is regarded as a single component, and a correlation analysis method is used to extract the connected component combination with a significant value less than a preset correlation threshold from the connected component combination to obtain the second key component affecting the flavor of the food.
[0076] In summary, the first key components and the second key components that affect the flavor of the food are summarized, and each first key component and each second key component is recorded as a first key component that affects the flavor of the food.
[0077] Specifically, in step S103, the spectral data is input into a preset flavor scoring model, and the flavor scoring model outputs the corresponding flavor score as a label according to the characteristic data of each cloud point in the spectral data (such as wavelength, intensity, absorption peak, emission peak, etc.). For example, when there are more cloud points representing sour taste, the output flavor score result is 0.5 for sour taste, where 0.5 represents a score representing sour taste. The preset flavor scoring model is a model constructed based on a machine learning algorithm (such as a random forest algorithm, a support vector machine algorithm, or a K nearest neighbor algorithm, etc.), and the machine learning algorithm is a prior art and will not be described in detail herein.
[0078] Specifically, in step S104, the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score are matched by the kernel density estimation method to obtain a second key component matching the flavor score, including:
[0079] Using the Gaussian kernel function, a probability distribution diagram of the key component content corresponding to each first key component and a probability distribution diagram of the spectral score corresponding to the flavor score are plotted;
[0080] The correlation analysis method was used to match the probability distribution map of the key component content and the probability distribution map of the spectral score to obtain the second key component that matched the flavor score.
[0081] In step S104, a Gaussian kernel function (or a rectangular kernel function, a triangular kernel function, or other kernel functions) is used to calculate the component content of each first key component and each data point corresponding to each flavor score, and the corresponding kernel density estimate is calculated. A data visualization tool (such as Matplotlib, etc.) is used to superimpose all kernel density estimates to form a continuous probability density function, and multiple key component content probability distribution graphs (each first key component corresponds to a key component content probability distribution graph) and a spectral score probability distribution graph are drawn. In addition, existing statistical software or programming languages (such as Python's Matplotlib or Seaborn library) can be used to draw a KDE (kernel density estimation) graph to obtain a key component content probability distribution graph and a spectral score probability distribution graph. Existing statistical software or programming languages are prior art and will not be described in detail here.
[0082] The correlation analysis method is used to calculate the average significant value of each data point in the key component content probability distribution map and the spectral score probability distribution map as the significant value, so as to match the key component content probability distribution map and the spectral score probability distribution map. When the significant value is less than a preset correlation threshold (generally set to 0.05, which can be set according to actual needs), it is considered that the first key component corresponding to the key component content probability distribution map matches the flavor score corresponding to the spectral score probability distribution map, and the second key component matching the flavor score is obtained. The correlation analysis method is a prior art and will not be described in detail here.
[0083] Specifically, in step S105, the extended connected molecular fingerprint converted from the second key component is input into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested, including:
[0084] Obtaining molecular structure information of the second key component;
[0085] Convert molecular structure information into corresponding extended connected molecular fingerprints;
[0086] The extended connected molecular fingerprint is input into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0087] In step S105, the molecular structure information (molecular structural formula) of the second key component is obtained, and the molecular structure information is converted into corresponding extended connected molecular fingerprints (ECFP) by existing technologies (such as atomic numbering, generating fingerprint information and hash processing methods, which are not described in detail here), and these extended connected molecular fingerprints are used as features and input into a preset food flavor prediction model, so that the preset food flavor prediction model outputs the characteristics of the overall flavor of the food, and obtains the flavor characteristics of the food to be tested. Among them, the food flavor prediction model is a model constructed based on a machine learning algorithm such as a random forest (the machine learning algorithm is an existing technology and is not described in detail here). When training the model, a large number of different ECFPs are used as input features, and the flavor corresponding to each ECFP is used as an output label, so that the model can recognize the mapping relationship between molecular structure and flavor characteristics after training, and can reflect the commonality of different components in the food in corresponding flavor characteristics according to the intersection of different flavor characteristics.
[0088] For example, the food flavor characteristics prediction method of the present application is used to predict the flavor characteristics of liquor. 92 bottles of unqualified liquor samples and 40 bottles of qualified liquor samples produced by a winery in one month are collected, and 27 components and contents of these samples are obtained by GC-MS. The content means and standard deviations of these samples are calculated respectively, and the significant values p of each component are calculated by correlation analysis method. Among them, ethyl acetate (p=0.046) and isovaleric acid (p=0.027) have significant differences (p<0.05). After combining other components with ethyl acetate or isovaleric acid, the first key component is calculated, among which acetic acid, isovaleric acid, n-hexanoic acid, n-octanoic acid and n-nonanoic acid are used as key acids, and ethyl acetate, diethyl suberate and diethyl azelate are used as key esters.
[0089] At the same time, the Raman spectrum of each bottle of liquor sample was measured, and 900 unqualified sample spectra and 444 qualified sample spectra were obtained. All sample spectra were input into the preset flavor scoring model to obtain the flavor score corresponding to each sample data.
[0090] Based on the above-mentioned key acids and key esters (i.e., the first key component) and the flavor scores corresponding to each sample data, the kernel density estimation method was used to compare the corresponding KDE graphs (key component content probability distribution graph and spectral score probability distribution graph) to obtain the second key components matching the flavor scores. The second key components are specifically acetic acid, isovaleric acid, n-hexanoic acid, n-octanoic acid, n-nonanoic acid, ethyl acetate, diethyl suberate and diethyl azelaic acid.
[0091] The second key component is converted into an extended connected molecular fingerprint (ECFP), and the ECFP is input into the preset flavor characteristic prediction model. The obtained flavor characteristics are shown in the following table:
[0092] The second key component Flavor characteristics Acetic acid sour Isovalerate Cheese flavor, sour flavor Hexanoic acid Fatty, cheesy, sour Octanoic acid Fatty, cheesy, sour N-nonanoic acid Fatty, grassy, sour Ethyl acetate Fruity, grassy, floral Diethyl suberate Fruity Diethyl Azelate Fruity
[0093] From the above table, it can be seen that the flavor characteristics of the liquor sample are fat, cheese, sour, fruity, grassy and floral. The flavor characteristics provided by these key components provide the liquor with a richer taste experience.
[0094] As can be seen from the above, the method for predicting food flavor characteristics obtains component data and spectral data of the food to be tested, and according to the component data, uses a correlation analysis method to calculate the first key component that affects the flavor of the food, inputs the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data, and matches the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score through a kernel density estimation method to obtain a second key component that matches the flavor score, and inputs the extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested; thus, through the kernel density estimation method and the preset food flavor prediction model, according to the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor scoring model, the flavor characteristics of the food to be tested are calculated, and the problems of the existing food flavor detection methods such as high cost, low efficiency, complex operation process, and difficulty in fully reflecting the true flavor of the food under specific circumstances, etc., can be solved, and the flavor characteristics of the food can be accurately and quickly predicted, thereby improving the prediction efficiency of the food flavor.
[0095] refer to Figure 2 The present application provides a food flavor feature prediction device for predicting food flavor, comprising:
[0096] Acquisition module 1, used to acquire component data and spectral data of the food to be tested;
[0097] Calculation module 2, used for calculating the first key component affecting the food flavor by using a correlation analysis method according to the ingredient data;
[0098] An input module 3 is used to input the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data;
[0099] A matching module 4 is used to match the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method to obtain a second key component that matches the flavor score;
[0100] The prediction module 5 is used to input the extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0101] The food flavor characteristic prediction device calculates the flavor characteristics of the food to be tested based on the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor score model through the kernel density estimation method and the preset food flavor prediction model, and solves the problems of the existing food flavor detection methods such as high cost, low efficiency, complex operation process and difficulty in fully reflecting the real flavor of the food under certain circumstances. The device can accurately and quickly predict the flavor characteristics of the food, and improves the prediction efficiency of the food flavor.
[0102] Specifically, when the acquisition module 1 is executed, the component data and spectral data of the food to be tested are acquired, wherein the component data include the various components (such as water and tea polyphenols in black tea, or water, ethanol and other components in wine) and content of the food to be tested. By using GC-MS (gas chromatography-mass spectrometry), multiple samples of the food to be tested are measured, and the components and contents of the multiple samples can be measured, that is, the component data of the food to be tested is obtained. Among them, the multiple samples include samples with qualified flavor and samples with unqualified flavor. Since the flavor difference between the samples with qualified flavor and the samples with unqualified flavor is very small, and these differences often need to be captured by professional tasters with rich experience and keen taste, and are also easily affected by personal subjective feelings, therefore, selecting samples with qualified flavor and samples with unqualified flavor for testing can distinguish the flavor difference between the samples with qualified flavor and the samples with unqualified flavor of the food to be tested.
[0103] Specifically, when the calculation module 2 calculates the first key component affecting the flavor of the food using the correlation analysis method according to the ingredient data, it executes:
[0104] Through correlation analysis method, based on ingredient data, the first key ingredient affecting food flavor is calculated;
[0105] Combining each component in the component data in pairs to obtain multiple component combinations;
[0106] According to the combination of ingredients, a component network is constructed to extract the second key ingredient that affects the flavor of food from the combination of ingredients through correlation analysis method;
[0107] The first key component and the second key component are determined as the first key component.
[0108] Specifically, when the calculation module 2 calculates the first key component affecting the food flavor based on the component data by using the correlation analysis method, it executes:
[0109] Calculate the mean and standard deviation of the content of each component in the component data;
[0110] The correlation analysis method was used to calculate the significant value of each component based on the content mean and standard deviation;
[0111] A single component whose significant value is less than a preset relevant threshold is extracted from the component data to obtain the first key component affecting the flavor of the food.
[0112] When the calculation module 2 is executed, the mean value and standard deviation of the content of each component in multiple samples are calculated respectively according to the components and contents of the samples, and then the significant values of each component are calculated by using the mean value and standard deviation of the content through a correlation analysis method (such as a t-test method, an f-test method, or a chi-square test method, etc.). When the significant value of any component is less than a preset correlation threshold (generally set to 0.05, which can be set according to actual needs), the component is considered to be significantly correlated, and the component is determined to be a key component affecting the flavor of the food, and the first key component is obtained. Among them, the correlation analysis method is a prior art and will not be described in detail here.
[0113] For non-first key ingredients, the significant value calculated from the perspective of a single ingredient may be smaller than the preset correlation threshold. However, from the perspective of food flavor, there is a complex nonlinear relationship between the various components. The overall flavor experience is not the result of a simple addition of a single component, but a comprehensive reflection of the synergy and mutual influence between the components. Therefore, when the significant value of the interaction between two components (a first key ingredient and a non-first key ingredient) is still smaller than the preset correlation threshold, it can also be considered that the interaction between the two components is sufficient to affect the food flavor. Therefore, the components in the ingredient data are combined in pairs to obtain multiple component combinations.
[0114] Specifically, when the calculation module 2 constructs a component network according to the component combination to extract the second key component affecting the food flavor from the component combination through a correlation analysis method, it executes:
[0115] Take individual components in the component data as nodes to construct a component network;
[0116] When the component combination includes a first key component and a non-first key component, the nodes corresponding to the two components in the component combination are connected to obtain a connected component combination;
[0117] The connected component combination is regarded as a single component, and a connected component combination with a significant value less than a preset correlation threshold is extracted from the connected component combination through a correlation analysis method to obtain a second key component that affects food flavor.
[0118] When the calculation module 2 is executed, a single component in the ingredient data is used as a node, and a graph data structure is constructed from each node to obtain a component network, and all ingredient combinations are traversed. When the ingredient combination contains a first key ingredient and a non-first key ingredient, an edge is added between the nodes corresponding to the two ingredients in the ingredient combination as a connection to obtain a connected component combination. The connected component combination is regarded as a single component. Through a correlation analysis method, a connected component combination with a significant value less than a preset correlation threshold is extracted from the connected component combination to obtain a second key ingredient that affects the flavor of the food.
[0119] In summary, the first key components and the second key components that affect the flavor of the food are summarized, and each first key component and each second key component is recorded as a first key component that affects the flavor of the food.
[0120] Specifically, when the input module 3 is executed, the spectrum data is input into the preset flavor scoring model. The flavor scoring model will output the corresponding flavor score as a label according to the characteristic data of each cloud point in the spectrum data (such as wavelength, intensity, absorption peak, emission peak, etc.). For example, when there are more cloud points representing sour taste, the output flavor scoring result is 0.5 for sour taste, where 0.5 represents the score representing sour taste. The preset flavor scoring model is a model constructed based on a machine learning algorithm (such as a random forest algorithm, a support vector machine algorithm, or a K nearest neighbor algorithm, etc.). The machine learning algorithm is a prior art and will not be described in detail here.
[0121] Specifically, when the matching module 4 matches the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by the kernel density estimation method to obtain the second key component matching the flavor score, it executes:
[0122] Using the Gaussian kernel function, a probability distribution diagram of the key component content corresponding to each first key component and a probability distribution diagram of the spectral score corresponding to the flavor score are plotted;
[0123] The correlation analysis method was used to match the probability distribution map of the key component content and the probability distribution map of the spectral score to obtain the second key component that matched the flavor score.
[0124] In step S104, a Gaussian kernel function (or a rectangular kernel function, a triangular kernel function, or other kernel functions) is used to calculate the component content of each first key component and each data point corresponding to each flavor score, and the corresponding kernel density estimate is calculated. A data visualization tool (such as Matplotlib, etc.) is used to superimpose all kernel density estimates to form a continuous probability density function, and multiple key component content probability distribution graphs (each first key component corresponds to a key component content probability distribution graph) and a spectral score probability distribution graph are drawn. In addition, existing statistical software or programming languages (such as Python's Matplotlib or Seaborn library) can be used to draw a KDE (kernel density estimation) graph to obtain a key component content probability distribution graph and a spectral score probability distribution graph. Existing statistical software or programming languages are prior art and will not be described in detail here.
[0125] The correlation analysis method is used to calculate the average significant value of each data point in the key component content probability distribution map and the spectral score probability distribution map as the significant value, so as to match the key component content probability distribution map and the spectral score probability distribution map. When the significant value is less than a preset correlation threshold (generally set to 0.05, which can be set according to actual needs), it is considered that the first key component corresponding to the key component content probability distribution map matches the flavor score corresponding to the spectral score probability distribution map, and the second key component matching the flavor score is obtained. The correlation analysis method is a prior art and will not be described in detail here.
[0126] Specifically, when the prediction module 5 inputs the extended connected molecular fingerprint converted from the second key component into the preset food flavor prediction model and predicts the flavor characteristics of the food to be tested, it executes:
[0127] Obtaining molecular structure information of the second key component;
[0128] Convert molecular structure information into corresponding extended connected molecular fingerprints;
[0129] The extended connected molecular fingerprint is input into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
[0130] When the prediction module 5 is executed, the molecular structure information (molecular structural formula) of the second key component is obtained, and the molecular structure information is converted into corresponding extended connected molecular fingerprints (ECFP) by existing technologies (such as atomic numbering, generating fingerprint information and hash processing methods, which are not described in detail here), and these extended connected molecular fingerprints are used as features to input into a preset food flavor prediction model, so that the preset food flavor prediction model outputs the characteristics of the overall flavor of the food, and obtains the flavor characteristics of the food to be tested. Among them, the food flavor prediction model is a model constructed based on a machine learning algorithm such as a random forest (the machine learning algorithm is an existing technology and is not described in detail here). When training the model, a large number of different ECFPs are used as input features, and the flavors corresponding to each ECFP are used as output labels, so that the model can recognize the mapping relationship between molecular structure and flavor characteristics after training, and can reflect the commonality of different components in the food in corresponding flavor characteristics according to the intersection of different flavor characteristics.
[0131] For example, the food flavor characteristics prediction device of the present application is used to predict the flavor characteristics of liquor. 92 bottles of unqualified liquor samples and 40 bottles of qualified liquor samples produced by a winery in one month are collected, and 27 components and contents of these samples are obtained by GC-MS. The content means and standard deviations of these samples are calculated respectively, and the significant values p of each component are calculated by correlation analysis method, among which ethyl acetate (p=0.046) and isovaleric acid (p=0.027) have significant differences (p<0.05). After combining other components with ethyl acetate or isovaleric acid, the first key component is calculated, among which acetic acid, isovaleric acid, n-hexanoic acid, n-octanoic acid and n-nonanoic acid are used as key acids, and ethyl acetate, diethyl suberate and diethyl azelate are used as key esters.
[0132] At the same time, the Raman spectrum of each bottle of liquor sample was measured, and 900 unqualified sample spectra and 444 qualified sample spectra were obtained. All sample spectra were input into the preset flavor scoring model to obtain the flavor score corresponding to each sample data.
[0133] Based on the above-mentioned key acids and key esters (i.e., the first key component) and the flavor scores corresponding to each sample data, the kernel density estimation method was used to compare the corresponding KDE graphs (key component content probability distribution graph and spectral score probability distribution graph) to obtain the second key components matching the flavor scores. The second key components are specifically acetic acid, isovaleric acid, n-hexanoic acid, n-octanoic acid, n-nonanoic acid, ethyl acetate, diethyl suberate and diethyl azelaic acid.
[0134] The second key component is converted into an extended connected molecular fingerprint (ECFP), and the ECFP is input into the preset flavor characteristic prediction model. The obtained flavor characteristics are shown in the following table:
[0135] The second key component Flavor characteristics Acetic acid sour Isovalerate Cheese flavor, sour flavor Hexanoic acid Fatty, cheesy, sour Octanoic acid Fatty, cheesy, sour N-nonanoic acid Fatty, grassy, sour Ethyl acetate Fruity, grassy, floral Diethyl suberate Fruity Diethyl Azelate Fruity
[0136] From the above table, it can be seen that the flavor characteristics of the liquor sample are fat, cheese, sour, fruity, grassy and floral. The flavor characteristics provided by these key components provide the liquor with a richer taste experience.
[0137] As can be seen from the above, the food flavor characteristic prediction device obtains the component data and spectral data of the food to be tested, and according to the component data, uses the correlation analysis method to calculate the first key component that affects the food flavor, inputs the spectral data into a preset flavor scoring model to obtain the flavor score corresponding to the spectral data, and matches the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score through the kernel density estimation method to obtain the second key component that matches the flavor score, and inputs the extended connected molecular fingerprint converted from the second key component into the preset food flavor prediction model to predict the flavor characteristics of the food to be tested; thus, through the kernel density estimation method and the preset food flavor prediction model, according to the first key component obtained by the correlation analysis method and the flavor score obtained by the preset flavor scoring model, the flavor characteristics of the food to be tested are calculated, and the problems of the existing food flavor detection methods such as high cost, low efficiency, complex operation process, and difficulty in fully reflecting the true flavor of the food under specific circumstances, etc., can be solved, and the flavor characteristics of the food can be accurately and quickly predicted, and the prediction efficiency of the food flavor is improved.
[0138] Please refer to Figure 3 , Figure 3The present application provides a structural schematic diagram of an electronic device provided in an embodiment of the present application. The present application provides an electronic device, including: a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown). The memory 302 stores a computer program executable by the processor 301. When the electronic device is running, the processor 301 executes the computer program to execute the food flavor feature prediction method in any optional implementation of the above embodiment to achieve the following functions: obtaining component data and spectral data of a food to be tested, using a correlation analysis method to calculate a first key component that affects the flavor of the food based on the component data, inputting the spectral data into a preset flavor score model to obtain a flavor score corresponding to the spectral data, matching a key component content probability distribution map corresponding to the first key component with a spectral score probability distribution map corresponding to the flavor score through a kernel density estimation method to obtain a second key component that matches the flavor score, and inputting an extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor feature of the food to be tested.
[0139] The embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the food flavor characteristic prediction method in any optional implementation of the above embodiment is executed to achieve the following functions: obtaining component data and spectral data of a food to be tested, calculating a first key component that affects the flavor of the food based on the component data using a correlation analysis method, inputting the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data, matching a key component content probability distribution map corresponding to the first key component with a spectral score probability distribution map corresponding to the flavor score using a kernel density estimation method to obtain a second key component that matches the flavor score, inputting an extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested. Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0140] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0141] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0143] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0144] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for predicting food flavor characteristics, used for predicting food flavor, characterized in that: Includes steps: Obtaining component data and spectral data of the food to be tested; According to the ingredient data, a correlation analysis method is used to calculate the first key component that affects the flavor of the food; Inputting the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data; Matching the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method to obtain a second key component that matches the flavor score; Inputting the extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested; According to the ingredient data, the first key component affecting the food flavor is calculated by using a correlation analysis method, including: By using a correlation analysis method, based on the ingredient data, a first key ingredient affecting the flavor of the food is calculated; Combining the components in the component data in pairs to obtain multiple component combinations; According to the combination of ingredients, a component network is constructed to extract the second key ingredient affecting the food flavor from the combination of ingredients through the correlation analysis method; determining the first key component and the second key component as a first key component; The method is characterized in that, by using a correlation analysis method, based on the ingredient data, a first key ingredient affecting the flavor of the food is calculated, including: Calculate the mean value and standard deviation of the content of each component in the component data; Using the correlation analysis method, based on the content mean and the standard deviation, calculate the significant value of each of the components; A single component whose significant value is less than a preset relevant threshold is extracted from the component data to obtain a first key component affecting the flavor of the food.
2. The method for predicting food flavor characteristics according to claim 1, characterized in that: According to the component combination, a component network is constructed to extract the second key component affecting the food flavor from the component combination through the correlation analysis method, including: Taking individual components in the component data as nodes, constructing a component network; When the component combination includes one of the first key components and one non-first key component, connecting the nodes corresponding to the two components in the component combination to obtain a connected component combination; The connected component combination is regarded as a single component, so as to extract the connected component combination whose significant value is less than the preset correlation threshold from the connected component combination through the correlation analysis method, so as to obtain the second key component affecting the flavor of the food.
3. The method for predicting food flavor characteristics according to claim 1, characterized in that: Matching the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method to obtain a second key component matching the flavor score, including: Using a Gaussian kernel function, a probability distribution graph of the key component content corresponding to each of the first key components and a probability distribution graph of the spectral score corresponding to the flavor score are plotted; The correlation analysis method is used to match the key component content probability distribution map and the spectral score probability distribution map to obtain a second key component that matches the flavor score.
4. The method for predicting food flavor characteristics according to claim 1, characterized in that: The extended connected molecular fingerprint converted from the second key component is input into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested, including: Obtaining molecular structure information of the second key component; Converting the molecular structure information into a corresponding extended connected molecular fingerprint; The extended connected molecular fingerprint is input into the preset food flavor prediction model to predict the flavor characteristics of the food to be tested.
5. The method for predicting food flavor characteristics according to claim 4, characterized in that: The preset flavor scoring model and the preset food flavor prediction model are both models constructed based on machine learning algorithms.
6. A food flavor feature prediction device for predicting food flavor, characterized in that: include: An acquisition module, used to acquire component data and spectral data of the food to be tested; A calculation module, used for calculating the first key component affecting the food flavor by using a correlation analysis method according to the component data; An input module, used for inputting the spectral data into a preset flavor scoring model to obtain a flavor score corresponding to the spectral data; A matching module, configured to match the key component content probability distribution map corresponding to the first key component and the spectral score probability distribution map corresponding to the flavor score by a kernel density estimation method, to obtain a second key component that matches the flavor score; A prediction module, used for inputting the extended connected molecular fingerprint converted from the second key component into a preset food flavor prediction model to predict the flavor characteristics of the food to be tested; A calculation module is used to calculate the first key component affecting the flavor of the food according to the component data by using a correlation analysis method, including: By using a correlation analysis method, based on the ingredient data, a first key ingredient affecting the flavor of the food is calculated; Combining the components in the component data in pairs to obtain multiple component combinations; According to the combination of ingredients, a component network is constructed to extract the second key ingredient affecting the food flavor from the combination of ingredients through the correlation analysis method; determining the first key component and the second key component as a first key component; By using a correlation analysis method, based on the ingredient data, the first key ingredient affecting the food flavor is calculated, including: Calculate the mean value and standard deviation of the content of each component in the component data; Using the correlation analysis method, based on the content mean and the standard deviation, calculate the significant value of each of the components; A single component whose significant value is less than a preset relevant threshold is extracted from the component data to obtain a first key component affecting the flavor of the food.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the steps in the method for predicting food flavor characteristics as described in any one of claims 1 to 5 are executed.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the food flavor characteristic prediction method according to any one of claims 1 to 5 are executed.
Citation Information
Patent Citations
Method and system for detecting evaluation information of food flavor quality
CN110780010A