Object recommendation method and apparatus
By integrating the similarity and attribute information between a specified object and the object to be recommended, the recommendation weight is determined, which solves the problem of a single influencing factor in existing recommendation systems and improves the accuracy of recommendations and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU ALIBABA INT INTERNET IND CO LTD
- Filing Date
- 2022-03-30
- Publication Date
- 2026-07-14
AI Technical Summary
Existing recommendation systems consider only one factor when making recommendations, resulting in insufficient recommendation accuracy, which affects platform revenue and user experience.
By obtaining the similarity and attribute information between the specified object and the object to be recommended, the similarity fusion feature and the attribute fusion feature are fused to determine the recommendation weight, and the target object is recommended based on the recommendation weight.
It improves the efficiency of object recommendation and the relevance of target objects to users, thereby enhancing user stickiness.
Smart Images

Figure CN114637920B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of object recommendation technology, and in particular to an object recommendation method. Background Technology
[0002] With the continuous development of computer and internet technologies, various online platforms have emerged, among which recommendation platforms and social platforms are the most popular. Further optimization of recommendation and social platforms is inseparable from recommendation systems. Therefore, improving the performance of recommendation systems is of great significance.
[0003] In existing technologies, recommendation systems typically calculate the similarity between objects based on collaborative filtering or swing algorithms, and then recommend corresponding objects to users based on this similarity. However, these methods consider only a single influencing factor when making recommendations, which limits the accuracy of the recommendation system and affects the revenue of recommendation and social platforms, as well as the user experience. Summary of the Invention
[0004] In view of this, embodiments of this specification provide an object recommendation method. One or more embodiments of this specification also relate to an object recommendation apparatus, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, an object recommendation method is provided, comprising:
[0006] Obtain the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended;
[0007] Based on the aforementioned similarities, similarity fusion features are obtained; based on the aforementioned attribute information, attribute fusion features are obtained.
[0008] The similarity fusion feature and the attribute fusion feature are fused together, and the recommendation weight of each object to be recommended is determined based on the fusion result.
[0009] Based on the recommendation weight of each object to be recommended, the target object among the objects to be recommended is determined, and the target object is recommended to the target user.
[0010] Optionally, before obtaining similarity fusion features based on each of the aforementioned similarities and obtaining attribute fusion features based on each of the aforementioned attribute information, the method further includes:
[0011] Obtain a pre-trained object recommendation model, wherein the object recommendation model includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model;
[0012] Accordingly, obtaining similarity fusion features based on each of the aforementioned similarities, and obtaining attribute fusion features based on each of the aforementioned attribute information, includes:
[0013] Each of the aforementioned similarities is input into the similarity fusion sub-model for similarity fusion to obtain similarity fusion features;
[0014] The attribute information is input into the attribute fusion sub-model to perform attribute fusion and obtain attribute fusion features;
[0015] Accordingly, the process of fusing the similarity fusion feature and the attribute fusion feature, and determining the recommendation weight of each object to be recommended based on the fusion result, includes:
[0016] The similarity fusion feature and the attribute fusion feature are input into the feature fusion layer for fusion to obtain the fusion result;
[0017] The fusion result is input into the recommendation weight output sub-model to obtain the recommendation weight of each object to be recommended.
[0018] Optionally, before obtaining the pre-trained object recommendation model, the method further includes:
[0019] Obtain a first set of sample objects, a second set of sample objects, and a preset model to be trained, wherein the model to be trained includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model;
[0020] Extract multiple second sample objects from the second sample object set, and determine the sample similarity between the first sample object and each second sample object, as well as the sample attribute information of each second sample object;
[0021] The similarity scores of each sample are input into the similarity fusion sub-model for fusion to obtain sample similarity fusion features; the attribute information of each sample is input into the attribute fusion sub-model for fusion to obtain sample attribute fusion features.
[0022] The sample similarity fusion feature and the sample attribute fusion feature are input into the feature fusion layer for fusion to obtain the sample fusion result;
[0023] The sample fusion result is input into the recommendation weight output sub-model to obtain the prediction result for each second sample object;
[0024] The loss value is determined based on the prediction results and the weight labels carried by each second sample object. Based on the loss value, the model parameters of the similarity fusion sub-model, the attribute fusion sub-model, and the recommendation weight output sub-model in the model to be trained are adjusted. The step of extracting multiple second sample objects from the second sample object set is continued. When the preset training stopping condition is met, the trained model to be trained is determined as the object recommendation model.
[0025] Optionally, determining the loss value based on each prediction result and the weight label carried by each second sample object includes:
[0026] Based on the prediction results, the weight labels carried by each second sample object, and the ranking loss function, determine the first sub-loss value;
[0027] The second sub-loss value is determined based on the prediction results, the weight labels carried by each second sample object, and the mean squared error loss function.
[0028] The loss value is determined based on the first sub-loss value and the second sub-loss value.
[0029] Optionally, the second sample object carries a sorting label;
[0030] Accordingly, determining the first sub-loss value based on each prediction result, the weight label carried by each second sample object, and the ranking loss function includes:
[0031] Based on the prediction results, determine the predicted ranking of each second sample object;
[0032] Based on the predicted ranking and ranking label of each second sample object, determine the ranking difference value of each second sample object;
[0033] Based on the ranking difference value, the first sub-loss value is determined according to each prediction result, the weight label carried by each second sample object, and the ranking loss function.
[0034] Optionally, determining the first sub-loss value based on the ranking difference value, according to each prediction result, the weight label carried by each second sample object, and the ranking loss function, includes:
[0035] Determine whether the sorting difference value conforms to a preset sorting difference range;
[0036] If so, the prediction result corresponding to the ranking difference value and the weight label carried by the second sample object corresponding to the ranking difference value are input into the ranking loss function to determine the first sub-loss value.
[0037] Optionally, obtaining similarity fusion features based on each of the aforementioned similarities includes:
[0038] Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each similarity.
[0039] The similarity features are fused together to obtain similarity fusion features.
[0040] Optionally, the similarity includes multiple sub-similarity, which are calculated by using various preset similarity algorithms to compare the specified object with the object to be recommended.
[0041] Accordingly, the step of extracting features from each of the similarities to obtain the similarity features corresponding to each similarity includes:
[0042] For any given similarity, feature extraction is performed on each sub-similarity of that similarity to obtain the sub-similarity features corresponding to each sub-similarity.
[0043] By concatenating the sub-similar features, the corresponding similarity feature is obtained.
[0044] Optionally, obtaining the attribute fusion feature based on each of the attribute information includes:
[0045] Feature extraction is performed on each of the attribute information to obtain the attribute features corresponding to each attribute information;
[0046] The attribute features are fused together to obtain attribute fusion features.
[0047] Optionally, the attribute information includes multiple behavioral attribute information;
[0048] Accordingly, the step of extracting features from each of the attribute information to obtain the attribute features corresponding to each attribute information includes:
[0049] For any attribute information, feature extraction is performed on each behavioral attribute information in that attribute information to obtain the behavioral attribute features corresponding to each behavioral attribute information.
[0050] By concatenating the behavioral attribute features, the attribute feature corresponding to the attribute information is obtained.
[0051] Optionally, before fusing the similarity fusion feature and the attribute fusion feature, the method further includes:
[0052] Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each of the aforementioned similarities, and feature extraction is performed on each of the aforementioned attribute information to obtain the attribute features corresponding to each of the aforementioned attribute information;
[0053] Extract the correlation information between each of the similarity features and each of the attribute features;
[0054] The fusion of the similarity fusion feature and the attribute fusion feature includes:
[0055] Based on the correlation information, the similarity fusion feature and the attribute fusion feature are fused to obtain a fusion result.
[0056] According to a second aspect of the embodiments of this specification, an object recommendation apparatus is provided, comprising:
[0057] The first acquisition module is configured to acquire the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended;
[0058] The fusion module is configured to obtain similarity fusion features based on the aforementioned similarities and to obtain attribute fusion features based on the aforementioned attribute information.
[0059] The determination module is configured to fuse the similarity fusion feature and the attribute fusion feature, and determine the recommendation weight of each object to be recommended based on the fusion result;
[0060] The recommendation module is configured to determine the target object among the target objects based on the recommendation weight of each target object, and recommend the target object to the target user.
[0061] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising:
[0062] Memory and processor;
[0063] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the above-described object recommendation method.
[0064] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the object recommendation method described above.
[0065] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the object recommendation method described above.
[0066] This specification provides an object recommendation method that obtains the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended; obtains similarity fusion features based on the similarity scores, and obtains attribute fusion features based on the attribute information; fuses the similarity fusion features and the attribute fusion features, and determines the recommendation weight of each object to be recommended based on the fusion result; determines the target object among the objects to be recommended based on the recommendation weight of each object to be recommended, and recommends the target object to the target user. By fusing the similarity between a specified object and each object to be recommended, and the attribute information of each object to be recommended, the recommendation weight of each object to be recommended is determined. Finally, based on the recommendation weight, the target object to be recommended to the target user is determined, improving the efficiency of object recommendation and the relevance between the target object and the target user, further enhancing user stickiness. Attached Figure Description
[0067] Figure 1 This is a flowchart illustrating an object recommendation method provided in one embodiment of this specification;
[0068] Figure 2 This is a flowchart illustrating the process of training an object recommendation model in an object recommendation method provided in one embodiment of this specification.
[0069] Figure 3 This is a schematic diagram of the structure of an object recommendation model in an embodiment of the object recommendation method provided in this specification;
[0070] Figure 4 This is a schematic diagram of the structure for selecting a second sample object in an object recommendation method provided in one embodiment of this specification;
[0071] Figure 5 This is a flowchart illustrating the processing procedure of an object recommendation method provided in one embodiment of this specification;
[0072] Figure 6 This is a schematic diagram of the structure of an object recommendation device provided in one embodiment of this specification;
[0073] Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0074] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0075] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0076] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0077] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0078] i2i recall: short for item to item recall, is a general term for algorithms that recall similar objects by triggering an object.
[0079] bad case: a relatively poor result.
[0080] ADAM (Adaptive Moment Estimation): An optimization algorithm that combines momentum updates and adaptive learning rate adjustments.
[0081] Then, a brief description of the recommended methods for the objects provided in this manual will be given.
[0082] With the continuous development of computer and internet technologies, various online platforms have emerged, among which recommendation platforms and social platforms are the most popular. Further optimization of recommendation and social platforms is inseparable from recommendation systems. Therefore, improving the performance of recommendation systems is of great significance.
[0083] In existing technologies, recommendation systems typically calculate the similarity between objects based on collaborative filtering or swing algorithms, and then recommend corresponding objects to users based on this similarity. Taking products as an example, this section explains how collaborative filtering or swing algorithms calculate the similarity between objects.
[0084] Traditional i2i recall schemes calculate the similarity between products based on collaborative filtering algorithms. Collaborative filtering algorithms typically vectorize products by statistically analyzing information related to user behavior, and then measure the similarity between these vectors using a distance metric function. Common methods for measuring vector similarity include inner product and Jaccard distance. For example, by using all users' preferences for products or information, the similarity between products is discovered, and then similar products are recommended to users based on their historical preferences. Collaborative filtering algorithms mainly consist of two steps: calculating the similarity between products and generating a recommendation list for users based on product similarity and their historical behavior. The following Equation 1 is generally used to define product similarity:
[0085] (Equation 1)
[0086] Where i represents product i, j represents product j, and X ij Let N(i) represent the similarity between product i and product j, and N(j) represent the number of users who have interacted with product i and product j, respectively. In collaborative filtering, two products are similar because they are liked by many users; the higher the similarity, the more popular the two products are. Its drawback is its poor noise resistance, resulting in some seemingly inaccurate bad cases in the calculated results.
[0087] The Swing algorithm, a recently developed and increasingly mainstream I2I solution, measures the similarity between items by discovering "swing" structures in the behavioral data graph. Compared to collaborative filtering algorithms, it offers greater stability. For example, Swing's graph-based matching algorithm has a process similar to collaborative filtering: first, it calculates the similarity between items, and then generates a recommendation list based on the item similarity and the user's historical behavior. Its core improvement lies in defining the similarity between items. The Swing algorithm mines "swing" shaped corner structures in the user behavior graph. These corner structures are still two-dimensional graph structures, requiring at least two edges to form a corner, making them structurally much more "stable" than the single edge determined by collaborative filtering. Therefore, Swing is generally considered more robust than collaborative filtering. Its drawback is its complete reliance on user behavior data, making it difficult to integrate information such as the attributes of triggering and target items.
[0088] In practical recall algorithm development, for the same triggered product, the top-ranked product sets calculated using different distance metrics or Swing algorithms often differ, and the similarities they focus on generally also differ. How to integrate these different similarity scores to ensure the final rating better serves the user becomes a challenging problem in practical applications. In other words, the methods described above, considering only a single influencing factor during recommendation, limit the accuracy of the recommendation system, impacting the revenue of recommendation and social platforms, as well as user experience.
[0089] Therefore, this specification provides an object recommendation method that obtains the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended; obtains similarity fusion features based on the similarity scores, and obtains attribute fusion features based on the attribute information; fuses the similarity fusion features and the attribute fusion features, and determines the recommendation weight of each object to be recommended based on the fusion result; determines the target object among the objects to be recommended based on the recommendation weight of each object to be recommended, and recommends the target object to the target user. By fusing the similarity between the specified object and each object to be recommended, and the attribute information of each object to be recommended, the recommendation weight of each object to be recommended is determined. Finally, based on the recommendation weight, the target object to be recommended to the target user is determined, which improves the efficiency of object recommendation and the relevance between the target object and the target user, further enhancing user stickiness.
[0090] This specification provides an object recommendation method, and also relates to an object recommendation apparatus, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0091] See Figure 1 , Figure 1 A flowchart of an object recommendation method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0092] Step 102: Obtain the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended.
[0093] The entity that implements the object recommendation method can be a computing device with object recommendation functionality, such as a server or terminal with object recommendation functionality.
[0094] Specifically, the object can be any kind of thing, such as a video, novel, product, or store; the specified object refers to objects that the user has historically interacted with, such as stores the user has browsed, products the user has purchased, or videos the user has watched; the object to be recommended refers to the object that needs to be recommended to the user, or it can be an object recalled based on the specified object. For example, if a user clicks on dress 1 on a shopping platform, the shopping platform will use an i2i algorithm to recall a set of more dresses xs based on the clicked dress 1, where dress 1 is the triggering product and dresses xs is the target product set; similarity refers to the degree of similarity between the specified object and the object to be recommended, obtained based on a certain similarity algorithm; attribute information can be information related to the attributes of the object to be recommended, such as color, value, weight, and volume.
[0095] In practical applications, there are multiple ways to obtain the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended. For example, an operator can send an instruction to the execution entity to recommend an object, or send an instruction to obtain the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended. Upon receiving the instruction, the execution entity begins to obtain the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended. Alternatively, the server can automatically obtain the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended, at preset intervals. For example, after a preset interval, a server with object recommendation functionality can automatically obtain the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended, or after a preset interval, a terminal with object recommendation functionality can automatically obtain the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended, stored locally. This specification does not limit the method of obtaining the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended.
[0096] In one or more optional embodiments of this specification, when obtaining the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended, the specified object corresponding to the user can be obtained first. Then, based on the specified object and the i2i algorithm, multiple objects to be recommended related to the specified object can be obtained. Further, according to a preset similarity algorithm, such as a collaborative filtering algorithm or a cosine similarity algorithm, the similarity between the specified object and each object to be recommended is calculated. And the attribute information of each object to be recommended is obtained from the object attribute feature table.
[0097] Step 104: Obtain similarity fusion features based on the aforementioned similarities, and obtain attribute fusion features based on the aforementioned attribute information.
[0098] Specifically, similarity fusion features refer to features obtained by fusing the similarity between a specified object and each object to be recommended; attribute fusion features refer to features obtained by fusing the attribute information of each object to be recommended.
[0099] In one or more optional embodiments of this specification, after obtaining the similarity between the specified object and each object to be recommended, as well as the attribute information of each object to be recommended, the similarities can be concatenated to obtain a fused similarity, and then feature extraction can be performed on the fused similarity to obtain similarity fusion features; the attribute information can be concatenated to obtain fused attribute information, and then feature extraction can be performed on the fused attribute information to obtain attribute fusion features.
[0100] In one or more optional embodiments of this specification, to improve the accuracy and robustness of the similarity fusion features, features can be extracted from each similarity first, and then concatenated. That is, the specific implementation process of obtaining the similarity fusion features based on each similarity can be as follows:
[0101] Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each similarity.
[0102] The similarity features are fused together to obtain similarity fusion features.
[0103] Specifically, similarity features refer to representations that characterize certain features of similarity.
[0104] In practical applications, after obtaining the similarity scores between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended, feature extraction is performed on each similarity score to obtain the corresponding similarity features. This can be done by extracting features from each similarity score one by one, or by extracting features from each similarity score simultaneously. Then, the obtained similarity features are fused, for example, by concatenating the similarity features according to a preset fusion order to obtain the fused similarity features. This initial feature extraction makes the similarity features more accurate, and fusing the various similarity features further improves the accuracy of the fused similarity features.
[0105] It should be noted that when similarity calculation is performed using a single preset similarity algorithm, for any object to be recommended, there is only one similarity between the object to be recommended and the specified object. In this case, feature extraction can be directly performed on each similarity to obtain the similarity features corresponding to each similarity. When similarity calculation is performed using multiple preset similarity algorithms, for any object to be recommended, multiple sub-similarity scores will be obtained between the object to be recommended and the specified object. That is, the similarity score contains multiple sub-similarity scores. In this case, feature extraction needs to be performed on the multiple sub-similarity scores between the object to be recommended and the specified object to obtain multiple sub-similarity features, and then further, the overall similarity features can be obtained. In other words, when the similarity score includes multiple sub-similarity scores, and these multiple sub-similarity scores are calculated using various preset similarity algorithms on the specified object and the object to be recommended, the specific implementation process of extracting features from each of the similarity scores to obtain the similarity features corresponding to each similarity score can be as follows:
[0106] For any given similarity, feature extraction is performed on each sub-similarity of that similarity to obtain the sub-similarity features corresponding to each sub-similarity.
[0107] By concatenating the sub-similar features, the corresponding similarity feature is obtained.
[0108] Specifically, sub-similarity refers to the similarity between a specified object and an object to be recommended, determined by any one of a variety of preset similarity algorithms; sub-similarity features refer to representations that characterize certain features of sub-similarity.
[0109] In practical applications, various preset similarity algorithms, such as collaborative filtering and graph-based matching algorithms, can be pre-set to calculate the sub-similarity between a specified object and each object to be recommended. That is, each object to be recommended has multiple sub-similarity relationships with the specified object. For any given object to be recommended and its corresponding sub-similarity relationships with the specified object, features are extracted from each sub-similarity relationship to obtain the sub-similarity features corresponding to each sub-similarity relationship. Furthermore, these multiple sub-similarity features are concatenated to obtain the similarity features corresponding to the similarity between the object to be recommended and the specified object. In this way, determining the similarity features through multiple sub-similarity relationships can improve the accuracy of the similarity features to a certain extent, further enhancing the object recommendation effect.
[0110] For example, there are two preset similarity algorithms: collaborative filtering and cosine similarity; and two objects to be recommended: a first object and a second object. Based on the collaborative filtering algorithm, the first sub-similarity between the specified object and the first object to be recommended, and the second sub-similarity between the specified object and the second object to be recommended, are obtained. Based on the cosine similarity algorithm, the third sub-similarity between the specified object and the first object to be recommended, and the fourth sub-similarity between the specified object and the second object to be recommended, are obtained. That is, the first similarity between the specified object and the first object to be recommended includes the first and third sub-similarity, and the second similarity between the specified object and the second object to be recommended includes the second and fourth sub-similarity. For the first similarity: feature extraction is performed on the first sub-similarity and the third sub-similarity respectively to obtain the first sub-similarity feature corresponding to the first sub-similarity and the third sub-similarity feature corresponding to the third sub-similarity. The first sub-similarity feature and the third sub-similarity feature are concatenated to obtain the first similarity feature corresponding to the first similarity. For the second similarity: feature extraction is performed on the second sub-similarity and the fourth sub-similarity respectively to obtain the second sub-similarity feature corresponding to the second sub-similarity and the fourth sub-similarity feature corresponding to the fourth sub-similarity. The second sub-similarity feature and the fourth sub-similarity feature are concatenated to obtain the second similarity feature corresponding to the second similarity.
[0111] In one or more optional embodiments of this specification, to improve the accuracy and robustness of the attribute fusion features, feature extraction can be performed on each attribute information first, followed by concatenation. That is, the specific implementation process of obtaining attribute fusion features based on each attribute information can be as follows:
[0112] Feature extraction is performed on each of the attribute information to obtain the attribute features corresponding to each attribute information;
[0113] The attribute features are fused together to obtain attribute fusion features.
[0114] Specifically, attribute features refer to representations that characterize certain features of attribute information.
[0115] In practical applications, after obtaining the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended, feature extraction is performed on each attribute to obtain the corresponding attribute features. This can be done by extracting features from each attribute one by one, or by extracting features from each attribute simultaneously. Then, the obtained attribute features are fused, for example, by concatenating the attribute features according to a preset fusion order to obtain the attribute fusion features. This initial feature extraction makes the attribute features more accurate, and fusing the attribute features further improves the accuracy of the attribute fusion features.
[0116] It should be noted that when obtaining attribute information of an object to be recommended from a preset perspective, for any given object, there is only one attribute. In this case, feature extraction can be directly performed on each attribute to obtain the attribute features corresponding to each attribute. When obtaining attribute information from multiple preset perspectives, for any given object, multiple sub-attribute information of that object will be obtained, meaning the attribute information contains multiple sub-attribute information. In this case, feature extraction needs to be performed on the multiple sub-attribute information of the object to obtain multiple sub-attribute features, and then the attribute features are obtained. That is, when the attribute information includes multiple behavioral attribute information, the specific implementation process of extracting features from each attribute to obtain the attribute features corresponding to each attribute can be as follows:
[0117] For any attribute information, feature extraction is performed on each behavioral attribute information in that attribute information to obtain the behavioral attribute features corresponding to each behavioral attribute information.
[0118] By concatenating the behavioral attribute features, the attribute feature corresponding to the attribute information is obtained.
[0119] Specifically, sub-attribute information refers to the attribute information between objects to be recommended obtained through any one of multiple preset angles; sub-attribute features refer to the representation that characterizes certain features of sub-attribute information.
[0120] In practical applications, multiple preset angles or aspects for acquiring attribute information can be pre-set, such as color, price, and location, to obtain sub-attribute information among the objects to be recommended. That is, each object to be recommended has multiple sub-attribute information. For any given object, feature extraction is performed on each of these sub-attribute information to obtain the corresponding sub-attribute features. Furthermore, these multiple sub-attribute features are concatenated to obtain the attribute features corresponding to the object's attribute information. Thus, determining attribute features through multiple sub-attribute features can improve the accuracy of attribute features to a certain extent, further enhancing the object recommendation effect.
[0121] For example, if the target is a restaurant, there are three preset perspectives: distance from the user, average spending per person, and cuisine. For any restaurant to be recommended, the first sub-attribute information is obtained based on the preset perspective of distance from the user; the second sub-attribute information is obtained based on the preset perspective of average spending per person; and the third sub-attribute information is obtained based on the preset perspective of cuisine. In other words, the attribute information of the restaurant to be recommended includes the first, second, and third sub-attribute information. Then, feature extraction is performed on the first, second, and third sub-attribute information respectively, resulting in the first sub-attribute feature corresponding to the first sub-attribute information, the second sub-attribute feature corresponding to the second sub-attribute information, and the third sub-attribute feature corresponding to the third sub-attribute information. These three sub-attribute features are then concatenated to obtain the attribute features corresponding to the attribute information of the restaurant to be recommended.
[0122] Step 106: Fuse the similarity fusion feature and the attribute fusion feature, and determine the recommendation weight of each object to be recommended based on the fusion result.
[0123] Specifically, the fusion result refers to the result obtained by fusing similarity fusion features and attribute fusion features; the recommendation weight represents the weight or value by which the object to be recommended can be recommended.
[0124] In one or more optional embodiments of this specification, based on the obtained similarity fusion features and attribute fusion features, the similarity fusion features and attribute fusion features can be directly fused to obtain a fusion result. Further, based on a preset weighting algorithm, the recommendation weight of each object to be recommended is determined according to the fusion result.
[0125] In one or more optional embodiments of this specification, the relevance information corresponding to each similarity and attribute information may be obtained first, and then the relevance information, similarity fusion features, and attribute fusion features may be fused to obtain a fusion result. That is, before fusing the similarity fusion features and the attribute fusion features, the method further includes:
[0126] Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each of the aforementioned similarities, and feature extraction is performed on each of the aforementioned attribute information to obtain the attribute features corresponding to each of the aforementioned attribute information;
[0127] Extract the correlation information between each of the similarity features and each of the attribute features;
[0128] Accordingly, the specific implementation process of fusing the similarity fusion feature and the attribute fusion feature can be as follows:
[0129] Based on the correlation information, the similarity fusion feature and the attribute fusion feature are fused to obtain a fusion result.
[0130] Specifically, similarity features refer to representations of certain characteristics of similarity; attribute features refer to representations of certain characteristics of attribute information; and relevance information refers to information about attribute features and whether the user has interacted with the recommended object.
[0131] In practical applications, feature extraction is performed on each similarity level to obtain the corresponding similarity features; similarity features are also extracted on each attribute information to obtain the corresponding attribute features. Then, following a preset extraction strategy, the correlation information between each similarity feature and each attribute feature is extracted. The relevant information, similarity fusion features, and attribute fusion features are then fused to obtain the fusion result. Further, based on a preset weighting algorithm, the recommendation weight for each object to be recommended is determined according to the fusion result. Thus, by extracting the correlation information between each similarity feature and each attribute feature and fusing this correlation information into the fusion result, the reliability and confidence of the fusion result are higher, which is beneficial for improving recommendation efficiency.
[0132] Step 108: Based on the recommendation weight of each object to be recommended, determine the target object among the objects to be recommended, and recommend the target object to the target user.
[0133] Specifically, the target object refers to the object to be recommended to the user.
[0134] In practical applications, after obtaining the recommendation weights of each candidate object, target objects are selected from the pool of candidates based on preset filtering conditions and their respective recommendation weights. For example, the recommendation weights can be arranged from largest to smallest, and the top N videos with the highest recommendation weights are identified as target videos, where N is a positive integer. Alternatively, the recommendation weights can be arranged from smallest to largest, and the bottom M videos with the highest recommendation weights are identified as target videos, where M is a positive integer. Another approach is to set a threshold, identifying candidates with recommendation weights greater than the threshold as target objects. After determining the target objects, they are recommended to the target users.
[0135] In one possible implementation of the embodiments of this specification, before fusing the similarity and attribute information separately, a pre-trained object recommendation model can be obtained. Then, the similarity and attribute information are input into the object recommendation model, which performs fusion and other processing on the similarity and attribute information to obtain the recommendation weights for each object to be recommended. That is, before obtaining similarity fusion features based on the similarities and attribute fusion features based on the attribute information, the method further includes:
[0136] Obtain a pre-trained object recommendation model, wherein the object recommendation model includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model;
[0137] Accordingly, obtaining similarity fusion features based on each of the aforementioned similarities, and obtaining attribute fusion features based on each of the aforementioned attribute information, includes:
[0138] Each of the aforementioned similarities is input into the similarity fusion sub-model for similarity fusion to obtain similarity fusion features;
[0139] The attribute information is input into the attribute fusion sub-model to perform attribute fusion and obtain attribute fusion features;
[0140] Accordingly, the process of fusing the similarity fusion feature and the attribute fusion feature, and determining the recommendation weight of each object to be recommended based on the fusion result, includes:
[0141] The similarity fusion feature and the attribute fusion feature are input into the feature fusion layer for fusion to obtain the fusion result;
[0142] The fusion result is input into the recommendation weight output sub-model to obtain the recommendation weight of each object to be recommended.
[0143] Specifically, the object recommendation model refers to the pre-trained neural network model; the similarity fusion sub-model refers to the part of the object recommendation model that processes each similarity to obtain similarity features; the attribute fusion sub-model refers to the part of the object recommendation model that processes each attribute information to obtain attribute features; the feature fusion layer refers to the part of the object recommendation model that processes attribute features and similarity features to obtain the fusion result; and the recommendation weight output sub-model is the part that processes the fusion result to obtain the recommendation weight.
[0144] In practical applications, after obtaining the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended, a pre-trained object recommendation model is obtained, which includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model. The similarity between the specified object and each object to be recommended is then input into the similarity fusion sub-model, which performs similarity fusion and outputs similarity fusion features. The attribute information of each object to be recommended is then input into the attribute fusion sub-model, which performs attribute fusion and outputs attribute fusion features. Next, the similarity fusion features and attribute fusion features are input into the feature fusion layer, which performs fusion to obtain the fusion result. Finally, the fusion result is input into the recommendation weight output sub-model, which analyzes and processes the result to output the recommendation weight for each object to be recommended. By processing the similarity and attribute information using a pre-trained object recommendation model, the speed and accuracy of obtaining recommendation weights can be improved.
[0145] It should be noted that after inputting each similarity into the similarity fusion sub-model, the similarity fusion sub-model first extracts features from each similarity to obtain the similarity features of each similarity, and then fuses the similarity features to obtain and output the similarity fusion feature; when inputting each attribute information into the attribute fusion sub-model, the attribute fusion sub-model first extracts features from each attribute information to obtain the attribute features of each attribute information, and then fuses the attribute features to obtain and output the attribute fusion feature.
[0146] Before obtaining a pre-trained object recommendation model, it is necessary to train the model to be trained in order to obtain an object recommendation model with the function of determining recommendation weights. That is, before obtaining the pre-trained object recommendation model, the following steps are also included:
[0147] Obtain a first set of sample objects, a second set of sample objects, and a preset model to be trained, wherein the model to be trained includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model;
[0148] Extract multiple second sample objects from the second sample object set, and determine the sample similarity between the first sample object and each second sample object, as well as the sample attribute information of each second sample object;
[0149] The similarity scores of each sample are input into the similarity fusion sub-model for fusion to obtain sample similarity fusion features; the attribute information of each sample is input into the attribute fusion sub-model for fusion to obtain sample attribute fusion features.
[0150] The sample similarity fusion feature and the sample attribute fusion feature are input into the feature fusion layer for fusion to obtain the sample fusion result;
[0151] The sample fusion result is input into the recommendation weight output sub-model to obtain the prediction result for each second sample object;
[0152] The loss value is determined based on the prediction results and the weight labels carried by each second sample object. Based on the loss value, the model parameters of the similarity fusion sub-model, the attribute fusion sub-model, and the recommendation weight output sub-model in the model to be trained are adjusted. The step of extracting multiple second sample objects from the second sample object set is continued. When the preset training stopping condition is met, the trained model to be trained is determined as the object recommendation model.
[0153] Specifically, the model to be trained refers to a pre-specified neural network model; the first sample object refers to the training sample corresponding to the specified object; the second sample object refers to the training sample corresponding to the object to be recommended; the set of second sample objects refers to a collection of multiple second sample objects; sample similarity refers to the degree of similarity between the first sample object and the second sample object obtained based on a certain similarity algorithm; sample attribute information refers to information related to the attributes of the second sample object, and may also be user behavior attribute information of the second sample object; sample similarity fusion feature refers to the feature obtained by fusing the sample similarity of the first sample object with each of the second sample objects; sample attribute fusion feature refers to the feature obtained by fusing the sample attribute information of each of the second sample objects; sample fusion result refers to the result obtained by fusing the sample similarity fusion feature and the sample attribute fusion feature; prediction result refers to the output of the recommendation weight output sub-model; weight label refers to the true recommendation weight corresponding to the second sample object, that is, the true value corresponding to the prediction result; the training stopping condition may be that the loss value is less than or equal to a preset threshold, or that the number of iterations reaches a preset iteration value.
[0154] In practical applications, there are multiple ways to obtain the first sample object, the second sample object set, and the preset training model. For example, the operator can send a training instruction for the training model to the execution entity, or send an instruction to obtain the first sample object, the second sample object set, and the preset training model. Upon receiving the instruction, the execution entity begins to obtain the first sample object, the second sample object set, and the preset training model. Alternatively, the server can automatically obtain the first sample object, the second sample object set, and the preset training model at preset intervals. For example, after a preset interval, a server with model training capabilities can automatically obtain the first sample object, the second sample object set, and the preset training model from a specified access area; or after a preset interval, a terminal with model training capabilities can automatically obtain the first sample object, the second sample object set, and the preset training model stored locally. This specification does not limit the method of obtaining the first sample object, the second sample object set, and the preset training model.
[0155] After acquiring the first set of sample objects, the second set of sample objects, and the preset model to be trained, multiple second sample objects are extracted from the second set of sample objects. Then, the similarity between the first sample object and each second sample object is calculated according to a preset similarity algorithm. For example, user behavior data on the first and second sample objects is acquired, and different behavior scores are defined for different behaviors based on preset behavior indicators. After weighting, the sample similarity between the first and second sample objects is obtained. Sample attribute information for each second sample object is also acquired from the object attribute feature table. Further, the model to be trained is trained based on the sample similarity and sample attribute information to obtain an object recommendation model. The sample similarity can be input into a similarity fusion sub-model for fusion to obtain sample similarity fusion features, and the sample attribute information can be input into an attribute fusion sub-model for fusion to obtain sample attribute fusion features. Then, the sample similarity fusion features and sample attribute fusion features are input into a feature fusion layer for fusion to obtain a sample fusion result. Finally, the sample fusion result is input into a recommendation weight output sub-model for processing to obtain the prediction result for each second sample object. Then, based on the prediction results, the weight labels carried by each second sample object, and the preset loss function, the loss value is determined. If the preset training stopping condition is not met, the model parameters of the model to be trained—that is, the model parameters of the similarity fusion sub-model, the attribute fusion sub-model, and the recommendation weight output sub-model—are adjusted according to the loss value. Then, multiple second sample objects are extracted from the second sample object set again for the next round of training. If the preset training stopping condition is met, the trained model is determined as the object recommendation model. In this way, by training the model using the sample similarity between the first and second sample objects, as well as the sample attribute information of the second sample objects, the accuracy and speed of determining the recommendation weights of the object recommendation model can be improved, thus enhancing the robustness of the object recommendation model.
[0156] It should be noted that the weight labels are determined based on the behavioral data of the first sample object and the second sample objects. For example, by obtaining a user's behavioral data on the first sample object and each of the second sample objects, different behavioral scores are defined for different behaviors according to preset behavioral indicators. After weighting, the recommendation weight between the first sample object and each of the second sample objects is obtained, which is also the weight label carried by each of the second sample objects.
[0157] In one possible implementation of the embodiments of this specification, in order to improve the robustness of the recommendation model, when determining the loss value, a ranking loss value and a mean squared error loss value can be determined, and then the loss value can be determined based on the ranking loss value and the mean squared error loss value. That is, determining the loss value based on each prediction result and the weight label carried by each second sample object specifically includes:
[0158] Based on the prediction results, the weight labels carried by each second sample object, and the ranking loss function, determine the first sub-loss value;
[0159] The second sub-loss value is determined based on the prediction results, the weight labels carried by each second sample object, and the mean squared error loss function.
[0160] The loss value is determined based on the first sub-loss value and the second sub-loss value.
[0161] Specifically, the ranking loss function refers to the pre-set loss function used to determine the ranking of each second sample object; the first sub-loss value is the ranking loss value; the mean squared error loss function refers to the pre-set loss function used to determine the prediction result of each second sample object; the second sub-loss value is the mean squared error loss value.
[0162] In practical applications, the sample similarity and prediction results of any two second sample objects can be input into the ranking loss function to obtain the first sub-loss value, as shown in Equation 2. The sample similarity and prediction results of each second sample object can be input into the mean squared error loss function to obtain the second sub-loss value, as shown in Equation 3. Then, calculations are performed on the first and second sub-loss values, such as subtraction, addition, or weighted summation, to obtain the final loss value.
[0163] (Equation 2)
[0164] (Equation 3)
[0165] In Equations 2 and 3, loss1(s,t) represents the first sub-loss value, s represents the first sample object, t represents the current second sample object, t1 represents any second sample object, f(s,t) represents the prediction result corresponding to the current second sample object, f(s,t1) represents the prediction result corresponding to any second sample object, w represents the weight label carried by the current second sample object, w1 represents the weight label carried by any second sample object, loss2(s,t) represents the second sub-loss value, and n represents the number of prediction results.
[0166] In one possible implementation of the embodiments of this specification, when determining the first sub-loss value, the ranking difference value of each second sample object can be determined first, and then the first sub-loss value can be determined based on the ranking difference value, the prediction result, the weight label, and the ranking loss function. That is, when the second sample object carries a ranking label, the specific implementation process of determining the first sub-loss value based on the prediction result, the weight label carried by each second sample object, and the ranking loss function can be as follows:
[0167] Based on the prediction results, determine the predicted ranking of each second sample object;
[0168] Based on the predicted ranking and ranking label of each second sample object, determine the ranking difference value of each second sample object;
[0169] Based on the ranking difference value, the first sub-loss value is determined according to each prediction result, the weight label carried by each second sample object, and the ranking loss function.
[0170] Specifically, the ranking label refers to the actual ranking of each second sample object; the predicted ranking refers to the ranking of the second sample objects determined based on the prediction results; and the ranking difference value refers to the difference between the ranking label and the predicted ranking.
[0171] In practical applications, when extracting multiple second sample objects from a set of second sample objects, these objects are labeled with ranking tags. After obtaining the prediction results for each second sample object, they are ranked based on these predictions to obtain the predicted ranking. Then, the predicted ranking and ranking tags of each second sample object are compared to obtain the ranking difference value. Further, based on the ranking difference value, prediction results, weight labels, and ranking loss function, the first sub-loss value is determined. Thus, determining the first sub-loss value based on the ranking difference value improves the efficiency of its determination and enhances model training efficiency.
[0172] In one possible implementation of the embodiments of this specification, since simple samples have no benefit to model updates and difficult samples can cause model training to collapse, the first sub-loss is calculated using only samples within a certain range. This first sub-loss can only be used to learn the ranking relationships between samples. That is, after determining the ranking difference value of each second sample object based on the predicted ranking, the weight label carried by each second sample object, and the ranking label, the method further includes:
[0173] Determine whether the sorting difference value conforms to a preset sorting difference range;
[0174] If so, the prediction result corresponding to the ranking difference value and the weight label carried by the second sample object corresponding to the ranking difference value are input into the ranking loss function to determine the first sub-loss value.
[0175] In practical applications, when determining the first sub-loss value, the prediction results need to be filtered: the ranking difference value is compared with a preset ranking difference range. If the ranking difference value falls within the preset ranking difference range, the prediction result corresponding to the ranking difference value and the sample similarity are input into the ranking loss function to determine the first sub-loss value; if the ranking difference value does not fall within the preset ranking difference range, the first sub-loss value of the prediction result corresponding to the ranking difference value is set to 0. As shown in Equation 4.
[0176] (Equation 4)
[0177] In Equation 4, loss3(s,t) represents the first sub-loss value, s represents the first sample object, t represents the current second sample object, t1 represents any second sample object, f(s,t) represents the prediction result corresponding to the current second sample object, f(s,t1) represents the prediction result corresponding to any second sample object, w represents the prediction weight carried by the current second sample object, w1 represents the prediction weight carried by any second sample object, tf.sign(w-w1)*(f(s,t1)-f(s,t)) represents the current ranking difference value corresponding to the current second sample object, m1 represents the lower limit of the preset ranking difference range, and m2 represents the upper limit of the preset ranking difference range.
[0178] It should be noted that when determining the loss value based on the first sub-loss value and the second sub-loss value, the first sub-loss value can be added to the product of the second sub-loss value and the learning rate to obtain the loss value, as shown in Equation 5.
[0179] (Equation 5)
[0180] In Equation 5, LOSS(s,t) is the loss value; loss4(s,t) is the first sub-loss value, which can be calculated by Equation 2 or Equation 4, i.e. loss1(s,t) or loss3(s,t); loss2(s,t) is the second sub-loss value, which can be calculated by Equation 3; α is the preset learning rate.
[0181] Figure 2 This is a flowchart illustrating the object recommendation model training process in an embodiment of the object recommendation method provided in this specification:
[0182] Step 1, Data Input: Analyze user behavior data such as clicks, inquiries, and payments related to the first sample object. By defining the behavior of the same user within a certain time range as relevant behavior, a batch of relevant second sample objects, i.e., the second sample object set, is mined. Then, based on a preset similarity algorithm, the similarity between the first sample object (s) and each second sample object (t1, t2, ..., tt3) is calculated. xThe similarity between the first and second sample objects is calculated; then, the user's subsequent behavior data for each second sample object is monitored; then, based on preset indicators, different behavior scores are defined for different behaviors, and after weighting, the weight labels between the first and second sample objects are obtained as the edge information of the graph, that is, the weight labels (w1, w2, ..., w...) carried by each second sample object are determined. x Finally, the attribute information of each second sample object is retrieved from the object attribute feature table as point information, and a similarity graph is constructed as the model input data. The sample similarity between the first sample object and each second sample object, as well as the sample attribute information and weight labels of each second sample object, are determined.
[0183] Step 2: Model Construction: Construct a trainable model comprising a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model. This trainable model can be a deep ranking model with a bottom-level dual-tower structure and a top-level fusion layer, used to better fuse numerous similarity and attribute information. First, a similarity tower structure is constructed to learn and fuse numerous similarities calculated using various predefined algorithms. Then, a dual-tower structure for subsequent behavior prediction is constructed to mine the correlation between the attribute features of the second sample object and whether the user will subsequently engage in behavior. Finally, a top-level fusion network is constructed to fuse the outputs of the bottom-level dual towers, aiming to discover second sample objects that have high similarity to the first sample object and a high probability of subsequent user behavior. A detailed model architecture diagram is attached. Figure 3 , Figure 3 This is a schematic diagram of the structure of an object recommendation model provided in one embodiment of this specification. The object recommendation model has the same structure as the model to be trained, and the model structure is explained using the object recommendation model. The object recommendation model includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model. The similarity fusion sub-model takes similarity as input and includes an embedding layer, a fusion layer, and a processing area for adding corresponding elements. The attribute fusion sub-model takes attribute information as input and includes an embedding layer, a fusion layer, and a feature fusion layer including feature fusion layer 1 and feature fusion layer 2. The recommendation weight output sub-model outputs recommendation weights. In addition, the object recommendation model also includes a relevance extraction processing area, used to extract the relevance information between each similarity feature and each attribute feature.
[0184] Step 3: The improved ranking loss and mean squared error loss are used to guide model parameter updates. This involves updating the model parameters and optimizing them using gradient descent. First, the ranking loss is determined, calculated only using moderately difficult samples. Since easy samples offer no benefit to model updates, and difficult samples can cause training failures, only samples within the boundary range are used to calculate the loss. This loss is only used to learn the ranking relationships between samples. Then, the mean squared error loss is incorporated. This loss limits the numerical difference between the network's output and the target value, preventing output overflow and effectively enhancing training stability. Finally, the ADAM optimizer is used to optimize the model parameters by minimizing the loss function, outputting the final object recommendation model. Here, "easy samples" refer to samples where the ranking relationship output by the model is correct and highly differentiated, indicating easy differentiation; "difficult samples" refer to samples where the ranking relationship output by the model is incorrect and highly differentiated, indicating difficult differentiation. Detailed definitions can be found in the appendix. Figure 4 , Figure 4 This is a schematic diagram of the structure of selecting a second sample object in an object recommendation method provided in one embodiment of this specification: s represents the first sample object, t represents the second sample object, and the second sample object is determined to be a simple sample, a semi-hard sample, or a hard sample by using a preset sorting difference range, that is, the upper limit m1 of the preset sorting difference range and the lower limit m of the preset sorting difference range.
[0185] Step 4: Output Index: After completing the training process in Steps 1-3 above, the trained object recommendation model is used to build an online i2i index. First, a test set is built, which obtains the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended. Then, the similarity and attribute information are input into the object recommendation model, which will output the final recommendation weights for each object to be recommended. Finally, all recommendation weights are pushed online, and the i2i index is used to build an online recall service.
[0186] This model structure, based on a deep ranking-based dual-tower bottom layer and a fusion-based top layer, efficiently integrates multiple similarity metrics and attribute information of the objects to be recommended, producing the final i2i index. The similarity tower structure can learn to integrate multiple ranking metrics, leveraging their strengths and compensating for their weaknesses, ensuring both diversity and robustness of the results. The subsequent behavior prediction tower structure helps the model learn how to integrate attribute information of the objects to be recommended, making the target objects in the final i2i index closer to the project goals. This results in higher recommendation weights and higher rankings for items that are more aligned with the project goals. Furthermore, the object recommendation model no longer relies on user behavior data during inference, increasing the diversity of the final results. In addition, fusing numerous similarity and attribute information solves the problem of considering only one influencing factor in i2i recall during practical operation, ultimately achieving results far superior to those based on similarity alone.
[0187] This specification provides an object recommendation method that obtains the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended; obtains similarity fusion features based on the similarity scores, and obtains attribute fusion features based on the attribute information; fuses the similarity fusion features and the attribute fusion features, and determines the recommendation weight of each object to be recommended based on the fusion result; determines the target object among the objects to be recommended based on the recommendation weight of each object to be recommended, and recommends the target object to the target user. By fusing the similarity between a specified object and each object to be recommended, and the attribute information of each object to be recommended, the recommendation weight of each object to be recommended is determined. Finally, based on the recommendation weight, the target object to be recommended to the target user is determined, improving the efficiency of object recommendation and the relevance between the target object and the target user, further enhancing user stickiness.
[0188] The following is in conjunction with the appendix Figure 5 Taking the application of the object recommendation method provided in this specification in product recommendation as an example, the object recommendation method will be further explained. Figure 5 The flowchart of an object recommendation method provided in one embodiment of this specification is shown, which specifically includes the following steps.
[0189] Step 502: Obtain the first sample product, the second sample product set, and the preset model to be trained. The model to be trained includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model.
[0190] Step 504: Extract multiple second sample products from the second sample product set, and determine the sample similarity between the first sample product and each second sample product, as well as the sample attribute information of each second sample product.
[0191] Step 506: Input the similarity of each sample into the similarity fusion sub-model for fusion to obtain the sample similarity fusion features. Input the attribute information of each sample into the attribute fusion sub-model for fusion to obtain the sample attribute fusion features.
[0192] Step 508: Input the sample similarity fusion feature and the sample attribute fusion feature into the feature fusion layer for fusion to obtain the sample fusion result.
[0193] Step 510: Input the sample fusion result into the recommendation weight output sub-model to obtain the prediction result of each second sample product.
[0194] Step 512: Determine the first sub-loss value based on each prediction result, the weight label carried by each second sample object, and the ranking loss function; determine the second sub-loss value based on each prediction result, the weight label carried by each second sample object, and the mean squared error loss function; and determine the total loss value based on the first and second sub-loss values.
[0195] Optionally, the second sample of goods carries a sorting label;
[0196] Accordingly, based on each prediction result, the weight labels carried by each second sample object, and the ranking loss function, the first sub-loss value is determined, including:
[0197] Based on the prediction results, determine the predicted ranking of each second sample item;
[0198] Based on the predicted ranking and ranking labels of each second sample product, determine the ranking difference value of each second sample product;
[0199] Based on the ranking difference value, the first sub-loss value is determined according to each prediction result, the weight label carried by each second sample object, and the ranking loss function.
[0200] Optionally, based on the ranking difference value, and according to each prediction result, the weight label carried by each second sample object, and the ranking loss function, a first sub-loss value is determined, including:
[0201] Determine whether the sorting difference value meets the preset sorting difference range;
[0202] If so, input the prediction result corresponding to the ranking difference value and the weight label carried by the second sample object corresponding to the ranking difference value into the ranking loss function to determine the first sub-loss value.
[0203] Step 514: Based on the loss value, adjust the model parameters of the similarity fusion sub-model, attribute fusion sub-model, and recommendation weight output sub-model in the model to be trained, and continue to perform the step of extracting multiple second sample products from the second sample product set. If the preset training stopping condition is met, the trained model to be trained is determined as the product recommendation model.
[0204] Step 516: Obtain the similarity between the specified product and each product to be recommended, as well as the attribute information of each product to be recommended.
[0205] Step 518: Input each similarity into the similarity fusion sub-model, extract features from each similarity to obtain the similarity features corresponding to each similarity, and fuse the similarity features to obtain the similarity fusion features.
[0206] Optionally, the similarity includes multiple sub-similarity, which are calculated by using various preset similarity algorithms to compare the specified product with the product to be recommended.
[0207] Accordingly, feature extraction is performed on each similarity level to obtain the similarity features corresponding to each similarity level, including:
[0208] For any given similarity, feature extraction is performed on each sub-similarity of that similarity to obtain the sub-similarity features corresponding to each sub-similarity.
[0209] By concatenating the sub-similar features, the corresponding similarity feature is obtained.
[0210] Step 520: Input the attribute information into the attribute fusion sub-model to perform attribute fusion and obtain attribute fusion features.
[0211] Step 522: Input the similarity fusion feature and the attribute fusion feature into the feature fusion layer, extract features from each attribute information to obtain the attribute features corresponding to each attribute information, and fuse the attribute features to obtain the attribute fusion feature.
[0212] Optionally, the attribute information includes multiple behavioral attribute information;
[0213] Accordingly, feature extraction is performed on each attribute information to obtain the attribute features corresponding to each attribute information, including:
[0214] For any attribute information, feature extraction is performed on each behavioral attribute information in that attribute information to obtain the behavioral attribute features corresponding to each behavioral attribute information.
[0215] By concatenating the behavioral attribute features, the attribute feature corresponding to the attribute information is obtained.
[0216] Step 524: Extract the correlation information between each similarity feature and each attribute feature.
[0217] Step 526: Based on the relevance information, fuse the similarity fusion feature and the attribute fusion feature to obtain the fusion result.
[0218] This specification provides an object recommendation method that integrates the similarity between a specified product and each product to be recommended with the attribute information of each product to be recommended to determine the recommendation weight of each product to be recommended. Finally, based on the recommendation weight, the target product to be recommended to the target user is determined, which improves the efficiency of product recommendation and the relevance between the target product and the target user, and further improves user stickiness.
[0219] Corresponding to the above method embodiments, this specification also provides embodiments of an object recommendation device. Figure 6 A schematic diagram of an object recommendation device according to one embodiment of this specification is shown. Figure 6 As shown, the device includes:
[0220] The first acquisition module 602 is configured to acquire the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended;
[0221] The fusion module 604 is configured to obtain similarity fusion features based on the aforementioned similarities and to obtain attribute fusion features based on the aforementioned attribute information.
[0222] The determining module 606 is configured to fuse the similarity fusion feature and the attribute fusion feature, and determine the recommendation weight of each object to be recommended based on the fusion result;
[0223] The recommendation module 608 is configured to determine the target object among the target objects based on the recommendation weight of each target object, and recommend the target object to the target user.
[0224] Optionally, the device further includes a second acquisition module, configured to:
[0225] Obtain a pre-trained object recommendation model, wherein the object recommendation model includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model;
[0226] Accordingly, the fusion module 604 is further configured as follows:
[0227] Each of the aforementioned similarities is input into the similarity fusion sub-model for similarity fusion to obtain similarity fusion features;
[0228] The attribute information is input into the attribute fusion sub-model to perform attribute fusion and obtain attribute fusion features;
[0229] Accordingly, the determining module 606 is further configured to:
[0230] The similarity fusion feature and the attribute fusion feature are input into the feature fusion layer for fusion to obtain the fusion result;
[0231] The fusion result is input into the recommendation weight output sub-model to obtain the recommendation weight of each object to be recommended.
[0232] Optionally, the device further includes a training module configured to:
[0233] Obtain a first set of sample objects, a second set of sample objects, and a preset model to be trained, wherein the model to be trained includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model;
[0234] Extract multiple second sample objects from the second sample object set, and determine the sample similarity between the first sample object and each second sample object, as well as the sample attribute information of each second sample object;
[0235] The similarity scores of each sample are input into the similarity fusion sub-model for fusion to obtain sample similarity fusion features; the attribute information of each sample is input into the attribute fusion sub-model for fusion to obtain sample attribute fusion features.
[0236] The sample similarity fusion feature and the sample attribute fusion feature are input into the feature fusion layer for fusion to obtain the sample fusion result;
[0237] The sample fusion result is input into the recommendation weight output sub-model to obtain the prediction result for each second sample object;
[0238] The loss value is determined based on the prediction results and the weight labels carried by each second sample object. Based on the loss value, the model parameters of the similarity fusion sub-model, the attribute fusion sub-model, and the recommendation weight output sub-model in the model to be trained are adjusted. The step of extracting multiple second sample objects from the second sample object set is continued. When the preset training stopping condition is met, the trained model to be trained is determined as the object recommendation model.
[0239] Optionally, the training module is further configured to:
[0240] Based on the prediction results, the weight labels carried by each second sample object, and the ranking loss function, determine the first sub-loss value;
[0241] The second sub-loss value is determined based on the prediction results, the weight labels carried by each second sample object, and the mean squared error loss function.
[0242] The loss value is determined based on the first sub-loss value and the second sub-loss value.
[0243] Optionally, the second sample object carries a sorting label;
[0244] Accordingly, the training module is further configured as follows:
[0245] Based on the prediction results, determine the predicted ranking of each second sample object;
[0246] Based on the predicted ranking and ranking label of each second sample object, determine the ranking difference value of each second sample object;
[0247] Based on the ranking difference value, the first sub-loss value is determined according to each prediction result, the weight label carried by each second sample object, and the ranking loss function.
[0248] Optionally, the training module is further configured to:
[0249] Determine whether the sorting difference value conforms to a preset sorting difference range;
[0250] If so, the prediction result corresponding to the ranking difference value and the weight label carried by the second sample object corresponding to the ranking difference value are input into the ranking loss function to determine the first sub-loss value.
[0251] Optionally, the fusion module 604 is further configured to:
[0252] Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each similarity.
[0253] The similarity features are fused together to obtain similarity fusion features.
[0254] Optionally, the similarity includes multiple sub-similarity, which are calculated by using various preset similarity algorithms to compare the specified object with the object to be recommended.
[0255] Accordingly, the fusion module 604 is further configured as follows:
[0256] For any given similarity, feature extraction is performed on each sub-similarity of that similarity to obtain the sub-similarity features corresponding to each sub-similarity.
[0257] By concatenating the sub-similar features, the corresponding similarity feature is obtained.
[0258] Optionally, the fusion module 604 is further configured to:
[0259] Feature extraction is performed on each of the attribute information to obtain the attribute features corresponding to each attribute information;
[0260] The attribute features are fused together to obtain attribute fusion features.
[0261] Optionally, the attribute information includes multiple behavioral attribute information;
[0262] Accordingly, the fusion module 604 is further configured as follows:
[0263] For any attribute information, feature extraction is performed on each behavioral attribute information in that attribute information to obtain the behavioral attribute features corresponding to each behavioral attribute information.
[0264] By concatenating the behavioral attribute features, the attribute feature corresponding to the attribute information is obtained.
[0265] Optionally, the device further includes a feature extraction module configured to:
[0266] Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each of the aforementioned similarities, and feature extraction is performed on each of the aforementioned attribute information to obtain the attribute features corresponding to each of the aforementioned attribute information;
[0267] Extract the correlation information between each of the similarity features and each of the attribute features;
[0268] The determining module 606 is further configured to:
[0269] Based on the correlation information, the similarity fusion feature and the attribute fusion feature are fused to obtain a fusion result.
[0270] This specification provides an object recommendation device that acquires the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended; obtains similarity fusion features based on the similarity scores, and obtains attribute fusion features based on the attribute information; fuses the similarity fusion features and the attribute fusion features, and determines the recommendation weight of each object to be recommended based on the fusion result; determines the target object among the objects to be recommended based on the recommendation weight of each object to be recommended, and recommends the target object to the target user. By fusing the similarity between the specified object and each object to be recommended, and the attribute information of each object to be recommended, the device determines the recommendation weight of each object to be recommended, and finally determines the target object to be recommended to the target user based on the recommendation weight. This improves the efficiency of object recommendation and the relevance between the target object and the target user, further enhancing user stickiness.
[0271] The above is an illustrative scheme of an object recommendation device according to this embodiment. It should be noted that the technical solution of this object recommendation device and the technical solution of the object recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the object recommendation device, please refer to the description of the technical solution of the object recommendation method described above.
[0272] Figure 7A structural block diagram of a computing device 700 according to one embodiment of this specification is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.
[0273] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0274] In one embodiment of this specification, the above-described components of the computing device 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0275] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 700 can also be a mobile or stationary server.
[0276] The processor 720 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described object recommendation method.
[0277] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the object recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the object recommendation method described above.
[0278] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the object recommendation method described above.
[0279] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the object recommendation method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the object recommendation method described above.
[0280] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the object recommendation method described above.
[0281] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the object recommendation method described above belong to the same concept. Details not described in detail in the computer program's technical solution can be found in the description of the object recommendation method's technical solution.
[0282] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0283] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0284] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0285] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0286] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An object recommendation method, comprising: Obtain the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended; Based on the aforementioned similarities, a similarity fusion feature is obtained; based on the aforementioned attribute information, an attribute fusion feature is obtained. The similarity fusion feature is obtained by fusing the similarity features corresponding to each similarity after feature extraction for each of the aforementioned similarities. The attribute fusion feature is obtained by fusing the attribute features corresponding to each of the aforementioned attribute information after feature extraction for each of the aforementioned attribute information. The similarity fusion feature and the attribute fusion feature are fused together, and the recommendation weight of each object to be recommended is determined according to the fusion result. The fusion of the similarity fusion feature and the attribute fusion feature includes: fusing the similarity fusion feature and the attribute fusion feature based on the correlation information between each similarity feature and each attribute feature to obtain a fusion result. The correlation information refers to the association information between the attribute feature and whether the user has operated on the object to be recommended. Based on the recommendation weight of each object to be recommended, the target object among the objects to be recommended is determined, and the target object is recommended to the target user.
2. The method according to claim 1, further comprising, before obtaining similarity fusion features based on each of the aforementioned similarities and obtaining attribute fusion features based on each of the aforementioned attribute information: Obtain a pre-trained object recommendation model, wherein the object recommendation model includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model; Accordingly, obtaining similarity fusion features based on each of the aforementioned similarities, and obtaining attribute fusion features based on each of the aforementioned attribute information, includes: Each of the aforementioned similarities is input into the similarity fusion sub-model for similarity fusion to obtain similarity fusion features; The attribute information is input into the attribute fusion sub-model to perform attribute fusion and obtain attribute fusion features; Accordingly, the process of fusing the similarity fusion feature and the attribute fusion feature, and determining the recommendation weight of each object to be recommended based on the fusion result, includes: The similarity fusion feature and the attribute fusion feature are input into the feature fusion layer for fusion to obtain the fusion result; The fusion result is input into the recommendation weight output sub-model to obtain the recommendation weight of each object to be recommended.
3. The method according to claim 2, further comprising, before obtaining the pre-trained object recommendation model: Obtain a first set of sample objects, a second set of sample objects, and a preset model to be trained, wherein the model to be trained includes a similarity fusion sub-model, an attribute fusion sub-model, a feature fusion layer, and a recommendation weight output sub-model; Extract multiple second sample objects from the second sample object set, and determine the sample similarity between the first sample object and each second sample object, as well as the sample attribute information of each second sample object; The similarity scores of each sample are input into the similarity fusion sub-model for fusion to obtain sample similarity fusion features; the attribute information of each sample is input into the attribute fusion sub-model for fusion to obtain sample attribute fusion features. The sample similarity fusion feature and the sample attribute fusion feature are input into the feature fusion layer for fusion to obtain the sample fusion result; The sample fusion result is input into the recommendation weight output sub-model to obtain the prediction result for each second sample object; The loss value is determined based on the prediction results and the weight labels carried by each second sample object. Based on the loss value, the model parameters of the similarity fusion sub-model, the attribute fusion sub-model, and the recommendation weight output sub-model in the model to be trained are adjusted. The step of extracting multiple second sample objects from the second sample object set is continued. When the preset training stopping condition is met, the trained model to be trained is determined as the object recommendation model.
4. The method according to claim 3, wherein determining the loss value based on each prediction result and the weight label carried by each second sample object includes: Based on the prediction results, the weight labels carried by each second sample object, and the ranking loss function, determine the first sub-loss value; The second sub-loss value is determined based on the prediction results, the weight labels carried by each second sample object, and the mean squared error loss function. The loss value is determined based on the first sub-loss value and the second sub-loss value.
5. The method according to claim 4, wherein the second sample object carries a sorting label; Accordingly, determining the first sub-loss value based on each prediction result, the weight label carried by each second sample object, and the ranking loss function includes: Based on the prediction results, determine the predicted ranking of each second sample object; Based on the predicted ranking and ranking label of each second sample object, determine the ranking difference value of each second sample object; Based on the ranking difference value, the first sub-loss value is determined according to each prediction result, the weight label carried by each second sample object, and the ranking loss function.
6. The method according to claim 5, wherein determining the first sub-loss value based on the ranking difference value, according to each of the prediction results, the weight labels carried by each second sample object, and the ranking loss function, comprises: Determine whether the sorting difference value conforms to a preset sorting difference range; If so, the prediction result corresponding to the ranking difference value and the weight label carried by the second sample object corresponding to the ranking difference value are input into the ranking loss function to determine the first sub-loss value.
7. The method according to claim 1, wherein the similarity includes multiple sub-similarity, and the multiple sub-similarity is calculated by using various preset similarity algorithms to compare the specified object with the object to be recommended; Accordingly, the feature extraction for each of the similarities includes: For any given similarity, feature extraction is performed on each sub-similarity of that similarity to obtain the sub-similarity features corresponding to each sub-similarity. By concatenating the sub-similar features, the corresponding similarity feature is obtained.
8. The method according to claim 1, wherein the attribute information includes multiple behavioral attribute information; Accordingly, the step of extracting features from each of the attribute information includes: For any attribute information, feature extraction is performed on each behavioral attribute information in that attribute information to obtain the behavioral attribute features corresponding to each behavioral attribute information. By concatenating the behavioral attribute features, the attribute feature corresponding to the attribute information is obtained.
9. The method according to claim 1, further comprising, before fusing the similarity fusion feature and the attribute fusion feature: Feature extraction is performed on each of the aforementioned similarities to obtain the similarity features corresponding to each of the aforementioned similarities, and feature extraction is performed on each of the aforementioned attribute information to obtain the attribute features corresponding to each of the aforementioned attribute information; Extract the correlation information between each similarity feature and each attribute feature.
10. An object recommendation device, comprising: The first acquisition module is configured to acquire the similarity between a specified object and each object to be recommended, as well as the attribute information of each object to be recommended; The fusion module is configured to obtain similarity fusion features based on each of the aforementioned similarities, and to obtain attribute fusion features based on each of the aforementioned attribute information. The similarity fusion features are obtained by fusing the similarity features corresponding to each of the aforementioned similarities after feature extraction. The attribute fusion features are obtained by fusing the attribute features corresponding to each of the aforementioned attribute information after feature extraction. The determination module is configured to fuse the similarity fusion feature and the attribute fusion feature, and determine the recommendation weight of each object to be recommended based on the fusion result. The fusion of the similarity fusion feature and the attribute fusion feature includes: fusing the similarity fusion feature and the attribute fusion feature based on the correlation information between each similarity feature and each attribute feature to obtain a fusion result. The correlation information refers to the association information between the attribute feature and whether the user has operated on the object to be recommended. The recommendation module is configured to determine the target object among the target objects based on the recommendation weight of each target object, and recommend the target object to the target user.
11. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the object recommendation method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the object recommendation method according to any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the object recommendation method according to any one of claims 1 to 9.