Food material information processing method and device, equipment and storage medium
By using the smart refrigerator's three-level substitution rules and knowledge graph, the problem of inadequate substitution when food inventory is insufficient is solved, the accuracy of food feature matching and inventory updates is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202511390991.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-12-09
AI Technical Summary
When existing smart refrigerators are short of food in stock, they cannot make intelligent substitutions based on ingredients and flavors. This results in recommended substitutes that do not match user needs, and they also fail to analyze the compatibility of food with cooking processes, making it difficult to meet users' needs for dynamically adjusting recipes.
A three-level substitution rule is adopted. Based on the ingredient characteristic data, including target components, target attributes and flavor characteristics, the target ingredient identifier is determined from the inventory ingredients for substitution. The knowledge graph is combined to perform ingredient characteristic matching and inventory update.
It improves the accuracy of alternative food recommendations, meets users' actual needs, enhances user experience, and ensures timely and accurate updates of inventory information.
Smart Images

Figure CN121092736A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, in particular to a food material information processing method and device, an electronic device and a storage medium. BACKGROUND
[0002] At present, the existing smart refrigerator can obtain information such as food material type, weight change rate and spoilage gas concentration through the built-in sensor, so as to identify the food material and judge its freshness and shelf life, and then move the food material close to expiration to a designated position and recommend it to the user, so as to reduce the waste of food material. The user can also search for the required recipe through the refrigerator touch screen or the matching application program, and the smart refrigerator will correspondingly recommend the food material list and production steps required by the recipe.
[0003] However, when the inventory of food materials in the smart refrigerator is insufficient to match all requirements of a certain recipe, the existing scheme can usually only recommend alternative food materials by simply matching the current inventory of food materials, which may lead to the fact that the recommended alternative food materials are not suitable for the actual needs of the user. SUMMARY
[0004] The embodiments of the present application provide a food material information processing method to solve or at least partially solve the above problems.
[0005] Correspondingly, the embodiments of the present application also provide a food material information processing device, an electronic device and a storage medium to ensure the implementation and application of the above method.
[0006] In order to solve the above problems, the embodiments of the present application disclose a food material information processing method applied to a smart refrigerator, the smart refrigerator has an inventory database, and the method comprises:
[0007] In response to a food material selection instruction of a user, determining a first food material identifier and a food material demand quantity corresponding to the first food material identifier;
[0008] Obtaining a food material inventory quantity corresponding to the first food material identifier and a second food material identifier in the inventory database;
[0009] If the food material inventory quantity corresponding to the first food material identifier is less than the food material demand quantity, determining food material characteristic data corresponding to the first food material identifier and the second food material identifier respectively, the food material characteristic data including target ingredients, target attributes and flavor characteristics;
[0010] According to the target ingredients, determining a target food material identifier from the second food material identifier;
[0011] if the target ingredient cannot be determined from the second ingredient identifier according to the target ingredient, the target ingredient identifier is determined from the second ingredient identifier according to the target attribute;
[0012] if the target ingredient cannot be determined from the second ingredient identifier according to the target attribute, the target ingredient identifier is determined from the second ingredient identifier according to the flavor feature;
[0013] The target ingredient identifier is used to replace the first ingredient identifier.
[0014] Optionally, the inventory database has a food inventory corresponding to the second ingredient identifier, the food feature data includes a first target ingredient corresponding to the first ingredient identifier and a second target ingredient corresponding to the second ingredient identifier, and the target ingredient identifier is determined from the second ingredient identifier according to the target ingredient, comprising:
[0015] Calculate the ingredient similarity between the first target ingredient and the second target ingredient;
[0016] The second ingredient identifier with the ingredient similarity greater than or equal to a preset ingredient similarity threshold and the food inventory greater than a first preset inventory is taken as the target ingredient identifier.
[0017] Optionally, the food feature data includes a first target attribute corresponding to the first ingredient identifier, and if the target ingredient cannot be determined from the second ingredient identifier according to the target ingredient, the target ingredient identifier is determined from the second ingredient identifier according to the target attribute, comprising:
[0018] If there is no second ingredient identifier with the ingredient similarity greater than or equal to the preset ingredient similarity threshold and the food inventory greater than the first preset inventory, a food combination scheme corresponding to the second ingredient identifier is obtained, and the food combination scheme has a corresponding second target attribute;
[0019] If the second target attribute satisfies the condition of simulating the first target attribute, and the food inventory corresponding to the second ingredient identifier included in the food combination scheme is greater than a second preset inventory, the second ingredient identifier included in the food combination scheme is taken as the target ingredient identifier.
[0020] Optionally, the food feature data includes a first flavor feature corresponding to the first ingredient identifier and a second flavor feature corresponding to the second ingredient identifier, and if the target ingredient cannot be determined from the second ingredient identifier according to the target attribute, the target ingredient identifier is determined from the second ingredient identifier according to the flavor feature, comprising:
[0021] if there is no second food material identifier in the food material combination scheme satisfying the condition of simulating the first target attribute and the corresponding food material inventory quantity of the second food material identifier is greater than a second preset inventory quantity, determining a flavor similarity between the first flavor feature and the second flavor feature;
[0022] taking the second food material identifier satisfying the preset flavor condition and having the food material inventory quantity greater than a third preset inventory quantity as the target food material identifier.
[0023] Optionally, in response to the user's food material selection instruction, determining the first food material identifier and the food material demand quantity corresponding to the first food material identifier comprises:
[0024] in response to the user's food material selection instruction, obtaining a target recipe, the target recipe comprising food material information, the food material information comprising the first food material identifier and the food material demand quantity of the food material corresponding to the first food material identifier;
[0025] The method further comprises:
[0026] if there is no second food material identifier satisfying the preset flavor condition and having the food material inventory quantity greater than the third preset inventory quantity, determining a functional role of the first food material identifier in the target recipe;
[0027] determining an influence degree of the food material corresponding to the first food material identifier according to the functional role;
[0028] generating a recipe modification suggestion for the target recipe according to the influence degree, and effect difference information between the recipe modification suggestion and the target recipe;
[0029] pushing the recipe modification suggestion and the effect difference information to the user.
[0030] Optionally, the target recipe comprises step information, and after the target food material identifier is used to replace the first food material identifier, the method further comprises:
[0031] for the target recipe, determining to-be-added step information and to-be-modified step information in the step information according to the food material feature data corresponding to the target food material identifier;
[0032] adding the to-be-added step information in the step information and modifying the to-be-modified step information in the step information to obtain an updated target recipe.
[0033] Optionally, the method further comprises:
[0034] In response to the user's food material inventory information update instruction, a food material image and a food material weight of the newly added food material in the smart refrigerator are obtained;
[0035] An appearance feature of the newly added food material is identified according to the food material image, and the appearance feature includes a color feature, a shape feature, and a texture feature;
[0036] The appearance feature is verified according to the shape feature and the food material weight;
[0037] If the appearance feature verification is passed, a newly added food material identifier, a newly added quantity, and an identification confidence of the newly added food material are determined according to the appearance feature and the food material weight;
[0038] If the identification confidence is greater than a preset confidence threshold, the inventory database is updated according to the newly added food material identifier and the newly added quantity.
[0039] Optionally, the determination of the newly added food material identifier, the newly added quantity, and the identification confidence of the newly added food material according to the appearance feature and the food material weight includes:
[0040] The newly added food material identifier of the newly added food material is determined according to the appearance feature, and the newly added food material identifier has a corresponding individual weight;
[0041] The newly added quantity of the newly added food material is calculated according to the food material weight and the individual weight;
[0042] An identification feature weight is obtained;
[0043] An identification confidence corresponding to the newly added food material identifier is determined according to the color feature, the shape feature, the texture feature, the food material weight, and the identification feature weight.
[0044] Optionally, the smart refrigerator is in communication connection with a server, and the server stores a knowledge graph, and the determination of the food material feature data corresponding to the first food material identifier and the second food material identifier includes:
[0045] The knowledge graph is obtained from the server, and the food material feature data corresponding to the first food material identifier and the second food material identifier is determined according to the knowledge graph, the knowledge graph is constructed by the server according to chemical composition parameters, flavor parameters, and texture parameters of the preset food material, and the preset food material at least includes food material corresponding to the first food material identifier and food material corresponding to the second food material identifier.
[0046] Embodiments of the present application also disclose a food material information processing device applied to a smart refrigerator, the smart refrigerator having an inventory database, and the device includes:
[0047] The food material selection module is configured to determine a first food material identifier and a food material demand corresponding to the first food material identifier in response to a food material selection instruction of a user.
[0048] The inventory acquisition module is configured to acquire a food material inventory corresponding to the first food material identifier and a second food material identifier in the inventory database.
[0049] The feature acquisition module is configured to determine food material feature data corresponding to the first food material identifier and the second food material identifier, respectively, if the food material inventory corresponding to the first food material identifier is less than the food material demand, the food material feature data including target ingredients, target attributes, and flavor characteristics.
[0050] The first determination module is configured to determine a target food material identifier from the second food material identifier according to the target ingredients.
[0051] The second determination module is configured to determine the target food material identifier from the second food material identifier according to the target attributes if the target food material identifier cannot be determined from the second food material identifier according to the target ingredients.
[0052] The third determination module is configured to determine the target food material identifier from the second food material identifier according to the flavor characteristics if the target food material identifier cannot be determined from the second food material identifier according to the target attributes.
[0053] The food material replacement module is configured to replace the first food material identifier with the target food material identifier.
[0054] The embodiments of the present application also disclose an electronic device, including a processor and a memory having executable code stored thereon, the executable code causing the processor to execute the food material information processing method according to one or more of the embodiments of the present application.
[0055] The embodiments of the present application also disclose a machine readable medium having executable code stored thereon, the executable code causing a processor to execute the food material information processing method according to one or more of the embodiments of the present application.
[0056] Compared with the prior art, the embodiments of the present application have the following advantages:
[0057] In this embodiment, in response to a user's ingredient selection instruction, a first ingredient identifier and the corresponding ingredient demand quantity are determined; the ingredient inventory quantity corresponding to the first ingredient identifier and the second ingredient identifier are obtained from the inventory database; if the ingredient inventory quantity corresponding to the first ingredient identifier is less than the ingredient demand quantity, the ingredient feature data corresponding to the first ingredient identifier and the second ingredient identifier are determined respectively, the ingredient feature data including target components, target attributes, and flavor characteristics; based on the target components, a target ingredient identifier is determined from the second ingredient identifiers; if the target ingredient identifier cannot be determined from the second ingredient identifiers based on the target components, the target ingredient identifier is determined from the second ingredient identifiers based on the target attributes; if the target ingredient identifier cannot be determined from the second ingredient identifiers based on the target attributes, the target ingredient identifier is determined from the second ingredient identifiers based on the flavor characteristics; and the target ingredient identifier is used to replace the first ingredient identifier. In this embodiment, when the inventory of the ingredient corresponding to the first ingredient identifier required by the user is insufficient, a three-level substitution rule is used to determine the target ingredient identifier to replace the first ingredient identifier from the second ingredient identifiers based on the ingredient characteristic data. This achieves the substitution of the ingredient corresponding to the first ingredient identifier with insufficient inventory. The three-level substitution rule used in this embodiment fully considers the target components, target attributes, and flavor characteristics of the ingredients, improves the accuracy of the substitution ingredient recommendation and its matching degree with the user's actual needs, avoids the problem of substitution ingredients not matching user needs that may be caused by simple matching, and further improves the user experience. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating the steps of an embodiment of a method for processing food information according to this application;
[0059] Figure 2 This is a flowchart illustrating the recipe selection process according to an embodiment of a method for processing ingredient information in this application.
[0060] Figure 3 This is an alternative flowchart of an embodiment of a method for processing food information according to this application;
[0061] Figure 4 This is a flowchart illustrating an embodiment of a method for processing food information according to this application.
[0062] Figure 5 This is a structural block diagram of an embodiment of a food ingredient information processing device according to this application;
[0063] Figure 6 This is a schematic diagram of the structure of a device provided in an embodiment of this application. Detailed Implementation
[0064] In order to make the above objectives, characteristics and advantages of the present application more apparent, further specific embodiments will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0065] At present, the intelligent refrigerator in the prior art can obtain information such as the type of food, the weight change rate and the concentration of spoilage gas through the built-in sensor, so as to identify the food and judge the freshness and shelf life of the food, and then move the food close to expiration to a designated position and recommend it to the user, so as to reduce the waste of food. The user can also search for the required recipe through the touch screen of the refrigerator or the matching application program, and the intelligent refrigerator will correspondingly recommend the list of food required by the recipe and the production steps.
[0066] However, the prior art scheme has the following problems:
[0067] 1. The intelligent refrigerator in the prior art realizes food management through single freshness or image recognition, and only pays attention to food preservation or food inventory record. Since it lacks support for parameters such as chemical composition and flavor substances of food, when the inventory food in the intelligent refrigerator is insufficient to match all requirements of a certain recipe, it cannot realize intelligent substitution based on ingredients and flavors, and can only recommend substitute food by simply matching the current inventory food, which may lead to that the recommended substitute food is not suitable for the actual needs of the user.
[0068] 2. The scheme in the prior art for recommending substitute food by simply matching the current inventory food also ignores the cooking process adaptability of different foods, and fails to analyze the influence of food substitution on the cooking steps in the recipe, making it difficult to meet the needs of users who need to dynamically adjust the recipe due to the lack of target food.
[0069] Therefore, an embodiment of the present application proposes a food information processing method to solve or at least partially solve the above problems existing in the prior art.
[0070] Reference Figure 1 is a step flowchart of an embodiment of a food information processing method of the present application, comprising the following steps:
[0071] Step 101, in response to a food selection instruction of a user, determining a first food identification and a food demand quantity corresponding to the first food identification.
[0072] The food material information processing method of the embodiment of the application is applied to a smart refrigerator. The smart refrigerator has an inventory database, which is used to record food material inventory information corresponding to food materials in the smart refrigerator. The food material inventory information includes second food material identifiers and food material inventory amounts corresponding to different food material identifiers. That is, each food material that has inventory in the smart refrigerator has a corresponding second food material identifier, and each food material corresponding to a different food material identifier corresponds to a food material inventory amount currently stored in the smart refrigerator. A user can control the smart refrigerator through a touch screen on the smart refrigerator or an application program corresponding to the smart refrigerator on another terminal device.
[0073] In an embodiment, the smart refrigerator is in communication connection with a server, and the server stores a knowledge graph. The knowledge graph records property parameters of preset food materials, such as chemical composition parameters, flavor parameters, and texture parameters. The preset food materials at least include food materials corresponding to the first food material identifiers and the second food material identifiers.
[0074] In the embodiment of the application, a user can select a target recipe through a touch screen or an application program corresponding to the smart refrigerator on another terminal device, thereby issuing a food material selection instruction. The smart refrigerator analyzes food material information in the target recipe, and the food material information includes first food material identifiers and food material demand amounts of food materials corresponding to the first food material identifiers, that is, the amounts of food materials corresponding to the first food material identifiers required for completing the preparation of the target recipe.
[0075] Step 102, obtaining food material inventory amounts corresponding to the first food material identifiers and second food material identifiers in the inventory database.
[0076] Step 103, if the food material inventory amount corresponding to the first food material identifier is less than the food material demand amount, determining food material characteristic data corresponding to the first food material identifier and the second food material identifier, the food material characteristic data including target ingredients, target attributes, and flavor characteristics.
[0077] After determining the food material demand amount of the food material corresponding to the first food material identifier, the smart refrigerator obtains current food material inventory information of the smart refrigerator in the local inventory database, which includes current food material inventory amounts of the food material corresponding to the first food material identifier and the second food material identifier in the inventory of the smart refrigerator.
[0078] The food material demand amount of the food material corresponding to the first food material identifier is compared with the actual food material inventory amount. If the food material inventory amount of the food material corresponding to the first food material identifier is less than the food material demand amount, other food materials for replacing the food material corresponding to the first food material identifier need to be determined. The food material inventory amount of the food material corresponding to the first food material identifier less than the food material demand amount includes the case that the food material inventory amount of the food material corresponding to the first food material identifier is 0 (that is, there is no inventory of the food material corresponding to the first food material identifier).
[0079] In the embodiment of the present application, other food materials for replacing the food material corresponding to the first food material identifier are determined by the food material feature data of the food material. Specifically, according to the knowledge graph in the server, the food material feature data corresponding to the first food material identifier and the second food material identifier is determined, the food material feature data includes target ingredients, target attributes and flavor characteristics, and the food material feature data is used to determine other food materials that can replace the food material corresponding to the first food material identifier.
[0080] In step 104, the target food material identifier is determined from the second food material identifier according to the target ingredients.
[0081] In step 105, if the target food material identifier cannot be determined from the second food material identifier according to the target ingredients, the target food material identifier is determined from the second food material identifier according to the target attributes.
[0082] In step 106, if the target food material identifier cannot be determined from the second food material identifier according to the target attributes, the target food material identifier is determined from the second food material identifier according to the flavor characteristics.
[0083] According to the food material feature data, a three-level replacement rule is adopted to determine the target food material identifier from the second food material identifier according to the target ingredients, the target attributes and the flavor characteristics. The three-level replacement rule is that when the target food material identifier cannot be determined according to one of the three-level replacement rules, the next level of the replacement rule is executed to determine the target food material identifier. The three-level replacement rule includes three levels of replacement rules. The food material corresponding to the target food material identifier is in sufficient stock in the smart refrigerator and can be used to replace the food material corresponding to the first food material identifier which is in insufficient stock.
[0084] In step 107, the target food material identifier is used to replace the first food material identifier.
[0085] For the target recipe, the target food material identifier is used to replace the first food material identifier, that is, the food material corresponding to the first food material identifier used in the target recipe is replaced by the food material corresponding to the target food material identifier. The target recipe after replacement is displayed to the user.
[0086] In the embodiment of the present application, when the food material corresponding to the first food material identifier required by the user is in insufficient stock, the three-level replacement rule is adopted to determine the target food material identifier for replacing the first food material identifier from the second food material identifier according to the food material feature data, so as to realize the replacement of the food material corresponding to the first food material identifier which is in insufficient stock. The three-level replacement rule is adopted to replace the food material in the embodiment of the present application, the target ingredients, the target attributes and the flavor characteristics corresponding to the food material are fully considered, the accuracy of the replacement food material recommendation and the matching degree with the actual demand of the user are improved, the problem that the replacement food material is not adapted to the demand of the user due to simple matching is avoided, and the user experience is further improved.
[0087] Optionally, the method further comprises:
[0088] In response to the user's food material inventory information update instruction, obtaining a food material image and a food material weight of the newly added food material in the smart refrigerator;
[0089] According to the food material image, identifying the appearance features of the newly added food material, the appearance features including color features, shape features, and texture features;
[0090] According to the shape features and the food material weight, verifying the appearance features;
[0091] If the appearance features pass the verification, according to the appearance features and the food material weight, determining the newly added food material identification, the newly added quantity, and the recognition confidence of the newly added food material;
[0092] If the recognition confidence is greater than a preset confidence threshold, according to the newly added food material identification and the newly added quantity, updating the inventory database.
[0093] In the embodiments of the present application, a food material identification module is deployed in the main control board of the smart refrigerator, the smart refrigerator has a weight sensor and a camera, and the food material identification module can be used to identify the current food material inventory information of the smart refrigerator by using the data obtained by the weight sensor and the camera, and update the inventory database accordingly.
[0094] Specifically, when the user puts the newly added food material into the smart refrigerator, a food material inventory information update instruction is triggered, and the weight sensor records the total inventory weight change to obtain the food material weight of the newly added food material. For example, when the user puts in the newly added food material, the weight sensor records that the total inventory weight changes from 10 kg to 10.2 kg in real time, thereby obtaining the food material weight of the newly added food material as 200 g. At the same time, the camera captures a food material image. In an embodiment, the camera can be arranged inside the smart refrigerator, and the captured food material image can be a three-view image of the newly added food material, such as a top view, a first side view, and a second side view, to ensure capturing the complete appearance of the newly added food material.
[0095] According to the food material image, an image recognition algorithm is used to identify the appearance features of the newly added food material, the appearance features including color features, shape features, and texture features.
[0096] Specifically, the food material image is converted to an HSV (a color model) color space, and the main color value range and the distribution uniformity are extracted as color features, for example, the main color is red, the main color value range H (Hue, hue) is 0-10°, and the proportion is ≥90%.
[0097] Edge detection is performed on the food image to generate the food's outline, and then the roundness and aspect ratio of the outline are calculated as shape features. In one embodiment, the roundness can be calculated using the following formula (1). When the roundness is ≥0.85, the food can be determined to be round. In one example, a food with an aspect ratio of 1:1 might be an apple, and a food with an aspect ratio greater than 3:1 might be a cucumber.
[0098]
[0099] By applying gray-level co-occurrence matrix (GLCM) analysis to the food images, the smoothness and speckle features of the food surface are obtained as texture features. In one example, if the texture variance representing the smoothness of the food is ≤5, the food is likely an apple; if the number of seed points on the surface is >20, the food is likely a strawberry.
[0100] The appearance characteristics of newly added ingredients can initially determine their identification. However, camera errors or image deviations can lead to misjudgments. For example, if the ingredient is placed at an angle or obscured during image capture, subsequent shape feature recognition may be inaccurate. Therefore, it is necessary to verify the appearance characteristics based on their shape and weight. This involves calculating the density of the new ingredient based on its shape and weight to validate the reasonableness of the identified appearance characteristics. This ensures the accuracy of subsequent ingredient identification and prevents camera errors or image deviations from lowering the confidence level of the recognition results, thus avoiding mislabeling potentially identifiable ingredients as unknown.
[0101] Specifically, the density is calculated using the formula: density = ingredient weight / (length × width × height). This density, or weight per unit volume of the new ingredient, is determined based on its shape and weight. The density of the new ingredient is then combined with the initial assessment of its identification to verify the reasonableness of its appearance. If the density contradicts the initial assessment, the image and weight of the new ingredient are re-acquired. For example, if the initial assessment identifies the new ingredient as an apple (with a normal density range of 0.7-0.9 g / cm³), and the calculated density is 1.2 g / cm³, far exceeding this range, it's possible that occlusion occurred during image capture, resulting in an underestimation of the ingredient's volume and thus an abnormal density. In this case, the image and weight are re-acquired and re-verified until the verification passes.
[0102] In an embodiment, the user can also set not to check again, and set the density of the obtained abnormal new food material as a new food material identifier and record. For example, if the preliminary judgment result of the new food material identifier is an apple, and the calculated density of the new food material is 0.95 g / cm3, the user can set the new food material to correspond to a new food material identifier "improved apple", so as not to trigger the re-collection of data
[0103] If the appearance feature check passes, the new food material identifier, the new quantity and the recognition confidence of the new food material are determined according to the appearance feature and the food material weight. In the case that the recognition confidence is greater than the pre-set confidence threshold, the food material inventory information in the inventory database is updated according to the new food material identifier and the new quantity, so as to record the new food material to the food material inventory information. For example, in the case that the new food material identifier is "apple", the quantity is 1, and the recognition confidence is greater than the pre-set confidence threshold, the result of the new food material identifier being "apple" and the quantity being 1 is used to update the food material inventory information of the inventory database.
[0104] The embodiment of the present application can immediately identify the new food material identifier and the new quantity of the new food material when the intelligent refrigerator receives the new food material. When identifying the new food material, the rationality of the appearance feature recognized from the food material image is checked through the shape feature and the food material weight, so as to avoid the recognition confidence of the recognition result being lowered due to the weight sensor error or the deviation of the photographed image, so as to ensure the recognition accuracy of the food material identifier of the new food material, realize the timeliness and accuracy of the automatic update of the inventory database of the intelligent refrigerator, and improve the user experience.
[0105] Optionally, the new food material identifier, the new quantity and the recognition confidence of the new food material are determined according to the appearance feature and the food material weight, comprising:
[0106] The new food material identifier of the new food material is determined according to the appearance feature, and the new food material identifier has a corresponding individual weight;
[0107] The new quantity of the new food material is calculated according to the food material weight and the individual weight;
[0108] The recognition feature weight is obtained;
[0109] The corresponding recognition confidence of the new food material identifier is determined according to the color feature, the shape feature, the texture feature, the food material weight and the recognition feature weight.
[0110] In the embodiment, the new food material identifier, the new quantity and the recognition confidence of the new food material are determined according to the appearance feature and the food material weight, which can specifically include the following processes:
[0111] According to the appearance features passed by the inspection, the added food material identifier of the added food material is determined, and the added food material identifier has a corresponding individual weight. The added quantity of the added food material is calculated according to the food material weight and the individual weight, that is, the ratio of the food material weight to the individual weight is taken as the added quantity of the added food material. For example, it is determined that the added food material identifier of the added food material is "apple", so the individual weight corresponding to the apple is obtained, which is 150 g. Since the food material weight of the added food material is 200 g, the ratio of the food material weight to the individual weight is about 1.33. Because the single weight of the apple has large discreteness, the added quantity of the added food material is obtained by taking the integer part, which is 1.
[0112] The added food material identifier and the added quantity of the added food material are taken as the recognition result of the added food material. Since there can be one or more recognition results for the added food material, the recognition confidence of the recognition result needs to be calculated according to the color feature, the shape feature, the texture feature, the food material weight and the recognition feature weight, and the final recorded recognition result is determined according to the recognition confidence.
[0113] Specifically, the color feature, the shape feature, the texture feature and the food material weight can be respectively assigned with corresponding recognition feature weights and score rules. In an example, the full score of each feature is 100 points, the recognition feature weight corresponding to the color feature can be 40%, the score rule is that the color feature gets full score when the main color proportion is greater than 85%; the recognition feature weight corresponding to the shape feature can be 30%, the score rule is that the shape feature gets full score when the circularity is greater than or equal to 0.85; the recognition feature weight corresponding to the texture feature can be 10%, the score rule is that the texture feature gets full score when the texture variance is less than or equal to 5; and the recognition feature weight corresponding to the food material weight can be 20%, the score rule is that the food material weight gets full score when the density is within the standard range. The embodiments of the present application do not make any limitation on the specific recognition feature weights and score rules, and the person skilled in the art can set them according to the actual application occasion.
[0114] After determining the feature scores corresponding to the color feature, the shape feature, the texture feature and the food material weight respectively, the recognition confidence of the recognition result is calculated according to formula (2).
[0115] Recognition confidence = Σ (feature score x recognition feature weight) (2)
[0116] In an embodiment, when the recognition confidence of the recognition result is greater than or equal to 80, it is determined that the recognition result can be directly used to update the food material inventory information in the inventory database; when the recognition confidence of the recognition result is 60% to 79%, review needs to be started, for example, the image of the added food material is re-taken or the user is prompted to confirm whether the recognition result is correct; when the recognition confidence of the recognition result is less than 60%, the added food material is marked as "unknown food material".
[0117] After the newly added food material is identified to obtain an identification result, the embodiment of the present application can assign corresponding identification feature weights and score rules to different identification features, so as to calculate the identification confidence of the identification result. Only when the identification confidence of the identification result is greater than a preset confidence threshold, the food material inventory information in the inventory database is updated according to the newly added food material identification and the newly added quantity, thereby improving the accuracy of the food material inventory information update.
[0118] Optionally, the smart refrigerator is in communication connection with a server, and the server stores a knowledge graph. The determination of the food material feature data corresponding to the first food material identification and the second food material identification respectively includes:
[0119] The knowledge graph is obtained from the server, and the food material feature data corresponding to the first food material identification and the second food material identification is determined according to the knowledge graph. The knowledge graph is obtained by the server according to the chemical composition parameters, flavor parameters and texture parameters of the preset food materials. The preset food materials at least include the food material corresponding to the first food material identification and the food material corresponding to the second food material identification.
[0120] The knowledge graph of the embodiment of the present application records the chemical composition parameters, flavor parameters and texture parameters of the preset food materials, so that the food material feature data corresponding to the first food material identification and the second food material identification can be determined according to the preset knowledge graph in the server.
[0121] In an example, the chemical composition parameters of the preset food materials in the knowledge graph can include: protein content and type (such as whey protein, casein protein), fat content and type (saturated / unsaturated fatty acid ratio), carbohydrate content (monosaccharide, disaccharide, polysaccharide ratio), water content, ash content (mineral content), vitamin type and content (such as vitamin C, B vitamins), trace elements (iron, zinc, calcium, etc.), enzyme substances (such as protease, amylase), antioxidant substances (polyphenols, carotenoids), etc. The chemical composition parameters can determine the food material corresponding to the target food material identification for replacement, and can be used for nutrition balance analysis, allergen identification and special dietary needs (such as low sugar, high protein) adaptation, etc.
[0122] In another example, the flavor parameters of the preset food materials in the knowledge graph can include volatile organic compounds and taste substances. The volatile organic compounds can include aldehydes (such as hexanal producing grassy aroma), ketones (such as 2,3-butanedione producing creamy aroma), esters (such as ethyl acetate producing fruity aroma), sulfur-containing compounds (such as allicin), and the like. The taste substances can include taste amino acids (glutamic acid, aspartic acid), sugar acid ratio (affecting sweet and sour balance), bitter substances (such as caffeine, naringin), umami substances (nucleotides, organic acids), and the like. The flavor parameters can determine the corresponding food materials of the target food materials for substitution, and predict the synergistic / antagonistic effect of the combination of food materials, develop innovative menu combinations, and the like.
[0123] In still another example, the texture parameters of the preset food materials in the knowledge graph can include viscosity (affecting sauce thickness), elastic modulus (affecting chewiness), melting / setting point (determining thermal stability), water holding capacity (affecting juiciness), fiber length and directionality (affecting meat texture), cell wall strength (affecting crispness), fat cross-linking degree (affecting melting characteristics), starch gelatinization temperature (affecting cooking timing), and the like. The texture parameters can determine the corresponding food materials of the target food materials for substitution, and predict the physical changes (such as shrinkage) during cooking, optimize the cutting method and cooking time of the food materials, evaluate the impact of the corresponding food materials of the target food materials for substitution on the appearance of the final dish, and the like.
[0124] For example, in the knowledge graph, the data of butter can include: milk fat content 35%-40%, protein 2%, moisture 55%, flavor characteristics "rich milk aroma", texture "smooth and dense", and the like.
[0125] According to the food material characteristic data in the knowledge graph, not only the corresponding food materials of the target food materials for substitution can be determined, but also the accuracy of the identification of the newly added food materials can be verified (such as by detecting the fat content of the newly added food materials to verify whether the identification result is correct), cooking process adaptation analysis (such as determining which pre-treatment method or cooking utensil is used in cooking), personalized recommendation (such as automatically filtering food materials containing unsuitable ingredients according to the health data of the user), optimization of emergency solutions when the substitution solution cannot be generated, optimization of the knowledge graph according to the learning feedback of the actual use of the user, and the like.
[0126] The specific parameter content contained in the above knowledge graph and the usefulness of the knowledge graph are only examples, and the embodiments of the present application do not limit the specific parameter content contained in the knowledge graph and the usefulness of the knowledge graph in any way. Those skilled in the art can set them according to actual needs.
[0127] The knowledge graph in the embodiment of the application includes a plurality of food material characteristic data of preset food materials. Subsequently, the food material characteristic data in the knowledge graph can be used to identify a target food material corresponding to a food material that can replace a first food material with insufficient inventory, so that the target food material corresponding to the food material is more in line with the user's intention.
[0128] Optionally, the inventory database has the second food material corresponding to the inventory quantity of the second food material, the food material characteristic data includes a first target component corresponding to the first food material and a second target component corresponding to the second food material, and the target component is used to determine a target food material from the second food material, including:
[0129] Calculating the component similarity between the first target component and the second target component;
[0130] The second food material with the component similarity greater than or equal to a preset component similarity threshold and the inventory quantity greater than a first preset inventory quantity is taken as the target food material.
[0131] The embodiment of the application realizes the determination of the target food material for replacing the first food material through the three-level replacement rules.
[0132] The first-level replacement rule is a direct replacement rule. The main component of the food material corresponding to the first food material is determined according to the chemical composition parameter corresponding to the first food material in the knowledge graph, and is taken as the first target component. For example, the first food material corresponds to butter, and butter contains 35% to 40% of milk fat. The milk fat is taken as a first target component. The second target component of the food material corresponding to the second food material in the inventory is further obtained according to the knowledge graph. For example, the first target component is the milk fat content of the candidate food material, and the second target component is the milk fat content of the food material corresponding to the second food material. That is, the second target component is the same component as the first target component in the food material corresponding to the second food material. The first target component can include a plurality of main components of the food material corresponding to the first food material.
[0133] The component similarity between the first target component and the second target component corresponding to each second food material in the inventory is calculated. Specifically, the component similarity can be calculated according to the following formula (3). If the first target component includes a plurality of main components of the food material corresponding to the first food material, the recipe weight and the component parameter similarity corresponding to each main component of the first food material are multiplied and added to obtain the component similarity between the first target component of the food material corresponding to the first food material and the second target component of the food material corresponding to a certain second food material.
[0134] Component similarity = Σ (recipe weight x component parameter similarity) (3)
[0135] wherein the recipe weight represents the importance of the first food material in the target recipe, which can be set according to actual conditions. In an embodiment, if the first food material is a core food material in the target recipe, the recipe weight is higher. For example, if the target recipe is a cake making recipe, flour is a core food material.
[0136] The parameter similarity represents a quantitative matching value of the same ingredients between the first food material and the second food material, which can be calculated based on the food material feature data in the knowledge graph. In an example, the parameter similarity can be calculated by using the following formula (4):
[0137] Parameter similarity = 1 - |A Ingredient% - B Ingredient%| / Threshold range (4)
[0138] wherein A Ingredient% is the content percentage of the first target ingredient of the first food material, B Ingredient% is the content percentage of the same second target ingredient in the second food material, and the threshold range is the range of percentage. For example, if the first food material is butter and the second food material is yogurt, the first target ingredient and the second target ingredient are milk fat content, and the milk fat content in butter and the milk fat content in yogurt differ by 10%, the parameter similarity of the milk fat content between butter and yogurt is 1 - |10%| / 100% = 90%.
[0139] The second food material whose ingredient similarity is greater than or equal to a preset ingredient similarity threshold and whose food material inventory is greater than a first preset inventory is determined as a target food material. In an embodiment, the preset ingredient similarity threshold can be 85%. After determining that there is a second food material in the smart refrigerator inventory whose ingredient similarity is greater than or equal to 85%, it is further determined whether the food material inventory of the second food material is sufficient, i.e., whether the food material inventory of the second food material is greater than the first preset inventory. Only the second food material whose ingredient similarity and food material inventory both meet the conditions is determined as the target food material.
[0140] In the alternative rule of the first level, the target food material is determined by the ingredient similarity between the first food material and the second food material, which quantifies the feasibility of food material substitution and improves the accuracy of food material substitution, so that the recommended substitute food material is more suitable for the actual needs of the user.
[0141] Optionally, the food material feature data comprises a first target attribute corresponding to the first food material identifier, and the determining the target food material identifier from the second food material identifier according to the target attribute comprises:
[0142] If there is no second food material identifier with the ingredient similarity greater than or equal to the preset ingredient similarity threshold and the food material inventory greater than the first preset inventory, a food material combination scheme corresponding to the second food material identifier is obtained, and the food material combination scheme has a corresponding second target attribute.
[0143] If the second target attribute satisfies a condition of simulating the first target attribute, and a food material inventory of a second food material identifier included in the food material combination scheme is greater than a second preset inventory, the second food material identifier included in the food material combination scheme is taken as the target food material identifier.
[0144] The embodiment of the present application does not determine the target food material identifier in the first level replacement rule, that is, there is no second food material identifier with the ingredient similarity greater than or equal to the preset ingredient similarity threshold and the food material inventory greater than the first preset inventory, and the second level replacement rule, which is a combination replacement rule, can be executed to combine the existing inventory food materials to achieve the effect of replacing the food material corresponding to the first food material identifier with insufficient inventory.
[0145] Specifically, the embodiment of the present application can analyze the first target attribute of the food material corresponding to the first food material identifier based on the knowledge graph, that is, the key characteristics of the food material corresponding to the first food material identifier in the target recipe, for example, the key characteristics of butter in the recipe for making cakes are milk fat concentration and texture. Thus, a combinable food material combination scheme, such as the food material combination scheme of "milk + butter", is obtained from the food materials corresponding to the second food material identifier in the inventory. If the second target attribute satisfies the condition of simulating the first target attribute, and the food material inventory of the food material corresponding to the second food material identifier included in the food material combination scheme is greater than the second preset inventory, the second food material identifier included in the food material combination scheme is taken as the target food material identifier. For example, in the food material combination scheme of "milk + butter", if milk and butter are mixed in a certain proportion to simulate the milk fat concentration and texture of butter, and the food material inventory of milk and butter is greater than the second preset inventory, milk and butter can be taken as the food material corresponding to the target food material identifier.
[0146] In an example, also taking the example of replacing butter with the food material combination scheme of "milk + butter", the complete second-level replacement rule can be expressed as follows. First, determine the key characteristics of butter in the recipe for making cakes from the knowledge graph, including the chemical characteristics of milk fat concentration (35%-40%) and water content (55%), and the texture characteristics of smooth and dense (viscosity > 50 cP). Therefore, the food material combination scheme for replacing butter needs to meet similar milk fat concentration and texture.
[0147] According to the knowledge graph analysis, milk (milk fat 3.5%) can provide liquid volume and part of milk fat, and butter (milk fat 82%) can supplement the milk fat gap, so the food material combination scheme of "milk + butter" is obtained. Assuming that the mixing ratio of the initially generated food material combination scheme is "100g milk + 20g butter", the equivalent milk fat of "100g milk + 20g butter" can be calculated to be about 16.6%. Since the standard milk fat content of butter is 35%-40%, the mixing ratio of the food material combination scheme needs to be further adjusted (such as reducing milk and increasing butter) until the equivalent milk fat is greater than or equal to 35%. At the same time, the equivalent values of other ingredients (such as protein and water) need to be calculated, and the physical changes after the food material combination is mixed, such as the high melting point of butter which may affect the low-temperature stability of the finished cake, need to be evaluated.
[0148] Finally, the intelligent refrigerator determines the final target mixing ratio food material combination scheme for replacing the food material corresponding to the first food material identifier and the corresponding target recipe modification suggestion, and pushes them to the user.
[0149] When the first-level replacement rule fails, the embodiments of the present application can start the second-level replacement rule, determine the food material combination scheme that can be used to replace the food material corresponding to the first food material identifier by using the target attribute, and realize food material replacement by combining the inventory food materials, thereby improving the flexibility of food material replacement.
[0150] Optionally, the food material feature data includes a first flavor feature corresponding to the first food material identifier and a second flavor feature corresponding to the second food material identifier, and if the target food material identifier cannot be determined from the second food material identifier according to the target attribute, the target food material identifier is determined from the second food material identifier according to the flavor feature, including:
[0151] If there is no second target attribute satisfying the condition of simulating the first target attribute, and the second food material identifier included in the food material combination scheme has a second food material inventory quantity greater than a second preset inventory quantity, the flavor similarity between the first flavor feature and the second flavor feature is determined.
[0152] The second food material identifier with the flavor similarity satisfying a preset flavor condition and the food material inventory quantity greater than a third preset inventory quantity is taken as the target food material identifier.
[0153] In the second level of the substitution rule, if the target food material identifier is not determined, i.e., there is no second target attribute satisfying the condition of simulating the first target attribute, and the second food material identifier corresponding to the food material in the food material combination scheme has a food material inventory greater than the second preset inventory, the third level of the substitution rule can be executed. The third level of the substitution rule is a flavor substitution rule, which determines the food material similar in flavor to the food material corresponding to the first food material identifier in the existing inventory to achieve the effect of substituting the food material corresponding to the first food material identifier with insufficient inventory.
[0154] In the flavor similarity, it is not required that the flavor characteristics of the two food materials in the knowledge graph are completely the same, but based on the volatile organic material characteristics, taste attributes (such as sour, sweet, bitter, salty, and fresh) and other parameters recorded in the knowledge graph to match the similarity, or other ways to match the food materials with flavor similarity satisfying the preset flavor condition. For example, the flavor characteristics of butter are “rich milk fragrance”, and the flavor characteristics of coconut milk are “tropical plant milk fragrance”. Because they contain similar fat-soluble flavor substances, they can be determined as the flavor similarity between them satisfying the preset flavor condition. After determining the flavor similarity between the first flavor characteristic and the second flavor characteristic, the second food material identifier with flavor similarity satisfying the preset flavor condition and food material inventory greater than the third preset inventory is determined as the target food material identifier.
[0155] In an embodiment, the food material with flavor similarity satisfying the preset flavor condition can use the flavor wheel (favor wheel) model method or the flavor analysis method. When the flavor wheel model is used to evaluate the flavor similarity, the dominant flavor characteristics of the food material can be matched, and the differences in the secondary flavor characteristics of the food material are allowed. Specifically, the principal component analysis (PCA) can be used to calculate the flavor vector distance between the two food materials after dimensionality reduction.
[0156] The flavor analysis method is realized through three-level analysis, including chemical composition comparison, sensory database matching, and user feedback correction three-level analysis. The chemical composition comparison needs to analyze the key components of the flavor substances in the food material (such as butyldiketone in butter and lauric acid in coconut milk). When the core flavor substance overlap rate between the food material corresponding to the first food material identifier and the food material corresponding to the second food material identifier is ≥65%, the food material corresponding to the second food material identifier enters the candidate; the sensory database matching can refer to the pre-labeled sensory evaluation labels (such as “milk fragrance” and “nutty fragrance”) of the professional chef team; the user feedback correction can dynamically adjust the flavor similarity according to the user acceptance of the historical food material substitution cases.
[0157] In an example, the complete third-level substitution rule can be expressed as follows. When the first food material identifier corresponding to the food material is butter, all food materials labeled with "milk flavor" flavor feature data are retrieved through the knowledge graph, and food materials with too large chemical composition differences (such as milk filtered due to insufficient milk fat content) are excluded, and finally coconut milk is obtained, which satisfies the preset flavor condition of flavor similarity, because the core flavor substance lauric acid of coconut milk has a similar taste receptor activation mode as butyldione of butter, and the user's acceptance success rate record for using coconut milk to replace butter is 72% in the historical record. However, when the substitution scheme is actually recommended, the amount of coconut milk needs to be adjusted according to the amount of food material demand of butter.
[0158] When the second-level substitution rule fails, the third-level substitution rule can be started in the embodiment of the application to determine the target food material that can be used to replace the food material corresponding to the first food material identifier, so as to ensure that the flavor of the food material used for replacement is similar to the food material originally planned to be used, and the flexibility of food material replacement and the user experience are improved.
[0159] Optionally, in response to the food material selection instruction of the user, the first food material identifier and the food material demand amount corresponding to the first food material identifier are determined.
[0160] In response to the food material selection instruction of the user, a target recipe is obtained, the target recipe includes food material information, and the food material information includes the first food material identifier and the food material demand amount of the food material corresponding to the first food material identifier.
[0161] The method further includes:
[0162] If there is no second food material identifier whose flavor similarity satisfies the preset flavor condition and whose food material inventory amount is greater than the third preset inventory amount, the function role of the first food material identifier in the target recipe is determined.
[0163] The influence degree of the food material corresponding to the first food material identifier is determined according to the function role.
[0164] A recipe modification suggestion for the target recipe and effect difference information between the recipe modification suggestion and the target recipe are generated according to the influence degree.
[0165] The recipe modification suggestion and the effect difference information are pushed to the user.
[0166] In the embodiment of the application, if the third-level substitution rule cannot confirm the target food material identifier, the intelligent refrigerator will enter a deep analysis mode to generate a recipe modification suggestion, corresponding effect difference information, and / or a food material procurement scheme for the user.
[0167] In an embodiment, after determining the target food material identification, the chemical compatibility (i.e. chemical component similarity) between the food material corresponding to the target food material identification and the replaced food material, the process adaptation degree (the amount of content that needs to be modified in the target recipe after replacing the food material), and the flavor matching degree (whether the flavor characteristics match other food materials in the target recipe) can be further determined according to the food material corresponding to the target food material identification, and the replacement score of the food material corresponding to the target food material identification is calculated according to the chemical compatibility, the process adaptation degree, and the flavor matching degree. When the replacement score exceeds the replacement score threshold, the food material replacement or the step information of the target recipe after modification can be directly executed, otherwise it is determined that the replacement scheme is not executable, and the deep analysis mode needs to be entered.
[0168] Specifically, in the target recipe determined by the user, the food material information is included, the food material information includes a first food material identification and a food material demand quantity of the food material corresponding to the first food material identification, and different food materials corresponding to different first food material identifications correspond to different functional roles in the target recipe. In an embodiment, three functional roles can be divided, including a structural role (the food material has a greater impact on the physical structure of the dish), a flavor role (the food material has a greater contribution to the overall flavor), and a decorative role (the food material has a greater role in the visual presentation of the dish).
[0169] In an embodiment, the functional role of the food material corresponding to the first food material identification can be determined by the food material characteristic parameters in the knowledge graph combined with the context analysis of the target recipe.
[0170] Since the absence of different functional roles corresponds to different degrees of influence on the target recipe, the influence degree of the food material corresponding to the first food material identification can be determined according to the functional role. The different degrees of influence of the absence of different functional roles on the target recipe can be set according to the user's needs in advance. The recipe modification suggestion for the target recipe and the effect difference information between the recipe modification suggestion and the target recipe are generated according to the influence degree, and the recipe modification suggestion and the effect difference information are pushed to the user.
[0171] Specifically, for the absence of the structural role, the recipe modification suggestion of changing the cooking method (such as changing the cake making to the mousse making) can be provided, for the absence of the flavor role, the recipe modification suggestion of enhancing other flavor seasoning can be provided, and for the absence of the decorative role, the recipe modification suggestion of simplifying the plate arrangement can be provided. The recipe modification suggestion can also include providing an emergency cooking scheme, and the emergency cooking scheme can include the following alternative schemes: a simplified version of the recipe (omitting part of the steps or ingredients), a similar recipe (using existing inventory food materials to make other dishes), and a creative combination (innovative arrangement of existing food materials). Each recipe modification suggestion is clearly labeled with effect difference information, such as "simplified version of the recipe with slightly worse taste but can complete the basic cooking".
[0172] The effect difference information can be determined by knowledge graph-based quantitative analysis, cooking process influence analysis, and user feedback data integration, and the effect difference information can be described from the dimensions of taste difference, finished product appearance, and operation complexity.
[0173] In an embodiment, the smart refrigerator can also provide a smart purchase suggestion for the first food material corresponding to the identified food material in the case of insufficient inventory. Specifically, a hierarchical purchase plan can be provided according to the food material characteristics. For example, for storage-resistant food materials (such as dried goods and seasonings), the long-term shopping list is automatically added; for fresh food materials, the delivery time of nearby supermarkets is calculated, and an instant purchase option such as "1-hour delivery" is displayed; for special food materials, alternative online shopping channels are recommended. Each smart purchase suggestion is accompanied by detailed estimated delivery time and price comparison.
[0174] In another embodiment, the smart refrigerator can also enable a learning feedback mechanism to record replacement failure cases. First, the details of the current replacement failure case are recorded, including the missing food material, the current inventory status of the smart refrigerator, and user feedback. Second, the case is added to the research queue, and the professional team analyzes and supplements the knowledge graph in the future. Third, with the user's consent, special data of the target recipe can be collected for system optimization, and a humanized prompt will be given: "I'm sorry, there is no perfect solution for the time being. We will continue to improve. Are you willing to share your replacement experience?".
[0175] When the application embodiment cannot determine the replaceable food material, it can still provide the user with recipe modification suggestions for the target recipe and effect difference information between the recipe modification suggestions and the target recipe, avoiding cooking failure due to the inability to obtain a replacement food material, providing more flexible cooking options for the user, and improving the user's experience.
[0176] Optionally, the target recipe includes step information, and after the target food material identified replaces the first food material identified, the method further includes:
[0177] For the target recipe, determining to-be-added step information and to-be-modified step information in the step information according to the food material characteristics data corresponding to the target food material identified;
[0178] Adding the to-be-added step information in the step information and modifying the to-be-modified step information in the step information to obtain an updated target recipe.
[0179] After the target food material identified replaces the first food material identified in the target recipe, the target recipe needs to be adjusted to adapt to the target food material identified.
[0180] Specifically, first, the actual amount of the food material corresponding to the target food material identifier in the target recipe is determined according to the substitution relationship between the food material corresponding to the target food material identifier and the food material corresponding to the first food material identifier in the target recipe.
[0181] Secondly, the step information of the target recipe is adjusted. For the target recipe, the step information to be added and the step information to be modified in the step information are determined according to the food material characteristic data of the food material corresponding to the target food material identifier. For example, when apples are replaced by pears, a step of soaking in lemon juice for anti-oxidation treatment needs to be added; when yogurt is replaced by butter, the stirring speed needs to be reduced; when coconut oil is replaced by butter, the temperature needs to be reduced by 10 degrees Celsius, etc. Then, the step information to be added is added to the step information of the target recipe, and the step information to be modified in the step information is modified, to obtain an updated target recipe.
[0182] Taking the modification of the target recipe by replacing butter with yogurt as an example, in the preprocessing stage of the target recipe, the original step is “butter needs to be softened in advance at room temperature”, which needs to be modified to “yogurt needs to be filtered with gauze to remove 20% whey (the filtering time needs to be 5 minutes) according to the food material characteristic data of yogurt; in the mixing stage of the target recipe, the original step is “add sugar in batches to whip the butter until it is fluffy”, which needs to be modified to “mix sugar and yogurt first, and use cutting method to avoid excessive stirring (provide animation demonstration method)”; in the heating stage of the target recipe, the original step is “heat to 60 degrees Celsius with water separation”, which needs to be modified to “control the heating temperature not to exceed 50 degrees Celsius” because high temperature will cause the denaturation of yogurt protein; in the final adjustment stage of the target recipe, a new step needs to be added, which is “the product needs to be refrigerated for 30 minutes to stabilize the texture (provide countdown reminder)”.
[0183] In an embodiment, the updated target recipe or the recipe modification suggestion can be displayed to the user through the touch screen on the smart refrigerator or the application program on the terminal device. Specifically, the updated target recipe displayed to the user can include three parts: one is the substitution reason (such as “yogurt contains similar milk fat to provide smooth taste”), the second is the specific amount of the substituted food material (such as “replace 100 grams of butter with 150 grams of yogurt”), and the third is the modified cooking process. After the user selects to accept, the custom recipe can be saved, and if the user selects not to accept, the process returns to the starting point of selecting the target recipe.
[0184] After determining the food material for substitution, the embodiment of the present application adjusts the target recipe according to the substitution of the food material, considers the cooking process adaptability of different food materials, and thus meets the needs of users to dynamically adjust the recipe due to the lack of target food materials.
[0185] In order for those skilled in the art to more clearly understand the method for processing food material information provided by the embodiments of the present application, the following will be explained through the specific implementation process of the method for processing food material information. Figures 2 to 4 The implementation process of the method for processing food material information of the embodiments of the present application will be explained.
[0186] Referring to Figure 2 is a recipe selection flowchart of an embodiment of the food material information processing method of the present application.
[0187] The user first selects a target recipe through a touch screen on the smart refrigerator or an application corresponding to the smart refrigerator on other terminal equipment, thereby issuing a food material selection instruction. The smart refrigerator analyzes the food material information required in the target recipe and compares it with the currently stored food materials in the local inventory database to determine whether there are missing food materials, i.e., food materials required in the target recipe that cannot be provided by the current inventory. If there are no missing food materials, the original target recipe is directly displayed to the user; if there are missing food materials, a three-level substitution rule is started to determine the target food materials that can be substituted in the inventory.
[0188] Referring to Figure 3 is a substitution flowchart of an embodiment of the food material information processing method of the present application.
[0189] First, the first-level direct substitution rule is used to find the target food materials that can be substituted. By querying the chemical components of the existing inventory food materials and the food materials to be substituted in the target recipe in the knowledge graph, the target food material identifiers with a component similarity ≥ 85% are found in the second food material identifiers corresponding to the inventory food materials. If the target food material identifier is found, the inventory availability is checked to determine whether the target food material identifier exists in the actual inventory and whether the quantity of the food material corresponding to the target food material identifier is sufficient; if the target food material identifier is found and has inventory availability, the target recipe adjustment is executed; if the target food material identifier is not found or does not have inventory availability, the second-level combination substitution rule is executed.
[0190] The second-level combination substitution rule designs a food material combination scheme that can be used for substitution by querying the attribute data in the knowledge graph. If a reasonable food material combination scheme is found, the inventory availability is checked to determine whether the target food material identifiers contained in the food material combination scheme exist in the actual inventory and whether the quantity of the food material corresponding to the target food material identifier is sufficient; if the target food material identifier is found and has inventory availability, the target recipe adjustment is executed; if a reasonable food material combination scheme cannot be obtained or the target food material identifier does not have inventory availability, the third-level flavor compensation substitution rule is executed.
[0191] The third-level flavor compensation substitution rule queries the flavor feature data in the knowledge graph to find a target food material identifier similar in flavor in the second food material identifier corresponding to the inventory food material. If the target food material identifier similar in flavor is found, inventory availability is checked to determine whether the target food material identifier exists in the actual inventory and whether the quantity of the food material corresponding to the target food material identifier is sufficient. If the target food material identifier is found and has inventory availability, target recipe adjustment is performed. If the target food material identifier similar in flavor cannot be found or the target food material identifier does not have inventory availability, the deep analysis mode is entered.
[0192] Referring to Figure 4 is a scheme processing flowchart of a food material information processing method embodiment of the present application.
[0193] Target recipe adjustment needs to predict the ingredient / flavor difference of the food material corresponding to the target food material identifier compared with the original food material, and adjust the food material quantity of the food material corresponding to the target food material identifier based on the ingredient / flavor difference, and modify the cooking steps in the target recipe.
[0194] The deep analysis mode analyzes the functional role of the missing food material in the target recipe, evaluates the impact degree of the missing food material according to the functional role of the missing food material, further proposes recipe modification suggestions, and can also trigger intelligent procurement, call an emergency solution library, and the like to generate complete recipe modification suggestions. Learning feedback can also be enabled to record the case of this substitution failure.
[0195] The integration needs to provide the user with the updated target recipe or recipe modification suggestions to generate complete suggestion schemes, and display the complete suggestion schemes on the touch screen or other terminal devices of the smart refrigerator or the application program corresponding to the smart refrigerator. If the user accepts the complete suggestion scheme, the updated target recipe or recipe modification suggestions can be saved. If the user does not accept the scheme, the flowchart returns to the starting point.
[0196] The embodiment of the present application determines the target food material identifier for replacing the first food material identifier from the second food material identifier according to the food material feature data when the inventory of the first food material identifier corresponding to the first food material identifier is insufficient, thereby realizing the replacement of the food material corresponding to the first food material identifier with insufficient inventory. The embodiment of the present application uses the three-level substitution rule to replace the food material, fully considers the target ingredient, target attribute, and flavor feature of the food material, improves the accuracy of the recommended substitute food material and its matching degree with the actual needs of the user, avoids the problem that the substitute food material may not be adapted to the needs of the user due to simple matching, and further improves the user experience.
[0197] It should be noted that, for the method embodiments, the series of acts combined is described for simplicity, but those of skill in the art should understand that the present application embodiments are not limited by the order of acts described, as some acts can take place simultaneously or in an order different from that described. Also those of skill in the art should understand that embodiments described in the specification are preferred embodiments, and that the acts described in the specification are not necessarily all required to carry out the application embodiments.
[0198] Based on the above-mentioned embodiments, the present embodiment further provides a food material information processing device, which is applied to terminal equipment, server and other electronic equipment.
[0199] Referring to Figure 5 , a structural block diagram of a food material information processing device embodiment of the present application is shown, which can specifically include the following modules:
[0200] The food material selection module 501 is configured to determine a first food material identifier and a food material demand quantity corresponding to the first food material identifier in response to a food material selection instruction of a user.
[0201] The inventory acquisition module 502 is configured to acquire a food material inventory quantity corresponding to the first food material identifier and a second food material identifier in the inventory database.
[0202] The feature acquisition module 503 is configured to determine food material feature data corresponding to the first food material identifier and the second food material identifier respectively if the food material inventory quantity corresponding to the first food material identifier is less than the food material demand quantity, the food material feature data including target ingredients, target attributes and flavor characteristics.
[0203] The first determination module 504 is configured to determine a target food material identifier from the second food material identifier according to the target ingredients.
[0204] The second determination module 505 is configured to determine the target food material identifier from the second food material identifier according to the target attributes if the target food material identifier cannot be determined from the second food material identifier according to the target ingredients.
[0205] The third determination module 506 is configured to determine the target food material identifier from the second food material identifier according to the flavor characteristics if the target food material identifier cannot be determined from the second food material identifier according to the target attributes.
[0206] The food material replacement module 507 is configured to replace the first food material identifier with the target food material identifier.
[0207] Optionally, the inventory database has a corresponding ingredient inventory quantity of the second ingredient identifier, the ingredient feature data comprises a first target component corresponding to the first ingredient identifier and a second target component corresponding to the second ingredient identifier, and the first determination module 504 comprises:
[0208] a component similarity calculation sub-module, configured to calculate a component similarity between the first target component and the second target component;
[0209] a first determination sub-module, configured to determine the second ingredient identifier as the target ingredient identifier if the component similarity is greater than or equal to a preset component similarity threshold and the ingredient inventory quantity is greater than a first preset inventory quantity.
[0210] Optionally, the ingredient feature data comprises a first target attribute corresponding to the first ingredient identifier, and the second determination module 505 comprises:
[0211] an ingredient combination sub-module, configured to obtain an ingredient combination scheme corresponding to the second ingredient identifier if there is no second ingredient identifier whose component similarity is greater than or equal to the preset component similarity threshold and whose ingredient inventory quantity is greater than the first preset inventory quantity, the ingredient combination scheme having a corresponding second target attribute;
[0212] a second determination sub-module, configured to determine the second ingredient identifier in the ingredient combination scheme as the target ingredient identifier if the second target attribute satisfies a condition of simulating the first target attribute and a corresponding ingredient inventory quantity of the second ingredient identifier in the ingredient combination scheme is greater than a second preset inventory quantity.
[0213] Optionally, the ingredient feature data comprises a first flavor feature corresponding to the first ingredient identifier and a second flavor feature corresponding to the second ingredient identifier, and the third determination module 506 comprises:
[0214] a flavor similarity determination sub-module, configured to determine a flavor similarity between the first flavor feature and the second flavor feature if there is no second ingredient identifier whose second target attribute does not satisfy a condition of simulating the first target attribute and whose corresponding ingredient inventory quantity in the ingredient combination scheme is greater than a second preset inventory quantity;
[0215] a third determination sub-module, configured to determine the second ingredient identifier as the target ingredient identifier if the flavor similarity satisfies a preset flavor condition and the ingredient inventory quantity is greater than a third preset inventory quantity.
[0216] Optionally, the ingredient selection module 501 comprises:
[0217] The recipe obtaining module is configured to obtain a target recipe in response to the ingredient selection instruction of the user, the target recipe comprising ingredient information, the ingredient information comprising the first ingredient identifier and an ingredient demand quantity of the ingredient corresponding to the first ingredient identifier;
[0218] The apparatus further comprises:
[0219] The role determining module is configured to determine a functional role of the first ingredient identifier in the target recipe if there is no second ingredient identifier whose flavor similarity satisfies the preset flavor condition and whose ingredient inventory quantity is greater than the third preset inventory quantity.
[0220] The influence degree determining module is configured to determine an influence degree of the ingredient corresponding to the first ingredient identifier according to the functional role.
[0221] The recipe modification module is configured to generate a recipe modification suggestion for the target recipe according to the influence degree, and effect difference information between the recipe modification suggestion and the target recipe.
[0222] The suggestion pushing module is configured to push the recipe modification suggestion and the effect difference information to the user.
[0223] Optionally, the target recipe comprises step information, and the apparatus further comprises:
[0224] The step confirming module is configured to determine, for the target recipe, to-be-added step information and to-be-modified step information in the step information according to the ingredient feature data corresponding to the target ingredient identifier.
[0225] The step modifying module is configured to add the to-be-added step information in the step information, and modify the to-be-modified step information in the step information, to obtain an updated target recipe.
[0226] Optionally, the apparatus further comprises:
[0227] The data obtaining module is configured to obtain, in response to an ingredient inventory information updating instruction of the user, an ingredient image and an ingredient weight of a newly-added ingredient in the smart refrigerator.
[0228] The image recognition module is configured to recognize an appearance feature of the newly-added ingredient according to the ingredient image, the appearance feature comprising a color feature, a shape feature, and a texture feature.
[0229] The appearance verifying module is configured to verify the appearance feature according to the shape feature and the ingredient weight.
[0230] The confidence determination module is configured to determine, if the appearance feature verification passes, the new food material identifier, the new quantity, and the recognition confidence of the new food material according to the appearance feature and the food material weight.
[0231] The food material updating module is configured to update the inventory database according to the new food material identifier and the new quantity, if the recognition confidence is greater than a preset confidence threshold.
[0232] Optionally, the confidence determination module comprises:
[0233] The new identifier determination submodule is configured to determine the new food material identifier of the new food material according to the appearance feature, the new food material identifier having a corresponding individual weight.
[0234] The quantity determination submodule is configured to calculate the new quantity of the new food material according to the food material weight and the individual weight.
[0235] The weight acquisition submodule is configured to acquire the recognition feature weight.
[0236] The confidence calculation submodule is configured to determine the recognition confidence corresponding to the new food material identifier according to the color feature, the shape feature, the texture feature, the food material weight, and the recognition feature weight.
[0237] Optionally, the smart refrigerator is in communication connection with a server, and the server stores a knowledge graph, and the feature acquisition module 503 is specifically configured to:
[0238] acquire the knowledge graph from the server, and determine the food material feature data corresponding to the first food material identifier and the second food material identifier according to the knowledge graph, wherein the knowledge graph is constructed by the server according to chemical composition parameters, flavor parameters, and texture parameters of preset food materials, and the preset food materials at least include food materials corresponding to the first food material identifier and food materials corresponding to the second food material identifier.
[0239] The embodiments of the present application further provide a non-volatile readable storage medium, which stores one or more programs, and when the one or more programs are applied to a device, the device can execute instructions of the method steps in the embodiments of the present application.
[0240] The embodiments of the present application provide one or more machine readable media, which store instructions, and when executed by one or more processors, make an electronic device execute the method in one or more of the above embodiments. In the embodiments of the present application, the electronic device includes terminal devices, servers (clusters), and various types of devices.
[0241] Embodiments of the present disclosure can be implemented as a device configured with desired functionality using any suitable hardware, firmware, software, or any combination thereof, which can include terminal devices, servers (clusters), and the like electronic devices. Figure 6 An exemplary device 600 that can be used to implement various embodiments described herein is shown schematically.
[0242] For one embodiment, Figure 6 An exemplary device 600 is shown having one or more processors 602, a control module (chipset) 604 coupled to at least one of the processor(s) 602, a memory 606 coupled to the control module 604, a non-volatile memory (NVM) / storage device 608 coupled to the control module 604, one or more input / output devices 610 coupled to the control module 604, and a network interface 612 coupled to the control module 604.
[0243] The processor(s) 602 can include one or more single core or multicore processors, which can include any combination of general-purpose processors or dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 600 can function as a terminal device, a server (cluster), and the like devices described in embodiments herein.
[0244] In some embodiments, the device 600 can include one or more computer- readable media (e.g., the memory 606 or the NVM / storage device 608) having instructions 614 and one or more processors 602 incorporated with the one or more computer-readable media configured to execute the instructions 614 to implement modules to perform the actions described in the present disclosure.
[0245] For one embodiment, the control module 604 can include any suitable interface controllers to provide for any suitable interface to at least one of the processor(s) 602 and / or any suitable device or component in communication with the control module 604.
[0246] The control module 604 can include a memory controller module to provide an interface to the memory 606. The memory controller module can be a hardware module, a software module, and / or a firmware module.
[0247] The memory 606 can be used, for example, to load and store data and / or the instructions 614 for the device 600. For one embodiment, the memory 606 can include any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 606 can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0248] For one embodiment, the control module 604 can include one or more input / output controllers to provide an interface to the NVM / storage device 608 and the input / output device(s) 610.
[0249] For example, the NVM / storage device 608 can be used to store data and / or instructions 614. The NVM / storage device 608 can include any suitable non-volatile memory (e.g., flash memory) and / or can include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0250] The NVM / storage device 608 can include a storage resource that is physically part of the device on which the apparatus 600 is installed or it can be accessible by the device but not necessarily physically part of the device. For example, the NVM / storage device 608 can be accessed over a network via the input / output device(s) 610.
[0251] The input / output device(s) 610 can provide an interface for the apparatus 600 to communicate with any other suitable device, and the input / output device(s) 610 can include communication components, audio components, sensor components, etc. The network interface 612 can provide an interface for the apparatus 600 to communicate over one or more networks, and the apparatus 600 can communicate wirelessly with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as to access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0252] For one embodiment, at least one of the processor(s) 602 can be packaged together with logic of one or more controllers of the control module 604 (e.g., a memory controller module). For one embodiment, at least one of the processor(s) 602 can be packaged together with logic of one or more controllers of the control module 604 to form a system in a package (SiP). For one embodiment, at least one of the processor(s) 602 can be integrated on the same die with logic of one or more controllers of the control module 604. For one embodiment, at least one of the processor(s) 602 can be integrated on the same die with logic of one or more controllers of the control module 604 to form a system on a chip (SoC).
[0253] In various embodiments, the apparatus 600 can be, but is not limited to, a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.) or the like. In various embodiments, the apparatus 600 can have more or fewer components, and / or different architectures. For example, in some embodiments, the apparatus 600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including touch screen displays), non-removable storage ports, multiple antennas, graphics chips, application specific integrated circuits (ASICs), and speakers.
[0254] In the detection device, a master control chip can be used as a processor or a control module, sensor data, position information, etc. are stored in a memory or NVM / storage device, a sensor group can be used as an input / output device, and a communication interface can include a network interface.
[0255] For the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts are described in the method embodiment.
[0256] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other.
[0257] The embodiments of the present application are described with reference to flowcharts and / or block diagrams according to the method, terminal device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable processing terminal devices to produce a machine, so that the instructions executed by the computer or other programmable processing terminal devices generate a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one block or multiple blocks.
[0258] These computer program instructions can also be stored in a computer readable memory to cause the computer or other programmable processing terminal devices to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices, which implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one block or multiple blocks.
[0259] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks
[0260] Although the preferred embodiments of the application have been described, those skilled in the art will be able to make additional changes and modifications thereto without departing from the scope of the application. Accordingly, the appended claims are intended to cover all such changes and modifications that fall within the scope of the application.
[0261] Finally, it should be noted that, in the description above, relative terms such as first and second, etc., are used merely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0262] The above provides a kind of food material information processing method and device, a kind of electronic equipment and a kind of storage medium provided by the present application, detailed introduction is carried out in this paper, the principle and implementation mode of the present application are described by specific examples in this paper, the above example is only for helping to understand the method of the present application and its core idea;For the general technical personnel of the field, according to the idea of the present application, there will be changes in specific implementation mode and application range, and the above-mentioned content of the specification should not be understood as the limitation of the present application.
Claims
1. A method for processing food ingredient information, characterized in that, Applied to a smart refrigerator, which has an inventory database, the method includes: In response to the user's ingredient selection command, determine the first ingredient identifier and the required quantity of the ingredient corresponding to the first ingredient identifier; Obtain the food inventory quantity and the second food identifier corresponding to the first food identifier in the inventory database; If the inventory of the ingredient corresponding to the first ingredient identifier is less than the demand for the ingredient, then the ingredient feature data corresponding to the first ingredient identifier and the second ingredient identifier are determined respectively. The ingredient feature data includes target components, target attributes and flavor characteristics. Based on the target ingredient, determine the target ingredient identifier from the second ingredient identifier; If the target ingredient identifier cannot be determined from the second ingredient identifier based on the target component, then the target ingredient identifier is determined from the second ingredient identifier based on the target attribute. If the target ingredient identifier cannot be determined from the second ingredient identifier based on the target attribute, then the target ingredient identifier is determined from the second ingredient identifier based on the flavor characteristics. The target ingredient identifier is used to replace the first ingredient identifier.
2. The method for processing food ingredient information according to claim 1, characterized in that, The inventory database contains the inventory quantity of the ingredient corresponding to the second ingredient identifier. The ingredient feature data includes a first target component corresponding to the first ingredient identifier and a second target component corresponding to the second ingredient identifier. Determining the target ingredient identifier from the second ingredient identifier based on the target component includes: Calculate the component similarity between the first target component and the second target component; The second ingredient identifier, whose ingredient similarity is greater than or equal to a preset ingredient similarity threshold and whose ingredient inventory is greater than a first preset inventory, is used as the target ingredient identifier.
3. The method for processing food ingredient information according to claim 2, characterized in that, The ingredient feature data includes a first target attribute corresponding to the first ingredient identifier. The step of determining the target ingredient identifier from the second ingredient identifier based on the target component, if the target ingredient identifier cannot be determined from the second ingredient identifier, then based on the target attribute, includes: If there is no second ingredient identifier whose component similarity is greater than or equal to the preset component similarity threshold and whose ingredient inventory is greater than the first preset inventory, then obtain the ingredient combination scheme corresponding to the second ingredient identifier, and the ingredient combination scheme has a corresponding second target attribute; If the second target attribute satisfies the condition of simulating the first target attribute, and the food inventory corresponding to the second food identifier in the food combination scheme is greater than the second preset inventory, then the second food identifier in the food combination scheme is used as the target food identifier.
4. The method for processing food ingredient information according to claim 3, characterized in that, The ingredient feature data includes a first flavor feature corresponding to the first ingredient identifier and a second flavor feature corresponding to the second ingredient identifier. The step of determining the target ingredient identifier from the second ingredient identifier based on the flavor feature, if the target ingredient identifier cannot be determined from the second ingredient identifier based on the target attribute, includes: If there is no second target attribute that satisfies the condition of simulating the first target attribute and the second ingredient identifier in the ingredient combination scheme has an ingredient inventory quantity greater than the second preset inventory quantity, then the flavor similarity between the first flavor feature and the second flavor feature is determined. The second ingredient identifier, whose flavor similarity meets the preset flavor conditions and whose ingredient inventory is greater than the third preset inventory, is used as the target ingredient identifier.
5. The method for processing food ingredient information according to claim 4, characterized in that, The step of responding to the user's ingredient selection instruction and determining the first ingredient identifier and the required quantity of the ingredient corresponding to the first ingredient identifier includes: In response to the user's ingredient selection instruction, a target recipe is obtained, the target recipe including ingredient information, the ingredient information including the first ingredient identifier and the ingredient requirement of the ingredient corresponding to the first ingredient identifier; The method further includes: If there is no second ingredient identifier whose flavor similarity satisfies the preset flavor condition and whose ingredient inventory is greater than the third preset inventory, then the functional role of the first ingredient identifier in the target recipe is determined. The influence of the ingredient corresponding to the first ingredient identifier is determined based on the functional role. Based on the influence level, generate recipe modification suggestions for the target recipe, as well as information on the difference in effect between the recipe modification suggestions and the target recipe; The recipe modification suggestions and the difference in effects are pushed to the user.
6. The method for processing food ingredient information according to claim 5, characterized in that, The target recipe includes step information. After replacing the first ingredient identifier with the target ingredient identifier, the method further includes: For the target recipe, the information of steps to be added and the information of steps to be modified in the step information are determined based on the ingredient feature data corresponding to the target ingredient identifier; Add the information of the step to be added to the step information, and modify the information of the step to be modified in the step information to obtain the updated target recipe.
7. The method for processing food ingredient information according to claim 1, characterized in that, The method further includes: In response to the user's food inventory information update command, the system obtains the food image and weight of the newly added food in the smart refrigerator. The appearance features of the newly added food ingredient are identified based on the food ingredient image, and the appearance features include color features, shape features, and texture features; The appearance features are verified based on the shape features and the weight of the food ingredients; If the appearance feature verification passes, the new ingredient identifier, the quantity of new ingredients, and the recognition confidence level of the new ingredients are determined based on the appearance feature and the weight of the ingredients. If the identification confidence level is greater than the preset confidence threshold, the inventory database is updated according to the newly added ingredient identifier and the newly added quantity.
8. The method for processing food ingredient information according to claim 7, characterized in that, The step of determining the new ingredient identifier, quantity, and identification confidence level of the newly added ingredient based on the appearance characteristics and weight of the ingredient includes: The new ingredient identifier is determined based on the appearance characteristics, and the new ingredient identifier has a corresponding individual weight; The quantity of the newly added ingredients is calculated based on the weight of the ingredients and the weight of the individual ingredients. Obtain the weights of the recognition features; The recognition confidence level corresponding to the newly added ingredient identifier is determined based on the color feature, the shape feature, the texture feature, the ingredient weight, and the recognition feature weight.
9. The method for processing food ingredient information according to claim 1, characterized in that, The smart refrigerator is communicatively connected to a server, which stores a knowledge graph. The step of determining the food feature data corresponding to the first food identifier and the second food identifier includes: The knowledge graph is obtained from the server, and the food feature data corresponding to the first food identifier and the second food identifier are determined according to the knowledge graph. The knowledge graph is constructed by the server based on the chemical composition parameters, flavor parameters and texture parameters of the preset food. The preset food includes at least the food corresponding to the first food identifier and the food corresponding to the second food identifier.
10. A device for processing food ingredient information, characterized in that, Applied to a smart refrigerator, the smart refrigerator having an inventory database, the device includes: The ingredient selection module is used to respond to the user's ingredient selection command and determine the first ingredient identifier and the required quantity of the ingredient corresponding to the first ingredient identifier; The inventory acquisition module is used to acquire the inventory quantity of the first ingredient identifier and the second ingredient identifier in the inventory database. The feature acquisition module is used to determine the feature data of the ingredients corresponding to the first ingredient identifier and the second ingredient identifier respectively if the inventory of the ingredient corresponding to the first ingredient identifier is less than the demand of the ingredient. The feature data of the ingredients includes target components, target attributes and flavor features. A first-level determination module is used to determine the target ingredient identifier from the second ingredient identifier based on the target ingredient; The secondary determination module is used to determine the target ingredient identifier from the second ingredient identifier based on the target attribute if the target ingredient identifier cannot be determined from the second ingredient identifier based on the target component. The three-level determination module is used to determine the target ingredient identifier from the second ingredient identifier based on the flavor characteristics if the target ingredient identifier cannot be determined from the second ingredient identifier based on the target attribute. The ingredient substitution module is used to replace the first ingredient identifier with the target ingredient identifier.
11. An electronic device, characterized in that, include: processor; and A memory having executable code stored thereon, which, when executed, causes the processor to perform the method for processing food information as described in any one of claims 1-9.
12. A machine-readable medium having executable code stored thereon, which, when executed, causes a processor to perform a method for processing food information as claimed in any one of claims 1-9.
Citation Information
Patent Citations
A food material recommendation method and device
CN109902227A
Intelligent menu recommendation method based on existing food materials of user
CN110020164A
Diet recommendation method and device, electronic equipment and storage medium
CN118866253A