Information retrieval method and device, equipment, medium and program product
By screening similar user groups in the health and wellness intelligent agent and performing group augmentation representation, the problems of insufficient personalized matching and scarce user data in the existing system are solved, resulting in more accurate recipe search results and improved user satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-24
AI Technical Summary
Existing health and wellness intelligent recipe retrieval systems fail to effectively consider individual user differences, resulting in retrieval results that do not match the health and wellness needs and dietary preferences of different users, and making it difficult to build accurate user interest models when user data is scarce.
By acquiring the profile information of target users, user subgroups with similarity greater than a threshold are selected. Multi-head attention mechanism is used to weight and fuse the group profiles to generate group enhanced representations. Relevance scores are calculated by combining candidate information features and then re-ranked to generate personalized search results.
It improves the personalization matching accuracy and result accuracy of information retrieval, ensuring that the retrieval results reflect both individual characteristics and include group verification, thus meeting users' personalized needs.
Smart Images

Figure CN121722982A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology software systems, and in particular to information retrieval methods, devices, equipment, media, and program products. Background Technology
[0002] With the aging population and rising incidence of chronic diseases, the demand for precision nutrition in the health and wellness sector is becoming increasingly urgent. Users (such as the elderly, patients with chronic diseases, and those recovering from surgery) need to achieve health management through scientific diets, and health and wellness intelligent agents (such as health and wellness diet consultation systems and intelligent recipe recommendation tools) serve as the core module for dietary guidance. The degree of personalization in their recipe retrieval directly affects user satisfaction and health and wellness outcomes.
[0003] Currently, most health and wellness smart agent recipe retrieval systems employ general ranking strategies, returning a fixed list of documents for the same query (such as breakfast recipes suitable for diabetic patients), without considering individual user differences. For example, among diabetic patients, younger users may prefer recipes that are easy to use, while older users are more concerned with the tenderness and chewability of ingredients, resulting in search results that fail to match the health and wellness needs and dietary preferences of different users. Furthermore, existing solutions often rely on extracting features (such as ingredient preferences and cooking method preferences) from users' text search history, but user interaction data in health and wellness scenarios often suffers from sparsity issues. New users lack historical data, and the historical data of older users becomes invalid due to changes in dietary needs, making it difficult to build an accurate user interest model based solely on personal history.
[0004] Therefore, existing information retrieval technologies for health and wellness intelligent systems suffer from low personalization matching accuracy and inaccurate information retrieval results. Summary of the Invention
[0005] This application provides an information retrieval method, apparatus, device, medium, and program product to improve the personalization matching accuracy and the accuracy of information retrieval results.
[0006] Firstly, this application provides an information retrieval method, comprising: acquiring an information query vector and target user profile information, wherein the information query vector is used to characterize the target user's current information retrieval needs, and the target user profile information includes user profile vectors related to health and wellness attributes of the target user; based on the target user profile information, selecting K users from a user set whose similarity is greater than a first threshold to obtain a first user subgroup, and based on the information query vector, selecting K users from the user set whose similarity is greater than a second threshold to obtain a second user subgroup, where K is a positive integer; performing weighted fusion based on the target user profile information and the profile vectors of users in the first user subgroup to obtain a first group enhancement vector, and performing weighted fusion based on the information query vector and the profile vectors of users in the second user subgroup to obtain a second group enhancement vector; calculating the relevance score of each candidate information according to the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list; and reordering all candidate information according to the relevance scores of all candidate information in the candidate information list to generate information retrieval results corresponding to the target user.
[0007] The technical solution provided in this application offers at least the following benefits: By dynamically selecting two key reference groups from the user set based on target user profile information and information query vectors, including user groups with similar long-term interests to the target user and user groups with similar current query intent, the user data used for information retrieval becomes more comprehensive. Then, by weighted fusion of the profile vectors of users in the two user subgroups to obtain a group enhancement vector, common preference patterns are extracted from similar user behaviors. This allows the target user to obtain accurate interest representations through group behavior patterns even if their own data is insufficient, improving the reliability of user interest modeling. Furthermore, relevance scores are calculated and re-ranked based on the group enhancement vector and candidate information features, ensuring that the retrieval results reflect both individual characteristics and include group validation, making the final information retrieval results more reliable and meeting personalized needs. Thus, the personalized matching accuracy and the accuracy of information retrieval results are improved.
[0008] One possible implementation is that the aforementioned target user profile information includes at least a long-term static user profile vector, which is used to represent the target user's dietary preferences and health needs over a preset historical period that are unrelated to the current information query. The process of selecting K users with a similarity greater than a first threshold from the user set based on the target user profile information to obtain a first user subgroup includes: calculating the cosine similarity between the target user profile information and the long-term static user profile vectors of other users in the user set; and selecting K users from the user set whose cosine similarity is greater than the first threshold to obtain the first user subgroup.
[0009] Another possible implementation is that the aforementioned target user profile information also includes: a long-term dynamic user profile vector, a short-term static user profile vector, and a short-term dynamic user profile vector; wherein, the long-term dynamic user profile vector is used to represent the target user's dietary preferences and health needs related to the current information query and within a preset historical time period; the short-term static user profile vector is used to represent the target user's dynamic dietary intentions in the current retrieval session that are unrelated to the current information query, and the current retrieval session is the ongoing and incomplete session in which the user currently initiates the information query; the short-term dynamic user profile vector is used to represent the target user's dynamic dietary intentions in the current retrieval session that are related to the current information query.
[0010] Another possible implementation, the above method further includes: dividing the target user's information retrieval history into multiple historical sessions, each historical session containing a query sequence and corresponding interaction information; using an intra-session recurrent neural network to process the query sequence and corresponding interaction information in each historical session sequentially to obtain a session representation vector for each historical session, thus obtaining a sequence of historical session representation vectors; using an inter-session recurrent neural network to process the sequence of historical session representation vectors and output a sequence of user long-term interest vectors, where each vector in the sequence corresponds to the user state at the end of a historical session; using the last hidden state vector in the sequence of user long-term interest vectors as a long-term static user profile vector; and performing query-aware attention weighted fusion of the sequence of user long-term interest vectors based on the information query vector, and using the fused vector as a long-term dynamic user profile vector.
[0011] Another possible implementation method includes: using an intra-session recurrent neural network to process the query and interaction information sequence generated in the current retrieval session and before the current information query to obtain a hidden state vector sequence; using the last hidden state vector in the hidden state vector sequence as a short-term static user profile vector; performing query-aware attention weighted fusion on the hidden state vector sequence based on the information query vector, and using the fused vector as a short-term dynamic user profile vector.
[0012] Another possible implementation involves weighted fusion of the target user profile information and the profile vectors of users in the first user subgroup to obtain a first group enhancement vector, and weighted fusion of the information query vector and the profile vectors of users in the second user subgroup to obtain a second group enhancement vector. This includes: using the target user profile information as the attention query and the profile vectors of users in the first user subgroup as the key and value, performing a first multi-head attention weighted fusion to obtain the first group enhancement vector; and using the information query vector as the attention query and the profile vectors of users in the second user subgroup as the key and value, performing a second multi-head attention weighted fusion to obtain the second group enhancement vector.
[0013] Another possible implementation involves calculating the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list. This includes: calculating the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, the information feature vector of each candidate information, and the first information; wherein the first information includes at least one of the following: the query-information relevance feature of each candidate information with the information query vector, and the user-information interaction feature of each candidate information with the target user's historical information retrieval records; the user-information interaction feature includes at least one of the following: the total number of historical clicks by the target user on each candidate information; the number of clicks by the target user on each candidate information under the information query vector; and the click entropy of the information query vector.
[0014] Secondly, this application provides an information retrieval device, comprising: an acquisition module and a processing module; the acquisition module is configured to acquire an information query vector and target user profile information, wherein the information query vector is used to characterize the current information retrieval needs of the target user, and the target user profile information includes user profile vectors related to health and wellness attributes of the target user; the acquisition module is further configured to, based on the target user profile information, select K users from the user set whose similarity is greater than a first threshold to obtain a first user subgroup, and based on the information query vector, select K users from the user set whose similarity is greater than a second threshold to obtain a second user subgroup, where K is a positive integer; the processing module is configured to perform weighted fusion based on the target user profile information and the profile vectors of users in the first user subgroup to obtain a first group enhancement vector, and perform weighted fusion based on the information query vector and the profile vectors of users in the second user subgroup to obtain a second group enhancement vector; the processing module is further configured to, based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list, calculate the relevance score of each candidate information; the processing module is further configured to, based on the relevance scores of all candidate information in the candidate information list, reorder all candidate information to generate information retrieval results corresponding to the target user.
[0015] One possible implementation is that the target user profile information includes at least a long-term static user profile vector, which is used to represent the target user's dietary preferences and health needs over a preset historical period that are unrelated to the current information query; the acquisition module is specifically used to: calculate the cosine similarity between the target user profile information and the long-term static user profile vectors of other users in the user set; and select K users from the user set whose cosine similarity is greater than a first threshold to obtain a first user subgroup.
[0016] Another possible implementation is that the aforementioned target user profile information also includes: a long-term dynamic user profile vector, a short-term static user profile vector, and a short-term dynamic user profile vector; wherein, the long-term dynamic user profile vector is used to represent the target user's dietary preferences and health needs related to the current information query and within a preset historical time period; the short-term static user profile vector is used to represent the target user's dynamic dietary intentions in the current retrieval session that are unrelated to the current information query, and the current retrieval session is the ongoing and incomplete session in which the user currently initiates the information query; the short-term dynamic user profile vector is used to represent the target user's dynamic dietary intentions in the current retrieval session that are related to the current information query.
[0017] In another possible implementation, the aforementioned processing module is further configured to: divide the target user's information retrieval history into multiple historical sessions, each historical session containing a query sequence and corresponding interaction information; employ an intra-session recurrent neural network to process the query sequence and corresponding interaction information in each historical session sequentially, obtaining a session representation vector for each historical session, thus obtaining a sequence of historical session representation vectors; employ an inter-session recurrent neural network to process the sequence of historical session representation vectors, outputting a sequence of user long-term interest vectors, where each vector in the sequence corresponds to a user state at the end of a historical session; use the last hidden state vector in the sequence of user long-term interest vectors as a long-term static user profile vector; and perform query-aware attention weighted fusion of the sequence of user long-term interest vectors based on the information query vector, using the fused vector as a long-term dynamic user profile vector.
[0018] Another possible implementation is that the above processing module is also used to: use an intra-session recurrent neural network to process the query and interaction information sequence generated in the current retrieval session and before the current information query to obtain a hidden state vector sequence; use the last hidden state vector in the hidden state vector sequence as a short-term static user profile vector; perform query-aware attention weighted fusion on the hidden state vector sequence based on the information query vector, and use the fused vector as a short-term dynamic user profile vector.
[0019] Another possible implementation is that the above processing module is specifically used to: use the target user profile information as the attention query, and use the profile vectors of users in the first user subgroup as the key and value to perform a first multi-head attention weighted fusion to obtain a first group enhancement vector; use the information query vector as the attention query, and use the profile vectors of users in the second user subgroup as the key and value to perform a second multi-head attention weighted fusion to obtain a second group enhancement vector.
[0020] Another possible implementation is that the above processing module is specifically used to: calculate the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, the information feature vector of each candidate information, and the first information; wherein, the first information includes at least one of the following: the query-information relevance feature of each candidate information with the information query vector, and the user-information interaction feature of each candidate information with the target user's historical information retrieval records; the user-information interaction feature includes at least one of the following: the total number of historical clicks by the target user on each candidate information; the number of clicks by the target user on each candidate information under the information query vector; and the click entropy of the information query vector.
[0021] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory storing processor-executable instructions; when the processor is configured to execute the instructions, causing the electronic device to implement the method of the first aspect described above.
[0022] Fourthly, this application provides a computer-readable storage medium comprising: computer software instructions; which, when executed in an electronic device, cause the electronic device to implement the method described in the first aspect.
[0023] Fifthly, this application provides a computer program product comprising a computer program; when the computer program is run in an electronic device, the electronic device performs the method described in the first aspect.
[0024] The beneficial effects of the second to fifth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0025] Figure 1 This is a schematic diagram illustrating the application environment of an information retrieval method provided in an embodiment of this application; Figure 2 A flowchart illustrating an information retrieval method provided in an embodiment of this application; Figure 3 A flowchart illustrating another information retrieval method provided in this application embodiment; Figure 4 A flowchart illustrating the overall implementation process of an information retrieval method provided in this application embodiment; Figure 5 This application provides a schematic diagram of the architecture of an information retrieval system. Figure 6 This is a schematic diagram illustrating the composition of an information retrieval device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The information retrieval methods, apparatus, equipment, media, and program products provided in this application will now be described in detail with reference to the accompanying drawings.
[0027] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0028] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0029] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0030] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0031] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0032] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0033] This application provides an information retrieval method, apparatus, device, medium, and program product that can be applied to personalized recommendation and information retrieval scenarios to improve the personalization, accuracy, and user satisfaction of information retrieval results. For example, it can be used in health and wellness intelligent service scenarios, such as health and wellness dietary consultation systems, intelligent recipe recommendation tools, and health management platforms, to provide safe and personalized recipe retrieval and recommendation services by accurately understanding the health needs and dietary preferences of specific groups such as the elderly and patients with chronic diseases. Furthermore, this application is also applicable to e-commerce, content distribution, news recommendation, and other scenarios, providing all users with retrieval results that better match their implicit preferences by utilizing the behavioral patterns of similar user groups.
[0034] Personalized recipe retrieval models for health and wellness scenarios need to accurately match users' health and wellness needs (such as dietary restrictions for diseases and nutritional goals) and dietary preferences (such as the tenderness of ingredients and ease of cooking). They should then customize the ranking of candidate recipes, placing recipes that better align with the user's current query intent (such as a low-fat breakfast for diabetic patients) and health and wellness goals at the top. Most existing personalized recipe retrieval models only extract features from the target user (such as personal search history and click records). They typically model user interests directly using word-level matching (such as keywords like "low-GI ingredients") and shallow semantic associations (such as post-operative recipes corresponding to high protein). Furthermore, they fail to consider the core pain point of sparse user data in health and wellness scenarios (new users have no history, and data becomes invalid due to changes in the needs of older users), making it difficult to build a comprehensive interest model. This solution proposes a group-enhanced personalized recipe retrieval framework based on a novel perspective of group user semantic representation. By capturing the deep semantic similarity between user health attributes (disease type, severity) and recipe attributes (nutritional components, cooking methods), it dynamically matches similar user groups and integrates group interest features to supplement the lack of individual data, thereby achieving more accurate personalized recipe retrieval and solving the adaptability and accuracy problems of existing models in health scenarios.
[0035] The embodiments of this application can be applied to real-world information retrieval scenarios, and their models are easy to implement: the HRNN architecture used in the basic model is a relatively mature technology that can be implemented through existing deep learning frameworks. The design for constructing user groups is based on reasonable logic and existing technical means, and can effectively obtain information about group users; furthermore, the optimization objectives and parameter settings are reasonable: the optimization objective adopts ranking loss, and the model can be trained and converged efficiently.
[0036] Currently, with the increasing aging population and rising incidence of chronic diseases (such as diabetes and hypertension), the demand for "precision nutrition" in the health and wellness field is becoming increasingly urgent. Users (such as the elderly, patients with chronic diseases, and those recovering from surgery) need to achieve health management through scientific diet, and health and wellness intelligent agents (such as health and wellness diet consultation systems and intelligent recipe recommendation tools) serve as the core module of dietary guidance. The degree of personalization of their recipe retrieval directly affects user satisfaction and health and wellness outcomes.
[0037] Currently, most recipe retrieval solutions for health and wellness intelligent systems employ general ranking strategies, returning a fixed list of documents for the same query (such as "breakfast recipes suitable for diabetic patients") without considering individual user differences. Even within the same target population, younger users may prefer recipes that are easy to use, while older users may prioritize the tenderness of ingredients. This results in search results that fail to match the health and wellness needs and dietary preferences of different users. Furthermore, most recipe retrieval solutions rely on extracting features from users' search history (such as ingredient preferences and cooking method preferences). However, user interaction data in health and wellness scenarios often suffers from "sparseness": new users lack historical data support, and older users' historical data becomes invalid due to changes in dietary needs (such as shifting from "high-protein diets" to "easily digestible diets" after surgery). Relying solely on personal history makes it difficult to build accurate user interest models and provide effective search assistance for users with scarce data.
[0038] The current recipe search function of the health and wellness intelligent system faces the following key limitations: Insufficient personalized matching: Existing recipe retrieval systems mostly use common sorting strategies, returning a fixed list of documents for the same query (such as "breakfast recipes suitable for diabetic patients"), without considering individual user differences. For example, among diabetic patients, younger users may prefer recipes that are easy to use, while older users are more concerned about the tenderness and chewability of ingredients, resulting in search results that fail to match the health and dietary needs and preferences of different users.
[0039] User data is scarce: Most recipe retrieval solutions rely on extracting features from users' text search history (such as ingredient preferences and cooking method preferences), but user interaction data in the health and wellness scenario often suffers from "sparseness" - new users have no historical data, and old users' historical data becomes invalid due to changes in dietary needs (such as switching from "high-protein diet" to "easy-to-digest diet" after surgery). It is difficult to build an accurate user interest model based solely on personal history.
[0040] In summary, existing recipe retrieval technologies for health and wellness intelligent systems are insufficient in terms of personalized matching and user data scarcity, making it difficult to meet users' personalized recipe retrieval needs. There is an urgent need for a personalized recipe retrieval method that takes into account both individual user differences and group commonalities, thereby improving the practicality and security of retrieval results.
[0041] Existing recipe retrieval technology for health and wellness intelligent systems still has significant shortcomings in addressing the issues of "insufficient personalized matching" and "scarcity of user data": 1. Existing recipe retrieval systems mostly adopt common search and sorting strategies, returning a fixed list of documents for the same query (such as "breakfast recipes suitable for diabetic patients"), without considering individual differences among users.
[0042] 2. Existing solutions rely on features extracted from users' text search history, but do not consider the "sparseness" problem that user interaction data often exists in the health and wellness scenario. It is difficult to build an accurate user interest model based solely on personal history, and cannot provide accurate recipe search assistance for users with scarce data.
[0043] Thus, existing information retrieval technologies for health and wellness smart systems (such as recipes) suffer from low personalization matching accuracy and inaccurate information retrieval results.
[0044] To address the aforementioned technical issues, this application provides an information retrieval method, apparatus, device, medium, and program product. By capturing the semantic similarity between users and recipes to segment similar groups, mining deep-seated demand connections, and integrating group information to optimize user interest modeling, the personalization and accuracy of health and wellness intelligent recipe retrieval are improved. Specifically, by filtering users based on long-term static user profile vectors and query vectors to form a first user subgroup and a second user subgroup, the retrieval strategy shifts from query-oriented to user- and query-oriented, enabling matching with corresponding similar user groups based on the user's long-term stable health profile. Furthermore, by using long-term static user profile vectors and query vectors as queries, multi-head attention weighted fusion is performed on the group profile vectors to obtain group-enhanced representations, which can accurately extract the collective interest preferences most relevant to the target user's current needs from similar groups. Finally, these group-enhanced representations are integrated when calculating recipe scores, ensuring that the retrieval results deeply match the user's individual health and wellness status (such as disease type and severity) and real-time dietary preferences, thereby improving the personalization of the retrieval results and user satisfaction. This solution incorporates group-enhanced representations into recipe relevance decisions. By referencing the interest characteristics of other user groups with similar health and wellness needs, it identifies and prioritizes recipes widely accepted by similar groups based on collective behavioral patterns, while potentially filtering out recipes that, although matching query keywords, may pose health risks. This results in higher personalized matching accuracy and more precise interest modeling.
[0045] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0046] The information retrieval method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown. For example... Figure 1As shown, the application environment includes an information retrieval device 101 and a front-end device 102. The information retrieval device 101 and the front-end device 102 are interconnected.
[0047] In some embodiments, the information retrieval device 101 may be a server cluster consisting of multiple servers, a single server, a computer, or a processor or processing chip in a server or computer, etc. This application does not limit the specific device form of the information retrieval device 101. Figure 1 The example shown is an information retrieval device 101 as a single server.
[0048] In some embodiments, the front-end device 102 can be a device with wireless transceiver capabilities, such as a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. This application embodiment does not limit the specific device form of the front-end device 102. Figure 1 The example shown is a mobile phone, with the front-end device 102 as the illustration.
[0049] In some embodiments, after receiving an information query request from the front-end device 102, the information retrieval device 101 obtains the vector representation of the query and the target user profile information; then, based on the user profile and query vector, it selects two user subgroups from the user set; next, it performs weighted fusion of the group user profiles through a multi-head attention mechanism to generate a group enhanced representation; finally, it calculates the relevance score by combining the candidate information features and completes the re-ranking to generate personalized search results. The front-end device 102 is responsible for displaying the search interface to the user, receiving the information query request input by the user and sending it to the information retrieval device 101, and simultaneously receiving and visualizing the personalized ranking results returned by the information retrieval device 101, and displaying the personalized ranking results.
[0050] It should be noted that the system architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0051] In some embodiments of this application, before executing each step of the information retrieval method, the information retrieval device may first formally define the personalized recipe retrieval problem to be solved by this solution. Specifically, the personalized recipe retrieval problem can be defined using mathematical formulas.
[0052] Suppose there exists a set An independent user with health and wellness needs is denoted as... The user base includes the elderly, patients with chronic diseases (such as diabetes and hypertension), and post-operative recovery groups. Each user is associated with unique health and wellness attributes (disease type and severity, dietary restrictions, nutritional goals, food preferences, etc.). When a user... In the The current moment in the health and wellness recipe search session Initiate recipe search tailored to specific health and wellness needs For example, "soft and easily digestible breakfast recipes suitable for elderly people with mild diabetes" or "low-fat, high-protein lunch recipes for postoperative recovery"; the user has corresponding search history. History can be divided into long-term history and short-term history based on the time dimension.
[0053] Long-term history: User's previous health and wellness recipe search sessions It means that, among them It is an index of the current session; it records the types of recipes the user has followed in the past, the recipe documents they have clicked, and the characteristics of the ingredients they have filtered.
[0054] Short-term history: based on the current search session This indicates that the system records queries initiated by the user and lists of recipes viewed during the current session.
[0055] Therefore, the complete search history can be represented as: Each session is defined as a sequence of queries and a list of documents corresponding to each query. For the first session... A session, whose general representation is: ,in, Representing a session The total number of queries in the m-th session.
[0056] This represents the m-th session. This represents the first query in the m-th session. This indicates the first document or information item (such as a clicked recipe) that the user interacts with in the m-th session and the first query.
[0057] user Initiated a query The non-personalized recipe search system will return an initial list of candidate recipes. ,in yes abbreviation, yes The abbreviation of .
[0058] To achieve personalized search, in the user Initiate a query The moment According to and Dynamically identify a "similar user group" with similar health and wellness needs and dietary preferences, denoted as... .
[0059] For each candidate document, this solution is based on the current query. The target user's past search history User groups related to the target users Each of these three aspects of information has its relevance score calculated separately: .
[0060] in, Document With query The correlation between them Document Search history of the target user The correlation between them Document With user groups The correlation between them. Finally, based on the comprehensive score. For the candidate document list The recipes are then reordered to obtain personalized health and wellness recipe search results.
[0061] This solution designs a group-based personalized recipe retrieval framework. This framework enhances the personalized retrieval effect for the target user under the current query by utilizing information from a group of related users. The personalized recipe retrieval model proposed in this solution mainly consists of three parts: (1) A sequence deep learning model that does not depend on the user group, used to construct users’ long-term and short-term interests; (2) The formation of the user group; (3) Integrate group information to complete personalized search.
[0062] In some embodiments, the information retrieval device may try other optimization algorithms, learning rate scheduling strategies, or hyperparameter settings.
[0063] See Figure 2This is a flowchart illustrating an information retrieval method provided in an embodiment of this application. Figure 2 As shown, the information retrieval method provided in this application can be implemented by the aforementioned information retrieval device, specifically including the following steps 201 to 205.
[0064] Step 201: The information retrieval device acquires the information query vector and target user profile information.
[0065] In some embodiments, the information query vector is used to characterize the current information retrieval needs of the target user, and the target user profile information includes the user profile vector related to the health and wellness attributes of the target user.
[0066] In some embodiments, the information retrieval described above can be information retrieval related to health and wellness attributes, such as recipe retrieval. The information query described above can be information querying related to health and wellness attributes, such as recipe querying.
[0067] In some embodiments, the aforementioned health and wellness attributes are used to characterize a set of features representing a user's individualized status and needs in health maintenance and dietary management, comprehensively describing an individual's unique profile within the context of health maintenance. Health and wellness attributes may include at least one of the following: the user's health status and disease characteristics, nutritional goals and needs, dietary restrictions and taboos, functional dietary preferences, and long-term stable dietary tendencies.
[0068] In some embodiments, the aforementioned health and wellness attributes specifically include at least one of the following: the user's disease type and severity; the user's nutritional intake goals, including the control or increase of requirements for specific nutrients; the user's dietary restrictions and allergen information; and the user's dietary preferences arising from physiological or convenience needs.
[0069] It should be noted that the health and wellness attribute is a collective term for a series of characteristics and parameters used to characterize a user's specific situation, needs, preferences and constraints in health maintenance (especially health management through diet). It abstracts and vectorizes the user's health status, physiological conditions, nutritional goals and dietary adaptability, so as to serve as the basis for matching and ranking in personalized information retrieval (especially recipe retrieval).
[0070] For example, the above-mentioned health status and disease characteristics may include: the type of chronic disease the user suffers from (e.g., diabetes, hypertension, hyperlipidemia), the stage of the disease (e.g., early stage, middle stage, recovery stage), postoperative rehabilitation status, specific physiological conditions (e.g., pregnancy, lactation, decline in chewing function in the elderly), etc.
[0071] The aforementioned nutritional goals and needs are specific nutritional management objectives derived from health conditions, such as controlling the glycemic index, limiting sodium intake, increasing protein intake, ensuring sufficient dietary fiber, and controlling total calorie or fat intake.
[0072] The above dietary restrictions and taboos refer to specific ingredients that users must avoid or limit their intake for health reasons, such as lactose intolerance, seafood allergy, need to avoid high-purine foods, and need to limit potassium or phosphorus intake (for specific kidney disease patients).
[0073] The aforementioned functional dietary preferences are dietary preferences based on a user's physical function or the convenience of daily life. For example, a preference for soft and easy-to-chew ingredients (for those with poor teeth); a preference for recipes with simple cooking steps that save time and effort (for users with limited mobility or who seek convenience); and a need for liquid or semi-liquid foods (for those with difficulty swallowing).
[0074] The aforementioned long-term stable dietary tendencies, namely long-term dietary habits closely related to health maintenance, such as: adhering to a low-salt diet, preferring a light flavor, and tending to be vegetarian or follow a specific dietary pattern (such as the Mediterranean diet).
[0075] In some embodiments, the target user profile information includes at least a long-term static user profile vector, which is used to characterize the target user's dietary preferences and health needs over a preset historical period that are unrelated to the current information query.
[0076] For example, in the context of health and wellness, user profiles need to accurately depict users' health and wellness needs (such as dietary restrictions for diseases and nutritional goals) and dietary preferences (such as the tenderness of ingredients and ease of cooking). Therefore, this method extracts core features related to "recipe interaction" from users' health and wellness recipe search history (such as clicked recipe documents, filtered ingredient types, and recipe detail pages with longer dwell times), and combines them with users' pre-filled health and wellness attributes (disease type and severity, allergic ingredients, and nutritional requirement thresholds) to construct user profiles adapted to personalized recipe search.
[0077] In some embodiments, the aforementioned long-term static user profile vector / long-term static intent This reflects the target user's long-term stable health and wellness attributes (such as "diabetes + old age") and dietary restrictions (such as "lactose intolerance").
[0078] In some embodiments, the above information query vector / query intent : Directly reflects the target user's current recipe search needs (such as core needs and characteristics such as "mild diabetes", "elderly", "breakfast", "soft and tender").
[0079] It should be noted that the method for constructing target user profile information can be found in the description of the following embodiments, and will not be repeated here.
[0080] Step 202: Based on the target user profile information, the information retrieval device selects K users from the user set whose similarity is greater than a first threshold to obtain a first user subgroup, and based on the information query vector, selects K users from the user set whose similarity is greater than a second threshold to obtain a second user subgroup.
[0081] Where K is a positive integer.
[0082] In some embodiments, in the context of health and wellness, user group construction needs to revolve around the core logic of "similar health and wellness needs correspond to similar dietary preferences". Based on the multi-dimensional interest vector of user profiles, groups with similar health and wellness attributes and dietary needs to the target users are selected to supplement effective interest features for users with sparse data, while ensuring that the group interests are highly compatible with the target users' recipe retrieval needs.
[0083] In some embodiments, long-term static user interest vectors are taken into account. (Reflecting users' long-term and stable health and wellness needs, such as diabetic patients needing a "low GI, low fat" diet for a long time, and elderly people with poor teeth having a long-term preference for "soft and mushy foods") is not affected by the fluctuations of the current query and can accurately depict users' stable dietary preferences and health and wellness attributes. Therefore, each user's long-term static user interests are stored in the database as a static representation of the user and updated regularly (the update cycle can be set according to the frequency of user interaction, such as once a month. If the user's health and wellness needs change recently (such as a change in the postoperative rehabilitation stage), an immediate update can be triggered).
[0084] In some embodiments, for a target user A health and wellness recipe search (e.g., "soft and mushy breakfast recipes for elderly people with mild diabetes"), combining the constructed user interest vector with the current query vector, extracting the long-term static "group intent" - corresponding to the target user's long-term health and wellness needs and dietary preferences, providing a basis for subsequent matching of similar groups.
[0085] In some embodiments, the target user profile information includes at least the long-term static user profile vector. For example, the step 202 above, "the information retrieval device filters K users with similarity greater than a first threshold from the user set based on the target user profile information to obtain a first user subgroup", can be specifically implemented as steps 202a and 202b.
[0086] Step 202a: The information retrieval device calculates the cosine similarity between the target user profile information and the long-term static user profile vectors of other users in the user set.
[0087] In some embodiments, for other users It already has a stored static representation, namely the long-term static user interest vector that was most recently calculated and saved. Let... This represents a similarity function used to calculate the similarity between two vectors of the same dimension. and The similarity between users is calculated using the cosine similarity function. Then, the cosine similarity function is used to calculate the similarity of static profiles trained on all users based on their search history. The information retrieval device uses "grouping intent" to represent the representation vector of the target user whose static profile is calculated to be similar to all other users.
[0088] Regarding group-oriented intent, target users Other users The similarity between them can be calculated as follows: ,in, Indicates time Initiated query The vector representation of the target user. By calculating similarity, a group of users similar to the target user can be grouped together to form a subgroup.
[0089] After that, for the target users and the current query Two user subgroups were identified. Each subgroup was extracted by sorting all other users in descending order of their corresponding similarity scores. For a fixed user... and in time Newly initiated query It can form five subgroups, each containing Similar users are formally represented as follows: ; .in, Represents the cosine similarity score The ranking.
[0090] in, Based on long-term static user profiles The first selected user subgroup; Based on information query vector / current query vector The second subgroup of users selected; : The i-th user in the user set; Sim(): Similarity function, which calculates the similarity between vectors (such as cosine similarity); (): Ranking function, ranking users from highest to lowest similarity score; K: A positive integer representing the number of similar users to be selected. The symbol | indicates "meets a certain condition", which is a constraint on the set.
[0091] In some embodiments, the information retrieval device may also employ other semantic similarity methods when calculating user profile similarity.
[0092] Step 202b: The information retrieval device selects K users from the user set whose cosine similarity is greater than the first threshold to obtain the first user subgroup.
[0093] In this way, by using long-term static user profile vectors, which represent users' stable and long-term preferences and needs, and calculating the cosine similarity between these long-term static vectors and similar vectors of other users, we can accurately find user groups with similar long-term and stable health and wellness attributes to the target users. This ensures that the constructed group is highly consistent with the target users in terms of fundamental needs, avoids noise interference caused by short-term or fluctuating interests, and thus improves the accuracy and stability of similar user group selection.
[0094] In some embodiments, the target user profile information further includes: a long-term dynamic user profile vector, a short-term static user profile vector, and a short-term dynamic user profile vector.
[0095] Among them, the aforementioned long-term dynamic user profile vector is used to represent the dietary preferences and health needs of the target user within a preset historical period, which are related to the current information query.
[0096] The aforementioned short-term static user profile vector is used to characterize the target user's dynamic dietary intentions in the current retrieval session that are unrelated to the current information query. The current retrieval session is the ongoing and incomplete session in which the user currently initiates the information query.
[0097] The aforementioned short-term dynamic user profile vector is used to characterize the target user's dynamic dietary intent related to the current information query in the current retrieval session.
[0098] Thus, a more comprehensive user interest model is constructed by using long-term dynamic user profile vectors, short-term static user profile vectors, and short-term dynamic user profile vectors. The long-term dynamic profile captures long-term interest changes related to the current query, while the short-term static and dynamic profiles respectively depict the stable and changing immediate intents in the current session. This four-dimensional profile system of long-term-short-term and static-dynamic profiles can more finely and comprehensively depict the user's comprehensive interest state at a specific moment. When this rich profile information is used to construct user groups and for subsequent fusion, it can more accurately match groups similar to the target user's current comprehensive context, thereby further optimizing the quality of group-enhanced representations and improving the immediate relevance and personalization of search results.
[0099] Step 203: The information retrieval device performs weighted fusion based on the target user profile information and the profile vectors of users in the first user subgroup to obtain the first group enhancement vector, and performs weighted fusion based on the information query vector and the profile vectors of users in the second user subgroup to obtain the second group enhancement vector.
[0100] In some embodiments, in obtaining information from the target user Searching for current health and wellness recipes After identifying two similar user subgroups (such as a soft and mushy breakfast recipe for elderly people with mild diabetes), group information and individual interests can be further integrated to achieve more accurate personalized recipe retrieval. The core is to supplement the lack of individual data by using the characteristics of group health and wellness needs to ensure that the retrieval results not only match the individual user's preferences but also meet the health and wellness safety and practicality verified by similar groups.
[0101] In some embodiments, combined with Figure 2 ,like Figure 3 As shown, step 203 above can be specifically implemented as steps 203a and 203b.
[0102] Step 203a: The information retrieval device uses the target user profile information as the attention query and uses the user profile vectors in the first user subgroup as the key and value to perform the first multi-head attention weighted fusion to obtain the first group enhancement vector.
[0103] In some embodiments, the multi-head attention mechanism is essentially an information retrieval process. Using the target user's own long-term stable characteristics as a "question outline," it retrieves and summarizes the most relevant information to the "question" from users with similar long-term interests to the target user (the first user subgroup). Specific process: Role Assignment: Query (Q): Target user profile information, specifically a long-term static user profile vector. ; Key (K) and Value (V): Both are derived from the first user subgroup. This consists of long-term static user profile vectors for all users. The keys are used to match queries and calculate weights; the values represent the specific interest information contained in these user profiles.
[0104] Specifically, similarity matching and weight calculation: [This involves] querying... With each key ( The similarity calculation, such as dot product, is performed on the vectors of users in the group to obtain an initial attention score. This score measures the similarity between the target user and each user in the group in terms of long-term fundamental interests. Multi-view refinement (the essence of "multi-head"): The above process is carried out in parallel in multiple different representation subspaces (i.e., "multi-head"). Each "head" can learn to focus on the similarity of different aspects of long-term interests (e.g., one head focuses on disease types, and another head focuses on food tenderness preferences), which allows the model to comprehensively evaluate the similarity between users from multiple dimensions. Information fusion: The calculated weights (normalized by Softmax) are applied to the corresponding values (i.e., user profile vectors), and then a weighted sum is performed. In each "head", the user whose profile vector is more similar to the target user's long-term interests has a greater contribution (weight) to the final fusion result. Output integration: The weighted sum of the outputs of all "heads" is concatenated and linearly transformed to finally generate a condensed, single vector—the first group augmented representation. .
[0105] Step 203b: The information retrieval device uses the information query vector as the attention query and the user profile vector in the second user subgroup as the key and value to perform a second multi-head attention weighted fusion to obtain the second group enhancement vector.
[0106] In some embodiments, based on a multi-head attention mechanism, the user's current specific needs are used as a "question outline," and the information most relevant to the current needs is retrieved from a group of users with similar query intent (a second user subgroup). Specific process: Role Assignment: Query (Q): Information Query Vector This raises another core question: "What do users who search for similar content ultimately like?"
[0107] Key (K) and Value (V): Both are derived from the second user subgroup. This is composed of long-term static user profile vectors for all users. There's a clever design here: although long-term profiles are used as the information source (Value), the matching object is the current query (Query), i.e., asking: "Among users who have searched for similar content, whose long-term dietary preferences are most relevant to the question I'm asking now?".
[0108] Specifically, the workflow here (i.e., the second multi-head attention weighted fusion) is the same as the first multi-head attention, including similarity matching, multi-view refinement, weighted summation, and output integration. The second multi-head attention weighted fusion calculates the current query... The similarity to the long-term profile (K) of each user in the second user subgroup is calculated. This essentially involves finding the association between the current query intent and the user's long-term stable interests; multiple heads can collaboratively interpret the association between the current query and the group's long-term interests from different perspectives. For example, for the query "diabetic dinner," one head might focus on the association between "diabetes" and the group's disease, while another head might focus on the association between "dinner" and the group's eating habits; ultimately generating an enhanced representation of the second group. .
[0109] In some embodiments, to fully utilize the aforementioned group information, a multi-head attention layer is applied to fuse the group information. Each multi-head attention layer corresponds to a different grouping intent, and all group information is weighted and fused according to this intent. Thus, the information retrieval device calculates a centralized representation of the group information. Taking a query as the grouping intent as an example, the calculation of the centralized representation corresponding to the current query is shown in Formula 1 below: Formula 1 In this way, group information is merged into two centralized representations: These two representations are fed into a multilayer perceptron (MLP) and used... As an activation function.
[0110] in, The output second group-enhanced representation is a vector that condenses the information related to the current query. The most relevant information on collective interests from two user subgroups; Att(): Represents the attention mechanism. Its function is to dynamically and selectively extract information from a batch of data and perform weighted summation according to the needs of the query. The vector representation of the current query plays the role of a query in the attention mechanism, and its function is to "ask" the group: for example, what interests are most relevant to my current query.
[0111] In some embodiments, the information retrieval device may employ other information fusion methods: when fusing group user information, other methods may be tried, such as graph-based methods or variations of attention mechanisms.
[0112] Thus, by using the target user profile or query vector as the query and the profile vector of the corresponding subgroup user as the key and value, multi-head attention fusion is performed. This efficient information fusion method can dynamically assign different weights to different user groups, highlighting the influence of similar users who are more relevant to the query and suppressing noise from irrelevant users. Secondly, the multi-head mechanism allows the model to collaboratively focus on information from different subspaces, thereby capturing the common preferences in the group more comprehensively and ultimately generating a higher-quality and more information-rich group-enhanced representation.
[0113] Step 204: The information retrieval device calculates the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list.
[0114] In some embodiments, in addition to the personalized score calculated by the model, query-recipe document relevance features and user-recipe interaction features are introduced as additional features. User-recipe interaction features include: the total historical clicks of the user on the candidate document, the number of clicks the user has on the candidate document in the current query, and the click entropy of the current query. These additional features are also input into a... In the multilayer perceptron (MLP) as an activation function.
[0115] In some embodiments, step 204 above can be specifically implemented as step 204a below.
[0116] Step 204a: The information retrieval device calculates the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, the information feature vector of each candidate information, and the first information.
[0117] In some embodiments, the first information mentioned above includes at least one of the following: query-information relevance features of each candidate information and information query vector, and user-information interaction features of each candidate information and the target user's historical information retrieval records.
[0118] In some embodiments, the above-mentioned user-information interaction features include at least one of the following: The total number of historical clicks by the target user on each candidate message; The number of clicks made by the target user on each candidate piece of information under the information query vector; Click entropy of information query vector.
[0119] In some embodiments, the information retrieval device adds together the scores calculated from the following three parts to obtain the final relevance score: query-document pairs, user history, and group information.
[0120] In some embodiments, in addition to the user's historical queries and clicked documents, other data sources, such as the user's social network information and geolocation information, can be considered to enrich the user's representation and improve the accuracy of personalized search.
[0121] In this way, query-information relevance ensures that the search results are basically relevant to the user's original request, while user-information interaction features (such as click count and click entropy) provide direct evidence of preferences from behavioral data. These effective features, combined with group enhancement vectors, constitute a multi-dimensional and complementary evaluation system that can comprehensively measure the quality of information items themselves, their matching degree with the query, their correlation with the user's personal history, and their fit with group preferences. This makes the final relevance score calculation more comprehensive and accurate, further improving the quality of the ranking results.
[0122] Step 205: The information retrieval device reorders all candidate information based on the relevance scores of all candidate information in the candidate information list and generates information retrieval results corresponding to the target user.
[0123] In some embodiments, the information retrieval device selects a basic ranking algorithm, LambdaRank, to train the entire framework. Training sample pairs are generated from the query log: documents clicked on by SAT are considered relevant samples, and other documents are considered irrelevant samples. The loss is then calculated using the representation vectors of the document pairs. For a relevant document... and an unrelated document Taking a sample pair as an example, the loss function is defined as: the cross-entropy between the expected probability and the predicted probability when the ranking positions of these two documents are swapped, versus the change in the ranking metric. The product of . The specific formula is shown in Formula 2 below: Formula 2 in, Documents representing model predictions Compared to documents More relevant probability, and This represents the true probability. The loss function is the loss function that needs to be minimized during model training. For document Compared to documents More relevant true probability (usually determined by click data, such as 1 or 0). Documents predicted by the model Compared to documents More relevant probabilities. Indicates exchanging documents and documents After determining the position, the absolute value of the change in the evaluation metric (such as NDCG) is the core of the LambdaRank algorithm. Specifically, the predicted probability is calculated using a logistic function, as shown in Formula 3 below: Formula 3 in, and These are two distinct candidate pieces of information in the candidate information list D. score(d) i ) is specifically designed for target users to select candidate information d i The calculated personalized score. score(d) j ) is specifically designed for target users to select candidate information d j The calculated personalized score.
[0124] Through the above process, group information is effectively integrated into personalized recipe retrieval, which not only solves the problem of user data sparsity in health and wellness scenarios (such as providing group-verified recipe recommendations for new users), but also avoids health risks caused by individual interest biases through the constraint of group health and wellness needs (such as preventing diabetic users from retrieving high-GI recipes), ultimately achieving a dual improvement in personalized search results and health and wellness safety.
[0125] The information retrieval method provided in this application dynamically selects two key reference groups from the user set based on target user profile information and information query vectors. These groups include user groups with similar long-term interests to the target user and user groups with similar current query intent, making the user data used for information retrieval more comprehensive. Then, by weighted fusion of the profile vectors of users in the two user subgroups, a group enhancement vector is obtained. This enables the extraction of common preference patterns from similar user behaviors, allowing the target user to obtain accurate interest representations through group behavior patterns even if their own data is insufficient, thus improving the reliability of user interest modeling. Relevance scores are then calculated and re-ranked based on the group enhancement vector and candidate information features, ensuring that the retrieval results reflect both individual characteristics and include group validation, making the final information retrieval results more reliable and meeting personalized needs. This improves the personalization matching accuracy and the overall accuracy of information retrieval results.
[0126] In some embodiments, the information retrieval method provided in this application further includes the following steps 301 to 305.
[0127] Step 301: The information retrieval device divides the target user's information retrieval history into multiple historical sessions.
[0128] In some embodiments, each of the aforementioned historical sessions includes a query sequence and corresponding interaction information.
[0129] In some embodiments, regarding the division of information retrieval history / retrieval history sessions: the information retrieval device divides the user's health and wellness recipe retrieval history into multiple independent sessions / multiple historical sessions according to the time dimension, which can be represented as: ,in This represents the index of the current session. Each session includes not only user-initiated "health and wellness needs queries" (such as "soft and tender breakfast for elderly people with mild diabetes" or "low-fat, high-protein lunch after surgery"), but also an "interactive recipe list" corresponding to each query—that is, recipe documents that the user has clicked, saved, or viewed under that query, as well as recipe filtering operations (such as excluding recipes containing "shrimp" or prioritizing recipes cooked using the "steaming" method). Then the... The formal representation of a session is: .in This indicates the total number of queries performed in this session.
[0130] Step 302: The information retrieval device uses an intra-session recurrent neural network to process the query sequence and corresponding interaction information in each historical session in sequence, so as to obtain the session representation vector of each historical session and thus obtain the historical session representation vector sequence.
[0131] In some embodiments, the representation of a single session is computed using a low-level intra-session RNN, whose input is a series of query-SAT document pairs, and whose output is the latent state vector of the session. The final session representation is taken from the last hidden state vector of this RNN. In the low-level RNN of each session, the hidden state vector at each step It is calculated based on the current input and the state vector of the previous step, as shown in Formula 4 below: Formula 4 When a user submits a query At that time, the last hidden state vector corresponding to the history part of the current session. Considered as a short-term static user profile vector / short-term interest vector of the user .
[0132] in, This represents the hidden state vector after processing the i-th query-document pair in the m-th session. This represents the hidden state vector of the previous time step (i-1) in the m-th session. This represents the i-th query vector in the m-th session. This represents the i-th document vector in the m-th session. This represents the state transition function of an Intra-session RNN.
[0133] Step 303: The information retrieval device uses an inter-session recurrent neural network to process the historical session representation vector sequence and output the user's long-term interest vector sequence.
[0134] In some embodiments, each vector in the above sequence of user long-term interest vectors corresponds to a user state at the end of a historical session.
[0135] In some embodiments, the information retrieval device employs an inter-session recurrent neural network to process the sequence of historical session representation vectors, i.e., a cross-session long-term interest modeling. Specifically, past session representations in the user's history are passed as input to a high-level inter-session recurrent neural network (RNN). This high-level RNN computes the user representation sequence at the end of each session. The specific formula is shown in Formula 5 below: Formula 5 Then, query based on input. An attention mechanism layer is applied to the hidden state vectors of a high-level RNN to generate the user's long-term interest vector / sequence of user long-term interest vectors.
[0136] The m-th vector in the sequence of user long-term interest vectors output by the aforementioned inter-session RNN This represents the comprehensive long-term interest state of the target user at the end of the m-th historical session. Specifically, Through inter-session recurrent neural networks The calculation is derived by integrating two information sources: one is the overall long-term interest state at the end of the previous session. Secondly, it is the session representation vector of the current m-th session. This recursive calculation process (i.e., formula 2 above) makes It becomes a cumulative, condensed representation of interests, which does not only reflect the isolated interests of the m-th session, but encodes the entire evolution of user interests and stable preferences from the first historical session to the m-th session.
[0137] Step 304: The information retrieval device uses the last hidden state vector in the user's long-term interest vector sequence as the long-term static user profile vector.
[0138] In some embodiments, the information retrieval device will use the user's long-term interest vector sequence, i.e. Each vector in the sequence serves as input. Each is a "snapshot" at a specific point in time (the end of the m-th historical session), encoding all the user's historical interest information from the first session to the m-th session; it's a record of the user's interests evolving with each session. Then, the last hidden state is selected. As a long-term static user profile vector, the hidden states of a recurrent neural network (RNN) possess information accumulation properties, carrying crucial information that is continuously preserved and reinforced throughout the entire sequence, undergoing a process from... arrive Throughout the entire sequence propagation process, lossless, high-concentration information compression and summarization of users' stable and persistent interests and preferences across multiple sessions are performed.
[0139] In summary, step 304 utilizes the sequence modeling characteristics of recurrent neural networks to extract the vector representation that best represents the user's stable long-term interests. This operation consolidates the user's behavioral information scattered across multiple rounds of historical conversations into a stable and reliable digital profile, providing crucial technical support for subsequent accurate discovery of similar groups and secure personalized recommendations.
[0140] Step 305: The information retrieval device performs query perception attention weighted fusion on the user's long-term interest vector sequence based on the information query vector, and uses the fused vector as the long-term dynamic user profile vector.
[0141] In some embodiments, the information retrieval device extends the calculation of short-term and long-term user interest vectors, performing them with and without a query-aware attention mechanism, respectively. A long-term user interest vector with a query-aware attention mechanism is introduced into the HRNN and defined as the long-term dynamic user profile vector / long-term dynamic user interest. The formula is shown in Formula 6 below: Formula 6 in, This represents an attention layer. Here, As a query in the attention mechanism, It serves as both the key and value in the attention mechanism. The last hidden state vector is used directly. As a long-term representation of user interests.
[0142] Furthermore, this vector is independent of the current query, thus reflecting a relatively objective long-term user interest unaffected by the current query. Based on this, further... As a long-term static user profile vector / long-term static user interest To expand the representation of long-term user interests.
[0143] In some embodiments, the information retrieval device may also use other deep learning architectures: in addition to the HRNN architecture, other deep learning architectures such as convolutional neural networks (CNN), recurrent neural networks (RNN), Transformers, or large models may be tried.
[0144] It should be noted that steps 301 to 305 above can be performed before step 201 above.
[0145] Thus, by constructing long-term user profiles using a hierarchical recurrent neural network architecture, and by dividing historical sessions and processing them sequentially using intra-session and inter-session recurrent neural networks, hierarchical interest features can be effectively extracted from the user's historical behavior sequences. Using the final state of the inter-session recurrent neural network as the long-term static profile captures the user's consistent and stable interests; while using attention-weighted fusion of historical session sequences based on the current query to generate a long-term dynamic profile allows long-term interests to be dynamically adjusted according to the current query intent. This achieves deep and accurate modeling of the user's long-term interests, providing high-quality, interpretable user representation input for the entire group enhancement scheme.
[0146] In some embodiments, the information retrieval method provided in this application further includes the following steps 401 to 403.
[0147] Step 401: The information retrieval device uses an intra-session recurrent neural network to process the query and interaction information sequence generated in the current retrieval session and before the current information query, and obtains a hidden state vector sequence.
[0148] In some embodiments, the Intra-session RNN is dedicated to processing sequential sequences of actions generated within a session. Its input is a sequence of queries and interactions generated in the current retrieval session prior to the current information query. This sequence is a timestamp-ordered sequence that includes all queries initiated by the user in the current session and the corresponding interaction information items (such as clicks or viewed recipes) for each query.
[0149] In some embodiments, the RNN processes each query-interaction pair in the sequence sequentially, and its hidden state is updated with each step of input, thereby capturing the evolution of user interests and contextual dependencies within the session.
[0150] For example, a user might first search for "foods to lower blood pressure," and then immediately search for "how to cook celery." The intent behind the second search is formed within the context of the first search. Step 401, by processing the entire sequence, allows us to understand the flow and evolution of this intent.
[0151] In some embodiments, the hidden state vector sequence This is the sole and direct data source for constructing short-term static and dynamic user profiles in subsequent steps. Each hidden state is a vectorized summary of the session context up to the current moment.
[0152] Step 402: The information retrieval device uses the last hidden state vector in the hidden state vector sequence as the short-term static user profile vector.
[0153] In some embodiments, the information retrieval device uses the short-term user interests calculated in the HRNN model as the short-term static user profile vector / short-term static user interests. Its value is equal to the hidden state vector of the low-level RNN in the current session at the previous time step. .
[0154] Step 403: The information retrieval device performs query perception attention weighted fusion on the hidden state vector sequence based on the information query vector, and uses the fused vector as the short-term dynamic user profile vector.
[0155] In some embodiments, the query-aware attention mechanism used in the high-level RNN of the HRNN model has been shown to dynamically highlight different sessions in a user's historical search behavior. Introducing a query-aware attention mechanism into the low-level RNN of the current session can similarly assign appropriate weights to each query in that session, thereby avoiding unnecessary noise interference. Therefore, a query-aware attention layer is applied to the hidden state vector of the current session to compute the short-term dynamic user profile vector / short-term dynamic user interests. The specific calculation is shown in Formula 7 below: Formula 7 As before, In this attention layer, it is used as a query, and It can be used as both a key and a value. This represents a short-term dynamic user profile vector. Att() represents the attention function. This represents the time from the start of the current query to the current query within the current session (the Mth session). The sequence of all previous hidden state vectors. This sequence serves as both the key and value in the attention mechanism.
[0156] In some embodiments, the information retrieval device integrates multi-dimensional interest vectors, that is, combines the demand characteristics of health and wellness scenarios to ultimately construct a four-dimensional user interest vector containing two dimensions: "long-term-short-term" and "static-dynamic," comprehensively depicting the user's health and wellness dietary needs and preferences. Long-term static user profile vector ; Long-term dynamic user profile vector ; Short-term static user profile vector ; Short-term dynamic user profile vector .
[0157] These four sets of vectors can serve as the core inputs for subsequent "similar group matching" and "recipe relevance scoring," providing accurate user interest basis for personalized recipe retrieval in the health and wellness scenario.
[0158] It should be noted that steps 401 to 403 above can be performed before step 201 above.
[0159] Thus, by processing the historical sequence of the current incomplete session prior to the current query, and taking the final state of the recurrent neural network as the short-term static profile and the query-based attention-weighted fusion result as the short-term dynamic profile, the user's intent in the current search context can be accurately captured. The short-term static profile reflects the overall tendency of the current session, while the short-term dynamic profile focuses on recent behaviors most relevant to the current query, effectively modeling the evolution of the user's immediate interests and search intent. This allows for rapid response to changes in user needs and improves the retrieval experience within the session.
[0160] The information retrieval method of this application embodiment is described below with reference to a specific example, such as... Figure 4 The diagram shows a flowchart of the overall implementation process of an information retrieval method provided in this application embodiment. The specific process is as follows: S1 to S7: S1. Information retrieval device constructs and updates long-term user profiles: The user's historical recipe retrieval records are divided into multiple sessions and processed using a hierarchical recurrent neural network. Specifically, this includes: using an intra-session RNN to process a single session to obtain a session representation, then using an inter-session RNN to model across sessions, and finally taking the last hidden state as the long-term static user profile vector. Based on the current query, attention weights are applied to the historical sessions to generate a long-term dynamic user profile vector.
[0161] It should be noted that S1 typically runs periodically in the background or is triggered after user history data is updated. By performing deep sequence modeling on user history, a comprehensive and accurate long-term interest profile is constructed, which is the cornerstone of the entire personalized retrieval system.
[0162] S2. Information retrieval device constructs and updates short-term user profiles: Use an in-session RNN to process all query and interaction sequences generated in the current session before the current query to obtain a hidden state sequence. Take the last hidden state of the sequence as a short-term static user profile vector, and apply attention weighting to the sequence based on the current query to generate a short-term dynamic user profile vector.
[0163] It should be noted that S2 is performed in real time after a user starts a new search session. This provides the system with the user's immediate interest context, complementing the long-term profile and enabling the system to quickly respond to changes in the user's interests within the current session, achieving more refined dynamic personalization.
[0164] S3. The information retrieval device receives the current recipe query text (e.g., a soft and mushy breakfast suitable for elderly people with diabetes) initiated by the user through the front-end device, and converts the current recipe query text into a numerical information query vector to represent the user's current information retrieval needs. At the same time, the information retrieval device obtains the pre-built and stored target user profile information from the user profile database.
[0165] It should be noted that query vectorization enables computers to process semantic information; user profile information is the starting point for dynamic retrieval, including at least a long-term static user profile vector constructed based on all of the user's historical data. This vector stably reflects the user's core health and wellness attributes as a "diabetic patient" and an "elderly person" and their long-term dietary preferences (such as a long-term need for low-GI and soft, well-cooked foods).
[0166] S4. The information retrieval device dynamically constructs similar user groups based on user profiles and queries, including two parallel sub-processes: Based on the long-term static user profile vector of the target user, calculate the cosine similarity between it and the long-term static user profile vectors of all other users in the user set, and select the K users with the highest similarity to form the first user subgroup. Based on the current information query vector, calculate its cosine similarity with the long-term static profile vectors of all other users in the user set, and select the K users with the highest similarity to form the second user subgroup.
[0167] It should be noted that through dual-path group construction, the system not only found users with long-term attributes similar to the target user (such as elderly people with diabetes), but also users with similar current query intent (such as users who have recently searched for "soft and mushy breakfast"). This provides a wealth of external information sources to address the problem of data sparsity among the target user group itself.
[0168] S5. The information retrieval device integrates group information to generate a group-enhanced representation. It fuses information from two user subgroups through a multi-head attention mechanism, including: The long-term static user profile vector of the target user is used as the attention query, and the profile vectors of all users in the first user subgroup are used as the key and value. The weighted fusion is performed to obtain the enhanced representation of the first group. Using the current information query vector as the attention query, and the profile vectors of all users in the second user subgroup as the key and value, a weighted fusion is performed to obtain the enhanced representation of the second group.
[0169] It should be noted that the attention mechanism can dynamically assign weights to different users in the group, highlighting the influence of similar users who are more relevant to the query or the user themselves, and suppressing the noise of irrelevant users, thereby generating a high-quality, information-condensed representation of group interests.
[0170] S6. The information retrieval device calculates the personalized relevance score of the candidate recipes: It receives a list of candidate recipes returned by a non-personalized retrieval system. For each candidate recipe in the list, it fuses its own recipe feature vector with the first group augmented representation and the second group augmented representation, and combines the matching degree feature of the recipe with the query (query-recipe relevance) and the user's historical click behavior on the recipe (user-recipe interaction feature). All these features are input into a scoring model (such as a multilayer perceptron MLP) to calculate a comprehensive relevance score.
[0171] It should be noted that the personalized relevance score not only depends on the recipe itself and the query, but also deeply incorporates group interest information. This means that even if a recipe itself matches the keyword "diabetic breakfast", if it is generally avoided by similar diabetic groups (low group score), its final score will also be lower, thereby improving the health and wellness safety and personalization accuracy of the results.
[0172] S7. The information retrieval device reorders and outputs the final retrieval results: Based on the comprehensive relevance score of all recipes in the candidate recipe list, the list is reordered from high to low, and the reordered list is sent to the user's front-end device as the final personalized information retrieval result for display.
[0173] Therefore, what users will ultimately see is a highly customized and safe recipe list that not only matches the current query "soft and tender breakfast suitable for elderly people with diabetes", but also incorporates their own long-term health attributes and the collective experience of similar user groups.
[0174] It is understandable that S1 and S2 above are the data preparation phases. These phases run periodically in the background or are triggered when users generate new data, preparing the latest user profiles for real-time retrieval. S3 to S7 above are the real-time retrieval phases, which are executed in real time each time a user initiates a query.
[0175] In this way, a comprehensive and three-dimensional user profile is constructed through S1 and S2. After the user initiates a query (S3), similar groups are dynamically searched (S4), the collective wisdom is extracted (S5), and this information is used to calculate a deeply personalized score for each candidate item (S6). Finally, a safe, accurate, and customized ranking result (S7) is generated and returned to the user, thus fully realizing personalized information retrieval based on group enhancement.
[0176] It should be noted that the descriptions of each step S1 to S7 in this embodiment can be found in the descriptions in the above embodiments, and will not be repeated here.
[0177] This solution segments similar groups by capturing the semantic similarity between users and recipes, mines deep-seated user needs, and integrates group information to optimize user interest modeling. For example, it identifies the semantic association between users who need low-fat recipes and those recovering from pancreatitis or with high cholesterol, and matches soft and sticky recipes with the potential needs of elderly people with poor teeth or patients with postoperative chewing difficulties. This provides effective features for users with scarce data and offers recipe search results that are more tailored to individual differences for all users.
[0178] Specifically, this method first constructs semantic representation vectors based on the user's health attributes (disease type, severity, dietary restrictions, etc.) and recipe attributes (ingredient characteristics, cooking methods, nutritional components, etc.). Then, it matches the target user with multiple similar groups based on vector similarity. Subsequently, it uses a multi-head attention mechanism to fuse and weight the interest features of group users, combining this with the target user's own valid historical data to construct a more comprehensive user interest model. Finally, it calculates the matching score between the current query and candidate recipes based on this model, achieving personalized ranking. Furthermore, the basic network structure used to model user interests (such as a hierarchical recurrent neural network) can be replaced with other types of networks such as Transformer or large models, as long as the core requirement of sequentially integrating user history and group characteristics is met, providing good flexibility and scalability.
[0179] This solution proposes a group segmentation strategy for the health and wellness scenario, breaking through the limitations of traditional manually designed features. It captures users' deep needs through semantic similarity, improving the accuracy of group interest characterization. It constructs a dual-dimensional interest modeling framework for individuals and groups, effectively alleviating the problem of user data sparsity in the health and wellness scenario, and providing accurate search assistance for new users and users with changing needs. It achieves deep adaptation between health and wellness needs and recipe attributes, improving the personalization of search results and health and wellness safety, and providing a feasible solution for optimizing the recipe search function of the health and wellness intelligent agent.
[0180] Figure 5 This is a schematic diagram of the architecture of an information retrieval system provided in an embodiment of this application. The information retrieval system 800 may include: an information acquisition module 801, a group construction module 802, a group fusion module 803, a scoring module 804, a sorting output module 805, and a profile construction module 806.
[0181] The information acquisition module 801 is used to acquire information query vectors and target user profile information. The information query vector represents the target user's current information retrieval needs (e.g., the vector representation of a user's query for "soft and well-cooked breakfast suitable for elderly people with diabetes"). The target user profile information represents the target user's dietary preferences and health and wellness needs. This is applied to step 201 and its related solutions.
[0182] The aforementioned group construction module 802 is used to select K users with a similarity greater than a first threshold from the user set based on the target user profile information to obtain a first user subgroup; and to select K users with a similarity greater than a second threshold from the user set based on the information query vector to obtain a second user subgroup. This is applied to steps 202, 202a, and 202b and their related schemes, namely, calculating the cosine similarity between the target user profile information (such as a long-term static user profile vector) and other similar vectors of the same type from other users, and selecting the K most similar users.
[0183] The aforementioned group fusion module 803 is used to deeply fuse information from two user subgroups. Specifically, it uses the target user profile information as the attention query and the profile vectors of users in the first user subgroup as keys and values to perform a first multi-head attention weighted fusion, resulting in a first group enhanced representation; it uses the information query vector as the attention query and the profile vectors of users in the second user subgroup as keys and values to perform a second multi-head attention weighted fusion, resulting in a second group enhanced representation. This is applied to steps 203, 203a, and 203b, and related schemes.
[0184] The scoring module 804 described above is used to calculate the relevance score of each candidate information based on the first group augmented representation, the second group augmented representation, and the information feature vector of each candidate information in the candidate information list. Applied to steps 204 and 204a and their related schemes, this means that in addition to the group augmented representation and the candidate information's own features, query-information relevance features and user-information interaction features (such as historical click counts, click entropy, etc.) are also integrated, and the final score is calculated using a scoring model (such as a multilayer perceptron MLP).
[0185] The sorting output module 805 described above is used to reorder all candidate information based on the relevance scores of all candidate information in the candidate information list, generate information retrieval results corresponding to the target user, and finally send the sorted list to the front-end device for display to the user. This is applied to step 205 and its related solutions.
[0186] The aforementioned profile construction module 806 is used to construct and update the target user profile information used by the information acquisition module 801. It is applied to steps 301-305 and 401-403, and their related solutions.
[0187] It should be noted that the aforementioned profile construction module 806 may include: The long-term profile construction unit is used to perform the above steps 301 to 305, including dividing historical sessions, processing sequences using intra-session and inter-session recurrent neural networks, and generating long-term static and long-term dynamic user profile vectors. The short-term profile construction unit is used to perform the above steps 401 to 403, including processing the current session sequence and generating short-term static and short-term dynamic user profile vectors.
[0188] It should be noted that for a detailed explanation of the steps performed by each module and their beneficial effects, please refer to the description in the above embodiments, which will not be repeated here.
[0189] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0190] This application embodiment can divide the information retrieval device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0191] In some embodiments, this application also provides an information retrieval device. This information retrieval device may include one or more functional modules for implementing the information retrieval method of the above method embodiments.
[0192] For example, Figure 6 This is a schematic diagram illustrating the composition of an information retrieval device provided in an embodiment of this application. For example... Figure 6 As shown, the information retrieval device 900 includes an acquisition module 901 and a processing module 902.
[0193] The acquisition module 901 is used to acquire information query vectors and target user profile information. The information query vectors represent the current information retrieval needs of the target user, and the target user profile information includes user profile vectors related to health and wellness attributes. The acquisition module 901 is also used to select K users with similarity greater than a first threshold from the user set based on the target user profile information to obtain a first user subgroup, and to select K users with similarity greater than a second threshold from the user set based on the information query vectors to obtain a second user subgroup, where K is a positive integer. The processing module 902 is used to perform weighted fusion of the target user profile information and the user profile vectors in the first user subgroup to obtain a first group enhancement vector, and to perform weighted fusion of the information query vector and the user profile vectors in the second user subgroup to obtain a second group enhancement vector. The processing module 902 is also used to calculate the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list. The processing module 902 is also used to reorder all candidate information based on the relevance scores of all candidate information in the candidate information list to generate information retrieval results corresponding to the target user.
[0194] This application provides an information retrieval device. Based on target user profile information and information query vectors, the device dynamically filters two key reference groups from a user set: a user group with similar long-term interests to the target user, and a user group with similar current query intent. This makes the user data used in information retrieval more comprehensive. Then, the device obtains a group enhancement vector by weighted fusion of the profile vectors of users in the two user subgroups. This extracts common preference patterns from similar user behaviors, allowing the target user to obtain accurate interest representations through group behavior patterns even if their own data is insufficient, thus improving the reliability of user interest modeling. The device then calculates relevance scores based on the group enhancement vector and candidate information features and re-ranks them, ensuring that the retrieval results reflect both individual characteristics and include group validation. This makes the final information retrieval results more reliable and meets personalized needs. In this way, the personalized matching accuracy and the accuracy of information retrieval results are improved.
[0195] In some embodiments, the target user profile information includes at least a long-term static user profile vector, which is used to characterize the target user's dietary preferences and health needs over a preset historical period that are unrelated to the current information query; the acquisition module 901 is specifically used to: calculate the cosine similarity between the target user profile information and the long-term static user profile vectors of other users in the user set; and select K users from the user set whose cosine similarity is greater than a first threshold to obtain a first user subgroup.
[0196] In other embodiments, the target user profile information further includes: a long-term dynamic user profile vector, a short-term static user profile vector, and a short-term dynamic user profile vector; wherein, the long-term dynamic user profile vector is used to represent the target user's dietary preferences and health needs related to the current information query and within a preset historical time period; the short-term static user profile vector is used to represent the target user's dynamic dietary intentions unrelated to the current information query in the current retrieval session, where the current retrieval session is the ongoing and unfinished session in which the user currently initiates the information query; and the short-term dynamic user profile vector is used to represent the target user's dynamic dietary intentions related to the current information query in the current retrieval session.
[0197] In some other embodiments, the processing module 902 is further configured to: divide the target user's information retrieval history into multiple historical sessions, each historical session containing a query sequence and corresponding interaction information; use an intra-session recurrent neural network to process the query sequence and corresponding interaction information in each historical session sequentially to obtain a session representation vector for each historical session, thereby obtaining a historical session representation vector sequence; use an inter-session recurrent neural network to process the historical session representation vector sequence and output a user long-term interest vector sequence, where each vector in the user long-term interest vector sequence corresponds to a user state at the end of a historical session; use the last hidden state vector in the user long-term interest vector sequence as a long-term static user profile vector; and perform query-aware attention weighted fusion of the user long-term interest vector sequence based on the information query vector, and use the fused vector as a long-term dynamic user profile vector.
[0198] In some other embodiments, the processing module 902 is further configured to: use an intra-session recurrent neural network to process the query and interaction information sequence generated in the current retrieval session and before the current information query to obtain a hidden state vector sequence; use the last hidden state vector in the hidden state vector sequence as a short-term static user profile vector; perform query-aware attention weighted fusion on the hidden state vector sequence based on the information query vector, and use the fused vector as a short-term dynamic user profile vector.
[0199] In some other embodiments, the processing module 902 is specifically used to: use the target user profile information as the attention query and use the profile vectors of users in the first user subgroup as the key and value to perform a first multi-head attention weighted fusion to obtain a first group enhancement vector; use the information query vector as the attention query and use the profile vectors of users in the second user subgroup as the key and value to perform a second multi-head attention weighted fusion to obtain a second group enhancement vector.
[0200] In some other embodiments, the processing module 902 is specifically used to: calculate the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, the information feature vector of each candidate information, and the first information; wherein the first information includes at least one of the following: the query-information relevance feature of each candidate information with the information query vector, and the user-information interaction feature of each candidate information with the historical information retrieval records of the target user; the user-information interaction feature includes at least one of the following: the total number of historical clicks by the target user on each candidate information; the number of clicks by the target user on each candidate information under the information query vector; and the click entropy of the information query vector.
[0201] It should be noted that the information retrieval device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0202] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 7 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.
[0203] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0204] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0205] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0206] In one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the information retrieval method provided in the embodiments of this application.
[0207] In another possible implementation, memory 91 can also be integrated with processor 92.
[0208] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0209] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0210] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the aforementioned computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The aforementioned computer-readable storage medium can also be an external storage device of the aforementioned service invocation device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the aforementioned service invocation device. Further, the aforementioned computer-readable storage medium can include both internal storage units of the aforementioned service invocation device and external storage devices. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the aforementioned service invocation device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0211] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to execute any of the information retrieval methods provided in the above embodiments.
[0212] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An information retrieval method, characterized in that, include: Obtain information query vectors and target user profile information. The information query vectors are used to represent the current information retrieval needs of the target user. The target user profile information includes the target user's user profile vectors related to health and wellness attributes. Based on the target user profile information, K users with similarity greater than a first threshold are selected from the user set to obtain a first user subgroup. Based on the information query vector, K users with similarity greater than a second threshold are selected from the user set to obtain a second user subgroup, where K is a positive integer. A first group enhancement vector is obtained by weighted fusion of the target user profile information and the profile vectors of users in the first user subgroup, and a second group enhancement vector is obtained by weighted fusion of the information query vector and the profile vectors of users in the second user subgroup. Based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list, the relevance score of each candidate information is calculated. Based on the relevance scores of all candidate information in the candidate information list, all candidate information is reordered to generate information retrieval results corresponding to the target user.
2. The information retrieval method according to claim 1, characterized in that, The target user profile information includes at least a long-term static user profile vector, which is used to characterize the target user's dietary preferences and health needs over a preset historical period, which are unrelated to the current information query. The step of selecting K users with a similarity greater than a first threshold from the user set based on the target user profile information to obtain a first user subgroup includes: Calculate the cosine similarity between the target user profile information and the long-term static user profile vectors of other users in the user set; K users with a cosine similarity greater than a first threshold are selected from the user set to obtain the first user subgroup.
3. The information retrieval method according to claim 2, characterized in that, The target user profile information also includes: long-term dynamic user profile vector, short-term static user profile vector, and short-term dynamic user profile vector. The long-term dynamic user profile vector is used to represent the dietary preferences and health needs of the target user within a preset historical time period, which are related to the current information query. The short-term static user profile vector is used to characterize the target user's dynamic dietary intentions in the current retrieval session that are unrelated to the current information query. The current retrieval session is the ongoing and unfinished session in which the user is currently initiating the information query. The short-term dynamic user profile vector is used to characterize the target user's dynamic dietary intent related to the current information query in the current retrieval session.
4. The information retrieval method according to claim 3, characterized in that, The method further includes: The target user's information retrieval history is divided into multiple historical sessions, each of which contains a query sequence and corresponding interaction information. A recurrent neural network within a session is used to process the query sequence and corresponding interaction information in each historical session in sequence, so as to obtain the session representation vector of each historical session and thus obtain the historical session representation vector sequence. Inter-session recurrent neural networks are used to process the historical session representation vector sequence and output a user long-term interest vector sequence, where each vector in the user long-term interest vector sequence corresponds to a user state at the end of a historical session. The last hidden state vector in the user's long-term interest vector sequence is used as the long-term static user profile vector. The user's long-term interest vector sequence is fused with query perception attention weighting based on the information query vector, and the fused vector is used as the long-term dynamic user profile vector.
5. The information retrieval method according to claim 3, characterized in that, The method further includes: A recurrent neural network within a session is used to process the sequence of query and interaction information generated in the current retrieval session before the current information query, to obtain a sequence of hidden state vectors. The last hidden state vector in the hidden state vector sequence is taken as the short-term static user profile vector. The hidden state vector sequence is fused with query-aware attention weighting based on the information query vector, and the fused vector is used as the short-term dynamic user profile vector.
6. The information retrieval method according to claim 1, characterized in that, The first group enhancement vector is obtained by weighted fusion of the target user profile information and the profile vectors of users in the first user subgroup, and the second group enhancement vector is obtained by weighted fusion of the information query vector and the profile vectors of users in the second user subgroup, including: Using the target user profile information as the attention query, and using the user profile vectors in the first user subgroup as the key and value, a first multi-head attention weighted fusion is performed to obtain the first group enhancement vector; Using the information query vector as the attention query and the user profile vector in the second user subgroup as the key and value, a second multi-head attention weighted fusion is performed to obtain the second group enhancement vector.
7. The information retrieval method according to claim 1, characterized in that, The step of calculating the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list includes: Based on the first group enhancement vector, the second group enhancement vector, the information feature vector of each candidate information and the first information, the relevance score of each candidate information is calculated; The first information includes at least one of the following: the query-information relevance feature of each candidate information with the information query vector, and the user-information interaction feature of each candidate information with the target user's historical information retrieval records; The user-information interaction features include at least one of the following: The total number of historical clicks by the target user on each candidate piece of information; The number of times the target user clicks on each candidate information under the information query vector; The click entropy of the information query vector.
8. An information retrieval device, characterized in that, include: Acquisition module and processing module; The acquisition module is used to acquire information query vectors and target user profile information. The information query vectors are used to represent the current information retrieval needs of the target user. The target user profile information includes user profile vectors related to health and wellness attributes of the target user. The acquisition module is further configured to, based on the target user profile information, select K users from the user set whose similarity is greater than a first threshold to obtain a first user subgroup, and based on the information query vector, select K users from the user set whose similarity is greater than a second threshold to obtain a second user subgroup, where K is a positive integer; The processing module is used to perform weighted fusion based on the target user profile information and the profile vectors of users in the first user subgroup to obtain a first group enhancement vector, and to perform weighted fusion based on the information query vector and the profile vectors of users in the second user subgroup to obtain a second group enhancement vector; The processing module is further configured to calculate the relevance score of each candidate information based on the first group enhancement vector, the second group enhancement vector, and the information feature vector of each candidate information in the candidate information list; The processing module is further configured to reorder all candidate information based on the relevance scores of all candidate information in the candidate information list, and generate information retrieval results corresponding to the target user.
9. The information retrieval device according to claim 8, characterized in that, The target user profile information includes at least a long-term static user profile vector, which is used to characterize the target user's dietary preferences and health needs over a preset historical period, which are unrelated to the current information query. The acquisition module is specifically used for: Calculate the cosine similarity between the target user profile information and the long-term static user profile vectors of other users in the user set; K users with a cosine similarity greater than a first threshold are selected from the user set to obtain the first user subgroup.
10. An electronic device, characterized in that, The device includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the information retrieval method as described in any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the information retrieval method as described in any one of claims 1 to 7.
12. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the information retrieval method as described in any one of claims 1 to 7.