Food formula generation method and system based on knowledge graph
By constructing a food ingredient knowledge map and performing multiple screenings and evaluations, the problem of difficult to personalize the production method of food formulas in the existing technology is solved, and rapid and efficient food formula generation is achieved, which improves the efficiency and quality of food research and development.
Patent Information
- Application Number
- CN202510611688.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-13
AI Technical Summary
The existing food formula generation methods are difficult to meet the special needs of different consumers quickly and efficiently, and large-scale personalized food formula customization cannot be achieved, which limits the development of food companies in the high-end customization market.
A food knowledge map is constructed based on the knowledge map, and through similarity calculation and multiple screening processes, an improved formula that meets specific requirements is generated. Combined with the nutritional adaptation index, comprehensive cost index and process feasibility index, we can screen out improved formula that meets the standards.
It has improved the accuracy and efficiency of food screening, generated a variety of creative and rich food formulas to meet consumers' diverse needs, improved the automation and intelligence level of food research and development, and shortened the R&D cycle.
Smart Images

Figure CN120452595A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of food formula, and specifically to a food formula generation method and system based on knowledge graph. Background Art
[0002] Food formulation design plays a vital role in the development of the food industry. An excellent food formulation not only enhances the taste, flavor, and nutritional value of food, meeting the increasingly diverse and personalized needs of consumers, such as developing healthy food formulations like low-sugar, low-fat, and high-fiber options, but also helps food companies reduce production costs, improve efficiency, and stand out in the fiercely competitive market. With the improvement of people's living standards and increased health awareness, the demand for high-quality, nutritious, and healthy food continues to grow. The application prospects of food formulation generation methods are becoming increasingly broad, creating greater economic benefits for companies.
[0003] In the competitive food industry, product homogeneity is a common phenomenon. To meet the taste preferences, nutritional needs, and special dietary requirements of different consumers, such as specially formulated foods for diabetics and people with allergies, food companies need to continuously adjust and optimize food formulas to achieve product differentiation and personalization, thereby gaining market share. In addition, as consumers' attention to food safety and quality continues to increase, companies also need to adjust their formulas in a timely manner, reducing or avoiding the use of certain additives, preservatives, and other ingredients that may pose potential hazards to human health, and selecting safer and more natural ingredients to adapt to market trends and regulatory requirements. At the same time, factors such as raw material supply, price fluctuations, and the emergence of new research results may also prompt companies to adjust food formulas to reduce production costs and improve product quality and stability.
[0004] Traditional food formula development often relies on experience and trial and error. For adjusted food formulas, most existing technologies lack a scientific and systematic comprehensive evaluation method, which requires a lot of experiments and debugging, consumes a lot of time, manpower and material resources, and has a low success rate.
[0005] With the increasing diversification and personalization of consumer needs, existing food formula generation methods are unable to quickly and efficiently meet the special needs of different consumers, and cannot achieve large-scale personalized food formula customization, which limits the development space of food companies in the high-end customization market. Summary of the Invention
[0006] (1) Technical problems solved In response to the shortcomings of the existing technology, the present invention provides a food formula generation method based on knowledge graph, which at least solves the problem that the existing food formula generation method is difficult to quickly and efficiently meet the special needs of different consumers and cannot achieve large-scale personalized food formula customization.
[0007] (2) Technical solution To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for generating food recipes based on knowledge graphs, comprising: Step 1: Obtain ingredient data from a known knowledge graph and build an ingredient knowledge graph based on a graph dataset tool. Input the initial recipe into the ingredient knowledge graph, obtain alternative ingredients for different ingredients in the initial recipe, and form a set of initially screened ingredients. Step 2: Determine the recipe improvement requirements, and based on the recipe improvement requirements, select the ingredient data that meets the requirements from the primary screening ingredient set, generate a secondary screening ingredient set, and merge the initial ingredients of the initial recipe with the secondary screening ingredient set to generate an improved recipe set; Step 3: Arrange and combine each ingredient in each data group in the improved recipe set to obtain several improved recipes; Step 4: Calculate the evaluation index set for each improved recipe based on the ingredient data of various ingredients in different improved recipes, and perform a comprehensive analysis based on the parameters in the evaluation index set to obtain a comprehensive recipe evaluation index; Step 5: Calculate the comprehensive evaluation index of the initial formula by referring to the methods of steps 1 to 4, and conduct a comprehensive analysis of the comprehensive evaluation index of the improved formula and the comprehensive evaluation index of the initial formula to obtain the deviation index. Filter out the improved formulas that meet the standards based on the deviation index, and sort the improved formulas that meet the standards according to the comprehensive evaluation index to generate a formula execution priority chart.
[0008] In the preferred embodiment of the above-mentioned food recipe generation method based on knowledge graph, the recipe improvement requirements include cost restriction requirements and food ingredient restriction requirements; when performing secondary screening according to the recipe improvement requirements, if the restriction requirement is a cost restriction requirement, the price cost of the initial food ingredient is compared with the price cost of the substitute food ingredient. If the price cost of the initial food ingredient is greater than the price cost of the substitute food ingredient, the substitute food ingredient meets the requirements, and a secondary screening food ingredient set is generated; if the recipe improvement requirement is an food ingredient restriction requirement, which means that the ingredients of some ingredients are restricted, the substitute food ingredient is not allowed to contain the restricted ingredients, and the food data of the substitute food ingredient that does not contain the restricted ingredients is used to generate a secondary screening food ingredient set.
[0009] In the preferred embodiment of the above-mentioned food recipe generation method based on knowledge graph, the secondary screening ingredient set contains different data groups, each data group corresponds to an ingredient in the initial recipe, and the ingredients in this data group are all substitutes for the ingredients in the initial recipe; when one or more of the initial ingredients have no substitutes, the initial ingredients are included in the data group of the secondary screening ingredient set.
[0010] In the preferred embodiment of the above-mentioned food recipe generation method based on knowledge graph, if the restriction requirement is a cost restriction requirement, the various initial ingredients in the initial recipe are respectively added to the data group of the secondary screening ingredient set to form an improved recipe set; if the recipe improvement requirement is an ingredient restriction requirement, the initial ingredients with restricted ingredients are screened out, and the remaining initial ingredients are respectively added to the data group of the secondary screening ingredient set to form an improved recipe set.
[0011] In the preferred embodiment of the above-mentioned method for generating food formulas based on a knowledge graph, the evaluation index set includes a nutritional adaptability index, a comprehensive cost index, and a process feasibility index; wherein: By analyzing the nutritional content data of each ingredient in the improved formula, the nutritional adaptability index of each improved formula was obtained. The calculation formula is as follows: ; Among them, NAI represents the nutritional adaptation index of the improved formula; Indicates the amount of the i-th ingredient; represents the content of the jth nutrient in the i-th ingredient; i represents the sequence number of the ingredient in the improved formula, n represents the number of the ingredient; j represents the sequence number of the nutrient in the ingredient, and m represents the number of the nutrient; represents the daily reference of nutrient j; represents the weight coefficient of nutrient j, and .
[0012] In the preferred embodiment of the food recipe generation method based on the knowledge graph, the cost data of each ingredient in the improved recipe is analyzed to obtain the comprehensive cost index of each improved recipe. The calculation formula is as follows: ; Among them, CER represents the comprehensive cost index of the improved formula; represents the net material rate of the i-th ingredient, represents the purchase price of the i-th ingredient; W represents the labor cost; E represents the energy rate; represents the working hours required to process the i-th ingredient.
[0013] In the preferred embodiment of the above-mentioned method for generating food recipes based on a knowledge graph, the process feasibility index of each improved recipe is obtained by analyzing the ingredient type and processing data of each ingredient in the improved recipe. The calculation formula is as follows: , Among them, PFE represents the improved formulation process feasibility index; represents the number of independent operation steps required for the i-th ingredient; represents the ratio of the standard deviation of the processing parameter of the i-th food to the target value; represents a constant; The weight coefficient indicating the utilization rate of food materials; The weight coefficient representing the processing complexity; The weight coefficient representing process stability.
[0014] In the preferred embodiment of the food formula generation method based on the knowledge graph, the nutritional adaptability index, the comprehensive cost index and the process feasibility index are comprehensively analyzed to obtain the comprehensive evaluation index of the formula, and the formula is as follows: , Among them, FCI represents the comprehensive evaluation index of the formula. represents the weight coefficient of the nutritional adaptation index, The weight coefficient representing the inverse of the comprehensive cost index; Represents the weight coefficient of the process feasibility index.
[0015] In the preferred embodiment of the food formula generation method based on the knowledge graph, the deviation index is calculated based on the comprehensive evaluation index of the improved formula and the comprehensive evaluation index of the initial formula, and the formula is as follows: ; Among them, PCZ represents the deviation index, represents the comprehensive evaluation index of the improved formula; Indicates the comprehensive evaluation index of the initial formulation; A deviation index threshold is set, and the deviation index is compared with the deviation index threshold. When the deviation index ≥ the deviation index threshold, it is determined that the corresponding improved formula meets the standard.
[0016] (3) Beneficial effects The present invention provides a method for generating food recipes based on a knowledge graph, which has the following beneficial effects: (1) By constructing a knowledge graph of ingredients and performing two screening processes, we can accurately select ingredients that meet specific conditions from a large number of ingredients based on the requirements of recipe improvement. Compared with the traditional method of selecting ingredients based on experience and subjective judgment, this method greatly improves the screening efficiency and accuracy, and reduces R&D time and costs.
[0017] (2) By permuting and combining the ingredients in the improved recipe set, a variety of improved recipes can be generated. This intelligent combination method can break through the limitations of human thinking and explore more possible combinations of ingredients, providing food R&D personnel with a broader space for innovation and helping to develop more creative and market-competitive food products.
[0018] (3) Based on the food material data, the evaluation index set of the improved formula is calculated, and the comprehensive evaluation index of the formula is obtained through comprehensive analysis, which quantitatively evaluates the formula from multiple dimensions. This makes the evaluation of food formulas more scientific, objective and comprehensive. By comparing the comprehensive evaluation index of the improved formula with that of the initial formula, the deviation index is obtained, which can accurately screen out improved formulas that meet the standards and are better. Based on the analysis results of the deviation index, R&D personnel can clearly understand the gap between the improved formula and the initial formula, make targeted adjustments and improvements to the formula, and continuously improve the quality and performance of the food.
[0019] (4) The entire method process is systematic and scientific, organically combining technologies such as knowledge graphs, data processing, and evaluation and analysis to achieve automated and intelligent food formula generation. From acquiring food data and building knowledge graphs to screening and combining ingredients and evaluating and optimizing formulas, each step is closely connected and operates in a coordinated manner, greatly improving the efficiency of food research and development, shortening the product development cycle, and enabling companies to respond to market demand more quickly and launch new food products. It can effectively support food companies in product innovation and differentiated competition. By quickly generating and screening food formulas that meet specific requirements, companies can meet the diverse and personalized needs of consumers. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a schematic diagram of the steps of a food recipe generation method based on a knowledge graph of the present invention. DETAILED DESCRIPTION
[0021] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0022] Example 1:
[0023] See also Figure 1 The present invention provides a method for generating a food recipe based on a knowledge graph, comprising: Step 1: Obtain the ingredient data of the known knowledge graph, and build the ingredient knowledge graph based on the graph data group tool, input the initial recipe into the ingredient knowledge graph, obtain alternative ingredients for different ingredients in the initial recipe, and form the initial screening ingredient set.
[0024] The solution builds a food recipe generation method based on a knowledge graph. By collecting and preprocessing ingredient data, it forms an ingredient knowledge graph and imports it into a graph database for storage and management. Using knowledge embedding and representation learning tools, the structure and relationships of the ingredient knowledge graph are created. Each node represents an ingredient entity and its attributes, and edges represent the relationships between entities. When an initial recipe is entered, the method parses and identifies the ingredient name, queries the knowledge graph for the corresponding node and its associated quantitative data, and recommends substitutes for each ingredient based on similarity calculations, forming an initial set of selected ingredients.
[0025] Step 101: Acquire food material data, which may be nutrient content data, functional characteristics data, flavor characteristics data, and cost data of different food materials; perform pre-processing and collation work such as cleaning and conversion on the collected data to form food material knowledge graph data.
[0026] It should be noted that food material data may also include processing process data.
[0027] It should be noted that basic nutrient content data of food ingredients can be obtained through the USDA food composition data set, the Hong Kong Food Safety Center data set, professional nutrient testing agencies, academic literature and research reports, and online data platforms and tools such as Open Food Facts. Functional property data can be obtained by consulting professional journals in the fields of food science and chemical engineering, such as "Food Science", "Food Chemistry", "Proceedings of the Chinese Society of Agricultural Engineering", etc., to obtain research results and experimental data on the functional properties of food ingredients such as emulsification, foaming, gelation, antioxidant, and water absorption. Flavor characteristic data can be obtained by using flavor analysis instruments, such as gas chromatography-mass spectrometry (GC-MS), electronic nose, electronic tongue and other flavor analysis instruments to conduct qualitative and quantitative analysis of volatile flavor substances in food ingredients to determine the flavor components and their content of the food ingredients; or by referring to flavor data sets and literature, such as professional flavor data sets such as "Flavor Chemicals Database", and academic literature related to food flavor research, to obtain reported food flavor characteristic data and analysis results. Cost data can be obtained through industry reports and statistics. For example, consult food industry reports published by professional market research institutions such as Euromonitor and Nielsen to obtain analytical data on price trends and cost structures in the food ingredient market. Additionally, consult agricultural product price monitoring data published by government statistics or agricultural departments. Alternatively, establish contact with food processing companies, catering companies, and other direct food ingredient purchasers to obtain their ingredient procurement cost data, including bulk purchase prices and long-term contract prices.
[0028] Traditional food recipe generation methods rely on limited and incomplete sources of ingredient data, with inconsistent data quality. This often requires extensive manual collection and organization, resulting in low efficiency. This solution obtains ingredient data from multiple authoritative sources, including nutrient content, functional properties, flavor characteristics, and cost data, ensuring data richness and reliability. Furthermore, the collected data is pre-processed and organized through cleaning and conversion to form a standardized ingredient knowledge graph. This improves data availability and quality, laying a solid foundation for subsequent recipe generation.
[0029] Step 102: Import the organized ingredient knowledge graph data into a graph database such as Neo4j or OrientDB to store and manage the data in the ingredient knowledge graph. Use tools such as OpenKE and TransX for knowledge embedding and representation learning, creating nodes and relationships. Each node represents an entity, such as an ingredient or nutrient content, and edges represent relationships between entities, such as "contains" and "has." This forms the structure of the ingredient knowledge graph, and ultimately, the ingredient knowledge graph. In the knowledge graph, corresponding quantitative data is assigned to each attribute of each ingredient as node attributes. For example, for an apple node, its nutritional content might include protein content (0.3 g / 100 g) and fat content (0.2 g / 100 g); functional characteristics might include dietary fiber content (1.7 g / 100 g); flavor characteristics might include sweetness (approximately 10-15 g of sugar / 100 g); and cost attributes might include price (3 yuan / 500 g).
[0030] In the past, the storage and management of ingredient data during food recipe development lacked systematicity and relevance, making it difficult to maximize the value of this data. Importing organized ingredient knowledge graph data into graph databases like Neo4j or OrientDB for storage and management, and using tools like OpenKE and TransX for knowledge embedding and representation learning to create nodes and relationships, not only enables efficient data storage but also facilitates querying, reasoning, and analysis of ingredient data. By assigning quantitative data to each ingredient as node attributes, this comprehensively and intuitively displays the characteristics of the ingredient, providing richer information support for food recipe development.
[0031] Step 103: When an initial recipe is input into the ingredient knowledge graph, the initial recipe is first parsed to identify the name of each ingredient. The knowledge graph is then searched for nodes corresponding to these ingredient names, and each node and its associated quantitative data are retrieved. Based on similarity calculations within the knowledge graph, the system compares the nutritional content, functional properties, and flavor profiles of different ingredients to recommend several similar substitutes for each ingredient. The system then outputs the quantitative data for these substitutes, forming a preliminary set of screened ingredients.
[0032] It should be noted that similarity calculation can be performed by using a calculation model such as the Euclidean distance calculation model, the cosine similarity calculation model, or the Jaccard similarity coefficient calculation model embedded in the food knowledge graph to calculate the similarity of different ingredients, and screen out ingredients whose similarity reaches a threshold as substitutes. Here, a well-known similarity calculation method can be selected to calculate the similarity values of the ingredients in the initial formula in terms of nutritional content data, functional characteristics data, etc., and then assign appropriate weight coefficients to the two similarity values, such as 0.4 and 0.6, respectively, calculate the comprehensive similarity value, and compare the comprehensive similarity value with the similarity threshold. The similarity threshold can be set to 80% or higher. When the comprehensive similarity value ≥ the similarity threshold, the screening requirements are met.
[0033] In existing food formula optimization, the screening of alternative ingredients often relies on experience, lacks scientific basis and comprehensive considerations, and is difficult to ensure that the alternative ingredients are similar to the original ingredients in multiple aspects, which may lead to a decline in the performance of the formula. When this solution inputs the initial formula into the ingredient knowledge graph, it parses the recipe text to identify the ingredient name, queries the corresponding node in the knowledge graph and its associated quantitative data, and calculates similarities based on the knowledge graph. It comprehensively considers the similarities of the ingredients in terms of nutritional composition, functional properties, flavor characteristics, etc., and recommends several similar substitutes for each ingredient to form an initial set of screened ingredients. This similarity calculation method based on the knowledge graph can more accurately screen out alternative ingredients that meet the requirements, improve the quality and applicability of alternative ingredients, and provide a more reliable option for optimizing food formulas.
[0034] Step 104: Regularly collect new food material data and research results, and update the data in the knowledge graph to ensure the accuracy and timeliness of the information in the food ingredient library.
[0035] Research results and market conditions in the food sector are constantly updated, and ingredient data also needs to be kept up to date, otherwise the accuracy and practicality of recipe generation will be affected. This solution regularly collects new ingredient data and research results, updates the data in the knowledge graph, and ensures the accuracy and timeliness of information in the food ingredient library. This enables the food recipe generation method to adapt to market changes and new research results, providing food companies with recipe solutions that better meet their actual needs.
[0036] Step 2: Determine the requirements for formula improvement, and based on the requirements, screen out the ingredient data that meets the requirements from the primary screening ingredient set, generate a secondary screening ingredient set, and merge the initial ingredients of the initial formula with the secondary screening ingredient set to generate an improved formula set; if one or more of the initial ingredients in the initial formula do not have a replacement ingredient that meets the requirements, continue to use the initial ingredients of the initial formula.
[0037] The solution is a food recipe generation method based on a knowledge graph. Based on the initial screening of the ingredient set, a secondary screening is further performed according to the recipe improvement requirements, and the initial ingredients and the screened ingredients are combined to generate an improved recipe set. Specifically, the recipe improvement requirements are first determined, including cost constraints and ingredient ingredient constraints. Then, the ingredient data that meets the cost or ingredient constraint requirements is screened from the initial screening ingredient set to generate a secondary screening ingredient set. When generating the improved recipe set, if the initial ingredient has an alternative ingredient that meets the requirements, the initial ingredient is replaced with the alternative ingredient; if there is no alternative ingredient that meets the requirements, the initial ingredient continues to be used.
[0038] Step 201: The recipe improvement requirements include cost restriction requirements and food ingredient restriction requirements; when performing secondary screening according to the recipe improvement requirements, if the restriction requirement is a cost restriction requirement, the price cost of the initial food ingredient is compared with the price cost of the substitute food ingredient. If the price cost of the initial food ingredient is greater than the price cost of the substitute food ingredient, the substitute food ingredient meets the requirements, and a secondary screening food ingredient set is generated; if the recipe improvement requirement is a food ingredient restriction requirement, which means that the ingredients of some ingredients are restricted, the substitute food ingredient is not allowed to contain the restricted ingredients, and the food data of the substitute food ingredient that does not contain the restricted ingredients is used to generate a secondary screening food ingredient set.
[0039] For example, if the food formula for people with diabetes restricts the use of sugars such as white sugar, then ingredients containing white sugar will be screened out, and substitutes such as xylitol will be screened out; if the food formula for people with lactose intolerance needs to limit the use of lactose, then ingredients such as raw cow's milk will be screened out, and ingredients such as soy milk and lactose-free milk will be screened out.
[0040] Traditional food formulations present challenges in cost control, making it difficult to effectively reduce production costs while ensuring food quality. When companies refine their formulations, they often struggle to find suitable, lower-cost alternative ingredients, resulting in ineffective cost optimization. When developing food formulations for specific populations (such as those with diabetes or lactose intolerance), traditional methods struggle to accurately identify ingredients that do not contain restricted ingredients. This can result in products that do not meet the health needs of these individuals and may even pose health risks.
[0041] By setting cost constraints, the price of the initial ingredient is compared with that of the alternative ingredients, and alternative ingredients with lower price-costs than the initial ingredient are screened out, generating a secondary screening set of ingredients. This ensures that production costs are effectively reduced while meeting food quality requirements. For example, when a high-priced ingredient in the initial recipe has multiple alternatives, the lower-priced alternative is selected through cost comparison, thereby optimizing cost control. By setting ingredient restrictions, ingredients containing specific restricted ingredients are screened out, ensuring that the alternative ingredients do not contain restricted ingredients. For example, when developing foods for people with diabetes, the use of sugars such as white sugar is restricted, and alternatives such as xylitol are screened out. When developing foods for people with lactose intolerance, the use of lactose is restricted, and ingredients such as soy milk and lactose-free milk are screened out. This can meet the health needs of specific populations and improve the safety and applicability of food.
[0042] Step 202: The secondary screening ingredient set includes different data groups, each data group corresponds to an ingredient in the initial recipe, and the ingredients in this data group are all substitute ingredients for the ingredients in the initial recipe; when one or more of the initial ingredients have no substitute ingredients, this initial ingredient is included in the data group of the secondary screening ingredient set.
[0043] Step 203: If the restriction requirement is a cost restriction requirement, the various initial ingredients in the initial recipe are added to the data group of the secondary screening ingredient set to form an improved recipe set; if the recipe improvement requirement is an ingredient restriction requirement, the initial ingredients with restricted ingredients are screened out, and the remaining initial ingredients are added to the data group of the secondary screening ingredient set to form an improved recipe set.
[0044] When generating improved formulas, traditional food formula improvement methods find it difficult to reasonably integrate initial ingredients and alternative ingredients, especially when there are no suitable alternatives for some initial ingredients, which can easily affect the feasibility and completeness of the improved formula. The initial ingredients of the initial formula are integrated with the set of secondary screened ingredients to generate an improved formula set. When one or more of the initial ingredients have no alternatives, the initial ingredients continue to be selected to ensure the completeness and feasibility of the improved formula. For example, if a certain ingredient in the initial formula has no alternative that meets the requirements after secondary screening, the initial ingredient is retained and combined with other alternative ingredients to form an improved formula, thereby ensuring that the improved formula can be smoothly applied to actual production.
[0045] Step 3: Arrange and combine each ingredient in each data group in the improved recipe set to obtain several improved recipes.
[0046] By using the permutation and combination method, the ingredients in the improved recipe set can be comprehensively recombined according to different ingredient matching principles and gastronomic logic, thereby obtaining several improved recipes. This not only greatly enriches the variety of food recipes, but also meets the taste preferences and personalized needs of different consumers, providing food companies with more innovative options, helping companies stand out in the highly competitive market and develop new products with unique flavors and nutritional value. This method can effectively solve the problem of limited ingredient combinations and lack of innovation caused by human experience in the traditional food recipe development process. In the past, food researchers may have found it difficult to explore novel and unique ingredient combinations due to the limitations of knowledge and experience. However, through the permutation and combination method, this limitation can be overcome, and a variety of possible recipe combinations can be systematically generated to tap into potential high-quality recipes.
[0047] Generating multiple improved formulas through permutations and combinations provides a richer sample base for subsequent formula evaluation and optimization. This allows researchers to more comprehensively analyze and compare different formulas, more accurately identifying high-quality formulas that meet specific requirements, and further improving the efficiency and quality of food formula development.
[0048] Step 4: Calculate the evaluation index set of each improved recipe based on the ingredient data of various ingredients in different improved recipes, and perform a comprehensive analysis based on the parameters in the evaluation index set to obtain the recipe comprehensive evaluation index.
[0049] It should be noted that the evaluation index set includes nutritional adaptability index, comprehensive cost index and process feasibility index.
[0050] Step 401: Analyze the nutritional content data of each ingredient in the improved formula to obtain the nutritional adaptability index of each improved formula. The calculation formula is as follows: ; Among them, NAI represents the nutritional adaptation index of the improved formula; Indicates the amount of the i-th ingredient; represents the content of the jth nutrient in the i-th ingredient; i represents the sequence number of the ingredient in the improved formula, which is a positive integer, and n represents the number of the ingredient; j represents the sequence number of the nutrient in the ingredient, which is a positive integer, such as protein, fat, carbohydrate, dietary fiber, etc., and m represents the number of the nutrient; Indicates the daily reference of nutrient j, which can refer to national or international nutrition standards; for example, protein 60g / day, fat 60g / day, etc. represents the weight coefficient of nutrient j, reflecting its importance in the comprehensive index, which can be adjusted according to actual needs, and For example, when the value of m is 1 to 4, it corresponds to four nutrients: protein, fat, carbohydrates, and dietary fiber. The value of can be: =0.3, =0.2, =0.3, =0.2.
[0051] It should be noted that when calculating the nutritional adaptation index, the parameters involved in the formula need to be normalized and preprocessed to eliminate the dimensions of each parameter to facilitate the calculation of the formula.
[0052] Traditional nutritional assessments of food formulas often focus on a single nutrient or a few nutrients, making it difficult to comprehensively and systematically assess the overall nutritional value of a food formula. This limitation can lead to insufficient nutritional balance in food formulas, failing to meet consumers' diverse demands for healthy foods.
[0053] By comprehensively considering the content and weighting factors of multiple nutrients, this approach enables a comprehensive and systematic assessment of the nutritional value of improved formulas. For example, when calculating the nutritional adaptability index, not only are key nutrients like protein, fat, and carbohydrates considered, but other important nutrients like dietary fiber are also incorporated. By assigning appropriate weighting factors to each nutrient, the importance of key nutrients is highlighted, making the assessment results more scientific and accurate. This helps develop food formulas that better meet human nutritional needs.
[0054] The nutrient content of different ingredients varies greatly, and the units and reference standards of nutrients are different, making direct comparison and analysis difficult. By using the standardized processing steps in the formula, the nutrient content in the ingredients is combined with the daily reference value, eliminating the unit differences and order of magnitude differences between different nutrients, so that the data of different nutrients can be compared and analyzed on the same scale. This allows for an intuitive understanding of the contribution of each nutrient in the formula, providing accurate data support for subsequent formula optimization.
[0055] Step 402: Analyze the cost data of each ingredient in the improved recipe to obtain a comprehensive cost index for each improved recipe. The calculation formula is as follows: ; Among them, CER represents the comprehensive cost index of the improved formula; The net material rate of the i-th ingredient, that is, the proportion that can be used after processing, can be measured by conducting multiple raw material processing tests, calculating the net material rate each time, and taking the average of the results as the final net material rate; represents the purchase price of the i-th ingredient, which can be obtained by referring to the real-time market price; W represents the labor cost, which can be calculated based on the payroll or human resources department data; E represents the energy rate, which can be calculated based on the energy bill or equipment power; It represents the working hours required to process the i-th ingredient, which can be obtained through kitchen operation time records or standardized process measurement.
[0056] It should be noted that when calculating the comprehensive cost index, the parameters involved in the formula need to be normalized and preprocessed to eliminate the dimensions of each parameter to facilitate the calculation of the formula.
[0057] Traditional food formula cost assessments often focus solely on the procurement cost of ingredients, ignoring other cost factors such as processing losses, labor, and energy, resulting in incomplete and inaccurate cost assessments. This solution comprehensively and accurately assesses the actual cost of improved formulas by taking into account multiple factors, including the net ingredient rate, purchase price per unit, labor hours, energy rates, and processing hours. For example, when calculating the comprehensive cost index, not only is the procurement cost of the ingredients considered, but also processing losses, labor, and energy costs, making the cost assessment more realistic and reliable. This helps food companies more accurately understand the cost structure of their products, providing strong support for pricing strategies and cost control.
[0058] Food companies often lack the ability to manage and analyze cost data in a refined manner during cost management, making it difficult to identify key cost control points and potential savings. By collecting and calculating various cost data within the formula, companies can achieve refined cost data management.
[0059] Step 403: Based on the analysis of the ingredient type and processing data of each ingredient in the improved recipe, the process feasibility index of each improved recipe is obtained, and the calculation formula is as follows: , Among them, PFE represents the improved formulation process feasibility index; represents the number of independent steps required for the i-th ingredient, such as washing, cutting, marinating, etc. It represents the ratio of the standard deviation of the processing parameter of the i-th food to the target value. It can be one of the more important process parameters. For example, if the time scale of the process is more important, time can be used as the processing parameter to calculate the standard deviation of the processing time. If the processing temperature is more important, temperature can be used as the processing parameter to calculate the standard deviation of the processing time. The target value is the ideal value of the processing parameter. The smaller the value, the more stable it is. Represents a constant to prevent the denominator from being zero; The weight coefficient indicating the utilization rate of food materials; The weight coefficient representing the processing complexity; represents the weighting factor of process stability; and , which can be: =0.3, =0.3, =0.4.
[0060] It should be noted that when calculating the process feasibility index, the parameters involved in the formula need to be normalized and preprocessed to eliminate the dimensions of each parameter to facilitate the calculation of the formula.
[0061] During food processing, the net material rate of different ingredients varies significantly. Traditional methods make it difficult to accurately assess and optimize ingredient utilization, which can easily lead to food waste and increased costs. By comparing the net material rate of an ingredient with the maximum net material rate and combining it with the weighting coefficient β1, it is possible to quantitatively assess the impact of each ingredient's utilization rate on the overall process feasibility. For example, if the net material rate of an ingredient is low, it indicates that a high amount of this ingredient is wasted during processing. This utilization rate can be improved by optimizing the processing technology or finding alternative ingredients with higher utilization rates. This not only helps reduce food waste, but also lowers production costs and improves the company's resource utilization efficiency.
[0062] The complexity of processing technology for different ingredients varies greatly. Traditional methods are difficult to fully evaluate the impact of processing complexity on production efficiency and cost. By comprehensively considering the number of independent operation steps and processing time required for the ingredients, and combining the weight coefficient , which can quantitatively assess the impact of each ingredient's processing complexity on overall process feasibility. For example, if an ingredient requires more independent steps and longer processing time, its processing complexity is high, which will reduce production efficiency and increase costs. Companies can improve production efficiency and reduce production costs by simplifying processing techniques, optimizing operational procedures, or selecting alternative ingredients with less processing complexity.
[0063] During food processing, fluctuations in process parameters can affect product quality and production stability. Traditional methods make it difficult to effectively assess and control process stability. By analyzing the ratio of the standard deviation of processing parameters to the target value and combining it with the weighting factor β3, it is possible to quantitatively assess the impact of each ingredient's process stability on overall process feasibility. For example, if the processing time or temperature of an ingredient fluctuates significantly, its process stability is poor, which can easily lead to unstable product quality. Companies can improve the stability and consistency of product quality by optimizing process parameter control, adopting more stable processing equipment, or selecting alternative ingredients with higher process stability.
[0064] In summary, the traditional food formula development process lacks a comprehensive quantitative assessment of process feasibility, making it difficult to identify potential process problems during the formula design stage, resulting in extended R&D cycles and increased production costs. The scheme can comprehensively and systematically evaluate the process feasibility of improved formulas by comprehensively considering three key factors: food utilization, processing complexity, and process stability.
[0065] Step 404: By comprehensively analyzing the nutritional adaptability index, the comprehensive cost index, and the process feasibility index, a comprehensive formula evaluation index is obtained, based on the following formula: , Among them, FCI represents the comprehensive evaluation index of the formula. represents the weight coefficient of the nutritional adaptation index, The weight coefficient representing the inverse of the comprehensive cost index; Represents the weight coefficient of the process feasibility index; it can be adjusted as needed, and , which can be: =0.4, =0.3, =0.3.
[0066] It should be noted that when calculating the comprehensive evaluation index of a formula, the parameters involved in the formula need to be normalized and preprocessed to eliminate the dimensions of each parameter to facilitate the calculation of the formula.
[0067] Traditional food formula evaluation methods often focus on a single dimension (such as nutritional value or cost), lacking a comprehensive assessment of multiple aspects such as nutrition, cost, and process feasibility. This results in incomplete evaluation results that are difficult to meet the diverse needs of actual production. This solution combines the nutritional adaptability index, the comprehensive cost index, and the process feasibility index to comprehensively consider the performance of food formulas in three key aspects: nutritional value, economic cost, and process feasibility. For example, when evaluating an improved formula, it is not only possible to determine whether it meets nutritional requirements, but also to understand its production costs and actual operational difficulty. This provides food companies with more comprehensive and valuable evaluation results, helping them make more informed decisions.
[0068] During food formula development and production decision-making, companies often face multiple risks, such as product failure to meet nutritional standards, production cost overruns, or process infeasibility. Traditional methods make it difficult to effectively identify and control these risks early on. Using a comprehensive assessment index, companies can identify potential risks early in the formulation design and optimization phase. For example, a formula with a low FCI value may indicate significant issues with nutrition, cost, or process feasibility. Companies can then make adjustments or optimizations accordingly to avoid major problems in subsequent production. This not only helps reduce R&D and production risks, but also minimizes resource waste and improves a company's overall operational efficiency and market competitiveness.
[0069] Step 5: Calculate the comprehensive evaluation index of the initial formula by referring to the methods of steps 1 to 4, and conduct a comprehensive analysis of the comprehensive evaluation index of the improved formula and the comprehensive evaluation index of the initial formula to obtain the deviation index. Filter out the improved formulas that meet the standards based on the deviation index, and sort the improved formulas that meet the standards according to the comprehensive evaluation index to generate a formula execution priority chart.
[0070] Step 501: Calculate the comprehensive evaluation index of the initial formula by referring to the method of steps 1 to 4.
[0071] Step 502: Calculate the deviation index based on the comprehensive evaluation index of the improved formula and the comprehensive evaluation index of the initial formula, using the following formula: ; Among them, PCZ represents the deviation index, represents the comprehensive evaluation index of the improved formula; Represents the comprehensive evaluation index of the initial formulation.
[0072] Step 503: Set a deviation index threshold, compare the deviation index with the deviation index threshold, and when the deviation index ≥ the deviation index threshold, determine that the corresponding improved formula meets the standard, and sort the improved formulas that meet the standard according to the comprehensive evaluation index in descending order to form the formula execution priority.
[0073] It should be noted that the deviation index threshold can be set to -10%. If you want to screen improved formulas with higher similarity, you can set the deviation index threshold to -5% to 5%. Or if you want to screen formulas with better overall effects, you can set the deviation index threshold to 10%.
[0074] Traditional methods for screening improved formulas lack scientific quantitative indicators and unified evaluation criteria, making it difficult to quickly and accurately identify the optimal solution from multiple improved formulas. By calculating the deviation index, this solution provides a quantitative method to measure the performance of improved formulas relative to the original formula. For example, if an improved formula has a high deviation index, it indicates that its overall evaluation index is significantly better than the original formula and deserves priority consideration. This helps food companies quickly identify truly valuable solutions from a large number of improved formulas, improving R&D efficiency and decision-making accuracy.
[0075] The evaluation results of different improved formulas are often difficult to compare directly, and the lack of a unified standardized evaluation framework leads to a highly subjective evaluation process. The deviation index calculation method compares the evaluation results of the improved formula with the initial formula in a standardized manner, eliminating the absolute value differences between different formulas, making the comparison between different improved formulas more intuitive and fair.
[0076] In actual production, companies need to choose from multiple improved formulas, but traditional methods make it difficult to fully assess the risks and benefits of each formula, which can easily lead to misjudgments. By setting a deviation index threshold, companies can flexibly define screening criteria based on their risk tolerance and production goals. Only improved formulas whose deviation index reaches or exceeds the threshold are selected, effectively reducing the risk of selecting inefficient or inferior formulas. At the same time, improved formulas that meet the standards are ranked according to the comprehensive evaluation index, providing companies with a clear basis for decision-making, helping them prioritize the most successful formulas and improve production success rates and market competitiveness.
[0077] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art will appreciate that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution.
[0078] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0079] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A food recipe generation method based on knowledge graph, characterized in that: include: Step 1: Obtain ingredient data from a known knowledge graph and build an ingredient knowledge graph based on a graph dataset tool. Input the initial recipe into the ingredient knowledge graph, obtain alternative ingredients for different ingredients in the initial recipe, and form a set of initially screened ingredients. Step 2: Determine the recipe improvement requirements, and based on the recipe improvement requirements, select the ingredient data that meets the requirements from the primary screening ingredient set, generate a secondary screening ingredient set, and merge the initial ingredients of the initial recipe with the secondary screening ingredient set to generate an improved recipe set; Step 3: Arrange and combine each ingredient in each data group in the improved recipe set; Several improved formulas were obtained; Step 4: Calculate the evaluation index set for each improved recipe based on the ingredient data of various ingredients in different improved recipes, and perform a comprehensive analysis based on the parameters in the evaluation index set to obtain a comprehensive recipe evaluation index; Step 5: Calculate the comprehensive evaluation index of the initial formula by referring to the methods of steps 1 to 4, and conduct a comprehensive analysis of the comprehensive evaluation index of the improved formula and the comprehensive evaluation index of the initial formula to obtain the deviation index. Filter out the improved formulas that meet the standards based on the deviation index, and sort the improved formulas that meet the standards according to the comprehensive evaluation index to generate a formula execution priority chart.
2. A method for generating food recipes based on knowledge graph according to claim 1, characterized in that: In step 2, the recipe improvement requirements include cost restriction requirements and food ingredient restriction requirements; when performing secondary screening according to the recipe improvement requirements, if the restriction requirement is a cost restriction requirement, the price cost of the initial ingredient is compared with the price cost of the substitute ingredient. If the price cost of the initial ingredient is greater than the price cost of the substitute ingredient, the substitute ingredient meets the requirements and a secondary screening ingredient set is generated; if the recipe improvement requirement is an food ingredient restriction requirement, which means that the ingredients of some ingredients are restricted, the substitute ingredients are not allowed to contain the restricted ingredients, and the food data of the substitute ingredients that do not contain the restricted ingredients are used to generate a secondary screening ingredient set.
3. A method for generating food recipes based on knowledge graph according to claim 2, characterized in that: In step 2, the secondary screening ingredient set includes different data groups, each data group corresponds to an ingredient in the initial recipe, and the ingredients in this data group are all substitutes for the ingredients in the initial recipe; when one or more of the initial ingredients have no substitutes, the initial ingredients are included in the data group of the secondary screening ingredient set.
4. A method for generating food recipes based on knowledge graph according to claim 3, characterized in that: In step 2, if the constraint requirement is a cost constraint requirement, each of the initial ingredients in the initial recipe is added to the data set of the secondary screening ingredient set to form an improved recipe set; If the recipe improvement requirement is an ingredient restriction requirement, the initial ingredients with restricted ingredients are screened out, and the remaining initial ingredients are added to the data group of the secondary screening ingredient set to form an improved recipe set.
5. A method for generating food recipes based on knowledge graph according to claim 4, characterized in that: The evaluation index set includes nutritional adaptability index, comprehensive cost index and process feasibility index; among them: By analyzing the nutritional content data of each ingredient in the improved formula, the nutritional adaptability index of each improved formula was obtained. The calculation formula is as follows: ; Among them, NAI represents the nutritional adaptation index of the improved formula; Indicates the amount of the i-th ingredient; represents the content of the jth nutrient in the i-th ingredient; i represents the sequence number of the ingredient in the improved formula, n represents the number of the ingredient; j represents the sequence number of the nutrient in the ingredient, and m represents the number of the nutrient; represents the daily reference of nutrient j; represents the weight coefficient of nutrient j, and .
6. A method for generating food recipes based on knowledge graph according to claim 5, characterized in that: Based on the cost data of each ingredient in the improved recipe, the comprehensive cost index of each improved recipe was obtained. The calculation formula is as follows: ; Among them, CER represents the comprehensive cost index of the improved formula; represents the net material rate of the i-th ingredient, represents the purchase price of the i-th ingredient; W represents the labor cost; E represents the energy rate; represents the working hours required to process the i-th ingredient.
7. A method for generating food recipes based on knowledge graph according to claim 6, characterized in that: Based on the analysis of the ingredient type and processing data of each ingredient in the improved formula, the process feasibility index of each improved formula was obtained. The calculation formula is as follows: , Among them, PFE represents the improved formulation process feasibility index; represents the number of independent operation steps required for the i-th ingredient; represents the ratio of the standard deviation of the processing parameter of the i-th food to the target value; represents a constant; The weight coefficient indicating the utilization rate of food materials; The weight coefficient representing the processing complexity; The weight coefficient representing process stability.
8. The method for generating food recipes based on knowledge graph according to claim 7, characterized in that: By comprehensively analyzing the nutritional adaptability index, comprehensive cost index, and process feasibility index, the comprehensive evaluation index of the formula is obtained. The formula is as follows: , Among them, FCI represents the comprehensive evaluation index of the formula. represents the weight coefficient of the nutritional adaptation index, The weight coefficient representing the inverse of the comprehensive cost index; Represents the weight coefficient of the process feasibility index.
9. The method for generating food recipes based on knowledge graph according to claim 8, characterized in that: In step 5, the deviation index is calculated based on the comprehensive evaluation index of the improved formula and the comprehensive evaluation index of the initial formula, according to the formula: ; Among them, PCZ represents the deviation index, represents the comprehensive evaluation index of the improved formula; Indicates the comprehensive evaluation index of the initial formulation; A deviation index threshold is set, and the deviation index is compared with the deviation index threshold. When the deviation index ≥ the deviation index threshold, it is determined that the corresponding improved formula meets the standard.
10. A food recipe generation system based on knowledge graph, characterized in that: A knowledge graph-based food recipe generation method for implementing any one of claims 1-9 above.
Citation Information
Patent Citations
Food product creative concept generation and verification method based on knowledge graph
CN116992959A
Recipe generation method and device based on big data, equipment and storage medium
CN117725237A
Medicated food knowledge graph construction method and system and medium
CN119250170A
System, method, and computer-readable medium for providing dietary recommendations using knowledge graphs
WO2024149246A1
Cited By
Aluminum alloy component cost optimization method and system
CN121480886A