Article recommendation method and device, model training method and device, equipment and storage medium
The target feature extraction model uses the target feature extraction model to mine the interest of user behavior information, which solves the problem of small range and low accuracy of nearest neighbor users in the prior art, and achieves more accurate and diverse item recommendations.
Patent Information
- Application Number
- CN202310597826.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2024-11-26
AI Technical Summary
In the prior art, the nearest neighbor user range determined based on user behavior information is small and the accuracy is low, resulting in a relatively single recommendation result and low accuracy.
The target feature extraction model is used to mine user behavior information for item interest, and the target feature vector is determined through the training process to expand the range of nearest users and improve accuracy, and diverse items are recommended.
Through the target feature extraction model, the user's interest range in the item is expanded, the accuracy of interest is improved, the recommendation results are more in line with user preferences, and the problem of small range and low accuracy of nearest neighbor users in the prior art is overcome.
Smart Images

Figure CN119025745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to an item recommendation, model training method, device, equipment and storage medium. Background Art
[0002] The recommendation system is used to recommend items of interest to users. Currently, the behavior information generated by users after accessing items on a certain platform is obtained, and neighboring users with the same behavior as the user are determined based on the behavior information, and then the items of interest to the neighboring users are recommended to the user. However, during the implementation process, the inventors found that there are at least the following problems in the prior art: the range of neighboring users directly determined based on user behavior information is small and the accuracy is low, resulting in a relatively single recommendation result with a low accuracy rate. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present application hope to provide an item recommendation, model training method, device, equipment and storage medium, which solves the problem that the existing technology directly determines the range of neighboring users based on the user's behavior information is small and the accuracy is low, resulting in relatively single recommendation results and low accuracy.
[0004] The technical solution of this application is implemented as follows:
[0005] An item recommendation method, the method comprising:
[0006] Obtain target behavior information generated when the recommended user visits the item;
[0007] Using a target feature extraction model to mine the item interest of the target behavior information, and obtaining a target feature vector representing the interest of the to-be-recommended user in the item;
[0008] Based on the target feature vector, determining neighboring users of the user to be recommended;
[0009] Determine a target item based on neighbor behavior information generated when the neighbor user accesses the item, and recommend the target item to the user to be recommended;
[0010] Among them, the training process of the target feature extraction model is as follows:
[0011] Determining a first loss of a first initial feature extraction model based on first information to be trained, wherein the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item;
[0012] Determining a second loss of a second initial feature extraction model based on second information to be trained; wherein the second information to be trained represents a behavioral feature of the sample user with respect to the second item visited;
[0013] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain the target feature extraction model.
[0014] A model training method, the method comprising:
[0015] Determine first information to be trained and second information to be trained corresponding to the sample user; wherein the first information to be trained represents the behavior characteristics of the sample user with respect to the first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user with respect to the second item visited;
[0016] Determining a first loss of a first initial feature extraction model based on the first information to be trained;
[0017] Determining a second loss of a second initial feature extraction model based on the second information to be trained;
[0018] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model; wherein the target feature extraction model is used to mine feature vectors representing the user's interest in items, so as to recommend diversified items to the user based on the mined feature vectors.
[0019] An item recommendation device, comprising:
[0020] An acquisition unit, used to acquire target behavior information generated when the user to be recommended visits the item;
[0021] A first processing unit is used to mine the item interest of the target behavior information using a target feature extraction model to obtain a target feature vector representing the interest of the user to be recommended to the item;
[0022] The first processing unit is further configured to determine neighboring users of the user to be recommended based on the target feature vector;
[0023] The first processing unit is further configured to determine a target item based on neighbor behavior information generated when the neighbor users access the item, and recommend the target item to the user to be recommended;
[0024] Among them, the training process of the target feature extraction model is as follows:
[0025] Determining a first loss of a first initial feature extraction model based on first information to be trained, wherein the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item;
[0026] Determining a second loss of a second initial feature extraction model based on second information to be trained; wherein the second information to be trained represents a behavioral feature of the sample user with respect to the second item visited;
[0027] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain the target feature extraction model.
[0028] A model training device, comprising:
[0029] A determination unit, configured to determine first information to be trained and second information to be trained corresponding to a sample user; wherein the first information to be trained represents the behavior characteristics of the sample user with respect to a first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user with respect to a second item visited;
[0030] A second processing unit, configured to determine a first loss of a first initial feature extraction model based on the first information to be trained;
[0031] The second processing unit is further used to determine a second loss of a second initial feature extraction model based on the second information to be trained;
[0032] The second processing unit is also used to train the first initial feature extraction model based on the first loss and the second loss to obtain a target feature extraction model; wherein the target feature extraction model is used to mine feature vectors that represent the user's interest in items, so as to recommend diversified items to the user based on the mined feature vectors.
[0033] An item recommendation device, the device comprising: a first processor, a first memory and a first communication bus;
[0034] The first communication bus is used to realize the communication connection between the first processor and the first memory;
[0035] The first processor is used to execute the item recommendation program in the first memory to implement the steps of the above-mentioned item recommendation method.
[0036] A model training device, the device comprising: a second processor, a second memory, and a second communication bus;
[0037] The second communication bus is used to realize the communication connection between the second processor and the second memory;
[0038] The second processor is used to execute the model training program in the second memory to implement the steps of the above-mentioned model training method.
[0039] A storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the steps of the above-mentioned item recommendation method or model training method.
[0040] The item recommendation, model training method, apparatus, device and storage medium provided by the embodiments of the present application obtain the target behavior information generated when the user to be recommended visits the item, use the target feature extraction model to mine the item interest of the target behavior information to obtain the target feature vector that characterizes the interest of the user to be recommended in the item; determine the neighboring users of the user to be recommended based on the target feature vector; determine the target item based on the neighboring behavior information generated when the neighboring users visit the item, and recommend the target item to the user to be recommended; wherein the training process of the target feature extraction model is as follows: determine the first loss of the first initial feature extraction model based on the first information to be trained, the first information to be trained characterizes the behavioral characteristics of the sample user for the first item visited and the item attributes of the first item; determine the second loss of the second initial feature extraction model based on the second information to be trained, the second information to be trained characterizes the behavioral characteristics of the sample user for the second item visited; train the first initial feature extraction model based on the first loss and the second loss to obtain the target feature extraction model.Since the first information to be trained can not only characterize the behavioral characteristics of the sample user towards the first item visited, but also includes the item attributes of the first item, and the behavioral characteristics of the sample user towards the first item visited implies the sample user's interest in the item, and the item attributes of the first item include multiple attributes such as the category, style, and store to which the item belongs, therefore, by processing the first training information through the first initial feature extraction model, it is possible to mine out multiple attributes of items of interest to the user, which are not limited to a certain item; and, the second information to be trained can characterize the behavioral characteristics of the sample user towards the second item visited, and the second information to be trained is different from the item corresponding to the first information to be trained, therefore, by processing the second information to be trained through the second initial feature model, it is possible to mine out the user's interest in more items; secondly, since the target feature extraction model is obtained by training the first initial feature extraction model through the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model, therefore, the first initial feature extraction model is optimized through the second initial feature extraction model. The training of the feature extraction model can improve the model accuracy of the trained target feature extraction model. Since the target feature extraction model is trained based on the first initial feature extraction model that can mine the multiple attributes of the items that the sample user is interested in and the second initial feature extraction model that can mine the user's interest in more items, the target feature extraction model can not only expand the user's interest in the item, but also improve the accuracy of the user's interest in the item. In this way, the target feature extraction model is used to mine the item interest of the target behavior information of the recommended user. The obtained target feature vector is more accurate and can better represent the interest of the recommended user in more items. The range of neighboring users determined based on the target feature vector is wider and more accurate. Therefore, the target items recommended for the recommended user based on the neighboring users are more diverse, more accurate, and more in line with the preferences of the recommended user. This overcomes the problem that the range of neighboring users determined based on the user's behavior information in the prior art is small and the accuracy is low, resulting in a relatively single recommendation result and low accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flowchart of an item recommendation method provided in an embodiment of the present application;
[0042] Figure 2 A flowchart of a model training method provided in an embodiment of the present application;
[0043] Figure 3 A flowchart of another model training method provided in an embodiment of the present application;
[0044] Figure 4A schematic diagram of the structure of a first initial feature extraction model and a second initial feature extraction model in a model training method provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a flow chart of another method for predicting item interest provided in an embodiment of the present application;
[0046] Figure 6 A flowchart of a recommendation system provided for related technologies;
[0047] Figure 7 A flowchart of an item recommendation method provided in an embodiment of the present application when applied to a recommendation system;
[0048] Figure 8 A schematic diagram of the structure of an item recommendation device provided in an embodiment of the present application;
[0049] Fig. 9 A schematic diagram of the structure of a model training device provided in an embodiment of the present application;
[0050] Fig.10 A schematic diagram of the structure of an item recommendation device provided in an embodiment of the present application;
[0051] Fig.11 A schematic diagram of the structure of a model training device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0053] It should be understood that the "embodiments of the present application" or "the aforementioned embodiments" mentioned throughout the specification mean that specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, "in the embodiments of the present application" or "in the aforementioned embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0054] Unless otherwise specified, the electronic device performs any step in the embodiments of the present application, and the processor of the electronic device may perform the step. It is also worth noting that the embodiments of the present application do not limit the order in which the electronic device performs the following steps. In addition, the methods used to process data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiments of the present application can be independently executed by the electronic device, that is, when the electronic device executes any step in the following embodiments, it may not rely on the execution of other steps.
[0055] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The present application embodiment provides an item recommendation method, which can be applied to an item recommendation device, referring to Figure 1 As shown, the method comprises the following steps:
[0057] Step 101: Obtain target behavior information generated when the user to be recommended visits the item.
[0058] The target behavior information represents the behavior characteristics of the to-be-recommended user on the visited items and the item attributes of the visited items.
[0059] In the embodiment of the present application, the user to be recommended is the user to be processed currently. The target behavior information is the behavior information generated when the user to be recommended visits an item, which can characterize the behavior characteristics of the user to be recommended on the visited item and the item attributes of the visited item; in a feasible implementation, the target behavior information may include the personal attributes of the user to be recommended, the item information of the item visited by the user to be recommended, and the behavior on the visited item; for example, the target behavior information may be the item sequence of the items visited by the user to be recommended and the category sequence to which the items visited by the user to be recommended belong; further, a corresponding weight sequence may be set for the item sequence and the category sequence according to the behavior on the visited items, such as the weight of the purchase behavior is greater than the weight of the add-to-cart behavior is greater than the weight of the browsing behavior.
[0060] In a feasible implementation, at least one user can be determined as a user to be recommended from the target platform, and target behavior information generated when the user to be recommended accesses items can be obtained from the target platform. The target platform can be a shopping platform, a sharing platform, or an education platform, etc., as long as the target platform has the need to recommend items to users.
[0061] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this application are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0062] Step 102: Use a target feature extraction model to mine the item interest of the target behavior information to obtain a target feature vector representing the interest of the user to be recommended in the item.
[0063] Among them, the training process of the target feature extraction model is as follows:
[0064] Determining a first loss of a first initial feature extraction model based on first information to be trained; the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item;
[0065] Determining a second loss of a second initial feature extraction model based on second information to be trained; the second information to be trained represents a behavioral feature of a sample user with respect to a second item visited;
[0066] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model.
[0067] In the embodiment of the present application, the target feature vector can represent the interest of the user to be recommended to the item, and the target feature vector is a characteristic representation of the interest of the user to be recommended to the item. Since the first information to be trained can not only characterize the behavioral characteristics of the sample user on the first item visited, but also includes the item attributes of the first item, and the behavioral characteristics of the sample user on the first item visited implies the sample user's interest in the item, and the item attributes of the first item include multiple attributes such as the category, style and store to which the item belongs, the first initial feature extraction model is used to process the first training information, so that the multiple attributes of the items that the user is interested in can be mined; and the second information to be trained can characterize the behavioral characteristics of the sample user on the second item visited, and the second information to be trained is different from the item corresponding to the first information to be trained, so the second information to be trained is processed by the second initial feature model to mine the user's interest in the item; secondly, since the target feature extraction model is obtained by training the first initial feature extraction model with the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model, the target feature extraction model can not only mine the multiple attributes of the items that the user is interested in, but also mine the user's preferences for more, so that the target feature extraction model is used to mine the item interest of the target behavior information of the recommended user, and the obtained target feature vector is more accurate and can characterize the interest of the recommended user in the item to the greatest extent.
[0068] Step 103: Determine neighboring users of the user to be recommended based on the target feature vector.
[0069] In the embodiment of the present application, the neighboring users are users who have the same or similar preferences for items as the user to be recommended, that is, the interest of the neighboring users in the items is the same or similar to the interest of the user to be recommended in the items. Since the target feature vector determined by the target feature extraction model is more accurate and can characterize the interest of the user to be recommended in the items to the greatest extent, the range of neighboring users determined based on the target feature vector is wider and more accurate.
[0070] In a feasible implementation, feature information of multiple users may be stored in a preset candidate user set in advance so as to determine neighboring users of the user to be recommended. Specifically, the neighboring users of the user to be recommended may be determined from the preset candidate user set based on the target feature information of the user to be recommended and the feature information of each preset candidate user in the preset candidate user set.
[0071] Step 104: determine the target item based on the neighbor behavior information generated when the neighbor users access the item, and recommend the target item to the user to be recommended.
[0072] In the embodiment of the present application, the neighbor behavior information is the behavior information generated when the neighbor user visits the item, which can characterize the behavior characteristics of the neighbor user on the visited item and the item attributes of the visited item; for example, the neighbor behavior information can be the item sequence of the items visited by the neighbor user and the category sequence of the category to which the items visited by the neighbor user belong. Since the range of determined neighbor users is wider and the accuracy is higher, the items recommended to the user to be recommended based on the neighbor users are richer and more accurate, and more in line with the interests of the user to be recommended.
[0073] In a feasible implementation, feature information of multiple items can be stored in a preset candidate user set in advance to determine the target item; wherein the items in the preset candidate item set are all items that are frequently accessed on the target platform. Specifically, based on the neighbor behavior information and the feature information of each preset candidate item in the preset candidate item set, the target item can be determined from the preset candidate item set and recommended to the user to be recommended.
[0074] The item recommendation method provided in the embodiment of the present application adopts a target feature extraction model to mine the target behavior information of the recommended user for item interest, because the target feature extraction model can not only expand the user's interest in items, but also improve the accuracy of the user's interest in items. The obtained target feature vector is more accurate and can better characterize the interest of the recommended user in more items. The range of neighboring users determined based on the target feature vector is wider and more accurate. Therefore, the target items recommended to the recommended user based on the neighboring users are more diverse, more accurate, and more in line with the preferences of the recommended user. This overcomes the problem in the prior art that the range of neighboring users determined based on the user's behavior information is small and the accuracy is low, resulting in a relatively single recommendation result with low accuracy.
[0075] The present application embodiment provides a model training method, which can be applied to a model training device, referring to Figure 2 As shown, the method comprises the following steps:
[0076] Step 201: Determine first information to be trained and second information to be trained corresponding to sample users.
[0077] The first information to be trained represents the behavior characteristics of the sample user towards the first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user towards the second item visited.
[0078] In the embodiment of the present application, the sample user is a user used to train the first initial feature extraction model, and the sample user may include multiple users; in a feasible implementation, the sample user may be multiple users of the target platform, wherein the target platform may be a shopping platform, a sharing platform, an education platform, etc., as long as there are multiple users on the target platform and there is a need to recommend items to the user, the items recommended to the user may be educational resources, daily necessities, and fresh items, etc. The first item and the second item are both items that the sample user has visited, but the number of items corresponding to the first item and the second item is different, and the number of items of the second item is greater than the number of the first item.
[0079] The first information to be trained is used to train the first initial feature extraction model; the first information to be trained represents the sample user's behavior characteristics on the first item and the item attributes of the first item. Furthermore, the first information to be trained can not only represent the sample user's behavior characteristics on the first item visited and the item attributes of the first item, but also represent the sample user's personal attributes. In a feasible implementation, the first information to be trained may include the sample user's personal information, the item information of the first item, and the behavior information generated when the sample user visits the first item; wherein the sample user's personal information may include the sample user's gender, the sample user's age, the sample user's occupation, and the sample user's hobbies, etc.; the item information of the first item may include one or more categories to which the first item belongs, the characteristics of the first item, and the store to which the first item belongs, etc.; the behavior information generated when the sample user visits the first item may be the item sequence of the first item visited by the sample user and the category sequence of the category to which the first item visited by the sample user belongs. The second information to be trained is used to train the second initial feature extraction model; the second information to be trained represents the sample user's behavior characteristics on the second item. In a feasible implementation, the second information to be trained may be the item sequence visited by the user. It should be noted that both the first information to be trained and the second information to be trained can reflect the sample user's preferences for items.
[0080] In a feasible implementation, the sample users' behaviors such as clicking, browsing and purchasing items in the target platform can be referred to as visited items. The different behaviors of the sample users towards the items imply different interests of the sample users in the items. During implementation, multiple users in the target platform can be determined as sample users, a small part of the items visited by each sample user can be determined as first items, and a large part of the items visited by each sample user can be determined as second items. The behavior information generated when the sample user visits the first item, the item information of the first item and the personal information of the sample user are obtained, and the behavior information generated when the sample user visits the first item, the item information of the first item and the personal information of the sample user are determined as the first information to be trained, and the behavior information generated when the sample user visits the second item is determined as the second information to be trained.
[0081] Step 202: Determine a first loss of a first initial feature extraction model based on the first information to be trained.
[0082] In the embodiment of the present application, the first initial feature extraction model is used to learn information such as the interest of the sample user in the item and the item attributes of the item that the sample user is interested in from the first information to be trained. In a feasible implementation, the first initial feature extraction model can be pre-set, and the first initial feature extraction model can be set as a neural network; further, the first initial feature extraction model can be a multilayer perceptron (MLP) neural network. The first loss is the loss value of the first initial feature extraction model.
[0083] In an embodiment of the present application, since the first information to be trained can not only characterize the behavioral characteristics of the sample user towards the first item visited, but also includes the item attributes of the item, and the behavioral characteristics of the sample user towards the first item visited implies the sample user's interest in the item, and the item attributes of the first item implies the category, style, store and other attributes of the item that the sample user is interested in, in the process of determining the first loss of the first initial feature extraction model based on the first information to be trained, the first initial feature extraction model is used to process the first information to be trained, so that the first initial feature extraction model can mine multiple attributes such as the category, style and store of the item that the sample user is interested in, which is not limited to a certain item. More feature information is mined and can better reflect the user's interest in the item.
[0084] In a feasible implementation, the first information to be trained may be processed using a first initial feature extraction model to obtain an output of the first initial feature extraction model, and the first loss may be determined based on the output of the first initial feature extraction model.
[0085] Step 203: Determine a second loss of a second initial feature extraction model based on the second information to be trained.
[0086] In the embodiment of the present application, the second initial feature extraction model is used to learn the behavioral features that characterize the sample user from the second information to be trained; in a feasible implementation, the second initial feature extraction model can be pre-set, and the second initial feature extraction model can be the same as the network architecture of the first initial feature extraction model, or it can be different from the network architecture of the first initial feature extraction model. It can be specifically set according to the actual business scenario, and the embodiment of the present application does not limit this; that is, the second initial feature extraction model can also be an MLP neural network. The second loss is the loss value of the second initial feature extraction model.
[0087] In an embodiment of the present application, since the second information to be trained can characterize the behavioral characteristics of the sample user towards the second item visited, and the behavioral characteristics of the sample user towards the second item visited implies more preferences of the sample user, in the process of determining the second loss of the second initial feature extraction model based on the second information to be trained, the second initial feature extraction model is used to process the second information to be trained, so as to discover more sample users' interest in the items.
[0088] In a feasible implementation, the second information to be trained may be processed using a second initial feature extraction model to obtain an output of the second initial feature extraction model, and the second loss may be determined based on the output of the second initial feature extraction model.
[0089] Step 204: Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model.
[0090] Among them, the target feature extraction model is used to mine feature vectors that represent the user's interest in items, so as to recommend diversified items to the user based on the mined feature vectors.
[0091] In an embodiment of the present application, the target feature extraction model is obtained by training the first initial feature extraction model based on the first loss and the second loss; the target feature extraction model is obtained by training the first initial feature extraction model based on the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model. In fact, it means that in the process of training the first initial feature extraction model, the training of the first initial feature extraction model is optimized by the second initial feature extraction model, so that the first initial feature extraction model has the behavioral characteristics learned by the second initial feature extraction model, so that the accuracy of the trained target feature extraction model is higher. In short, the second initial feature extraction model is to assist the training of the first initial feature extraction model to improve the accuracy of the first initial feature extraction model and to discover more user preferences; the target feature extraction model is used to predict the user's interest in the item; further, the target feature extraction model is used to determine the feature vector representing the user's interest in the item based on the behavioral information generated when the user visits the item.
[0092] Since the first initial feature extraction model is trained based on the first information to be trained and the second initial feature extraction model is trained based on the second information to be trained, the second initial feature extraction model is used to optimize the training of the first initial feature extraction model, thereby improving the mining accuracy of the trained target feature extraction model. Furthermore, since the target feature extraction model is trained based on the first initial feature extraction model that can mine multiple attributes of items that sample users are interested in and the second initial feature extraction model that can mine more preferences of users, the target feature extraction model can not only expand the range of items that users like, but also improve the accuracy of users' interest in items. Therefore, the feature vector determined based on the target feature extraction model can better characterize the user's interest in items.
[0093] In a feasible implementation, a target loss can be determined based on the first loss and the second loss, the first initial feature extraction model and the second initial feature extraction model are trained based on the target loss, and the trained first initial feature extraction model is determined as the target feature extraction model.
[0094] The model training method provided in the embodiment of the present application can mine multiple attributes of items of interest to users through the first initial feature extraction model, which is not limited to a certain item, and can mine the user's interest in more items through the second initial feature extraction model; the first initial feature extraction model is trained based on the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model to obtain a target feature extraction model, and the training of the first initial feature extraction model is optimized by the second initial feature extraction model, so that the model accuracy of the trained target feature extraction model can be improved. Since the target feature extraction model is trained based on the first initial feature extraction model that can mine multiple attributes of items of interest to sample users and the second initial feature extraction model that can mine the user's interest in more items, the target feature extraction model can not only expand the range of items of interest to users, but also improve the accuracy of the user's interest in items. Therefore, the range of neighboring users determined based on the user's interest in items is wide and the accuracy is high, and items that are more in line with the user's preferences can be recommended to the user, which overcomes the problem that the range of neighboring users determined directly based on the user's behavior information in the prior art is small and the accuracy is low, resulting in a relatively single recommendation result and low accuracy.
[0095] Based on the above embodiments, the present application provides a model training method, referring to Figure 3 As shown, the method comprises the following steps:
[0096] Step 301: The model training device determines the first behavior information generated when the sample user visits the first quantity of first items, the item information of the first items, and the personal information of the sample user as the first information to be trained.
[0097] The first behavior information represents the behavior characteristics of the sample user towards the first item visited and the item attributes of the first item; the first information to be trained represents the behavior characteristics of the sample user towards the first item visited and the item attributes of the first item.
[0098] In the embodiment of the present application, the first behavior information is the behavior information generated when the sample user visits the first quantity of the first items, and the first behavior information can characterize the behavior characteristics of the sample user on the visited first items; further, the first behavior information can be the behavior information generated when the sample user visits the first quantity of the first items within the target time period. Among them, the first quantity can be preset, the first quantity can be set to 150, and the target time period can be the last 60 days. Then, at this time, the first behavior information is the behavior information generated when the sample user visits the 150 items in the last 60 days. For example, the first behavior information can be the item sequence of the 150 items visited by the sample user in the last 60 days and the category sequence of the category to which the 150 items belong.
[0099] In a feasible implementation, after obtaining the first behavior information, the item information of the sample item, and the personal information of the sample user, the first behavior information, the item information of the sample item, and the personal information of the sample user can be determined as the first information to be trained.
[0100] Step 302: The model training device determines the second behavior information generated when the sample user visits the second quantity of second items as the second information to be trained.
[0101] Among them, the second number is greater than the first number; the second behavior information represents the behavior characteristics of the sample user towards the second item visited; and the second information to be trained represents the behavior characteristics of the sample user towards the second item visited.
[0102] In the embodiment of the present application, the second behavior information is the behavior information generated when the sample user accesses the second quantity of the second items, and the second behavior information can characterize the behavior characteristics of the sample user with respect to the second items visited; further, the second behavior information can be the behavior information generated when the sample user accesses the second quantity of the second items within the target time period. Among them, the second quantity can be preset, the second quantity can be set to 300, and the target time period can be the last 60 days. Then, at this time, the second behavior information is the behavior information generated when the sample user accesses the 300 items within the last 60 days. For example, the second behavior information can be the item sequence of the 300 items accessed by the sample user within the last 60 days; further, the second behavior information can also include the category sequence to which the 300 items accessed by the sample user within the last 60 days belong.
[0103] In a feasible implementation manner, after the second behavior information is acquired from the target platform, the second behavior information may be determined as the second information to be trained.
[0104] Step 303: The model training device converts the first behavior information and the personal information of the sample user into a first vector, and converts the item information of the first item into a second vector.
[0105] In the embodiment of the present application, the first vector is obtained by transforming the first behavior information and the personal information of the sample user, that is, the first vector is a vector representation of the first behavior information and the personal information of the sample user. The second vector is obtained by transforming the item information of the first item, that is, the second vector is a vector representation of the item information of the first item.
[0106] In a feasible implementation, the first behavior information and the personal information of the sample user may be transformed into vectors through an embedding layer to obtain a first vector; and the item information of the first item may be transformed into a vector through an embedding layer to obtain a second vector.
[0107] Step 304: The model training device uses the user feature extraction model in the first initial feature extraction model to extract features from the first vector to obtain a first sub-feature vector.
[0108] In the embodiment of the present application, the first sub-feature vector is a feature vector obtained by processing the first vector using the user feature extraction model in the first initial feature extraction model. Since the first behavior information can characterize the behavior characteristics of the sample user on the first item visited and the item attributes of the first item, and the personal information of the sample user can characterize the personal attributes of the sample user, the first sub-feature information obtained includes the sample user's interest in the item (i.e., preference), that is, the correlation between the sample user and the item, and further associates the sample user with the item information of the item, that is, associates the sample user with multiple attributes of the item such as the category, store, and style to which the item belongs, so the first sub-feature information also includes the correlation between the sample user and the multiple attributes of the item, deeply excavates the sample user's interest in the item, expands the items that the sample user is interested in, and avoids recommending duplicate items to the user all the time.
[0109] In the embodiment of the present application, the first initial feature extraction model may include a user feature extraction model and an item feature extraction model, that is, the first initial feature extraction model includes two neural networks, such as Figure 4 As shown, both the user feature extraction model and the item feature extraction model can be MLP neural networks. The user feature extraction model is mainly used to extract the feature representation of the user, and the item feature extraction model is mainly used to extract the feature representation of the item.
[0110] In a feasible implementation, the first vector can be input into a user feature extraction model to obtain a first sub-feature vector; specifically, the implicit features in the first vector are extracted through the encoding layer, and the implicit features are input into the MLP neural network to obtain the feature representation of the sample user (i.e., the first sub-feature vector); wherein the MLP neural network can be a three-layer full-link network.
[0111] Step 305: The model training device uses the object feature extraction model in the first initial feature extraction model to extract features from the second vector to obtain a second sub-feature vector.
[0112] In the embodiment of the present application, the second sub-feature vector is a feature vector obtained by processing the second vector using the item feature extraction model in the second initial feature extraction model. Since the item information of the sample item includes item attributes of multiple items, and the first item is an item that the user has visited, the obtained second sub-feature vector includes the sample user's interest in the item, that is, the correlation between the sample user and the item. The item feature extraction model can be used to dig out the sample user's preference for the item.
[0113] In a feasible implementation, the second vector can be input into the item feature extraction model to obtain a second sub-feature vector; specifically, the implicit features of the second vector are extracted through the encoding layer, and the implicit features are finally input into the MLP neural network to obtain the feature representation of the sample item (i.e., the second sub-feature vector).
[0114] It should be noted that during training, the input data of the item feature extraction model can be the items visited by the sample user at a certain moment, and the input data of the user feature extraction model can be the sequence of items that the sample user has visited before a certain moment, the sequence of categories to which the visited items belong, and the personal information of the sample user.
[0115] Step 306: The model training device determines a first loss based on the first sub-feature vector and the second sub-feature vector.
[0116] Wherein, step 306 can be implemented by the following steps:
[0117] Step 306a: The model training device integrates the first sub-feature vector and the second sub-feature vector to obtain a first feature vector.
[0118] In the embodiment of the present application, the first feature vector is obtained by integrating the first sub-feature vector and the second sub-feature vector, and the first feature vector is the output of the first initial feature extraction model. In a feasible implementation, the first sub-feature vector can be regularized to obtain the processed first sub-feature vector, the second sub-feature vector can be regularized to obtain the processed second sub-feature vector, and the first feature vector can be obtained based on the processed first sub-feature vector and the processed second sub-feature vector; further, the first intermediate feature vector can be obtained by multiplying the processed first sub-feature vector and the processed second sub-feature vector, and then the first intermediate feature vector can be processed based on the softmax function to obtain the first feature vector; the first feature vector The calculation formula can be: Among them, softmax is normalization, norm is regularization, e u is the first sub-feature information, e i It is the second sub-feature information.
[0119] Step 306b: The model training device determines a first loss based on the first feature vector and the first information to be trained.
[0120] In an embodiment of the present application, the first loss of the first initial feature extraction model can be determined based on the first feature information and the sample label in the first information to be trained. The sample label in the first information to be trained is used to identify whether the first information to be trained is a positive sample or a negative sample; for example, 0 can be used to represent a negative sample and 1 can be used to represent a positive sample. Positive samples are samples for which users have positive feedback, which in the embodiment of the present application are items visited by sample users, and negative samples are items that users have not visited. In a feasible implementation method, items visited by sample users can be used as positive samples, items not visited by sample users can be used as negative samples, and positive samples and negative samples can be trained together as training samples. It should be noted that since the sample users have different behaviors towards items, it implies that the sample users have different interests in items, so in the actual process, different weights can be given to each training sample. The first loss is the loss value of the first initial feature extraction model determined based on the first feature information and the sample label in the first information to be trained.
[0121] In a feasible implementation, the first loss may be calculated using a target loss function, where the target loss function may be a cross entropy loss function, and the calculation formula for the first loss may be: Among them, y represents the true label of the training sample, Represents the last layer output value of the first initial feature extraction model.
[0122] Step 307: The model training device splits the second behavior information to obtain first sub-behavior information and second sub-behavior information.
[0123] In the embodiment of the present application, the second behavior information can be split into two parts by using methods such as sequence folding, odd and even sequence numbers, etc., one part is determined as the first sub-behavior information, and the other part is determined as the second sub-behavior information.
[0124] Step 308: The model training device converts the first sub-behavior information into a third vector, and converts the second sub-behavior information into a fourth vector.
[0125] In the embodiment of the present application, the third vector is obtained by transforming the first sub-behavior information, that is, the third vector is the vector representation of the first sub-behavior information. The fourth vector is obtained by transforming the second sub-behavior information, that is, the fourth vector is the vector representation of the second sub-behavior information.
[0126] In a feasible implementation, the first sub-behavior information may be transformed into a vector through an embedding layer to obtain a third vector; and the second sub-behavior information may be transformed into a vector through an embedding layer to obtain a fourth vector.
[0127] Step 309: The model training device uses the first behavior feature extraction model in the second initial feature extraction model to extract features from the third vector to obtain a third sub-feature vector.
[0128] In the embodiment of the present application, the third sub-feature vector is obtained by processing the third vector using the first behavior feature extraction model in the second initial feature extraction model. Since the first sub-behavior information is obtained by splitting the second information to be trained, and the second information to be trained can characterize the behavior characteristics of the sample user for the second item visited, the obtained third sub-feature information contains the interest of the sample user in the item.
[0129] In the embodiment of the present application, the second initial feature extraction model may include a first behavior feature extraction model and a second behavior feature extraction model, that is, the second initial feature extraction model includes two neural networks, such as Figure 4 As shown, both the first behavior feature extraction model and the second behavior feature extraction model can be MLP neural networks, the input data of the two behavior feature extraction models are behavior information, and they share a network structure, and the first behavior feature extraction model and the second behavior feature extraction model are both used to enhance the feature representation of the interest of the learning sample user in the item. Extracting the feature representation of the item through the two behavior feature extraction models can improve the processing rate of the model, and ensure the consistency with the item feature extraction model in the data dimension, which is convenient for optimizing the first initial feature extraction model based on the second initial feature extraction model.
[0130] In a feasible implementation, the implicit features of the third vector can be extracted through the encoding layer, and the implicit features can be input into the MLP neural network to obtain the third sub-feature vector.
[0131] Step 310: The model training device uses the second behavior feature extraction model in the second initial feature extraction model to extract features from the fourth vector to obtain a fourth sub-feature vector.
[0132] In the embodiment of the present application, the fourth sub-feature vector is obtained by processing the second sub-behavior information using the second behavior feature extraction model in the second initial feature extraction model. Since the second sub-behavior information is obtained by splitting the second information to be trained, and the second information to be trained can characterize the behavior characteristics of the sample user for the second item visited, the fourth sub-feature information obtained includes the interest of the sample user in the item.
[0133] In a feasible implementation, the implicit features of the fourth vector may be extracted through the encoding layer, and the implicit features may be input into the MLP neural network to obtain the fourth sub-feature vector.
[0134] Step 311: The model training device determines a second loss based on the third sub-eigenvector and the fourth sub-eigenvector.
[0135] Wherein, step 311 can be implemented by the following steps:
[0136] Step 311a: The model training device integrates the third sub-feature vector and the fourth sub-feature vector to obtain a second feature vector.
[0137] In an embodiment of the present application, the second eigenvector is obtained by integrating the third sub-eigenvector and the fourth sub-eigenvector, and the second eigenvector is the output of the second initial feature extraction model. In a feasible implementation method, the third sub-eigenvector may be regularized to obtain a processed third sub-eigenvector, the fourth sub-eigenvector may be regularized to obtain a processed fourth sub-eigenvector, and the second eigenvector may be obtained based on the processed third sub-eigenvector and the processed fourth sub-eigenvector. Furthermore, the processed third sub-eigenvector and the processed fourth sub-eigenvector may be multiplied to obtain a second intermediate eigenvector, the second intermediate eigenvector and the temperature coefficient may be processed to obtain a third intermediate eigenvector, and then the third intermediate eigenvector may be processed based on the softmax function to obtain the second eigenvector. Second eigenvector The calculation formula can be: Where γ is the temperature coefficient, e u1 is the first sub-feature information, e u2 It is the second sub-feature information.
[0138] It should be noted that, when determining the first eigenvector, a temperature coefficient may also be added, which is not limited in the embodiment of the present application.
[0139] Step 311b: The model training device determines a second loss based on the second feature vector and the second information to be trained.
[0140] In an embodiment of the present application, the second loss of the second initial feature extraction model can be determined based on the second feature information and the sample label in the second information to be trained. The sample label in the second information to be trained is used to identify whether the second information to be trained is a positive sample or a negative sample. The second loss is a loss value of the second initial feature extraction model determined based on the second feature information and the sample label of the second information to be trained.
[0141] In a feasible implementation, the second loss value may be calculated using a cross entropy loss function; the method for calculating the second loss value is similar to the method for calculating the first loss value, and this embodiment of the present application does not limit this.
[0142] It should be noted that the operation of determining the first loss through steps 303 to 306 and the operation of determining the second loss through steps 307 to 311 can be performed simultaneously.
[0143] Step 312: The model training device determines a target loss based on the first loss and the second loss.
[0144] In the embodiment of the present application, the target loss is determined based on the first loss and the second loss, and the target loss is the total loss value of the entire model constructed by the first initial feature extraction model and the second initial feature extraction model. In a feasible implementation, the target loss of the entire model can be determined based on the first loss, the second loss, the weight of the first loss, and the weight of the second loss; the calculation formula for the target loss of the entire model can be: loss total =loss u-i +α*loss u-u , where α is the weight of the second loss value, and the weight of the first loss value defaults to 1, loss u-i ( Figure 4 The loss1 in the above formula represents the first loss, loss u-u ( Figure 4 Loss2) in represents the second loss.
[0145] Step 313: The model training device updates the model parameters of the first initial feature extraction model based on the target loss so that the first loss corresponding to the updated first initial feature extraction model meets the convergence condition.
[0146] In an embodiment of the present application, the model parameters of the first initial feature extraction model can be updated based on the target loss. In fact, the model parameters of the first initial feature extraction model and the model parameters of the second initial feature extraction model are adjusted based on the target loss of the entire model, and the first information to be trained is continued to be used to determine the first loss of the adjusted first initial feature extraction model. The second information to be trained is used to determine the second loss of the adjusted second initial feature extraction model. The new target loss of the entire model is determined based on the adjusted first loss of the first initial feature extraction model and the adjusted second loss of the second initial feature extraction model. The model parameters of the first initial feature extraction model and the model parameters of the second initial feature extraction model are continued to be adjusted based on the new target loss until the first loss corresponding to the adjusted first initial feature extraction model meets the convergence condition.
[0147] Step 314: The model training device determines the updated first initial feature extraction model as the target feature extraction model.
[0148] Among them, the target feature extraction model is used to mine feature vectors that represent the user's interest in items, so as to recommend diversified items to the user based on the mined feature vectors.
[0149] In the embodiment of the present application, the first initial feature extraction model that meets the convergence condition may be determined as the target feature extraction model.
[0150] In the embodiment of the present application, when evaluating the target feature extraction model, a custom evaluation method can be used for evaluation, which mainly evaluates the similarity of the past behaviors of two users. According to the business scenario, the category of the accessed items can be used for evaluation, that is, the more the categories corresponding to the user behaviors are the same, the more similar the two users are; wherein the custom evaluation method is: Among them, u A represents user A, u B represents user B, m represents the same category set as user A and user B, sum(m) represents the number of category sets, C Ai represents the number of items visited by user A under category i, C Bi represents the number of items visited by user B under category i, S A represents the number of items visited by user A, S B Indicates the number of items visited by user A. Specifically, the feature vector of user A and the feature vector of user B are determined by the target feature extraction model, and the similarity between user A and user B is calculated based on the feature vector of user A and the feature vector of user B. The similarity between user A and user B is also calculated based on the above evaluation method; the closer the two similarities are, the higher the accuracy of the target feature extraction model.
[0151] It should be noted that, in the process of training the first initial feature extraction model based on the first information to be trained and the second initial feature extraction model based on the second information to be trained, it is possible to enhance the feature representation of the object through the second initial feature extraction model, and optimize the first initial feature extraction model through the enhanced feature representation of the object, thereby improving the accuracy of the trained first initial feature extraction model (i.e., the target feature extraction model).
[0152] In other embodiments of the present application, the feature representation of users and items can also be achieved through other methods, such as statistical methods based on user historical behaviors, converting user historical behaviors into graph structures and then learning through graph networks, which are not limited in the embodiments of the present application.
[0153] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0154] The model training method provided in the embodiment of the present application can mine multiple attributes of items of interest to users through the first initial feature extraction model, which is not limited to a certain item, and can mine the user's interest in more items through the second initial feature extraction model; the first initial feature extraction model is trained based on the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model to obtain a target feature extraction model, and the training of the first initial feature extraction model is optimized by the second initial feature extraction model, so that the model accuracy of the trained target feature extraction model can be improved. Since the target feature extraction model is trained based on the first initial feature extraction model that can mine multiple attributes of items of interest to sample users and the second initial feature extraction model that can mine the user's interest in more items, the target feature extraction model can not only expand the range of items of interest to users, but also improve the accuracy of the user's interest in items. Therefore, the range of neighboring users determined based on the user's interest in items is wide and the accuracy is high, and items that are more in line with the user's preferences can be recommended to the user, which overcomes the problem that the range of neighboring users determined directly based on the user's behavior information in the prior art is small and the accuracy is low, resulting in a relatively single recommendation result and low accuracy.
[0155] Based on the above embodiments, the present invention provides an item recommendation method. Figure 5 As shown, the method comprises the following steps:
[0156] Step 401: The item recommendation device obtains target behavior information generated when the user to be recommended visits the item.
[0157] The target behavior information represents the behavior characteristics of the to-be-recommended user on the visited items and the item attributes of the visited items.
[0158] Step 402: The item recommendation device uses a target feature extraction model to mine the item interest of the target behavior information to obtain a target feature vector representing the interest of the user to be recommended in the item.
[0159] Among them, the training process of the target feature extraction model is as follows:
[0160] Determining a first loss of a first initial feature extraction model based on first information to be trained; the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item;
[0161] Determining a second loss of a second initial feature extraction model based on second information to be trained; the second information to be trained represents a behavioral feature of a sample user with respect to a second item visited;
[0162] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model.
[0163] Step 403: The item recommendation device determines the similarity between the user to be recommended and each preset candidate user based on the target feature vector and the feature vector of each preset candidate user in the preset candidate user set.
[0164] In the embodiment of the present application, the preset candidate user set may store a feature vector of each preset candidate user. The behavior information of each preset candidate user can characterize the behavior characteristics of each preset candidate user on the visited items and the item attributes of the visited items. The feature vector of each preset candidate user can characterize the interest of each preset candidate user on the items. The similarity between the user to be recommended and each preset candidate user characterizes the degree of similarity between the user to be recommended and each candidate user in the preferences for items.
[0165] In a feasible implementation, users whose number of access behaviors within a preset time period is greater than the first number threshold can be determined as preset candidate users. For example, users whose number of access behaviors within 15 days is greater than N can be determined as preset candidate users. The user feature extraction model in the target feature extraction model is used to process the behavior information of each preset candidate user to obtain the feature vector of each preset candidate user. The inner product method can be used to determine the similarity between the user to be recommended and each preset candidate user based on the target feature vector and the feature vector of each preset candidate user in the preset candidate user set. The calculation formula can be: Among them, u is the feature representation (i.e., feature vector) of the user to be recommended, and v is the feature representation of the preset candidate user.
[0166] Step 404: The item recommendation device sorts the preset candidate users in the preset candidate user set based on similarity.
[0167] In the embodiment of the present application, the preset candidate users in the preset candidate user set may be sorted in descending order based on similarity.
[0168] Step 405: The item recommendation device determines neighboring users from a preset candidate user set based on the ranking result for the preset candidate users and a preset first threshold.
[0169] In an embodiment of the present application, the preset first threshold can be set in advance, and the preset first threshold can be set to K. In this case, the neighboring users are determined from the preset candidate user set based on the sorting result for the preset candidate users and K, that is, the K preset candidate users ranked first in the preset candidate user set are determined as neighboring users.
[0170] Step 406: The item recommendation device determines a set of items to be selected that the neighboring user is interested in based on the neighboring behavior information.
[0171] In the embodiment of the present application, the neighbor behavior information is the behavior information generated when the neighbor user visits the item, which can characterize the behavior characteristics of the neighbor user on the visited item and the item attributes of the visited item. In a feasible implementation, the neighbor behavior information can be the item sequence of the items visited by the neighbor user and the category sequence of the category to which the items visited by the neighbor user belong. The set of users to be selected is the set of items that the neighbor users are interested in.
[0172] In a feasible implementation, a set of items to be selected can be determined from a set of preset candidate items based on neighbor behavior information; the set of preset candidate items can be pre-set, and the set of preset candidate items can include multiple preset candidate items, and the items in the candidate item set are all items with a high access frequency in the target platform.
[0173] Wherein, step 406 can be implemented by the following steps:
[0174] Step 406a: The item recommendation device determines a neighbor feature vector representing the interest of neighbor users in the item based on the neighbor behavior information.
[0175] In the embodiment of the present application, the neighbor feature vector represents the interest of the neighbor user in the item. In a feasible implementation, the user feature extraction model in the target feature extraction model can be used to predict the interest of the item on the neighbor behavior information to obtain the neighbor feature vector.
[0176] Step 406b: The item recommendation device determines the interest of the neighboring user in each preset candidate item based on the neighboring feature vector and the feature vector of each preset candidate item in the preset candidate item set.
[0177] In the embodiment of the present application, the feature vector of each preset candidate item represents multiple attributes of each preset candidate item, such as category, style, store, etc. The interest of neighboring users in each preset candidate item is the degree of preference of neighboring users for each preset candidate item.
[0178] In a feasible implementation, preset candidate items can be determined based on the number of times the items are accessed; further, items whose number of accesses is greater than a second number threshold can be determined as preset candidate items; then the preset candidate items are added to the candidate item set, wherein the preset candidate item set is a pool of tens of millions of items, and the item feature extraction model in the target feature extraction model is used to process the item information of each preset candidate item to obtain the feature vector of each preset candidate item, and then the inner product method is used to determine the interest of the neighboring users in each candidate item based on the neighbor feature vector and the feature vector of each preset candidate item in the preset candidate item set, and the calculation formula can be: Among them, v is the feature representation of the neighboring user, and s is the feature representation of the preset candidate item.
[0179] Step 406c: The item recommendation device sorts the preset candidate items in the preset candidate item set based on the interest level.
[0180] In the embodiment of the present application, the preset candidate items in the preset candidate item set may be sorted in descending order based on the interest level.
[0181] Step 406d: The item recommendation device determines a set of items to be selected from the preset candidate item set based on the ranking result of the preset candidate items and the preset second threshold.
[0182] In an embodiment of the present application, the preset second threshold can be set in advance, and the preset second threshold can be set to K. In this case, the set of items to be selected is determined from the set of preset candidate items based on the sorting results for the preset candidate items and the preset second threshold, that is, the K preset candidate items ranked first in the set of preset candidate items are determined as the items to be selected and added to the set of items to be selected.
[0183] Step 407: The item recommendation device determines a target item of interest to the user from the set of items to be selected.
[0184] In an embodiment of the present application, based on the similarity between the user to be recommended and the neighboring users, the neighboring users' interest in the selected item, and the number of visits to the selected item, the target item of interest to the user to be recommended can be determined from the set of items to be selected, and the target item can be recommended to the user to be recommended.
[0185] Wherein, step 407 can be implemented by the following steps:
[0186] Step 407a: The item recommendation device determines a target value of the set of items to be selected based on the similarity and interest between the user to be recommended and the neighboring users and the number of visits to the items to be selected.
[0187] In the embodiment of the present application, since there is a large difference in the number of times an item is visited, the number of times the items to be processed are visited can be normalized to eliminate the difference in the number of times the items to be processed are visited. The score of the item to be selected represents the matching degree between the user to be recommended and the item to be selected, that is, the degree of preference of the user to be recommended for the item to be selected. The calculation formula for the score of the item to be selected can be: Among them, sim(u,v) represents the similarity between the user u to be recommended and the neighbor user v, prob(v,i) represents the interest of the neighbor user v in the selected item i, and score(i) represents the normalized value of the number of visits to the item i to be processed.
[0188] Step 407b: The item recommendation device sorts the items to be selected in the set of items to be selected based on the target values.
[0189] In a feasible implementation, the items to be selected in the set of items to be selected may be sorted in descending order.
[0190] Step 407c: The item recommendation device determines a target item from the set of items to be selected based on the ranking result of the items to be selected and a preset third threshold.
[0191] In an embodiment of the present application, the preset third threshold can be set in advance, and the preset third threshold can be set to K; in this case, the target item is determined from the set of items to be selected based on the sorting result of the items to be selected and the preset third threshold, that is, the K items to be selected that are sorted first in the set of items to be selected are determined as the target items.
[0192] In the embodiment of the present application, by learning user behavior information through self-supervised learning technology, it is possible to more accurately learn the user's feature representation and obtain more accurate user expression; the user behavior is not directly used to determine the items recommended for the user, but the items that the neighboring users are interested in are used to determine the items recommended for the user. In this way, the target item recommended by the to-be-recommended user is determined based on the interest of the neighboring users in the item, that is, the interest of the to-be-recommended user in the item is converted into the interest of the neighboring users in the item. In fact, the interest of the to-be-recommended user in the item is deeply mined, and the range of items that the to-be-recommended user is interested in is expanded. Moreover, the preset candidate item set used is an item pool of tens of millions, which ensures the breadth and diversity of items, thereby solving the problem of insufficient richness in the current recommendation system to a certain extent and improving the user experience.
[0193] like Figure 6As shown in FIG. 1 , the general recommendation system recommends items to users through the following processes: recall, rough sorting, fine sorting, and re-sorting, etc. The richness of the recommended items is mainly achieved through multi-way recall, that is, the items obtained in the recall stage are determined from the candidate material set through the user's multiple interests. However, the starting point of this stage focuses on the user's own behavior and interests, and cannot provide any other richness. When the item recommendation method provided in the embodiment of the present application is used in the recommendation system, the user's behavior is not directly used to determine the items recommended to the user, but the items that the neighboring users are interested in are used to determine the items recommended to the user. This can increase the richness of the items in the recall stage. Figure 7 As shown, the process of the item recommendation method provided in the embodiment of the present application when used in a recommendation system is as follows: step 501, obtaining user behavior information; step 502, using a user feature extraction model to determine the user's feature representation; step 503, determining neighboring users from a set of candidate users based on the user's feature representation; step 504, determining items to be selected that the neighboring users are interested in from the set of candidate items; step 504, determining the final recommendation result from the items to be selected.
[0194] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0195] The item recommendation method provided in the embodiment of the present application adopts a target feature extraction model to mine the target behavior information of the recommended user for item interest, because the target feature extraction model can not only expand the user's interest in items, but also improve the accuracy of the user's interest in items. The obtained target feature vector is more accurate and can better characterize the interest of the recommended user in more items. The range of neighboring users determined based on the target feature vector is wider and more accurate. Therefore, the target items recommended to the recommended user based on the neighboring users are more diverse, more accurate, and more in line with the preferences of the recommended user. This overcomes the problem in the prior art that the range of neighboring users determined based on the user's behavior information is small and the accuracy is low, resulting in a relatively single recommendation result with low accuracy.
[0196] Based on the above embodiments, the present invention provides an item recommendation device, which can be applied to Figure 1 and 5 In the item recommendation method provided in the corresponding embodiment, refer to Figure 8 As shown, the item recommendation device 6 may include:
[0197] An acquisition unit 61 is used to acquire target behavior information generated when the user to be recommended visits the item;
[0198] The first processing unit 62 is used to predict the item interest of the target behavior information using a target feature extraction model to obtain a target feature vector representing the interest of the user to be recommended to the item;
[0199] The first processing unit 62 is further used to determine neighboring users of the user to be recommended based on the target feature vector;
[0200] The first processing unit 62 is further used to determine the target item based on the neighbor behavior information generated when the neighbor users access the item, and recommend the target item to the user to be recommended;
[0201] Among them, the training process of the target feature extraction model is as follows:
[0202] Determining a first loss of a first initial feature extraction model based on first information to be trained; the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item;
[0203] Determining a second loss of a second initial feature extraction model based on second information to be trained; the second information to be trained represents a behavioral feature of a sample user with respect to a second item visited;
[0204] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model.
[0205] In other embodiments of the present application, the first processing unit 62 is specifically configured to perform the following steps:
[0206] Determine the similarity between the user to be recommended and each preset candidate user based on the target feature vector and the feature vector of each preset candidate user in the preset candidate user set;
[0207] Sorting the preset candidate users in the preset candidate user set based on similarity;
[0208] Based on the ranking result for the preset candidate users and the preset first threshold, a neighboring user is determined from the preset candidate user set.
[0209] In other embodiments of the present application, the first processing unit 62 is specifically configured to perform the following steps:
[0210] Based on the neighbor behavior information, determine the set of items to be selected that the neighbor users are interested in;
[0211] From the set of items to be selected, determine the target items that the user is interested in to be recommended.
[0212] In other embodiments of the present application, the first processing unit 62 is specifically configured to perform the following steps:
[0213] Based on the neighbor behavior information, determine the neighbor feature vector that represents the neighbor user's interest in the item;
[0214] Determine the interest of the neighboring user in each preset candidate item based on the neighboring feature vector and the feature vector of each preset candidate item in the preset candidate item set;
[0215] sorting the preset candidate items in the preset candidate item set based on the interest level;
[0216] Based on the ranking result of the preset candidate items and the preset second threshold, a set of items to be selected is determined from the preset candidate item set.
[0217] In other embodiments of the present application, the first processing unit 62 is specifically configured to perform the following steps:
[0218] Determine the target value of the set of items to be selected based on the similarity and interest between the user to be recommended and the neighboring users and the number of visits of the items to be selected;
[0219] Sort the items to be selected in the set of items to be selected based on the target values;
[0220] Based on the ranking result of the items to be selected and a preset third threshold, a target item is determined from the set of items to be selected.
[0221] It should be noted that the specific description of the steps performed by each unit can be found in Figure 1 and 5 The item recommendation method provided in the corresponding embodiment will not be described in detail here.
[0222] The item recommendation device provided in the embodiment of the present application adopts a target feature extraction model to mine the target behavior information of the recommended user for item interest, because the target feature extraction model can not only expand the user's interest in items, but also improve the accuracy of the user's interest in items. The obtained target feature vector is more accurate and can better characterize the interest of the recommended user in more items. The range of neighboring users determined based on the target feature vector is wider and more accurate. Therefore, the target items recommended to the recommended user based on the neighboring users are more diverse and more accurate, and are more in line with the preferences of the recommended user. This overcomes the problem in the prior art that the range of neighboring users determined based on the user's behavior information is small and the accuracy is low, resulting in a relatively single recommendation result with low accuracy.
[0223] Based on the above embodiments, the present invention provides a model training device, which can be applied to Figure 2 and 3 In the model training method provided in the corresponding embodiment, refer to Fig. 9 As shown, the model training device 7 may include:
[0224] A determination unit 71 is used to determine first information to be trained and second information to be trained corresponding to the sample user; wherein the first information to be trained represents the behavior characteristics of the sample user with respect to the first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user with respect to the second item visited;
[0225] A second processing unit 72 is used to determine a first loss of a first initial feature extraction model based on the first information to be trained;
[0226] The second processing unit 72 is further used to determine a second loss of the second initial feature extraction model based on the second information to be trained;
[0227] The second processing unit 72 is also used to train the first initial feature extraction model based on the first loss and the second loss to obtain a target feature extraction model; wherein the target feature extraction model is used to mine feature vectors representing the user's interest in the item, so as to recommend diversified items to the user based on the mined feature vectors.
[0228] In other embodiments of the present application, the determining unit 71 is specifically configured to perform the following steps:
[0229] Determine first behavior information generated when a sample user visits a first number of first items, item information of the first items, and personal information of the sample user as first information to be trained;
[0230] The second behavior information generated when the sample user visits a second quantity of second items is determined as the second information to be trained; wherein the second quantity is greater than the first quantity.
[0231] In other embodiments of the present application, the second processing unit 72 is specifically configured to perform the following steps:
[0232] Convert the first behavior information and the personal information of the sample user into a first vector, and convert the item information of the first item into a second vector;
[0233] Using a user feature extraction model in a first initial feature extraction model to extract features from the first vector, to obtain a first sub-feature vector;
[0234] Using the item feature extraction model in the first initial feature extraction model to extract features from the second vector to obtain a second sub-feature vector;
[0235] Based on the first sub-eigenvector and the second sub-eigenvector, a first loss is determined.
[0236] In other embodiments of the present application, the second processing unit 72 is specifically configured to perform the following steps:
[0237] Integrate the first sub-eigenvector and the second sub-eigenvector to obtain a first eigenvector;
[0238] A first loss is determined based on the first feature vector and the first information to be trained.
[0239] In other embodiments of the present application, the second processing unit 72 is specifically configured to perform the following steps:
[0240] Splitting the second behavior information to obtain first sub-behavior information and second sub-behavior information;
[0241] Convert the first sub-behavior information into a third vector, and convert the second sub-behavior information into a fourth vector;
[0242] Using the first line feature extraction model in the second initial feature extraction model to extract features from the third vector, to obtain a third sub-feature vector;
[0243] Using the second behavior feature extraction model in the second initial feature extraction model to extract features from the fourth vector, to obtain a fourth sub-feature vector;
[0244] Based on the third sub-eigenvector and the fourth sub-eigenvector, a second loss is determined.
[0245] In other embodiments of the present application, the second processing unit 72 is specifically configured to perform the following steps:
[0246] Integrate the third sub-eigenvector and the fourth sub-eigenvector to obtain a second eigenvector;
[0247] Based on the second feature vector and the second information to be trained, a second loss is determined.
[0248] In other embodiments of the present application, the second processing unit 72 is specifically configured to perform the following steps:
[0249] Determining a target loss based on the first loss and the second loss;
[0250] Updating a model parameter of the first initial feature extraction model based on the target loss so that a first loss corresponding to the updated first initial feature extraction model satisfies a convergence condition;
[0251] The updated first initial feature extraction model is determined as the target feature extraction model.
[0252] It should be noted that the specific description of the steps performed by each unit can be found in Figure 2 and 3 The model training method provided in the corresponding embodiment will not be repeated here.
[0253] The model training device provided in the embodiment of the present application can mine multiple attributes of items of interest to users through the first initial feature extraction model, which is not limited to a certain item, and can mine the user's interest in more items through the second initial feature extraction model; the first initial feature extraction model is trained based on the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model to obtain a target feature extraction model, and the training of the first initial feature extraction model is optimized by the second initial feature extraction model, so that the model accuracy of the trained target feature extraction model can be improved. Since the target feature extraction model is trained based on the first initial feature extraction model that can mine multiple attributes of items of interest to sample users and the second initial feature extraction model that can mine the user's interest in more items, the target feature extraction model can not only expand the range of items of interest to users, but also improve the accuracy of the user's interest in items. Therefore, the range of neighboring users determined based on the user's interest in items is wide and the accuracy is high, and items that are more in line with the user's preferences can be recommended to the user, which overcomes the problem that the range of neighboring users determined directly based on the user's behavior information in the prior art is small and the accuracy is low, resulting in a relatively single recommendation result and low accuracy.
[0254] Based on the above embodiments, the embodiments of the present application provide an item recommendation device, which can be applied to Figure 1 and 5 In the item recommendation method provided in the corresponding embodiment, refer to Fig.10 As shown, the item recommendation device 8 may include: a first processor 81, a first memory 82 and a first communication bus 83, wherein:
[0255] The first communication bus 83 is used to realize the communication connection between the first processor 81 and the first memory 82;
[0256] The first processor 81 is used to execute the item recommendation program in the first memory 82 to implement the following steps:
[0257] Obtain target behavior information generated when the recommended user visits the item;
[0258] The target feature extraction model is used to predict the item interest of the target behavior information, and a target feature vector representing the interest of the recommended user in the item is obtained;
[0259] Based on the target feature vector, determine the neighboring users of the user to be recommended;
[0260] Determine the target item based on the neighbor behavior information generated when the neighbor users access the item, and recommend the target item to the user to be recommended;
[0261] Among them, the training process of the target feature extraction model is as follows:
[0262] Determining a first loss of a first initial feature extraction model based on first information to be trained; the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item;
[0263] Determining a second loss of a second initial feature extraction model based on second information to be trained; the second information to be trained represents a behavioral feature of a sample user with respect to a second item visited;
[0264] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model.
[0265] In other embodiments of the present application, the first processor 81 is used to execute the item recommendation program in the first memory 82 and further implement the following steps:
[0266] Determine the similarity between the user to be recommended and each preset candidate user based on the target feature vector and the feature vector of each preset candidate user in the preset candidate user set;
[0267] Sorting the preset candidate users in the preset candidate user set based on similarity;
[0268] Based on the ranking result for the preset candidate users and the preset first threshold, a neighboring user is determined from the preset candidate user set.
[0269] In other embodiments of the present application, the first processor 81 is used to execute the item recommendation program in the first memory 82 to determine the neighboring users of the user to be recommended based on the target feature vector, so as to implement the following steps:
[0270] Determine the similarity between the user to be recommended and each preset candidate user based on the target feature vector and the feature vector of each preset candidate user in the preset candidate user set;
[0271] Sorting the preset candidate users in the preset candidate user set based on similarity;
[0272] Based on the ranking result for the preset candidate users and the preset first threshold, a neighboring user is determined from the preset candidate user set.
[0273] In other embodiments of the present application, the first processor 81 is used to execute the item recommendation program in the first memory 82 to determine the target item based on the neighbor behavior information generated when the neighbor user accesses the item, so as to implement the following steps:
[0274] Based on the neighbor behavior information, determine a set of items to be selected that the neighbor user is interested in;
[0275] From the set of items to be selected, the target items to be recommended that the user is interested in are determined.
[0276] In other embodiments of the present application, the first processor 81 is used to execute the item recommendation program in the first memory 82, based on the neighbor behavior information generated when the neighbor user accesses the item, to determine the set of items to be selected that the neighbor user is interested in, so as to implement the following steps:
[0277] Based on the neighbor behavior information, determine the neighbor feature vector that represents the neighbor user's interest in the item;
[0278] Determine the interest of the neighboring user in each preset candidate item based on the neighboring feature vector and the feature vector of each preset candidate item in the preset candidate item set;
[0279] sorting the preset candidate items in the preset candidate item set based on the interest level;
[0280] Based on the ranking result of the preset candidate items and the preset second threshold, a set of items to be selected is determined from the preset candidate item set.
[0281] In other embodiments of the present application, the first processor 81 is used to execute the item recommendation program in the first memory 82 to determine the target item of interest to be recommended to the user from the set of items to be selected, so as to implement the following steps:
[0282] Determine the target value of the set of items to be selected based on the similarity and interest between the user to be recommended and the neighboring users and the number of visits of the items to be selected;
[0283] Sort the items to be selected in the set of items to be selected based on the target values;
[0284] Based on the ranking result of the items to be selected and a preset third threshold, a target item is determined from the set of items to be selected.
[0285] It should be noted that the specific description of the steps performed by the first processor can be referred to Figure 1 and 5 The item recommendation method provided in the corresponding embodiment will not be described in detail here.
[0286] The item recommendation device provided in the embodiment of the present application adopts a target feature extraction model to mine the target behavior information of the recommended user for item interest, because the target feature extraction model can not only expand the user's interest in items, but also improve the accuracy of the user's interest in items. The obtained target feature vector is more accurate and can better characterize the interest of the recommended user in more items. The range of neighboring users determined based on the target feature vector is wider and more accurate. Therefore, the target items recommended to the recommended user based on the neighboring users are more diverse, more accurate, and more in line with the preferences of the recommended user. This overcomes the problem in the prior art that the range of neighboring users determined based on the user's behavior information is small and the accuracy is low, resulting in a relatively single recommendation result with low accuracy.
[0287] Based on the above embodiments, the embodiments of the present application provide a model training device, which can be applied to Figure 2 and 3 In the model training method provided in the corresponding embodiment, refer to Fig.11 As shown, the model training device 9 may include: a second processor 91, a second memory 92, and a second communication bus 93, wherein:
[0288] The second communication bus 93 is used to realize the communication connection between the second processor 91 and the second memory 92;
[0289] The second processor 91 is used to execute the model training program in the second memory 92 to implement the following steps:
[0290] Determine first information to be trained and second information to be trained corresponding to the sample user; wherein the first information to be trained represents the behavior characteristics of the sample user with respect to the first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user with respect to the second item visited;
[0291] Determining a first loss of a first initial feature extraction model based on the first information to be trained;
[0292] Determining a second loss of a second initial feature extraction model based on the second information to be trained;
[0293] Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model; wherein the target feature extraction model is used to mine feature vectors representing the user's interest in the item, so as to recommend diversified items to the user based on the mined feature vectors.
[0294] In other embodiments of the present application, the second processor 91 is used to execute the model training program in the second memory 92 to determine the first information to be trained and the second information to be trained corresponding to the sample user, so as to implement the following steps:
[0295] Determine first behavior information generated when a sample user visits a first number of first items, item information of the first items, and personal information of the sample user as first information to be trained;
[0296] The second behavior information generated when the sample user visits a second quantity of second items is determined as the second information to be trained; wherein the second quantity is greater than the first quantity.
[0297] In other embodiments of the present application, the second processor 91 is used to execute the model training program in the second memory 92, based on the first information to be trained, to determine the first loss of the first initial feature extraction model, so as to implement the following steps:
[0298] Convert the first behavior information and the personal information of the sample user into a first vector, and convert the item information of the first item into a second vector;
[0299] Using a user feature extraction model in a first initial feature extraction model to extract features from the first vector, to obtain a first sub-feature vector;
[0300] Using the item feature extraction model in the first initial feature extraction model to extract features from the second vector to obtain a second sub-feature vector;
[0301] Based on the first sub-eigenvector and the second sub-eigenvector, a first loss is determined.
[0302] In other embodiments of the present application, the second processor 91 is used to execute the model training program in the second memory 92 based on the first sub-feature vector and the second sub-feature vector to determine the first loss to implement the following steps:
[0303] Integrate the first sub-eigenvector and the second sub-eigenvector to obtain a first eigenvector;
[0304] A first loss is determined based on the first feature vector and the first information to be trained.
[0305] In other embodiments of the present application, the second processor 91 is used to execute the model training program in the second memory 92 based on the second information to be trained, and determine the second loss of the second initial feature extraction model to implement the following steps:
[0306] Splitting the second behavior information to obtain first sub-behavior information and second sub-behavior information;
[0307] Convert the first sub-behavior information into a third vector, and convert the second sub-behavior information into a fourth vector;
[0308] Using the first line feature extraction model in the second initial feature extraction model to extract features from the third vector, to obtain a third sub-feature vector;
[0309] Using the second behavior feature extraction model in the second initial feature extraction model to extract features from the fourth vector, to obtain a fourth sub-feature vector;
[0310] Based on the third sub-eigenvector and the fourth sub-eigenvector, a second loss is determined.
[0311] In other embodiments of the present application, the second processor 91 is used to execute the model training program in the second memory 92 based on the third sub-feature vector and the fourth sub-feature vector to determine the second loss to implement the following steps:
[0312] Integrate the third sub-eigenvector and the fourth sub-eigenvector to obtain a second eigenvector;
[0313] Based on the second feature vector and the second information to be trained, a second loss is determined.
[0314] In other embodiments of the present application, the second processor 91 is used to execute the model training program in the second memory 92, train the first initial feature extraction model based on the first loss and the second loss, and obtain the target feature extraction model to implement the following steps:
[0315] Determining a target loss based on the first loss and the second loss;
[0316] Updating a model parameter of the first initial feature extraction model based on the target loss so that a first loss corresponding to the updated first initial feature extraction model satisfies a convergence condition;
[0317] The updated first initial feature extraction model is determined as the target feature extraction model.
[0318] It should be noted that the specific description of the steps performed by the first processor can be referred to Figure 2 and 3 The model training method provided in the corresponding embodiment will not be repeated here.
[0319] The model training device provided in the embodiment of the present application can mine multiple attributes of items of interest to users through the first initial feature extraction model, which is not limited to a certain item, and can mine the user's interest in more items through the second initial feature extraction model; the first initial feature extraction model is trained based on the first loss of the first initial feature extraction model and the second loss of the second initial feature extraction model to obtain a target feature extraction model, and the training of the first initial feature extraction model is optimized by the second initial feature extraction model, so that the model accuracy of the trained target feature extraction model can be improved. Since the target feature extraction model is trained based on the first initial feature extraction model that can mine multiple attributes of items of interest to sample users and the second initial feature extraction model that can mine the user's interest in more items, the target feature extraction model can not only expand the range of items of interest to users, but also improve the accuracy of the user's interest in items. Therefore, the range of neighboring users determined based on the user's interest in items is wide and the accuracy is high, and items that are more in line with the user's preferences can be recommended to the user, which overcomes the problem that the range of neighboring users determined directly based on the user's behavior information in the prior art is small and the accuracy is low, resulting in a relatively single recommendation result and low accuracy.
[0320] Based on the foregoing embodiments, the embodiments of the present application provide a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement Figure 2 and 3 The steps of the model training method provided in the corresponding embodiment, or Figure 1 and 5 The corresponding embodiment provides steps of the item recommendation method.
[0321] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0322] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0323] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0324] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0325] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An item recommendation method, characterized in that: The method comprises: Obtain target behavior information generated when the recommended user visits the item; Using a target feature extraction model to mine the item interest of the target behavior information, and obtaining a target feature vector representing the interest of the to-be-recommended user in the item; Based on the target feature vector, determining neighboring users of the user to be recommended; Determine a target item based on neighbor behavior information generated when the neighbor user accesses the item, and recommend the target item to the user to be recommended; Among them, the training process of the target feature extraction model is as follows: Determining a first loss of a first initial feature extraction model based on first information to be trained, wherein the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item; Determining a second loss of a second initial feature extraction model based on second information to be trained; wherein the second information to be trained represents a behavioral feature of the sample user with respect to the second item visited; Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain the target feature extraction model.
2. The method according to claim 1, characterized in that: The determining, based on the target feature vector, the neighboring users of the user to be recommended includes: Determining the similarity between the user to be recommended and each preset candidate user based on the target feature vector and the feature vector of each preset candidate user in the preset candidate user set; sorting the preset candidate users in the preset candidate user set based on the similarity; Based on the ranking result for the preset candidate users and a preset first threshold, the neighboring user is determined from the preset candidate user set.
3. The method according to any one of claims 1 to 2, characterized in that The determining of the target item based on the neighbor behavior information generated when the neighbor user accesses the item includes: Based on the neighbor behavior information, determine a set of items to be selected that the neighbor user is interested in; From the set of items to be selected, the target items to be recommended that the user is interested in are determined.
4. The method according to claim 3, characterized in that The determining, based on the neighbor behavior information, a set of items to be selected that the neighbor user is interested in includes: Based on the neighbor behavior information, determining a neighbor feature vector representing the interest of the neighbor user in the item; Determining the interest of the neighboring user in each preset candidate item based on the neighboring feature vector and the feature vector of each preset candidate item in the preset candidate item set; sorting the preset candidate items in the preset candidate item set based on the interest level; Based on the ranking result of the preset candidate items and a preset second threshold, the set of items to be selected is determined from the set of preset candidate items.
5. The method according to claim 4, characterized in that The step of determining the target item of interest to the user to be recommended from the set of items to be selected comprises: Determining a target value of the set of items to be selected based on the similarity between the user to be recommended and the neighboring users, the interest level, and the number of visits to the items to be selected; sorting the items to be selected in the set of items to be selected based on the target value; The target item is determined from the set of items to be selected based on the ranking result of the items to be selected and a preset third threshold.
6. A model training method, characterized in that: The method comprises: Determine first information to be trained and second information to be trained corresponding to the sample user; wherein the first information to be trained represents the behavior characteristics of the sample user with respect to the first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user with respect to the second item visited; Determining a first loss of a first initial feature extraction model based on the first information to be trained; Determining a second loss of a second initial feature extraction model based on the second information to be trained; Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain a target feature extraction model; wherein the target feature extraction model is used to mine feature vectors representing the user's interest in items, so as to recommend diversified items to the user based on the mined feature vectors.
7. The method according to claim 6, characterized in that The step of determining the first information to be trained and the second information to be trained corresponding to the sample user includes: Determine, as the first information to be trained, first behavior information generated when the sample user visits a first number of first items, item information of the first items, and personal information of the sample user; The second behavior information generated when the sample user visits a second quantity of second items is determined as the second information to be trained; wherein the second quantity is greater than the first quantity.
8. The method according to claim 7, characterized in that The determining, based on the first information to be trained, a first loss of the first initial feature extraction model includes: Converting the first behavior information and the personal information of the sample user into a first vector, and converting the item information of the first item into a second vector; Using a user feature extraction model in the first initial feature extraction model to extract features from the first vector to obtain a first sub-feature vector; Using the object feature extraction model in the first initial feature extraction model to extract features from the second vector to obtain a second sub-feature vector; The first loss is determined based on the first sub-eigenvector and the second sub-eigenvector.
9. The method according to claim 8, characterized in that The determining the first loss based on the first sub-feature vector and the second sub-feature vector includes: Integrate the first sub-eigenvector and the second sub-eigenvector to obtain a first eigenvector; The first loss is determined based on the first feature vector and the first information to be trained.
10. The method according to claim 7, characterized in that The determining, based on the second information to be trained, a second loss of the second initial feature extraction model comprises: Splitting the second behavior information to obtain first sub-behavior information and second sub-behavior information; Convert the first sub-behavior information into a third vector, and convert the second sub-behavior information into a fourth vector; Using the first behavior feature extraction model in the second initial feature extraction model to extract features from the third vector to obtain a third sub-feature vector; Using a second behavior feature extraction model in the second initial feature extraction model to extract features from the fourth vector to obtain a fourth sub-feature vector; The second loss is determined based on the third sub-eigenvector and the fourth sub-eigenvector.
11. The method according to claim 10, characterized in that The determining the second loss based on the third sub-eigenvector and the fourth sub-eigenvector includes: Integrate the third sub-eigenvector and the fourth sub-eigenvector to obtain a second eigenvector; The second loss is determined based on the second feature vector and the second information to be trained.
12. The method according to any one of claims 6 to 11, characterized in that The step of training the first initial feature extraction model based on the first loss and the second loss to obtain a target feature extraction model includes: determining a target loss based on the first loss and the second loss; Updating a model parameter of the first initial feature extraction model based on the target loss so that a first loss corresponding to the updated first initial feature extraction model satisfies a convergence condition; The updated first initial feature extraction model is determined as the target feature extraction model.
13. An item recommendation device, characterized in that: The item recommendation device comprises: An acquisition unit, used to acquire target behavior information generated when the user to be recommended visits the item; A first processing unit is used to mine the item interest of the target behavior information using a target feature extraction model to obtain a target feature vector representing the interest of the user to be recommended to the item; The first processing unit is further configured to determine neighboring users of the user to be recommended based on the target feature vector; The first processing unit is further configured to determine a target item based on neighbor behavior information generated when the neighbor users access the item, and recommend the target item to the user to be recommended; Among them, the training process of the target feature extraction model is as follows: Determining a first loss of a first initial feature extraction model based on first information to be trained, wherein the first information to be trained represents behavioral characteristics of a sample user on a first item visited and item attributes of the first item; Determining a second loss of a second initial feature extraction model based on second information to be trained; wherein the second information to be trained represents a behavioral feature of the sample user with respect to the second item visited; Based on the first loss and the second loss, the first initial feature extraction model is trained to obtain the target feature extraction model.
14. A model training device, characterized in that: The model training device comprises: A determination unit, configured to determine first information to be trained and second information to be trained corresponding to the sample user; wherein the first information to be trained represents the behavior characteristics of the sample user with respect to the first item visited and the item attributes of the first item, and the second information to be trained represents the behavior characteristics of the sample user with respect to the second item visited; A second processing unit, configured to determine a first loss of a first initial feature extraction model based on the first information to be trained; The second processing unit is further used to determine a second loss of a second initial feature extraction model based on the second information to be trained; The second processing unit is also used to train the first initial feature extraction model based on the first loss and the second loss to obtain a target feature extraction model; wherein the target feature extraction model is used to mine feature vectors that represent the user's interest in items, so as to recommend diversified items to the user based on the mined feature vectors.
15. An item recommendation device, characterized in that: The device comprises: a first processor, a first memory and a first communication bus; The first communication bus is used to realize the communication connection between the first processor and the first memory; The first processor is used to execute the item recommendation program in the first memory to implement the steps of the item recommendation method according to any one of claims 1 to 5.
16. A model training device, characterized in that: The device comprises: a second processor, a second memory, and a second communication bus; The second communication bus is used to realize the communication connection between the second processor and the second memory; The second processor is used to execute the model training program in the second memory to implement the steps of the model training method as described in any one of claims 6 to 12.
17. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the item recommendation method described in any one of claims 1 to 5, or the steps of the model training method described in any one of claims 6 to 12.
