Flavor analysis method, device, equipment, storage medium and program product
By using the overall flavor analysis model in food analysis to determine the causal relationship between sensory assessment data, metabolic data and attribute data, the problem of inaccurate key influencing factors in the prior art is solved, and more accurate flavor analysis and improvement are achieved, reducing costs.
Patent Information
- Application Number
- CN202411795418.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The key influencing factors obtained in the prior art through the analysis of correlation between sensory assessment data and metabolic data are not accurate enough, and it is difficult to accurately infer the flavor outside the food sample.
The key cause nodes affecting the flavor improvement instructions for the object to be analyzed are determined by obtaining its flavor collection data and determining the causal relationship between attribute data, metabolic data and sensory assessment data based on the overall flavor analysis model, as well as the node values of the non-observable influence node.
It is achieved to more accurately determine the key cause nodes that affect the flavor to be improved, reduce the dependence on experimental food samples, reduce the cost of experiments, and better meet the taste needs of different consumers.
Smart Images

Figure CN119940074A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of food analysis, 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 of food. The purpose of food flavor analysis is to understand the flavor characteristics of food in order to ensure product quality, develop new products, improve recipes or meet consumer needs.
[0003] At present, the flavor analysis of food is usually carried out in the following ways: obtaining sensory evaluation data and metabolome data of food samples, obtaining the correlation between sensory evaluation data and metabolome data through multivariate statistical analysis or machine learning methods, and identifying compound components consistent with the sensory evaluation trend based on the correlation. This compound component is the key influencing factor affecting the flavor of food. However, the key influencing factors obtained by the above methods are not accurate enough. 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 the key influencing factors obtained by the current method 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, wherein the flavor collection data includes attribute data, metabolome data, and sensory evaluation data;
[0007] According to the flavor collection data, determining 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-observation influence nodes corresponding to the metabolome node and the flavor node respectively;
[0008] Based on the flavor to be improved, the cause-effect relationship and the node value, 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 nodes corresponding to the attribute data, 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 are determined, including: inputting the flavor collection data into the overall flavor analysis model to obtain the causal relationship and node values output by the overall flavor analysis model, and the overall flavor analysis model is used to determine the causal relationship between the basic nodes, the metabolome nodes and the flavor nodes, and the probability distribution of the non-observed influencing nodes.
[0010] Optionally, based on the flavor to be improved, causal relationships and node values, key cause nodes affecting the flavor to be improved are determined, including: obtaining an individual flavor analysis model according to the causal relationships and node values 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 basic nodes and 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 order of causal effect from strong to weak.
[0012] Optionally, determining the key cause nodes that affect the flavor to be improved based on the cause nodes includes: taking compounds corresponding to a preset number of cause nodes as the key cause 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 in the following manner: 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 a 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 dimension 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, 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, including: 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, obtaining the trained overall flavor analysis model.
[0018] Optionally, there is a first causal relationship between the base node and the metabolome node, and there is 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 is used to determine, based on the flavor collection data, a causal relationship among a basic 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;
[0022] The second determining module is used to determine the key cause nodes that affect the flavor to be improved based on the flavor to be improved, the cause-effect 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, and the probability distribution of the non-observation influencing node.
[0024] Optionally, the second determination module is specifically used to: obtain an individual flavor analysis model according to 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 nodes that affect the flavor to be improved output by the individual flavor analysis model based on the cause effect; and determine the key cause nodes that affect the flavor to be improved according to 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 multiple ancestor nodes that affect the flavor node corresponding to the flavor to be improved from the basic nodes and the metabolome nodes through the individual flavor analysis model; obtain the causal effect of each of the multiple ancestor nodes on the flavor to be improved through the individual flavor analysis model; and obtain the cause nodes that affect the flavor to be improved through the individual flavor analysis model as ancestor nodes sorted in order of causal effect from strong to weak.
[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 effect from strong to weak.
[0027] Optionally, when the first determination module is used to input the flavor collection data into the overall flavor analysis model to 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, which is used to obtain an overall flavor analysis model in the following manner: obtaining training samples, the training samples include flavor sample data and labels of 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 a 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, and 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 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 the flavor sample data, it is specifically used to: preprocess 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 dimension reduction processing; 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 there is 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, in which computer program instructions are stored. 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, device, equipment, 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 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, are determined according to the flavor collection data, so that based on the flavor to be improved, the causal relationship and the node value, the key cause node affecting the flavor to be improved is determined, and 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 for an embodiment of the present application;
[0041] Figure 2 A flow chart of a flavor analysis method provided in one embodiment of the present application;
[0042] Figure 3 A flow chart 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] Fig. 9 A schematic diagram of a flavor analysis system provided in one embodiment of the present application;
[0049] Fig.10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work 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 a discipline that studies 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, which in turn affects 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. Commonly used 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 the flavor characteristics of food to ensure product quality, develop new products, improve recipes or meet consumer needs. For example, the flavor characteristics of coffee must meet consumer needs and are the most direct factor affecting consumer preferences. At present, when analyzing the flavor of food, the flavor of food can be evaluated by manual sensory evaluation, that is, a group of professionally trained assessors analyze the food samples. The assessors can keenly perceive and describe the sensory attributes of the food samples such as color, aroma and taste. During the sensory evaluation process, the evaluation results are usually recorded in the form of a score sheet or radar chart to quantify the flavor characteristics of the food samples. However, with the development of scale and group production of food, it is difficult to achieve the purpose of controlling food quality by relying solely on assessors for manual sensory evaluation; at the same time, manual sensory evaluation is easily affected by the subjectivity of the assessors, and factors such as the assessors' work experience, personal preferences, regional differences and olfactory fatigue will directly affect the evaluation results 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, the flavor analysis of food is usually carried out in the following ways: obtaining sensory evaluation data and metabolome data of food samples, wherein the metabolome data is obtained, for example, by gas chromatography-mass spectrometry (GC-MS) and liquid chromatography-mass spectrometry (LC-MS); obtaining the correlation between sensory evaluation data and metabolome data by multivariate statistical analysis or machine learning methods to help understand the flavor formation mechanism of food. According to the correlation, the compound components consistent with the sensory evaluation trend are identified, and the compound components are the key factors affecting the flavor of food. However, the correlation between sensory evaluation data and metabolome data cannot accurately reflect the causal relationship, because correlation is not equal to causality, which may lead to the emergence of pseudo-correlation, such as two variables may be affected by another common factor (such as altitude), resulting in misleading results. Therefore, the key influencing factors obtained by the above method are not accurate enough. At the same time, for a given food sample, it is time-consuming, labor-intensive and costly to re-establish the metabolome and sensory evaluation tasks; and it is difficult to estimate the flavor outside the food sample (for example, if there are food samples with a storage time of 1 week and 1 month, how to estimate the flavor of 2 weeks). In addition, related technologies also face the need to repeat sensory evaluation and metabolomics measurement, which, in the context of large-scale and group development of food production, leads to uncontrollable experimental costs. Manual sensory evaluation is affected by the psychological and physiological state of the assessor, which is prone to human errors and affects the repeatability and reliability of the evaluation results. In addition, manual sensory evaluation has a large number of 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, based on the causal relationship between 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, and the node values of the non-observed influencing nodes corresponding to the metabolome nodes and the flavor nodes respectively, the key cause nodes affecting the flavor to be improved are determined, and 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] In the following, the application scenarios of the solutions 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, the application scenario includes: terminal equipment. The terminal equipment may also be referred to as user equipment (UE), mobile station (MobileStation), mobile terminal (Mobile Terminal), terminal (Terminal), etc. In actual applications, the terminal equipment is, for example: desktop computers, notebooks, personal digital assistants (PDA), smart phones, tablet computers, etc.
[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 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 may be an integrated server or a distributed server across multiple computers or computer data centers. The server may include hardware, software, or an embedded logic component or a combination of two or more such components for executing appropriate functions supported or implemented by the server. The server is, for example, a blade server, a cloud server, etc., or may be a server group composed of multiple servers. The terminal device and the server may communicate through a wired network or a wireless network. In an embodiment of the present application, the server may perform 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 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 does not limit the equipment included in 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 Flow chart of a flavor analysis method provided in an 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 the embodiment of the present application, the flavor improvement instruction for the object to be analyzed may be input by a user to the electronic device executing the embodiment of the present method, or may be sent by other devices to the electronic device executing the embodiment of the present method. Exemplarily, taking the object to be analyzed as Gesha coffee, the attribute data of Gesha coffee may include, for example, bean species, altitude, roasting method, storage time and storage method, etc.; the metabolome data of Gesha coffee may include, for example, the concentration of different compounds; the sensory evaluation data of Gesha coffee may include, for example, alcohol content, acidity and aftertaste, etc. In this step, after receiving the flavor improvement instruction for the object to be analyzed, the flavor collection data of the object to be analyzed and the flavor to be improved may be obtained. Among them, the flavor collection data may include one or more attribute data, one or more metabolome data and one or more sensory evaluation data; the number of flavors to be improved is at least one, and the flavor to be improved is, for example, the alcohol content of the object to be analyzed. Table 1 shows the flavor collection data of Gesha coffee, which can be understood as the current flavor data of Gesha coffee, and the flavor to be improved of Gesha coffee is, for example, to increase the alcohol content of Gesha coffee from 7 to 9.
[0075] Table 1
[0076]
[0077] S202. Determine, based on the flavor collection data, the causal relationship among 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-observation influence nodes corresponding to the metabolome node and the flavor node, respectively.
[0078] It can be understood that the mechanism of flavor generation does not change due to differences in varieties and processing methods, that is, causal invariance. Flavor substances usually come 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] Exemplarily, taking the Gesha coffee as an example, the basic nodes corresponding to the attribute data of the Gesha coffee can also be understood as causal variable nodes, and the basic nodes include, for example, altitude and roasting method, wherein the altitude is the altitude at which the Gesha coffee is planted, and the roasting method is the roasting degree of the Gesha coffee beans (such as light roasting, medium roasting or deep roasting, etc.). The metabolome nodes corresponding to the metabolome data of the Gesha coffee can also be understood as mediating variable nodes, that is, the compound components in the Gesha coffee beans, for example, 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. The flavor nodes corresponding to the sensory evaluation data of the Gesha coffee can also be understood as result variable nodes, for example, the flavor characteristics of the Gesha coffee (such as acidity, bitterness and aroma intensity, etc.). The non-observational influencing nodes corresponding to the metabolome nodes and the flavor nodes 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, therefore, the exogenous noise nodes (such as N are introduced in the embodiment of the present application) are introduced. 1 ,…,N m Representation), used to represent unobserved factors, thereby supplementing the integrity of causal relationships. The node values of the non-observed influencing nodes corresponding to the metabolome nodes and the flavor nodes can be determined according to 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 and indirect causes of the target, and can be used to draw causal conclusions by implying causal relationships; 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 nodes and the flavor nodes, can be determined according to the flavor collection data through the overall flavor analysis model.
[0080] Optionally, there is a first causal relationship between the base node and the metabolome node, and there is 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 cause-effect relationship, and the node value.
[0083] Exemplarily, referring to Table 1, the flavor of Gesha coffee to be improved, for example, is to increase the alcohol content of Gesha coffee from 7 to 9. According to the cause-effect relationship, all the cause nodes that affect the alcohol content can be determined from the basic nodes and the 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 according to the strength of the causal effect. For how to determine the key cause nodes that affect the flavor to be improved based on the flavor to be improved, the cause-effect relationship and the node value, please refer to the subsequent embodiments, which 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, so as 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, are determined according to the flavor collection data, so that based on the flavor to be improved, the causal relationship and the node value, 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.
[0085] Figure 3 This is a flow chart of a flavor analysis method provided by another embodiment of the present application. Based on the above embodiment, 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 a flavor to be improved, wherein 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 the present 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, wherein the overall flavor analysis model is used to determine the causal relationship between the basic nodes, the metabolome nodes and the flavor nodes, and the probability distribution of the non-observed influencing nodes.
[0090] In this step, the model structure of the overall flavor analysis model can be constructed based on the causal discovery method. Specifically, for example, the model structure of the overall flavor analysis model can be constructed based on the Bayesian network, wherein 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. The overall flavor analysis model can also be other graph models. For specific training methods to obtain the overall flavor analysis model, please refer to the subsequent embodiments, which will not be described in detail here. Exemplarily, the flavor collection data of the object to be analyzed is input into the overall flavor analysis model, and the causal relationship and node value output by the overall flavor analysis model can be obtained. Figure 4 A schematic diagram of an overall flavor analysis model provided in an embodiment of the present application, such as 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-observational 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-observational influence nodes include N 1 、N 2 、N 3 、N 4 、N 5 and N 6 ; There is a first causal relationship between the base node and the metabolome node, that is, the base node is the cause node of the metabolome node; There is a second causal relationship between the metabolome node and the flavor node, that is, the metabolome node is the cause node of the flavor node. It can be understood that each node in the overall flavor analysis model represents a different variable (such as treatment, result, covariate, etc.), each edge in the overall flavor analysis model represents a causal relationship between variables, and the probability distribution of the non-observed influencing 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 non-observed influence nodes (i.e., exogenous noise nodes) can be degraded from the original probability distribution to specific values. Taking compound 1 in the metabolome node as an example, compound 1 corresponds to the exogenous noise node N 1 , the target basic nodes that affect the metabolome nodes are determined from the basic nodes by the overall flavor analysis model as roasting method, altitude and storage time. Then the exogenous noise node N can be obtained by the following formula 1 1 Node value:
[0093] Compound 1 = 5*baking method + 0.2*altitude - 2*storage time + N 1 Formula 1
[0094] Wherein, 5, 0.2 and 2 in Formula 1 are the model parameters of the overall flavor analysis model; N 1 To calculate through residual, assume that N 1 ~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 get N 1 The node value of is 5. Similarly, the target metabolome node that affects the flavor node can be determined from the metabolome node through the overall flavor analysis model, and the node value of the non-observed influencing node corresponding to the flavor node can be determined based on the metabolome data and the model parameters of the overall flavor analysis model corresponding to the target metabolome node.
[0095] In the embodiment of the present application, Figure 2 The step S203 may further include the following two steps S303 and S304:
[0096] S303: Obtain an individual flavor analysis model through the overall flavor analysis model according to the cause-effect relationship and the node value.
[0097] It can be understood that, based on the counterfactual reasoning method, the overall flavor analysis model can be assumed to be causally invariant, and the mechanism of generating flavors does not change due to different varieties and processing methods, so as to extract causal inferences for individuals from the overall flavor analysis model and 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 the individual's covariate value, processing status and other information are brought into the overall flavor analysis model to obtain an individual flavor analysis model. Exemplarily, Figure 5 A schematic diagram of an individual flavor analysis model provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, based on Figure 4 , after obtaining the node values of the exogenous noise nodes (i.e., non-observational influence nodes) corresponding to the metabolome nodes and flavor nodes respectively, the node values obtained by degrading the exogenous noise nodes can be substituted into the overall flavor analysis model to obtain the individual flavor analysis model.
[0098] S304 , inputting the flavor to be improved into the individual flavor analysis model, and obtaining 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 to be improved of Gesha coffee is, for example, to increase the alcohol content of Gesha coffee from 7 to 9. Then, the flavor to be improved is input into the individual flavor analysis model, and the cause nodes that affect the flavor to be improved and the causal effects of the cause nodes on the flavor to be improved output by the individual flavor analysis model can be obtained.
[0100] Further, 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 basic nodes and 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 order of causal effect from strong to weak.
[0101] The ancestor nodes in this embodiment refer to all nodes that are located before a certain node on the path and affect the node. 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 a 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., ancestor 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 sample i at present, Y represents the target sensory evaluation data; E[Y|do(X t =t+1),X i ], which means predicting the treatment result of adding one unit to the individual sample 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 treatment; 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 one unit of individual samples can be predicted. Based on the observation of the current individual sample, each intervenable variable X t Individual causal effect size for a unit change and
[0104] In one example, refer to Figure 5Taking the example of improving the alcohol content of Gesha coffee from 7 to 9, after obtaining the causal effect of each ancestor node on alcohol content in the ancestor nodes affecting alcohol content through the individual flavor analysis model according to the above formulas 2 and 3, the ancestor nodes affecting alcohol content can be sorted in the order of causal effect from strong to weak, so as to obtain the cause nodes affecting the flavor to be improved, and the causal effect of the cause node on alcohol content is the causal effect of the corresponding ancestor node on alcohol content. Table 2 shows the cause nodes affecting alcohol content obtained in the order of causal effect from strong to weak.
[0105] Table 2
[0106] Cause Node Causal Effect Storage time <![CDATA[a 1 ]]> Baking method <![CDATA[a 2 ]]> Compound 1 <![CDATA[a 3 ]]> Compound 2 <![CDATA[a 4 ]]> Bean seeds <![CDATA[a 5 ]]> altitude <![CDATA[a 6 ]]>
[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 Typica coffee from 7 to 8.
[0108] Table 3
[0109]
[0110]
[0111] Figure 6 A schematic diagram of an individual flavor analysis model provided in another embodiment of the present application is 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 obtains the cause nodes that affect the mellowness of Typica coffee and the causal effects of the cause nodes on the mellowness of Typica coffee according to the above formula 2 and formula 3. Table 4 shows the cause nodes that affect the mellowness of Typica coffee obtained in the order of causal effects from strong to weak.
[0112] Table 4
[0113] Cause Node Causal Effect Baking method <![CDATA[d 1 ]]> Compound 2 <![CDATA[d 2 ]]> Compound 1 <![CDATA[d 3 ]]> Storage time <![CDATA[d 4 ]]> altitude <![CDATA[d 5 ]]> Bean seeds <![CDATA[d 6 ]]>
[0114] In another possible implementation, for multiple flavors to be improved (such as alcohol content and acidity), the causal effect of each ancestor node in the ancestor node that affects alcohol content on the flavor to be improved can be obtained based on the individualized multi-objective causal effects. The individualized multi-objective causal effects involve a detailed analysis of the causal effects of each individual under multiple treatments or interventions, which usually includes estimating the individual's causal effects and evaluating them on multiple targets (such as multiple outcome variables). Specifically, based on the above formulas 2 and 3, the causal effect of each ancestor node in the ancestor node that affects alcohol content on the flavor to be improved can be obtained by the following formulas 4 and 5:
[0115]
[0116] Where 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 flavor to be improved as alcohol content and acidity as an example, after obtaining the weighted causal effect of each ancestor node on alcohol content and acidity in the ancestor nodes affecting alcohol content and acidity through the individual flavor analysis model according to the above formulas 4 and 5, the ancestor nodes affecting alcohol content and acidity can be sorted in the order of weighted causal effect from strong to weak, thereby obtaining the cause nodes affecting alcohol content and acidity, and the weighted causal effect of the cause node on alcohol content and acidity is the weighted causal effect of the corresponding ancestor node on alcohol content and acidity. Table 5 shows the cause nodes affecting alcohol content and acidity obtained in the order of weighted causal effect from strong to weak.
[0118] Table 5
[0119]
[0120]
[0121] It can be understood that by quantifying and sorting the cause nodes according to the size of the causal effect through the individual flavor analysis model, the key influencing factors affecting the flavor to be improved can be deeply analyzed, 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 that affect the flavor to be improved are obtained, key cause nodes that affect the flavor to be improved can be determined based on the cause nodes.
[0124] Further, optionally, determining the key cause nodes that affect 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 effect 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 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 compound 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 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 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. For example, referring to Table 2, the storage time can be shortened, the baking method can be changed to medium baking, compound 1 can be treated to increase the compound expression amount, and compound 2 can be treated to increase the compound expression amount. Referring to Table 5, compound 1 can be treated to reduce the compound expression amount, the baking method can be changed to dark baking, the storage time can be shortened, compound 2 can be treated to increase the compound expression amount, and compound 3 can be treated to increase the compound expression amount.
[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 disturbances, 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 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 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, and the key cause nodes that affect the flavor to be improved are determined according to the cause nodes, 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 a specific food sample can be accurately inferred through limited food samples, thereby reducing experimental costs.
[0128] Based on the above embodiments, Figure 7 The flowchart of the training method of the overall 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 . Obtain training samples. The training samples include flavor sample data and labels of sample objects. The flavor sample data include attribute sample data, metabolome sample data, and sensory evaluation sample data.
[0130] For example, taking the sample object as coffee (such as Gesha coffee), there are many factors that affect coffee (coffee beans), including bean species, origin, altitude, etc. in the planting stage, picking strategies in the picking stage, water washing and honey treatment in the primary processing, light roasting, medium roasting or deep roasting in the deep processing, and storage, which will affect the final flavor of 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, etc.), picking period (such as fruit maturity or fruit color, etc.), processing method (such as dry fermentation, wet fermentation, honey treatment, or barrel fermentation, etc.), roasting method, roasting degree, storage time, storage method, grinding degree, extraction method, formula, ratio, etc.
[0131] The sample object can be introduced into a gas chromatograph (GC), and after separation by a capillary column, the outflow components are divided into two paths by a diverter valve, one of which enters a chemical detector to obtain the original data of the odor characteristics composed of the original data of the chromatogram and mass spectrometer (i.e., the chromatogram and mass spectrometer data of the content of each volatile component and the chemical structure of the food). Among them, the chemical detector is, for example, a flame ionization detector (Flame Ionization Detector, FID) or a mass spectrometer (Mass Spectrometer, MS). According to the original data of the odor characteristics, the metabolome sample data is obtained. It can be understood that the 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, which provides a biochemical basis for finding flavor substances that meet sensory evaluation. In particular, the sensory evaluation closest to consumers analyzes the metabolism of flavor substances in coffee beans, understands the impact on the accumulation of these flavor substances during seed processing and storage, and thus identifies the key metabolic steps that determine the quality of coffee. The sensory evaluation sample data of the sample object is obtained, for example, 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 basic nodes corresponding to attribute sample data, metabolome nodes corresponding to metabolome sample data, flavor nodes corresponding to sensory evaluation sample data, and non-observation influence nodes. The model structure is used to indicate the causal relationship among basic nodes, metabolome nodes, and flavor nodes, and the probability distribution of non-observation influence nodes.
[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 a Bayesian network, which 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, that is, the conditional independence between variables is determined through statistical tests; second, a preliminary causal graph is constructed, that is, a preliminary directed acyclic graph (DAG) is constructed based on the conditional independence test results; then, model learning is performed, that is, the causal graph structure is adjusted, false causal relationships are removed, and the direction of the edges is optimized. The accuracy of the model can be checked on the verification data (i.e., model verification is performed) and a conditional independence test is 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). Exemplarily, taking coffee as an example, the basic nodes correspond to environmental variables such as altitude and roasting method, wherein the altitude is the altitude of coffee planting, and the roasting method is the roasting degree 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 the flavor variables corresponding to the flavor nodes, for example, the 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] Considering that causal invariance is an important concept in causal inference and causal discovery, which involves the consistency of causal relationships under different environments or conditions, this feature can be used to combine the collected training samples to obtain the relationship between compounds and the flavor of sample objects under different environments. Optionally, prior knowledge can be incorporated, that is, expert knowledge can be used to define prior constraints in the causal network (i.e., the overall flavor analysis model). For example, expert knowledge can be used to determine that node A is the ancestor node of node B (i.e., the causal effect of node A will be transmitted to node B), and this constraint can be added to the network during the design phase of the overall flavor analysis model. This can be achieved by manually setting or modifying the structure of the causal network. Specific prior constraints include, for example, the effects of altitude and roasting method on metabolomic variables (compound components), the effects of metabolomic variables on flavor variables, and environmental variables (such as altitude, roasting method, etc.) directly affecting flavor variables and indirectly affecting flavor variables through metabolomic variables. The relationship between certain edges or nodes can be fixed in the overall flavor analysis model to ensure that the network structure of the overall flavor analysis model conforms to expert knowledge. For example, consistent causal relationships between compounds can force the existence 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 the variables. Figure 4 , Figure 4The nodes in represent variables, and the edges (i.e., directed arrows) represent 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, which means 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] Exemplarily, 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) Category coding of flavor sample data: The light roasting, medium roasting and dark roasting in the roasting method are coded as sequential data according to their progressive physical meanings, such as 1, 2 and 3 or 3, 2 and 1, instead of 1, 3 and 2, 3 and 1, etc.; other features such as light intensity and picking height should also be converted to numerical data according to similar logic; the classified data is converted to numerical form for model processing. (2) Standardization and normalization of flavor sample data: Scale the data features to the same scale range to ensure that the scales of different data features are consistent and prevent the eigenvalues of the data features from being too different, which will cause difficulties in model training, such as logarithmic transformation of the data features. (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 with data using the storage time as the timestamp and 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 in the data using the mean of the previous and next windows. (4) Performing feature selection and feature dimensionality reduction processing on the flavor sample data: Feature selection processing is used to select features related to the target variable and remove irrelevant or redundant features; for feature dimensionality reduction processing, when the features (feature dimensions) in the training sample are 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 of the model and low computational efficiency. 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 acidity.
[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, for each data table, supervised dimensionality reduction can be performed. 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 the expression of metabolites and sensory evaluation to achieve the prediction of the flavor of the sample object. The influence intensity and explanatory power of the expression pattern of each metabolite on the classification and discrimination of each group of sample objects can be measured by calculating the variable projection importance (Variable Importance for the Projection, VIP), thereby assisting the screening of marker metabolites, such as usually using a VIP value greater than 1.0 as a screening criterion. Optionally, for the performance evaluation of dimensionality reduction processing, affected by factors such as the number of principal components in PLS, the prediction accuracy of the training samples after dimensionality reduction in discriminant analysis can be used to determine the optimal dimensionality reduction dimension in PLS. For example, a preset accuracy ratio can be obtained, and the preset accuracy ratio is, for example, 90%, then the accuracy corresponding to the data after dimensionality reduction needs to reach more than 90% of the accuracy corresponding to 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, the 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 the loss function value is obtained, 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] Further, 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 the label to obtain the 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 residual-based fit index (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 embodiment of the present application comprises the following steps: obtaining training samples, wherein the training samples include flavor sample data and labels of sample objects, wherein 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 a causal discovery method, wherein 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, wherein the model structure is used to indicate the causal relationship between the basic nodes, the metabolome nodes, and the 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 the 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. 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, it can more accurately determine the key cause nodes that affect the flavor to be improved, thereby improving the accuracy and consistency of the analysis results.
[0158] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0159] Figure 8 A schematic diagram of the structure of a flavor analysis device provided in one embodiment of the present application is 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. Among them:
[0160] The acquisition module 801 is used 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.
[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-observation 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 used 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.
[0163] In some embodiments, the first determination module 802 can be specifically used to: input 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 influencing 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 nodes that affect the flavor to be improved output by the individual flavor analysis model based on the cause effect; and determine the key cause nodes that affect the flavor to be improved based on the cause nodes.
[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 dimension of the flavor to be improved into the individual flavor analysis model, and determine multiple ancestor nodes that affect the flavor node corresponding to the flavor to be improved from the basic nodes and the metabolome nodes through the individual flavor analysis model; obtain the causal effect of each of the multiple ancestor nodes on the flavor to be improved through the individual flavor analysis model; and obtain the cause nodes that affect the flavor to be improved through the individual flavor analysis model as ancestor nodes sorted in the order of causal effect from strong to weak.
[0166] Optionally, when the second determination module 803 is used to determine the key cause nodes affecting the flavor to be improved according to the cause nodes, it can be specifically used to: select the compounds corresponding to the first preset number of cause nodes as the key cause nodes according to the causal effect 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 to 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 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-observed 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-observed 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, the preprocessing including at least one of category encoding processing, standardization processing, normalization processing, data filling processing, feature selection processing and feature dimension 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; when the goodness of fit index is greater than a threshold, obtain the trained overall flavor analysis model.
[0172] In some embodiments, there is a first causal relationship between the base node and the metabolome node, and there is a second causal relationship 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, and its implementation principle and technical effect are similar, which will not be repeated here.
[0174] Fig. 9 A schematic diagram of a flavor analysis system provided in an embodiment of the present application is shown in FIG. Fig. 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 used to obtain the attribute sample data of the sample object in response to the input operation of the attribute sample data contained in the flavor sample data of the sample object in the training sample; obtain the configuration information of the preprocessing in response to the configuration operation of preprocessing the flavor sample data, and the configuration information at least includes the preset accuracy ratio when the feature dimension reduction processing is performed on the flavor sample data; obtain the expert knowledge in response to the input operation of the expert knowledge; and obtain the flavor collection data of the object to be analyzed and the flavor to be improved in response to receiving the flavor improvement instruction for the object to be analyzed, and the flavor collection data includes the attribute data, the metabolome data and the 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 object in the training sample through the omics instrument, and to obtain sensory evaluation sample data contained in the flavor sample data of the sample object in the training sample based on the sensory evaluation of the consumer; 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 condition the conditional probability distribution and causal relationship in the overall flavor analysis model on the characteristics of the individual according to the flavor collection data of the object to be analyzed 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, and determine the key cause nodes that affect the flavor to be improved according to the cause nodes.
[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, and its implementation principle and technical effect are similar, which will not be repeated here.
[0180] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Fig.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] The processor 1001 is used to execute the computer-executable instructions stored in the memory 1002 to implement the flavor analysis method described in the aforementioned method embodiment. The processor 1001 may be a central processing unit (CPU), or 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, an electronic device with processing functions such as a terminal device or a server.
[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 through 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, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or 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 communicate 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 mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0189] An exemplary readable storage medium is coupled to the processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit. Of course, the processor and the readable storage medium can also exist in the flavor analysis device as discrete components.
[0190] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[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 it. 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 replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate 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, wherein the flavor collection data includes attribute data, metabolome data, and sensory evaluation data; Determining, according to 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; Based on the flavor to be improved, the cause-effect relationship and the node value, a key cause node affecting the flavor to be improved is determined.
2. The flavor analysis method according to claim 1, characterized in that: 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, and the overall flavor analysis model is used to determine the causal relationship between the basic node, the metabolome node and the flavor node and the probability distribution of the non-observation influence node.
3. The flavor analysis method according to claim 2, characterized in that: 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, comprises: Obtaining an individual flavor analysis model through the overall flavor analysis model according to the cause-effect relationship and the node value; Inputting the flavor to be improved into the individual flavor analysis model, and obtaining a cause node that affects the flavor to be improved output by the individual flavor analysis model based on a cause-effect effect; According to the cause nodes, key cause nodes affecting the flavor to be improved are determined.
4. The flavor analysis method according to claim 3, characterized in that: The step of inputting the flavor to be improved into the individual flavor analysis model and obtaining a cause node output by the individual flavor analysis model that affects the flavor to be improved based on a causal effect includes: Inputting the flavor dimension to be improved into the individual flavor analysis model, and determining a plurality of ancestor nodes that affect the flavor node corresponding to the flavor to be improved from the basic node and the metabolome node through the individual flavor analysis model; Obtaining the causal effect of each ancestor node of the plurality of ancestor nodes on the flavor to be improved through the individual flavor analysis model; The cause nodes that affect the flavor to be improved obtained by the individual flavor analysis model are ancestor nodes that are sorted in order of causal effect from strong to weak.
5. The flavor analysis method according to claim 4, characterized in that: Determining the key cause nodes affecting the flavor to be improved according to the cause nodes includes: 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.
6. 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 basic node that affects the metabolome node from the basic nodes through 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 basic 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, a node value of a non-observed influencing node corresponding to the flavor node is determined.
7. The flavor analysis method according to any one of claims 2 to 6, 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 basic 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-observation influence node, the model structure being used to indicate a causal relationship between the basic node, the metabolome node, and the flavor node, and a probability distribution of the non-observation 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; Based on the sensory evaluation prediction data and the label, obtaining a loss function value; 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.
8. The flavor analysis method according to claim 7, characterized in that: The training of the overall flavor analysis model based on the flavor sample data comprises: 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.
9. The flavor analysis method according to claim 8, characterized in that: The feature dimensionality reduction process is used to perform supervised dimensionality reduction on the metabolome data.
10. The flavor analysis method according to claim 7, 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 value, a trained overall flavor analysis model is obtained.
11. The flavor analysis method according to any one of claims 1 to 6, characterized in that: There is a first causal relationship between the base node and the metabolite group node, and there is a second causal relationship between the metabolite group node and the flavor node.
12. 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, metabolome data, and sensory evaluation data; A first determination module is used to determine, 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; The second determining module is used to determine a key cause node affecting the flavor to be improved based on the flavor to be improved, the cause-effect relationship and the node value.
13. 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 11.
14. 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 11 is implemented.
15. 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 11 is implemented.
Citation Information
Patent Citations
System and method for formulating a foodstuff
CN105556544A
Food flavor evaluation method and system based on big data analysis
CN118940156A
Food flavor feature prediction method and device, electronic equipment and storage medium
CN118966484A
System and method for formulating a foodstuff
US20160165935A1
Methods, systems, and computer program product for implementing an intelligent system with dynamic configurability
US20190130305A1
Cited By
Seasoning low-temperature fermentation dynamic control method based on reinforcement learning
CN120353135A