A recommendation method and system based on multi-tower model
By using SENET layer and feature intersection layer for feature intersection and weighting in the multi-tower model, the problem that existing models cannot learn user feature importance and cross-relationships is solved, and the balanced processing of data in different fields is achieved, and the recommendation effect is improved.
Patent Information
- Application Number
- CN202410820490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing multi-scenario modeling models cannot learn the importance of different user characteristics to target content and the intersection relationship between features in terms of user tower input, and user-side parameter sharing makes it impossible to fully capture the data differences between fields, there is a seesaw effect, and it is impossible to balance data contributions in different fields.
The multi-tower model is adopted to collect the historical interactive data of users on different media types, and a multi-tower model is constructed. The user tower and content tower learn user characteristics and content characteristics of different media types respectively. The SENET layer and feature intersection layer are used for feature intersection and weighting, and the weighted embedding features of each field are output, and the user vectors of each field are separately output through the MLP structure.
It realizes effective capture of the importance and cross-relationships of users' characteristics in different fields, avoids the seesaw effect, balances the data contributions in different fields, and improves the accuracy and personalization of the recommendation results.
Smart Images

Figure CN118747224B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of recommendation methods, and specifically relates to a recommendation method and system based on a multi-tower model. Background Art
[0002] Existing multi-view DNN models for multi-scene modeling include Fig. 9 As shown, by inputting content data from different fields into multiple different content towers, the features of the user tower are initialized using user behavior in a single field. During the training process, positive and negative samples from their respective fields are constructed to jointly supervise the learning of user tower user vectors and content tower vectors from different fields.
[0003] There are N+1 towers in the existing model, one of which is a user tower X u , N content towers X1 to X N , the content towers undertake content features of different domains and scenes, which are independent of each other. That is, the content features of each field do not need to be aligned, and the features of each field can be calculated independently; each tower has its own independent nonlinear transformation function f i (X i , W i ), input X i The embedding flag converted to Item is Y i is the last layer, where W i Identify the training parameters of the tower. The model structure jointly learns user vectors and content vectors by using content consumption in different fields. The final output of the model is user vectors, long video vectors, live broadcast vectors, and TV program vectors, where:
[0004] User embedding is also called user vector: it is a string of numbers [a, b, c...], which represents the user's interest preference. For example, it means that the user likes category = "idol drama", tag = "youth" and so on.
[0005] Long video vector: Each long video corresponds to a vector, representing the long video itself;
[0006] Live broadcast vector: Each live broadcast corresponds to a vector, representing the live broadcast itself;
[0007] TV program vector: Each TV program corresponds to a vector, representing the TV program itself.
[0008] When the model is used, the cosine similarity between the user vector and the vectors of different contents is calculated as the user's interest in the content. The higher the score, the more likely the user is to be interested in the content. Based on the score, a list of contents that the user is most likely to be interested in is returned. For example, the list finally returned is [long video-a, live broadcast-b, long video-c, TV program-d...].
[0009] There are several problems in the existing model:
[0010] 1. The input of the user tower comes from user feature data in a unified field, and it is impossible to learn the importance of different user features to the target content and the cross-relationship between features;
[0011] 2. For user vectors trained by jointly supervising data from multiple fields, the parameters on the user side are shared, and there is no module to fully capture the differences in data between fields. Data from multiple different fields affect each other, resulting in a seesaw effect.
[0012] 3. For the user tower, the weights contributed by the user vectors output by multiple item towers and the user tower in the final loss calculation are the same, which results in the same contribution of the information learned by multiple fields to the user vector. It is impossible to learn the contribution weights of data from different fields to the user vector. Moreover, when the training loss of data in a certain field is large and the loss of data in other fields is very small, the weight of the entire network will be updated almost according to the data in the field with large loss, which loses the advantage of introducing multi-field data. The representation of the learned user embedding will have a great impact on the similarity value of the content embedding in other fields, affecting the data effect in other fields.
[0013] 4. In terms of collecting negative samples, existing solutions use negative sampling based on exposure without clicks or based on a single content type, which results in biased negative samples. Summary of the invention
[0014] In order to solve one of the above technical defects, the present application provides a recommendation method and system based on a multi-tower model.
[0015] According to the present application, a recommendation method based on a multi-tower model is provided, comprising:
[0016] S1. Collecting historical interaction data of users on different media types; the historical interaction data includes but is not limited to viewing records, search records, and collection records of long videos, live broadcasts, and TV signal programs;
[0017] S2. Process the collected user behavior data to extract user characteristics of different media types and content characteristics of different media types;
[0018] S3, constructing a multi-tower model, including a user tower and a content tower, wherein the user tower and the content tower respectively learn user features and content features of different media types to obtain trained user vectors and content vectors;
[0019] S4. Input the historical interaction data of the user to be predicted into the trained multi-tower model, output the user vector and content vector of the user to be predicted, calculate the similarity score of the user vector and the content vector, and recommend candidate content to the user according to the similarity score.
[0020] Preferably, the processing of the collected user behavior data includes: constructing positive samples and negative samples of the user tower, wherein the positive samples and negative samples are represented by four fields {user id, content id, domain id, sample label}, wherein the user id represents a certain user; the content id represents a content from a long video, live broadcast, or TV program; the domain id represents the type to which the sample belongs, and the value is one of the long video, live broadcast, or TV program; the sample label value is 0 or 1, 0 represents a negative sample, and 1 represents a positive sample, and the positive sample is the content that the user has been exposed to and played for a time period exceeding a threshold time;
[0021] Associate content from different fields, input text features of content from different fields into the multi-tower model, map different content into a unified semantic space, and obtain a fused text content pool, represented by embedding;
[0022] Construct a negative sample candidate pool, mix content pools from different fields together, and calculate the semantic similarity between the two as the correlation between the two contents;
[0023] Select negative samples, calculate the cosine similarity with the content in the negative sample candidate pool according to each positive sample content id of each user, and select non-positive sample content with similarity within a preset range as negative samples.
[0024] Preferably, the user tower is used to learn user characteristics in different fields, including:
[0025] The user features of different media types are crossed through the SENET layer and the feature cross layer, the important features are weighted, and the weighted embedding features of each field are output;
[0026] The weighted embedding features of each field are passed through the MLP structure to output the user vector of each field separately.
[0027] Preferably, the method further comprises:
[0028] The content features of different media types are used to calculate the content vectors of different media types through the MLP structure;
[0029] According to the loss weight parameters of different fields, the loss values of user vectors in each field and content vectors of different media types are calculated by field, and the loss weight parameters are automatically updated as the multi-tower model is trained.
[0030] Preferably, the calculation process of the loss weight parameters of different fields includes:
[0031] According to formula (1), the loss value of the i-th domain data is calculated:
[0032]
[0033] In formula (1), L i (W) represents the loss value of the i-th domain data; Y i Indicates the sample Label value, which can be 0 or 1; V ui =f(W u , X u ) represents the conversion of user features into user vectors in domain i;
[0034] Substituting formula (1) into formula (2) we can calculate the loss weight of the i-th domain data:
[0035]
[0036] In formula (2), W represents the overall network parameters, W i Represents the learned loss weight of the i-th field.
[0037] Accordingly, a recommendation system based on a multi-tower model includes:
[0038] Data collection unit: used to collect historical interaction data of users on different media types; the historical interaction data includes but is not limited to viewing records, search records, and collection records of long videos, live broadcasts, and TV signal programs;
[0039] Data processing unit: processes the collected user behavior data and extracts user characteristics of different media types and content characteristics of different media types;
[0040] Multi-tower model training unit: The multi-tower model includes a user tower and a content tower, wherein the user tower and the content tower respectively learn user features and content features of different media types to obtain trained user vectors and content vectors;
[0041] Prediction unit: inputs the historical interaction data of the user to be predicted into the trained multi-tower model, outputs the user vector and content vector of the user to be predicted, calculates the similarity score of the user vector and the content vector, and recommends candidate content to the user based on the similarity score.
[0042] Preferably, the data processing unit comprises:
[0043] Sample construction unit: used to construct positive and negative samples of the user tower. Positive and negative samples are represented by four fields: {user id, content id, domain id, sample label}, where user id represents a user; content id represents a content from a long video, live broadcast, or TV program; domain id represents the type of the sample, which is one of long video, live broadcast, or TV program; sample label takes a value of 0 or 1, where 0 represents a negative sample and 1 represents a positive sample. A positive sample is a content that has been exposed to the user and played for a time period exceeding the threshold.
[0044] Association unit: used to input text features of content from different fields into the multi-tower model, map different content into a unified semantic space, and obtain a fused text content pool, which is represented by embedding;
[0045] Negative sample candidate pool construction unit: Mix content pools from different fields together and calculate the semantic similarity between them as the correlation between two pieces of content;
[0046] Negative sample selection unit: According to each positive sample content ID of each user, the cosine similarity with the content in the negative sample candidate pool is calculated, and non-positive sample content with similarity within a preset range is selected as a negative sample.
[0047] Preferably, the multi-tower model training unit comprises:
[0048] Feature processing unit: crosses the user features of different media types through the SENET layer and the feature cross layer, weights the important features, and outputs the weighted embedding features of each field;
[0049] Output unit: The weighted embedding features of each field are passed through the MLP structure to output the user vector of each field separately.
[0050] Preferably, the multi-tower model training unit comprises:
[0051] Content vector calculation unit: calculates content vectors of different media types using the MLP structure based on the content features of different media types;
[0052] Loss value calculation unit: Calculate the loss value of user vectors in each field and content vectors of different media types according to the loss weight parameters of different fields, and automatically update the loss weight parameters as the multi-tower model is trained.
[0053] A computer device comprising:
[0054] Memory;
[0055] processor;
[0056] Computer programs;
[0057] Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the recommendation method based on the multi-tower model as described in any one of the above items.
[0058] A recommendation method and system based on a multi-tower model provided in the present application is adopted. By using the consumption data of users in multiple scenarios and fields, and extracting content features of multiple different fields as the content-side feature input of the content tower, and extracting user portrait features in different fields as the user-side feature input of the user tower; a multi-task model architecture is adopted on the user side, the underlying parameters are shared, and the upper layer outputs user vectors of different fields, which are jointly trained with the content towers in their respective fields, and finally user vectors and content vectors of different fields are output.
[0059] The shared parameter part at the bottom layer of the user side solves the problem that the original model structure only introduces single-domain features on the user side through the MLP structure, which cannot capture the importance of user features in different fields and the intersection of user features in different fields.
[0060] The user towers of different fields that are trained separately in the upper layer can more accurately learn the particularities of users in different fields, while the original model structure only outputs a unified user vector, which cannot express the particularities of different fields.
[0061] In the loss calculation part of the model, a module for adaptively learning sample weights from different fields is introduced to solve the impact of the difference in the number of samples from different fields in the original model structure on the update of user vectors, balance samples from different fields, and prevent the model from being biased by a certain content field.
[0062] During the model training phase, a mixed selection strategy for samples from different fields was introduced. Content samples from multiple fields were mixed together. The text information of each content was mapped to a unified semantic space through the BERT model, and then global cross-content selection of negative samples was performed, which effectively improved the quality of negative sample selection and improved the model effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0064] Figure 1 A first flow chart of a recommended method based on a multi-tower model provided in an embodiment of the present application;
[0065] Figure 2A schematic diagram of a multi-tower model structure in a recommendation method based on a multi-tower model provided in an embodiment of the present application;
[0066] Figure 3 A schematic diagram of a negative sample sampling structure in a recommendation method based on a multi-tower model provided in an embodiment of the present application;
[0067] Figure 4 A schematic diagram of the structure of feature weight learning in a recommendation method based on a multi-tower model provided in an embodiment of the present application;
[0068] Figure 5 A schematic diagram of a user vector domain-based output structure in a recommendation method based on a multi-tower model provided in an embodiment of the present application;
[0069] Figure 6 A first structural diagram of a recommendation system based on a multi-tower model provided in an embodiment of the present application;
[0070] Figure 7 A first structural diagram of a recommendation system based on a multi-tower model provided in an embodiment of the present application;
[0071] Figure 8 A first structural diagram of a recommendation system based on a multi-tower model provided in an embodiment of the present application;
[0072] Fig. 9 It is a structural diagram of the Multi-View DNN model in the prior art;
[0073] In the figure, 10 is a data acquisition unit, 20 is a data processing unit, 201 is a sample construction unit, 202 is an association unit, 203 is a negative sample candidate pool construction unit, 204 is a negative sample selection unit, 30 is a multi-tower model training unit, 301 is a feature processing unit, 302 is an output unit, 303 is a content vector calculation unit, 304 is a loss value calculation unit, and 40 is a prediction unit. DETAILED DESCRIPTION
[0074] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0075] In view of the above problems, a recommendation method based on a multi-tower model is provided in the embodiments of the present application. Figure 1 As shown, the recommended method includes:
[0076] S1. Collecting historical interaction data of users on different media types; the historical interaction data includes but is not limited to viewing records, search records, and collection records of long videos, live broadcasts, and TV signal programs;
[0077] S2. Process the collected user behavior data to extract user characteristics of different media types and content characteristics of different media types;
[0078] S3, constructing a multi-tower model, including a user tower and a content tower, wherein the user tower and the content tower respectively learn user features and content features of different media types to obtain trained user vectors and content vectors;
[0079] S4. Input the historical interaction data of the user to be predicted into the trained multi-tower model, output the user vector and content vector of the user to be predicted, calculate the similarity score of the user vector and the content vector, and recommend candidate content to the user according to the similarity score.
[0080] Specifically, the application scenario of this embodiment is a mixed recommendation of long videos, live broadcasts, and TV, and displays the three types of content that users are most likely to be interested in. This embodiment learns about the content that different users may like, and then scores different content separately to select the content that users are most likely to like. The higher the score, the more likely they are to like it. Based on the score, a list of content that users are most likely to be interested in is returned. For example, the list finally returned is [long video-a, live broadcast-b, long video-c, TV program-d...].
[0081] Figure 2 is a schematic diagram of the multi-tower model structure, such as Figure 2 As shown in the figure, on the user tower side, the underlying shared module is used to share the underlying parameters and learn the common feature representation between tasks. On this basis, different towers are set up for the particularities of different fields to learn the special representations of different fields. The input of the shared underlying parameter part is extended to adapt to the user features of different fields, and the features of different fields are fully crossed through the feature cross layer. Then, the user representation modules of different fields are separated from the shared underlying module, and MLP is used to more accurately learn the user representations of knowledge in different fields. In the loss part of the model, considering the different data distribution and importance in different fields, a new loss weight parameter for each field is added, and the weight parameter is updated and learned as the model is trained.
[0082] This embodiment uses a multi-tower model to accurately depict user interests and content of different media types, as well as accurately capture the interactive behavior of users with content. At the same time, a selective fusion strategy is adopted to improve the accuracy and personalization of recommendation results. In addition, this embodiment also has high scalability and customizability, and the model can be optimized and adjusted according to actual needs.
[0083] Furthermore, the processing of the collected user behavior data includes:
[0084] Construct positive and negative samples of the user tower, which are represented by four fields: {user id, content id, domain id, sample label}, where user id represents a user; content id represents a content from long video, live broadcast, or TV program; domain id represents the type of the sample, and its value is one of long video, live broadcast, or TV program; sample label takes a value of 0 or 1, 0 represents a negative sample, and 1 represents a positive sample, which is a content that has been exposed to the user and played for a time period exceeding a threshold time (the threshold time in this embodiment is 5 minutes); specifically, in addition to the global negative sampling in traditional recall, the negative samples of this embodiment also introduce hybrid negative sampling that integrates content from multiple fields; global negative sampling randomly selects samples as negative samples for content in different fields, so that the recall model can see samples in a wider range. When only this sampling method is used, the content selected is basically easy to distinguish, and the model is prone to overfitting; hybrid negative sampling that integrates content from multiple fields: content from different fields is mixed together, and its text information is mapped to the same semantic space through the Bert model, and then a unified negative sample selection is performed, such as Figure 3 shown.
[0085] Associate content from different fields, input the text features of content from different fields into the multi-tower model, map different content to a unified semantic space, and obtain a fused text content pool, represented by embedding; specifically, input the text features (title, category, label) of content from different fields into the multi-tower BERT model, map different content to a unified semantic space, and obtain the text embedding representation of the content; use BERT semantic embedding to solve it, input the title + category into the multi-tower BERT model, for example, the long video of "Qatar Asian Cup" on the platform will have a very high similarity with a live broadcast of "Qatar Asian Cup Group D Round 3", and they are considered to be similar content, and semantically associate long videos, live broadcasts, and TV programs of different content types together.
[0086] Construct a negative sample candidate pool, mix the content pools in different fields together, and calculate the semantic similarity between the two as the correlation between the two contents; for example, the similarity between "Qatar Asian Cup" and "TV Program - "Today's Statement"" will be very low, indicating that the two contents are weakly correlated.
[0087] Select negative samples, calculate the cosine similarity with the content in the negative sample candidate pool according to each positive sample content id of each user, and select non-positive sample content within a preset range (in this embodiment, the preset range is 0.7-0.8) as negative samples; specifically, calculate the cosine similarity between the positive sample and the content in the negative sample candidate pool, and select non-positive sample content with a similarity between 0.7-0.8 as negative samples; if the content with the highest similarity is selected, false negative examples are likely to appear, and if the similarity is too low, the recognition is too low, and there is no gain for the model. Therefore, selecting content with moderate similarity can allow the model to see difficult samples and improve its ceiling; select negative samples based on semantic similarity, that is, for each positive sample, select several samples with moderate similarity as negative samples to train the model. The goal of the model is to distinguish which ones the user likes and which ones the user does not like; the selection rules are as follows:
[0088] (1) Do not select content that is too similar, as this may easily lead to false negative samples: For example, if the positive sample is "Qatar Asian Cup", it is obviously wrong to select "Qatar Asian Cup Group D Round 3 Iraq VS Vietnam" as the negative sample, which has a high similarity.
[0089] (2) Selecting a similarity that is too low will not add value to the model, such as "Qatar Asian Cup" and "TV program "Today's Statement"";
[0090] (3) Selecting content with moderate similarity, that is, content that is somewhat similar to the positive sample but also somewhat different, as negative samples can improve the model's recognition ability. For example, if the positive sample is "Qatar Asian Cup", choosing "NBA Game" as the negative sample is both sports, but the events reflected are different, which can improve the expression of more fine-grained interests.
[0091] For each positive sample a, corresponding to the BERT output vector BERT(a), the corresponding negative sample b satisfies:
[0092]
[0093] In formula (3), b is a long video, live broadcast or TV program.
[0094] Furthermore, users are the union of three fields. For example, some users who have only played TV programs but not live broadcasts and long videos are also included in the training data. The user features of the three fields are calculated separately, and then the features of the three fields are aggregated to the same user; the user-side features are expressed as {user id, long video portrait features, live broadcast portrait features, TV program portrait features}. Calculating user-side features by field is an improvement of the original model in this embodiment. There is no need to align the features of users in different scenarios, which makes the model more flexible in application to multi-scenario data. At the same time, the feature cross-feature module introduced later can better capture the cross-features of users in different scenarios and capture user interests more comprehensively and accurately.
[0095] Furthermore, the user tower is used to learn user characteristics in different fields, including:
[0096] The user features of different media types are crossed through the SENET layer and the feature cross layer, the important features are weighted, and the weighted embedding features of each field are output; specifically, Figure 4 As shown in the figure, the space of user features is expanded to different fields, and user features from different fields are supported to be input. The bottom-level embedding, SENET and feature cross parameters are shared. The goal is to fully learn the commonalities of different fields. User features come from different fields, and the distribution and importance of features are different. The SENET layer can capture the contribution of different features, weight important features, and conversely weaken features with less information. After this layer, the weighted embedding of each field is output. After feature weight learning, the weighted embedding is expressed as follows:
[0097] enter represents the input embeddings, then the output embedding is expressed as Among them, i It is expressed as:
[0098]
[0099] The weighted feature embedding is input into the feature cross module to achieve explicit crossover between user features in different fields and improve the model's ability to express user features.
[0100] The network expression after crossover is:
[0101]
[0102] In formula (5): i represents the i-th feature, such as the classification of long videos; O jrepresents the jth feature, such as the classification of live broadcasts; W represents the parameters that the model needs to learn, with dimension k·k, where k is O i The dimension of ⊙ represents the Hadamard product of vectors, [a1, a2…, a n ]⊙[b1,b2…,b n ]=[a1*b1,a2*b2…,a n *b n ].
[0103] like Figure 5 As shown in the figure, the weighted embedding features of each field are passed through the MLP structure to output the user vector of each field separately; specifically, after passing through the underlying parameter sharing module, the user vectors specific to different fields are output at the upper layer. The MLP structure is adopted and different fields are updated independently of each other without being affected by other parts. The corresponding user vectors are updated according to the user's behavioral interests in the content of different fields, and the user's specific user expression in the field is learned.
[0104] Each domain outputs the corresponding user vector separately. For this application scenario, it passes through three MLP structures. Each structure is independent of each other and has independent parameters. For example, the network parameters of the long video MLP structure are W 长 , the network parameters of the live broadcast structure are W 直 , the TV program network structure parameter is W 电 , will output three different user vectors, represented as long video user vector V 长 , Live user vector V 直 , TV program user vector V 电 , then V 长 =f 长 (embed 长 ) represents the complex network function learned by the MLP structure of long videos. The same is true for live broadcasts and TV programs.
[0105] Further, the method comprises:
[0106] The content features of different media types are used to calculate the content vectors of different media types through the MLP structure;
[0107] According to the loss weight parameters of different fields, the loss values of user vectors in each field and content vectors of different media types are calculated by field, and the loss weight parameters are automatically updated as the multi-tower model is trained.
[0108] Specifically, the calculation process of the loss weight parameters in different fields includes:
[0109] According to formula (1), the loss value of the i-th domain data is calculated:
[0110]
[0111] In formula (1), L i (W) represents the loss value of the i-th domain data; Y i Indicates the sample Label value, which can be 0 or 1; V ui =f(W u , X u ) represents the conversion of user features into user vectors in domain i;
[0112] Substituting formula (1) into formula (2) we can calculate the loss weight of the i-th domain data:
[0113]
[0114] In formula (2), W represents the overall network parameters, W i Represents the learned loss weight of the i-th field.
[0115] In this embodiment, for L i The larger the domain (W), the higher its uncertainty. In order to prevent the model from being updated vigorously in this direction and thus biasing the entire model, a lower weight W will be given to this domain. i , the updated gradient of the model will also be reduced; this method allows the model to automatically learn the weight of the data in each field during the training process without manual adjustment, and adaptively learn the weights of data in different fields to improve the effect of the entire model.
[0116] The recommendation method proposed in this application uses the consumption data of users in multiple scenarios and fields, and extracts content features in multiple different fields as the content-side feature input of the content tower, and extracts user portrait features in different fields as the user-side feature input of the user tower; the user side adopts a multi-task model architecture, the underlying parameters are shared, and the upper layer outputs user vectors in different fields, which are jointly trained with the content towers in their respective fields, and finally outputs user vectors and content vectors in different fields.
[0117] (1) The shared parameter part at the bottom layer of the user side solves the problem that the original model structure only introduces single-domain features on the user side through the MLP structure, which cannot capture the importance of user features in different domains and the cross-feature structure of users in different domains.
[0118] (2) The user towers of different fields trained separately in the upper layer can more accurately learn the particularities of users in different fields, while the original model structure only outputs a unified user vector, which cannot express the particularities of different fields.
[0119] (3) In the loss calculation part of the model, a module for adaptively learning sample weights from different fields is introduced to solve the impact of the difference in the number of samples from different fields in the original model structure on the user vector update, balance the samples from different fields, and prevent the model from being biased by a certain content field.
[0120] (4) During the model training phase, a mixed selection strategy for samples from different fields is introduced. Content samples from multiple fields are mixed together. The text information of each content is mapped to a unified semantic space through the BERT model. Then, global cross-content selection of negative samples is performed, which effectively improves the quality of negative sample selection and improves the model effect.
[0121] Correspondingly, the embodiment of the present application also provides a recommendation system based on a multi-tower model, such as Figure 6 As shown, the system comprises:
[0122] Data collection unit 10: used to collect historical interaction data of users on different media types; the historical interaction data includes but is not limited to viewing records, search records, and collection records of long videos, live broadcasts, and TV signal programs;
[0123] Data processing unit 20: processes the collected user behavior data to extract user features of different media types and content features of different media types;
[0124] Multi-tower model training unit 30: The multi-tower model includes a user tower and a content tower, wherein the user tower and the content tower respectively learn user features and content features of different media types to obtain trained user vectors and content vectors;
[0125] Prediction unit 40: inputs the historical interaction data of the user to be predicted into the trained multi-tower model, outputs the user vector and content vector of the user to be predicted, calculates the similarity score of the user vector and the content vector, and recommends candidate content to the user according to the similarity score.
[0126] Furthermore, if Figure 7 As shown, the data processing unit 20 includes:
[0127] Sample construction unit 201: used to construct positive samples and negative samples of the user tower. The positive samples and negative samples are represented by four fields {user id, content id, domain id, sample label}, where user id represents a certain user; content id represents a content from a long video, live broadcast, or TV program; domain id represents the type of the sample, and the value is one of long video, live broadcast, or TV program; sample label takes a value of 0 or 1, 0 represents a negative sample, and 1 represents a positive sample. The positive sample is the content that the user has been exposed to and played for more than a threshold time;
[0128] Association unit 202: used to input text features of content in different fields into the multi-tower model, map different content into a unified semantic space, and obtain a fused text content pool represented by embedding;
[0129] Negative sample candidate pool construction unit 203: Mixing content pools from different fields together, and calculating the semantic similarity between two of them as the correlation between two pieces of content;
[0130] Negative sample selection unit 204: calculates the cosine similarity with the content in the negative sample candidate pool according to each positive sample content ID of each user, and selects non-positive sample content with similarity within a preset range as negative samples.
[0131] Furthermore, if Figure 8 As shown, the multi-tower model training unit 30 includes:
[0132] Feature processing unit 301: crosses the user features of different media types through the SENET layer and the feature cross layer, weights the important features, and outputs the weighted embedding features of each field;
[0133] Output unit 302: The weighted embedding features of each field are passed through the MLP structure to output the user vector of each field separately;
[0134] Content vector calculation unit 303: calculates content vectors of different media types by using the content features of different media types through the MLP structure;
[0135] The loss value calculation unit 304 calculates the loss value of the user vector of each field and the content vector of different media types according to the loss weight parameters of different fields, and automatically updates the loss weight parameters as the multi-tower model is trained.
[0136] A computer device comprising:
[0137] Memory;
[0138] processor;
[0139] Computer programs;
[0140] The computer program is stored in the memory and is configured to be executed by the processor to implement a recommendation method based on a multi-tower model.
[0141] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiment, complete software embodiment, or the embodiment in combination with software and hardware. Moreover, the present application can adopt the form of the computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiment of the present application can be realized in various computer languages, for example, C language, VHDL language, Verilog language, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0142] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0145] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0146] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A recommendation method based on a multi-tower model, characterized in that: include: S1. Collecting historical interaction data of users on different media types; the historical interaction data includes but is not limited to viewing records, search records, and collection records of long videos, live broadcasts, and TV signal programs; S2. Process the collected user behavior data to extract user characteristics of different media types and content characteristics of different media types; S3, constructing a multi-tower model, including a user tower and a content tower, wherein the user tower and the content tower respectively learn user features and content features of different media types to obtain trained user vectors and content vectors; S4, inputting the historical interaction data of the user to be predicted into the trained multi-tower model, outputting the user vector and content vector of the user to be predicted, calculating the similarity score between the user vector and the content vector, and recommending candidate content to the user according to the similarity score; The processing of the collected user behavior data includes: Construct positive and negative samples of the user tower. The positive and negative samples are represented by four fields: {user id, content id, domain id, sample label}, where user id represents a user; content id represents a content from a long video, live broadcast, or TV program; domain id represents the type of the sample, and the value is one of long video, live broadcast, or TV program; sample label takes a value of 0 or 1, where 0 represents a negative sample and 1 represents a positive sample. A positive sample is a content that has been exposed to the user and played for a time period exceeding the threshold. Associate content from different fields, input text features of content from different fields into the multi-tower model, map different content into a unified semantic space, and obtain a fused text content pool, represented by embedding; Construct a negative sample candidate pool, mix content pools from different fields together, and calculate the semantic similarity between the two as the correlation between the two contents; Select negative samples, calculate the cosine similarity with the content in the negative sample candidate pool according to each positive sample content id of each user, and select non-positive sample content with similarity within a preset range as negative samples.
2. A recommendation method based on a multi-tower model according to claim 1, characterized in that: The user tower is used to learn user characteristics in different fields, including: The user features of different media types are crossed through the SENET layer and the feature cross layer, the important features are weighted, and the weighted embedding features of each field are output; The weighted embedding features of each field are passed through the MLP structure to output the user vector of each field separately.
3. A recommendation method based on a multi-tower model according to claim 2, characterized in that: include: The content features of different media types are used to calculate the content vectors of different media types through the MLP structure; According to the loss weight parameters of different fields, the loss values of user vectors in each field and content vectors of different media types are calculated by field, and the loss weight parameters are automatically updated as the multi-tower model is trained.
4. A recommendation method based on a multi-tower model according to claim 3, characterized in that: The calculation process of the loss weight parameters in different fields includes: According to formula (1), the loss value of the i-th domain data is calculated: In formula (1), L i (W) represents the loss value of the i-th domain data; Y i Indicates the sample label value, which can be 0 or 1; V ui =f(W u , X u ) represents the conversion of user features into user vectors in domain i; Substituting formula (1) into formula (2) we can calculate the loss weight of the i-th domain data: In formula (2), W represents the overall network parameters, W i Represents the learned loss weight of the i-th field.
5. A recommendation system based on a multi-tower model, characterized in that: include: Data collection unit (10): used to collect historical interaction data of users on different media types; The historical interaction data includes but is not limited to viewing records, search records, and collection records of long videos, live broadcasts, and TV signal programs; Data processing unit (20): processes the collected user behavior data to extract user characteristics of different media types and content characteristics of different media types; Multi-tower model training unit (30): The multi-tower model includes a user tower and a content tower, wherein the user tower and the content tower respectively learn user features and content features of different media types to obtain trained user vectors and content vectors; Prediction unit (40): inputting historical interaction data of the user to be predicted into the trained multi-tower model, outputting the user vector and content vector of the user to be predicted, calculating the similarity score between the user vector and the content vector, and recommending candidate content to the user according to the similarity score; The data processing unit (20) comprises: Sample construction unit 201): used to construct positive samples and negative samples of the user tower, and the positive samples and negative samples are represented by four fields {user id, content id, domain id, sample label}, where the user id represents a certain user; the content id represents a content from a long video, live broadcast, or TV program; the domain id represents the type of the sample, and the value is one of the long video, live broadcast, or TV program; the sample label value is 0 or 1, 0 represents a negative sample, and 1 represents a positive sample, and the positive sample is the content that the user has been exposed to and played for more than a threshold time; Association unit (202): used to input text features of content in different fields into the multi-tower model, map different content into a unified semantic space, and obtain a fused text content pool represented by embedding; Negative sample candidate pool construction unit (203): mixes content pools of different fields together, and calculates the semantic similarity between two of them as the correlation between two pieces of content; Negative sample selection unit (204): calculates the cosine similarity with the content in the negative sample candidate pool according to each positive sample content ID of each user, and selects non-positive sample content with similarity within a preset range as negative samples.
6. A recommendation system based on a multi-tower model according to claim 5, characterized in that: The multi-tower model training unit (30) comprises: Feature processing unit (301): crosses user features of different media types through the SENET layer and the feature cross layer, weights important features, and outputs weighted embedding features of each field; Output unit (302): The weighted embedding features of each field are passed through the MLP structure to output the user vector of each field separately.
7. A recommendation system based on a multi-tower model according to claim 6, characterized in that: The multi-tower model training unit (30) comprises: Content vector calculation unit (303): calculates content vectors of different media types by using the MLP structure based on content features of different media types; A loss value calculation unit (304): calculates the loss values of user vectors in each field and content vectors of different media types according to loss weight parameters of different fields, and automatically updates the loss weight parameters as the multi-tower model is trained.
8. A computer device, characterized in that: include: Memory; processor; Computer programs; Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the recommendation method based on the multi-tower model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Video recommendation method and device, equipment and storage medium
CN117909542A