WO2021056829A1 - Menu comparison method and apparatus, and computer storage medium - Google Patents

Menu comparison method and apparatus, and computer storage medium Download PDF

Info

Publication number
WO2021056829A1
WO2021056829A1 PCT/CN2019/123808 CN2019123808W WO2021056829A1 WO 2021056829 A1 WO2021056829 A1 WO 2021056829A1 CN 2019123808 W CN2019123808 W CN 2019123808W WO 2021056829 A1 WO2021056829 A1 WO 2021056829A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
recipe
similarity
ingredients
proportion
Prior art date
Application number
PCT/CN2019/123808
Other languages
French (fr)
Chinese (zh)
Inventor
陈琦
连秋壮
刘华芳
Original Assignee
广东美的白色家电技术创新中心有限公司
美的集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广东美的白色家电技术创新中心有限公司, 美的集团股份有限公司 filed Critical 广东美的白色家电技术创新中心有限公司
Publication of WO2021056829A1 publication Critical patent/WO2021056829A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Definitions

  • This application relates to the field of smart home technology, in particular to a recipe comparison method, recipe comparison device and computer storage medium.
  • This application provides a recipe comparison method, a recipe comparison device, and a computer storage medium, so as to solve the problem of inaccurate calculation of the similarity between recipes in related technologies.
  • this application provides a recipe comparison method.
  • the method includes: acquiring first recipe information and second recipe information, the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second recipe information of a plurality of second ingredients.
  • the category information and the second proportion information compare the first category information and the second category information to obtain the similarity of each first ingredient and each second ingredient; according to the first proportion information and the second proportion information, The weighted summation of the similarity of the ingredients is performed to obtain the similarity of the first recipe and the second recipe.
  • this application provides a recipe comparison device.
  • the device includes a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the recipe comparison method.
  • this application provides a computer storage medium.
  • the computer storage medium stores a computer program, and the computer program is executed to implement the steps of the recipe comparison method.
  • This application obtains the similarity of each first ingredient and each second ingredient by comparing the first category information and the second category information. And according to the first proportion information and the second proportion information, the weighted summation of the similarity of the ingredients is performed to obtain the similarity between the first recipe and the second recipe, which can compare the first recipe information and the second recipe more reasonably. Information, accurately get the similarity between the two.
  • Fig. 1 is a schematic structural diagram of a first embodiment of a recipe comparison method provided by the present application
  • FIG. 2 is a schematic flow chart of the method for calculating the similarity between the first recipe and the second recipe provided by the present application
  • FIG. 3 is a schematic flowchart of a second embodiment of the recipe comparison method provided by the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of a recipe comparison device provided by the present application.
  • Fig. 5 is a schematic structural diagram of an embodiment of a computer storage medium provided by the present application.
  • FIG. 1 is a schematic flowchart of a first embodiment of the recipe comparison method provided by the present application. This embodiment includes the following steps:
  • S110 Acquire first recipe information and second recipe information, where the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second category information of a plurality of second ingredients And the second proportion information.
  • the recipe is associated with the recipe information, for example, the first recipe is associated with the first recipe information, and the second recipe is associated with the second recipe information.
  • the first recipe information and the second recipe information may be retrieved from the local database of the recipe comparison device, or retrieved from the Internet.
  • the first recipe is, for example, a recipe that the user likes.
  • the first recipe may be acquired according to the user's historical browsing records, favorite records, or recipes input/selected by the user. Specifically, the longer and more times the user browses a certain recipe, the more likely it is that the user is interested in the recipe, and then it can be determined that the recipe is the first recipe. Or when the user browses the recipe, click the favorite or favorite on the recipe page, or the user can input or select the favorite recipe through voice or device screen.
  • the first recipe may also be obtained from a favorite recipe publicly shared by the user on a social platform.
  • the first recipe may also be obtained through household appliances.
  • the household electrical appliances are, for example, kitchen household electrical appliances such as microwave ovens, ovens, range hoods, or refrigerators.
  • Home appliances for example, are equipped with cameras, which can be used to capture images of the cooking ingredients in the home appliances.
  • microwave ovens and ovens can capture the ingredients being heated, or the range hood can capture the ingredients cooked in the stove, or the refrigerator can capture the removed ingredients.
  • the home appliance collects the image of the food material, it analyzes and recognizes the food material in the image to obtain the corresponding recipe. Further, the frequency or number of times a recipe corresponding to the food material is cooked can also be analyzed.
  • a set threshold for example, a recipe that has been cooked more than 5 times in a month, or the frequency or number of times a recipe is cooked is ranked higher among all recipes cooked by the user, such as sorting In the first 3 recipes, it can be determined that this recipe is the first recipe. It is understandable that the number of cooking times in the above-mentioned month exceeds 5 times, and the ranking is in the top 3 are just examples.
  • the threshold or the specific numerical value of the ranking can be adjusted according to the actual cooking situation of the user, which is not limited in this application.
  • the second recipe is another recipe different from the first recipe, and the second recipe may be obtained by searching keywords related to the first recipe in a local database or the Internet. Therefore, it can be understood that the number of second recipes in this embodiment may be multiple.
  • the recipe information includes information such as ingredients, weight of each ingredient, cuisine, taste, cooking method, etc.
  • the ingredients specifically include category information and proportion information of the ingredients.
  • the category information may be, for example, the food material code of the food material obtained from the food material code table.
  • the food code table can be designed by the service party itself, or it can be an existing food code table, such as "Chinese Food Coding Table", “Chinese Food Composition Table”, etc. It is understandable that, in order to ensure the consistency of the food material coding, the first category information and the second category information are obtained from the same food material coding table.
  • the food code in the food code table includes multiple levels of code, each level limits the range where the food is located, and the next level continues to narrow the restricted range on the basis of the limit range of the previous level, step by step, until the last level of code points A specific ingredient. Therefore, the category information of the food material is unique and can uniquely represent a certain food material.
  • the food code of pakchoi in the "Chinese Food Ingredients List” is 04-5-107, where 04 on the first level represents vegetables and products, and 04-5 on the second level represents tender stems, leaves, and cauliflowers. Go to the third level 04-5-107, which means Chinese cabbage.
  • using the ingredient code to represent the ingredient can avoid the problem of one-to-one correspondence between the two recipes due to the different expressions of the same ingredient.
  • ginger shred and ginger slices belong to ginger, and the ingredient codes of ginger shreds and ginger slices are The same, so the ingredient code can express the same ingredient more accurately.
  • the proportion information is, for example, the percentage of the weight of each ingredient in the total weight of all ingredients in the recipe. Compared with the weight of the ingredients in the recipe information, the proportion information of the ingredients can more intuitively reflect the priority of a certain ingredient in the recipe, making different recipes more comparable.
  • S120 Compare the first category information with the second category information, and obtain the similarity of each first ingredient and each second ingredient.
  • the first category information may be the food material code of the first food material
  • the second category information may be the food material code of the second food material. From the highest level to the lowest level in the food material compilation, the scope of meaning represented by each level of code is reduced once. Comparing each layer code of the first category information with each layer code of the second category information, the similarity of each first food material and each second food material can be obtained.
  • the number of first coding layers of the first category information and the number of second coding layers of the second category information are determined. Compare each layer code of the first category information with each layer code of the second category information to determine the number of layers with the same code. Calculate the square root value of the product of the first coded layer number and the second coded layer number, and calculate the quotient of the same coded layer number and the square root value as the food similarity.
  • the formula is as follows:
  • the number of layers with the same encoding refers to the same number of layers starting from the highest level of the food encoding until the layer with different encodings. Specifically, from the highest level to the lowest level of the food material coding, the same layer codes of the first category information and the second category information are sequentially compared until the comparison results are different, and the number of layers above the different levels is determined to be the same level as the comparison result. number. Of course, the coding is still the same until the lowest level of the food coding of the first category information or the second category information is compared, and it is determined that the comparison result is the first coding layer number or the second coding layer number as the same coding layer number.
  • the ingredient code of pork belly in the "Chinese Food Coding List" is 08-1-1-007
  • the ingredient code of tenderloin is 08-1-1-006
  • the number of layers with the same code for pork belly and tenderloin is 3.
  • the ingredient code of carrots is 04-1-1-011.
  • the top-level code of tenderloin is different from the top-level code of carrots. Even if the second and third levels are the same, the code of tenderloin and carrot is still the same. 0.
  • the number of layers with the same encoding of pork belly and tenderloin is 3, the number of encoding layers for pork belly and tenderloin is 4, and the number of encoding layers for tenderloin is 4.
  • the similarity of the ingredients of pork belly and tenderloin is:
  • S130 Perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information to obtain the recipe similarity of the first recipe and the second recipe.
  • the similarity between the first recipe and the second recipe is calculated through two dimensions of food similarity and proportion information.
  • the product of the first proportion information and the second proportion information can be used as the weight, and the similarity of the ingredients can be weighted and summed to obtain the similarity of the recipe. degree.
  • the product of the first proportion information and the second proportion information is used as the weight, and the similarity of the ingredients is weighted, which means that the first ingredient and the second proportion information corresponding to the first proportion information are corresponding to each other.
  • the ingredients similarity between the second ingredients is weighted.
  • the weighted values of the similarity of each first ingredient and each of the second ingredients are added to obtain the similarity of the recipes of the first recipe and the second recipe.
  • the formula is as follows:
  • Sim AB and Sim BA both represent the recipe similarity between the first recipe and the second recipe, Indicates the similarity between the first ingredient and the second ingredient.
  • the specific value of i is based on the actual number of ingredients in the recipe. Certainly, it is not limited in this embodiment.
  • a i represents a first information specific recipe ingredients a first, each of the first food material A i has a corresponding first accounting information p Ai.
  • j is a positive integer, indicating the number of ingredients in the second recipe information.
  • B j represents a specific first ingredient in the first recipe information, and each second ingredient B j has corresponding second proportion information p Bj .
  • the similarity between the first recipe and the second recipe can be calculated by the following method. Please refer to FIG. 2.
  • FIG. 2 is a schematic flow chart of the recipe similarity calculation method for the first recipe and the second recipe provided in the present application. The calculation process of this method is as follows:
  • S131 Compare the first category information and the second category information, determine a common ingredient among the plurality of first ingredients and the plurality of second ingredients, and obtain the similarity of each first ingredient and each second ingredient.
  • Each piece of first category information is compared with each piece of second category information to determine a common ingredient among the plurality of first ingredients and the plurality of second ingredients. At the same time, the similarity of each first ingredient and each second ingredient is obtained.
  • S132 Compare the first proportion information and the second proportion information of the common ingredients to determine the common proportion of the common ingredients.
  • the proportion of pork in the first recipe information is 0.3
  • the proportion of pork in the second recipe information is 0.5
  • the common proportion of pork is 0.3
  • S133 Remove the common proportion in the first proportion information and the second proportion information of the common ingredient, and perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information after the removal process.
  • the common proportion of the common ingredients in the first recipe information and the common proportion of the common ingredients in the second recipe information are respectively removed to obtain the first recipe information and the second recipe information after the removal process.
  • the first recipe information after the removal process includes the first category information of the multiple first ingredients and the first proportion information after the removal process
  • the second recipe information after the removal process includes the second category information of the multiple second ingredients and Remove the processed second proportion information.
  • a weighted summation is performed on the similarity of the food ingredients.
  • weighting the similarity of ingredients means using the first proportion information after the removal process and the second proportion information after the removal process, and the first proportion information after the removal process and the second proportion information after the removal process are used.
  • the food similarity between the first food material and the second food material corresponding to the proportion information is weighted.
  • the weighted values of the similarity of each first ingredient and each second ingredient are added together to obtain the recipe similarity of the first recipe after the removal process and the second recipe after the removal process.
  • the formula is as follows:
  • a ⁇ represents the first recipe information after the removal process
  • B ⁇ represents the second recipe information after the removal process
  • p A ⁇ (p A ⁇ may be 0, so p A ⁇ is greater than or equal to 0) represents the removal process
  • the first proportion information, p B ⁇ (p B ⁇ may be 0, so p B ⁇ is greater than or equal to 0) indicates the second proportion information after the removal process
  • Sim A ⁇ B ⁇ indicates the first recipe information after the removal process Recipe similarity with the second recipe information after removal processing.
  • the recipe similarity between the first recipe information after the removal processing and the second recipe information after the removal processing is added to the sum of the common proportions to obtain the recipe similarity.
  • the formula is as follows:
  • p cm represents the common proportion of the m-th common ingredient.
  • Adding the common proportions separately is equivalent to increasing the weight of the common ingredients, which can increase the recipe similarity between the first recipe and the second recipe to a certain extent.
  • the greater the weight of the same ingredients or ingredients with higher similarity in the recipe the higher the similarity of the recipe, which can improve the accuracy of the recommended recipe.
  • the similarity of each first ingredient and each second ingredient is obtained. And according to the first proportion information and the second proportion information, the weighted summation of the similarity of the ingredients is performed to obtain the similarity between the first recipe and the second recipe, which can compare the first recipe information and the second recipe more reasonably. Information, accurately get the similarity between the two.
  • the composition of the ingredients and their proportions of the farmer’s fried pork is: pork belly 70%, ginger 7%, garlic 3%, and green pepper 20%.
  • the code of the ingredients is: pork belly 08-1-1-007, ginger 04-4-9-001, garlic 04-4-1-001, green pepper 04-3-1-003;
  • the ingredient composition of Yuxiang Pork Shredded and its proportion information are: carrot 20%, tenderloin 41%, fungus 2.7%, bamboo shoot 13.7%, ginger 7%, green onion 1.4%, garlic 6%, and green pepper 8.2%.
  • the ingredients code is: carrot 04-1-1-011, tenderloin 08-1-1-006, fungus 05-1-0-014, bamboo shoots 04-5-2-006, ginger 04-4-9-001 , Green onion 04-4-2-001, garlic 04-4-1-001, green pepper 04-3-1-003.
  • the recipe similarity of the farmer’s fried pork and the fish-flavored pork is to take the product of the proportion of the ingredients of the farmer’s fried pork and the fish-flavored pork after the removal process is taken as the weight, and the corresponding ingredients are weighted and summed, and added
  • the sum of the common proportion and the common proportion of the farmer’s fried pork and the fish-flavored pork, the recipe similarity of the farmer’s fried pork and the fish-flavored pork is obtained:
  • FIG. 3 is a schematic flowchart of a second embodiment of the recipe comparison method provided by the present application. This embodiment is based on the first embodiment of the recipe comparison method, so the same steps will not be repeated here. This embodiment includes the following steps:
  • S310 Acquire first recipe information and second recipe information, where the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second category information of a plurality of second ingredients And the second proportion information.
  • S320 Compare the information of the first category with the information of the second category, and obtain the similarity of each first ingredient and each second ingredient.
  • S330 Perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information to obtain the recipe similarity of the first recipe and the second recipe.
  • S340 Push the second recipe information whose recipe similarity with the first recipe information is greater than or equal to a threshold.
  • the second recipe is pushed to the user for the user to consult and select.
  • the above threshold may be set between 60% and 100%, such as 70%, 80%, 85%, or 90%.
  • the multiple second recipes may be pushed in priority order according to the similarity of the recipes.
  • the higher the similarity of the recipes the higher the priority of the push. Prioritize the second recipes with high priority to users, reducing the trouble that may be caused to users by recommending multiple second recipes at the same time.
  • the user after recommending a second recipe with a recipe similarity greater than a threshold to the user, monitor whether the user views the second recipe in time. If the user has not viewed the second recipe after a preset time, the user can be reminded to read the second recipe through a voice prompt. menu. Of course, the reason why the user did not view the second recipe may also be that he is not interested in the recipe. Then, it can also be set to hide the recipe if the user does not view the second recipe for more than a preset time.
  • the second recipe with the recipe similarity greater than the threshold is pushed to the user, so that the user can obtain other recipes that are similar to their favorite recipes, which can satisfy The personalized needs of users improve the user experience.
  • prioritizing according to the degree of similarity can reduce the confusion that may be caused to the user by recommending multiple second recipes at the same time.
  • FIG. 4 is a schematic structural diagram of an embodiment of the recipe comparison device provided by the application.
  • the recipe comparison device 100 of this embodiment may be Household appliances, such as range hoods, stoves, or refrigerators, can also be mobile terminals, such as smart phones, tablet computers, and wearable devices.
  • the recipe comparison device 100 includes a display screen 11, a processor 12, and a memory 13, which are connected to each other.
  • the recipe comparison device 100 of this embodiment can implement the above-mentioned recipe comparison method.
  • the display screen 11 is used to display recipe information to the user
  • a computer program is stored in the memory 13
  • the processor 12 is used to execute the computer program to implement the above recipe comparison method.
  • the processor 12 is used to calculate the similarity of each first ingredient and each of the second ingredients, and calculate the similarity between the first recipe and the multiple second recipes.
  • the processor 12 may be an integrated circuit chip with signal processing capability.
  • the processor 12 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component .
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • FIG. 5 is a schematic structural diagram of an embodiment of the computer storage medium provided by the present application.
  • the computer storage medium 200 of this embodiment stores a computer program 21, which can be executed to implement the method in the foregoing embodiment.
  • the computer storage medium 200 in this embodiment may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disk that can store program instructions. Or, it may also be a server storing the program instructions, and the server may send the stored program instructions to other devices to run, or it may run the stored program instructions by itself.
  • the disclosed method and device can be implemented in other ways.
  • the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of this embodiment.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A menu comparison method, a menu comparison apparatus and a computer storage medium. The method comprises the following steps: acquiring first menu information and second menu information, wherein the first menu information comprises first category information and first ratio information of a plurality of first food materials, and the second menu information comprises second category information and second ratio information of a plurality of second food materials (S110); comparing the first category information with the second category information to acquire a food material similarity between each first food material and each second food material (S120); and performing weighted summation on the food material similarities according to the first ratio information and the second ratio information to obtain a menu similarity between a first menu and a second menu (S130). By means of the above mode, the first menu information and the second menu information can be compared more rationally, and the similarity between the first menu information and the second menu information is accurately obtained.

Description

菜谱比较方法、装置及计算机存储介质Recipe comparison method, device and computer storage medium
本申请要求于2019年9月29日提交的申请号为2019109367771,发明名称为“菜谱比较方法、装置及计算机存储介质”的中国专利申请的优先权,其通过引用方式全部并入本申请。This application claims the priority of the Chinese patent application filed on September 29, 2019 with the application number 2019109367771 and the invention title "Method, Device and Computer Storage Medium for Recipe Comparison", which is fully incorporated into this application by reference.
【技术领域】【Technical Field】
本申请涉及智能家居技术领域,特别是涉及一种菜谱比较方法、菜谱比较装置及计算机存储介质。This application relates to the field of smart home technology, in particular to a recipe comparison method, recipe comparison device and computer storage medium.
【背景技术】【Background technique】
目前传统家电正在逐渐接入物联网领域,在线的包括厨房电器在内的家用电器越来越多。如何根据联网的线上数据,为用户提供更多的增值服务,是家电业需要涉及的新技术领域。At present, traditional home appliances are gradually connecting to the field of Internet of Things, and there are more and more home appliances including kitchen appliances online. How to provide users with more value-added services based on networked online data is a new technical field that the home appliance industry needs to involve.
在菜谱个性化推荐中,常常需要计算不同菜谱的相似性。但目前对菜谱相似度的计算往往是简单地计算两菜谱之间食材的数量重叠程度,不能够准确反映两菜谱之间的相似度。In the personalized recommendation of recipes, it is often necessary to calculate the similarity of different recipes. However, the current calculation of the similarity of recipes often simply calculates the degree of overlap of the number of ingredients between the two recipes, which cannot accurately reflect the similarity between the two recipes.
【发明内容】[Summary of the invention]
本申请提供一种菜谱比较方法、菜谱比较装置及计算机存储介质,以解决相关技术中菜谱之间的相似度计算不够准确的问题。This application provides a recipe comparison method, a recipe comparison device, and a computer storage medium, so as to solve the problem of inaccurate calculation of the similarity between recipes in related technologies.
为解决上述技术问题,本申请提供一种菜谱比较方法。该方法包括:获取第一菜谱信息和第二菜谱信息,第一菜谱信息包括多个第一食材的第一类别信息和第一占比信息,第二菜谱信息包括多个第二食材的第二类别信息和第二占比信息;比较第一类别信息和第二类别信息,获取每一第一食材与每一第二食材的食材相似度;根据第一占比信息和第二占比信息,对食材相似度进行加权求和,得到第一菜谱和第二菜谱的菜谱相似度。In order to solve the above technical problems, this application provides a recipe comparison method. The method includes: acquiring first recipe information and second recipe information, the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second recipe information of a plurality of second ingredients. The category information and the second proportion information; compare the first category information and the second category information to obtain the similarity of each first ingredient and each second ingredient; according to the first proportion information and the second proportion information, The weighted summation of the similarity of the ingredients is performed to obtain the similarity of the first recipe and the second recipe.
为解决上述技术问题,本申请提供一种菜谱比较装置。该装置包括处理器和存储器;存储器中存储有计算机程序,处理器用于执行计算机程序以实现上述菜谱比较方法的步骤。In order to solve the above technical problems, this application provides a recipe comparison device. The device includes a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the recipe comparison method.
为解决上述技术问题,本申请提供一种计算机存储介质。该计算机存储介 质存储有计算机程序,计算机程序被执行以实现上述菜谱比较方法的步骤。In order to solve the above technical problems, this application provides a computer storage medium. The computer storage medium stores a computer program, and the computer program is executed to implement the steps of the recipe comparison method.
本申请通过比较第一类别信息和第二类别信息,获得每一第一食材与每一第二食材的食材相似度。并根据第一占比信息和第二占比信息对食材相似度进行加权求和,以得到第一菜谱和第二菜谱之间的相似度,能够更加合理的比较第一菜谱信息和第二菜谱信息,准确的得到二者的相似度。This application obtains the similarity of each first ingredient and each second ingredient by comparing the first category information and the second category information. And according to the first proportion information and the second proportion information, the weighted summation of the similarity of the ingredients is performed to obtain the similarity between the first recipe and the second recipe, which can compare the first recipe information and the second recipe more reasonably. Information, accurately get the similarity between the two.
【附图说明】【Explanation of the drawings】
图1是本申请提供的菜谱比较方法第一实施例的结构示意图;Fig. 1 is a schematic structural diagram of a first embodiment of a recipe comparison method provided by the present application;
图2是本申请提供的第一菜谱和第二菜谱的菜谱相似度计算方法的流程示意图;2 is a schematic flow chart of the method for calculating the similarity between the first recipe and the second recipe provided by the present application;
图3是本申请提供的菜谱比较方法第二实施例的流程示意图;3 is a schematic flowchart of a second embodiment of the recipe comparison method provided by the present application;
图4是本申请提供的菜谱比较装置一实施例的结构示意图;4 is a schematic structural diagram of an embodiment of a recipe comparison device provided by the present application;
图5是本申请提供的计算机存储介质一实施例的结构示意图。Fig. 5 is a schematic structural diagram of an embodiment of a computer storage medium provided by the present application.
【具体实施方式】【detailed description】
为使本领域的技术人员更好地理解本申请的技术方案,下面结合附图和具体实施方式对本申请所提供的菜谱比较方法、菜谱比较装置及计算机存储介质做进一步详细描述。In order to enable those skilled in the art to better understand the technical solutions of the present application, the recipe comparison method, recipe comparison device and computer storage medium provided by the present application will be described in further detail below in conjunction with the accompanying drawings and specific implementations.
请参阅图1,图1是本申请提供的菜谱比较方法第一实施例的流程示意图。本实施例包括以下步骤:Please refer to FIG. 1, which is a schematic flowchart of a first embodiment of the recipe comparison method provided by the present application. This embodiment includes the following steps:
S110:获取第一菜谱信息和第二菜谱信息,第一菜谱信息包括多个第一食材的第一类别信息和第一占比信息,第二菜谱信息包括多个第二食材的第二类别信息和第二占比信息。S110: Acquire first recipe information and second recipe information, where the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second category information of a plurality of second ingredients And the second proportion information.
本实施例中,菜谱和菜谱信息相关联,例如第一菜谱与第一菜谱信息关联,第二菜谱与第二菜谱信息关联。获取第一菜谱信息和第二菜谱信息可以是从菜谱比较装置的本地数据库中调取,也可以是从互联网中调取。In this embodiment, the recipe is associated with the recipe information, for example, the first recipe is associated with the first recipe information, and the second recipe is associated with the second recipe information. The first recipe information and the second recipe information may be retrieved from the local database of the recipe comparison device, or retrieved from the Internet.
第一菜谱例如是用户喜爱的菜谱。获取第一菜谱的方式可以有多种,例如第一菜谱可以根据用户历史浏览记录、收藏记录或用户输入/选择的菜谱中获取。具体而言,用户浏览某菜谱时间越长、次数越多,则有可能对该菜谱越感兴趣,那么可以确定该菜谱为第一菜谱。或者用户在浏览该菜谱时,点击菜谱页面中 的喜欢或收藏,或用户通过语音、设备屏幕输入或选择喜爱的菜谱。The first recipe is, for example, a recipe that the user likes. There may be many ways to obtain the first recipe. For example, the first recipe may be acquired according to the user's historical browsing records, favorite records, or recipes input/selected by the user. Specifically, the longer and more times the user browses a certain recipe, the more likely it is that the user is interested in the recipe, and then it can be determined that the recipe is the first recipe. Or when the user browses the recipe, click the favorite or favorite on the recipe page, or the user can input or select the favorite recipe through voice or device screen.
又例如,第一菜谱也可以是从用户在社交平台公开分享的喜爱的菜谱中获取的。For another example, the first recipe may also be obtained from a favorite recipe publicly shared by the user on a social platform.
再例如,第一菜谱还可以是通过家电设备获取的。具体地,家电设备例如是微波炉、烤箱、油烟机或冰箱等厨房家电设备。家电设备例如安装有摄像头,利用摄像头可以采集家电设备中烹饪食材的图像,例如微波炉、烤箱可采集其中正被加热的食材,或油烟机拍摄在灶具中烹饪的食材,或冰箱拍摄被取出的食材。家电设备采集到食材的图像后,分析识别图像中的食材从而得到对应的菜谱。进一步地,还可以分析食材对应的菜谱被烹饪的频率或次数,某菜谱被烹饪的频率越高或次数越多,则说明用户越喜爱该菜谱。当菜谱被烹饪的频率或次数超过设定的阈值时,例如一个月内烹饪次数超过5次的菜谱,或菜谱被烹饪的频率或次数在用户所烹饪的所有菜谱中排序靠前的,例如排序在前3的菜谱,则可以确定该菜谱为第一菜谱。可以理解的是,上述一个月内烹饪次数超过5次、排序在前3仅作为举例说明,阈值或排序靠前的具体数值可以根据用户实际烹饪情况进行调整,本申请在此不做限制。For another example, the first recipe may also be obtained through household appliances. Specifically, the household electrical appliances are, for example, kitchen household electrical appliances such as microwave ovens, ovens, range hoods, or refrigerators. Home appliances, for example, are equipped with cameras, which can be used to capture images of the cooking ingredients in the home appliances. For example, microwave ovens and ovens can capture the ingredients being heated, or the range hood can capture the ingredients cooked in the stove, or the refrigerator can capture the removed ingredients. . After the home appliance collects the image of the food material, it analyzes and recognizes the food material in the image to obtain the corresponding recipe. Further, the frequency or number of times a recipe corresponding to the food material is cooked can also be analyzed. The higher the frequency or the number of times a recipe is cooked, the more the user likes the recipe. When the frequency or number of times a recipe is cooked exceeds a set threshold, for example, a recipe that has been cooked more than 5 times in a month, or the frequency or number of times a recipe is cooked is ranked higher among all recipes cooked by the user, such as sorting In the first 3 recipes, it can be determined that this recipe is the first recipe. It is understandable that the number of cooking times in the above-mentioned month exceeds 5 times, and the ranking is in the top 3 are just examples. The threshold or the specific numerical value of the ranking can be adjusted according to the actual cooking situation of the user, which is not limited in this application.
第二菜谱是不同于第一菜谱的其他菜谱,第二菜谱可以是通过在本地数据库中或互联网检索与第一菜谱有关的关键词获取。因此,可以理解的是,本实施例中第二菜谱的数量可以是多个。The second recipe is another recipe different from the first recipe, and the second recipe may be obtained by searching keywords related to the first recipe in a local database or the Internet. Therefore, it can be understood that the number of second recipes in this embodiment may be multiple.
一般地,菜谱信息包括食材、各食材重量、菜系、口味、烹饪方法等信息,除此之外,本实施例中菜谱信息中,食材具体还包括食材的类别信息和占比信息。Generally, the recipe information includes information such as ingredients, weight of each ingredient, cuisine, taste, cooking method, etc. In addition, in the recipe information in this embodiment, the ingredients specifically include category information and proportion information of the ingredients.
类别信息例如可以是从食材编码表中获取的该食材的食材编码。食材编码表可以是服务方自行设计的,也可以是现有的食材编码表,例如《中国食物编码表》、《中国食物成分表》等。可以理解的是,为保证食材编码的一致性,第一类别信息和第二类别信息是从同一食材编码表中获取的。食材编码表中的食材编码包括多层编码,每层限定食材所在的范围,下一层在上一层限定范围的基础上,继续缩小限定范围,层层递进,直到最末一层编码指向某一具体食材。因此,食材的类别信息具有唯一性,能够唯一代表某一食材。例如,小白菜在《中国食物成分表》中的食材编码是04-5-107,其中,第一层04表示蔬菜类及制品,到第二层04-5表示嫩茎、叶、花菜类,到第三层04-5-107表示小白菜。另一方面,使用食材编码代表食材,能够避免两个菜谱中因为对同一食材表述 方式不同引起无法一一对应的问题,例如姜丝和姜片都属于姜,姜丝和姜片的食材编码是相同的,因此食材编码能更准确地表达同一食材。The category information may be, for example, the food material code of the food material obtained from the food material code table. The food code table can be designed by the service party itself, or it can be an existing food code table, such as "Chinese Food Coding Table", "Chinese Food Composition Table", etc. It is understandable that, in order to ensure the consistency of the food material coding, the first category information and the second category information are obtained from the same food material coding table. The food code in the food code table includes multiple levels of code, each level limits the range where the food is located, and the next level continues to narrow the restricted range on the basis of the limit range of the previous level, step by step, until the last level of code points A specific ingredient. Therefore, the category information of the food material is unique and can uniquely represent a certain food material. For example, the food code of pakchoi in the "Chinese Food Ingredients List" is 04-5-107, where 04 on the first level represents vegetables and products, and 04-5 on the second level represents tender stems, leaves, and cauliflowers. Go to the third level 04-5-107, which means Chinese cabbage. On the other hand, using the ingredient code to represent the ingredient can avoid the problem of one-to-one correspondence between the two recipes due to the different expressions of the same ingredient. For example, ginger shred and ginger slices belong to ginger, and the ingredient codes of ginger shreds and ginger slices are The same, so the ingredient code can express the same ingredient more accurately.
占比信息例如是每一食材重量分别占该菜谱所有食材总重量的百分比。相较于菜谱信息中食材重量,食材的占比信息更能够直观地反应菜谱中某一食材主次程度,使不同菜谱之间更具可比性。The proportion information is, for example, the percentage of the weight of each ingredient in the total weight of all ingredients in the recipe. Compared with the weight of the ingredients in the recipe information, the proportion information of the ingredients can more intuitively reflect the priority of a certain ingredient in the recipe, making different recipes more comparable.
S120:比较第一类别信息和第二类别信息,获取每一第一食材与每一第二食材的食材相似度。S120: Compare the first category information with the second category information, and obtain the similarity of each first ingredient and each second ingredient.
从S110中的描述可知,第一类别信息可以是第一食材的食材编码,第二类别信息可以是第二食材的食材编码。食材编中由最高层级到最低层级,每层编码所表示的含义范围一次缩小。比较第一类别信息的每层编码和第二类别信息的每层编码,可以获取每一第一食材与每一第二食材的食材相似度。It can be seen from the description in S110 that the first category information may be the food material code of the first food material, and the second category information may be the food material code of the second food material. From the highest level to the lowest level in the food material compilation, the scope of meaning represented by each level of code is reduced once. Comparing each layer code of the first category information with each layer code of the second category information, the similarity of each first food material and each second food material can be obtained.
具体地,确定第一类别信息的第一编码层数,以及第二类别信息的第二编码层数。比较第一类别信息的每层编码和第二类别信息的每层编码,确定编码相同的层数。计算第一编码层数和第二编码层数的乘积的开方值,计算编码相同的层数和开方值的商值作为食材相似度。公式表示如下:Specifically, the number of first coding layers of the first category information and the number of second coding layers of the second category information are determined. Compare each layer code of the first category information with each layer code of the second category information to determine the number of layers with the same code. Calculate the square root value of the product of the first coded layer number and the second coded layer number, and calculate the quotient of the same coded layer number and the square root value as the food similarity. The formula is as follows:
Figure PCTCN2019123808-appb-000001
Figure PCTCN2019123808-appb-000001
需要说明的是,编码相同的层数是指从食材编码最高层级开始计算,直到编码不同的那层之前相同的层数。具体地,由食材编码最高层级到最低层级,依次比较第一类别信息和第二类别信息的同层编码,直至比较结果为不同,确定比较结果为不同的层级以上的层数为编码相同的层数。当然,直至比较到第一类别信息或第二类别信息的食材编码最低层级时编码仍相同,确定比较结果为第一编码层数或第二编码层数为编码相同的层数。It should be noted that the number of layers with the same encoding refers to the same number of layers starting from the highest level of the food encoding until the layer with different encodings. Specifically, from the highest level to the lowest level of the food material coding, the same layer codes of the first category information and the second category information are sequentially compared until the comparison results are different, and the number of layers above the different levels is determined to be the same level as the comparison result. number. Of course, the coding is still the same until the lowest level of the food coding of the first category information or the second category information is compared, and it is determined that the comparison result is the first coding layer number or the second coding layer number as the same coding layer number.
例如,五花肉在《中国食物编码表》中的食材编码是08-1-1-007,里脊肉的食材编码是08-1-1-006,那么五花肉和里脊肉编码相同的层数是3。胡萝卜的食材编码是04-1-1-011,里脊肉的最高层级编码与胡萝卜的最高层级编码不同,即使第二层和第三层编码相同,里脊肉与胡萝卜的编码相同的层数仍然是0。For example, the ingredient code of pork belly in the "Chinese Food Coding List" is 08-1-1-007, and the ingredient code of tenderloin is 08-1-1-006, so the number of layers with the same code for pork belly and tenderloin is 3. The ingredient code of carrots is 04-1-1-011. The top-level code of tenderloin is different from the top-level code of carrots. Even if the second and third levels are the same, the code of tenderloin and carrot is still the same. 0.
以计算五花肉和里脊肉的食材相似度为例,五花肉和里脊肉编码相同的层数是3,五花肉的编码层数是4,里脊肉的编码层数是4。五花肉与里脊肉的食材相似度为:Taking the calculation of the similarity of the ingredients of pork belly and tenderloin as an example, the number of layers with the same encoding of pork belly and tenderloin is 3, the number of encoding layers for pork belly and tenderloin is 4, and the number of encoding layers for tenderloin is 4. The similarity of the ingredients of pork belly and tenderloin is:
Figure PCTCN2019123808-appb-000002
Figure PCTCN2019123808-appb-000002
S130:根据第一占比信息和第二占比信息,对食材相似度进行加权求和,得到第一菜谱和第二菜谱的菜谱相似度。S130: Perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information to obtain the recipe similarity of the first recipe and the second recipe.
本实施例中,通过食材相似度和占比信息两个维度计算第一菜谱与第二菜谱的相似度。In this embodiment, the similarity between the first recipe and the second recipe is calculated through two dimensions of food similarity and proportion information.
计算第一菜谱和第二菜谱相似度的方法有多种,例如,可以将第一占比信息和第二占比信息的乘积作为权值,对食材相似度进行加权求和,以得到菜谱相似度。需要说明的是,第一占比信息和第二占比信息的乘积作为权值,对食材相似度进行加权,是指对第一占比信息对应的第一食材和第二占比信息对应的第二食材之间的食材相似度进行加权。将每一第一食材与每一第二食材的食材相似度的加权值相加,即得到第一菜谱和第二菜谱的菜谱相似度。公式表示如下:There are many ways to calculate the similarity between the first recipe and the second recipe. For example, the product of the first proportion information and the second proportion information can be used as the weight, and the similarity of the ingredients can be weighted and summed to obtain the similarity of the recipe. degree. It should be noted that the product of the first proportion information and the second proportion information is used as the weight, and the similarity of the ingredients is weighted, which means that the first ingredient and the second proportion information corresponding to the first proportion information are corresponding to each other. The ingredients similarity between the second ingredients is weighted. The weighted values of the similarity of each first ingredient and each of the second ingredients are added to obtain the similarity of the recipes of the first recipe and the second recipe. The formula is as follows:
Figure PCTCN2019123808-appb-000003
Figure PCTCN2019123808-appb-000003
其中,Sim AB和Sim BA均表示第一菜谱和第二菜谱之间的菜谱相似度,
Figure PCTCN2019123808-appb-000004
表示第一食材与第二食材之间的相似度。i为正整数,表示第一菜谱信息中的食材数量,例如第一菜谱信息包含有5种第一食材,则i=5,此处仅作为举例说明,i的具体数值根据菜谱实际食材数量而定,本实施例中不做限定。A i表示第一菜谱信息中具体某一第一食材,每一第一食材A i都有与之对应的第一占比信息p Ai。j为正整数,表示第二菜谱信息中的食材数量。B j表示第一菜谱信息中具体某一第一食材,每一第二食材B j都有与之对应的第二占比信息p Bj
Among them, Sim AB and Sim BA both represent the recipe similarity between the first recipe and the second recipe,
Figure PCTCN2019123808-appb-000004
Indicates the similarity between the first ingredient and the second ingredient. i is a positive integer and represents the number of ingredients in the first recipe information. For example, if the first recipe information contains 5 first ingredients, then i=5. This is just an example. The specific value of i is based on the actual number of ingredients in the recipe. Certainly, it is not limited in this embodiment. A i represents a first information specific recipe ingredients a first, each of the first food material A i has a corresponding first accounting information p Ai. j is a positive integer, indicating the number of ingredients in the second recipe information. B j represents a specific first ingredient in the first recipe information, and each second ingredient B j has corresponding second proportion information p Bj .
还例如,第一菜谱和第二菜谱的相似度可以通过以下方法进行计算,请参阅图2,图2是本申请提供的第一菜谱和第二菜谱的菜谱相似度计算方法的流程示意图。该方法计算过程如下:For another example, the similarity between the first recipe and the second recipe can be calculated by the following method. Please refer to FIG. 2. FIG. 2 is a schematic flow chart of the recipe similarity calculation method for the first recipe and the second recipe provided in the present application. The calculation process of this method is as follows:
S131:比较第一类别信息和第二类别信息,确定多个第一食材和多个第二食材中的共同食材,获取每一第一食材与每一第二食材的食材相似度。S131: Compare the first category information and the second category information, determine a common ingredient among the plurality of first ingredients and the plurality of second ingredients, and obtain the similarity of each first ingredient and each second ingredient.
将每一个第一类别信息分别与每一个第二类别信息进行对比,确定多个第一食材和多个第二食材中的共同食材。同时,获取每一第一食材与每一第二食材的食材相似度。Each piece of first category information is compared with each piece of second category information to determine a common ingredient among the plurality of first ingredients and the plurality of second ingredients. At the same time, the similarity of each first ingredient and each second ingredient is obtained.
S132:比较共同食材的第一占比信息和第二占比信息,确定共同食材的共 同占比。S132: Compare the first proportion information and the second proportion information of the common ingredients to determine the common proportion of the common ingredients.
获得共同食材后,比较每一共同食材的第一占比信息和第二占比信息,确定共同食材的共同占比。After obtaining the common ingredients, compare the first proportion information and the second proportion information of each common ingredient to determine the common proportion of the common ingredients.
举例说明,第一菜谱信息中猪肉的占比信息为0.3,第二菜谱信息中猪肉的占比信息为0.5,那么猪肉的共同占比为0.3。For example, if the proportion of pork in the first recipe information is 0.3, and the proportion of pork in the second recipe information is 0.5, then the common proportion of pork is 0.3.
S133:去除共同食材的第一占比信息和第二占比信息中的共同占比,根据去除处理后的第一占比信息和第二占比信息,对食材相似度进行加权求和。S133: Remove the common proportion in the first proportion information and the second proportion information of the common ingredient, and perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information after the removal process.
分别去除第一菜谱信息中共同食材的共同占比、第二菜谱信息中共同食材的共同占比,得到去除处理后的第一菜谱信息和第二菜谱信息。去除处理后的第一菜谱信息包括多个第一食材的第一类别信息和去除处理后的第一占比信息,去除处理后的第二菜谱信息包括多个第二食材的第二类别信息和去除处理后的第二占比信息。根据去除处理后的第一占比信息和去除处理后的第二占比信息,对食材相似度进行加权求和。同样地,对食材相似度进行加权,是指使用去除处理后的第一占比信息和去除处理后的第二占比信息,对去除处理后的第一占比信息和去除处理后的第二占比信息对应的第一食材和第二食材之间的食材相似度进行加权。将每一第一食材与每一第二食材的食材相似度的加权值相加,即得到去除处理后的第一菜谱和去除处理后的第二菜谱的菜谱相似度。公式表示如下:The common proportion of the common ingredients in the first recipe information and the common proportion of the common ingredients in the second recipe information are respectively removed to obtain the first recipe information and the second recipe information after the removal process. The first recipe information after the removal process includes the first category information of the multiple first ingredients and the first proportion information after the removal process, and the second recipe information after the removal process includes the second category information of the multiple second ingredients and Remove the processed second proportion information. According to the first proportion information after the removal process and the second proportion information after the removal process, a weighted summation is performed on the similarity of the food ingredients. Similarly, weighting the similarity of ingredients means using the first proportion information after the removal process and the second proportion information after the removal process, and the first proportion information after the removal process and the second proportion information after the removal process are used. The food similarity between the first food material and the second food material corresponding to the proportion information is weighted. The weighted values of the similarity of each first ingredient and each second ingredient are added together to obtain the recipe similarity of the first recipe after the removal process and the second recipe after the removal process. The formula is as follows:
Figure PCTCN2019123808-appb-000005
Figure PCTCN2019123808-appb-000005
其中,A^表示去除处理后的第一菜谱信息,B^表示去除处理后的第二菜谱信息,p A^(p A^可能为0,因此p A^大于等于0)表示去除处理后的第一占比信息,p B^(p B^可能为0,因此p B^大于等于0)表示去除处理后的第二占比信息,Sim A^B^表示去除处理后的第一菜谱信息和去除处理后的第二菜谱信息之间的菜谱相似度。 Among them, A^ represents the first recipe information after the removal process, B^ represents the second recipe information after the removal process, p A^ (p A^ may be 0, so p A^ is greater than or equal to 0) represents the removal process The first proportion information, p B^ (p B^ may be 0, so p B^ is greater than or equal to 0) indicates the second proportion information after the removal process, and Sim A^B^ indicates the first recipe information after the removal process Recipe similarity with the second recipe information after removal processing.
S134:将去除处理后的第一占比信息和第二占比信息的乘积作为权值,对食材相似度进行加权求和,并加上共同占比的和,以得到菜谱相似度。S134: Taking the product of the first proportion information and the second proportion information after the removal process as the weight value, weighted summation of the similarity of the ingredients, and adds the sum of the common proportions to obtain the similarity of the recipe.
去除处理后的第一菜谱信息和去除处理后的第二菜谱信息之间的菜谱相似度,与共同占比之和相加,即为菜谱相似度。公式表示如下:The recipe similarity between the first recipe information after the removal processing and the second recipe information after the removal processing is added to the sum of the common proportions to obtain the recipe similarity. The formula is as follows:
Figure PCTCN2019123808-appb-000006
Figure PCTCN2019123808-appb-000006
其中,p cm表示第m个共同食材的共同占比。 Among them, p cm represents the common proportion of the m-th common ingredient.
将共同占比单独相加,相当于增加了共同食材的权重,一定程度上可以增加第一菜谱与第二菜谱之间的菜谱相似度。也就是说,相同食材或食材相似度较高的食材的在菜谱中的重量占比越大,菜谱相似度也就越高,可以提高推荐菜谱的准确性。Adding the common proportions separately is equivalent to increasing the weight of the common ingredients, which can increase the recipe similarity between the first recipe and the second recipe to a certain extent. In other words, the greater the weight of the same ingredients or ingredients with higher similarity in the recipe, the higher the similarity of the recipe, which can improve the accuracy of the recommended recipe.
本实施例中,通过比较第一类别信息和第二类别信息,获得每一第一食材与每一第二食材的食材相似度。并根据第一占比信息和第二占比信息对食材相似度进行加权求和,以得到第一菜谱和第二菜谱之间的相似度,能够更加合理的比较第一菜谱信息和第二菜谱信息,准确的得到二者的相似度。In this embodiment, by comparing the first category information and the second category information, the similarity of each first ingredient and each second ingredient is obtained. And according to the first proportion information and the second proportion information, the weighted summation of the similarity of the ingredients is performed to obtain the similarity between the first recipe and the second recipe, which can compare the first recipe information and the second recipe more reasonably. Information, accurately get the similarity between the two.
为更加清楚准确的对本申请技术方案进行描述,下面以计算农家小炒肉和鱼香肉丝之间的菜谱相似度为例进行说明,但本申请不限于此。In order to describe the technical solution of the present application more clearly and accurately, the following takes the calculation of the recipe similarity between the small farmer's fried pork and the fish-flavored pork as an example for description, but the present application is not limited to this.
从菜谱食材数据库中获取农家小炒肉的食材组成、食材编码以及各食材的重量占比:Obtain the ingredient composition, ingredient code, and weight percentage of each ingredient from the recipe ingredient database:
农家小炒肉的食材组成及其占比信息为:五花肉70%,姜7%,蒜3%,青椒20%。食材代码为:五花肉08-1-1-007,姜04-4-9-001,蒜04-4-1-001,青椒04-3-1-003;The composition of the ingredients and their proportions of the farmer’s fried pork is: pork belly 70%, ginger 7%, garlic 3%, and green pepper 20%. The code of the ingredients is: pork belly 08-1-1-007, ginger 04-4-9-001, garlic 04-4-1-001, green pepper 04-3-1-003;
鱼香肉丝的食材组成及其占比信息为:胡萝卜20%,里脊肉41%,木耳2.7%,小笋13.7%,姜7%,大葱1.4%,蒜6%,青椒8.2%。食材代码为:胡萝卜04-1-1-011,里脊肉08-1-1-006,木耳05-1-0-014,小笋04-5-2-006,姜04-4-9-001,大葱04-4-2-001,蒜04-4-1-001,青椒04-3-1-003。The ingredient composition of Yuxiang Pork Shredded and its proportion information are: carrot 20%, tenderloin 41%, fungus 2.7%, bamboo shoot 13.7%, ginger 7%, green onion 1.4%, garlic 6%, and green pepper 8.2%. The ingredients code is: carrot 04-1-1-011, tenderloin 08-1-1-006, fungus 05-1-0-014, bamboo shoots 04-5-2-006, ginger 04-4-9-001 , Green onion 04-4-2-001, garlic 04-4-1-001, green pepper 04-3-1-003.
比较农家小炒肉和鱼香肉丝的食材组成,获得共同食材:姜、蒜和青椒。进一步获得共同食材的共同占比:姜在农家小炒肉和鱼香肉丝的占比都是7%,从各自的食材表先剔除。青椒占农家小炒肉的20%,青椒占鱼香肉丝的比例为8.2%,取小的占比作为共同占比8.2%。以此类推,遍历农家小炒肉与鱼香肉丝的食材组成,我们获取了以下共同占比:姜7%,蒜3%,青椒8.2%。Comparing the ingredients of the farmhouse fried pork and the shredded pork with fish flavor, we get the common ingredients: ginger, garlic and green pepper. Further obtain the common proportion of common ingredients: the proportion of ginger in the farmer’s small fried pork and fish-flavored pork is 7%, which is removed from the respective table of ingredients. Green peppers account for 20% of the farm’s small fried pork, and green peppers account for 8.2% of fish-flavored shredded pork. The smaller proportion is taken as the common proportion of 8.2%. By analogy, traversing the ingredients of the farmer's fried pork and fish-flavored shredded pork, we obtained the following common proportions: 7% of ginger, 3% of garlic, and 8.2% of green pepper.
去除农家小炒肉和鱼香肉丝原菜谱中共同食材的共同占比,获得去除处理后的农家小炒肉食材及占比:五花肉70%,青椒11.8%;去除处理后的鱼香肉丝的食材及占比:胡萝卜20%,里脊肉41%,木耳2.7%,小笋13.7%,大葱1.4%,蒜3%。Remove the common proportion of common ingredients in the original recipes of farmer's fried pork and Yuxiang pork, and obtain the processed farmer's fried pork ingredients and their proportions: 70% of pork belly and 11.8% of green pepper; the ingredients of the processed Yuxiang pork are removed And the proportion: carrot 20%, tenderloin 41%, fungus 2.7%, bamboo shoot 13.7%, green onion 1.4%, garlic 3%.
根据S120中的公式计算农家小炒肉各食材与鱼香肉丝各食材之间的相似度。具体计算过程在此不再赘述,结果如下:According to the formula in S120, the similarity between the ingredients of the farmer's fried pork and the ingredients of the fish-flavored pork is calculated. The specific calculation process will not be repeated here, and the results are as follows:
sim 五花肉-胡萝卜=0;sim 五花肉-里脊肉=0.75;sim 五花肉-木耳=0;sim 五花肉-小笋=0;sim 五花肉-木耳=0;sim 五花肉-小笋=0;sim 五花肉-大葱=0;sim 五花肉-蒜=0;sim 青椒-胡萝卜=0.25;sim 青椒-里脊肉=0;sim 青椒-木耳=0;sim 青椒-小笋=0.25;sim 青椒-大葱=0.25;sim 青椒-蒜==0.25。 sim pork belly-carrot = 0; sim pork belly-tenderloin = 0.75; sim pork belly-fungus = 0; sim pork belly-small bamboo shoots = 0; sim pork belly-fungus = 0; sim pork belly-small bamboo shoots = 0; sim pork belly-green onion = 0; sim pork belly-garlic = 0; sim green pepper-carrot = 0.25; sim green pepper-tenderloin = 0; sim green pepper-fungus = 0; sim green pepper-small bamboo shoots = 0.25; sim green pepper-green onion = 0.25; sim green pepper-garlic = =0.25.
计算农家小炒肉和鱼香肉丝的菜谱相似度。农家小炒肉和鱼香肉丝的菜谱相似度是将去除处理后的农家小炒肉和鱼香肉丝的食材占比的乘积作为权值,对相应的食材相似度进行加权求和,并加上共同占比之和农家小炒肉与鱼香肉丝的共同占比之和,得到农家小炒肉和鱼香肉丝的菜谱相似度:Calculate the similarity of the recipes of the farmer's fried pork and the fish-flavored pork. The recipe similarity of the farmer’s fried pork and the fish-flavored pork is to take the product of the proportion of the ingredients of the farmer’s fried pork and the fish-flavored pork after the removal process is taken as the weight, and the corresponding ingredients are weighted and summed, and added The sum of the common proportion and the common proportion of the farmer’s fried pork and the fish-flavored pork, the recipe similarity of the farmer’s fried pork and the fish-flavored pork is obtained:
Figure PCTCN2019123808-appb-000007
Figure PCTCN2019123808-appb-000007
请参阅图3,图3是本申请提供的菜谱比较方法第二实施例的流程示意图。本实施例以菜谱比较方法第一实施例为基础,故相同的步骤在此不再赘述。本实施例包括以下步骤:Please refer to FIG. 3, which is a schematic flowchart of a second embodiment of the recipe comparison method provided by the present application. This embodiment is based on the first embodiment of the recipe comparison method, so the same steps will not be repeated here. This embodiment includes the following steps:
S310:获取第一菜谱信息和第二菜谱信息,第一菜谱信息包括多个第一食材的第一类别信息和第一占比信息,第二菜谱信息包括多个第二食材的第二类别信息和第二占比信息。S310: Acquire first recipe information and second recipe information, where the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second category information of a plurality of second ingredients And the second proportion information.
S320:比较第一类别信息和第二类别信息,获取每一第一食材与每一第二食材的食材相似度。S320: Compare the information of the first category with the information of the second category, and obtain the similarity of each first ingredient and each second ingredient.
S330:根据第一占比信息和第二占比信息,对食材相似度进行加权求和,得到第一菜谱和第二菜谱的菜谱相似度。S330: Perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information to obtain the recipe similarity of the first recipe and the second recipe.
S340:推送与第一菜谱信息的菜谱相似度大于或等于阈值的第二菜谱信息。S340: Push the second recipe information whose recipe similarity with the first recipe information is greater than or equal to a threshold.
计算得到第一菜谱和第二菜谱的菜谱相似度后,若菜谱相似度大于或等于阈值,则推送该第二菜谱给用户,以供用户查阅挑选。上述阈值例如可以设置在60%~100%之间,比如70%、80%、85%或90%等。After the recipe similarity between the first recipe and the second recipe is calculated, if the recipe similarity is greater than or equal to the threshold, the second recipe is pushed to the user for the user to consult and select. The above threshold may be set between 60% and 100%, such as 70%, 80%, 85%, or 90%.
当有多个第二菜谱与第一菜谱的菜谱相似度大于阈值时,可以根据菜谱相似度的大小对多个第二菜谱进行推送优先级排序,菜谱相似度越高,推送优先级越高。优先向用户推送优先级高的第二菜谱,减少了同时推荐多个第二菜谱可能会给用户带来的困扰。When there are multiple second recipes with a recipe similarity that is greater than the threshold value, the multiple second recipes may be pushed in priority order according to the similarity of the recipes. The higher the similarity of the recipes, the higher the priority of the push. Prioritize the second recipes with high priority to users, reducing the trouble that may be caused to users by recommending multiple second recipes at the same time.
进一步地,在向用户推荐菜谱相似度大于阈值的第二菜谱后,监测用户是否及时查看第二菜谱,若超过预设时间用户仍未查看该第二菜谱,可以通过语音提示提醒用户查阅第二菜谱。当然,用户未查看该第二菜谱的原因也有可能是对该菜谱不感兴趣,那么也可以设定超过预设时间用户未查看该第二菜谱,则隐藏该菜谱。Further, after recommending a second recipe with a recipe similarity greater than a threshold to the user, monitor whether the user views the second recipe in time. If the user has not viewed the second recipe after a preset time, the user can be reminded to read the second recipe through a voice prompt. menu. Of course, the reason why the user did not view the second recipe may also be that he is not interested in the recipe. Then, it can also be set to hide the recipe if the user does not view the second recipe for more than a preset time.
本实施例中,在计算得到第一菜谱和第二菜谱的菜谱相似度之后,向用户推送菜谱相似度大于阈值的第二菜谱,可以使得用户获取与其喜爱的菜谱比较相似的其他菜谱,能够满足用户的个性化需求,提高了用户体验。此外,按照相似度高低排列优先级,能够减少同时推荐多个第二菜谱可能会给用户带来的困扰。In this embodiment, after the recipe similarity between the first recipe and the second recipe is calculated, the second recipe with the recipe similarity greater than the threshold is pushed to the user, so that the user can obtain other recipes that are similar to their favorite recipes, which can satisfy The personalized needs of users improve the user experience. In addition, prioritizing according to the degree of similarity can reduce the confusion that may be caused to the user by recommending multiple second recipes at the same time.
上述菜谱比较方法由菜谱比较装置实现,因而本申请还提供菜谱比较装置,请参阅图4,图4是本申请提供的菜谱比较装置一实施例的结构示意图,本实施例菜谱比较装置100可以是家用电器,例如油烟机、灶具或冰箱等,也可以是移动终端,例如智能手机、平板电脑、可穿戴设备等。菜谱比较装置100包括相互连接的显示屏11,处理器12和存储器13,本实施例菜谱比较装置100可实现上述菜谱比较方法的实施例。其中,显示屏11用于向用户展示菜谱信息,存储器13中存储有计算机程序,处理器12用于执行计算机程序以实现上述菜谱比较方法。具体来说,处理器12用于计算每一第一食材与每一第二食材的食材相似度,以及计算第一菜谱与多个第二菜谱的菜谱相似度。The above recipe comparison method is implemented by a recipe comparison device. Therefore, this application also provides a recipe comparison device. Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of an embodiment of the recipe comparison device provided by the application. The recipe comparison device 100 of this embodiment may be Household appliances, such as range hoods, stoves, or refrigerators, can also be mobile terminals, such as smart phones, tablet computers, and wearable devices. The recipe comparison device 100 includes a display screen 11, a processor 12, and a memory 13, which are connected to each other. The recipe comparison device 100 of this embodiment can implement the above-mentioned recipe comparison method. Wherein, the display screen 11 is used to display recipe information to the user, a computer program is stored in the memory 13, and the processor 12 is used to execute the computer program to implement the above recipe comparison method. Specifically, the processor 12 is used to calculate the similarity of each first ingredient and each of the second ingredients, and calculate the similarity between the first recipe and the multiple second recipes.
其中,处理器12可以是一种集成电路芯片,具有信号的处理能力。处理器12还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Wherein, the processor 12 may be an integrated circuit chip with signal processing capability. The processor 12 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component . The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
对于上述实施例的方法,其可以计算机程序的形式存在,因而本申请提出一种计算机存储介质,请参阅图5,图5是本申请提供的计算机存储介质一实施例的结构示意图。本实施例计算机存储介质200中存储有计算机程序21,其可被执行以实现上述实施例中的方法。For the method of the foregoing embodiment, it can exist in the form of a computer program. Therefore, this application proposes a computer storage medium. Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of an embodiment of the computer storage medium provided by the present application. The computer storage medium 200 of this embodiment stores a computer program 21, which can be executed to implement the method in the foregoing embodiment.
本实施例计算机存储介质200可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等可以存储程序指令的介质,或者也可以为存储有该程序指令的服务 器,该服务器可将存储的程序指令发送给其他设备运行,或者也可以自运行该存储的程序指令。The computer storage medium 200 in this embodiment may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disk that can store program instructions. Or, it may also be a server storing the program instructions, and the server may send the stored program instructions to other devices to run, or it may run the stored program instructions by itself.
在本申请所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed method and device can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only implementations of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly applied to other related technologies In the same way, all fields are included in the scope of patent protection of this application.

Claims (10)

  1. 一种菜谱比较方法,其特征在于,所述方法包括:A method for comparing recipes, characterized in that the method comprises:
    获取第一菜谱信息和第二菜谱信息,所述第一菜谱信息包括多个第一食材的第一类别信息和第一占比信息,所述第二菜谱信息包括多个第二食材的第二类别信息和第二占比信息;Acquire first recipe information and second recipe information, where the first recipe information includes first category information and first proportion information of a plurality of first ingredients, and the second recipe information includes second recipe information of a plurality of second ingredients. Category information and second proportion information;
    比较所述第一类别信息和所述第二类别信息,获取每一所述第一食材与每一所述第二食材的食材相似度;Comparing the first category information and the second category information to obtain the similarity of each of the first food material and each of the second food material;
    根据所述第一占比信息和所述第二占比信息,对所述食材相似度进行加权求和,得到所述第一菜谱和所述第二菜谱的菜谱相似度。According to the first proportion information and the second proportion information, a weighted summation of the similarity of the ingredients is performed to obtain the similarity of the recipes of the first recipe and the second recipe.
  2. 根据权利要求1所述的方法,所述比较所述第一类别信息和所述第二类别信息,获取每一所述第一食材与每一所述第二食材的食材相似度,包括:The method according to claim 1, wherein the comparing the first category information and the second category information to obtain the similarity of each of the first food material and each of the second food material includes:
    比较所述第一类别信息和所述第二类别信息,确定多个所述第一食材和多个所述第二食材中的共同食材,获取每一所述第一食材与每一所述第二食材的食材相似度;Compare the first category information and the second category information, determine a common ingredient among a plurality of the first ingredients and a plurality of the second ingredients, and obtain each of the first ingredients and each of the first ingredients 2. The similarity of the ingredients of the ingredients;
    所述根据所述第一占比信息和所述第二占比信息,对所述食材相似度进行加权求和,包括:The performing a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information includes:
    比较所述共同食材的第一占比信息和第二占比信息,确定所述共同食材的共同占比;Comparing the first proportion information and the second proportion information of the common ingredient to determine the common proportion of the common ingredient;
    去除所述第一占比信息和所述第二占比信息中所述共同食材的共同占比;Removing the common proportion of the common ingredient in the first proportion information and the second proportion information;
    根据去除处理后的第一占比信息和第二占比信息,对所述食材相似度进行加权求和。Perform a weighted summation on the similarity of the ingredients according to the first proportion information and the second proportion information after the removal process.
  3. 根据权利要求2所述的方法,所述根据去除处理后的第一占比信息和第二占比信息,对所述食材相似度进行加权求和,包括:The method according to claim 2, wherein the weighted summation of the similarity of the food ingredients according to the first proportion information and the second proportion information after the removal process includes:
    将所述去除处理后的第一占比信息和第二占比信息的乘积作为权值,对所述食材相似度进行加权求和,并加上所述共同占比的和,以得到所述菜谱相似度。The product of the first proportion information and the second proportion information after the removal processing is used as a weight, and the similarity of the ingredients is weighted and summed, and the sum of the common proportion is added to obtain the Recipe similarity.
  4. 根据权利要求1所述的方法,所述第一类别信息和所述第二类别信息来源于同一食材编码,所述食材编码包括多层编码;The method according to claim 1, wherein the first category information and the second category information are derived from the same food material code, and the food material code includes a multi-layer code;
    所述比较所述第一类别信息和所述第二类别信息,获取每一所述第一食材与每一所述第二食材的食材相似度,包括:The comparing the first category information and the second category information to obtain the similarity of each of the first food material and each of the second food material includes:
    比较所述第一类别信息的每层编码和所述第二类别信息的每层编码,以获 取每一所述第一食材与每一所述第二食材的食材相似度。The code of each layer of the first category information is compared with the code of each layer of the second category information to obtain the similarity of each of the first food material and each of the second food material.
  5. 根据权利要求4所述的方法,所述比较所述第一类别信息的每层编码和所述第二类别信息的每层编码,以获取每一所述第一食材与每一所述第二食材的食材相似度,包括:The method according to claim 4, said comparing each layer of code of said first category information with each layer of code of said second category information to obtain each of said first ingredients and each of said second ingredients. The similarity of the ingredients, including:
    确定所述第一类别信息的第一编码层数,以及所述第二类别信息的第二编码层数;Determining the number of first coding layers of the first category information and the number of second coding layers of the second category information;
    比较所述第一类别信息的每层编码和所述第二类别信息的每层编码,确定编码相同的层数;Comparing each layer code of the first category information with each layer code of the second category information to determine the number of layers with the same code;
    计算所述第一编码层数和第二编码层数的乘积的开方值,计算所述编码相同的层数和所述开方值的商值作为所述食材相似度。Calculate the square root value of the product of the first coded layer number and the second coded layer number, and calculate the quotient of the same coded layer number and the square root value as the food similarity.
  6. 根据权利要求5所述的方法,所述多层编码中由最高层级到最低层级,每层编码所表示的含义范围依次缩小;According to the method of claim 5, in the multi-layer code, from the highest level to the lowest level, the meaning range of each level of code is reduced in sequence;
    所述比较所述第一类别信息的每层编码和所述第二类别信息的每层编码,确定编码相同的层数,包括:The comparing each layer code of the first category information with each layer code of the second category information to determine the number of layers with the same code includes:
    由所述最高层级到所述最低层级,依次比较所述第一类别信息和所述第二类别信息的同层编码,直至比较结果为不同;From the highest level to the lowest level, sequentially comparing the same layer codes of the first category information and the second category information until the comparison result is different;
    确定所述比较结果为不同的层级以上的层数为编码相同的层数。It is determined that the comparison result is that the number of layers above different levels is the number of layers with the same coding.
  7. 根据权利要求1所述的方法,所述根据所述第一占比信息和所述第二占比信息,对所述食材相似度进行加权求和,得到所述第一菜谱和所述第二菜谱的菜谱相似度,包括:The method according to claim 1, wherein the weighted summation of the similarity of the ingredients is performed on the basis of the first share information and the second share information to obtain the first recipe and the second recipe. Recipe similarity of recipes, including:
    将所述第一占比信息和所述第二占比信息的乘积作为权值,对所述食材相似度进行加权求和,以得到所述菜谱相似度。The product of the first proportion information and the second proportion information is used as a weight, and a weighted summation is performed on the similarity of the ingredients to obtain the similarity of the recipe.
  8. 根据权利要求1所述的方法,所述方法进一步包括:推送与所述第一菜谱信息的菜谱相似度大于或等于阈值的第二菜谱信息。The method according to claim 1, further comprising: pushing second recipe information whose recipe similarity with the first recipe information is greater than or equal to a threshold.
  9. 一种菜谱比较装置,其特征在于,所述菜谱比较装置包括处理器和存储器;所述存储器中存储有计算机程序,所述处理器用于执行所述计算机程序以实现如权利要求1-8中任一项所述方法的步骤。A recipe comparison device, wherein the recipe comparison device includes a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement any of claims 1-8. One of the steps of the described method.
  10. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序被执行以实现如权利要求1-8中任一项所述方法的步骤。A computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is executed to implement the steps of the method according to any one of claims 1-8.
PCT/CN2019/123808 2019-09-29 2019-12-06 Menu comparison method and apparatus, and computer storage medium WO2021056829A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910936777.1 2019-09-29
CN201910936777.1A CN110826595A (en) 2019-09-29 2019-09-29 Menu comparison method and device and computer storage medium

Publications (1)

Publication Number Publication Date
WO2021056829A1 true WO2021056829A1 (en) 2021-04-01

Family

ID=69548516

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123808 WO2021056829A1 (en) 2019-09-29 2019-12-06 Menu comparison method and apparatus, and computer storage medium

Country Status (2)

Country Link
CN (1) CN110826595A (en)
WO (1) WO2021056829A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112951374B (en) * 2021-02-25 2023-03-28 平安普惠企业管理有限公司 Data analysis method, system, computer device and storage medium
CN114893946B (en) * 2022-04-29 2024-04-12 海信视像科技股份有限公司 Food storage device and intelligent cooking method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103383747A (en) * 2012-05-04 2013-11-06 海尔集团公司 Refrigerator and food management system and method
CN105570940A (en) * 2016-02-23 2016-05-11 美的集团股份有限公司 Microwave oven voice control method and microwave oven
CN108062343A (en) * 2017-07-27 2018-05-22 宁波方太厨具有限公司 A kind of generation method of individualized intelligent menu
CN108922592A (en) * 2018-05-25 2018-11-30 美的集团股份有限公司 A kind of nutrient diet method, apparatus, refrigerator and computer storage medium
CN109932036A (en) * 2017-12-19 2019-06-25 苏州恒鼎科技咨询有限公司 A kind of intelligent nutrition claims

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1669889A4 (en) * 2003-09-30 2007-10-31 Intellectual Property Bank Similarity calculation device and similarity calculation program
KR101798616B1 (en) * 2016-02-03 2017-11-16 주식회사 원더풀플랫폼 Method of providing recipe and server performing the same
CN106288634B (en) * 2016-08-04 2019-03-12 海信集团有限公司 Menu recommended method, device and intelligent refrigerator
CN108765202A (en) * 2018-04-11 2018-11-06 丽睿客信息科技(北京)有限公司 It makes a reservation configuration method, device and Self-service order system
CN108989986B (en) * 2018-09-06 2020-09-04 西安电子科技大学 Wi-Fi indoor positioning method based on iterative space division method
CN110263331A (en) * 2019-05-24 2019-09-20 南京航空航天大学 A kind of English-Chinese semanteme of word similarity automatic testing method of Knowledge driving

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103383747A (en) * 2012-05-04 2013-11-06 海尔集团公司 Refrigerator and food management system and method
CN105570940A (en) * 2016-02-23 2016-05-11 美的集团股份有限公司 Microwave oven voice control method and microwave oven
CN108062343A (en) * 2017-07-27 2018-05-22 宁波方太厨具有限公司 A kind of generation method of individualized intelligent menu
CN109932036A (en) * 2017-12-19 2019-06-25 苏州恒鼎科技咨询有限公司 A kind of intelligent nutrition claims
CN108922592A (en) * 2018-05-25 2018-11-30 美的集团股份有限公司 A kind of nutrient diet method, apparatus, refrigerator and computer storage medium

Also Published As

Publication number Publication date
CN110826595A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
US11669557B2 (en) Iterative image search algorithm informed by continuous human-machine input feedback
CN108897768B (en) Ordering method and device and electronic equipment
WO2013125201A1 (en) Device for presenting recipe and method for presenting recipe
WO2021056829A1 (en) Menu comparison method and apparatus, and computer storage medium
CN110837552B (en) Diet information recommendation method and device
CN107851183A (en) System and method for providing recipe
US10055496B2 (en) Cuisine search device, cuisine search method, program, and computer-readable storage medium
US20190251202A1 (en) Smart recipe recommendation apparatus, method thereof and automatic cooking apparatus
CN113934776B (en) Food material pushing method, device, medium and equipment
JP6310165B1 (en) Information processing apparatus, information processing method, program, and storage medium
EP3639713A1 (en) Automatic main ingredient extraction from food recipe
CN113139120A (en) Electronic equipment and recipe recommendation method and apparatus
CN112328845B (en) Dish pushing method and device based on cooking equipment and cooking equipment
Xie et al. Cross-Modal Joint Embedding with Diverse Semantics
TW201935392A (en) Smart recipe recommendation apparatus, method thereof and automatic cooking apparatus
CN111460278B (en) Recipe recommendation method and system
US20210212505A1 (en) Automatic main ingredient extraction from food recipe
Shah et al. Bon vivant: A machine learning approach towards cooking
CN117453756A (en) Menu generation method, device, equipment and storage medium
Mansor A study on the promotion of local cuisine using multimedia platform: Go’bang Maju Restaurant Temerloh
CN111863193A (en) Method, device and equipment for recipe recommendation
CN111134309A (en) Taste adjusting method and device
CN116469523A (en) Menu recommendation method and device, electronic equipment and readable storage medium
CN117271040A (en) Recipe customizing method and device, cooking equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19946566

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19946566

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19946566

Country of ref document: EP

Kind code of ref document: A1