A method, system, and medium for intelligent lean optimization of food ingredient formulations.

By constructing questions and inputting them into a large model, parsing the answers and building a knowledge graph, and combining deep reinforcement learning algorithms to iteratively adjust the amount of food ingredients, the problem of reliance on human experience and low efficiency in existing technologies has been solved, achieving efficient and accurate optimization of food ingredient formulations.

CN121144480BActive Publication Date: 2026-06-30TONGJI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TONGJI UNIV
Filing Date
2025-08-22
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies rely on human experience in food ingredient formulation design, which is inefficient and difficult to quantify. Furthermore, large language models are insufficient in terms of applicability and accuracy, making it difficult to meet complex and ever-changing market demands. In addition, traditional discretization methods lead to the curse of dimensionality.

Method used

By constructing questions and inputting them into a large model, parsing the answers and building a knowledge graph, and combining deep reinforcement learning algorithms to iteratively adjust the amount of food ingredients, multi-objective optimization is achieved, and a three-layer fully connected neural network is used to optimize product flavor indicators.

Benefits of technology

It significantly improves the accuracy and efficiency of food ingredient formulation optimization, can meet complex and ever-changing market demands, and ensures that product flavor indicators match preset target values, thus significantly improving optimization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144480B_ABST
    Figure CN121144480B_ABST
Patent Text Reader

Abstract

This invention relates to a method, system, and medium for intelligent lean optimization of food ingredient formulations. The method includes the following steps: constructing a problem based on user needs and inputting the problem into a large model; parsing the large model based on the answers output by the problem to obtain food ingredient formulation knowledge; structuring the food ingredient formulation knowledge and establishing a knowledge graph; calculating the corresponding product flavor indicators based on the taste connections and food ingredient dosages in the knowledge graph; and using a deep reinforcement learning algorithm to iteratively and dynamically adjust the food ingredient dosages to achieve multi-objective optimization of the product flavor indicators, ensuring that the optimized product flavor indicators match the preset target values. Compared with existing technologies, this invention improves the accuracy and richness of the acquired food ingredient formulation knowledge, can meet complex and ever-changing market demands, and significantly improves the efficiency and accuracy of food ingredient formulation optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic control in the food industry, and in particular to a method, system and medium for intelligent lean optimization of food ingredient formulations. Background Technology

[0002] In the field of food industry automation control, the precise formulation of raw materials directly determines the stability of product flavor and production efficiency. In the research and development of modern food seasoning formulations, acquiring accurate and comprehensive knowledge is crucial. Traditional knowledge acquisition methods are often limited by limited information sources and human experience, making it difficult to meet complex and ever-changing market demands. Traditional formulation design heavily relies on human experience and trial-and-error adjustments. Manually adjusting formulations requires repeated experiments, taking weeks and making it difficult to quantify the balance of multiple objectives (such as cost, taste, and shelf life), especially lacking agility in the face of rapidly changing market demands. Traditional formulation design relies on human experience, is inefficient, and is difficult to quantify.

[0003] With the development of artificial intelligence technology, large language models have demonstrated powerful knowledge reserves and language understanding capabilities, providing new avenues for acquiring food formula knowledge. However, existing large language models have limitations in applicability and accuracy when applied to food formulas. For example, patent application CN120430284A discloses a method, system, and medium for generating candy formulas based on retrieval-enhanced generation and large language models. This method constructs a multi-source heterogeneous dataset and establishes a vector database and a standard verification database. It receives user formula requirements, performs similarity retrieval after quantification, corrects the data by combining it with the standard verification database, and then inputs it into a large language model to generate candidate formulas. The formula is then optimized through a reinforcement learning reward function. While this method can generate candy formulas that conform to industry standards and shorten the R&D cycle, it has certain limitations. Its application scenarios are mainly limited to the candy field, and its adaptability to raw material formulas of other food categories is insufficient. Knowledge organization relies on vector databases and lacks structured integration of knowledge graphs, resulting in deficiencies in the depth of knowledge accuracy and richness mining.

[0004] Meanwhile, in the raw material ratio optimization problem in the food industry, raw material parameters (such as moisture content, protein ratio, and additive concentration) are usually limited to a continuous range. Traditional discretization methods require dividing each dimension into K discrete points. If the system involves n kinds of raw materials, the cardinality of the state space will far exceed the processing limit of traditional reinforcement learning (such as Q-learning), leading to the curse of dimensionality. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology, such as reliance on human experience, low efficiency, and difficulty in quantification, by providing a method, system, and medium for intelligent lean optimization of food ingredient formulations. This improves the accuracy and richness of the acquired food ingredient formulation knowledge, meets the complex and ever-changing market demands, and significantly enhances the efficiency and accuracy of food ingredient formulation optimization.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] A method for intelligent lean optimization of food ingredient formulations includes the following steps:

[0008] Develop questions based on user needs and input these questions into a large model;

[0009] The large model is analyzed based on the answers output by the question to obtain knowledge of food ingredient formulations;

[0010] The knowledge of food ingredient formulations is structured and a knowledge graph is established.

[0011] Based on the taste associations and food ingredient quantities in the knowledge graph, the corresponding product flavor index is calculated. By combining the deep reinforcement learning algorithm, the food ingredient quantities are dynamically adjusted iteratively to achieve multi-objective optimization of the product flavor index, so that the optimized product flavor index matches the preset target value.

[0012] Furthermore, the answer is a JSON-formatted text containing detailed information about the food ingredient formula, including various information such as the name of the food ingredient, the amount of food ingredient used, and the flavor coefficient of the food ingredient.

[0013] Furthermore, the specific steps for parsing the large model based on the answer output of the question to obtain food ingredient formulation knowledge include:

[0014] Perform syntactic analysis on the answer to check if it conforms to the JSON format specification;

[0015] Convert answers that conform to the JSON format specification into the corresponding JSON tree structure;

[0016] Food ingredient formula data is extracted from the JSON tree structure and converted into food ingredient formula knowledge, which includes a bill of materials table and a taste table.

[0017] Furthermore, the specific steps for structuring the food ingredient formulation knowledge and establishing a knowledge graph include:

[0018] Read the bill of materials table, create a corresponding dish list in the dish structure according to the raw material name, and then store the raw material attributes and attribute values ​​under each food ingredient name into the corresponding dish list line by line.

[0019] Read the taste table, create a taste list in the taste structure, and store the attributes and attribute values ​​in the taste table into the taste list row by row;

[0020] Different dish nodes are divided by the name of food ingredients. Other attributes in the bill of materials table are used as attributes of the dish nodes, and their values ​​are used as attribute values ​​of the dish nodes. The dish name is used as the dish tag of the dish node. The attributes in the bill of materials table include multiple items such as food ingredient name, food ingredient specifications, food ingredient unit, food ingredient unit price, food ingredient quantity, food ingredient total price, and food ingredient supplier.

[0021] Different taste nodes are divided by the name of food ingredients. Other attributes in the taste table are used as attributes of the taste nodes, and their values ​​are used as attribute values ​​of the taste nodes. The taste name is used as the taste label of the taste node. The attributes in the taste table include multiple of the following: food ingredient name, taste name, and taste measurement value per unit mass of ingredient.

[0022] The names of food ingredients in the taste node are matched with the names of food ingredients in the dish node. If the results match, a corresponding taste connection is established.

[0023] Furthermore, the taste association is as follows:

[0024] L Taste ={(v d ,v t )∈V Ingredient ×V Ingredient |v d ,v t ∈[v] N ,v d .label∈S Dish ,v t .label∈S Taste}

[0025] In the formula, L Taste For taste association, v d For dish nodes, v t For taste nodes, V Ingredient The node corresponding to the name of the food ingredient, [v] N v is a set of nodes d The tag is a dish node tag, S Dish For food tags, v t The label is a taste node label, S TasteFor taste labels.

[0026] Furthermore, the deep reinforcement learning algorithm employs a three-layer fully connected neural network, transforming the state-action value mapping into a neural network optimization problem through function approximation. The neural network optimization problem is as follows:

[0027]

[0028] In the formula, Q(s,a;θ) is a neural network optimization problem, Q * (s,a) is the optimal Q-function, R(s,a) is the immediate reward function, s is the current product flavor index, a is the current adjustment behavior to the amount of food ingredients, θ is the neural network parameter, γ is the discount factor, and E s′~p Let be the expectation of the next product flavor index s′ under the current state transition probability distribution p. For future discount revenue, s′ represents the next product flavor index, and a′ represents the next adjustment to the amount of food ingredients used.

[0029] Furthermore, the loss function of the deep reinforcement learning algorithm is:

[0030]

[0031] In the formula, L(θ) is the loss function, and E (s,a,r,s′) For the expectation calculation based on the transition sample, (s,a,r,s′) is the transition sample, r is the immediate reward, R(s,a) is the immediate reward function, and γ is the discount factor. Q(s,a;θ) represents the maximum Q value among all possible adjustments to the amount of food ingredients a′ under the next product flavor index s′, where θ is the current Q value. - These are a set of stable parameters that lag behind the current neural network parameters θ.

[0032] Furthermore, the instant reward function is designed based on the relative difference between the product flavor indicators and the preset target values. The product flavor indicators include spiciness, saltiness, and sweetness. The specific formula for the instant reward function is as follows:

[0033]

[0034] In the formula, R(s,a) is the immediate reward function, and exp is the exponential function. This is the optimized value for spiciness. This is the optimized value for salinity. This is the optimized value for sweetness. The target value for spiciness. The target value for salinity, This is the target value for sweetness.

[0035] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, enables the implementation of the intelligent lean optimization method for food ingredient formulations as described above.

[0036] According to another aspect of the present invention, a smart lean optimization system for food ingredient formulations is provided, comprising:

[0037] The problem building module is used to construct problems based on user needs and input the problems into the large model;

[0038] The answer parsing module is used to parse the answers output by the large model based on the question to obtain food ingredient formula knowledge;

[0039] The knowledge graph building module is used to structure the food ingredient formula knowledge and build a knowledge graph.

[0040] The raw material formulation optimization module is used to calculate the corresponding product flavor index based on the taste associations and food raw material usage in the knowledge graph. By combining a deep reinforcement learning algorithm, the usage of the food raw materials is dynamically adjusted iteratively to achieve multi-objective optimization of the product flavor index, so that the optimized product flavor index matches the preset target value.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] 1. This invention constructs questions based on user needs and inputs these questions into a large model via an API; the large model then analyzes the answers output by the questions to obtain food ingredient formula knowledge; the food ingredient formula knowledge is structured and a knowledge graph is established, which solves the problem that traditional knowledge acquisition methods are often limited by limited information sources and human experience, improves the accuracy and richness of the obtained food ingredient formula knowledge, and can meet the complex and ever-changing market demands.

[0043] 2. This invention divides different dish nodes and different taste nodes by food ingredient names, and matches the food ingredient names in the taste nodes with the food ingredient names in the dish nodes. If the results match, a corresponding taste connection is established. Based on the taste connections in the knowledge graph and the amount of food ingredients used, the corresponding product flavor index is calculated, which improves the quantitative accuracy of product flavor.

[0044] 3. This invention calculates the corresponding product flavor index based on the taste associations in the knowledge graph and the amount of food ingredients used. Using a deep reinforcement learning algorithm, the state-action value mapping is transformed into a neural network optimization problem through function approximation. By iteratively and dynamically adjusting the amount of food ingredients used, the multi-objective optimization of the product flavor index is achieved, so that the optimized product flavor index matches the preset target value, which significantly improves the efficiency and accuracy of food ingredient formula optimization. Attached Figure Description

[0045] Figure 1 This is a flowchart illustrating an intelligent lean optimization method for food ingredient formulation proposed in this invention.

[0046] Figure 2 Flowchart for knowledge extraction of production raw materials;

[0047] Figure 3 This is a schematic diagram of the relationships in a knowledge graph.

[0048] Figure 4 This is a network structure diagram for a deep reinforcement learning algorithm.

[0049] Figure 5 This is a schematic diagram showing the results of food ingredient formulation optimization in the examples. Detailed Implementation

[0050] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0051] The following English abbreviations are involved:

[0052] Application Programming Interface (API)

[0053] Deep Reinforcement Learning: Deep Q-Network, DQN

[0054] Example 1

[0055] This embodiment provides a method for intelligent lean optimization of food ingredient formulations, such as... Figure 1 As shown, it includes the following steps:

[0056] S1. Construct questions based on user needs and input the questions into the large model.

[0057] Problem formulation is the first step in knowledge extraction. Its purpose is to transform user needs into problems that the larger model can understand. The specific process of knowledge extraction from production materials is as follows: Figure 2 As shown.

[0058] Let M be the set of recipe types (such as hot pot base, pickled fish, spicy crayfish, etc.). For a given recipe type m∈M, a problem q=g(m) is constructed using a function g:M→Q. The construction of problem q not only considers the recipe type but also specifies the JSON format requirements for the response. For example, for a request for a hot pot base recipe, problem q would describe the required recipe type in detail and provide a JSON format example so that the large model can return the answer according to the specified format.

[0059] After constructing the question q, it is sent as input to the large model via API. Upon receiving the question, the large model processes it based on its own knowledge and algorithms, and calculates the corresponding answer: a = f(q), where a is the answer.

[0060] During API calls, parameters are set to control the output of the large model, such as temperature control parameters and maximum output length limits. Temperature control parameters are used to adjust the randomness of the answers generated by the large model, with a value range of (0,2]; the maximum output length limit specifies the maximum length of the answer returned by the large model, with a value range of [1,32768].

[0061] S2. Analyze the large model based on the answers output by the questions to obtain food ingredient formula knowledge.

[0062] The answer 'a' returned by the large model is typically a text containing rich information, which needs to be parsed to extract useful knowledge. Let K be the knowledge set, and define a parsing function h: A→K to transform the answer 'a' into knowledge k∈K. The answer is JSON formatted text containing detailed information about the food ingredient formula, including the name of the food ingredient, the amount of the food ingredient, and various flavor coefficients of the food ingredient. The parsing process is to extract the JSON data and convert it into a knowledge representation form that the system can process. JSON parsing is a key step in knowledge extraction. The specific steps for parsing the answer output by the large model based on the question to obtain the food ingredient formula knowledge include:

[0063] Perform syntactic analysis on the answer to check if it conforms to the JSON format specification; let V be a set of texts that conform to the JSON format specification, and there exists a validation function v: A→{0,1}, where v(a)=1 means a is a valid JSON text, and v(a)=0 means a is not a valid JSON text.

[0064] Convert answers that conform to the JSON format specification into the corresponding JSON tree structure; let T be the set of all possible JSON tree structures, there exists a parsing function t:{a∈A|v(a)=1}→T, which converts valid JSON text into the corresponding tree structure.

[0065] This process extracts food ingredient formula data from a JSON tree structure and converts this data into food ingredient formula knowledge, which includes a bill of materials (BOM) table and a flavor table. The desired data is extracted from the JSON tree structure. Let F be the set of data extraction functions; for each data item to be extracted, there exists a corresponding extraction function f ∈ F. For example, the function f for extracting food ingredient names... name :T→M, where M is the set of raw material names; function f to extract the amount of food raw materials used. amount :T→N, where N is the set of usage values; the function f for extracting the flavor coefficient of food ingredients. taste :T→C, where C is the set of flavor coefficients.

[0066] The extracted data is converted into a knowledge representation. Let k be the final knowledge representation. There exists a transformation function c: (M×N×C)→k that converts the extracted data into knowledge. The parsed knowledge k needs to be saved locally for later use. Define a saving function s: K→S, where S is the storage location for saving the knowledge (e.g., the file system).

[0067] S3. Structure the knowledge of food ingredient formulations and establish a knowledge graph.

[0068] The specific steps for structuring food ingredient formulation knowledge and establishing a knowledge graph include:

[0069] Read the bill of materials table, create a corresponding dish list in the dish structure based on the raw material name, and then store the raw material attributes and attribute values ​​under each food ingredient name into the corresponding dish list row by row.

[0070] Read the taste table, create a taste list in the taste structure, and store the attributes and attribute values ​​in the taste table into the taste list row by row;

[0071] Different dish nodes are divided by the name of food ingredients. Other attributes in the bill of materials are used as attributes of the dish nodes, and their values ​​are used as attribute values ​​of the dish nodes. The dish name is used as the dish label of the dish node. The attributes in the bill of materials include food ingredient name, food ingredient specifications, food ingredient unit, food ingredient unit price, food ingredient quantity, food ingredient total price, and multiple food ingredient suppliers.

[0072] Different taste nodes are defined by the name of the food ingredient. Other attributes in the taste table are used as attributes of the taste nodes, and their values ​​are used as attribute values ​​of the taste nodes. The taste name is used as the taste label of the taste node. The attributes in the taste table include multiple items such as the name of the food ingredient, the taste name, and the taste measurement value per unit mass of the ingredient.

[0073] Match the food ingredient names in the taste node with the food ingredient names in the dish node. If they match, establish a corresponding taste relationship. The taste relationships are as follows:

[0074] L Taste ={(v d ,v t )∈V Ingredient ×V Ingredient |v d ,v t ∈[v] N ,v d .label∈S Dish ,v t .label∈S Taste}

[0075] In the formula, L Taste For taste association, v d For dish nodes, v t For taste nodes, V Ingredient The node corresponding to the name of the food ingredient, [v] N v is a set of nodes d The tag is a dish node tag, S Dish For food tags, v t The label is a taste node label, S Taste For taste labels.

[0076] Dish Tag S Dish And taste label S Taste The relationship is as follows:

[0077] S Dish ∪S Taste and

[0078] The knowledge graph relationship diagram after establishing the association is as follows: Figure 3 As shown. Entering the following Cypher query command in the Query command line: MATCH(n)OPTIONAL MATCH(n)-[r]->(m)RETURN n,r,m will retrieve all nodes of the knowledge graph in the graph database and their possible relationships. The dots in the graph represent created nodes, with larger dots representing dish nodes and smaller dots representing taste nodes. The arrows between dish nodes and taste nodes represent the taste relationship between a certain ingredient in the dish and a certain taste, including spiciness, saltiness, and sweetness relationships.

[0079] S4. Based on the taste associations in the knowledge graph and the amount of food ingredients used, the corresponding product flavor indicators are calculated. Combined with the deep reinforcement learning algorithm, the amount of food ingredients is dynamically adjusted iteratively to achieve multi-objective optimization of the product flavor indicators, so that the optimized product flavor indicators match the preset target values.

[0080] Deep reinforcement learning combines reinforcement learning with deep learning. It solves decision-making problems in high-dimensional state / action spaces by fitting the value or policy function in reinforcement learning through neural networks. Its core principle is to allow the agent to learn the optimal policy through trial and error in the environment, maximizing long-term cumulative rewards. Deep reinforcement learning problems are typically modeled as Markov decision processes, usually defined by a quintuple:

[0081] <S,A,P,R,γ>

[0082] In the formula, S is the set of states, A is the set of actions, P is the state transition probability, R is the immediate reward function, and γ is the discount factor.

[0083] like Figure 4 As shown, the deep reinforcement learning algorithm uses a three-layer fully connected neural network. Through function approximation, the state-action value mapping is transformed into a neural network optimization problem. The neural network optimization problem is:

[0084]

[0085] In the formula, Q(s,a;θ) is a neural network optimization problem, Q * (s,a) is the optimal Q-function, R(s,a) is the immediate reward function, s is the current product flavor index, a is the current adjustment behavior to the amount of food ingredients, θ is the neural network parameter, γ is the discount factor, and E s′~p Let be the expectation of the next product flavor index s′ under the current state transition probability distribution p. For future discount revenue, s′ represents the next product flavor index, and a′ represents the next adjustment to the amount of food ingredients used.

[0086] Deep reinforcement learning algorithms complete training by minimizing a loss function, which is:

[0087]

[0088] In the formula, L(θ) is the loss function, and E (s,a,r,s′) For the expectation calculation based on the transition sample, (s,a,r,s′) is the transition sample, r is the immediate reward, R(s,a) is the immediate reward function, and γ is the discount factor. Q(s,a;θ) represents the maximum Q value among all possible adjustments to the amount of food ingredients a′ under the next product flavor index s′, where θ is the current Q value. - These are a set of stable parameters that lag behind the current neural network parameters θ.

[0089] Product flavor metrics include spiciness, saltiness, and sweetness. The immediate reward function is designed based on the relative difference between the product flavor metrics and preset target values. The specific formula for the immediate reward function is:

[0090]

[0091] In the formula, R(s,a) is the immediate reward function, and exp is the exponential function. This is the optimized value for spiciness. This is the optimized value for salinity. This is the optimized value for sweetness. The target value for spiciness. The target value for salinity, This is the target value for sweetness.

[0092] To verify the effectiveness of the intelligent lean optimization method for food ingredient formulation proposed in this invention, a deep reinforcement learning algorithm was used to optimize the ingredient ratio of hot pot base, aiming to make the three key flavor indicators of spiciness, saltiness and sweetness of the final product as close as possible to the preset target values.

[0093] By constructing a customized environment to simulate the optimization process of hot pot base recipe, the core state space of the environment is a 16-dimensional vector, representing the normalized amount of 16 ingredients such as chili peppers and Sichuan peppercorns. The normalization formula is as follows:

[0094]

[0095] In the formula, x i For actual usage, L i and H i These represent the upper and lower bounds of the allowed values. The action space contains 32 discrete actions, corresponding to the addition or reduction of each ingredient. The target values ​​for the product flavor indicators are set as follows: spiciness 3,000,000 SHU (Scholes Scoville Heat Units), saltiness 20g, and sweetness 35 (relative to sucrose sweetness). The ingredient adjustment mechanism is set to adjust in increments of 1% of the allowable range for each action. When the difference between all product flavor indicators is less than 5%, an additional +2 bonus is awarded.

[0096] The DQN algorithm employs a three-layer fully connected neural network (16-dimensional input layer, two hidden layers each with 256 neurons, and an output layer with 32 neurons), with a learning rate of 0.001 and a discount factor of 0.95. The experience replay mechanism has a memory capacity of 5,000 and a batch size of 128. The exploration strategy uses an ε-greedy strategy, with the ε value increasing linearly from 0 to 0.9. The target network synchronizes its parameters every 300 training steps. The total number of training epochs is set to 400 episodes. The experiment first initializes the environment, creating a simulated environment containing parameter ranges for 16 raw materials, with the dosage of each raw material randomly initialized within ±20% of the standard value. Then, a DQN agent is constructed, the evaluation network and the target network are initialized, and the experience replay mechanism is established. During the training loop, the environment state is reset at the beginning of each episode. The agent selects an action based on the current state (using an ε-greedy strategy), executes the action to obtain a new state and reward, and stores the transition sample (s, a, r, s′) in the experience pool. The training network was sampled from the experience pool every 5 steps, and the target network parameters were updated every 300 steps. During the experiment, the amount of raw materials, flavor indices, and reward values ​​were recorded for each training round. The termination condition was reaching 400 training rounds or the difference in all flavor indices remaining below 5%. After training, the optimal formula was extracted, and the percentage difference from the target value was calculated. The optimal formula was obtained after 342 training rounds, and key results showed that the difference in all flavor indices was controlled within 2%. Figure 5 As shown, the optimized spiciness value is 3,051,828 SHU, which is 1.73% lower than the target value of 3,000,000 SHU; the optimized saltiness value is 19.85 g, which is 0.76% lower than the target value of 20.00 g; and the optimized sweetness value is 35.03, which is 0.08% lower than the target value of 35.00. This indicates that the DQN algorithm performs excellently in balancing multi-objective optimization.

[0097] The method proposed in this invention significantly improves efficiency compared to traditional trial-and-error methods (requiring dozens of experiments), finding the optimal solution in just 400 training rounds; the difference in flavor indicators is less than 2%, far exceeding the industrial standard requirement of 5%; the framework can be extended to more indicators (such as freshness, spiciness) or constraints (such as cost, shelf life); and it avoids subjective evaluation bias based on a practical flavor calculation model. Experiments verify the effectiveness of deep reinforcement learning in food industry formula optimization. The DQN algorithm solves the high-dimensional formula optimization problem by learning the state-action value mapping end-to-end, ultimately obtaining a high-quality formula with flavor indicator differences of less than 2%, providing a new approach for complex formula optimization and possessing potential for industrial application.

[0098] Example 2

[0099] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it can realize the intelligent lean optimization method for food ingredient formulation as proposed in Embodiment 1.

[0100] The rest is the same as in Example 1.

[0101] Example 3

[0102] This embodiment provides an intelligent lean optimization system for food ingredient formulations, including:

[0103] The problem building module is used to construct problems based on user needs and input the problems into the large model;

[0104] The answer parsing module is used to analyze the answers output by the large model based on the questions to obtain food ingredient formula knowledge;

[0105] The knowledge graph building module is used to structure food ingredient formulation knowledge and build a knowledge graph.

[0106] The raw material formulation optimization module is used to calculate the corresponding product flavor index based on the taste associations in the knowledge graph and the amount of food raw materials used. Combined with the deep reinforcement learning algorithm, the amount of food raw materials is dynamically adjusted iteratively to achieve multi-objective optimization of the product flavor index, so that the optimized product flavor index matches the preset target value.

[0107] The rest is the same as in Example 1.

[0108] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for intelligent lean optimization of food ingredient formulations, characterized in that, Includes the following steps: Develop questions based on user needs and input these questions into a large model; The large model is analyzed based on the answers output by the question to obtain knowledge of food ingredient formulations; The knowledge of food ingredient formulations is structured and a knowledge graph is established. Based on the taste associations and food ingredient usage in the knowledge graph, the corresponding product flavor index is calculated. By combining the deep reinforcement learning algorithm, the food ingredient usage is dynamically adjusted iteratively to achieve multi-objective optimization of the product flavor index, so that the optimized product flavor index matches the preset target value. The deep reinforcement learning algorithm employs a three-layer fully connected neural network, transforming the state-action value mapping into a neural network optimization problem through function approximation. The neural network optimization problem is as follows: In the formula, For neural network optimization problems, To be optimal function, For instant reward function, For current product flavor indicators, This refers to the current adjustments made to the amount of food ingredients used. For neural network parameters, As a discount factor, For the transition probability distribution in the current state Next to the next state Expectations For future discount revenue, For the next product flavor indicator, This is the next step in adjusting the amount of food ingredients used; The loss function of the deep reinforcement learning algorithm is: In the formula, For loss function, For the expectation calculation based on the transferred samples, To transfer samples, For instant rewards, As a discount factor, For the next product flavor index All possible adjustments to the amount of food ingredients used of The maximum value, For the present value, To lag behind the current neural network parameters A set of stable parameters; The instant reward function is designed based on the relative difference between the product flavor indicators and the preset target values. The product flavor indicators include spiciness, saltiness, and sweetness. The specific formula of the instant reward function is as follows: In the formula, It is an exponential function. This is the optimized value for spiciness. This is the optimized value for salinity. This is the optimized value for sweetness. The target value for spiciness. The target value for salinity, This is the target value for sweetness.

2. The intelligent lean optimization method for food ingredient formulation according to claim 1, characterized in that, The answer is a JSON-formatted text containing detailed information about the food ingredient formula, including the name of the food ingredient, the amount of food ingredient used, and various flavor coefficients of the food ingredient.

3. The intelligent lean optimization method for food ingredient formulation according to claim 1, characterized in that, The specific steps for parsing the large model based on the answer output of the question to obtain food ingredient formulation knowledge include: Perform syntactic analysis on the answer to check if it conforms to the JSON format specification; Convert answers that conform to the JSON format specification into the corresponding JSON tree structure; Food ingredient formula data is extracted from the JSON tree structure and converted into food ingredient formula knowledge, which includes a bill of materials table and a taste table.

4. The intelligent lean optimization method for food ingredient formulation according to claim 3, characterized in that, The specific steps for structuring the knowledge of food ingredient formulations and establishing a knowledge graph include: Read the bill of materials table, create a corresponding dish list in the dish structure according to the raw material name, and then store the raw material attributes and attribute values ​​under each food ingredient name into the corresponding dish list line by line. Read the taste table, create a taste list in the taste structure, and store the attributes and attribute values ​​in the taste table into the taste list row by row; Different dish nodes are divided by the name of food ingredients. Other attributes in the bill of materials table are used as attributes of the dish nodes, and their values ​​are used as attribute values ​​of the dish nodes. The dish name is used as the dish tag of the dish node. The attributes in the bill of materials table include multiple items such as food ingredient name, food ingredient specifications, food ingredient unit, food ingredient unit price, food ingredient quantity, food ingredient total price, and food ingredient supplier. Different taste nodes are divided by the name of food ingredients. Other attributes in the taste table are used as attributes of the taste nodes, and their values ​​are used as attribute values ​​of the taste nodes. The taste name is used as the taste label of the taste node. The attributes in the taste table include multiple of the following: food ingredient name, taste name, and taste measurement value per unit mass of ingredient. The names of food ingredients in the taste node are matched with the names of food ingredients in the dish node. If the results match, a corresponding taste connection is established.

5. The intelligent lean optimization method for food ingredient formulation according to claim 4, characterized in that, The taste connection is as follows: In the formula, For taste association, For the dish segment, As a taste node, The nodes corresponding to the names of food ingredients. For a set of nodes, For dish node tags, For dish labels, Taste node labels, For taste labels.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the implementation of the intelligent lean optimization method for food ingredient formulations as described in any one of claims 1 to 5.

7. A smart lean optimization system for food ingredient formulations, characterized in that, The method for implementing the intelligent lean optimization method for food ingredient formulation as described in claim 1 includes: The problem building module is used to construct problems based on user needs and input the problems into the large model; The answer parsing module is used to parse the answers output by the large model based on the question to obtain food ingredient formula knowledge; The knowledge graph building module is used to structure the food ingredient formula knowledge and build a knowledge graph. The raw material formulation optimization module is used to calculate the corresponding product flavor index based on the taste associations and food raw material usage in the knowledge graph. By combining a deep reinforcement learning algorithm, the usage of the food raw materials is dynamically adjusted iteratively to achieve multi-objective optimization of the product flavor index, so that the optimized product flavor index matches the preset target value.