Content recommendation method, device, electronic device and storage medium
By using a cluster transformation network in the recommendation system to determine the target network from multiple cluster transformation networks, extracting intermediate features and making predictions, the recommendation needs of small sample users are solved and the robustness and interpretability of the model are improved.
Patent Information
- Application Number
- CN202210327284.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-03-30
AI Technical Summary
Since the training data of existing recommendation systems mainly comes from a small number of user accounts, they cannot meet the recommendation needs of small sample users, have poor robustness, and cannot reasonably explain the prediction results, which affects the user experience.
By obtaining candidate content and user account features, a cluster transformation network is used to determine a target cluster transformation network from multiple pre-trained cluster transformation networks, intermediate features are extracted, and input into a prediction network, which outputs a second prediction result to determine the recommended content.
The robustness of the prediction model has been improved, enabling it to meet the recommendation needs of small sample users, and improving the model's interpretability and recommendation accuracy.
Smart Images

Figure CN114637926B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of deep learning technology, and in particular to a content recommendation method, device, electronic device, and storage medium. Background Art
[0002] Currently, recommendation systems complete content recommendation tasks by sequentially executing multiple steps, including recall, rough sorting, refined sorting, ranking, and re-ranking. Typically, each step predicts the probability of a user performing a certain action on the content, such as liking or commenting on the content, based on the content and user account behavior. Content is then recommended to the user based on this probability. This content can include music, short videos, images, and text.
[0003] In related technologies, recommendation systems use trained prediction models to perform the aforementioned prediction process. According to the 80 / 20 rule, most of the training data for prediction models often comes from a small amount of user account data. This means that the prediction model can only learn the behavioral preferences of a small number of user accounts, while ignoring the behavioral preferences of the majority of user accounts (i.e., small sample users). This results in the recommendation system being unable to meet the recommendation needs of small sample users and having poor robustness. Summary of the Invention
[0004] The present disclosure provides a content recommendation method, device, electronic device, and storage medium, which can enable a prediction model to meet the recommendation needs of small sample users and improve the robustness of the prediction model.
[0005] The technical solutions of the embodiments of the present disclosure are as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a content recommendation method is provided, comprising: obtaining content features of candidate content, user account features of a user account, and a first prediction result corresponding to the user account features, the first prediction result including a first prediction probability that the user account performs each preset operation on the candidate content; determining a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extracting target intermediate features from the first prediction result using the target cluster transformation network; inputting the target intermediate features and content features into a pre-trained prediction network, the prediction network being used to output a second prediction result, the second prediction result including a second prediction probability that the user account performs each preset operation on the candidate content; and determining, based on the second prediction result, recommended content corresponding to the user account from the candidate content.
[0007] Optionally, determining a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extracting target intermediate features from the first prediction result using the target cluster transformation network, includes:
[0008] Determine the similarity between the user account features and the cluster vector corresponding to each cluster transformation network, where the cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network;
[0009] The cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account features is used as the target cluster transformation network that best matches the user account features;
[0010] The first prediction result is input into the target cluster transformation network to obtain the output target intermediate features.
[0011] Optionally, determining a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extracting target intermediate features from the first prediction result using the target cluster transformation network, includes:
[0012] Inputting the first prediction results into multiple parallel cluster transformation networks respectively to obtain intermediate features output by each cluster transformation network;
[0013] Determine the similarity between the user account features and the cluster vector corresponding to each cluster transformation network, where the cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network;
[0014] The cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature is used as the target cluster transformation network that best matches the user account feature, and the intermediate features output by the target cluster transformation network are used as the target intermediate features.
[0015] Optionally, determining the similarity between the user account features and the cluster vector corresponding to each cluster transformation network includes:
[0016] Generate a corresponding user account feature vector based on the user account features;
[0017] Determine the similarity between the user account feature vector and the cluster vector corresponding to each cluster transformation network.
[0018] Optionally, the prediction model further includes a transformation network, wherein a plurality of pre-trained cluster transformation networks are connected to the transformation network, and before determining a target cluster transformation network that best matches the user account characteristics from the plurality of pre-trained cluster transformation networks, the following steps are further included:
[0019] Inputting the unit vectors into a plurality of cluster transformation networks respectively, so that the cluster transformation network outputs a numerical feature for representing the cluster transformation network;
[0020] Each numerical feature is input into the conversion network to obtain the cluster vector corresponding to each numerical feature.
[0021] According to the second aspect of the embodiment of the present disclosure, a training method for a prediction model applied to a content recommendation system is provided. The prediction model includes multiple cluster transformation networks and a prediction network, and the method includes: obtaining sample features, label information corresponding to the sample features, and a first prediction result, the sample features including content features of the content and user account features of the user account, the label information characterizing whether the user account has performed a preset operation on the content, and the first prediction result including a first prediction probability of the user account performing each preset operation on the content; determining a target cluster transformation network that best matches the user account features from multiple cluster transformation networks, and extracting target intermediate features from the first prediction result using the target cluster transformation network; inputting the content features and target intermediate features of the content into the prediction network, obtaining a second prediction result output by the prediction network, the second prediction result including a second prediction probability of the user account performing each preset operation on the content; and training the prediction network and multiple cluster transformation networks based on the second prediction probability and label information.
[0022] Optionally, the recommendation model also includes a conversion network, and multiple cluster transformation networks are connected to the conversion network. The conversion network is used to process the numerical features corresponding to each cluster transformation network to obtain a cluster vector corresponding to each cluster transformation network. The cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network; the target cluster transformation network that best matches the user account features is the cluster transformation network whose corresponding cluster vector has the greatest similarity with the user account features.
[0023] Optionally, the prediction network and multiple cluster transformation networks are trained according to the second prediction probability and label information, including: determining a first loss value according to the second prediction probability, label information and a first loss function, where the first loss function is a cross entropy function; and updating the prediction network, multiple cluster transformation networks and the conversion network according to the first loss value.
[0024] Optionally, the method also includes: determining the similarity between cluster vectors corresponding to any two cluster transformation networks; determining a second loss value based on the maximum value of all determined similarities and a second loss function, where the second loss function is a regularization function; and updating the transformation network based on the second loss value.
[0025] According to a third aspect of an embodiment of the present disclosure, a content recommendation device is provided. The device may include: a feature acquisition unit configured to acquire content features of candidate content, user account features of a user account, and a first prediction result corresponding to the user account features, the first prediction result including a first prediction probability of the user account performing each preset operation on the candidate content; a feature extraction unit configured to determine a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extract target intermediate features from the first prediction result using the target cluster transformation network; a result prediction unit configured to input the target intermediate features and content features into a pre-trained prediction network, the prediction network being used to output a second prediction result, the second prediction result including a second prediction probability of the user account performing each preset operation on the candidate content; and a content determination unit configured to determine, from the candidate content, the recommended content corresponding to the user account based on the second prediction result.
[0026] Optionally, the feature extraction unit is specifically configured to perform: determining the similarity between the user account feature and the cluster vector corresponding to each cluster transformation network, the cluster vector corresponding to the cluster transformation network being the vector representation of the cluster transformation network; using the cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature; inputting the first prediction result into the target cluster transformation network to obtain the output target intermediate feature.
[0027] Optionally, the feature extraction unit is specifically configured to perform: inputting the first prediction result into multiple parallel cluster transformation networks respectively to obtain the intermediate features output by each cluster transformation network; determining the similarity between the user account feature and the cluster vector corresponding to each cluster transformation network, the cluster vector corresponding to the cluster transformation network being the vector representation of the cluster transformation network; taking the cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature, and taking the intermediate features output by the target cluster transformation network as the target intermediate features.
[0028] Optionally, the feature extraction unit is specifically configured to perform: generating a corresponding user account feature vector based on the user account feature; and determining the similarity between the user account feature vector and the cluster vector corresponding to each cluster transformation network.
[0029] Optionally, the prediction model also includes a conversion network, and multiple pre-trained cluster transformation networks are connected to the conversion network. The device also includes: a cluster vector generation unit, configured to execute the input of unit vectors into multiple cluster transformation networks respectively, so that the cluster transformation network outputs numerical features used to represent the cluster transformation network; each numerical feature is input into the conversion network to obtain a cluster vector corresponding to each numerical feature.
[0030] According to a fourth aspect of an embodiment of the present disclosure, a training device for a prediction model applied to a content recommendation system is provided, the prediction model including multiple cluster transformation networks and a prediction network, the device including: a feature acquisition unit, configured to execute acquisition of sample features, label information corresponding to the sample features and a first prediction result, the sample features including content features of the content and user account features of the user account, the label information characterizing whether the user account has performed a preset operation on the content, and the first prediction result including a first prediction probability of the user account performing each preset operation on the content; a feature extraction unit, configured to execute determination of a target cluster transformation network that best matches the user account features from multiple cluster transformation networks, and extract target intermediate features from the first prediction result using the target cluster transformation network; a result prediction unit, configured to execute input of the content features and the target intermediate features of the content into the prediction network, and obtain a second prediction result output by the prediction network, the second prediction result including a second prediction probability of the user account performing each preset operation on the content; a model training unit, configured to execute training of the prediction network and the multiple cluster transformation networks based on the second prediction probability and the label information.
[0031] Optionally, the recommendation model also includes a conversion network, and multiple cluster transformation networks are connected to the conversion network. The conversion network is used to process the numerical features corresponding to each cluster transformation network to obtain a cluster vector corresponding to each cluster transformation network. The cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network; the target cluster transformation network that best matches the user account features is the cluster transformation network whose corresponding cluster vector has the greatest similarity with the user account features.
[0032] Optionally, the model training unit is specifically configured to perform: determining a first loss value based on the second prediction probability, label information and a first loss function, where the first loss function is a cross entropy function; and updating the prediction network, multiple cluster transformation networks and the conversion network through the first loss value.
[0033] Optionally, the model training unit is further configured to perform: determining the similarity between cluster vectors corresponding to any two cluster transformation networks; determining a second loss value based on the maximum value of all determined similarities and a second loss function, where the second loss function is a regularization function; and updating the transformation network according to the second loss value.
[0034] According to a fifth aspect of an embodiment of the present disclosure, an electronic device is provided, which may include: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement any one of the optional content recommendation methods in the first aspect above or the training method of the prediction model in the second aspect above.
[0035] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which instructions are stored. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the optional content recommendation methods in the first aspect or the training method of the prediction model in the second aspect.
[0036] According to a seventh aspect of an embodiment of the present disclosure, a computer program product is provided, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the content recommendation method as optionally implemented in any one of the first aspects or the training method of the prediction model in the above-mentioned second aspect.
[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0038] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0039] Based on any of the above aspects, in the present disclosure, content features of candidate content, user account features of the user account, and a first prediction result corresponding to the user account features are obtained, the first prediction result including a first prediction probability of the user account performing each preset operation on the candidate content; a target cluster transformation network that best matches the user account features is determined from multiple pre-trained cluster transformation networks, and the target cluster transformation network is used to extract target intermediate features from the first prediction result; the target intermediate features and content features are input into the pre-trained prediction network, and the prediction network is used to output a second prediction result, the second prediction result including a second prediction probability of the user account performing each preset operation on the candidate content; based on the second prediction result, the recommended content corresponding to the user account is determined from the candidate content.
[0040] Based on user features and multiple cluster vectors, the cluster transformation network to which the current user belongs is determined. The first prediction result of the current user account is transformed through the cluster transformation network to obtain the corresponding target intermediate features. The prediction model is trained using the target intermediate features and content features to obtain a prediction model. By assigning users to different clusters and training the model based on the parameters corresponding to the cluster matching each user, some parameters in the prediction model can meet the recommendation needs of small sample users, effectively improving the robustness of the prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0042] Figure 1 A schematic diagram of the structure of a recommendation system provided by an embodiment of the present disclosure is shown;
[0043] Figure 2 A schematic diagram of the structure of a model architecture provided by an embodiment of the present disclosure is shown;
[0044] Figure 3 A flowchart of a prediction model training method provided by an embodiment of the present disclosure is shown;
[0045] Figure 4 A flowchart of another prediction model training method provided by an embodiment of the present disclosure is shown;
[0046] Figure 5 A schematic diagram showing the structure of another model architecture provided by an embodiment of the present disclosure is shown;
[0047] Figure 6 A flowchart of another prediction model training method provided by an embodiment of the present disclosure is shown;
[0048] Figure 7 A schematic diagram showing the structure of another model architecture provided by an embodiment of the present disclosure is shown;
[0049] Figure 8 A flow chart of a content recommendation method provided by an embodiment of the present disclosure is shown;
[0050] Figure 9 A schematic structural diagram of a content recommendation device provided by an embodiment of the present disclosure is shown;
[0051] Figure 10 A schematic structural diagram of a prediction model training device provided by an embodiment of the present disclosure is shown;
[0052] Figure 11 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0053] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0054] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0055] In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or. For example, A / B can mean A or B. "And / or" in this document is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "plurality" means two or more than two.
[0056] It will also be understood that the term “comprising” indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements and / or components.
[0057] The data involved in this disclosure may be data authorized by the user or fully authorized by all parties.
[0058] Currently, recommendation systems complete content recommendation tasks by sequentially executing multiple steps, including recall, rough sorting, refined sorting, ranking, and re-ranking. Typically, each step predicts the probability of a user performing a certain action on the content, such as liking or commenting on the content, based on the content and user account behavior. Content is then recommended to the user based on this probability. This content can include music, short videos, images, and text.
[0059] In related technologies, recommendation systems use trained prediction models to perform the aforementioned prediction process. According to the 80 / 20 rule, most of the training data for prediction models often comes from a small amount of user account data. This means that the prediction model can only learn the behavioral preferences of a small number of user accounts, while ignoring the behavioral preferences of the majority of user accounts (i.e., small sample users). This results in the recommendation system being unable to meet the recommendation needs of small sample users and having poor robustness.
[0060] At the same time, since we cannot explore its internal structure, we cannot reasonably explain the prediction results and ensure that the recommended content meets user preferences, which affects the user experience.
[0061] For example, in some real-world scenarios (such as the Kuaishou app), user behavior often exhibits fixed patterns. For example, some users prefer to watch multimedia resources repeatedly, while others prefer to perform interactive actions such as liking, commenting, and forwarding multimedia resources. These users with the same behavioral patterns naturally form a cluster (prototype). Through prototype learning, multiple cluster transformation networks can be constructed, improving a model for all users into models with different parameters for clusters corresponding to different cluster transformation networks. This ensures that even for clusters with only a small number of users, there are parameters tailored to them, alleviating the small sample size problem. When the model is used for online prediction, users may change, but their behavioral patterns remain relatively fixed, effectively improving the robustness of the model. Furthermore, because different clusters have corresponding behavioral patterns, more content that matches these patterns will be recommended to users, making the results interpretable.
[0062] Based on this, an embodiment of the present application provides a content recommendation method, including: obtaining content features of candidate content, user account features of a user account, and a first prediction result corresponding to the user account features, the first prediction result including a first prediction probability of the user account performing each preset operation on the candidate content; determining a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extracting target intermediate features from the first prediction result using the target cluster transformation network; inputting the target intermediate features and content features into a pre-trained prediction network, the prediction network being used to output a second prediction result, and determining the recommended content corresponding to the user account from the candidate content based on the second prediction result. The present disclosure can enable some parameters in the prediction model to meet the recommendation needs of small sample users, effectively improving the robustness of the prediction model.
[0063] The following is an illustrative example of the application scenario of the prediction model training method provided by the embodiment of the present disclosure:
[0064] refer to Figure 1 , which shows a schematic diagram of the structure of a recommendation system provided by an embodiment of the present disclosure. Figure 1 As shown, the recommendation system may include a server 101 and multiple terminal devices (such as terminal device 102a, terminal device 102b, terminal device 102c and terminal device 102d). The multiple terminal devices may be connected to the server 101 via a wired network or a wireless network.
[0065] Exemplarily, the terminal device in the embodiments of the present disclosure may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) and virtual reality (VR) device, etc., which can install instant messaging applications and use instant messaging applications for communication. The embodiments of the present disclosure do not impose any special restrictions on the specific form of the electronic device.
[0066] The server 101 may be a server for recommending content (such as images, videos, text, services, etc.) to users. The server 101 may utilize the technical solutions provided by the present disclosure to train a prediction model, determine content recommended to each user based on the prediction model, and then send the content to the terminal device used by the user among multiple terminal devices via wired or wireless means.
[0067] In some embodiments, the recommendation system includes Figure 2 The model architecture 210 is shown. Figure 2 As shown, the model architecture 210 includes multiple cluster transformation networks 201, a first neural network 202, a second neural network 203, and a prediction model 204.
[0068] The input to the aforementioned model architecture 210 includes three components: user account behavior characteristics, content characteristics, and a predetermined first prediction result corresponding to the user account behavior characteristics. The first prediction result may be the output of a refined ranking model of the recommendation system. The refined ranking model's input includes at least the aforementioned user account behavior characteristics and content characteristics. The refined ranking model processes the input user account behavior characteristics and content characteristics and outputs estimated scores corresponding to multiple pieces of content. These estimated scores are then processed to obtain the first prediction result. Processing of the estimated scores includes nonlinear transformations, score crossovers, array concatenation, and the like.
[0069] The first prediction result includes the first predicted probability of the user account performing each preset action on the content. For example, user account behavior features are used to characterize corresponding property characteristics. "Property characteristics" specifically refer to characteristics of a certain type of user property. For example, property characteristics can be characteristics of the user's historical usage habits; property characteristics can also be characteristics of the average duration of content viewing, etc. For example, the user account behavior features of a user account are: [30, 20, 8, 57], where the first item is the user's age (30 years old), the second item is the proportion of users who forward videos after watching them (20%), the third item can be the type of content the user is interested in (assuming 8 represents football, indicating that the user is interested in football content), and the fourth item is the proportion of users who like videos after watching them (57%). Content features can be the identifier or duration of multimedia resources. When the recommended content is multimedia resources, the preset actions can be effective playback, long playback, completion, like, comment, share, etc. of the multimedia resource.
[0070] In the above-described model architecture 210, each cluster transformation network 201 has different preset rules for converting a preset input vector into a corresponding numerical feature according to the preset rules. The first neural network 202 is used to convert the numerical feature into a cluster vector, where the cluster vector is a vector representation of the corresponding cluster transformation network. Optionally, the preset vector can be a unit vector.
[0071] In the above-described model architecture 210, each cluster transformation network 201 receives the above-described first prediction result as input and is configured to output corresponding intermediate features based on the input first prediction result. The intermediate features are determined based on user account behavior characteristics according to preset transformation rules corresponding to different cluster transformation networks. Specifically, there may be a variety of preset transformation rules, such as log transformation, sigmoid transformation, tanh transformation, etc.
[0072] The input of the second neural network 203 is the user account behavior feature, which is used to convert the user account behavior feature into a corresponding user account feature vector.
[0073] Furthermore, by comparing the similarity between the user account feature vector and each cluster vector, a cluster transformation network matching the user account is determined. The intermediate features corresponding to the cluster transformation network and the features of the content to be recommended are input into the prediction model 204 to output a second prediction result. The second prediction result includes a second predicted probability of the user account performing each preset action on the content.
[0074] Based on the above-mentioned model architecture 210, the specific implementation of the prediction model training method provided by the embodiment of the present disclosure is introduced.
[0075] In some embodiments, the execution subject of the prediction model training method provided by the present disclosure can be a prediction model training device or a content recommendation device. The content recommendation device can be a server or an electronic device, which is not limited here. For example, the content recommendation device can be the above-mentioned server 101. When the method is applied to the content recommendation device, such as Figure 3 As shown, the prediction model training method may include the following steps S301-S304:
[0076] S301. Obtain sample features, label information corresponding to the sample features, and a first prediction result. The sample features include content features of the content and user account features of the user account. The label information indicates whether the user account has performed a preset operation on the content. The first prediction result includes a first predicted probability of the user account performing each preset operation on the content.
[0077] Among them, user account behavior characteristics may include user account identification, level, characteristics related to the content recently watched by the user account (such as content identification, content duration), and operation data performed by the user account on the content it watched.
[0078] Content features can include content identification, duration, and other information. For multimedia resources, the content refers to the multimedia resource's identification and duration. It should be noted that the labels of these content features are known and serve as the training targets. When training a prediction model, the model's internal parameters are updated by comparing the model's output with the input content feature labels.
[0079] The first prediction result is obtained by inputting user account behavioral characteristics and certain content features into a refined ranking model within the recommendation system. The first prediction result includes a first predicted probability of the user account performing each preset action on the content corresponding to the input content features. For example, when the content is a multimedia resource, the preset actions may include active play, long play, complete play, like, comment, share, etc. If the predicted probability corresponding to the preset action "Like" is 60%, it indicates that the user account has a 60% probability of performing the "Like" action on the content.
[0080] It should be noted that the “certain content features” input into the refined ranking model may be the content features acquired in S301 or features of other content.
[0081] S302: Determine a target cluster transformation network that best matches the user account feature from the multiple cluster transformation networks, and use the target cluster transformation network to extract target intermediate features from the first prediction result.
[0082] Based on the similarity between the user account behavior characteristics and multiple cluster vectors, a target cluster transformation network that matches the user account behavior characteristics is determined from multiple pre-constructed cluster transformation networks, and a target intermediate feature is extracted from the first prediction result using the target cluster transformation network. The multiple cluster vectors are respectively vector representations of the multiple cluster transformation networks.
[0083] like Figure 4 As shown, in the above S302, based on the similarity between the user account feature vector and the cluster vectors corresponding to the multiple pre-built cluster transformation networks, a target cluster transformation network that matches the user account behavior characteristics is determined, and the target intermediate features extracted from the first prediction result using the target cluster transformation network are specifically included:
[0084] S401: Determine a corresponding user account feature vector based on the user account behavior feature, and determine the similarity between the user account feature vector and each cluster vector.
[0085] Specifically, the similarity between the user account feature vector and each cluster vector is measured using cosine similarity or relative entropy (KL divergence). This is then used as a basis for sampling to determine the cluster transformation network that matches the user account feature vector. Sampling is implemented using the gumbel softmax sampling method. Since sampling is not differentiable, the gumbel softmax sampling method can be used to simulate discrete sampling by controlling the temperature parameter, making the sampling operation continuously differentiable.
[0086] In some embodiments, each user account is matched with only one cluster transformation network, ensuring that user accounts with more special behavioral habit types or fewer in number can also be assigned to a cluster transformation network that matches the user account for learning, preventing all cluster transformation networks from being determined by the parameters corresponding to user accounts of a certain behavioral habit type to determine the corresponding target content.
[0087] S402 : The cluster transformation network corresponding to the cluster vector having the greatest similarity to the user account feature vector is used as the cluster transformation network matching the user account behavior feature.
[0088] S403 inputs the first prediction result into a cluster transformation network that matches the user account behavior feature to obtain a target intermediate feature.
[0089] For example, see Figure 5When there are three cluster transformation networks, the corresponding number of cluster vectors is also three. The first prediction result corresponding to the current user account is input into the cluster transformation networks corresponding to clusters A, B, and C to obtain the corresponding intermediate features a, b, and c. The similarities between the user account feature vector and clusters A, B, and C are determined, and the corresponding similarities are a = 0.15, b = 0.45, and c = 0.20, respectively. Similarity b has the highest value, and the cluster transformation network corresponding to cluster B is used as the target cluster transformation network. In this case, intermediate feature b is used as the target intermediate vector.
[0090] As can be seen from the above steps S401-S403, this implementation provides a specific method for obtaining target intermediate features. Based on the similarity between user features and cluster vectors, a cluster transformation network matching the user is determined. The target intermediate features are obtained by inputting the first prediction result corresponding to the user features into the cluster transformation network matching the user. Because the target intermediate features are obtained by transforming the cluster transformation network matching the user, using the target intermediate features in subsequent prediction model training can ensure that some parameters in the prediction model meet the recommendation requirements of small sample users, effectively improving the robustness of the prediction model.
[0091] In another implementation, see Figure 6 In S302 above, based on the similarity between the user account behavior characteristics and the cluster vectors corresponding to the multiple pre-built cluster transformation networks, determining a target cluster transformation network that matches the user account behavior characteristics, and extracting target intermediate features from the first prediction result using the target cluster transformation network specifically include:
[0092] S601: Inputting the first prediction result into a plurality of parallel cluster transformation networks respectively, wherein each cluster transformation network is used to extract intermediate features from the first prediction result according to a preset rule, and the preset rules corresponding to the plurality of cluster transformation networks are different;
[0093] S602: Determine a corresponding user account feature vector based on the user account behavior feature, and determine the similarity between the user account feature vector and each cluster vector;
[0094] S603: The cluster transformation network corresponding to the cluster vector having the greatest similarity to the user account feature vector is used as the cluster transformation network matching the user account behavior feature, and the intermediate feature corresponding to the cluster transformation network matching the user account behavior feature is used as the target intermediate feature.
[0095] For example, see Figure 7When the number of cluster transformation networks is three, the number of corresponding cluster vectors is also three. The similarities between the user account feature vector and clusters A, B, and C are determined, and the corresponding similarities a = 0.15, b = 0.45, and c = 0.25 are obtained. Similarity b has the largest value. Cluster transformation network b corresponding to cluster b is used as the target cluster transformation network. The first prediction result corresponding to the current user account is input into the cluster transformation network corresponding to cluster b to obtain the corresponding target intermediate features.
[0096] As can be seen from the above steps S601-S603, this implementation provides a specific method for obtaining target intermediate features. Multiple intermediate features are obtained by inputting the first prediction results corresponding to a user into multiple cluster transformation networks. The cluster transformation network that matches the user is then determined based on the similarity between the user features and the cluster vector. The intermediate features corresponding to the cluster transformation network that matches the user are selected from the multiple intermediate features as target intermediate features. Because the target intermediate features are obtained by transforming the cluster transformation network that matches the user, using the target intermediate features for subsequent prediction model training enables some parameters in the prediction model to meet the recommendation requirements of small sample users, effectively improving the robustness of the prediction model.
[0097] In some embodiments, before the above step S302, the method further includes:
[0098] The preset vectors are respectively input into multiple cluster transformation networks to obtain the numerical features corresponding to each cluster transformation network according to the preset rules corresponding to each cluster transformation network. The numerical features are used to represent the numerical features corresponding to the cluster transformation network; each numerical feature is input into the neural network to obtain the cluster vector corresponding to each numerical feature.
[0099] Specifically, the preset vector can be a unit vector. By inputting the unit vector into different cluster transformation networks respectively, different numerical features are obtained, and then each numerical feature is input into the neural network to obtain the cluster vector corresponding to each cluster transformation network.
[0100] As can be seen from the above embodiment, since each cluster transformation network has a different preset transformation rule, by inputting a preset vector into each cluster transformation network, corresponding cluster vectors are obtained according to the different preset transformation rules. Therefore, the cluster vectors are used to effectively divide the different cluster transformation networks. At the same time, by representing the corresponding cluster transformation network with cluster vectors, the number of network parameters can be effectively reduced, effectively lowering costs. Because the target intermediate feature is obtained by transforming the cluster transformation network that matches the user, by using the target intermediate feature in subsequent prediction model training, some parameters in the prediction model can meet the recommendation needs of small sample users, effectively improving the robustness of the prediction model.
[0101] S303: Input the content features and target intermediate features of the content into the prediction network to obtain a second prediction result output by the prediction network, where the second prediction result includes a second prediction probability of the user account performing each preset operation on the content.
[0102] S304: Train the prediction network and multiple cluster transformation networks according to the second prediction probability and label information.
[0103] In some embodiments, training the prediction network and the plurality of cluster transformation networks according to the second prediction probability and the label information includes:
[0104] Determine a first loss value according to the second predicted probability, the label information, and the first loss function, where the first loss function is a cross entropy function;
[0105] The prediction network, the plurality of cluster transformation networks, and the conversion network are updated using the first loss value.
[0106] In some embodiments, the recommendation model also includes a conversion network, and multiple cluster transformation networks are connected to the conversion network. The conversion network is used to process the numerical features corresponding to each cluster transformation network to obtain a cluster vector corresponding to each cluster transformation network. The cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network; the target cluster transformation network that best matches the user account features is the cluster transformation network whose corresponding cluster vector has the greatest similarity with the user account features.
[0107] In some embodiments, the method further includes: determining the similarity between cluster vectors corresponding to any two cluster transformation networks; determining a second loss value based on the maximum value of all determined similarities and a second loss function, where the second loss function is a regularization function; and updating the transformation network based on the second loss value.
[0108] Specifically, the prediction model and the conversion network are updated according to the second prediction result and the loss function, where the loss function is the sum of the cross entropy loss function and the regularization loss function. The update of the prediction model is a reverse gradient update.
[0109] Specifically, the calculation formula of the loss function Loss is:
[0110] Loss = Loss1 + α * Loss2;
[0111] Among them, Loss1 is the cross entropy loss function, Loss2 is the regularization loss function, and α is the weight hyperparameter. The value of the weight hyperparameter can be adjusted according to actual conditions and is not restricted here.
[0112] The cross-entropy loss function is used to measure the difference between the second predicted score and the user's actual operation. The regularization loss function is used to prevent different clusters from learning different user patterns and to prevent the similarity between the intermediate features output by the two closest clusters from exceeding a preset similarity threshold. The user's actual operation is represented by a target label. For example, when a user account completes the playback of a multimedia resource, the value corresponding to the target label of "completed playback" in the operation record is 1. When the user does not complete the playback of the multimedia resource, the value corresponding to the target label of "completed playback" in the operation record is 0.
[0113] Specifically, after obtaining the second prediction result based on the target intermediate features and content features, the loss is calculated through the loss function, and then a reverse gradient update and conversion network are performed. The cluster transformation network corresponding to the user account is not reversely updated. The cluster vector corresponding to the cluster transformation network will not change due to the training of the prediction model. Because the cluster transformation network has a unique way of extracting and processing information, it is used to obtain prediction results that better meet user preferences and will not be adjusted according to user characteristics. At the same time, the training process of this prediction model adopts online streaming training. After the real-time training samples are generated, they are input into the prediction model for training. By setting the loss function to perform reverse gradient updates on the prediction model, the accuracy and interpretability of the prediction model can be effectively improved.
[0114] In conjunction with the disclosed solution, as can be seen from S301-S304, the cluster transformation network to which the current user belongs is determined based on user features and multiple cluster vectors. The first prediction result for the current user is transformed using the cluster transformation network to obtain the corresponding target intermediate features. The prediction model is trained using the target intermediate features and the content features associated with the user to obtain a prediction model. By assigning users to different clusters and training them separately based on the parameters corresponding to the different clusters, some parameters in the prediction model can meet the recommendation needs of small sample users, effectively improving the robustness and interpretability of the prediction model.
[0115] The present disclosure also provides a content recommendation method, which can be specifically performed by a content recommendation device. The content recommendation device can be various electronic devices. For example, the content recommendation device can be Figure 1 When the method is applied to a content recommendation device, combined with Figure 2 ,like Figure 8 As shown, the content recommendation method may include the following steps S801-S804:
[0116] S801: Obtain content features of candidate content, user account features of a user account, and a first prediction result corresponding to the user account features, where the first prediction result includes a first prediction probability of the user account performing each preset operation on the candidate content.
[0117] S802: Determine a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extract target intermediate features from the first prediction result using the target cluster transformation network.
[0118] In some embodiments, the above step S802 includes:
[0119] Determine the similarity between the user account features and the cluster vector corresponding to each cluster transformation network, where the cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network;
[0120] The cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account features is used as the target cluster transformation network that best matches the user account features;
[0121] The first prediction result is input into the target cluster transformation network to obtain the output target intermediate features.
[0122] In some embodiments, the above step S802 includes:
[0123] Inputting the first prediction results into multiple parallel cluster transformation networks respectively to obtain intermediate features output by each cluster transformation network;
[0124] Determine the similarity between the user account features and the cluster vector corresponding to each cluster transformation network, where the cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network;
[0125] The cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature is used as the target cluster transformation network that best matches the user account feature, and the intermediate features output by the target cluster transformation network are used as the target intermediate features.
[0126] Specifically, determining the similarity between the user account feature and the cluster vector corresponding to each cluster transformation network includes: generating a corresponding user account feature vector based on the user account feature; and determining the similarity between the user account feature vector and the cluster vector corresponding to each cluster transformation network.
[0127] S803: Input the target intermediate features and content features into a pre-trained prediction network, and the prediction network is used to output a second prediction result, which includes a second prediction probability of the user account performing each preset operation on the candidate content.
[0128] S804: Determine recommended content corresponding to the user account from the candidate content based on the second prediction result.
[0129] Specifically, the recommended content corresponding to the user account is determined based on the second prediction result, and the recommended content is sent to the user account. The prediction model is trained according to the above training method.
[0130] Exemplarily, the second prediction result includes a second predicted probability of the user account performing each preset action on the content. For example, when the recommended content is multimedia resources, the preset actions may include valid play, long play, complete play, like, comment, share, etc. When recommending content to the corresponding user account based on the like probability, the candidate content is ranked according to the predicted like probability for each content, and a preset number of candidate content with the highest ranking is sent as the recommended content to the corresponding user account.
[0131] In some embodiments, the prediction model further includes a transformation network, and a plurality of pre-trained cluster transformation networks are connected to the transformation network. Before determining a target cluster transformation network that best matches the user account characteristics from the plurality of pre-trained cluster transformation networks, the method further includes:
[0132] Inputting the unit vectors into a plurality of cluster transformation networks respectively, so that the cluster transformation network outputs a numerical feature for representing the cluster transformation network;
[0133] Each numerical feature is input into the conversion network to obtain the cluster vector corresponding to each numerical feature.
[0134] In conjunction with the disclosed solution, as can be seen from S801-S804, the cluster transformation network to which the current user belongs is determined based on user features and multiple cluster vectors. The first prediction result for the current user is transformed using the cluster transformation network to obtain the corresponding target intermediate features. The prediction model then performs a prediction based on the target intermediate features and the content features associated with the user to obtain a second prediction result. By assigning users to different clusters and inputting the intermediate features corresponding to the different clusters into the prediction model, the resulting second prediction result can meet the recommendation needs of small sample users, effectively improving the robustness of the prediction model.
[0135] Based on this understanding, the embodiments of the present disclosure also provide a content recommendation device. Figure 9 FIG. 1 shows a schematic diagram of the structure of the prediction model training device provided by the embodiment of the present disclosure. Figure 9As shown, the prediction model training device may include: a feature acquisition unit 901, a feature extraction unit 902, a result prediction unit 903 and a content determination unit 904; the feature acquisition unit is configured to execute the acquisition of content features of candidate content, user account features of the user account and a first prediction result corresponding to the user account features, the first prediction result including a first prediction probability of the user account performing each preset operation on the candidate content; the feature extraction unit is configured to execute the determination of a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and to extract target intermediate features from the first prediction result using the target cluster transformation network; the result prediction unit is configured to execute the input of the target intermediate features and content features into a pre-trained prediction network, the prediction network being used to output a second prediction result, the second prediction result including a second prediction probability of the user account performing each preset operation on the candidate content; the content determination unit is configured to execute the determination of recommended content corresponding to the user account from the candidate content based on the second prediction result.
[0136] Optionally, the feature extraction unit 902 is specifically configured to perform: determining the similarity between the user account feature and the cluster vector corresponding to each cluster transformation network, the cluster vector corresponding to the cluster transformation network being the vector representation of the cluster transformation network; using the cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature; and inputting the first prediction result into the target cluster transformation network to obtain the output target intermediate feature.
[0137] Optionally, the feature extraction unit 902 is specifically configured to perform: inputting the first prediction result into multiple parallel cluster transformation networks respectively to obtain the intermediate features output by each cluster transformation network; determining the similarity between the user account feature and the cluster vector corresponding to each cluster transformation network, the cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network; taking the cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature, and taking the intermediate features output by the target cluster transformation network as the target intermediate features.
[0138] Optionally, the feature extraction unit 902 is specifically configured to perform: generating a corresponding user account feature vector according to the user account feature; and determining the similarity between the user account feature vector and the cluster vector corresponding to each cluster transformation network.
[0139] Optionally, the prediction model also includes a conversion network, and multiple pre-trained cluster transformation networks are connected to the conversion network. The content recommendation device also includes: a cluster vector generation unit 905, which is configured to execute the input of unit vectors into multiple cluster transformation networks respectively, so that the cluster transformation network outputs a numerical feature used to represent the cluster transformation network; each numerical feature is input into the conversion network to obtain a cluster vector corresponding to each numerical feature.
[0140] Regarding the content recommendation device in the above embodiment, the specific manner in which each module performs operations and the beneficial effects thereof have been described in detail in the aforementioned method embodiment and will not be repeated here.
[0141] Based on this understanding, the embodiments of the present disclosure also provide a training device for a prediction model applied to a content recommendation system. Figure 10 FIG. 1 shows a schematic diagram of the structure of the content recommendation device provided by the embodiment of the present disclosure. Figure 10 As shown, the content recommendation device may include: a feature acquisition unit 1001, a feature extraction unit 1002, a result prediction unit 1003 and a model training unit 1004, the prediction model includes multiple cluster transformation networks and a prediction network, the feature acquisition unit 1001 is configured to execute acquisition of sample features, label information corresponding to the sample features and a first prediction result, the sample features include content features of the content and user account features of the user account, the label information indicates whether the user account has performed a preset operation on the content, and the first prediction result includes a first prediction probability of the user account performing each preset operation on the content; the feature extraction unit 1002 is configured to execute determination of a target cluster transformation network that best matches the user account features from the multiple cluster transformation networks, and extract target intermediate features from the first prediction result using the target cluster transformation network; the result prediction unit 1003 is configured to execute input of the content features and the target intermediate features of the content into the prediction network to obtain a second prediction result output by the prediction network, the second prediction result including a second prediction probability of the user account performing each preset operation on the content; the model training unit 1004 is configured to execute training of the prediction network and the multiple cluster transformation networks based on the second prediction probability and the label information.
[0142] Optionally, the recommendation model also includes a conversion network, and multiple cluster transformation networks are connected to the conversion network. The conversion network is used to process the numerical features corresponding to each cluster transformation network to obtain a cluster vector corresponding to each cluster transformation network. The cluster vector corresponding to the cluster transformation network is the vector representation of the cluster transformation network; the target cluster transformation network that best matches the user account features is the cluster transformation network whose corresponding cluster vector has the greatest similarity with the user account features.
[0143] Optionally, the model training unit 1004 is specifically configured to perform: determining a first loss value based on the second prediction probability, label information and a first loss function, where the first loss function is a cross entropy function; and updating the prediction network, multiple cluster transformation networks and the conversion network through the first loss value.
[0144] Optionally, the model training unit 1004 is further configured to perform: determining the similarity between cluster vectors corresponding to any two cluster transformation networks; determining a second loss value based on the maximum value of all determined similarities and a second loss function, where the second loss function is a regularization function; and updating the transformation network based on the second loss value.
[0145] An embodiment of the present disclosure also provides an electronic device. Figure 11 FIG2 is a schematic diagram showing the structure of an electronic device provided by an embodiment of the present disclosure. The electronic device may be a content recommendation device and may include at least one processor 111 , a communication bus 112 , a memory 113 and at least one communication interface 114 .
[0146] The processor 111 may be a processor (central processing unit, CPU), microprocessor unit, ASIC, or one or more integrated circuits for controlling the execution of the program of the disclosed solution. As an example, in combination with Figure 9 and Figure 10 The functions implemented by the result prediction unit 903 and the model training unit 1004 in the electronic device are similar to those implemented by Figure 11 The functions implemented by the processor 111 in are the same.
[0147] The communication bus 112 may include a pathway for transmitting information between the aforementioned components.
[0148] The communication interface 114 uses any transceiver or other device for communicating with other devices or communication networks, such as servers, Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc. As an example,
[0149] The memory 113 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processing unit via a bus. The memory may also be integrated with the processing unit.
[0150] The memory 113 is used to store application code for executing the solution of the present disclosure, and the execution is controlled by the processor 111. The processor 111 is used to execute the application code stored in the memory 113, thereby realizing the functions of the method of the present disclosure.
[0151] In a specific implementation, as an embodiment, the processor 111 may include one or more CPUs, such as Figure 11 CPU0 and CPU1 in.
[0152] In a specific implementation, as an embodiment, the electronic device may include multiple processors, such as Figure 11 1 and 115. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0153] In a specific implementation, as an embodiment, the electronic device may further include an input device 116 and an output device 117. The input device 116 communicates with the output device 117 and can accept user input in various ways. For example, the input device 116 can be a mouse, keyboard, touch screen device, or sensor device. The output device 117 communicates with the processor 111 and can display information in various ways. For example, the output device 111 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, etc.
[0154] Those skilled in the art will understand that Figure 11 The structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0155] The embodiments of the present disclosure also provide an electronic device. The electronic device can be a content recommendation device. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors and one or more memories. The memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the prediction model training method or content recommendation method provided by the above-mentioned various method embodiments. Of course, the electronic device may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device may also include other components for implementing the functions of the device, which will not be elaborated here.
[0156] The present disclosure also provides a computer-readable storage medium including instructions, and the computer-readable storage medium stores instructions. When the instructions in the computer-readable storage medium are executed by the processor of a computer device, the computer is enabled to execute the prediction model training method or content recommendation method provided in the above-mentioned embodiments. For example, the computer-readable storage medium may be a memory 113 including instructions, and the above-mentioned instructions may be executed by the processor 111 of the terminal to complete the above-mentioned method. For another example, the computer-readable storage medium may be a memory including instructions, and the above-mentioned instructions may be executed by the processor of an electronic device to complete the above-mentioned method. Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0157] The present disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above Figures 1 to 8The content recommendation method and model training method shown in any of the accompanying drawings.
[0158] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0159] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A content recommendation method, characterized in that: include: Obtaining content features of candidate content, user account features of a user account, and a first prediction result corresponding to the user account features, the first prediction result including a first predicted probability of the user account performing each preset operation on the candidate content; Determining a target cluster transformation network that best matches the user account feature from a plurality of pre-trained cluster transformation networks, and extracting a target intermediate feature from the first prediction result using the target cluster transformation network, including: determining a similarity between the user account feature and a cluster vector corresponding to each of the cluster transformation networks, where the cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; selecting the cluster transformation network corresponding to the cluster vector having the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature; and inputting the first prediction result into the target cluster transformation network to obtain the output target intermediate feature. Inputting the target intermediate feature and the content feature into a pre-trained prediction network, wherein the prediction network is configured to output a second prediction result, the second prediction result including a second predicted probability of the user account performing each of the preset operations on the candidate content; According to the second prediction result, recommended content corresponding to the user account is determined from the candidate content.
2. The content recommendation method according to claim 1, characterized in that The step of determining a target cluster transformation network that best matches the user account features from a plurality of pre-trained cluster transformation networks, and extracting target intermediate features from the first prediction results using the target cluster transformation network, includes: Inputting the first prediction results into a plurality of parallel cluster transformation networks respectively to obtain intermediate features output by each cluster transformation network; Determining a similarity between the user account feature and a cluster vector corresponding to each of the cluster transformation networks, where the cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; The cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature is used as the target cluster transformation network that best matches the user account feature, and the intermediate features output by the target cluster transformation network are used as the target intermediate features.
3. The content recommendation method according to claim 2, characterized in that: Determining the similarity between the user account feature and the cluster vector corresponding to each cluster transformation network includes: generating a corresponding user account feature vector according to the user account feature; Determine the similarity between the user account feature vector and the cluster vector corresponding to each cluster transformation network.
4. The content recommendation method according to claim 2, characterized in that: The plurality of pre-trained cluster transformation networks are all connected to the conversion network. Before determining the target cluster transformation network that best matches the user account features from the plurality of pre-trained cluster transformation networks, the method further includes: Inputting the unit vectors into the plurality of cluster transformation networks respectively, so that the cluster transformation networks output numerical features representing the cluster transformation networks; Each of the numerical features is input into the conversion network to obtain a cluster vector corresponding to each of the numerical features.
5. A training method for a prediction model used in a content recommendation system, characterized in that: The prediction model includes a plurality of cluster transformation networks and a prediction network, and the method includes: Obtaining sample features, label information corresponding to the sample features, and a first prediction result, wherein the sample features include content features of the content and user account features of the user account, the label information indicating whether the user account has performed a preset operation on the content, and the first prediction result including a first predicted probability of the user account performing each of the preset operations on the content; Determining a target cluster transformation network that best matches the user account feature from the multiple cluster transformation networks, and extracting a target intermediate feature from the first prediction result using the target cluster transformation network, including: determining a similarity between the user account feature and a cluster vector corresponding to each cluster transformation network, where the cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; using the cluster transformation network corresponding to the cluster vector having the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature; and inputting the first prediction result into the target cluster transformation network to obtain the output target intermediate feature. Inputting the content feature and the target intermediate feature of the content into the prediction network to obtain a second prediction result output by the prediction network, wherein the second prediction result includes a second prediction probability of the user account performing each of the preset operations on the content; The prediction network and the multiple cluster transformation networks are trained according to the second prediction probability and the label information.
6. The prediction model training method according to claim 5, characterized in that: The prediction model also includes a conversion network, and the multiple cluster transformation networks are all connected to the conversion network. The conversion network is used to process the numerical features corresponding to each cluster transformation network to obtain a cluster vector corresponding to each cluster transformation network. The cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; the target cluster transformation network that best matches the user account feature is the cluster transformation network whose corresponding cluster vector has the greatest similarity with the user account feature.
7. The prediction model training method according to claim 6, characterized in that: The training of the prediction network and the plurality of cluster transformation networks according to the second prediction probability and the label information includes: Determining a first loss value according to the second predicted probability, the label information, and a first loss function, where the first loss function is a cross entropy function; The prediction network, the plurality of cluster transformation networks, and the conversion network are updated using a first loss value.
8. The prediction model training method according to claim 6, characterized in that: The method further comprises: Determining the similarity between the cluster vectors corresponding to any two cluster transformation networks; Determine a second loss value according to a maximum value among all the determined similarities and a second loss function, where the second loss function is a regularization function; The conversion network is updated according to the second loss value.
9. A content recommendation device, characterized in that: include: a feature acquisition unit configured to acquire content features of candidate content, user account features of a user account, and a first prediction result corresponding to the user account features, the first prediction result including a first predicted probability of the user account performing each preset operation on the candidate content; A feature extraction unit is configured to determine a target cluster transformation network that best matches the user account feature from a plurality of pre-trained cluster transformation networks, and extract target intermediate features from the first prediction result using the target cluster transformation network, including: determining a similarity between the user account feature and a cluster vector corresponding to each of the cluster transformation networks, where the cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; using the cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature; and inputting the first prediction result into the target cluster transformation network to obtain the target intermediate features as output; a result prediction unit configured to input the target intermediate feature and the content feature into a pre-trained prediction network, wherein the prediction network is configured to output a second prediction result, wherein the second prediction result includes a second prediction probability of the user account performing each of the preset operations on the candidate content; The content determination unit is configured to determine, based on the second prediction result, the recommended content corresponding to the user account from the candidate content.
10. The content recommendation device according to claim 9, characterized in that The feature extraction unit is specifically configured to perform: Inputting the first prediction results into a plurality of parallel cluster transformation networks respectively to obtain intermediate features output by each cluster transformation network; Determining a similarity between the user account feature and a cluster vector corresponding to each of the cluster transformation networks, where the cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; The cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature is used as the target cluster transformation network that best matches the user account feature, and the intermediate feature output by the target cluster transformation network is used as the target intermediate feature.
11. The content recommendation device according to claim 10, wherein: The feature extraction unit is specifically configured to perform: generating a corresponding user account feature vector according to the user account feature; Determine the similarity between the user account feature vector and the cluster vector corresponding to each cluster transformation network.
12. The content recommendation device according to claim 10, wherein: The plurality of pre-trained cluster transformation networks are all connected to the conversion network, and the apparatus further comprises: a cluster vector generating unit configured to input unit vectors into the plurality of cluster transformation networks respectively, so that the cluster transformation networks output numerical features for representing the cluster transformation networks; Each of the numerical features is input into the conversion network to obtain a cluster vector corresponding to each of the numerical features.
13. A training device for a prediction model used in a content recommendation system, characterized in that: The prediction model includes a plurality of cluster transformation networks and a prediction network, and the device includes: a feature acquisition unit configured to acquire sample features, label information corresponding to the sample features, and a first prediction result, wherein the sample features include content features of the content and user account features of the user account, the label information indicates whether the user account has performed a preset operation on the content, and the first prediction result includes a first predicted probability of the user account performing each of the preset operations on the content; a feature extraction unit configured to determine a target cluster transformation network that best matches the user account feature from the multiple cluster transformation networks, and extract target intermediate features from the first prediction result using the target cluster transformation network, including: determining a similarity between the user account feature and a cluster vector corresponding to each cluster transformation network, where the cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; using the cluster transformation network corresponding to the cluster vector with the greatest similarity to the user account feature as the target cluster transformation network that best matches the user account feature; and inputting the first prediction result into the target cluster transformation network to obtain the target intermediate features as output; a result prediction unit configured to input the content feature of the content and the target intermediate feature into the prediction network, and obtain a second prediction result output by the prediction network, wherein the second prediction result includes a second predicted probability of the user account performing each of the preset operations on the content; A model training unit is configured to train the prediction network and the multiple cluster transformation networks according to the second prediction probability and the label information.
14. The prediction model training device according to claim 13, characterized in that: The prediction model also includes a conversion network, and the multiple cluster transformation networks are all connected to the conversion network. The conversion network is used to process the numerical features corresponding to each cluster transformation network to obtain a cluster vector corresponding to each cluster transformation network. The cluster vector corresponding to the cluster transformation network is a vector representation of the cluster transformation network; the target cluster transformation network that best matches the user account feature is the cluster transformation network whose corresponding cluster vector has the greatest similarity with the user account feature.
15. The prediction model training device according to claim 14, characterized in that: The model training unit is specifically configured to execute: Determining a first loss value according to the second predicted probability, the label information, and a first loss function, where the first loss function is a cross entropy function; The prediction network, the plurality of cluster transformation networks, and the conversion network are updated using a first loss value.
16. The prediction model training device according to claim 14, characterized in that: The model training unit is further configured to execute: Determining the similarity between the cluster vectors corresponding to any two cluster transformation networks; Determine a second loss value according to a maximum value among all the determined similarities and a second loss function, where the second loss function is a regularization function; The conversion network is updated according to the second loss value.
17. An electronic device, characterized in that: include: processor; A memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the content recommendation method according to any one of claims 1 to 4, or the training method for the prediction model according to any one of claims 5 to 8.
18. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the content recommendation method according to any one of claims 1 to 4, or the prediction model training method according to any one of claims 5 to 8.
19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the content recommendation method according to any one of claims 1 to 4 or the prediction model training method according to any one of claims 5 to 8 is implemented.
Citation Information
Patent Citations
Content recommendation method and related device
CN111143697A
Cluster based classification for time series data
CN113544708A