Menu searching method and device based on large model, equipment and medium

By using a large model-based method in recipe search, the recipe information is corrected, rewritten and intent identification, and combined with multiple recall channels and tag information, the existing recipe search solutions have solved the shortcomings in accuracy and user intention understanding, and achieved more efficient and personalized search results.

CN119988522APending Publication Date: 2025-05-13CHENGDU BOSS INNOVATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510079061.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Existing recipe search solutions have shortcomings in accuracy and user intent understanding, making it difficult to deal with erroneous input and complex issues.

Method used

The recipe search method based on the big model is adopted to correct errors, rewrite and intent identification of search recipe information through the recipe search model, and search with multiple recall channels and tag information to improve the relevance and accuracy of search results.

Benefits of technology

It significantly improves the accuracy and personalization of recipe searches, can better understand user intentions, handle error inputs and complex queries, and provide search results that are more in line with user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988522A_ABST
    Figure CN119988522A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a menu search method and device based on a large model, equipment and a medium, and relates to the technical field of data processing, the method comprises the steps of receiving a menu search request, and sequentially performing error correction, rewriting and intention recognition processing on menu information to be searched based on a menu search model, and obtaining a processing result matched with the set label information, and searching a menu search result matched with the menu search request based on the processing result. Wherein cue words are constructed in the menu search model, the cue words indicate definitions and processing rules corresponding to error correction, rewriting and intention recognition respectively, and various label information of menu resources is defined. Therefore, the menu searching accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a recipe search method, device, equipment and medium based on a large model. Background Art

[0002] With the rapid development of digitalization and intelligence, smart homes are rapidly penetrating into people's daily lives, profoundly changing the user experience. Recipe search, as an important part of smart homes and cooking assistants, allows users to more efficiently and conveniently find and filter recipes that meet personal needs and health standards. However, the accuracy of existing recipe search solutions needs to be improved. Summary of the invention

[0003] One of the purposes of the present invention includes, for example, providing a recipe search method, apparatus, device and medium based on a big model to at least partially improve the accuracy of recipe search.

[0004] The embodiments of the present invention can be implemented as follows:

[0005] In a first aspect, an embodiment of the present invention provides a recipe search method based on a large model, comprising:

[0006] receiving a recipe search request, wherein the recipe search request includes recipe information to be searched;

[0007] Based on the recipe search model, the recipe information to be searched is processed in sequence with error correction, rewriting and intention recognition to obtain a processing result that matches the set tag information; prompt words are constructed in the recipe search model, and the prompt words indicate definitions and processing rules corresponding to error correction, rewriting and intention recognition, respectively, and define various tag information of recipe resources;

[0008] A recipe search result matching the recipe search request is found based on the processing result.

[0009] In an optional implementation manner, the recipe search model is used to sequentially perform error correction, rewriting, and intention recognition processing on the recipe information to be searched to obtain a processing result that matches the set tag information, including:

[0010] Inputting the recipe information to be searched into the recipe search model;

[0011] Checking and correcting spelling and grammatical errors in the recipe information to be searched based on the recipe search model, and completing incomplete and abbreviated contents in the recipe information to be searched based on the set tag information to obtain complete recipe information to be searched;

[0012] rewriting the complete recipe information to be searched into synonymous expressions to obtain a plurality of rewriting results composed of short words;

[0013] Based on the recipe information to be searched and each of the rewriting results, identifying the information that the user wants to obtain and the operation to be performed, and obtaining keywords representing the user's intention;

[0014] The complete recipe information to be searched, the rewriting results and the keywords are taken as processing results and output in a set format.

[0015] In an optional implementation manner, searching for recipe search results matching the recipe search request based on the processing result includes:

[0016] constructing a plurality of recipe recall paths based on the processing results, each of the recipe recall paths corresponding to a different search rule;

[0017] Based on each of the recipe recall paths, recipe search is performed in combination with the set tag information to obtain a plurality of candidate recipes;

[0018] sorting the candidate recipes according to set rules;

[0019] Recipe search results matching the recipe search request are screened out from the sorted candidate recipes.

[0020] In an optional embodiment, the plurality of recipe recall pathways include a text recall pathway and a semantic recall pathway, the text recall pathway and the semantic recall pathway each include a plurality of sub-recall pathways, each of the sub-recall pathways including at least one of a recipe name, an ingredient, and a label;

[0021] The recipe search is performed based on each of the recipe recall paths in combination with the set tag information to obtain a plurality of candidate recipes, including:

[0022] Based on each of the sub-recall paths in the text recall path and the semantic recall path, and in combination with the set tag information, respectively perform recipe searches to obtain initial results;

[0023] Merging, truncating, and removing duplicates of the initial results to obtain multiple candidate recipes;

[0024] Among them, the text recall path performs text recall based on the BM25 algorithm; the semantic recall path performs semantic recall based on the BEG model.

[0025] In an optional implementation manner, the sorting of the candidate recipes according to a set rule includes:

[0026] Based on the relevance of the recipe information to be searched and each of the candidate recipes, the quality of each of the candidate recipes, the popularity of each of the candidate recipes, and the user's historical selection, comprehensively scoring and ranking each of the candidate recipes;

[0027] The step of screening out recipe search results matching the recipe search request from the sorted candidate recipes includes:

[0028] The candidate recipes with scores lower than a preset threshold are cut off from the sorted candidate recipes, and the remaining sorted candidate recipes are used as recipe search results matching the recipe search request.

[0029] In an optional embodiment, the recipe search model is obtained by training an original pre-trained model, wherein a bypass is added to the feedforward neural network layer of the transformer module of the original pre-trained model, and the feedforward neural network layer is decomposed into two low-rank matrix multiplications by matrix decomposition.

[0030] In an optional embodiment, the set label information includes recipe type, taste, cooking method, nutritional elements, applicable scene, applicable solar term or festival, recipe efficacy, and health label;

[0031] Among them, each of the label information is obtained by mining recipe labels using the Qwen-7B model trained in the cooking field.

[0032] In a second aspect, an embodiment of the present invention provides a recipe search device based on a large model, comprising:

[0033] An information acquisition module, used for receiving a recipe search request, wherein the recipe search request includes recipe information to be searched;

[0034] An information processing module is used to perform error correction, rewriting and intent recognition processing on the recipe information to be searched in sequence based on a recipe search model to obtain a processing result that matches the set label information; prompt words are constructed in the recipe search model, and the prompt words indicate definitions and processing rules corresponding to error correction, rewriting and intent recognition, respectively, and various types of label information of recipe resources are defined; based on the processing result, recipe search results that match the recipe search request are found.

[0035] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the recipe search method based on a large model as described in any one of the aforementioned implementations is implemented.

[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the recipe search method based on a large model as described in any one of the aforementioned implementation modes.

[0037] The beneficial effects of the embodiments of the present invention include, for example: after error correction, rewriting and intent recognition processing are performed on the recipe information to be searched based on the recipe search model, matching recipe search results are found, which improves the current technical problem that the accuracy of recipe search needs to be improved due to insufficient understanding of intent, improper handling of erroneous input and weak ability to understand complex problems in the recipe search process. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 One of the flow charts of a recipe search method based on a large model provided in an embodiment of the present invention is shown.

[0040] Figure 2 The second flowchart of a recipe search method based on a large model provided in an embodiment of the present invention is shown.

[0041] Figure 3 The third flowchart of a recipe search method based on a large model provided in an embodiment of the present invention is shown.

[0042] Figure 4 A fourth flow chart of a recipe search method based on a large model provided in an embodiment of the present invention is shown.

[0043] Figure 5 The fifth flowchart of a recipe search method based on a large model provided in an embodiment of the present invention is shown.

[0044] Figure 6 An exemplary structural block diagram of a recipe search device based on a large model provided by an embodiment of the present invention is shown.

[0045] Figure 7 A structural block diagram of an electronic device provided by an embodiment of the present invention is shown.

[0046] Icons: 11-electronic device; 111-controller; 112-ROM; 113-RAM; 114-bus; 115-I / O interface; 116-input unit; 117-output unit; 118-storage unit; 119-communication unit; 140-recipe search device; 141-information acquisition module; 142-information processing module. DETAILED DESCRIPTION

[0047] Nowadays, recipe search is an important function of smart homes and cooking assistants. However, the accuracy of existing recipe search solutions needs to be improved.

[0048] The research found that the main reasons affecting the accuracy of existing recipe search solutions are that the existing recipe search solutions have the following deficiencies:

[0049] (1) Weak ability to understand user intent: Traditional search solutions usually rely on keyword matching, which makes it difficult to deeply understand user intent and handle fuzzy queries, and thus ignores the actual needs of users.

[0050] For example, when a user enters the search term "non-spicy dishes", the traditional system may only recognize the keyword "spicy", but cannot accurately understand the user's actual dietary preferences, resulting in the search results containing more spicy recipes, which do not meet the user's actual needs. This limitation greatly reduces the relevance and accuracy of the search results, and the user's actual needs are not effectively met.

[0051] (2) Weak ability to deal with incorrect input: Traditional search solutions have a weak ability to deal with incorrect input. When the search terms entered by users contain spelling errors, abbreviations, or word deformations, traditional search solutions are often unable to effectively identify and process these irregular inputs.

[0052] For example, when a user enters "roasted chicken with chives" but spells it as "roasting machine with chives", the system may not recognize that the correct spelling of "roasting machine" here should be "roasted chicken", and thus cannot return relevant recipes. Similarly, for abbreviations or acronyms, such as when a user enters "pickled fish" and it is abbreviated as "sour fish", the system may not understand the relationship between the two, resulting in inaccurate retrieval results. In addition, when users use different word variations, such as "stewed meat" and "stewed meat", traditional search systems may not be able to handle these word variants and thus cannot provide relevant recipes.

[0053] (3) Limitations in understanding complex problems: User queries may contain multiple intentions or complex requirements, such as “low-salt, high-protein summer salad”. Traditional recipe search solutions are usually unable to simultaneously identify and process these multi-dimensional requirements and can often only return partially matching recipes, such as results that only contain “low-salt” or “salad” related results. This results in inaccurate search results that cannot meet the comprehensive needs of users.

[0054] Based on the above research, an embodiment of the present invention provides a recipe search solution based on a large model, which combines the natural language understanding and general domain knowledge capabilities of a large-scale language model to improve the limitations of traditional recipe search solutions in the recipe search process and enhance the accuracy and personalization of recipe search.

[0055] The defects existing in the above solutions are the results obtained by the inventors after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the embodiments of the present invention for the above problems below should all be the contributions made by the inventors in the invention process.

[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0059] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0060] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0061] See also Figure 1 , which is a flow chart of a recipe search method based on a big model provided in an embodiment of the present invention. The recipe search method based on a big model includes S110, S120 and S130.

[0062] S110, receiving a recipe search request, wherein the recipe search request includes recipe information to be searched.

[0063] S120, based on the recipe search model, sequentially perform error correction, rewriting and intention recognition processing on the recipe information to be searched, and obtain a processing result that matches the set tag information.

[0064] Among them, prompt words are constructed in the recipe search model, and the prompt words indicate the definitions and processing rules corresponding to error correction, rewriting and intention recognition, and define various types of label information of recipe resources.

[0065] S130: Find out recipe search results matching the recipe search request based on the processing result.

[0066] The recipe search model uniformly performs error correction, rewriting and intent recognition processing on the searched recipe information to obtain processing results, improves processing efficiency, simplifies the process, and finds matching recipe search results based on the processing results after error correction, rewriting and intent recognition, thereby improving the reliability and accuracy of recipe search.

[0067] In S110, the recipe search request can be obtained flexibly. For example, the user can input the recipe information to be searched through the handheld terminal, thereby generating a recipe search request for recipe query. For another example, the user can input the recipe information to be searched through the cooking smart device, thereby generating a recipe search request for recipe query. For another example, the user can make a request through voice, or through text input, predetermined gestures, etc.

[0068] For another example, given that the comprehensiveness of the recipe information to be searched input by the user will directly affect the reliability of the subsequent large-model intelligent search, an interactive process for the recipe information to be searched can be set up, such as pre-configuring a variety of tag information, and prompting the user through interaction to enter relatively comprehensive recipe information to be searched according to the configured tag information, so that the large model can reliably perform recipe searches.

[0069] In S120, after the recipe information to be searched is input into the recipe search model, the recipe search model performs error correction, rewriting and intent recognition processing on the recipe information to be searched in sequence to analyze and mine the user's query intention and improve the accuracy and relevance of subsequent recipe search result feedback.

[0070] In order to ensure the reliability of the recipe search model, various types of label information of recipe resources in the recipe search model may include recipe type, taste, cooking method, nutritional elements, applicable scenarios, applicable solar terms or festivals, recipe efficacy, health labels, etc.

[0071] For example, based on information such as the recipe name, introduction, ingredients, and preparation steps, you can use a cooking field big model, such as the adjusted big model Qwen-7B, to mine recipe tags and dig out the following tag information: recipe type, taste, cooking method, nutritional elements, applicable scenarios, applicable solar terms or festivals, recipe efficacy, health tags, etc., to obtain processing results that match the set tag information.

[0072] Please refer to Figure 2 , S120 can be implemented by S121, S122, S123, S124 and S125.

[0073] S121, inputting the recipe information to be searched into the recipe search model.

[0074] S122, checking and correcting spelling and grammatical errors in the recipe information to be searched based on the recipe search model, and completing incomplete and abbreviated contents in the recipe information to be searched based on the set tag information to obtain complete recipe information to be searched.

[0075] S123, rewriting the complete recipe information to be searched into synonymous expressions to obtain a plurality of rewriting results composed of short words.

[0076] S124, based on the recipe information to be searched and the rewriting results, identifying the information the user wants to obtain and the operation to be performed, and obtaining keywords representing the user's intention.

[0077] S125, taking the complete recipe information to be searched, the rewriting result and the keywords as the processing result, and outputting them in a set format.

[0078] Compared with constructing different models for error correction, rewriting and intent recognition as independent modules, in this embodiment, only one request for the recipe search model is required to obtain the processing results of the three processing tasks of error correction, rewriting and intent recognition, which improves processing efficiency and simplifies the processing flow.

[0079] In order to perform error correction, rewriting and intent recognition on the searched recipe information based on the recipe search model, prompt words are constructed in the recipe search model. The prompt words indicate the definitions and processing rules corresponding to error correction, rewriting and intent recognition, and various types of label information of recipe resources are defined.

[0080] Optionally, the prompt words constructed in the recipe search model may include: recipe search model role definition, task rules and instructions, and various tag information of recipe resources.

[0081] The role definition of the recipe search model clearly states the capabilities that the recipe search model should have and the tasks that need to be completed. The tasks include error correction, rewriting, and intent recognition.

[0082] Each task and its objectives are clearly defined in the task rules and instructions.

[0083] The various tag information of recipe resources clearly contains the content required for recipe search recommendation based on the recipe search model.

[0084] Based on the above construction of prompt words, by clarifying the role definition of the recipe search model, it is ensured that the model can accurately understand user needs and has the ability to complete specific tasks such as error correction, rewriting and intent recognition, so as to more effectively process user requests, reduce misunderstandings and erroneous responses, and improve user experience.

[0085] Clearly defining task rules can help the model better understand and follow the goals of each task, making task execution more efficient and in line with expectations. In addition, as the model continues to learn and adapt to new data, clear task rules help to quickly locate problems and make targeted adjustments, promoting continuous optimization of model performance.

[0086] With rich label information, the model can provide more personalized recipe recommendations based on user preferences and specific needs, increasing the probability of users finding satisfactory results. Among them, the diverse labels are not limited to the type of ingredients, but can also cover multiple dimensions such as cooking difficulty, time required, health index, etc., making the model's application scenarios more extensive.

[0087] In summary, by constructing prompt words that include role definitions, task rules, and label information, the intelligence of the recipe search model can be improved. The model can not only understand the user's surface needs, but also deeply analyze the intentions behind them and provide more intelligent services. It can improve the level of personalized services. Based on a detailed label system, the model can provide each user with tailored recipe suggestions to meet diverse needs. By reducing errors, improving recommendation accuracy and service quality, higher user satisfaction and better market feedback can be achieved.

[0088] For example, in the prompt of the recipe search model, detailed definitions and descriptions of the three tasks of error correction, rewriting, and intent recognition are given.

[0089] For example, the structure of Prompt may include the following parts:

[0090] 1. Recipe search model role definition: clearly tell the model what capabilities it should have and what tasks it needs to complete. For example, you are a powerful search system query understanding module, especially good at query error correction, query rewriting and intent recognition in recipe search scenarios. Your task is to understand the user's current needs based on the user's query, and correct, rewrite and identify the user's query.

[0091] 2. Task rules and instructions: clearly state the definition of each task and its objectives. For example:

[0092] Query Correction: Correct any spelling or grammatical errors in the query entered by the user. If the information entered by the user is incomplete or contains abbreviations, try to complete it to obtain the user query containing complete information.

[0093] Query rewriting: Based on the corrected query, rewrite it into a synonymous expression, keep the original meaning and use different words. Provide multiple rewriting results to ensure that the rewritten query is a combination of short words and does not deviate from the semantics of the corrected query.

[0094] Intent identification: Based on the user's original query and the rewritten query, determine the real needs behind the user's query and identify the type of information the user wants to obtain or the operation they want to perform. List all keywords that can represent the user's intent and other possible related intents. Ensure that the extracted intent is complete and does not deviate from the semantics of the rewritten query.

[0095] In order to constrain the output format of the recipe search model processing results and facilitate subsequent parsing, the query understanding results can be output in a set format, such as returning the query understanding results in a standard json format.

[0096] Exemplarily, the query understanding result format may be: {"Query after error correction":"xxxx","Rewrite Query":["xxxx","xxxx"],"User Intent":["xxxx","xxxx"].

[0097] In this embodiment, the powerful general knowledge and reasoning ability of the recipe search model are utilized. Compared with independently training the three types of task models of error correction, rewriting, and intent recognition, one recipe search model is used to uniformly complete the three types of tasks, which greatly improves efficiency and simplifies the process. At the same time, there is a close relationship between the three types of tasks of query error correction, query rewriting, and intent recognition, which are progressive to each other. Integrating the three types of tasks into a whole for optimization can significantly improve the overall effect and lay the foundation for the accuracy and reliability of subsequent recipe searches. In addition, by defining various types of tag information of recipe resources, the processing results are output according to the set format, which improves the uniformity and comprehensiveness of the processing.

[0098] After the processing result is obtained based on S120, in S130, searching for recipe search results matching the recipe search request based on the processing result can be flexibly implemented. For example, the recipe search results can be searched through keyword matching, similarity matching, semantic matching, etc.

[0099] In order to improve the comprehensiveness and reliability of recipe search, multiple recall paths can be constructed for recipe search. Figure 3 , which is one of the implementation schemes of S130, includes S131, S132, S133 and S134.

[0100] S131, constructing a plurality of recipe recall paths based on the processing result, each of the recipe recall paths corresponding to a different search rule.

[0101] S132, performing a recipe search based on each of the recipe recall paths in combination with the set tag information to obtain a plurality of candidate recipes.

[0102] S133, sorting the candidate recipes according to set rules.

[0103] S134: Filter out recipe search results that match the recipe search request from the sorted candidate recipes.

[0104] By building multiple recipe recall channels, the comprehensiveness and reliability of recipe recall can be ensured.

[0105] For further information, please refer to Figure 4 , S132 can be implemented through S1321 and S1322.

[0106] S1321, based on each of the sub-recall paths in the text recall path and the semantic recall path, in combination with the set tag information, respectively perform recipe searches to obtain initial results.

[0107] S1322: Merge, truncate, and remove duplicates of the initial results to obtain a plurality of candidate recipes.

[0108] Among them, multiple recipe recall paths can be flexibly selected. For example, they can include a text recall path and a semantic recall path. The text recall path and the semantic recall path can respectively include multiple sub-recall paths, and each of the sub-recall paths can include at least one of a recipe name, an ingredient, and a label.

[0109] For example, based on the processing result in S130, the user search terms can be obtained, thereby constructing two types of recall paths: text recall and semantic recall. The text recall path can include three recall paths: recipe name, ingredients, and labels. The semantic recall can include two recall paths: recipe name and recipe name + label.

[0110] Recipe searches are performed based on the five-way recall pathways, and the recipe sets after merging, truncating, and deduplicating the search results (initial results) of the five-way recall pathways are used as candidate recipes.

[0111] Among them, text recall recalls recipe resources from the granularity of characters, words, entity words, etc., mainly focusing on the local information of the query, and can effectively recall relevant resources for precise search. For example, for the recipe information to be searched, "spicy home-cooked dishes" will first be divided into "spicy" and "home-cooked dishes", and then these two words will be used to search for recipes that also contain these words in the inverted index library. For example, the text matching (Best Matching, BM25) algorithm is used to calculate the relevance of the query and the recalled recipes, and then sorted and truncated according to the relevance.

[0112] Semantic recall focuses on the semantic information of the query as a whole, and can effectively recall relevant resources for fuzzy search, which can supplement the text recall results. Semantic vector models, such as the fine-tuned open source BAAI General Embedding (BGE) model, can be used to extract semantic vectors for the query and recipes respectively.

[0113] There can be two types of recipe vectors. The two types of information, "recipe name" and "recipe name_label", are spliced ​​together and input into the BGE model to obtain a semantic vector. This semantic vector can make full use of the contextual information in the text. For example, if a user searches for "non-spicy home-cooked dishes", text recall will recall recipes that contain the keyword "spicy" in the recipe or label, which does not meet user needs. Non-spicy dishes such as "sweet and sour spare ribs" and "stir-fried cauliflower" can be recalled through semantic vectors. The semantic vector extracted by the BGE model can well understand the semantic information of "non-spicy" in the query, thereby recalling the expected results.

[0114] Taking the recipe search model as an open source large model as an example, the open source large model can be obtained by training the original pre-trained model. In order to improve the application effect and convenience of the model, a bypass can be added to the feedforward neural network layer of the transformer module of the original pre-trained model, and the feedforward neural network layer can be decomposed into two low-rank matrix multiplications by matrix decomposition.

[0115] Matrix decomposition can convert the original high-dimensional matrix operations into low-dimensional matrix operations, thereby reducing the computational complexity of the model. Low-rank matrix multiplication can significantly reduce the number of parameters in the model, help mitigate the risk of overfitting, and reduce the size of the model, thereby reducing memory requirements. Due to the reduction in the number of parameters, the model training efficiency can be improved. Low-rank matrix multiplication can be regarded as an implicit regularization method. By limiting the rank of the matrix, it can prevent the model from learning overly complex data representations, thereby avoiding overfitting to a certain extent. Low-rank decomposition helps the model capture the main factors of change in the data while ignoring noise or unimportant variables, thereby improving the generalization ability of the model on unseen data. The parameters after low-rank matrix decomposition are easier to optimize, which helps to avoid the gradient vanishing or exploding problems encountered during training.

[0116] Based on S130, two types of channels, text recall and semantic recall, are constructed. The advantages of the two channels are combined and complemented with each other to achieve the most comprehensive recall of recipes that meet user needs. The recall results of each channel are merged, truncated, and deduplicated to obtain candidate recipes.

[0117] In S133, the candidate recipes are sorted according to the set rules, which can be flexibly set. For example, they can be sorted according to relevance, popularity, user history selection, user feedback data (such as browsing, collection, likes, comments, etc.), user-defined rules, etc.

[0118] In one implementation, the candidate recipes may be comprehensively scored and ranked based on the relevance of the recipe information to be searched and the candidate recipes, the quality of the candidate recipes, the popularity of the candidate recipes, and the user's historical selections.

[0119] After sorting the candidate recipes, in S134, recipe search results that match the recipe search request are screened out from the sorted candidate recipes, which can be flexibly set. For example, a set number of recipes that are ranked high can be used as recipe search results. For another example, the candidate recipes with scores below a preset threshold can be cut off from the sorted candidate recipes, and the remaining sorted candidate recipes can be used as recipe search results that match the recipe search request.

[0120] Among them, the sorting method can be set flexibly. For example, each candidate recipe can be scored separately and sorted according to the score. For another example, each candidate recipe can be graded based on the adaptability of the candidate recipe to the recipe search request. For example, with the help of the powerful general knowledge ability of the large model, several adaptation levels can be pre-marked to represent the degree of satisfaction of the recipe search results for the recipe search request, such as 5 levels (0, 1, 2, 3, 4). Level 5 means that it best meets user needs, and level 0 means that it cannot meet user needs at all. Accordingly, the recipe can be selected according to the required number of recipes set in the recipe search results and the level.

[0121] To more clearly explain the recipe search method in this embodiment, please refer to Figure 5 , the overall implementation principle of the recipe search method is illustrated as follows.

[0122] First, train the recipe search model: collect cooking-related data from public recipe websites, food and nutrition databases, public cooking data sets, and own recipe data as raw data. Clean and organize the raw data, remove duplicate, invalid, or erroneous data, and fill in missing values, so as to organize the raw data into structured data.

[0123] Based on structured data, a training instruction dataset is constructed, and GPT-4o is used to predict each sample. The prediction results are used as the label information of the training set. Based on the constructed training sample set, the Qwen-7B model is fine-tuned using LoRA technology based on the open source pre-trained model parameters.

[0124] Among them, LoRA is a method for efficient fine-tuning of large models. By freezing the pre-trained model parameters and adding a small number of trainable parameters, it greatly reduces the memory and computing overhead of model fine-tuning, while achieving an inference speed similar to that of the pre-trained model. The specific method is to add a bypass to the FN layer (feed-forward) of the transformer module of the original pre-trained model, and transform the FN layer into two low-rank matrix multiplications through matrix decomposition, performing a dimensionality reduction and then dimensionality increase operation to reduce the amount of learnable parameters in the fine-tuning stage.

[0125] Construct resource-side label system: Based on the recipe name, introduction, ingredients and production steps in the own data, the fine-tuned Qwen-7B model is used for label mining. The mined label types include: recipe type (such as main dish, snack, etc.), taste (such as sweet, salty, spicy, etc.), cooking method (such as stir-fry, boil, roast, etc.), nutritional elements (such as protein, vitamin C, etc.), applicable scenarios (such as family gatherings, supper, etc.), applicable solar terms or festivals (such as Spring Festival, summer, etc.), recipe effects (such as strengthening the spleen and appetite, blood tonic, etc.), and health labels (such as low-fat, sugar-free, etc.).

[0126] Construct the prompt word Prompt for extracting 8 types of key label information, and request the large model to obtain the generation result of the label information.

[0127] For example, the prompt word prompt may be: "You are a food expert, I give you a recipe, please help me analyze the following information of the recipe:

[0128] Dish type, cooking method, recommended scene, health label, suitable for season, solar term or festival, functional effect, taste, recommended combination, similar recipes, main ingredients (up to 2 kinds);

[0129] Requirements: In addition to the main ingredients, select one or more options from the corresponding categories for other information; the category options are as follows:

[0130] Cooking method: Steaming, frying, baking

[0131] Suitable seasons, solar terms or festivals: Beginning of Spring, Summer, Winter Solstice

[0132] Health tags: low carb, high vitamin, fat free

[0133] Taste: sour, sweet, bitter, spicy

[0134] Functional effects: nourishing, building muscle, protecting blood vessels and heart

[0135] Types of dishes: Home-cooked dishes, staple foods, complementary foods

[0136] Recommended scenarios: daily meals, banquets, work meals

[0137] Recipe Information:

[0138] Name: Purple sweet potato, oatmeal and barley porridge

[0139] Steps: 1. Start cooking; 2. After cooking, take out and stir evenly, then you can eat.

[0140] Nutritional value: fat-free, low iodine, sodium-free, low total purine, no saturated fatty acids, low cholesterol

[0141] Ingredients: purple sweet potato, oats, coix seed, rock sugar, water

[0142] Category: sweet, breakfast, steaming, soup, porridge, staple food, semi-liquid food, all-in-one machine, low-salt diet, low-fat diet

[0143] Please return the result in standard JSON string format".

[0144] These tags can greatly enrich the information of recipes, making them more comprehensive and accurate, while providing important decision-making basis for the recall and sorting process.

[0145] User search term understanding: Receive recipe search requests and analyze and mine the user’s search terms (recipe information to be searched) based on the trained recipe search model.

[0146] The user's search term is recorded as Q0. Based on Q0, through the constructed prompt word Prompt and instructions, the large model is required to perform the following three tasks in sequence. The tasks include:

[0147] Query error correction: Error correction is the basis of subsequent processes. The result of query error correction is recorded as Q1, which will replace the original user search term Q0.

[0148] Query rewriting: enrich the information covered in the query, such as expanding the search coverage by identifying and replacing synonyms or synonymous expressions in the search terms. For example, rewrite "tomato beef brisket" to "tomato beef brisket", and rewrite "weight loss recipes" to "low-sugar recipes", "low-fat recipes" and "calorie recipes". Usually there are multiple rewriting results, which are recorded as Q2 = {Q2_1, Q2_2, ..., Q2_n}.

[0149] The rewritten result set Q2 and the query error correction result Q1 are used together to participate in the subsequent candidate recipe recall, so as to make the search results more comprehensive and recall more potentially relevant content, thereby improving the retrieval effect and accuracy.

[0150] Intent recognition: Users may have multiple intents, and the intent set is recorded as I = {I_1, I_2, ..., I_m}. For example, if the user searches for the term "low-salt, high-protein summer salad", the intent set is I = {"low-salt", "high-protein", "summer", "salad", "fat-reducing meal"}, of which the first four are intentions explicitly mentioned by the user, and the last one "fat-reducing meal" is the intent expanded by the large model based on the query semantics. The results of intent recognition will be used in the subsequent candidate recipe recall and ranking stages to provide users with more accurate recipe results.

[0151] Candidate recipe recall: Based on the query correction result Q1 and the rewriting result set Q2, two types of recall paths, text recall and semantic recall, are constructed respectively.

[0152] The two types of recall paths can be divided into offline and online stages. In the offline stage, a recipe index is constructed and the recipe information is stored in the database in different ways according to the index type for fast retrieval and matching. In the online stage, the relevant recipes are recalled from the index in real time according to the query understanding results of the user's search (indexing is done by recipe name offline and retrieval is done by query online).

[0153] Text recall pathway:

[0154] Offline phase: Build an offline recall ES (Elasticsearch) index, and construct index information of three dimensions: recipe name, ingredients, and labels for all resources in the recipe library. Specifically, obtain the recipe name, ingredients, and labels of each recipe. Then, use the original text of these three types of information, the words and phrases obtained after word segmentation, as the key of the inverted index, and the recipe id as the value, and store them in the ES index. For example, for the recipe "Tomato Beef Brisket", id = 20, the index of the recipe name dimension will have 3 records, the first two are the word segmentation indexes, and the third is the index of the complete recipe name, in the following format:

[0155] Index 1: Tomato, recipe id: 20

[0156] Index 2: Beef brisket, recipe id: 20

[0157] Index 3: Tomato Beef Brisket, recipe id: 20

[0158] Online stage: After the user inputs the recipe information to be searched, such as the query term, the Q1 and Q2 sets are obtained through the recipe search model and denoted as Q3. Then, all the retrieval terms in Q3 are tokenized into independent words or phrases, and these short words are used to recall candidate recipes from the recipe name index, ingredient index, and tag index respectively.

[0159] For example, if Q3 = {"Tomato recipe", "Tomato's recipe"}, the set of short words W after tokenization is {"Tomato", "Tomato", "recipe"}, and then these three words will be used to recall relevant recipes from the recipe name index, ingredient index, and tag index library respectively.

[0160] The recall results of different words are merged in the following way (the same applies to the processing method of vector recall): For example, the recall results from the recipe name index library are:

[0161] The results recalled by "Tomato" are: {c1, c2, c3}

[0162] The results recalled by "Tomato" are: {c1, c4, c5, c6}

[0163] The results recalled by "recipe" are: {c7, c8}

[0164] Then the recall results from the recipe name index are merged into: {c1, c2, c3, c4, c5, c6, c7, c8}

[0165] For the same resource, duplicate removal is done using the maximum relevance score. c1 is recalled by both "Tomato" and "Tomato", and the relevance scores are 0.9 and 0.7 respectively. Then one c1 is retained and the score is set to 0.9.

[0166] Semantic recall path:

[0167] Use the BGE model (Enhanced Decoder) for pre-training on the text representation task from large-scale texts to extract text semantic features.

[0168] Offline stage: Fine-tune the BGE model to vectorize the recipe text information and the user query term. Use BGE to extract text vectors for "recipe name" and "recipe name_tag" respectively, and build an index using the Milvus vector library.

[0169] Online stage: Use BGE to extract the text vectors of all rewritten Queries in the Q3 set, and recall candidate recipes from the "recipe name" and "recipe name_tag" type vector libraries respectively.

[0170] For example, if Q3 = {"Tomato recipe", "Tomato's recipe"}, recall from the two types of vector libraries using the two rewritten Queries "Tomato recipe" and "Tomato's recipe" respectively.

[0171] The candidate results of the five recalls are merged, truncated, and deduplicated, and the resulting recipe set is used as the final recalled recipe set, thereby obtaining multiple candidate recipes.

[0172] Candidate recipe ranking: Based on the relevance of search terms and candidate recipes, recipe quality, recipe popularity and other factors, the xgboost model is trained to rank the recalled candidate recipes. Recipe resources with ranking scores below the threshold are truncated, and the remaining recipes are returned to the user as the final ranking results.

[0173] Among them, recipe relevance includes the following dimensions: the semantic recall score of the recipe, the bm25 similarity and jaccard similarity between the recipe name and the query.

[0174] Recipe quality features include the following dimensions: whether the recipe contains videos and pictures, and the number of pictures included, the completeness of the recipe information (determined by the number of valid label types of the recipe, for example, if recipe A has six labels such as "recipe description", "cooking time", "cooking difficulty", "equipment", "ingredients", and "nutritional map" displayed to the user, the value of the information completeness feature is 6), the length of the recipe description text, and the operation level of the recipe.

[0175] Recipe popularity includes the following dimensions: recipe search volume, page views, likes, collections, and comments.

[0176] Offline stage: Use the domain-fine-tuned Qwen-7b model to generate 5-level (0, 1, 2, 3, 4) scores for these recipes as the model learning target to save the cost of manual labeling.

[0177] The prompts used for scoring are as follows:

[0178] “You are a Rerank module for recipe search. When a user searches for a Query, please rank the following recipes.

[0179] Scoring is based on the following rules:

[0180] 4. Perfect: This dish is the most suitable entry under the current query. The recipe name needs to be accurate, or it must be the only dish name that meets the user's request, such as boiling pork slices.

[0181] 3. Excellent: The dish name basically meets the user's query, is the mainstream dish under the current query, or meets the user's requirements for the main ingredients, or the ingredients and taste meet the requirements.

[0182] 2. General: The main ingredients of the recipe are the same as the user's request, but the taste is inconsistent with the user's query; the recipe method, taste and query are exactly the same, only the ingredients are changed.

[0183] 1. Acceptable: Materials or practices similar to those requested by the user.

[0184] 0. Irrelevant: The result has nothing to do with the user’s request, including cooking methods, ingredients, and flavors.

[0185] Please first guess which ingredients may be used in this query, and then sort the recipes by relevance. The results are returned in the following format, with the top of the list having higher relevance. Please output in standard json format, the result format example:

[0186] {"query":xxxx,"ingredients":[xx,xx,xx],

[0187] "Recipe":[{"id":recipe id,"name":recipe name,"score":integer from 0 to 4,"reason":the reason you gave for the score}]}"

[0188] Based on the above features and Qwen-7B model scoring, the XGBoost model is trained.

[0189] Online stage: Calculate three types of features, including the relevance of the search term to the candidate recipes, the quality of the recipes, and the popularity of the recipes. Based on these features, use the XGBoost model to predict and generate a comprehensive score for each recipe. Set a score threshold, cut off recipes below this threshold, and return the filtered and sorted high-scoring recipes as the final result to the user.

[0190] The throughput of the search system is usually very high, and all work from query understanding, recall, and sorting needs to be completed within 100 milliseconds. Using the xgboost tree model, sorting can be completed within a few milliseconds.

[0191] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a recipe search device based on a large model is given below. Figure 6 , Figure 6 A functional module diagram of a recipe search device 140 based on a large model provided in an embodiment of the present invention. The recipe search device 140 based on a large model can be applied to Figure 7 The electronic device 11 is shown. It should be noted that the basic principle and technical effect of the recipe search device 140 based on the big model provided in this embodiment are the same as those of the above method embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above method embodiment. The recipe search device 140 based on the big model includes an information acquisition module 141 and an information processing module 142.

[0192] The information obtaining module 141 is used to receive a recipe search request, wherein the recipe search request includes recipe information to be searched.

[0193] The information processing module 142 is used to perform error correction, rewriting and intent recognition processing on the recipe information to be searched in sequence based on the recipe search model to obtain a processing result that matches the set label information; prompt words are constructed in the recipe search model, and the prompt words indicate the definitions and processing rules corresponding to error correction, rewriting and intent recognition, respectively, and various types of label information of recipe resources are defined; based on the processing result, recipe search results that match the recipe search request are found.

[0194] Based on the above, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the above-mentioned recipe search method based on the big model.

[0195] The above-mentioned solution in the embodiment of the present invention effectively improves key problems in the recipe search process, such as insufficient understanding of user intentions, improper handling of erroneous inputs, and weak ability to understand complex problems.

[0196] By introducing large-scale language models and natural language processing technology, the ability to understand user intent has been significantly improved, and the complex intent in user queries can be accurately identified and parsed, such as automatically identifying the priority of different intents in user queries. This improvement not only improves the ability to handle fuzzy and multiple intents, but also better matches users' specific needs and preferences.

[0197] The ability to handle incorrect input has been significantly enhanced by using intelligent error correction and semantic analysis technology. By automatically detecting and correcting spelling errors, it can understand abbreviations and acronyms and effectively handle word deformation. This capability not only improves the tolerance for incorrect input, but also optimizes the accuracy of search results and user experience.

[0198] By analyzing user query intentions and establishing a resource-side labeling system, we can comprehensively analyze users' multi-dimensional needs, recall resources that meet user requirements, and sort the recalled resources based on the strength of user intentions, thereby providing more accurate search results that meet users' actual needs, solving the limitations of traditional search solutions in understanding complex problems.

[0199] See also Figure 7 , is a structural block diagram of an electronic device 11 for executing a recipe search method based on a large model provided in an embodiment of the present invention. The components, their connections and relationships, and their functions shown in this embodiment are merely examples and are not intended to limit the implementation of the embodiments of the present invention described and / or required in this embodiment.

[0200] like Figure 7 As shown, the electronic device 11 includes a controller 111 and a memory. There is at least one controller 111, and the memory is such as a read-only memory (ROM112), a random access memory (RAM113), etc. Among them, the memory stores computer executable instructions that can be executed by at least one controller 111, and the controller 111 can perform various appropriate actions and processes according to the computer executable instructions stored in the read-only memory (ROM112) or the computer executable instructions loaded from the storage unit to the random access memory (RAM113). In RAM113, various programs and data required for the operation of the electronic device 11 can also be stored. The controller 111, ROM112 and RAM113 are connected to each other via a bus 114. The input / output interface (I / O interface 115) is also connected to the bus 114.

[0201] Multiple components in the electronic device 11 are connected to the I / O interface 115, including: an input unit 116, such as a keyboard, a mouse, a touch screen, etc.; an output unit 117, such as various types of displays, speaker components, etc.; a storage unit 118, such as a disk, an optical disk, etc.; and a communication unit 119, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 119 allows the electronic device 11 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks. The controller 111 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the controller 111 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The controller 111 performs the various methods and processes described above, such as a recipe making method based on cooking audio.

[0202] In some embodiments, the recipe making method based on cooking audio can be implemented as computer executable instructions, which are tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer executable instructions can be loaded and / or installed on the electronic device 11 via ROM112 and / or communication unit 119. When the computer executable instructions are loaded into RAM113 and executed by the controller 111, one or more steps of the recipe making method based on cooking audio described above can be performed. Alternatively, in other embodiments, the controller 111 can be configured to execute the recipe making method based on cooking audio in any other appropriate manner (for example, by means of firmware).

[0203] Various implementations of the systems and techniques described above can be realized in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof.

[0204] These various embodiments may include being implemented in one or more computer programs that are executable and / or interpretable on a programmable system that includes at least one programmable processor. The programmable processor may be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0205] The computer executable instructions for implementing the method of the embodiment of the present invention can be written in any combination of one or more programming languages. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the computer executable instructions, when executed by the processor, implement the functions / operations specified in the flow chart and / or block diagram. The computer executable instructions can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0206] In the context of embodiments of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device.

[0207] Computer readable storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of computer readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0208] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in the embodiments of the present invention can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions of the embodiments of the present invention can be achieved, and this document does not limit this.

[0209] The above specific implementations do not constitute a limitation on the protection scope of the embodiments of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A recipe search method based on a large model, characterized in that: include: receiving a recipe search request, wherein the recipe search request includes recipe information to be searched; Based on the recipe search model, the recipe information to be searched is processed in sequence with error correction, rewriting and intention recognition to obtain a processing result that matches the set tag information; prompt words are constructed in the recipe search model, and the prompt words indicate definitions and processing rules corresponding to error correction, rewriting and intention recognition, respectively, and define various tag information of recipe resources; A recipe search result matching the recipe search request is found based on the processing result.

2. The recipe search method based on a large model according to claim 1, characterized in that: The recipe search model is based on which error correction, rewriting and intention recognition processing are sequentially performed on the recipe information to be searched, and a processing result matching the set tag information is obtained, including: Inputting the recipe information to be searched into the recipe search model; Checking and correcting spelling and grammatical errors in the recipe information to be searched based on the recipe search model, and completing incomplete and abbreviated contents in the recipe information to be searched based on the set tag information to obtain complete recipe information to be searched; rewriting the complete recipe information to be searched into synonymous expressions to obtain a plurality of rewriting results composed of short words; Based on the recipe information to be searched and each of the rewriting results, identifying the information that the user wants to obtain and the operation to be performed, and obtaining keywords representing the user's intention; The complete recipe information to be searched, the rewriting results and the keywords are taken as processing results and output in a set format.

3. The recipe search method based on a large model according to claim 1, characterized in that: The step of searching for a recipe search result matching the recipe search request based on the processing result includes: constructing a plurality of recipe recall paths based on the processing results, each of the recipe recall paths corresponding to a different search rule; Based on each of the recipe recall paths, recipe search is performed in combination with the set tag information to obtain a plurality of candidate recipes; sorting the candidate recipes according to set rules; Recipe search results matching the recipe search request are screened out from the sorted candidate recipes.

4. The recipe search method based on a large model according to claim 3, characterized in that: The plurality of recipe recall paths include a text recall path and a semantic recall path, the text recall path and the semantic recall path each include a plurality of sub-recall paths, each of the sub-recall paths includes at least one of a recipe name, an ingredient, and a label; The recipe search is performed based on each of the recipe recall paths in combination with the set tag information to obtain a plurality of candidate recipes, including: Based on each of the sub-recall paths in the text recall path and the semantic recall path, and in combination with the set tag information, respectively perform recipe searches to obtain initial results; Merging, truncating, and removing duplicates of the initial results to obtain multiple candidate recipes; Among them, the text recall path performs text recall based on the BM25 algorithm; the semantic recall path performs semantic recall based on the BEG model.

5. The recipe search method based on a large model according to claim 3, characterized in that: The step of sorting the candidate recipes according to the set rules includes: Based on the relevance of the recipe information to be searched and each of the candidate recipes, the quality of each of the candidate recipes, the popularity of each of the candidate recipes, and the user's historical selection, comprehensively scoring and ranking each of the candidate recipes; The step of screening out recipe search results matching the recipe search request from the sorted candidate recipes includes: The candidate recipes with scores lower than a preset threshold are cut off from the sorted candidate recipes, and the remaining sorted candidate recipes are used as recipe search results matching the recipe search request.

6. The recipe search method based on a large model according to any one of claims 1 to 5, characterized in that: The recipe search model is obtained by training the original pre-trained model, wherein a bypass is added to the feedforward neural network layer of the transformer module of the original pre-trained model, and the feedforward neural network layer is decomposed into two low-rank matrix multiplications by matrix decomposition.

7. The recipe search method based on a large model according to claim 1, characterized in that: The set label information includes recipe type, taste, cooking method, nutritional elements, applicable scenarios, applicable solar terms or festivals, recipe efficacy, and health labels; Among them, each of the label information is obtained by mining recipe labels using the Qwen-7B model trained in the cooking field.

8. A recipe search device based on a large model, characterized in that: include: An information acquisition module, used for receiving a recipe search request, wherein the recipe search request includes recipe information to be searched; An information processing module is used to perform error correction, rewriting and intent recognition processing on the recipe information to be searched in sequence based on a recipe search model to obtain a processing result that matches the set label information; prompt words are constructed in the recipe search model, and the prompt words indicate definitions and processing rules corresponding to error correction, rewriting and intent recognition, respectively, and various types of label information of recipe resources are defined; based on the processing result, recipe search results that match the recipe search request are found.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the recipe search method based on a large model as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the recipe search method based on a large model as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Dish analysis method and device based on multi-modal knowledge graph, equipment and medium

    CN120144810A

  • Dish Analysis Method, Device, Equipment, and Medium Based on Multimodal Knowledge Graph

    CN120144810B