Method and device for item recall
By establishing a subtask model and using multi-task learning to determine the recall weight, the problem that a single recall strategy cannot guarantee comprehensiveness and a multi-way recall strategy cannot guarantee accuracy and comprehensiveness at the same time is solved, and the comprehensiveness and accuracy of item recall is achieved.
Patent Information
- Application Number
- CN202110290642.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-18
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-03-18
AI Technical Summary
In the prior art, a single recall strategy cannot guarantee the comprehensiveness of item recall, and a multiple recall strategy cannot guarantee the accuracy and comprehensiveness of the recalled items through simple linear weighting or normalization.
By establishing different subtask models and determining the Pareto optimal solution through multi-task learning, the recall weights of each recall strategy are determined, thereby integrating various recall results to ensure the comprehensiveness and accuracy of the recall.
It realizes the comprehensiveness and accuracy of item recall under the multiple recall strategy, and improves the quality of recommended results.
Smart Images

Figure CN113762535B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an item recall method and device. Background Art
[0002] Item recall refers to the use of multiple recall strategies to quickly recall a small number of candidate items that may be of interest to users from a massive set of items based on their personalized characteristics, and then recommend the recalled candidate items to users after sorting them. It is widely used in actual recommendation, search, advertising and other scenarios.
[0003] Since the recalled candidate items are directly used for sorting and recommendation, the relevance of the recalled candidate items to the recommended users, the accuracy and comprehensiveness of the recalled candidate items, etc. directly determine the effect of personalized sorting recommendation. Therefore, how to conduct feasible and efficient item recall has become a research focus.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: When a single recall strategy is used to recall items, the comprehensiveness of the recalled items cannot be guaranteed; and when multiple recall strategies are used to recall multiple items, the recall scores of the recalled items of each recall strategy are only simply linearly weighted or normalized, which cannot guarantee both the accuracy and comprehensiveness of the recalled items. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an item recall method and device, which can determine the recall weight corresponding to each recall strategy in a manner of determining the Pareto optimal solution by establishing different subtask models respectively for different recall strategies, and simultaneously learning all subtask models through multi-task learning to determine the Pareto optimal solution, thereby merging the various recall results according to the recall weights of each recall strategy, thereby ensuring the comprehensiveness and accuracy of item recall using multiple recall strategies.
[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for recalling an item is provided, comprising:
[0007] Acquire historical data, where the historical data indicates one or more of the following: user information, item information, user operations on items, and a sequence of items operated by the user;
[0008] Based on the historical data, using each recall strategy of at least two groups of recall strategies, respectively determine one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items;
[0009] According to the pre-recall items and the recall scores, a subtask model corresponding to each group of recall strategies is established, wherein the subtask model is used to determine a recall weight corresponding to each recall strategy in the recall strategy group;
[0010] Based on a multi-task learning method, jointly learning all the sub-task models to determine the Pareto optimal solution of the recall weight;
[0011] One or more recalled items are determined from the pre-recalled items according to the Pareto optimal solution of the recall score and the recall weight.
[0012] Optionally, the recall strategy is a collaborative filtering algorithm or a graph embedding algorithm; wherein,
[0013] The collaborative filtering algorithm includes one or more of the following: an item-based collaborative filtering algorithm, a user-based collaborative filtering algorithm, a Swing algorithm, and an association rule algorithm;
[0014] The graph embedding algorithm includes one or more of the following: EGES algorithm, Node2Vec algorithm, DeepWalk algorithm, LINE algorithm, and SDNE algorithm.
[0015] Optionally,
[0016] Using the item-based collaborative filtering algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including:
[0017] Calculating the item similarity between any two items based on the item information to determine similar items corresponding to the items operated by the user;
[0018] Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item;
[0019] One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
[0020] Optionally,
[0021] The item similarity is determined by the time difference between two items operated by the user, the number of items operated by the user, and the number of users operating the items.
[0022] Optionally,
[0023] Using the user-based collaborative filtering algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including:
[0024] Calculating the user similarity between any two users based on the user information and the user's operation behavior on the item, so as to determine similar users corresponding to the user based on the user similarity;
[0025] Selecting items operated by the similar users as similar items;
[0026] Determine the recall score corresponding to the similar item according to the user similarity and the scores of the similar users on the similar items operated by the similar users;
[0027] One or more of the similar items are selected as the pre-recall items according to the recall scores from high to low.
[0028] Optionally, the user similarity is determined by the number of items operated by the two users and the number of operating users corresponding to the items operated by the two users.
[0029] Optionally,
[0030] Using the Swing algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items includes:
[0031] Calculate the item similarity between any two items based on the item information, user information, and the user's operation behavior on the items to determine similar items corresponding to the items operated by the user;
[0032] Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item;
[0033] One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
[0034] Optionally,
[0035] The item similarity is determined by the number of users who have operated the item and the number of operated items corresponding to the users who have simultaneously operated the item.
[0036] Optionally,
[0037] Using the graph embedding algorithm, determining one or more pre-recalled items to be operated by the user and recall scores corresponding to the pre-recalled items includes:
[0038] generating an item pair according to the item sequence operated by the user, wherein the item pair indicates two different items;
[0039] An item relationship graph is constructed based on the item pairs, wherein the nodes of the item relationship graph indicate the items, and the weights of the edges of the item relationship graph indicate one or more of the following information: the number of operations performed by the user on the items in the item pairs, and the attribute information of the items;
[0040] Randomly walking the item relationship graph to generate one or more item sequences;
[0041] According to the generated item sequence, the item vector is determined based on the Skip-Gram model to calculate the item similarity;
[0042] Determining similar items corresponding to the items operated by the user according to the item similarity;
[0043] Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item;
[0044] One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
[0045] Optionally, the similarity of the item vectors is calculated by constructing a faiss index.
[0046] To achieve the above object, according to another aspect of an embodiment of the present invention, an item recall device is provided, comprising: a data acquisition module, a pre-recall module, a subtask model building module, a multi-task learning module, and a recalled item determination module; wherein:
[0047] The data acquisition module is used to acquire historical data, where the historical data indicates one or more of the following: user information, item information, user operation behavior on items, and a sequence of items operated by the user;
[0048] The pre-recall module is used to determine, based on the historical data, one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items using each recall strategy of at least two groups of recall strategies;
[0049] The multi-task learning module is used to establish a sub-task model corresponding to each group of recall strategies according to the pre-recall items and the recall scores, and the sub-task model is used to determine the recall weight corresponding to each recall strategy in the recall strategy group;
[0050] The recalled item determination module is used to determine one or more recalled items from the pre-recalled items according to the recall score and the Pareto optimal solution of the recall weight.
[0051] Optionally,
[0052] The recall strategy is a collaborative filtering algorithm or a graph embedding algorithm; wherein,
[0053] The collaborative filtering algorithm includes one or more of the following: an item-based collaborative filtering algorithm, a user-based collaborative filtering algorithm, a Swing algorithm, and an association rule algorithm;
[0054] The graph embedding algorithm includes one or more of the following: EGES algorithm, Node2Vec algorithm, DeepWalk algorithm, LINE algorithm, and SDNE algorithm.
[0055] Optionally,
[0056] Using the item-based collaborative filtering algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including:
[0057] Calculating the item similarity between any two items based on the item information to determine similar items corresponding to the items operated by the user;
[0058] Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item;
[0059] One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
[0060] Optionally,
[0061] The item similarity is determined by the time difference between two items operated by the user, the number of items operated by the user, and the number of users operating the items.
[0062] Optionally,
[0063] Using the user-based collaborative filtering algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including:
[0064] Calculating the user similarity between any two users based on the user information and the user's operation behavior on the item, so as to determine similar users corresponding to the user based on the user similarity;
[0065] Selecting items operated by the similar users as similar items;
[0066] Determine the recall score corresponding to the similar item according to the user similarity and the scores of the similar users on the similar items operated by the similar users;
[0067] One or more of the similar items are selected as the pre-recall items according to the recall scores from high to low.
[0068] Optionally,
[0069] The user similarity is determined by the number of items operated by two users and the number of operating users corresponding to the items operated by the two users.
[0070] Optionally,
[0071] Using the Swing algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items includes:
[0072] Calculate the item similarity between any two items based on the item information, user information, and the user's operation behavior on the items to determine similar items corresponding to the items operated by the user;
[0073] Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item;
[0074] One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
[0075] Optionally,
[0076] The item similarity is determined by the number of users who have operated the item and the number of operated items corresponding to the users who have simultaneously operated the item.
[0077] Optionally,
[0078] Using the graph embedding algorithm, determining one or more pre-recalled items to be operated by the user and recall scores corresponding to the pre-recalled items includes:
[0079] generating an item pair according to the item sequence operated by the user, wherein the item pair indicates two different items;
[0080] An item relationship graph is constructed based on the item pairs, wherein the nodes of the item relationship graph indicate the items, and the weights of the edges of the item relationship graph indicate one or more of the following information: the number of operations performed by the user on the items in the item pairs, and the attribute information of the items;
[0081] Randomly walking the item relationship graph to generate one or more item sequences;
[0082] According to the generated item sequence, the item vector is determined based on the Skip-Gram model to calculate the item similarity;
[0083] Determine, according to the item similarity, similar items corresponding to the items operated by the user; Determine, according to the item similarity and the user's rating of the operated items, a recall score corresponding to the similar items;
[0084] One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
[0085] Optionally, the similarity of the item vectors is calculated by constructing a faiss index.
[0086] To achieve the above object, according to another aspect of an embodiment of the present invention, an electronic device for item recall is provided, comprising: one or more processors; a storage device for storing one or more programs;
[0087] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the item recall method.
[0088] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the methods described above in the item recall method is implemented.
[0089] An embodiment of the above invention has the following advantages or beneficial effects: for different recall strategies, by respectively establishing sub-task models with recall accuracy, recall comprehensiveness, etc. as indicators, and simultaneously learning all sub-task models through multi-task learning to determine the Pareto optimal solution, the recall weight corresponding to each recall strategy is determined, and then the recall results of each recall strategy are fused according to the recall weight of each recall strategy, thereby ensuring the comprehensiveness and accuracy of item recall using a multi-channel recall strategy.
[0090] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0092] Figure 1 is a schematic diagram of the main process of the item recall method according to an embodiment of the present invention;
[0093] Figure 2a is a schematic diagram of an item sequence operated by a user according to an embodiment of the present invention;
[0094] Figure 2bis a schematic diagram of an item relationship diagram according to an embodiment of the present invention;
[0095] Figure 2c is a schematic diagram of an item sequence generated based on random walk according to an embodiment of the present invention;
[0096] Figure 2d is a schematic diagram of a Skip-Gram model constructed according to an embodiment of the present invention;
[0097] Figure 3 is a schematic diagram of the main process of another item recall method according to an embodiment of the present invention;
[0098] Figure 4 is a schematic diagram of main modules of an item recall device according to an embodiment of the present invention;
[0099] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0100] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0101] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0102] Figure 1 is an item recall method according to an embodiment of the present invention, such as Figure 1 As shown, the item recall method may specifically include the following steps:
[0103] Step S101, obtaining historical data, wherein the historical data indicates one or more of the following: user information, item information, user operation behavior on items, and a sequence of items operated by the user.
[0104] Among them, user information includes user portrait information such as user ID, user name, and user gender; item information includes attribute information such as item name, item ID, item color, and item size, as well as additional information such as item price, item brand, and item three-level classification; user operations on items include one or more of the following: click, browse, add to cart, comment, follow, search, purchase, etc.; the sequence of items operated by the user refers to the sequence of items after the user clicks within a specified time period, such as within 60 minutes, such as SKU1, SKU2, SKU3, etc.
[0105] Step S102: Based on the historical data, use each recall strategy in at least two groups of recall strategies to respectively determine one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items.
[0106] The recall strategies include but are not limited to content-based recall strategies, rule-based recall strategies, collaborative filtering algorithms, and graph embedding algorithms, and each recall strategy group includes at least two recall strategies.
[0107] In an optional embodiment, the recall strategy is a collaborative filtering algorithm or a graph embedding algorithm; wherein the collaborative filtering algorithm includes one or more of the following: item-based collaborative filtering algorithm, user-based collaborative filtering algorithm, Swing algorithm, association rule algorithm; the graph embedding algorithm includes one or more of the following: EGES algorithm, Node2Vec algorithm, DeepWalk algorithm, LINE algorithm, SDNE algorithm.
[0108] Preferably, this embodiment only takes the following two recall strategy groups as examples for description: Recall strategy group 1: item-based collaborative filtering algorithm, user-based collaborative filtering algorithm, Swing algorithm, association rule algorithm; Recall strategy group: EGES algorithm, Node2Vec algorithm.
[0109] Specifically, the item-based collaborative filtering algorithm is used to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: calculating the item similarity between any two items based on the item information to determine similar items corresponding to the items operated by the user; determining the recall scores corresponding to the similar items based on the item similarity and the user's score for the operated items; and selecting one or more of the similar items as the pre-recalled items corresponding to the user in descending order of the recall scores.
[0110] For example, if the items purchased by the target user include SKUA, SKUB, and SKUC, then by calculating the item similarity between SKUA, SKUB, SKUC and other items, all items similar to SKUA, SKUB, and SKUC can be determined, that is, other items that the user may be interested in based on the initial mining of the target user's purchase behavior. On this basis, the recall score can be determined based on the target user's rating of the item SKUA, SKUB, and SKUC and the similarity between the items, that is, the target user's interest in the initially mined items can be predicted. The recall score calculation formula that can be used is as follows:
[0111] Recall score i =sim(i,j)*E j
[0112] Among them, sim(i,j) represents the item similarity between item i and item j, E j Represents the score of the target user on item j. Specifically, the item similarity is determined by the time difference between the user's operations on two items, the number of items operated by the user, and the number of users who operate on the items. The calculation formula used is as follows:
[0113]
[0114] Among them, U i Represents the set of users who have performed operations on item i;
[0115] U j represents the set of users who have performed operations on item j;
[0116] u represents the user who has performed operations on both item i and item j;
[0117] |U i | represents the number of users who have performed operations on item i;
[0118] |U j | represents the number of users who have performed operations on item j;
[0119] |I u | indicates the number of items that user u has operated;
[0120] t i Indicates the time when user u performed the operation on item i, specifically expressed in years, months, days, weeks, hours, minutes, seconds, etc.;
[0121] t j Indicates the time when user u performed the operation on item j, specifically expressed in years, months, days, weeks, hours, minutes, seconds, etc.;
[0122] The value of α is between 1000 and 1500.
[0123] |U i |U j || indicates that the more popular the product, the weaker the popularity of the product, log(1+|I u |) means that the more active the user, the smaller the user activity factor is. exp(-α*|t i -t j |) represents the influence of the interaction time difference between item i and item j. The shorter the time, the greater the influence of the corresponding time factor. In this way, by introducing the time difference between the user's operation on two items, the number of items operated by the user, and the number of users who operate on the items into the formula, the influence of the popularity or heat of the item itself, the user's activity, the user's active time, etc. on the item similarity is weakened, and the accuracy and reliability of the item similarity are improved.
[0124] Furthermore, the user-based collaborative filtering algorithm is used to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: calculating the user similarity between any two users based on the user information and the user's operation behavior on the items, so as to determine similar users corresponding to the users based on the user similarity; selecting items operated by the similar users as similar items; determining the recall scores corresponding to the similar items based on the user similarity and the scores given by the similar users to the operated similar items; and selecting one or more similar items as the pre-recalled items in descending order of the recall scores.
[0125] If we still take the items operated by the target user as SKUA, SKUB, and SKUC as an example, then by calculating the user similarity, we can determine all other users similar to the target user (such as user 1 and user 2), and then we can determine that the items SKU1, SKU2, and SKU3 operated by user 1 and user 2 are similar items corresponding to the items SKUA, SKUB, and SKUC operated by the target user, that is, the items that the target user may be interested in after preliminary mining, and then we can determine the recall scores corresponding to the similar items SKU1, SKU2, and SKU3 based on the user similarity and the target user's rating of the items SKUA, SKUB, and SKUC. Specifically, the user similarity is determined by the number of items operated by the two users and the number of operating users corresponding to the items operated by the two users. The user similarity can be calculated using the following formula:
[0126]
[0127] Among them, sim(u,v) represents the user similarity between user u and user v;
[0128] |I u | indicates the number of items that user u has operated;
[0129] |I v | indicates the number of items that user v has operated;
[0130] I u Represents the set of items that user u has operated;
[0131] I v Represents the set of items that user v has operated on;
[0132] |U i | represents the number of users who have performed operations on item i;
[0133] c takes the value of 1 or 0.5, which is used to represent the mutual influence between user u and user v; β is an empirical value.
[0134] In this way, by introducing the number of items operated by two users and the number of operating users corresponding to the items operated by the two users into the user similarity calculation formula, the influence of the popularity or heat of the item itself, the user activity, and the user interaction direction on the user similarity calculation is weakened, thereby improving the accuracy and reliability of user similarity.
[0135] Furthermore, the Swing algorithm is used to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: calculating the item similarity between any two items based on the item information, user information, and the user's operation behavior on the items to determine the similar items corresponding to the items operated by the user; determining the recall scores corresponding to the similar items based on the item similarity and the user's score for the operated items; and selecting one or more similar items as the pre-recalled items corresponding to the user in descending order of the recall scores. Among them, the item similarity is determined by the number of users who operate the items and the number of operated items corresponding to the users who have operated the items at the same time. The specific calculation formula that can be used is as follows:
[0136]
[0137] Among them, sim(i,j) represents the item similarity between item i and item j;
[0138] U i Represents the set of users who have performed operations on item i;
[0139] Uj represents the set of users who have performed operations on item j;
[0140] |U i | represents the number of users who have performed operations on item i;
[0141] |U j | represents the number of users who have performed operations on item j;
[0142] u represents the user who has performed operations on both item i and item j;
[0143] v represents the user who has performed operations on both item i and item j;
[0144] I u Represents the set of items that user u has operated;
[0145] I v Represents the set of items that user v has operated on;
[0146] The value of α is between 1000 and 1500.
[0147] In this way, by introducing item popularity or heat into item similarity, that is, the number of users who have operated on the item, the number of items operated by users is the user activity, which weakens the influence of item popularity and user activity on the calculation of item similarity, and improves the accuracy and reliability of item similarity obtained by using the Swing algorithm.
[0148] In an optional embodiment, the graph embedding algorithm is used to determine one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items, including: generating an item pair according to the item sequence operated by the user, the item pair indicating two different items; constructing an item relationship graph according to the item pair, the nodes of the item relationship graph indicating the items, and the weights of the edges of the item relationship graph indicating one or more of the following information: the number of operations of the user on the items in the item pair, the attribute information of the items; randomly walking the item relationship graph to generate one or more item sequences; according to the generated item sequence, determining the item vector based on the Skip-Gram model to calculate the item similarity; determining similar items corresponding to the items operated by the user according to the item similarity; determining the recall scores corresponding to the similar items according to the item similarity and the user's score for the operated items; selecting one or more similar items as the pre-recall items corresponding to the user according to the recall scores from high to low. Specifically, the similarity of the item vectors can be calculated by constructing a faiss index.
[0149] Specifically, see Figure 2a-2c , taking the Node2Vec algorithm as an example, Figure 2a As shown in the figure, within a certain period of time (such as 60 minutes), the item sequence operated by user U1 is D, A, B; the item sequence operated by user U2 is B, E, D, E, F; the item sequence operated by user U3 is E, C, B, B, A. On this basis, based on the item sequence operated by the user, two different items are selected to generate item pairs, such as (D, A)(B, E), (E, F), etc., and an item relationship graph is constructed based on the item pairs (see Figure 2b ); Specifically, the items in the item pair are nodes, the order of user operations on the items indicates the direction of the edge between the item pairs, and the number of times the item pair appears or the number of times the user operates on the item pair is the weight of the edge. Based on this, for the constructed item relationship graph, one or more new item sequences are generated based on random walks (see Figure 2c ), such as item sequences A, B, E, F, B, E, C, B, A; C, B, A, B, E, etc. On this basis, based on the newly generated item sequence, the Skip-Gram model is trained using the fastText model (see Figure 2d ) to construct an item vector; and then calculate the similarity of the item vector by constructing a faiss index to determine the item similarity. On this basis, one or more similar items corresponding to the items operated by the user are determined according to the item similarity; then, according to the item similarity and the user's score on the operated items, the recall score corresponding to the similar items is determined, and one or more similar items are selected as the pre-recall items corresponding to the user according to the recall score order from high to low.
[0150] Step S103, establishing a subtask model corresponding to each group of recall strategies according to the pre-recall items and the recall scores, wherein the subtask model is used to determine a recall weight corresponding to each recall strategy in the recall strategy group.
[0151] Specifically, taking the following two recall strategy groups as an example, the pre-recall items and recall scores corresponding to the target users obtained based on each recall strategy are shown in Table 1: Recall strategy group 1: item-based collaborative filtering algorithm, user-based collaborative filtering algorithm, Swing algorithm, association rule algorithm; Recall strategy group: EGES algorithm, Node2Vec algorithm.
[0152] Table 1 Examples of pre-recall items and recall scores corresponding to the recall strategy
[0153]
[0154]
[0155] It can be seen that for the same target user, the pre-recall items and recall scores determined by different recall strategies are different. In order to comprehensively consider the impact of different strategies on the same item, it is necessary to merge the recall results of different recall strategies, that is, to determine the recall weights corresponding to different recall strategies. In this way, the recall scores of pre-recall items can be weighted based on the recall weights of different strategies to obtain the fused recall scores corresponding to the pre-recall items. For example, taking the recalled item A as an example, the recall scores of A determined by the item-based collaborative filtering algorithm and the user-based collaborative filtering algorithm are 0.9 and 0.8 respectively. If the recall weights corresponding to the item-based collaborative filtering algorithm and the user-based collaborative filtering algorithm are 0.5 and 0.5 respectively, the fused recall score corresponding to the pre-recall item A is 0.9*0.5+0.8*0.5=0.85.
[0156] It is understandable that in the actual execution process, the recall result of a certain recall strategy can be directly used preferentially according to the actual situation, or the recall weight corresponding to each recall strategy can be directly set to perform multi-way recall fusion. Preferably, the present embodiment establishes a subtask model through a logistic regression algorithm, etc., to dynamically solve the recall weight corresponding to each recall strategy, and improve the reliability and accuracy of multi-way recall fusion. Specifically, a first subtask model can be established based on the pre-recall items and recall scores corresponding to each recall strategy in the recall strategy group 1 shown in Table 1, and the first subtask model uses the recall weight of each recall strategy as a parameter, and uses the recall accuracy rate for evaluation, so as to determine the recall weight corresponding to each recall strategy according to the optimized subtask model; at the same time, a second subtask model is established based on the pre-recall items and recall scores corresponding to each recall strategy in the recall strategy group 2 shown in Table 1, and the second subtask model uses the recall weight of each recall strategy as a parameter, and uses the recall comprehensiveness for evaluation, so as to determine the recall weight corresponding to each recall strategy according to the optimized subtask model. Since different recall strategies use the same historical data, the data sources used by the first subtask model and the second subtask model are essentially the same. Moreover, since the first subtask model and the second subtask model are respectively aimed at recall accuracy and recall comprehensiveness, two indicators with a certain competitive relationship, if they are solved separately, it is impossible to take into account the recall accuracy and recall comprehensiveness of the two. Therefore, multi-task learning can be used to find the optimal solution.
[0157] Specifically, taking the case where the recalled items corresponding to the target user are finally determined to be A, B, and C, and the items on which the target user finally operates are B, C, D, and E, then among the three recalled items A, B, and C, two items B and C are recalled correctly, that is, the recall accuracy rate is 66.7%; and among the four items B, C, D, and E actually operated, only two items B and C are on the recall list, so the recall comprehensiveness is only 50%.
[0158] It is understandable that in the actual implementation process, multiple recall strategies can be adopted, and then multiple subtask models can be established according to actual conditions. In addition to recall accuracy and recall comprehensiveness, the evaluation indicators of the subtask models can also adopt relevance, novelty, diversity or other custom indicators.
[0159] Step S104: Based on a multi-task learning method, all the sub-task models are learned together to determine the Pareto optimal solution of the recall weight.
[0160] Specifically, still taking the above sub-task models for recall accuracy and recall comprehensiveness as examples, training data in the following form can be constructed:
[0161]
[0162] Among them, x i Historical data shared by subtask models, namely item information, user information, user operations on items, etc. Indicates the label data of the i-th data in the t-th task. In this embodiment, the label of the first subtask model is whether the user clicks on the item, and the label of the second subtask model is the user's operation of the product list. Based on this, the following objective function is constructed, and by solving the objective function, the Pareto optimal solution corresponding to the recall weight is determined:
[0163]
[0164]
[0165] in, is the experience loss, θ sh represents the parameters shared by different subtask models, θ t Indicates task-related parameters.
[0166] Step S105: determining one or more recalled items from the pre-recalled items according to the Pareto optimal solution of the recall score and the recall weight.
[0167] Specifically, still taking Table 1 as an example, if each recall strategy is determined based on the Pareto optimal solution, that is, the recall weights corresponding to the item-based collaborative filtering algorithm, the user-based collaborative filtering algorithm, the Swing algorithm, the association rule algorithm, the Node2Vec algorithm, and the EGES algorithm are 0.5, 0.4, 0.5, 0.7, and 0.8 respectively, then the fused recall scores corresponding to each pre-recalled item can be calculated, that is, the recall score corresponding to A is 0.9*0.5+0.8*0.4=0.77, and the recall score corresponding to B is 0.8*0.5+0.6*0.4+0.9*0.5+0.7*0.7=1.58. And so on, the fused recall scores corresponding to C, D, E, F, and G are calculated, and then one or more recalled items are selected according to the order of the fused recall scores from high to low.
[0168] Based on the above embodiments, for different recall strategies, subtask models with recall accuracy, recall comprehensiveness, etc. as indicators are established respectively, and all subtask models are simultaneously learned through multi-task learning to determine the Pareto optimal solution to determine the recall weights corresponding to each recall strategy, thereby merging the recall results of each recall strategy according to the recall weights of each recall strategy, thereby ensuring the comprehensiveness and accuracy of item recall using a multi-channel recall strategy. In addition, when using a collaborative filtering algorithm for item recall, by introducing influencing factors such as item popularity or heat, user activity, and user operation time, the accuracy of the obtained item similarity or user similarity is improved, thereby improving the accuracy of the recall result.
[0169] See also Figure 3 Based on the above embodiments, an embodiment of the present invention provides an item recall method, which may specifically include the following steps:
[0170] Step S301, obtaining historical data, wherein the historical data indicates one or more of the following: user information, item information, user operation behavior on items, and a sequence of items operated by the user.
[0171] Step S302a, using an item-based collaborative filtering algorithm, a user-based collaborative filtering algorithm, a Swing algorithm, and an association rule algorithm respectively, to determine one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items.
[0172] Step S303a: creating a first subtask model according to the pre-recall items and the recall score, and evaluating the first subtask model using the recall accuracy.
[0173] Step S302b, using the EGES algorithm and the Node2Vec algorithm respectively, to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items.
[0174] Step S303b: creating a second subtask model according to the pre-recall items and the recall score, and evaluating the first subtask model by using recall comprehensiveness.
[0175] Step S304: jointly learn the first subtask model and the second subtask model to obtain a Pareto optimal solution of the recall weight corresponding to the recall strategy.
[0176] Step S305: determining one or more recalled items from the pre-recalled items according to the Pareto optimal solution of the recall score and the recall weight.
[0177] See also Figure 4 Based on the above embodiments, the present invention provides an item recall device 400, including: a data acquisition module 401, a pre-recall module 402, a subtask model building module 403, a multi-task learning module 404, and a recalled item determination module 405; wherein,
[0178] The data acquisition module 401 is used to acquire historical data, where the historical data indicates one or more of the following: user information, item information, user operation behavior on items, and item sequence operated by the user;
[0179] The pre-recall module 402 is used to determine, based on the historical data, one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items using each of the at least two groups of recall strategies;
[0180] The multi-task learning module 403 is used to establish a sub-task model corresponding to each group of recall strategies according to the pre-recall items and the recall scores, and the sub-task model is used to determine the recall weight corresponding to each recall strategy in the recall strategy group;
[0181] The recalled item determination module 404 is used to determine one or more recalled items from the pre-recalled items according to the recall score and the Pareto optimal solution of the recall weight.
[0182] In an optional embodiment, the recall strategy is a collaborative filtering algorithm or a graph embedding algorithm; wherein the collaborative filtering algorithm includes one or more of the following: item-based collaborative filtering algorithm, user-based collaborative filtering algorithm, Swing algorithm, association rule algorithm; the graph embedding algorithm includes one or more of the following: EGES algorithm, Node2Vec algorithm, DeepWalk algorithm, LINE algorithm, SDNE algorithm.
[0183] In an optional embodiment, the item-based collaborative filtering algorithm is used to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: calculating the item similarity between any two items based on the item information to determine similar items corresponding to the items operated by the user; determining the recall scores corresponding to the similar items based on the item similarity and the user's score for the operated items; and selecting one or more of the similar items as the pre-recalled items corresponding to the user in descending order of the recall scores.
[0184] In an optional implementation, the item similarity is determined by the time difference between users operating two items, the number of items operated by the users, and the number of users operating the items.
[0185] In an optional embodiment, the user-based collaborative filtering algorithm is used to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: calculating the user similarity between any two users based on the user information and the user's operation behavior on the items, and determining similar users corresponding to the users based on the user similarity; selecting items operated by the similar users as similar items; determining the recall scores corresponding to the similar items based on the user similarity and the scores of the similar users on the operated similar items; and selecting one or more similar items as the pre-recalled items according to the recall scores in descending order.
[0186] In an optional implementation, the user similarity is determined by the number of items operated by the two users and the number of operating users corresponding to the items operated by the two users.
[0187] In an optional embodiment, the Swing algorithm is used to determine one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: calculating the item similarity between any two items based on the item information, user information, and the user's operation behavior on the items to determine similar items corresponding to the items operated by the user; determining the recall scores corresponding to the similar items based on the item similarities and the user's rating of the operated items; and selecting one or more of the similar items as the pre-recalled items corresponding to the user in descending order of the recall scores.
[0188] In an optional implementation, the item similarity is determined by the number of users who have operated the item and the number of operated items corresponding to the users who have simultaneously operated the item.
[0189] In an optional embodiment, the graph embedding algorithm is used to determine one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items, including: generating an item pair according to the item sequence operated by the user, the item pair indicating two different items; constructing an item relationship graph according to the item pairs, the nodes of the item relationship graph indicating the items, and the weights of the edges of the item relationship graph indicating one or more of the following information: the number of operations performed by the user on the items in the item pair, and the attribute information of the items; randomly walking the item relationship graph to generate one or more item sequences; determining the item vector based on the Skip-Gram model based on the generated item sequence to calculate the item similarity; determining similar items corresponding to the items operated by the user according to the item similarity; determining the recall scores corresponding to the similar items according to the item similarity and the user's score for the operated items; and selecting one or more of the similar items as the pre-recall items corresponding to the user according to the recall scores in descending order.
[0190] In an optional implementation, the similarity of the item vectors is calculated by constructing a faiss index.
[0191] Figure 5 An exemplary system architecture 500 is shown to which the item recall method or item recall device according to the embodiment of the present invention can be applied.
[0192] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, network 504 and server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0193] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Terminal devices 501, 502, 503 can be installed with various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0194] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0195] Server 505 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 501, 502, and 503. The backend management server may analyze and process received data such as product information query requests, and feed back processing results such as sorting of recalled item sets generated by users to the terminal devices.
[0196] It should be noted that the item recall method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the recall method device is generally set in the server 505 .
[0197] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0198] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0199] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0200] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0201] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0202] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0203] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0204] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be arranged in a processor. For example, they may be described as: a processor including a data acquisition module, a pre-recall module, a subtask model building module, a multi-task learning module, and a recalled item determination module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the recalled item determination module may also be described as "a module for determining one or more recalled items from the pre-recalled items based on the Pareto optimal solution of the recall score and the recall weight."
[0205] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining historical data, the historical data indicating one or more of the following: user information, item information, user operation behavior on items, and item sequence operated by users; based on the historical data, using each recall strategy in at least two groups of recall strategies, respectively determining one or more pre-recall items to be operated by the user and the recall score corresponding to the pre-recall items; according to the pre-recall items and the recall score, respectively establishing a subtask model corresponding to each group of recall strategies, the subtask model is used to determine the recall weight corresponding to each recall strategy in the recall strategy group; based on the multi-task learning method, jointly learning all the subtask models to determine the Pareto optimal solution of the recall weight; according to the recall score and the Pareto optimal solution of the recall weight, determining one or more recalled items from the pre-recall items.
[0206] According to the technical solution of the embodiment of the present invention, for different recall strategies, by respectively establishing subtask models with recall accuracy, recall comprehensiveness, etc. as indicators, and by learning all subtask models simultaneously through multi-task learning to determine the Pareto optimal solution, the recall weights corresponding to each recall strategy are determined, thereby merging the recall results of each recall strategy according to the recall weights of each recall strategy, thereby ensuring the comprehensiveness and accuracy of item recall using a multi-channel recall strategy. In addition, when using a collaborative filtering algorithm for item recall, by introducing influencing factors such as item popularity or heat, user activity, and user operation time, the accuracy of the obtained item similarity or user similarity is improved, thereby improving the accuracy of the recall results.
[0207] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for recalling an item, It is characterized in that include: Acquire historical data, where the historical data indicates one or more of the following: user information, item information, user operations on items, and a sequence of items operated by the user; Based on the historical data, using each recall strategy of at least two groups of recall strategies, respectively determine one or more pre-recall items to be operated by the user and recall scores corresponding to the pre-recall items; According to the pre-recall items and the recall scores, subtask models corresponding to each group of recall strategies are respectively established, and the subtask models are used to determine the recall weight corresponding to each recall strategy in the recall strategy group, including: at least one subtask model corresponding to a group of recall strategies is evaluated by using recall accuracy, and at least one subtask model corresponding to a group of recall strategies is evaluated by using recall comprehensiveness; Based on a multi-task learning method, jointly learning all the sub-task models to determine the Pareto optimal solution of the recall weight; One or more recalled items are determined from the pre-recalled items according to the Pareto optimal solution of the recall score and the recall weight.
2. The item recall method according to claim 1, It is characterized in that The recall strategy is a collaborative filtering algorithm or a graph embedding algorithm; wherein, The collaborative filtering algorithm includes one or more of the following: an item-based collaborative filtering algorithm, a user-based collaborative filtering algorithm, a Swing algorithm, and an association rule algorithm; The graph embedding algorithm includes one or more of the following: EGES algorithm, Node2Vec algorithm, DeepWalk algorithm, LINE algorithm, and SDNE algorithm.
3. The item recall method according to claim 2, It is characterized in that Using the item-based collaborative filtering algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: Calculating the item similarity between any two items based on the item information to determine similar items corresponding to the items operated by the user; Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item; One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
4. The item recall method according to claim 3, It is characterized in that The item similarity is determined by the time difference between two items operated by the user, the number of items operated by the user, and the number of users operating the items.
5. The item recall method according to claim 2, It is characterized in that Using the user-based collaborative filtering algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items, including: Calculating the user similarity between any two users based on the user information and the user's operation behavior on the item, so as to determine similar users corresponding to the user based on the user similarity; Selecting items operated by the similar users as similar items; Determining a recall score corresponding to the similar item according to the user similarity and the scores given by the similar users to the similar items operated by the similar users; One or more of the similar items are selected as the pre-recall items according to the recall scores from high to low.
6. The item recall method according to claim 5, It is characterized in that The user similarity is determined by the number of items operated by two users and the number of operating users corresponding to the items operated by the two users.
7. The item recall method according to claim 2, It is characterized in that Using the Swing algorithm, determining one or more pre-recalled items to be operated by the user and the recall scores corresponding to the pre-recalled items includes: Calculate the item similarity between any two items based on the item information, user information, and the user's operation behavior on the items to determine similar items corresponding to the items operated by the user; Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item; One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
8. The item recall method according to claim 7, It is characterized in that The item similarity is determined by the number of users who have operated the item and the number of operated items corresponding to the users who have simultaneously operated the item.
9. The item recall method according to claim 2, It is characterized in that Using the graph embedding algorithm, determining one or more pre-recalled items to be operated by the user and recall scores corresponding to the pre-recalled items includes: generating an item pair according to the item sequence operated by the user, wherein the item pair indicates two different items; Constructing an item relationship graph according to the item pairs, wherein the nodes of the item relationship graph indicate the items, and the weights of the edges of the item relationship graph indicate one or more of the following information: the number of operations performed by the user on the items in the item pairs, and the attribute information of the items; Randomly walking the item relationship graph to generate one or more item sequences; According to the generated item sequence, the item vector is determined based on the Skip-Gram model to calculate the item similarity; Determining similar items corresponding to the items operated by the user according to the item similarity; Determining the recall score corresponding to the similar item according to the item similarity and the user's score on the operated item; One or more of the similar items are selected as pre-recall items corresponding to the user according to the recall scores in descending order.
10. The article recall method according to claim 9, It is characterized in that The similarity of the item vectors is calculated by constructing a faiss index.
11. An item recall device, It is characterized in that include: Data acquisition module, pre-recall module, subtask model building module, multi-task learning module, recalled item determination module; among them, The data acquisition module is used to acquire historical data, where the historical data indicates one or more of the following: user information, item information, user operations on items, and a sequence of items operated by the user; The pre-recall module is used to determine, based on the historical data, one or more pre-recall items to be operated by the user and the recall scores corresponding to the pre-recall items using each recall strategy of at least two groups of recall strategies; The multi-task learning module is used to establish a sub-task model corresponding to each group of recall strategies according to the pre-recall items and the recall scores, and the sub-task model is used to determine the recall weight corresponding to each recall strategy in the recall strategy group, including: at least one sub-task model corresponding to a group of recall strategies is evaluated by using the recall accuracy, and at least one sub-task model corresponding to a group of recall strategies is evaluated by using the recall comprehensiveness; The recalled item determination module is used to determine one or more recalled items from the pre-recalled items according to the recall score and the Pareto optimal solution of the recall weight.
12. An electronic device for item recall, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
13. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
