Nutrition meal intelligent construction system and method based on knowledge graph, and storage medium

By combining nutrient vector sparse coding with a culinary culture knowledge graph module, the problems of inaccurate execution of nutrient constraints and monotonous flavors in nutritional meal planning are solved. This enables cross-cuisine flavor innovation through ingredient substitution, improving the scientific nature of nutritional meals and patient compliance.

CN122245831APending Publication Date: 2026-06-19NANJING TIANSU AUTOMATION CONTROL SYST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING TIANSU AUTOMATION CONTROL SYST CO LTD
Filing Date
2026-05-25
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing nutritional meal preparation technologies suffer from several technical bottlenecks, including insufficient precision in implementing nutritional constraints, monotonous recipes leading to poor patient compliance, and the inability to achieve cross-cuisine flavor innovation while precisely maintaining the nutritional structure prescribed by the doctor.

Method used

By constructing a nutrient vector sparse coding module, high-dimensional sparse coding of the multidimensional nutritional attributes of ingredients is achieved. The culinary culture knowledge graph module is used to map the ingredients to the coordinate space of culinary culture clusters. Through the cross-cuisine implicit association mining module, replacement ingredients that meet the nutritional requirements of medical advice and bring the greatest cross-cultural flavor difference are retrieved.

Benefits of technology

This approach maximizes the substitution of ingredients with different flavor profiles while maintaining the same nutritional structure, thereby improving the scientific nature of the nutritional meals and patients' long-term dietary adherence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122245831A_ABST
    Figure CN122245831A_ABST
Patent Text Reader

Abstract

This invention discloses a knowledge graph-based intelligent nutritional meal construction system, method, and storage medium, relating to the fields of computer-aided diet recommendation and recipe generation. The invention utilizes a sparse nutritional vector coding module to construct a high-dimensional sparse nutritional vector dictionary for ingredients and calculates the nutritional contribution weight vector of the ingredient to be replaced in the current recipe. A culinary culture knowledge graph module maintains the coordinates of culinary culture clusters obtained by graph embedding training of ingredient entities. A cross-cuisine implicit association mining module retrieves candidate ingredients with a cosine similarity higher than a threshold to the nutritional contribution weight vector and the largest distance from the culinary culture cluster as target replacement ingredients. This addresses the problems of ingredient replacement being limited to the same category, single flavor output, and inability to achieve cross-cultural flavor reconstruction while maintaining the nutritional structure. It achieves maximum flavor entropy increase replacement under nutritional equivalence constraints, improving the scientific rigor and diversity of intelligent nutritional meal construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided diet recommendation and recipe generation technology, specifically to a knowledge graph-based intelligent nutritional meal construction system, method, and storage medium. Background Technology

[0002] With socioeconomic development and changes in lifestyles, the prevalence of chronic non-communicable diseases such as diabetes, hypertension, hyperlipidemia, hyperuricemia, and cardiovascular and cerebrovascular diseases continues to rise and shows a trend towards affecting younger people. Given the diversity of living standards, an unreasonable dietary structure is one of the main risk factors for the development of chronic diseases. Against this backdrop, the prevention and control of chronic diseases highly depend on long-term, scientific dietary interventions and nutritional management. Clinical nutrition departments and health management centers in medical institutions typically prescribe individualized therapeutic dietary prescriptions based on medical advice for patients with chronic diseases or those in a sub-healthy state, imposing strict quantitative limits on the macronutrient energy ratio, micronutrient intake, dietary fiber, and specific bioactive compounds in the diet.

[0003] However, translating nutritional prescriptions from medical orders into specific daily meal plans presents significant challenges in practice. Firstly, nutritional calculations are often limited in scope and quantification, with existing tools primarily focusing on simple matching of basal calories and the three macronutrients. This lack of depth makes it difficult to accurately characterize and constrain the finer nutritional structures, such as vitamins, minerals, and specific bioactive compounds, leading to significant discrepancies between actual intake and the prescribed goals. Secondly, existing nutritional meal plans are often limited to replacing ingredients within the same cuisine or category, resulting in monotonous and repetitive recipes that can easily cause taste fatigue and decreased dietary adherence, ultimately impacting long-term treatment outcomes. Furthermore, when ingredient substitutions are necessary, traditional methods lack a deep understanding of the culinary culture, culinary affiliation, and flavor logic behind the ingredients, making it difficult to achieve diverse flavor reconstruction across different cuisines while maintaining the strictly prescribed nutritional structure.

[0004] Therefore, there is an urgent need for an intelligent recipe construction and ingredient substitution technology that can break through traditional category limitations and maximize flavor diversity under the premise of refined nutritional structure equivalence. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a knowledge graph-based intelligent nutritional meal construction system, method, and storage medium. This invention aims to solve the technical bottlenecks in current chronic disease nutritional meal planning, such as insufficient precision in executing nutritional constraints, poor patient compliance due to monotonous recipe flavors, and the inability to achieve cross-cuisine flavor innovation while accurately maintaining the prescribed nutritional structure. This invention achieves high-dimensional sparse encoding of the multidimensional nutritional attributes of ingredients by constructing a nutritional vector sparse coding module, and accurately calculates the nutritional contribution weight vector of the ingredient to be replaced in the overall nutritional structure of the current recipe; through... A culinary culture knowledge graph module was constructed, using graph embedding technology to map food entities to a coordinate space containing culinary culture clusters that include cuisine, region, and co-occurrence relationships. Through a cross-cuisine implicit association mining module, with the cosine similarity of the nutritional contribution weight vector as a strong constraint and maximizing the distance between culinary culture clusters as the optimization objective, alternative ingredients that accurately meet the nutritional requirements of medical orders and bring the greatest cross-cultural flavor difference were retrieved. Under the premise of ensuring the nutritional treatment plan for chronic diseases, the maximum flavor entropy increase replacement under the constraint of nutritional equivalence was achieved, which significantly improved the scientificity and diversity of nutritional meals and the long-term dietary compliance of patients.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: Firstly, a knowledge graph-based intelligent nutritional meal construction system, comprising: a nutritional vector sparse coding module, a culinary culture knowledge graph module, a cross-cuisine implicit association mining module, and an output interface module; the nutritional vector sparse coding module is used to construct and maintain a high-dimensional sparse coding dictionary of nutritional elements, which contains a high-dimensional sparse vector of dimension N generated for each ingredient entity in the ingredient database, and is also used to calculate the nutritional contribution weight vector of the ingredient A to be replaced in the current recipe, the nutritional contribution weight vector representing the relative importance weight of the nutritional components of the ingredient A to be replaced in the overall nutritional structure of the current recipe; the culinary culture knowledge graph module is used to store ingredient entities, cuisine entities, and the association relationships between ingredient entities and cuisine entities, and maintains the corresponding nutritional vector for each ingredient entity. The culinary culture cluster coordinates are vector space coordinates obtained through graph embedding training on the relationships between ingredients, cuisines, and regions, used to represent the culinary culture affiliation characteristics of ingredient entities; the cross-cuisine implicit association mining module is used to, upon receiving a replacement instruction for ingredient A to be replaced in the current recipe, perform a similarity retrieval under nutritional structure constraints in the ingredient database based on the nutritional contribution weight vector to obtain a set of candidate ingredients, calculate the culinary culture cluster distance between ingredient A to be replaced and each candidate ingredient in the set based on the culinary culture cluster coordinates, and determine the target replacement ingredient B from the set of candidate ingredients according to the principle of maximizing the culinary culture cluster distance, so as to maximize the flavor difference of the replaced recipe while keeping the nutritional structure of the current recipe unchanged; the output interface module is used to push the replaced recipe information containing the target replacement ingredient B to the user terminal.

[0007] Furthermore, the nutrient element high-dimensional sparse coding dictionary constructed in the nutrient vector sparse coding module has a dimension N≥50. The nutrient element space formed by the dimension N covers the following nutrient element categories: macronutrient dimension, vitamin dimension, mineral and trace element dimension, and specific bioactive compound feature dimension. Each dimension in the high-dimensional sparse vector corresponds to a nutrient element category in the nutrient element space, and the non-zero dimension value in the high-dimensional sparse vector represents the quantitative content value of the nutrient element in the corresponding food entity.

[0008] Furthermore, the generation process of the coordinates of the cooking culture clusters maintained in the cooking culture knowledge graph module is as follows: A cooking culture knowledge graph triple dataset is constructed. Using ingredient entities as head entities, cuisine entities as tail entities, and attribution relationships as relation types, a first triple set is constructed, represented as ingredient entity - belongs to - cuisine entity. Simultaneously, using ingredient entities as head entities, region entities as tail entities, and place of origin relationships as relation types, a second triple set is constructed, represented as ingredient entity - originates from - region entity. The first and second triple sets are merged to form the cooking culture knowledge graph triple dataset. Recipe data is extracted from the recipe database. For any two different ingredient entities that co-occur in the same recipe, a co-occurrence relation triple is constructed, represented as first ingredient entity - co-occurs in - second ingredient entity. The co-occurrence relation triple is then... Groups are added to the culinary culture knowledge graph triple dataset to enhance the density of culinary culture associations between food entities. Each entity appearing in the culinary culture knowledge graph triple dataset, including each food entity, each cuisine entity, and each region entity, is initialized with a vector representation of dimension M. The initial values ​​of these vector representations follow a normal distribution with a mean of 0 and a standard deviation of 0.01. For each relation type, including belonging relations, origin relations, and co-occurrence relations, a relation vector representation of dimension M is initialized. The initial values ​​of these relation vector representations follow a normal distribution with a mean of 0 and a standard deviation of 0.01. A translation-based graph embedding loss function is defined. For each triple (head entity, relation, tail entity) in the culinary culture knowledge graph triple dataset, the scoring function is: ,in, Representing vectors Norm, which is the sum of the absolute values ​​of the components of a vector in all dimensions. The dimension of the head entity is The vector representation of , The dimension of the relationship is Relational vector representation, The dimension of the tail entity is The vector representation of , and the margin-based ranking loss function is: Where Loss represents the total loss value during training. This represents the set of positive sample triples in the aforementioned culinary culture knowledge graph triple dataset. This indicates that for each positive sample triplet The set of negative sample triples generated by replacing the tail entity or the head entity. These are preset marginal hyperparameters used to control the minimum margin requirement between positive and negative sample scores. This represents the score function value of positive sample triples. The score function value represents the negative sample triplet; the graph embedding training iteration process is executed, and the ranking loss function Loss is iteratively optimized using the gradient descent optimization algorithm. Each iteration includes the following sub-steps: from the positive sample triplet set of the cooking culture knowledge graph triplet dataset... A small batch of positive sample triples is randomly selected from the data; for each of the selected positive sample triples... By randomly selecting an entity different from the original tail from the entire entity set of the cooking culture knowledge graph triple dataset. entity As a replacement tail entity, a corresponding negative sample triplet is generated. Alternatively, one entity different from the original entity can be randomly selected from the entire entity set. entity As a replacement head entity, a corresponding negative sample triplet is generated. ; Calculate the loss function Loss value for all positive sample triples and their corresponding negative sample triples in the current mini-batch; Calculate the gradient for the entity vectors and relation vectors involved in the current mini-batch based on the loss function Loss value, and update the dimensional component values ​​of the entity vectors and relation vectors according to the gradient and the preset learning rate parameter; Repeat the process until the ranking loss function Loss value converges to below the preset convergence threshold, and terminate the training process; After optimization, for each food entity in the food library, extract and store the M-dimensional vector representation corresponding to the trained food entity as the culinary culture cluster coordinates of the food entity. The dimensional components of the culinary culture cluster coordinates jointly encode the semantic position information of the food entity in the culinary culture knowledge graph structure, so that food entities belonging to the same cuisine or having a close co-occurrence relationship exhibit a feature of close spatial distance in the M-dimensional vector space, and food entities belonging to different cuisines and having no co-occurrence relationship exhibit a feature of far spatial distance in the M-dimensional vector space.

[0009] Furthermore, when the nutrient vector sparse encoding module calculates the nutrient contribution weight vector, it is used to: parse the complete ingredient composition of the current recipe, and obtain the original high-dimensional sparse vectors of nutrients corresponding to each of the ingredient entities in the current recipe, including the ingredient A to be replaced; perform a dimension-by-dimensional summation operation on the original high-dimensional sparse vectors of nutrients corresponding to each of the ingredient entities to obtain the overall nutrient vector of the recipe; and perform a Hadamard product operation on the original high-dimensional sparse vector of nutrients of the ingredient A to be replaced and the reciprocal of the overall nutrient vector of the recipe to obtain the nutrient contribution weight vector.

[0010] Furthermore, the cross-cuisine implicit association mining module includes: a vector similarity constraint retrieval unit, a culinary culture cluster distance calculation unit, and a flavor entropy increase optimization output unit; the vector similarity constraint retrieval unit is used to calculate the cosine similarity between the original high-dimensional sparse vector of nutrition of each candidate ingredient B and the nutritional contribution weight vector in the ingredient database, and to output the cosine similarity CosSim... Greater than the preset similarity threshold Candidate ingredient B is included in the first candidate set; the cooking culture cluster distance calculation unit is used to call the cooking culture knowledge graph module to obtain the cooking culture cluster coordinates of the ingredient A to be replaced and the cooking culture cluster coordinates of each candidate ingredient B in the first candidate set, and calculate the Euclidean distance as the cooking culture cluster distance; the flavor entropy increase optimization output unit is used to select the candidate ingredient B that makes the cooking culture cluster distance the largest in the first candidate set as the target replacement ingredient B.

[0011] Furthermore, the process of calculating the cosine similarity in the vector similarity constraint retrieval unit satisfies: CosSim ,in, Represents the nutrient contribution weight vector The original high-dimensional sparse vector of the nutrients of candidate ingredient B The cosine similarity between them, wherein the value of the cosine similarity ranges from [-1, 1]. This represents the nutritional contribution weight vector of ingredient A to be replaced in the current recipe, with its dimension being the same as the dimension of the high-dimensional sparse coding dictionary of nutritional elements. Consistent This represents the original high-dimensional sparse vector of nutrients for candidate ingredient B, with its dimension being the same as the dimension of the high-dimensional sparse encoding dictionary of nutrient elements. Consistent, Represents the nutrient contribution weight vector The Euclidean norm, This represents the original high-dimensional sparse vector of the nutrients of candidate ingredient B. The Euclidean norm.

[0012] Furthermore, the process of calculating the distance of the cooking culture cluster in the cooking culture cluster distance calculation unit satisfies: ,in, This represents the culinary culture cluster distance between the ingredient to be replaced (A) and the candidate ingredient (B). The dimension of the vector space representing the coordinates of the culinary culture cluster. This represents the coordinate vector of ingredient A to be replaced within the cooking culture cluster in the cooking culture knowledge graph module. , This represents the coordinate vector of candidate ingredient B within the cooking culture cluster in the cooking culture knowledge graph module. , and These represent the coordinate vectors of the culinary culture cluster at the th... The coordinate component values ​​on the dimension, the distance of the cooking culture cluster The larger the value, the greater the difference between the ingredient to be replaced A and the candidate ingredient B in terms of culinary culture.

[0013] Secondly, a knowledge graph-based intelligent nutritional meal construction method is proposed. The specific steps of this method are as follows: S100, parsing the current recipe data, identifying the ingredient A to be replaced, and obtaining the ingredient identification information of the ingredient A to be replaced; S200, calling the nutritional vector sparse coding module to calculate the nutritional contribution weight vector of the ingredient A to be replaced in the current recipe, where the nutritional contribution weight vector represents the relative importance weight of the nutritional components of the ingredient A to be replaced in the overall nutritional structure of the current recipe; S300, calling the cross-cuisine implicit association mining module to retrieve the original high-dimensional sparse vector of nutritional information from the ingredient database maintained by the nutritional vector sparse coding module. Candidate ingredients whose cosine similarity with the nutritional contribution weight vector is greater than a preset similarity threshold constitute a first candidate set; S400, the cooking culture knowledge graph module is invoked to obtain the cooking culture cluster coordinates of the ingredient to be replaced A and the cooking culture cluster coordinates of each candidate ingredient in the first candidate set, and the Euclidean distance is calculated as the cooking culture cluster distance; S500, in the first candidate set, the candidate ingredient that maximizes the cooking culture cluster distance is selected as the target replacement ingredient B; S600, the replaced recipe data is generated based on the target replacement ingredient B, and the replaced recipe data is pushed to the user terminal through the output interface module.

[0014] Thirdly, a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements any step of a knowledge graph-based intelligent nutritional meal construction method.

[0015] Compared with existing technologies, this knowledge graph-based intelligent nutritional meal construction system, method, and storage medium have the following beneficial effects: First, this invention introduces a nutritional contribution weight vector through a nutritional vector sparse coding module. Its calculation process is based on the Hadamard product operation to accurately quantify the relative weight of the ingredient to be replaced in the overall nutritional structure of the current recipe. This ensures that the target replacement ingredient B is not only similar to the ingredient to be replaced A in terms of its own nutritional content, but also equivalent to the ingredient to be replaced A in the nutritional contribution ratio of the whole dish. This ensures that the replacement operation will not destroy the overall nutritional structure design of the original recipe and guarantees the consistency of the nutritional intervention plan before and after the replacement.

[0016] Second, this invention constructs and maintains a culinary culture knowledge graph module. Through graph embedding training, global food entities are mapped to a unified culinary culture cluster coordinate vector space. In this vector space, the spatial position of food entities is determined by their cuisine affiliation and recipe co-occurrence relationship. The culinary culture cluster coordinates maintained by this invention enable the algorithm to understand and quantify the degree of cultural differences between different foods at the semantic level, providing a computable vectorized foundation for food association mining across cuisine boundaries.

[0017] Third, this invention combines the cosine similarity constraint of the nutritional contribution weight vector with the maximization strategy of culinary culture cluster distance through a cross-cuisine implicit association mining module. Under the premise of ensuring similar nutritional structure, it prioritizes the candidate ingredients with the largest culinary culture cluster distance as the target replacement ingredient B. This technology achieves the goal of providing users with the most flavorful and novel replacement scheme and cross-cultural experience while adhering to health management objectives, and solves the problem of taste fatigue caused by monotonous replacement.

[0018] Fourth, this invention integrates the numerical computation capability of the nutrient vector sparse coding module with the semantic reasoning capability of the culinary culture knowledge graph module. Through the cross-cuisine implicit association mining module, it achieves synergistic optimization between nutritional constraints and cultural difference objectives. This framework not only outputs replacement results that meet nutritional objectives, but also takes into account the self-consistency of the cooking logic of the replaced recipe, thereby improving the user acceptance of the intelligent recipe generation results.

[0019] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a data flow diagram for a knowledge graph-based intelligent nutrition meal construction system.

[0022] Figure 2 This is a block diagram of the module composition of the knowledge graph-based intelligent nutritional meal construction system in an embodiment of the present invention;

[0023] Figure 3This is a flowchart of a knowledge graph-based intelligent nutritional meal construction method in an embodiment of the present invention. Detailed Implementation

[0024] To better understand the above technical solutions, a detailed description of the solutions will be provided below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0025] To address the limitations of existing nutritional meal construction technologies, such as single-dimensional nutritional representation, insufficient quantitative precision, restriction of substitute ingredients to the same category, lack of consideration for cross-cuisine flavor differences, and inability to reconstruct flavor while maintaining the overall nutritional structure, this invention provides a knowledge graph-based intelligent nutritional meal construction system, method, and storage medium. This invention aims to construct a high-dimensional sparse nutritional vector dictionary by introducing a sparse nutritional vector coding module to accurately quantify the nutritional contribution weight of ingredients in the current recipe. Through a culinary culture knowledge graph module, graph embedding technology is used to map ingredient entities to a cultural cluster coordinate space containing culinary traditions and co-occurrence relationships. Furthermore, a cross-cuisine implicit association mining module combines nutritional equivalence constraints with a cultural distance maximization strategy. This allows for ingredient substitution solutions with the most novel cross-cultural flavors while ensuring consistency in the nutritional structure before and after replacement. This system provides nutritionists, health management applications, and personalized recipe recommendation platforms with a flavor-diverse, intelligent, and efficient intelligent nutritional meal construction solution.

[0026] The present invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments, numerical values, parameters, and food examples described herein are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adaptive adjustments within the scope of the technical solution of the present invention according to actual circumstances.

[0027] This embodiment provides a knowledge graph-based intelligent nutritional meal construction system, the system composition of which is as follows: Figure 2 As shown, the system specifically includes: a nutrient vector sparse coding module, a culinary culture knowledge graph module, a cross-cuisine implicit association mining module, and an output interface module. These modules interact through data interfaces and message passing mechanisms to jointly complete the entire process from recipe parsing, nutrient weight calculation, candidate ingredient retrieval, cultural distance assessment, to the final output of the replacement solution.

[0028] In this embodiment, as Figure 3As shown, the knowledge graph-based intelligent nutritional meal construction method is applicable to the above system. The specific steps of the method are as follows: S100, parse the current recipe data, identify the ingredient A to be replaced, and obtain the ingredient identification information of the ingredient A to be replaced; S200, call the nutritional vector sparse coding module to calculate the nutritional contribution weight vector of the ingredient A to be replaced in the current recipe, the nutritional contribution weight vector representing the relative importance weight of the nutritional components of the ingredient A to be replaced in the overall nutritional structure of the current recipe; S300, call the cross-cuisine implicit association mining module to retrieve the original high-dimensional sparse vector of nutrition from the ingredient database maintained by the nutritional vector sparse coding module. Candidate ingredients whose cosine similarity between the nutritional contribution weight vectors is greater than a preset similarity threshold constitute a first candidate set; S400, the cooking culture knowledge graph module is invoked to obtain the cooking culture cluster coordinates of the ingredient to be replaced A and the cooking culture cluster coordinates of each candidate ingredient in the first candidate set, and the Euclidean distance is calculated as the cooking culture cluster distance; S500, in the first candidate set, the candidate ingredient that maximizes the cooking culture cluster distance is selected as the target replacement ingredient B; S600, the replaced recipe data is generated based on the target replacement ingredient B, and the replaced recipe data is pushed to the user terminal through the output interface module to complete intelligent replacement and recommendation.

[0029] like Figure 1 The diagram illustrates the data transfer relationships between modules in a knowledge graph-based intelligent nutritional meal construction system. The specific implementation methods of each module are described in detail below: In a preferred embodiment, the nutritional vector sparse coding module is used to construct a high-dimensional sparse vector space that can accurately represent the multidimensional nutritional structure of ingredients, and to calculate the nutritional contribution weight of any ingredient in a specific recipe based on this space.

[0030] In this embodiment, the preset nutrient element high-dimensional sparse coding dictionary has a dimension N=128. This 128-dimensional vector space systematically covers the following four categories of nutrient elements: macronutrient dimension, vitamin dimension, mineral and trace element dimension, and specific bioactive compound characteristic dimension. In this embodiment, the macronutrient dimensions, such as dimensions 1-10, correspond to total energy, protein, fat, carbohydrates, dietary fiber, saturated fatty acids, unsaturated fatty acids, trans fatty acids, cholesterol, and total sugar content, respectively; the vitamin dimensions, such as dimensions 11-30, correspond to the content of vitamin A, vitamin B1, vitamin B2, vitamin B6, vitamin B12, vitamin C, vitamin D, vitamin E, vitamin K, niacin, folic acid, and pantothenic acid, respectively; the mineral and trace element dimensions, such as dimensions 31-60, correspond to the content of calcium, iron, zinc, selenium, magnesium, potassium, sodium, phosphorus, iodine, copper, manganese, chromium, and molybdenum, respectively; and the specific bioactive compound characteristic dimensions, such as dimensions 61-128, are used to characterize the content of phytochemicals and functional peptides such as carotenoids, lycopene, lutein, anthocyanins, catechins, soy isoflavones, glucosinolates, allicin, and gingerol.

[0031] For a specific food entity, each dimension value in its high-dimensional sparse vector represents the quantitative content value of the corresponding nutrient element category of the food. If the food does not contain the nutrient element corresponding to a certain dimension, the value of that dimension is zero, thus forming a sparse vector representation.

[0032] After the user selects the current recipe and the ingredient A to be replaced, the nutrition vector sparse coding module performs the following steps to calculate the nutrition contribution weight vector. Parse the complete ingredient list of the current recipe to obtain the original high-dimensional sparse vectors of nutrients for each ingredient entity, including ingredient A to be replaced. ,in Let be the total number of ingredients in the recipe. Let A be the vector of the ingredient A to be replaced.

[0033] The overall nutritional vector of the recipe is obtained by performing a dimension-by-dimensional summation operation on the original high-dimensional sparse vectors of the original nutritional components of all the above-mentioned ingredients. That is, for the first in the vector space In dimension (1≤j≤N), the overall nutritional vector of the recipe in this dimension is the sum of the values ​​of all ingredients in this dimension: .

[0034] The original high-dimensional sparse vector of the nutrients of ingredient A to be replaced. Overall Nutritional Vectors of the Recipe Perform the Hadamard product (element-by-element multiplication) on the reciprocal of the nutrient contribution weight vector. The specific calculation formula is as follows: for the j-th dimension If Then define The weight vector represents the relative contribution ratio of each nutrient component of the ingredient A to be replaced in the overall nutritional structure of the current recipe. The larger the value, the more significant the contribution of the ingredient to that nutritional dimension of the recipe. The selection of subsequent replacement ingredients will be constrained by this weight vector through this Hadamard product operation to ensure that the overall nutritional ratio structure of the recipe does not shift after replacement.

[0035] The Culinary Culture Knowledge Graph module is used to construct a knowledge graph containing entities such as ingredients, cuisines, and regions, along with their semantic relationships. It generates vector coordinates rich in culinary culture semantics for ingredient entities through graph embedding training. The construction process of the culinary culture knowledge graph triple dataset is as follows: Structured data is extracted from culinary databases, recipe websites, and food culture literature to construct an initial set of triples: The first triple set (cuisine affiliation relationship): with the ingredient entity as the head entity, the cuisine entity as the tail entity, and the relationship type "belongs to", it is represented as (ingredient entity - belongs to - cuisine entity); The second triple set (regional origin relationship): with the ingredient entity as the head entity, the region entity as the tail entity, and the relationship type "originates from", it is represented as (ingredient entity - originates from - region entity). The first and second triple sets are then merged into the basic triple dataset. .

[0036] To enhance the density of culinary cultural associations between food ingredients and capture implicit pairing patterns, the system extracts recipe data from the recipe database. For any two different food ingredients that co-occur in the same recipe, a co-occurrence triple is constructed, represented as (first food ingredient - co-occurring with second food ingredient). All extracted co-occurrence triples are then added to the database. In the process, the final culinary culture knowledge graph triple dataset is formed. .

[0037] For graph embedding training and culinary culture cluster coordinate generation, this embodiment uses the TransE graph embedding model based on translation for training. The specific process is as follows: Entity and relation vector initialization: For each entity appearing in the dataset (including ingredient entities, cuisine entities, and region entities), initialize a dimension of... The vector representation of all entity vectors assumes that each dimension follows a normal distribution with a mean of 0 and a standard deviation of 0.01. A dimension is initialized for each relation type ("belongs to", "originates from", "co-occurs in"). The relation vector representation is used, and the initial distribution is the same as above.

[0038] Define the score function and loss function for the triplet. Define the scoring function: That is, the head entity vector With relation vector The sum and tail entity vector The L1 norm distance is used to train the system so that the scores of positive triples are reduced and the scores of negative triples are increased.

[0039] Define a margin-based ranking loss function: ,in For the set of positive sample triples, For each positive sample, a set of negative sample triples is generated by randomly replacing the head or tail entity. This is the preset marginal hyperparameter.

[0040] The graph embedding training iteration process is performed using a mini-batch stochastic gradient descent optimization algorithm with a set learning rate. Each iteration contains the following sub-steps: from A small batch of positive sample triples is randomly selected from the data. For each of the selected positive sample triples... A negative sample triplet is generated by randomly selecting either the head entity or the tail entity to replace with equal probability. The loss function (Loss value) for all positive sample triplets and their corresponding negative sample triplets in the current mini-batch is calculated. The gradient is then calculated based on the Loss value for all entity vectors and relation vectors involved in the current mini-batch, and the gradient is combined with the learning rate. Update the values ​​of each dimension component of the vector; repeat the above process until the loss function converges to the preset convergence threshold, at which point training terminates; after optimization, for each food entity in the food database, its trained dimensions are... The entity vector is extracted and stored as the coordinate of the cooking culture cluster of the ingredient entity.

[0041] In a preferred embodiment, the cross-cuisine implicit association mining module comprises three closely cooperating sub-units: a vector similarity constraint retrieval unit, a culinary culture cluster distance calculation unit, and a flavor entropy increase optimization output unit. Specifically, the vector similarity constraint retrieval unit, when the system receives a replacement instruction for ingredient A to be replaced in the current recipe, obtains the calculated nutritional contribution weight vector from the nutritional vector sparse coding module. Iterate through all candidate ingredients B in the ingredient database except for A, and for each candidate ingredient B, calculate the original high-dimensional sparse vector of its nutrients. Calculate its relationship with Cosine similarity between The calculation formula is: Where · represents the vector dot product, Let Euclidean norm represent the vectors. The cosine similarity ranges from -1 to 1. A larger value indicates that the nutritional distribution pattern of candidate ingredient B is more similar to the nutritional contribution structure of ingredient A to be replaced in the current recipe. In this embodiment, a preset similarity threshold is set. All of this makes CosSim Candidate ingredient B was included in the first candidate set. .

[0042] The culinary culture cluster distance calculation unit is responsible for calling the culinary culture knowledge graph module to obtain the coordinates of the culinary culture cluster of the ingredient A to be replaced. and the first candidate set Culinary culture cluster coordinates of each candidate ingredient B Calculate the Euclidean distance between A and each candidate B as the distance between the culinary culture clusters. The calculation formula is: ,in, This represents the culinary culture cluster distance between the ingredient to be replaced (A) and the candidate ingredient (B). The dimension of the vector space representing the coordinates of the culinary culture cluster. This represents the coordinate vector of ingredient A to be replaced within the cooking culture cluster in the cooking culture knowledge graph module. , This represents the coordinate vector of candidate ingredient B within the cooking culture cluster in the cooking culture knowledge graph module. , and These represent the coordinate vectors of the culinary culture cluster at the th... The coordinate component values ​​on the dimension, the distance of the cooking culture cluster The larger the value, the greater the difference between the ingredient to be replaced A and the candidate ingredient B in terms of culinary culture.

[0043] Flavor entropy increase optimization output unit, in the first candidate set In the middle, the selection makes the culinary culture cluster distant The largest candidate ingredient as the target replacement ingredient ,Right now: .

[0044] To clarify the technical solution, calculation process, and technical effects of this invention, the following detailed description of the complete steps of the system's knowledge graph-based intelligent nutritional meal construction method is provided, using a specific hospital treatment diet recipe replacement example. This example uses a 1600kcal / day diabetic treatment diet for diabetic patients as the application scenario, selecting the core dish of the diabetic treatment diet, steamed chicken with cordyceps militaris, as the target recipe. The entire process of the knowledge graph-based intelligent nutritional meal construction of this invention is fully executed, and the operating logic, calculation process, and selection rules of each module of the system are instantiated and verified throughout the entire process. The preset parameters are: the dimension of the high-dimensional sparse encoding dictionary of nutrient elements. Dimensions of the coordinate vector of the culinary culture cluster Nutritional similarity preset threshold Graph embedding training marginal hyperparameters Learning rate .

[0045] Basic Information of the Target Recipe: The target recipe in this example is a main dish of steamed chicken with cordyceps militaris for diabetic treatment lunch, which is a serving size for one person. The complete composition and amount of ingredients are shown in Table 1. This recipe meets the nutritional standards for diabetic diets: protein energy ratio 20-30%, fat energy ratio 20-30%, carbohydrate energy ratio 45-55%, sodium ≤2000mg / day, and staple food GI<55.

[0046] Table 1: Complete Ingredient Composition and Usage Table

[0047]

[0048] The user specifies the ingredient to be replaced through the system interface. The core ingredient in the recipe, boneless chicken thigh meat, needs to be replaced. That is, the ingredient to be replaced, A, is boneless chicken thigh meat. The replacement goal is to maintain the overall nutritional structure of the recipe and its suitability for diabetic treatment, maximize the cross-cuisine flavor difference of the dish after replacement, and meet the requirements of low-GI, low-fat, and high-protein diabetic diet. The system completes the reading of the ingredient identification information and the structured parsing of the recipe, and enters the subsequent calculation process.

[0049] The nutrient vector sparse coding module is executed to calculate the nutrient contribution weight vector. Based on a 128-dimensional high-dimensional sparse coding dictionary of nutrient elements, the nutrient vector sparse coding module completes the extraction of nutrient vectors of ingredients and the calculation of nutrient contribution weight vectors. The specific execution process is as follows: The nutrient vector sparse coding module retrieves the 128-dimensional high-dimensional sparse nutrient vectors of all 11 ingredients in this recipe from the ingredient library. The vector dimensions cover four major categories: macronutrients (1-10 dimensions), vitamins (11-30 dimensions), minerals and trace elements (31-60 dimensions), and specific bioactive compounds (61-128 dimensions). The non-zero dimension values ​​of the vectors represent the quantified content of nutrient elements per 100g of edible portion of the corresponding ingredient.

[0050] Among them, the original high-dimensional sparse vector of the nutrients of ingredient A to be replaced (boneless chicken thigh meat, 200g) is shown. The key values ​​of the core dimensions are shown in Table 2 (the values ​​of the other irrelevant dimensions are 0, which conforms to the characteristics of sparse vectors):

[0051] Table 2: Nutritional Vector of Boneless Chicken Thigh Meat - Core Dimension Values

[0052]

[0053] The module performs a dimension-by-dimensional summation operation on the original high-dimensional sparse vectors of nutrients for all 11 ingredients in the recipe to obtain the overall nutrient vector of the recipe. : ,in, For the recipe The original nutrient vectors of each ingredient are high-dimensional sparse vectors. The overall nutrient vector of this recipe has been calculated. The key values ​​of the core dimensions are shown in Table 3:

[0054] Table 3: Core Dimensions of Overall Nutritional Vector of the Recipe

[0055]

[0056] The Hadamard product operation module for the nutritional contribution weight vector will calculate the original nutritional vector of the ingredient A to be replaced. Overall Nutritional Vectors of the Recipe The nutrient contribution weight vector is obtained by performing the Hadamard product (element-by-element multiplication) on the reciprocal of the product. The calculation formula is: , among which, if Then define The nutritional contribution weight vector of ingredient A to be replaced was calculated. Table 4 shows the key values ​​for the core dimensions, which represent the relative contribution of boneless chicken thigh meat to each nutritional dimension of the recipe:

[0057] Table 4: Core Dimensions of Nutritional Contribution Weight Vector

[0058]

[0059] This weight vector clearly states that the chicken thigh meat to be replaced is the core contributor to the protein, fat, B vitamins, and minerals of this recipe. The selection of subsequent replacement ingredients will be strictly constrained by this weight vector to ensure that the overall nutritional structure of the recipe does not shift after replacement and meets the nutritional requirements of a diabetic treatment diet.

[0060] Candidate ingredient retrieval under nutritional structure constraints: A vector similarity-constrained retrieval unit is constructed within the cross-cuisine implicit association mining module of the first candidate set, using nutritional contribution weight vectors. For the query vector, iterate through all ingredients in the diabetes treatment dietary ingredient library except for the ingredient A to be replaced, and generate a 128-dimensional original high-dimensional sparse vector of nutrition for each candidate ingredient B. Calculate its relationship with The cosine similarity is calculated using the following formula: This embodiment presets a similarity threshold. Only candidate ingredients with a cosine similarity greater than 0.85 are included in the first candidate set. After a full database search and calculation, some candidate ingredients were found to be... The cosine similarity results are shown in Table 5:

[0061] Table 5: Cosine Similarity Results of Some Ingredients in the First Candidate Set

[0062]

[0063] Ultimately, the first candidate set The selected ingredients are: skinless chicken breast, lean beef shank, basa fillet, skinless cod, tempeh, and cooked chickpeas, a total of 6 ingredients. All of these ingredients meet the basic requirements of a low-fat, high-protein, and low-GI diet for diabetes treatment, and their nutritional contributions are highly matched with those of the ingredients to be replaced.

[0064] The module for retrieving cooking culture cluster coordinates from the cooking culture knowledge graph has been pre-trained using the TransE graph embedding model, generating 256-dimensional cooking culture cluster coordinates for all ingredients in the ingredient database. The module then retrieves the cooking culture cluster coordinates for ingredient A (boneless chicken thigh meat) to be replaced. And the coordinates of the culinary culture clusters of the six ingredients in the first candidate set. The components of each dimension of the coordinate vector are converged values ​​after graph embedding training, which encode the culinary cultural semantic information such as the cuisine affiliation, geographical origin, and co-occurrence relationship of the ingredients.

[0065] The Euclidean distance calculation unit of the cross-cuisine implicit association mining module for culinary culture clusters calculates the Euclidean distance between the ingredient to be replaced A and each candidate ingredient B based on coordinate vectors, i.e., the culinary culture cluster distance. The calculation formula is as follows: The calculation results of the culinary culture cluster distances between the ingredient to be replaced and each candidate ingredient are shown in Table 6. The larger the distance value, the greater the difference between the two culinary culture systems.

[0066] Table 6: Distance Results of Culinary Culture Clusters

[0067]

[0068] Flavor entropy increase optimization identifies target replacement ingredients by selecting target replacement ingredients from the flavor entropy increase optimization output unit of the cross-cuisine implicit association mining module, based on the principle of maximizing the distance between culinary culture clusters. ,Right now: Comparing the cultural cluster distances of each ingredient in the first candidate set, tempeh has the highest cultural cluster distance of 2.24. Therefore, tempeh is selected as the target replacement ingredient for this replacement. This choice achieves the objective of the present invention: nutritional equivalence: tempeh and The cosine similarity is 0.87 > 0.85. Its high protein, low fat, and low GI nutritional characteristics are highly matched with the nutritional contribution structure of boneless chicken thigh meat in the recipe. After replacement, the overall nutritional structure of the recipe still meets the dietary standards for diabetes treatment. Maximize flavor difference: Tempeh is a fermented soy product and has no culinary association or recipe co-occurrence relationship with boneless chicken thigh meat, a traditional poultry ingredient. It has the highest cultural difference and can achieve cross-cuisine flavor reconstruction, solving the pain points of monotonous flavor and low patient compliance in diabetes treatment diets.

[0069] The recipe adaptive adjustment system optimizes the original recipe based on the cooking properties of the target replacement ingredient, tempeh, ensuring flavor harmony and consistent cooking logic: Ingredient quantity adaptation: 200g of tempeh replaces 200g of boneless chicken thigh meat, while the quantities of other ingredients remain unchanged, ensuring a stable overall nutritional profile; Cooking process optimization: Considering the firm texture and fermented nutty flavor of tempeh, cooking tips are added: Slice the tempeh beforehand, pan-fry it in a small amount of olive oil until golden brown on both sides, then steam it with ingredients such as cordyceps to better absorb the flavor of the broth while retaining its nutrients; Flavor adaptation adjustment: Based on the Southeast Asian flavor of tempeh, it is recommended to add a small amount of chopped lemongrass and lemon leaf strips to replace 50% of the white pepper powder in the original recipe, further enhancing the fusion of flavors across cuisines without increasing sodium and carbohydrate intake, thus meeting the requirements of a diabetic diet.

[0070] The nutrition verification and result output system completed a second nutrition verification of the replaced recipe. The comparison of core nutrition indicators is shown in Table 7. The verification shows that the overall nutritional structure deviation of the recipe before and after the replacement is within 5%, which fully meets the nutritional equivalence constraint.

[0071] Table 7: Comparison Table of Nutritional Assessment

[0072]

[0073] Finally, the output interface module will push the complete information of the updated recipe, including the updated ingredient list, dosage, suitable cooking methods, nutritional comparison table, and diabetic diet suitability instructions, to the user in a visual format, completing the entire process of intelligent construction and ingredient replacement of this nutritious meal.

[0074] This embodiment breaks through the traditional limitation of replacing ingredients in diabetic treatment diets with only "poultry meat for poultry meat, and livestock meat for livestock meat" within the same category. It realizes cross-category and cross-cultural replacement of animal protein with plant protein. Through the constraint of the nutritional contribution weight vector, it ensures the consistency of the nutritional structure of the diet before and after replacement, fully meeting the clinical nutritional standards of diabetic treatment diets and avoiding the nutritional structure deviation caused by traditional replacement methods. Through the culinary culture cluster distance maximization strategy, it maximizes the flavor entropy increase under the nutritional equivalence constraint, solving the industry pain points of monotonous flavor in clinical treatment diets and low patient long-term consumption compliance.

[0075] On the other hand, the present invention also provides a computer-readable storage medium, such as a hard disk, solid-state drive, USB flash drive, optical disk, etc., on which computer program instructions are stored. When the program is executed by a processor (such as the CPU of a cloud server or the processor of a user terminal device), it can realize all the steps of the knowledge graph-based intelligent nutritional meal construction method as described in any of the above specific embodiments. The storage medium can be integrated into the backend service of a nutrition and health management platform, smart kitchen equipment, or mobile application to provide users with real-time, accurate, and creative intelligent recipe replacement functions.

[0076] In summary, the knowledge graph-based intelligent nutritional meal construction system proposed in this invention achieves precise quantification of the nutritional contribution of ingredients through a sparse nutritional vector coding module, realizes computable vectorized expression of the cultural attributes of ingredients through a culinary culture knowledge graph module and graph embedding technology, and organically combines the two through a cross-cuisine implicit association mining module, forming a flavor entropy maximization replacement strategy under nutritional equivalence constraints. This solves the problems of nutritional structure shift and flavor monotony in the recipe after replacement, and improves the scientific nature, diversity, and user experience of intelligent nutritional meal construction.

[0077] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A knowledge graph-based intelligent nutritional meal construction system, characterized in that, The system consists of: a nutrient vector sparse coding module, a culinary culture knowledge graph module, a cross-cuisine implicit association mining module, and an output interface module; The nutrient vector sparse coding module is used to construct and maintain a high-dimensional sparse coding dictionary of nutrient elements. The high-dimensional sparse coding dictionary of nutrient elements contains a high-dimensional sparse vector of dimension N generated for each food entity in the food library. The nutrient vector sparse coding module is also used to calculate the nutrient contribution weight vector of the food A to be replaced in the current recipe. The nutrient contribution weight vector represents the relative importance weight of the nutrient components of the food A to be replaced in the overall nutrient structure of the current recipe. The cooking culture knowledge graph module is used to store food entities, cuisine entities, and the relationships between food entities and cuisine entities, and maintain the cooking culture cluster coordinates corresponding to each food entity. The cooking culture cluster coordinates are vector space coordinates obtained by training the graph embedding relationship between food, cuisine, and region, and are used to represent the cooking culture affiliation characteristics of the food entity. The cross-cuisine implicit association mining module is used to, when receiving a replacement instruction for ingredient A to be replaced in the current recipe, perform a similarity search under nutritional structure constraints in the ingredient database based on the nutritional contribution weight vector to obtain a set of candidate ingredients, calculate the culinary culture cluster distance between ingredient A to be replaced and each candidate ingredient in the set of candidate ingredients based on the culinary culture cluster coordinates, and determine the target replacement ingredient B from the set of candidate ingredients according to the principle of maximizing the culinary culture cluster distance; The output interface module is used to push the replaced recipe information, including the target replacement ingredient B, to the user terminal.

2. The knowledge graph-based intelligent nutritional meal construction system according to claim 1, characterized in that, The nutrient vector sparse coding module constructs a high-dimensional sparse coding dictionary of nutrient elements with a dimension N ≥ 50. The nutrient element space formed by the dimension N covers the following nutrient element categories: macronutrient dimension, vitamin dimension, mineral and trace element dimension, and phytochemical and bioactive peptide feature dimension. Each dimension of the high-dimensional sparse vector corresponds to a nutrient element category in the nutrient element space, and the non-zero dimension values ​​in the high-dimensional sparse vector represent the quantified content of the nutrient element in the corresponding food entity.

3. The knowledge graph-based intelligent nutritional meal construction system according to claim 1, characterized in that, The generation process of the coordinates of the cooking culture clusters maintained in the cooking culture knowledge graph module is as follows: A triplet dataset for a culinary culture knowledge graph is constructed. The first triplet set is constructed with the ingredient entity as the head entity, the cuisine entity as the tail entity, and the attribution relationship as the relation type. It is represented as ingredient entity - belongs to - cuisine entity. At the same time, the second triplet set is constructed with the ingredient entity as the head entity, the region entity as the tail entity, and the place of origin relationship as the relation type. It is represented as ingredient entity - origin - region entity. The first and second triplet sets are merged to form the triplet dataset for a culinary culture knowledge graph. Extract recipe data from the recipe database. For any two different ingredient entities that co-occur in the same recipe, construct a co-occurrence relation triplet, which is represented as first ingredient entity - co-occurring in - second ingredient entity. Add the co-occurrence relation triplet to the cooking culture knowledge graph triplet dataset. For each entity appearing in the triplet dataset of the cooking culture knowledge graph, including each ingredient entity, each cuisine entity, and each region entity, initialize a vector representation of dimension M. The initial values ​​of the vector representations follow a normal distribution with a mean of 0 and a standard deviation of 0.

01. For each type of relation, including belonging relation, origin relation, and co-occurrence relation, initialize a relation vector representation of dimension M. The initial values ​​of the relation vector representation follow a normal distribution with a mean of 0 and a standard deviation of 0.

01. Define a translation-based graph embedding loss function. For each triple (head entity, relation, tail entity) in the cooking culture knowledge graph triple dataset, construct the scoring function as follows: ,in, Representing vectors Norm, which is the sum of the absolute values ​​of the components of a vector in all dimensions. The dimension of the head entity is The vector representation of , The dimension of the relationship is Relational vector representation, The dimension of the tail entity is The vector representation of is given, and the marginal-based ranking loss function is constructed as follows: Where Loss represents the total loss value during training. This represents the set of positive sample triples in the aforementioned culinary culture knowledge graph triple dataset. This indicates that for each positive sample triplet The set of negative sample triples generated by replacing the tail entity or the head entity. These are preset marginal hyperparameters used to control the minimum margin requirement between positive and negative sample scores. This represents the score function value of positive sample triples. This represents the score function value of the negative sample triples; The graph embedding training iteration process is performed, and the gradient descent optimization algorithm is used to iteratively optimize the ranking loss function Loss. After optimization, for each food entity in the food database, the vector representation of dimension M corresponding to the trained food entity is extracted and stored as the coordinates of the cooking culture cluster of the food entity.

4. The knowledge graph-based intelligent nutritional meal construction system according to claim 1, characterized in that, When performing the calculation of the nutrient contribution weight vector, the nutrient vector sparse coding module is used to: Analyze the complete ingredient composition of the current recipe and obtain the original high-dimensional sparse vectors of nutrition for each ingredient entity in the current recipe, including the ingredient A to be replaced. The overall nutritional vector of the recipe is obtained by performing a dimension-wise summation operation on the original high-dimensional sparse vectors of nutrition corresponding to each of the food entities. The nutritional contribution weight vector is obtained by performing a Hadamard product operation between the original high-dimensional sparse vector of the original nutritional content of the ingredient A to be replaced and the reciprocal of the overall nutritional vector of the recipe.

5. The knowledge graph-based intelligent nutritional meal construction system according to claim 1, characterized in that, The cross-cuisine implicit association mining module includes: a vector similarity constraint retrieval unit, a culinary culture cluster distance calculation unit, and a flavor entropy increase optimization output unit; The vector similarity constraint retrieval unit is used to calculate the cosine similarity between the original high-dimensional sparse vector of nutrition for each candidate food ingredient B in the food ingredient database and the nutritional contribution weight vector, and then convert the cosine similarity CosSim... Greater than the preset similarity threshold Candidate ingredient B was included in the first candidate set; The cooking culture cluster distance calculation unit is used to call the cooking culture knowledge graph module to obtain the cooking culture cluster coordinates of the ingredient A to be replaced and the cooking culture cluster coordinates of each candidate ingredient B in the first candidate set, and calculate the Euclidean distance as the cooking culture cluster distance. The flavor entropy increase optimization output unit is used to select candidate ingredient B that maximizes the distance to the culinary culture cluster from the first candidate set as the target replacement ingredient B.

6. The knowledge graph-based intelligent nutritional meal construction system according to claim 5, characterized in that, The process of calculating the cosine similarity in the vector similarity constraint retrieval unit satisfies: CosSim ,in, Represents the nutrient contribution weight vector The original high-dimensional sparse vector of the nutrients of candidate ingredient B The cosine similarity between them, wherein the value of the cosine similarity ranges from [-1, 1]. This represents the nutritional contribution weight vector of ingredient A to be replaced in the current recipe, with its dimension being the same as the dimension of the high-dimensional sparse coding dictionary of nutritional elements. Consistent, This represents the original high-dimensional sparse vector of nutrients for candidate ingredient B, with its dimension being the same as the dimension of the high-dimensional sparse encoding dictionary of nutrient elements. Consistent, Represents the nutrient contribution weight vector The Euclidean norm, This represents the original high-dimensional sparse vector of the nutrients of candidate ingredient B. The Euclidean norm.

7. The knowledge graph-based intelligent nutritional meal construction system according to claim 5, characterized in that, The process of calculating the distance of the culinary culture cluster in the culinary culture cluster distance calculation unit satisfies the following: ,in, This represents the culinary culture cluster distance between the ingredient to be replaced (A) and the candidate ingredient (B). The dimension of the vector space representing the coordinates of the culinary culture cluster. This represents the coordinate vector of ingredient A to be replaced within the cooking culture cluster in the cooking culture knowledge graph module. , This represents the coordinate vector of candidate ingredient B within the cooking culture cluster in the cooking culture knowledge graph module. , and These represent the coordinate vectors of the culinary culture cluster at the th... The coordinate component values ​​on the dimension, the distance of the cooking culture cluster The larger the value, the greater the difference between the ingredient to be replaced A and the candidate ingredient B in terms of culinary culture.

8. A knowledge graph-based intelligent nutritional meal construction method, applicable to the knowledge graph-based intelligent nutritional meal construction system described in any one of claims 1-7, characterized in that, The specific steps of this method are as follows: S100. Analyze the current recipe data, identify the ingredient A to be replaced, and obtain the ingredient identification information of the ingredient A to be replaced; S200. Call the nutrient vector sparse coding module to calculate the nutrient contribution weight vector of the ingredient A to be replaced in the current recipe. The nutrient contribution weight vector represents the relative importance weight of the nutrient components of the ingredient A to be replaced in the overall nutrient structure of the current recipe. S300. Call the cross-cuisine implicit association mining module to retrieve candidate ingredients from the ingredient library maintained by the nutrition vector sparse coding module. The cosine similarity between the original high-dimensional sparse vector of nutrition and the nutrition contribution weight vector is greater than a preset similarity threshold, and form the first candidate set. S400: Call the cooking culture knowledge graph module to obtain the cooking culture cluster coordinates of the ingredient A to be replaced and the cooking culture cluster coordinates of each candidate ingredient in the first candidate set, and calculate the Euclidean distance as the cooking culture cluster distance. S500: In the first candidate set, select the candidate ingredient that maximizes the distance to the cooking culture cluster as the target replacement ingredient B; S600: Generate the replaced recipe data based on the target replacement ingredient B, and push the replaced recipe data to the user terminal through the output interface module.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the knowledge graph-based intelligent construction method for nutritional meals as described in claim 8.