Flavor analysis method, device, equipment, storage medium and program product
By constructing a causal relationship model, using food attribute data, metabolic data and sensory assessment data, we can identify the key cause nodes of food flavor, solve the problems of inaccurate and high cost of flavor analysis in the existing technology, and achieve more efficient flavor improvement and consumer demand satisfaction.
Patent Information
- Application Number
- CN202411795418.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-12-06
AI Technical Summary
In the prior art, the key influencing factors in food flavor obtained by the correlation analysis of sensory assessment data and metabolic data are not accurate enough, and the artificial sensory assessment is high cost and poor repeatability, making it difficult to meet consumer needs.
By obtaining the attribute data of food, metabolic data and sensory assessment data, a causal relationship model is constructed, the causal relationship between flavor nodes and the node values of non-observed influence nodes are determined, and key cause nodes are identified using Bayesian networks and other methods.
Accurately determine the key reasons that affect food flavor, reduce experimental costs, meet the taste needs of different consumers, and improve the accuracy and efficiency of flavor analysis.
Smart Images

Figure CN119940074B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of food analysis technology, and in particular to a flavor analysis method, device, equipment, storage medium, and program product. Background Art
[0002] Food flavor analysis is a scientific method used to evaluate and analyze the flavor characteristics of food. Flavor is a comprehensive experience composed of multiple sensory characteristics such as taste, smell, and mouthfeel. The goal of food flavor analysis is to understand the flavor profile of food to ensure product quality, develop new products, improve recipes, or meet consumer needs.
[0003] Currently, food flavor analysis is typically performed through the following methods: obtaining sensory evaluation data and metabolomics data from food samples, analyzing the correlation between these data using multivariate statistical analysis or machine learning methods, and then identifying compound components that align with the sensory evaluation trends based on these correlations. These compound components are then identified as key factors influencing food flavor. However, the key factors obtained using these methods are not sufficiently accurate. Summary of the Invention
[0004] The present application provides a flavor analysis method, device, equipment, storage medium and program product to solve the problem that key influencing factors obtained by current methods are not accurate enough.
[0005] In a first aspect, the present application provides a flavor analysis method, comprising:
[0006] In response to receiving a flavor improvement instruction for an object to be analyzed, acquiring flavor collection data of the object to be analyzed and a flavor to be improved, the flavor collection data including attribute data, metabolome data, and sensory evaluation data;
[0007] Based on the flavor collection data, determining the causal relationship between the base node corresponding to the attribute data, the metabolome node corresponding to the metabolome data, and the flavor node corresponding to the sensory evaluation data, as well as the node values of the non-observed influence nodes corresponding to the metabolome node and the flavor node respectively;
[0008] Based on the flavor to be improved, the causal relationship, and the node value, the key cause nodes affecting the flavor to be improved are determined.
[0009] Optionally, based on the flavor collection data, the causal relationship between the basic node corresponding to the attribute data, the metabolome node corresponding to the metabolome data, and the flavor node corresponding to the sensory evaluation data, as well as the node values of the non-observed influencing nodes corresponding to the metabolome node and the flavor node respectively are determined, including: inputting the flavor collection data into the overall flavor analysis model to obtain the causal relationship and node value output by the overall flavor analysis model, and the overall flavor analysis model is used to determine the causal relationship between the basic node, the metabolome node and the flavor node, as well as the probability distribution of the non-observed influencing node.
[0010] Optionally, based on the flavor to be improved, the causal relationship, and the node value, the key cause nodes affecting the flavor to be improved are determined, including: obtaining an individual flavor analysis model according to the causal relationship and the node value through the overall flavor analysis model; inputting the flavor to be improved into the individual flavor analysis model, and obtaining the cause nodes affecting the flavor to be improved output by the individual flavor analysis model based on the causal effect; and determining the key cause nodes affecting the flavor to be improved according to the cause nodes.
[0011] Optionally, the flavor to be improved is input into the individual flavor analysis model, and the cause nodes that affect the flavor to be improved are output by the individual flavor analysis model based on the causal effect, including: inputting the dimension of the flavor to be improved into the individual flavor analysis model, and determining, through the individual flavor analysis model, from the basic nodes and the metabolome nodes, multiple ancestor nodes that affect the flavor node corresponding to the flavor to be improved; obtaining, through the individual flavor analysis model, the causal effect of each of the multiple ancestor nodes on the flavor to be improved; and obtaining, through the individual flavor analysis model, the cause nodes that affect the flavor to be improved as ancestor nodes sorted in descending order of causal effect.
[0012] Optionally, determining the key causal nodes that affect the flavor to be improved based on the causal nodes includes: selecting compounds corresponding to a preset number of causal nodes as the key causal nodes according to the causal effects from strong to weak.
[0013] Optionally, the flavor collection data is input into the overall flavor analysis model to obtain the node value output by the overall flavor analysis model, including: determining the target basic node that affects the metabolome node from the basic nodes through the overall flavor analysis model, and determining the node value of the non-observed influencing node corresponding to the metabolome node based on the attribute data and the model parameters of the overall flavor analysis model corresponding to the target basic node; determining the target metabolome node that affects the flavor node from the metabolome node through the overall flavor analysis model, and determining the node value of the non-observed influencing node corresponding to the flavor node based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node.
[0014] Optionally, the overall flavor analysis model is obtained by: obtaining training samples, the training samples include flavor sample data and labels of the sample objects, the flavor sample data include attribute sample data, metabolome sample data and sensory evaluation sample data; constructing a model structure of the overall flavor analysis model based on the causal discovery method, the model structure includes basic nodes corresponding to the attribute sample data, metabolome nodes corresponding to the metabolome sample data, flavor nodes corresponding to the sensory evaluation sample data and non-observation influence nodes, the model structure is used to indicate the causal relationship between the basic nodes, metabolome nodes and flavor nodes, and the probability distribution of non-observation influence nodes; training the overall flavor analysis model based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model; obtaining the loss function value based on the sensory evaluation prediction data and labels; adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model.
[0015] Optionally, the overall flavor analysis model is trained based on the flavor sample data, including: preprocessing the flavor sample data to obtain preprocessed data, the preprocessing including at least one of category encoding processing, standardization processing, normalization processing, data filling processing, feature selection processing and feature dimensionality reduction processing; and training the overall flavor analysis model based on the preprocessed data.
[0016] Optionally, feature dimensionality reduction is used to perform supervised dimensionality reduction on metabolomics data.
[0017] Optionally, adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model includes: adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain an adjusted overall flavor analysis model; obtaining a goodness of fit index corresponding to the adjusted overall flavor analysis model; and obtaining the trained overall flavor analysis model when the goodness of fit index is greater than a threshold.
[0018] Optionally, there is a first causal relationship between the base node and the metabolome node, and a second causal relationship between the metabolome node and the flavor node.
[0019] In a second aspect, the present application provides a flavor analysis device, comprising:
[0020] an acquisition module, configured to acquire flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving a flavor improvement instruction for the object to be analyzed, wherein the flavor collection data includes attribute data, metabolome data, and sensory evaluation data;
[0021] a first determination module for determining, based on the flavor collection data, a causal relationship among a base node corresponding to the attribute data, a metabolome node corresponding to the metabolome data, and a flavor node corresponding to the sensory evaluation data, as well as node values of non-observed influence nodes corresponding to the metabolome node and the flavor node, respectively;
[0022] The second determining module is configured to determine a key cause node affecting the flavor to be improved based on the flavor to be improved, the causal relationship, and the node value.
[0023] Optionally, the first determination module is specifically used to: input the flavor collection data into the overall flavor analysis model to obtain the causal relationship and node value output by the overall flavor analysis model, and the overall flavor analysis model is used to determine the causal relationship between the basic node, the metabolome node and the flavor node, as well as the probability distribution of the non-observation influence node.
[0024] Optionally, the second determination module is specifically configured to: obtain an individual flavor analysis model based on the cause-effect relationship and node values using the overall flavor analysis model; input the flavor to be improved into the individual flavor analysis model, and obtain the cause nodes that affect the flavor to be improved output by the individual flavor analysis model based on the cause-effect effect; and determine the key cause nodes that affect the flavor to be improved based on the cause nodes.
[0025] Optionally, when the second determination module is used to input the flavor to be improved into the individual flavor analysis model and obtain the cause node that affects the flavor to be improved output by the individual flavor analysis model based on the causal effect, it is specifically used to: input the flavor dimension to be improved into the individual flavor analysis model, and determine, through the individual flavor analysis model, from the basic nodes and the metabolome nodes, multiple ancestor nodes that affect the flavor node corresponding to the flavor to be improved; obtain, through the individual flavor analysis model, the causal effect of each of the multiple ancestor nodes on the flavor to be improved; and obtain, through the individual flavor analysis model, the cause nodes that affect the flavor to be improved as ancestor nodes sorted in descending order of causal effect.
[0026] Optionally, when the second determination module is used to determine the key cause nodes affecting the flavor to be improved based on the cause nodes, it is specifically used to: select the compounds corresponding to the first preset number of cause nodes as the key cause nodes according to the causal effects from strong to weak.
[0027] Optionally, when the first determination module is used to input flavor collection data into the overall flavor analysis model and obtain the node value output by the overall flavor analysis model, it is specifically used to: determine the target basic node that affects the metabolome node from the basic nodes through the overall flavor analysis model, and determine the node value of the non-observed influencing node corresponding to the metabolome node based on the attribute data and the model parameters of the overall flavor analysis model corresponding to the target basic node; determine the target metabolome node that affects the flavor node from the metabolome node through the overall flavor analysis model, and determine the node value of the non-observed influencing node corresponding to the flavor node based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node.
[0028] Optionally, the flavor analysis device also includes a training module for obtaining an overall flavor analysis model in the following manner: obtaining training samples, the training samples including flavor sample data and labels of the sample objects, the flavor sample data including attribute sample data, metabolome sample data and sensory evaluation sample data; constructing a model structure of the overall flavor analysis model based on a causal discovery method, the model structure including basic nodes corresponding to the attribute sample data, metabolome nodes corresponding to the metabolome sample data, flavor nodes corresponding to the sensory evaluation sample data and non-observation influence nodes, the model structure being used to indicate the causal relationship between the basic nodes, metabolome nodes and flavor nodes and the probability distribution of the non-observation influence nodes; training the overall flavor analysis model based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model; obtaining a loss function value based on the sensory evaluation prediction data and labels; and adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model.
[0029] Optionally, when the training module is used to train the overall flavor analysis model based on flavor sample data, it is specifically used to: preprocess the flavor sample data to obtain preprocessed data, where the preprocessing includes at least one of category encoding processing, standardization processing, normalization processing, data filling processing, feature selection processing and feature dimensionality reduction processing; and train the overall flavor analysis model based on the preprocessed data.
[0030] Optionally, feature dimensionality reduction is used to perform supervised dimensionality reduction on metabolomics data.
[0031] Optionally, when the training module is used to adjust the model parameters of the overall flavor analysis model based on the loss function value to obtain the trained overall flavor analysis model, it is specifically used to: adjust the model parameters of the overall flavor analysis model based on the loss function value to obtain the adjusted overall flavor analysis model; obtain the goodness of fit index corresponding to the adjusted overall flavor analysis model; when the goodness of fit index is greater than a threshold, obtain the trained overall flavor analysis model.
[0032] Optionally, there is a first causal relationship between the base node and the metabolome node, and a second causal relationship between the metabolome node and the flavor node.
[0033] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0034] Memory stores computer-executable instructions;
[0035] The processor executes the computer-executable instructions stored in the memory to implement the flavor analysis method as described in the first aspect of the present application.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium having computer program instructions stored therein. When the computer program instructions are executed, the flavor analysis method as described in the first aspect of the present application is implemented.
[0037] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the flavor analysis method described in the first aspect of the present application when the computer program is executed.
[0038] The flavor analysis method, apparatus, device, storage medium and program product provided in the present application obtain flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving a flavor improvement instruction for the object to be analyzed, the flavor collection data including attribute data, metabolome data and sensory evaluation data; considering the consistency of causal relationships in different environments or conditions and the fact that causal relationships may be affected by some unobserved or random disturbances, the causal relationship between the basic node corresponding to the attribute data, the metabolome node corresponding to the metabolome data and the flavor node corresponding to the sensory evaluation data, as well as the node values of the non-observed influencing nodes corresponding to the metabolome node and the flavor node respectively, are determined based on the flavor to be improved, the causal relationship and the node value, and the key cause node affecting the flavor to be improved is determined, so that the key cause node (key influencing factor) affecting the flavor to be improved can be determined more accurately, so that the flavor of the object to be analyzed can be improved according to the key cause node to better meet the taste needs of different consumers. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0041] Figure 2 A flowchart of a flavor analysis method provided in one embodiment of the present application;
[0042] Figure 3 A flowchart of a flavor analysis method provided in another embodiment of the present application;
[0043] Figure 4 A schematic diagram of an overall flavor analysis model provided in one embodiment of the present application;
[0044] Figure 5 A schematic diagram of an individual flavor analysis model provided in one embodiment of the present application;
[0045] Figure 6 A schematic diagram of an individual flavor analysis model provided in another embodiment of the present application;
[0046] Figure 7 A flowchart of a method for training an overall flavor analysis model provided in one embodiment of the present application;
[0047] Figure 8 A schematic diagram of the structure of a flavor analysis device provided in one embodiment of the present application;
[0048] Figure 9 A schematic diagram of a flavor analysis system provided in one embodiment of the present application;
[0049] Figure 10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0050] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0051] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0052] First, some technical terms involved in this application are explained:
[0053] Food economics is the study of food production, distribution, consumption, and its economic impact. New flavor development involves food economics because it has a direct impact on the supply and demand relationship, prices, consumer preferences, and industry competition in the food market. The success of new flavor products can stimulate market demand, drive sales and economic growth, and in turn influence producers' decisions and resource allocation.
[0054] Coffee flavor is a general term for the sensory characteristics of coffee, including aroma or smell, flavor, aftertaste, acidity, body, body fat, consistency, balance, flaws, sweetness and overall impression; coffee flavor is affected by many factors, such as the variety of coffee beans, origin, processing and storage methods, etc.
[0055] Omics is a method of studying molecular data in organisms (such as genomes, proteomes, metabolomes, etc.), aiming to fully understand the structure, function and dynamic changes of biological systems.
[0056] Sensory evaluation refers to the method of evaluating and measuring the various characteristics of food through human senses (such as vision, smell, taste, touch and hearing); sensory evaluation plays an important role in food science, quality control and new product development.
[0057] Biomarkers in beverages are specific compounds (such as caffeine, chlorogenic acid), genes (regulating the synthesis of caffeine, etc.), etc. that can be used to evaluate beverage quality, health effects and consumption habits.
[0058] Dimensionality reduction refers to mapping high-dimensional data to a low-dimensional space to reduce the number of features while retaining the main information of the data as much as possible. Common dimensionality reduction methods include principal component analysis (PCA) and linear discriminant analysis (LDA).
[0059] Causal discovery methods provide decision makers with a structured model for analyzing and understanding behavioral data.
[0060] Counterfactual reasoning is a method of reasoning that explores the possible outcomes of an event or condition by assuming different changes in the same environment. The counterfactual principle is that for an entity, only factual data can be observed, and other unobserved data is called counterfactual data.
[0061] Food flavor analysis can be used to understand food flavor characteristics to ensure product quality, develop new products, improve recipes, and meet consumer needs. For example, the flavor profile of coffee must meet consumer expectations and is the most direct factor influencing consumer preference. Currently, food flavor analysis can be performed through manual sensory evaluation. This involves a team of professionally trained assessors who are able to discern and describe sensory attributes such as color, aroma, and mouthfeel. During the sensory evaluation process, the results are typically recorded using a scoring table or radar chart to quantify the flavor profile of the food sample. However, with the increasing scale and conglomeration of food production, manual sensory evaluation by human assessors alone is no longer sufficient to achieve the goal of controlling food quality. Furthermore, manual sensory evaluation is susceptible to subjective factors, such as assessor experience, personal preferences, regional differences, and olfactory fatigue, which can directly impact the assessment of food quality. With the rapid development of artificial intelligence (AI) technology, an objective model can be obtained based on limited sample learning to assess food quality, which is of great significance for promoting standardized production, structural adjustment and healthy and rapid development of the food industry.
[0062] Specifically, food flavor analysis is typically performed through the following methods: obtaining sensory evaluation data and metabolomic data from food samples, where metabolomic data is obtained, for example, through gas chromatography-mass spectrometry (GC-MS) and liquid chromatography-mass spectrometry (LC-MS). Correlations between the sensory evaluation data and metabolomic data are then analyzed using multivariate statistical analysis or machine learning methods to help understand the mechanisms of food flavor formation. Based on these correlations, compound components that align with sensory evaluation trends are identified, and these compound components are considered key factors influencing food flavor. However, correlations between sensory evaluation data and metabolomic data do not accurately reflect causality, as correlation does not equal causality. This can lead to spurious correlations, for example, where both variables may be affected by a common factor (e.g., altitude), resulting in misleading results. Therefore, key factors obtained through these methods are not accurate. Furthermore, re-establishing metabolomic and sensory evaluation data for a given food sample is time-consuming, labor-intensive, and costly, and it is difficult to estimate flavor outside the sample (e.g., how to estimate flavor after two weeks of storage for food samples stored for one week and one month). Furthermore, related technologies face the need for repeated sensory evaluation and metabolomics analysis, which, in the context of large-scale and group-based food production, leads to unmanageable experimental costs. Manual sensory evaluation is influenced by the psychological and physiological state of the evaluator, prone to human error, affecting the repeatability and reliability of the evaluation results. Furthermore, manual sensory evaluation has numerous technical barriers and high training costs, resulting in high costs for food flavor analysis.
[0063] Based on the above problems, the present application provides a flavor analysis method, device, equipment, storage medium and program product. Taking into account that the causal discovery method is used to draw causal conclusions from observation data without the need for additional experiments, the key cause nodes affecting the flavor to be improved are determined based on the flavor to be improved of the object to be analyzed, the basic nodes corresponding to the attribute data contained in the flavor collection data of the object to be analyzed, the metabolome nodes corresponding to the metabolome data and the flavor nodes corresponding to the sensory evaluation data, as well as the node values of the non-observed influencing nodes corresponding to the metabolome nodes and the flavor nodes respectively. The key cause nodes (key influencing factors) affecting the flavor to be improved can be determined more accurately, so that the flavor of the object to be analyzed can be improved according to the key cause nodes to better meet the taste needs of different consumers, and the dependence on experimental food samples can be reduced. The key causal relationship of a specific food sample can be accurately inferred through limited food samples, thereby reducing the experimental cost.
[0064] Below, the application scenarios of the solution provided in this application are first illustrated.
[0065] Figure 1This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, this application scenario includes terminal devices. Terminal devices can also be referred to as user equipment (UE), mobile stations (Mobile Stations), mobile terminals (Mobile Terminals), or terminals. In practical applications, terminal devices include desktop computers, laptops, personal digital assistants (PDAs), smartphones, and tablet computers.
[0066] Exemplarily, in response to receiving a flavor improvement instruction for an object to be analyzed, the terminal device performs a flavor analysis on the object to be analyzed (such as coffee) according to the flavor analysis method provided in the present application, determines the key cause nodes that affect the flavor to be improved of the object to be analyzed, and improves the flavor of the object to be analyzed based on the key cause nodes.
[0067] In some optional embodiments, the scenario may also include a server. The server is a business point that provides flavor analysis, database and other functions. The server can be an integrated server or a distributed server across multiple computers or computer data centers. The server can include hardware, software, or embedded logic components for executing appropriate functions supported or implemented by the server, or a combination of two or more such components. The server is, for example, a blade server, a cloud server, etc., or it can be a server group composed of multiple servers. The terminal device and the server can communicate through a wired network or a wireless network. In the embodiment of the present application, the server can execute some of the functions of the above-mentioned terminal device.
[0068] Exemplarily, a flavor improvement instruction for the object to be analyzed can be triggered by a terminal device. In response to receiving the flavor improvement instruction for the object to be analyzed, the server performs a flavor analysis on the object to be analyzed according to the flavor analysis method provided in the present application, determines the key cause nodes that affect the flavor to be improved of the object to be analyzed, and improves the flavor of the object to be analyzed according to the key cause nodes.
[0069] It should be noted that Figure 1 This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1 The equipment included in the Figure 1 The positional relationship between the devices is limited.
[0070] It can be seen that the flavor analysis method provided in this application can be applied to the following four aspects: (1) Food research and development: In the process of new product development, the flavor analysis method provided in this application can be used to analyze the specific impact of different raw materials or formulas on the flavor of the final product; by identifying key causal factors, the formula can be adjusted more specifically to improve product quality. (2) Quality control: In the process of food production, the flavor analysis method provided in this application can be used to quickly evaluate samples, determine the root cause of flavor changes, ensure product flavor consistency during the production process, and reduce the cost caused by repeated evaluation. (3) Personalized food optimization: For product improvements based on consumer feedback, the flavor analysis method provided in this application can help identify the key driving factors in consumer sensory experience, thereby customizing and optimizing products to meet the taste needs of different consumers and develop new products. (4) Sensory science research: In academic research, the flavor analysis method provided in this application can be used to deeply analyze the causal relationship between sensory evaluation data and metabolomics data, reveal the mechanism of food flavor formation, and promote the development of sensory science and food science.
[0071] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0072] Figure 2 This is a flow chart of a flavor analysis method provided in one embodiment of the present application. The method of the embodiment of the present application can be applied to an electronic device, which can be Figure 1 The terminal device or server shown. Figure 2 As shown, the method of the embodiment of the present application includes:
[0073] S201 : In response to receiving a flavor improvement instruction for an object to be analyzed, acquiring flavor collection data of the object to be analyzed and a flavor to be improved, wherein the flavor collection data includes attribute data, metabolome data, and sensory evaluation data.
[0074] In embodiments of the present application, the flavor improvement instruction for the object to be analyzed can be input by a user into the electronic device executing the embodiment of the present method, or sent by another device to the electronic device executing the embodiment of the present method. For example, taking Gesha coffee as the object to be analyzed, attribute data for Gesha coffee can include, for example, bean variety, altitude, roasting method, storage time, and storage method; metabolomic data for Gesha coffee can include, for example, the concentrations of various compounds; and sensory evaluation data for Gesha coffee can include, for example, body, acidity, and aftertaste. In this step, after receiving the flavor improvement instruction for the object to be analyzed, flavor data collected for the object to be analyzed and the flavor to be improved can be obtained. The flavor collection data can include one or more attribute data, one or more metabolomic data, and one or more sensory evaluation data. There can be at least one flavor to be improved, and an example of the flavor to be improved is the body of the object to be analyzed. Table 1 shows the flavor collection data for Gesha coffee. This flavor collection data can be understood as the current flavor data of the Gesha coffee, while the flavor to be improved for the Gesha coffee is, for example, increasing the body of the Gesha coffee from 7 to 9.
[0075] Table 1
[0076]
[0077] S202. Determine, based on the flavor collection data, the causal relationship among the base node corresponding to the attribute data, the metabolome node corresponding to the metabolome data, and the flavor node corresponding to the sensory evaluation data, as well as the node values of the non-observed influence nodes corresponding to the metabolome node and the flavor node, respectively.
[0078] It is understandable that the mechanism of flavor generation does not change due to differences in variety and processing methods, that is, causal invariance. Flavor substances are usually derived from secondary metabolites of food (plants, animals or microorganisms). For example, the bitterness of coffee comes from caffeine, and the vanilla flavor of coffee comes from substances such as guaiacol produced by high-temperature processing of chlorogenic acid. Different varieties and processing methods may affect the content of caffeine and guaiacol, the bitterness and the intensity of vanilla flavor, but cannot affect the relevant basic chemical reactions and sensory perception mechanisms. Causal invariance is an important concept in causal inference and causal discovery, which involves the consistency of causal relationships under different environments or conditions. Using causal invariance, the causal relationship between the basic node corresponding to the attribute data, the metabolome node corresponding to the metabolome data, and the flavor node corresponding to the sensory evaluation data can be determined based on the flavor collection data, as well as the node values of the non-observed influence nodes corresponding to the metabolome node and the flavor node respectively.
[0079] For example, taking the object to be analyzed as Gesha coffee, the basic nodes corresponding to the attribute data of Gesha coffee can also be understood as causal variable nodes. Basic nodes include, for example, altitude and roasting method, where altitude refers to the altitude at which Gesha coffee is grown, and roasting method refers to the degree of roasting of Gesha coffee beans (such as light roast, medium roast, or dark roast, etc.). The metabolome nodes corresponding to the metabolome data of Gesha coffee can also be understood as mediating variable nodes, namely, the compound components in Gesha coffee beans, such as organic acids (such as malic acid, citric acid, and chlorogenic acid), aroma compounds (such as guaiacol, which is one of the sources of vanilla flavor), and bitter compounds (such as caffeine). The flavor nodes corresponding to the sensory evaluation data of Gesha coffee can also be understood as outcome variable nodes, for example, the flavor characteristics of Gesha coffee (such as acidity, bitterness, and aroma intensity, etc.). The non-observational influence nodes corresponding to the metabolome node and the flavor node are, for example, exogenous noise nodes. Considering that in actual data, the relationship between variables may be affected by some unobserved or random disturbance factors, the exogenous noise nodes are introduced in the embodiment of the present application (for example, N1, ..., N m Representation), which is used to represent unobserved factors, thereby supplementing the integrity of the causal relationship. The node values of the non-observed influencing nodes corresponding to the metabolome node and the flavor node can be determined based on the flavor collection data. In this embodiment, for example, an overall flavor analysis model can be constructed based on a Bayesian network, wherein the Bayesian network can identify the various direct causes and indirect causes of the target, and can be used to draw causal conclusions by implying causal relationships; the overall flavor analysis model is used to determine the causal relationship between the basic node corresponding to the attribute data, the metabolome node corresponding to the metabolome data, and the flavor node corresponding to the sensory evaluation data based on the flavor collection data, as well as the node values of the non-observed influencing nodes corresponding to the metabolome node and the flavor node.
[0080] Optionally, there is a first causal relationship between the base node and the metabolome node, and a second causal relationship between the metabolome node and the flavor node.
[0081] It can be understood that the basic node affects the metabolome node, and there is a first causal relationship between the basic node and the metabolome node. Furthermore, the metabolome node affects the flavor node, and there is a second causal relationship between the metabolome node and the flavor node. The first causal relationship and the second causal relationship can be used to determine the cause node that affects the flavor to be improved.
[0082] S203 : Determine key cause nodes that affect the flavor to be improved based on the flavor to be improved, the causal relationship, and the node value.
[0083] For example, referring to Table 1, the flavor of Gesha coffee to be improved is, for example, to increase the alcohol content of Gesha coffee from 7 to 9. Based on the causal relationship, all the cause nodes that affect the alcohol content can be determined from the basic nodes and metabolome nodes. Based on the cause nodes and node values, the causal effect of each cause node on the alcohol content can be obtained, so that the key cause nodes that affect the flavor to be improved can be determined based on the strength of the causal effect. For specific information on how to determine the key cause nodes that affect the flavor to be improved based on the flavor to be improved, the causal relationship, and the node value, please refer to the subsequent embodiments and will not be repeated here. After determining the key cause nodes that affect the flavor to be improved, the flavor of the object to be analyzed can be improved based on the key cause nodes that affect the flavor to be improved to better meet the taste needs of different consumers.
[0084] The flavor analysis method provided in the embodiment of the present application obtains flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving a flavor improvement instruction for the object to be analyzed, the flavor collection data including attribute data, metabolome data and sensory evaluation data; considering the consistency of causal relationships under different environments or conditions and the fact that causal relationships may be affected by some unobserved or random disturbances, the causal relationship between the basic node corresponding to the attribute data, the metabolome node corresponding to the metabolome data and the flavor node corresponding to the sensory evaluation data, as well as the node values of the non-observed influencing nodes corresponding to the metabolome node and the flavor node respectively, is determined based on the flavor to be improved, the causal relationship and the node value, and the key cause node affecting the flavor to be improved is determined. This method can more accurately determine the key cause node (key influencing factor) affecting the flavor to be improved, so that the flavor of the object to be analyzed can be improved based on the key cause node to better meet the taste needs of different consumers.
[0085] Figure 3 This is a flow chart of a flavor analysis method provided in another embodiment of the present application. Based on the above embodiment, this embodiment of the present application further illustrates the flavor analysis method. Figure 3 As shown, the method of the embodiment of the present application may include:
[0086] S301 : In response to receiving a flavor improvement instruction for an object to be analyzed, acquiring flavor collection data of the object to be analyzed and the flavor to be improved, where the flavor collection data includes attribute data, metabolome data, and sensory evaluation data.
[0087] The detailed description of this step can be found in Figure 2 The relevant description of S201 in the illustrated embodiment will not be repeated here.
[0088] In the embodiment of this application, Figure 2 The step S202 may further include the following step S302:
[0089] S302. Input the flavor collection data into the overall flavor analysis model to obtain the causal relationship between the basic nodes corresponding to the attribute data output by the overall flavor analysis model, the metabolome nodes corresponding to the metabolome data, and the flavor nodes corresponding to the sensory evaluation data, as well as the node values of the non-observed influencing nodes corresponding to the metabolome nodes and the flavor nodes, respectively. The overall flavor analysis model is used to determine the causal relationship between the basic nodes, the metabolome nodes, and the flavor nodes, as well as the probability distribution of the non-observed influencing nodes.
[0090] In this step, the overall flavor analysis model structure can be constructed based on causal discovery methods. Specifically, for example, the overall flavor analysis model structure can be constructed based on a Bayesian network. The Bayesian network can identify direct and indirect causes of a target and, by implying causal relationships, draw causal conclusions. The overall flavor analysis model can also be other graphical models. For detailed instructions on how to train the overall flavor analysis model, please refer to the subsequent examples and will not be elaborated here. For example, the flavor data collected from the object to be analyzed is input into the overall flavor analysis model, and the causal relationships and node values output by the overall flavor analysis model are obtained. Figure 4 This is a schematic diagram of an overall flavor analysis model provided in one embodiment of the present application, as shown in FIG. Figure 4 As shown in Table 1, the model structure of the overall flavor analysis model includes basic nodes, metabolome nodes, flavor nodes, and non-observed influence nodes, wherein the basic nodes include bean species, altitude, roasting method, and storage time; the metabolome nodes include compound 1, compound 2, and compound 3; the flavor nodes include alcohol content, acidity, and aftertaste; the non-observed influence nodes include N1, N2, N3, N4, N5, and N6; the basic nodes are the first causal relationship between the metabolome nodes, that is, the basic nodes are the cause nodes of the metabolome nodes; the metabolome nodes and the flavor nodes have a second causal relationship, that is, the metabolome nodes are the cause nodes of the flavor nodes. It can be understood that each node in the overall flavor analysis model represents a different variable (such as treatment, outcome, covariate, etc.), each edge in the overall flavor analysis model represents a causal relationship between variables, and the probability distribution of the non-observed influence nodes in the overall flavor analysis model (i.e., conditional probability distribution) is used to define the probability distribution of each node given its parent node.
[0091] Optionally, inputting the flavor collection data into the overall flavor analysis model to obtain the node value output by the overall flavor analysis model may include: determining the target basic node that affects the metabolome node from the basic nodes through the overall flavor analysis model, and determining the node value of the non-observed influencing node corresponding to the metabolome node based on the attribute data and the model parameters of the overall flavor analysis model corresponding to the target basic node; determining the target metabolome node that affects the flavor node from the metabolome node through the overall flavor analysis model, and determining the node value of the non-observed influencing node corresponding to the flavor node based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node.
[0092] For example, referring to Table 1 and Figure 4 Based on the overall flavor analysis model and the current flavor data of Gesha coffee, the unobserved influencing nodes (i.e., exogenous noise nodes) can be degraded from their original probability distribution to specific values. Taking compound 1 in the metabolome node as an example, compound 1 corresponds to exogenous noise node N1. The overall flavor analysis model determines that the target basic nodes that influence the metabolome node are roasting method, altitude, and storage time. The node value of exogenous noise node N1 can be obtained using the following formula 1:
[0093] Compound 1 = 5 * baking method + 0.2 * altitude - 2 * storage time + N1 Formula 1
[0094] Among them, 5, 0.2 and 2 in formula 1 are the model parameters of the overall flavor analysis model; N1 is calculated by residual error, assuming that N1~Norm(10,5 2 ), substituting the attribute data of the current flavor data of Gesha coffee in Table 1 (i.e., compound 1 = 380, roasting method = 1, altitude = 1950, storage time = 10) into the above formula 1, we can obtain a node value of N1 of 5. Similarly, the overall flavor analysis model can be used to determine the target metabolome node that affects the flavor node from the metabolome node, and based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node, the node value of the non-observed influencing node corresponding to the flavor node can be determined.
[0095] In the embodiment of this application, Figure 2 The step S203 may further include the following two steps S303 and S304:
[0096] S303 : Obtain an individual flavor analysis model based on the overall flavor analysis model according to the causal relationship and the node values.
[0097] It is understandable that, based on the counterfactual reasoning method, the overall flavor analysis model can be assumed to be causally invariant, and the mechanism of flavor generation does not change due to different varieties or processing methods. This allows for extracting causal inferences for individuals from the overall flavor analysis model to obtain an individual flavor analysis model. Specifically, the conditional probability distribution and causal relationship in the overall flavor analysis model are conditioned on the characteristics of the individual, and information such as the individual's covariate value and processing status are introduced into the overall flavor analysis model to obtain an individual flavor analysis model. For example, Figure 5 This is a schematic diagram of an individual flavor analysis model provided in one embodiment of the present application, as shown in FIG. Figure 5 As shown, based on Figure 4 ,After obtaining the node values of the exogenous noise nodes (i.e., non-observation ,influence nodes) corresponding to the metabolome nodes and the flavor nodes respectively, the ,node values obtained by degenerating the exogenous noise nodes can be substituted into the ,overall flavor analysis model to obtain the individual flavor analysis ,model.
[0098] S304: Input the flavor to be improved into the individual flavor analysis model, and obtain the cause node that affects the flavor to be improved output by the individual flavor analysis model based on the causal effect.
[0099] For example, referring to Table 1, the flavor of Gesha coffee to be improved is, for example, to increase the body of the Gesha coffee from 7 to 9. By inputting the flavor to be improved into the individual flavor analysis model, the individual flavor analysis model can output the cause nodes that affect the flavor to be improved and the causal effects of the cause nodes on the flavor to be improved.
[0100] Furthermore, optionally, the flavor to be improved is input into the individual flavor analysis model, and the cause node that affects the flavor to be improved output by the individual flavor analysis model is obtained based on the causal effect, which may include: inputting the dimension of the flavor to be improved into the individual flavor analysis model, and determining, through the individual flavor analysis model, from the basic nodes and the metabolome nodes, multiple ancestor nodes that affect the flavor node corresponding to the flavor to be improved; obtaining, through the individual flavor analysis model, the causal effect of each of the multiple ancestor nodes on the flavor to be improved; and obtaining, through the individual flavor analysis model, the cause nodes that affect the flavor to be improved as the ancestor nodes sorted in descending order of causal effect.
[0101] In this embodiment, the ancestor node refers to all nodes that are located before a node on the path and affect the node. For example, taking the example of increasing the alcohol content of Gesha coffee from 7 to 9, refer to Figure 5, the ancestral nodes that affect alcohol content can be determined from the basic nodes and metabolome nodes as compound 1, compound 2, bean species, altitude, roasting method and storage time according to the individual flavor analysis model. The causal effect of each ancestral node in the ancestral nodes that affect alcohol content on the flavor to be improved is obtained through the individual flavor analysis model. Specifically, in one possible implementation, for a single flavor to be improved (i.e., a single optimization target, such as alcohol content), the causal effect of each ancestral node in the ancestral nodes that affect alcohol content on the flavor to be improved can be obtained based on the individual causal effect (ITE) through the following formulas 2 and 3:
[0102]
[0103] Among them, i represents an individual sample (i.e., ancestral node), represents the individual causal effect of adding one unit of treatment to individual sample i, represents the individual causal effect of reducing one unit of sample i; X t Indicates intervention on the item (such as baking method, compound, etc.), X i represents the specific observation value of the current sample i, Y represents the target sensory evaluation data; E[Y|do(X t =t+1),X i ], which means that the result of adding one unit of treatment to the individual sample is predicted based on the attribute data (environmental variables), metabolome data and overall flavor analysis model of the individual sample; E[Y|do(X t =t),X i ], which can be understood as the observation result under the current processing; E[Y|do(X t =t-1),X i ], which means that based on the attribute data (environmental variables), metabolome data and overall flavor analysis model of individual samples, the treatment result of reducing the individual sample by one unit is predicted. Based on the observation of the current individual sample, each intervening variable X can be obtained. t Individual causal effect size under unit change and
[0104] In one example, refer to Figure 5Taking the example of increasing the body of Geisha coffee from 7 to 9, after obtaining the causal effect of each ancestral node on body through the individual flavor analysis model using Formulas 2 and 3, we can sort these ancestral nodes in descending order of causal effect to obtain the cause nodes that influence the flavor to be improved. The causal effect of a cause node on body is the causal effect of the corresponding ancestral node on body. Table 2 shows the cause nodes that influence body, sorted by causal effect from strong to weak.
[0105] Table 2
[0106] Cause Node causal effect Storage time <![CDATA[a1]]> Baking method <![CDATA[a2]]> Compound 1 <![CDATA[a3]]> Compound 2 <![CDATA[a4]]> bean seeds <![CDATA[a5]]> altitude <![CDATA[a6]]>
[0107] In another example, Table 3 shows flavor collection data of Typica coffee. The flavor of Typica coffee to be improved is, for example, to increase the alcohol content of the Typica coffee from 7 to 8.
[0108] Table 3
[0109]
[0110]
[0111] Figure 6 This is a schematic diagram of an individual flavor analysis model provided in another embodiment of the present application, as shown in FIG. Figure 6 As shown, the individual flavor analysis model obtained based on Table 3 is shown. Figure 6 The individual flavor analysis model shown above uses Formulas 2 and 3 to obtain the causal nodes that influence the body of Typica coffee and their causal effects on the body of Typica coffee. Table 4 shows the causal nodes that influence the body of Typica coffee, ranked from strongest to weakest.
[0112] Table 4
[0113] Cause Node causal effect Baking method <![CDATA[d1]]> Compound 2 <![CDATA[d2]]> Compound 1 <![CDATA[d3]]> Storage time <![CDATA[d4]]> altitude <![CDATA[d5]]> bean seeds <![CDATA[d6]]>
[0114] In another possible embodiment, for multiple flavors to be improved (such as alcohol content and acidity), the causal effect of each ancestral node in the ancestral node that affects alcohol content on the flavor to be improved can be obtained based on individualized multi-objective causal effects. Individualized multi-objective causal effects involve a detailed analysis of the causal effects of each individual under multiple treatments or interventions. The analysis usually includes estimating the individual's causal effect and evaluating it on multiple targets (such as multiple outcome variables). Specifically, based on the above formulas 2 and 3, the causal effect of each ancestral node in the ancestral node that affects alcohol content on the flavor to be improved can be obtained by the following formulas 4 and 5:
[0115]
[0116] Among them, k represents the kth flavor to be improved (i.e., optimization target). For example, for K optimization targets, linear weighting can be performed The linearly weighted causal effect of each intervention node (i.e., weighted causal effect) is obtained.
[0117] refer to Figure 5 Taking the flavors to be improved as example, body and acidity, after obtaining the weighted causal effect of each ancestral node on body and acidity using the individual flavor analysis model according to Formulas 4 and 5, these ancestral nodes can be sorted in descending order of weighted causal effect to obtain the cause nodes affecting body and acidity. The weighted causal effect of the cause node on body and acidity is the weighted causal effect of the corresponding ancestral node on body and acidity. Table 5 shows the cause nodes affecting body and acidity, sorted in descending order of weighted causal effect.
[0118] Table 5
[0119]
[0120]
[0121] It can be understood that by quantifying and ranking the cause nodes according to the size of the causal effect through the individual flavor analysis model, we can conduct an in-depth analysis of the key influencing factors affecting the flavor to be improved, revealing which factors have a significant impact on the flavor to be improved, thereby helping to optimize the formula and production process.
[0122] S305: Determine, based on the cause nodes, the key cause nodes that affect the flavor to be improved.
[0123] In this step, after the cause nodes influencing the flavor to be improved are obtained, key cause nodes influencing the flavor to be improved may be determined based on the cause nodes.
[0124] Further, optionally, determining the key cause nodes affecting the flavor to be improved based on the cause nodes may include: taking compounds corresponding to a first preset number of cause nodes as the key cause nodes according to the causal effects from strong to weak.
[0125] Exemplarily, the preset number is, for example, 3. Referring to Table 2, the compounds corresponding to the first three cause nodes are taken as key cause nodes, and the important compound component can be obtained as compound 1. Referring to Table 4, the compounds corresponding to the first three cause nodes are taken as key cause nodes, and the important compound components can be obtained as compounds 2 and compound 1. Referring to Table 5, the compounds corresponding to the first three cause nodes are taken as key cause nodes, and the important compound component can be obtained as compound 1. It can be understood that by obtaining the causal effect, the key metabolites under the synergistic effect of multiple compounds can be obtained; through counterfactual reasoning, the individual-based counterfactual causal model (i.e., the individual flavor analysis model) is first obtained, and the key cause ranking is further obtained based on the counterfactual causal model, which can effectively solve the problem of differences in key factors of different objects to be analyzed.
[0126] After determining the key causal nodes that influence the flavor to be improved, the flavor of the object being analyzed can be improved based on these key causal nodes to better meet the taste needs of different consumers. For example, referring to Table 2, the storage time can be shortened, the roasting method can be changed to medium roasting, compound 1 can be treated to increase the expression level of the compound, and compound 2 can be treated to increase the expression level of the compound. Referring to Table 5, compound 1 can be treated to reduce the expression level of the compound, the roasting method can be changed to dark roasting, the storage time can be shortened, compound 2 can be treated to increase the expression level of the compound, and compound 3 can be treated to increase the expression level of the compound.
[0127] The flavor analysis method provided in the embodiment of the present application obtains flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving a flavor improvement instruction for the object to be analyzed, wherein the flavor collection data includes attribute data, metabolome data, and sensory evaluation data; considering the consistency of causal relationships under different environments or conditions and the fact that causal relationships may be affected by some unobserved or random disturbance factors, the flavor collection data is input into the overall flavor analysis model to obtain the causal relationship between the basic nodes corresponding to the attribute data, the metabolome nodes corresponding to the metabolome data, and the flavor nodes corresponding to the sensory evaluation data output by the overall flavor analysis model, as well as the node values of the non-observed influencing nodes corresponding to the metabolome nodes and the flavor nodes, respectively. The overall flavor analysis model is obtained by introducing causal relationship modeling, which helps to draw causal conclusions from observed data. Without the need for additional experiments; based on the counterfactual reasoning method, causal inferences for individuals are extracted from the overall flavor analysis model to obtain an individual flavor analysis model, which can reduce dependence on experimental samples and reduce experimental costs; the flavor to be improved is input into the individual flavor analysis model, and the cause nodes that affect the flavor to be improved output by the individual flavor analysis model are obtained based on the causal effect. According to the cause nodes, the key cause nodes that affect the flavor to be improved are determined, which can more accurately determine the key cause nodes that affect the flavor to be improved, and improve the accuracy and consistency of the analysis results, so that the flavor of the analyzed object can be improved according to the key cause nodes to better meet the taste needs of different consumers; and it can reduce dependence on experimental food samples, and the key causal relationship of specific food samples can be accurately inferred through limited food samples, thereby reducing experimental costs.
[0128] Based on the above embodiments, Figure 7 This is a flow chart of a method for training a general flavor analysis model provided in one embodiment of the present application. The method of the embodiment of the present application can be applied to an electronic device, which can be a server or a server cluster. Figure 7 As shown, the method of the embodiment of the present application includes:
[0129] S701 , obtaining training samples, where the training samples include flavor sample data and labels of sample objects, and the flavor sample data includes attribute sample data, metabolome sample data, and sensory evaluation sample data.
[0130] For example, taking the sample object of coffee (such as Gesha coffee), many factors influence coffee (coffee beans), including the bean variety, origin, and altitude during the planting stage, the picking strategy during the harvesting process, the washing and honey treatment during primary processing, the light, medium, or dark roasting during further processing, and the storage stage, all of which affect the final flavor of the coffee. For the sample object, the attribute sample data of the sample object may include at least one of the following: genotype, variety, origin, light, temperature, humidity, altitude, ultraviolet (UV), field management (such as fertilizer, irrigation, or pruning), harvest time (such as fruit maturity or fruit color), processing method (such as dry fermentation, wet fermentation, honey treatment, or barrel fermentation), roasting method, roast degree, storage time, storage method, grind size, extraction method, recipe, and ratio.
[0131] The sample object can be introduced into a gas chromatograph (GC). After separation through a capillary column, the effluent components are divided into two paths by a diverter valve. One path enters a chemical detector to obtain odor characteristic raw data consisting of chromatographic and mass spectrometric raw data (i.e., chromatographic and mass spectrometric data of the content and chemical structure of each volatile component of the food). Among them, the chemical detector is, for example, a flame ionization detector (FID) or a mass spectrometer (MS). Based on the odor characteristic raw data, metabolome sample data is obtained. It can be understood that important biochemical components in coffee beans include caffeine, harringtonine, chlorogenic acid, sucrose, and lipids. The metabolism of these components is not only regulated by genotype, but also significantly affected by environmental conditions and processing processes, providing a biochemical basis for finding flavor substances that meet sensory evaluation. In particular, the sensory evaluation closest to consumers, by analyzing the metabolism of flavor substances in coffee beans, understands the impact of seed processing and storage on the accumulation of these flavor substances, thereby identifying the key metabolic steps that determine coffee quality. The sensory evaluation sample data of the sample object is obtained based on the sensory evaluation of consumers. Table 6 shows the obtained flavor sample data of the sample object.
[0132] Table 6
[0133]
[0134]
[0135] S702. Construct a model structure of an overall flavor analysis model based on a causal discovery method. The model structure includes a base node corresponding to the attribute sample data, a metabolome node corresponding to the metabolome sample data, a flavor node corresponding to the sensory evaluation sample data, and a non-observation influence node. The model structure is used to indicate the causal relationship among the base node, the metabolome node, and the flavor node, as well as the probability distribution of the non-observation influence node.
[0136] It can be understood that the causal discovery method provides decision makers with a method to determine the causal relationship between variables in complex data through a structured model, so that causal conclusions can be drawn from the observed data without the need for additional experiments. In this step, the model structure of the overall flavor analysis model is constructed based on the causal discovery method. The causal discovery method may include but is not limited to: Peter-Clark Algorithm (PC) algorithm, Greedy Equivalent Search (GES), Linear Non-Gaussian Model (LiNGAM) or Causal Additive Model (CAM), etc. In the embodiment of the present application, the model structure of the overall flavor analysis model can be constructed based on the Bayesian network. The Bayesian network can identify the direct and indirect causes of the target and can be used to draw causal conclusions by implying causal relationships. For example, first, a conditional independence test is performed, which determines the conditional independence between variables through statistical tests. Second, a preliminary causal graph is constructed, which constructs a preliminary directed acyclic graph (DAG) based on the results of the conditional independence test. Finally, model learning is performed, which adjusts the causal graph structure, removes false causal relationships, and optimizes edge directions. The accuracy of the model can be checked on validation data (i.e., model validation) and the conditional independence test can be performed.
[0137] The model structure of the overall flavor analysis model includes basic nodes corresponding to attribute sample data (corresponding to environmental variables or causal variables), metabolome nodes corresponding to metabolome sample data (corresponding to metabolome variables or mediating variables), flavor nodes corresponding to sensory evaluation sample data (corresponding to flavor variables or outcome variables), and non-observational influence nodes (such as exogenous noise variables corresponding to exogenous noise nodes). For example, taking coffee as an example, the basic nodes correspond to environmental variables such as altitude and roasting method, where altitude is the altitude at which coffee is planted, and roasting method is the degree of roasting of coffee beans (such as light roasting, medium roasting or deep roasting, etc.). The metabolome variables corresponding to the metabolome nodes are compound components in coffee beans, such as organic acids (such as malic acid, citric acid and chlorogenic acid), aroma compounds (such as guaiacol, which is one of the sources of vanilla flavor) and bitter compounds (such as caffeine), etc. For flavor variables corresponding to flavor nodes, for example, they are flavor characteristics of coffee (such as acidity, bitterness and aroma intensity, etc.). The distribution of exogenous noise nodes can be obtained by y-y_pred, where y represents the true observation value and y_pred is obtained based on the predicted value of its cause node.
[0138] Causal invariance is a key concept in causal inference and causal discovery, referring to the consistency of causal relationships across different environments or conditions. This property can be leveraged to combine collected training samples to determine the relationship between compounds and the flavor of sample objects under different environments. Optionally, prior knowledge can be incorporated, using expert knowledge to define prior constraints within the causal network (i.e., the overall flavor analysis model). For example, expert knowledge can be used to determine that node A is an ancestor of node B (i.e., the causal effect of node A propagates to node B). This constraint can then be added to the network during the overall flavor analysis model design phase. This can be achieved by manually setting or modifying the structure of the causal network. Specific prior constraints include: the effects of altitude and roasting method on metabolomic variables (compound components); the effects of metabolomic variables on flavor variables; and the direct and indirect effects of environmental variables (such as altitude and roasting method) on flavor variables. Certain edges or node relationships within the overall flavor analysis model can be fixed to ensure that the network structure of the overall flavor analysis model conforms to expert knowledge. For example, consistent causal relationships between compounds can be enforced by enforcing the presence of these edges when constructing the overall flavor analysis model. Based on expert knowledge, multiple local causal discoveries can be performed and, optionally, finally merged into a complete causal discovery network to obtain an overall flavor analysis model.
[0139] The output of the overall flavor analysis model represents the causal relationship between variables. Figure 4 , Figure 4The nodes in the DAG represent variables, and the edges (i.e., directed arrows) indicate the direction of the causal relationship. For example, a DAG can show the direct effect of variable C on variable D, and the direct effect of variable D on variable E. In addition to the causal structure, the output of the overall flavor analysis model can also include quantitative estimates of causal effects, such as regression coefficients and causal effect sizes. Based on the quantitative estimates of causal effects, the strength of the causal relationship between variables can be determined. For example, the causal effect of variable C on variable D is estimated to be 0.5, indicating that for every unit increase in variable C, variable D will increase by 0.5 units.
[0140] S703: Training the overall flavor analysis model based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model.
[0141] In this step, the overall flavor analysis model may be trained based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model.
[0142] Optionally, training the overall flavor analysis model based on the flavor sample data may include: preprocessing the flavor sample data to obtain preprocessed data, the preprocessing including category encoding processing, standardization processing, normalization processing, data filling processing, and at least one of feature selection and dimensionality reduction processing; training the overall flavor analysis model based on the preprocessed data.
[0143] For example, preprocessing the flavor sample data can improve the quality of the flavor sample data and make the flavor sample data more suitable for the application of machine learning models and algorithms. Specifically, (1) the flavor sample data is categorized and coded: the light roast, medium roast, and dark roast in the roasting method are coded as sequential data according to their progressive physical meaning, such as 1, 2, and 3 or 3, 2, and 1, rather than 1, 3, and 2, or 2, 3, and 1; other features such as light intensity and picking height should also be converted to numerical data according to similar logic; the categorized data is converted to numerical form for model processing. (2) The flavor sample data is standardized and normalized: the data features are scaled to the same scale range to ensure that the scales of different data features are consistent and to prevent the eigenvalue differences of the data features from being too large, which may cause difficulties in model training. For example, the data features are logarithmically transformed. (3) Filling the flavor sample data: Taking coffee as an example, since the flavor of coffee changes over time, the metabolomics sample data and sensory evaluation sample data are filled, and the storage time is used as the timestamp to fill the data according to the time series data; for example, a linear interpolation method can be used to perform linear interpolation through the data before and after the missing value, or a polynomial interpolation method can be used to interpolate the missing value through a polynomial function, or a moving average method can be used to fill the data through the mean value in the front and back windows. (4) Perform feature selection and feature dimensionality reduction on the flavor sample data: Feature selection is used to select features related to the target variable and remove irrelevant or redundant features. For feature dimensionality reduction, when the number of features (feature dimensions) in the training sample is much larger than the number of training samples, the curse of dimensionality problem will be encountered. In this case, data analysis and modeling become more complicated, which may lead to problems such as overfitting and low computational efficiency of the model. Therefore, the flavor sample data can be split into multiple tables according to the sensory evaluation sample data. For example, referring to Table 6, Table 6 can be split into the following two tables, Table 7 and Table 8, where Table 7 no longer contains alcohol content and Table 8 no longer contains acid content.
[0144] Table 7
[0145]
[0146]
[0147] Table 8
[0148]
[0149] Optionally, feature dimensionality reduction is used to perform supervised dimensionality reduction on metabolomics data.
[0150] Exemplarily, supervised dimensionality reduction can be performed for each data table. For example, the Partial Least Squares Discriminant Analysis (PLS-DA) method is a supervised discriminant analysis statistical method. The PLS-DA method can be used to establish a relationship model between metabolite expression and sensory evaluation to predict the flavor of the sample object. The variable projection importance (VIP) can be calculated to measure the influence and explanatory power of the expression pattern of each metabolite on the classification and discrimination of each group of sample objects, thereby assisting in the screening of marker metabolites. For example, a VIP value greater than 1.0 is usually used as a screening criterion. Optionally, for the performance evaluation of the dimensionality reduction process, the prediction accuracy of the training samples after dimensionality reduction in the discriminant analysis can be used to determine the optimal dimensionality reduction dimension in the PLS, which is affected by factors such as the number of principal components in the PLS. For example, a preset accuracy ratio can be obtained. If the preset accuracy ratio is 90%, the accuracy of the data after dimensionality reduction needs to reach more than 90% of the accuracy of the original sensory evaluation sample data.
[0151] S704: Obtain a loss function value based on the sensory evaluation prediction data and labels.
[0152] In this step, after obtaining the sensory evaluation prediction data output by the overall flavor analysis model, a loss function value can be obtained based on the difference between the sensory evaluation prediction data and the label.
[0153] S705 : Adjust the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model.
[0154] In this step, after obtaining the loss function value, the model parameters of the overall flavor analysis model can be adjusted based on the loss function value to obtain a trained overall flavor analysis model.
[0155] Furthermore, optionally, adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain the trained overall flavor analysis model may include: adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain the adjusted overall flavor analysis model; obtaining a goodness of fit index corresponding to the adjusted overall flavor analysis model; and obtaining the trained overall flavor analysis model when the goodness of fit index is greater than a threshold.
[0156] Exemplarily, the model parameters of the overall flavor analysis model can be adjusted based on the loss function value obtained from the sensory evaluation prediction data and labels to obtain an adjusted overall flavor analysis model, and then the goodness-of-fit index corresponding to the adjusted overall flavor analysis model can be obtained. The goodness-of-fit index can include at least one of the comparative fit index (CFI), the non-standardized fit index (Tucker-Lewis Index, TLI), the error-based fit index (Root Mean Square Error of Approximation, RMSEA) and the standardized root mean square residual (Standardized Root Mean Square Residual, SRMR) to evaluate the fitness of the overall flavor analysis model. When the goodness-of-fit index is greater than a threshold, the trained overall flavor analysis model is obtained.
[0157] The training method of the overall flavor analysis model provided in the embodiments of the present application obtains training samples, wherein the training samples include flavor sample data and labels of sample objects, and the flavor sample data include attribute sample data, metabolome sample data, and sensory evaluation sample data; constructs a model structure of the overall flavor analysis model based on a causal discovery method, wherein the model structure includes a basic node corresponding to the attribute sample data, a metabolome node corresponding to the metabolome sample data, a flavor node corresponding to the sensory evaluation sample data, and a non-observation influence node, and the model structure is used to indicate the causal relationship between the basic node, the metabolome node, and the flavor node, as well as the probability distribution of the non-observation influence node; trains the overall flavor analysis model based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model; obtains a loss function value based on the sensory evaluation prediction data and the label; and adjusts the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model. In the embodiments of the present application, the model structure of the overall flavor analysis model is constructed based on the causal discovery method, which can more accurately determine the causal relationship between the basic nodes, metabolome nodes and flavor nodes, as well as the probability distribution of non-observed influencing nodes. Therefore, when the overall flavor analysis model is used to perform flavor analysis on the object to be analyzed, the key cause nodes affecting the flavor to be improved can be more accurately determined, thereby improving the accuracy and consistency of the analysis results.
[0158] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0159] Figure 8 This is a schematic diagram of the structure of a flavor analysis device provided in one embodiment of the present application, as shown in FIG. Figure 8As shown, the flavor analysis device 800 of the embodiment of the present application includes: an acquisition module 801, a first determination module 802, and a second determination module 803.
[0160] The acquisition module 801 is configured to acquire flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving a flavor improvement instruction for the object to be analyzed, wherein the flavor collection data includes attribute data, metabolomics data, and sensory evaluation data.
[0161] The first determination module 802 is used to determine the causal relationship between the basic node corresponding to the attribute data, the metabolome node corresponding to the metabolome data, and the flavor node corresponding to the sensory evaluation data, as well as the node values of the non-observed influence nodes corresponding to the metabolome node and the flavor node respectively, based on the flavor collection data.
[0162] The second determining module 803 is configured to determine a key cause node affecting the flavor to be improved based on the flavor to be improved, the causal relationship, and the node value.
[0163] In some embodiments, the first determination module 802 can be specifically used to: input the flavor collection data into the overall flavor analysis model to obtain the causal relationship and node value output by the overall flavor analysis model, and the overall flavor analysis model is used to determine the causal relationship between the basic node, the metabolome node and the flavor node, as well as the probability distribution of the non-observation influence node.
[0164] In some embodiments, the second determination module 803 can be specifically used to: obtain an individual flavor analysis model based on the cause-effect relationship and node values through the overall flavor analysis model; input the flavor to be improved into the individual flavor analysis model, and obtain the cause node that affects the flavor to be improved output by the individual flavor analysis model based on the cause effect; and determine the key cause node that affects the flavor to be improved based on the cause node.
[0165] Optionally, when the second determination module 803 is used to input the flavor to be improved into the individual flavor analysis model and obtain the cause node that affects the flavor to be improved output by the individual flavor analysis model based on the causal effect, it can be specifically used to: input the flavor dimension to be improved into the individual flavor analysis model, and determine, through the individual flavor analysis model, from the basic nodes and the metabolome nodes, multiple ancestor nodes that affect the flavor node corresponding to the flavor to be improved; obtain, through the individual flavor analysis model, the causal effect of each of the multiple ancestor nodes on the flavor to be improved; and obtain, through the individual flavor analysis model, the cause nodes that affect the flavor to be improved as ancestor nodes sorted in descending order of causal effect.
[0166] Optionally, when determining the key cause nodes affecting the flavor to be improved based on the cause nodes, the second determining module 803 may be specifically configured to: select compounds corresponding to a preset number of cause nodes as the key cause nodes according to the causal effects from strong to weak.
[0167] Optionally, when the first determination module 802 is used to input the flavor collection data into the overall flavor analysis model and obtain the node value output by the overall flavor analysis model, it is specifically used to: determine the target basic node that affects the metabolome node from the basic nodes through the overall flavor analysis model, and determine the node value of the non-observed influencing node corresponding to the metabolome node based on the attribute data and the model parameters of the overall flavor analysis model corresponding to the target basic node; determine the target metabolome node that affects the flavor node from the metabolome node through the overall flavor analysis model, and determine the node value of the non-observed influencing node corresponding to the flavor node based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node.
[0168] Optionally, the flavor analysis device 800 may further include a training module 804 for obtaining an overall flavor analysis model in the following manner: obtaining training samples, the training samples including flavor sample data and labels of the sample objects, the flavor sample data including attribute sample data, metabolome sample data and sensory evaluation sample data; constructing a model structure of the overall flavor analysis model based on a causal discovery method, the model structure including basic nodes corresponding to the attribute sample data, metabolome nodes corresponding to the metabolome sample data, flavor nodes corresponding to the sensory evaluation sample data and non-observation influence nodes, the model structure being used to indicate the causal relationship between the basic nodes, metabolome nodes and flavor nodes and the probability distribution of the non-observation influence nodes; training the overall flavor analysis model based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model; obtaining a loss function value based on the sensory evaluation prediction data and labels; and adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model.
[0169] Optionally, when the training module 804 is used to train the overall flavor analysis model based on the flavor sample data, it can be specifically used to: preprocess the flavor sample data to obtain preprocessed data, where the preprocessing includes at least one of category encoding processing, standardization processing, normalization processing, data filling processing, feature selection processing and feature dimensionality reduction processing; and train the overall flavor analysis model based on the preprocessed data.
[0170] Optionally, feature dimensionality reduction is used to perform supervised dimensionality reduction on metabolomics data.
[0171] Optionally, when the training module 804 is used to adjust the model parameters of the overall flavor analysis model based on the loss function value to obtain the trained overall flavor analysis model, it can be specifically used to: adjust the model parameters of the overall flavor analysis model based on the loss function value to obtain the adjusted overall flavor analysis model; obtain the goodness of fit index corresponding to the adjusted overall flavor analysis model; and when the goodness of fit index is greater than a threshold, obtain the trained overall flavor analysis model.
[0172] In some embodiments, a first causal relationship exists between the base node and the metabolome node, and a second causal relationship exists between the metabolome node and the flavor node.
[0173] The device of the embodiment of the present application can be used to execute the technical solution of any of the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0174] Figure 9 This is a schematic diagram of a flavor analysis system provided in one embodiment of the present application, as shown in FIG. Figure 9 As shown, the flavor analysis system 900 of the embodiment of the present application may include: a front-end input module 901 , a flavor analysis engine 902 , and a data storage module 903 .
[0175] in:
[0176] The front-end input module 901 is configured to, in response to an input operation on attribute sample data included in the flavor sample data of a sample object in a training sample, obtain attribute sample data of the sample object; in response to a configuration operation for preprocessing the flavor sample data, obtain preprocessing configuration information, the configuration information including at least a preset accuracy ratio for performing feature dimensionality reduction processing on the flavor sample data; in response to an input operation on expert knowledge, obtain expert knowledge; and in response to receiving a flavor improvement instruction for an object to be analyzed, obtain flavor collection data of the object to be analyzed and the flavor to be improved, the flavor collection data including attribute data, metabolomics data, and sensory evaluation data.
[0177] The flavor analysis engine 902 includes a data collection submodule 9021, a flavor modeling submodule 9022, and a flavor strategy submodule 9023. The data collection submodule 9021 is used to obtain metabolome sample data contained in the flavor sample data of the sample objects in the training samples through omics instruments, and to obtain sensory evaluation sample data contained in the flavor sample data of the sample objects in the training samples based on the sensory evaluation of consumers. The flavor modeling submodule 9022 is used to preprocess the flavor sample data based on the preprocessing configuration information to obtain the preprocessed data, and to model the overall flavor analysis model based on the preprocessed data and expert knowledge to obtain The goodness-of-fit index corresponding to the overall flavor analysis model is used to evaluate the fitness of the overall flavor analysis model based on the goodness-of-fit index; the flavor strategy submodule 9023 is used to extract causal inferences for individuals from the overall flavor analysis model based on the counterfactual reasoning method, and based on the flavor collection data of the object to be analyzed, conditionalize the conditional probability distribution and causal relationship in the overall flavor analysis model on the characteristics of the individual to obtain an individual flavor analysis model, input the flavor to be improved into the individual flavor analysis model, and obtain the cause nodes that affect the flavor to be improved output by the individual flavor analysis model based on the causal effect. Based on the cause nodes, the key cause nodes that affect the flavor to be improved are determined.
[0178] The data storage module 903 is used to store data generated by the front-end input module 901 and the flavor analysis engine 902, such as training samples, pre-processed data, flavor collection data of the object to be analyzed, flavor to be improved, and key cause nodes affecting the flavor to be improved.
[0179] The system of the embodiment of the present application can be used to execute the technical solution of any of the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0180] Figure 10 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. Figure 10 As shown, the electronic device 1000 may include: at least one processor 1001 and a memory 1002 .
[0181] The memory 1002 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.
[0182] The memory 1002 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0183] Processor 1001 is configured to execute computer-executable instructions stored in memory 1002 to implement the flavor analysis method described in the aforementioned method embodiment. Processor 1001 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. Specifically, when implementing the flavor analysis method described in the aforementioned method embodiment, the electronic device may be, for example, a terminal device, a server, or other electronic device with processing capabilities.
[0184] Optionally, the electronic device 1000 may further include a communication interface 1003. In a specific implementation, if the communication interface 1003, the memory 1002, and the processor 1001 are implemented independently, the communication interface 1003, the memory 1002, and the processor 1001 may be interconnected via a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, etc., but this does not mean that there is only one bus or only one type of bus.
[0185] Optionally, in a specific implementation, if the communication interface 1003, the memory 1002 and the processor 1001 are integrated on a chip, the communication interface 1003, the memory 1002 and the processor 1001 can complete communication through an internal interface.
[0186] The present application also provides a computer-readable storage medium, in which computer program instructions are stored. When a processor executes the computer program instructions, the above flavor analysis method is implemented.
[0187] The present application also provides a computer program product, including a computer program, which implements the above flavor analysis method when executed by a processor.
[0188] The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory 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 read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0189] An exemplary readable storage medium is coupled to the processor, enabling the processor to read information from and write information to the readable storage medium. Alternatively, the readable storage medium may be an integral part of the processor. The processor and the readable storage medium may reside in an application-specific integrated circuit. Alternatively, the processor and the readable storage medium may reside as discrete components in the flavor analysis device.
[0190] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 make equivalent replacements for some or all of the technical features therein. 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 application.
Claims
1. A flavor analysis method, characterized in that: include: In response to receiving a flavor improvement instruction for an object to be analyzed, acquiring flavor collection data of the object to be analyzed and a flavor to be improved, the flavor collection data including attribute data, metabolomics data, and sensory evaluation data; Determining, based on the flavor collection data, a causal relationship among a base node corresponding to the attribute data, a metabolome node corresponding to the metabolome data, and a flavor node corresponding to the sensory evaluation data, as well as node values of non-observed influence nodes corresponding to the metabolome node and the flavor node, respectively; Determining a key cause node affecting the flavor to be improved based on the flavor to be improved, the causal relationship, and the node value; The determining, based on the flavor to be improved, the causal relationship, and the node value, a key cause node affecting the flavor to be improved, includes: Obtaining an individual flavor analysis model based on the causal relationship and the node value through the overall flavor analysis model; Inputting the flavor dimension to be improved into the individual flavor analysis model, determining, using the individual flavor analysis model, from the base node and the metabolome node, a plurality of ancestor nodes that influence the flavor node corresponding to the flavor to be improved; obtaining, using the individual flavor analysis model, a causal effect of each of the plurality of ancestor nodes on the flavor to be improved; and obtaining, using the individual flavor analysis model, cause nodes influencing the flavor to be improved as ancestor nodes sorted in descending order of causal effect; According to the causal effect, the compounds corresponding to the first preset number of cause nodes from strong to weak are taken as the key cause nodes.
2. The flavor analysis method according to claim 1, wherein The determining, based on the flavor collection data, a causal relationship among a base node corresponding to the attribute data, a metabolome node corresponding to the metabolome data, and a flavor node corresponding to the sensory evaluation data, as well as node values of non-observation influence nodes corresponding to the metabolome node and the flavor node, respectively, includes: The flavor collection data is input into an overall flavor analysis model to obtain the causal relationship and the node value output by the overall flavor analysis model. The overall flavor analysis model is used to determine the causal relationship between the basic node, the metabolome node and the flavor node, as well as the probability distribution of the unobserved influence node.
3. The flavor analysis method according to claim 2, characterized in that Inputting the flavor collection data into an overall flavor analysis model to obtain the node value output by the overall flavor analysis model includes: Determining a target base node that affects the metabolome node from the base nodes using the overall flavor analysis model, and determining a node value of a non-observed influencing node corresponding to the metabolome node based on the attribute data and a model parameter of the overall flavor analysis model corresponding to the target base node; The overall flavor analysis model is used to determine a target metabolome node that affects the flavor node from the metabolome nodes, and based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node, the node value of the non-observed influencing node corresponding to the flavor node is determined.
4. The flavor analysis method according to any one of claims 1 to 3, characterized in that The overall flavor analysis model is obtained by: Acquire training samples, wherein the training samples include flavor sample data and labels of sample objects, wherein the flavor sample data includes attribute sample data, metabolome sample data, and sensory evaluation sample data; Constructing a model structure of an overall flavor analysis model based on a causal discovery method, the model structure comprising a base node corresponding to attribute sample data, a metabolome node corresponding to metabolome sample data, a flavor node corresponding to sensory evaluation sample data, and a non-observed influence node, the model structure being used to indicate a causal relationship among the base node, the metabolome node, and the flavor node, and a probability distribution of the non-observed influence node; Training the overall flavor analysis model based on the flavor sample data to obtain sensory evaluation prediction data output by the overall flavor analysis model; Obtaining a loss function value based on the sensory evaluation prediction data and the label; The model parameters of the overall flavor analysis model are adjusted based on the loss function value to obtain a trained overall flavor analysis model.
5. The flavor analysis method according to claim 4, characterized in that The training of the overall flavor analysis model based on the flavor sample data includes: Preprocessing the flavor sample data to obtain preprocessed data, wherein the preprocessing includes at least one of category coding processing, standardization processing, normalization processing, data filling processing, feature selection processing, and feature dimension reduction processing; The overall flavor analysis model is trained based on the preprocessed data.
6. The flavor analysis method according to claim 5, characterized in that The feature dimensionality reduction process is used to perform supervised dimensionality reduction on the metabolomics data.
7. The flavor analysis method according to claim 4, characterized in that The adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain a trained overall flavor analysis model includes: adjusting the model parameters of the overall flavor analysis model based on the loss function value to obtain an adjusted overall flavor analysis model; Obtaining a goodness-of-fit index corresponding to the adjusted overall flavor analysis model; When the goodness of fit index is greater than a threshold, a trained overall flavor analysis model is obtained.
8. The flavor analysis method according to any one of claims 1 to 3, characterized in that There is a first causal relationship between the base node and the metabolome node, and a second causal relationship between the metabolome node and the flavor node.
9. A flavor analysis device, characterized in that: include: an acquisition module, configured to acquire flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving a flavor improvement instruction for the object to be analyzed, wherein the flavor collection data includes attribute data, metabolomics data, and sensory evaluation data; a first determination module for determining, based on the flavor collection data, a causal relationship among a base node corresponding to the attribute data, a metabolome node corresponding to the metabolome data, and a flavor node corresponding to the sensory evaluation data, as well as node values of non-observed influence nodes corresponding to the metabolome node and the flavor node, respectively; a second determining module, configured to determine a key cause node affecting the flavor to be improved based on the flavor to be improved, the causal relationship, and the node value; The second determining module is specifically configured to: Obtaining an individual flavor analysis model based on the causal relationship and the node value using the overall flavor analysis model; Inputting the flavor dimension to be improved into the individual flavor analysis model, determining, using the individual flavor analysis model, from the base node and the metabolome node, a plurality of ancestor nodes that influence the flavor node corresponding to the flavor to be improved; and obtaining, using the individual flavor analysis model, a causal effect of each of the plurality of ancestor nodes on the flavor to be improved. The cause nodes influencing the flavor to be improved obtained by the individual flavor analysis model are ancestor nodes sorted in descending order of causal effects; According to the causal effect, the compounds corresponding to the first preset number of cause nodes from strong to weak are taken as the key cause nodes.
10. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the flavor analysis method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed, the flavor analysis method according to any one of claims 1 to 8 is implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed, the flavor analysis method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Food flavor evaluation method and system based on big data analysis
CN118940156A
Methods, systems, and computer program product for implementing an intelligent system with dynamic configurability
US20190130305A1