A training method and system for an implicit feedback recommendation model
By constructing an implicit feedback recommendation model and training it using user-item interaction event data and a hybrid loss function, the problem of poor recall and recommendation performance of existing models under weak supervision is solved, and more accurate user recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
- Filing Date
- 2026-05-13
- Publication Date
- 2026-07-31
AI Technical Summary
In the field of social media entertainment, existing recommendation models struggle to capture the time-varying nature of user interests and context-sensitive preferences under weak supervision, resulting in poor recall and recommendation performance.
By acquiring user and item feature data, an implicit feedback recommendation model is constructed. Feature extraction is performed using user-item interaction event data. Combined with the dynamic and static features of users and items, a hybrid loss function is constructed for training, and negative samples and feature fusion are optimized.
It improves the recall and recommendation performance of the recommendation model, provides more accurate user recommendation results, and enhances the model's generalization ability and recommendation accuracy.
Smart Images

Figure CN122490105A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a training method and system for an implicit feedback recommendation model. Background Technology
[0002] With the continuous development of social media entertainment, it is showing trends of diversification, intensified competition, and differentiated user needs, especially in areas such as short videos and music streaming.
[0003] In scenarios such as media content recommendation, short video distribution, and music and audio content, systems often only have access to basic data such as user playback history (e.g., playback clicks, complete playback, bounce duration). Under this weakly supervised condition of "only positive feedback, no exposure," recommendation models need to perform ranking learning on the premise of sampling negative examples in order to fully utilize the time-varying contextual features at the event level (per-interaction).
[0004] However, these features are often highly time-varying and periodic, and models that use only basic data as training data are unable to capture user interests that drift over time and context-sensitive preferences, thus affecting recall and ranking performance. In other words, models trained in the current way have poor recall and recommendation performance. Summary of the Invention
[0005] In view of this, this application provides a training method and system for an implicit feedback recommendation model, with the aim of improving the recall and recommendation performance of the obtained implicit feedback recommendation model.
[0006] The first aspect of this application discloses a training method for an implicit feedback recommendation model, the method comprising: Obtain an event dataset; wherein the event dataset includes user feature data and item feature data; the item feature data includes positive sample feature data of positive samples and negative sample feature data of multiple negative samples; The event dataset is input into the implicit feedback recommendation model, which uses the implicit feedback recommendation model to extract features based on the target user's event data, and obtains a fusion embedding vector for downstream recommendation tasks. The process of obtaining the implicit feedback recommendation model includes: The user identifier and user features in the user feature data are subjected to feature embedding and fusion processing to obtain a user representation vector; The positive sample identifiers and positive sample features in the positive sample feature data are subjected to feature embedding and fusion processing to obtain a positive sample representation vector matrix; The negative sample identifier and negative sample feature in each negative sample feature data are subjected to feature embedding and fusion processing to obtain multiple negative sample representation vector matrices; A hybrid loss is constructed using the user representation vector, the positive sample representation vector matrix, and each of the negative sample representation vector matrices. The hybrid loss is then used to adjust the parameters to obtain an implicit feedback recommendation model.
[0007] A second aspect of this application discloses a training system for an implicit feedback recommendation model, the system comprising: The dataset module is used to acquire an event dataset; wherein the event dataset includes user feature data and item feature data; the item feature data includes positive sample feature data of positive samples and negative sample feature data of multiple negative samples; The training module is used to input the event dataset into the implicit feedback recommendation model, so as to use the implicit feedback recommendation model to extract features based on the event data of the target user and obtain a fusion embedding vector for downstream recommendation tasks. The training module for obtaining the implicit feedback recommendation model includes: The model unit is used to perform feature embedding and fusion processing on the user identifier and user features in the user feature data to obtain a user representation vector; to perform feature embedding and fusion processing on the positive sample identifier and positive sample features in the positive sample feature data to obtain a positive sample representation vector matrix; and to perform feature embedding and fusion processing on the negative sample identifier and negative sample features in each of the negative sample feature data to obtain multiple negative sample representation vector matrices. The training unit is used to construct a hybrid loss using the user representation vector, the positive sample representation vector matrix, and each of the negative sample representation vector matrices, and to use the hybrid loss to adjust parameters to obtain an implicit feedback recommendation model.
[0008] This application provides a training method and system for an implicit feedback recommendation model. The method involves embedding and fusing user identifiers and user features within user feature data to obtain a user representation vector; embedding and fusing positive sample identifiers and positive sample features within positive sample feature data to obtain a positive sample representation vector matrix; embedding and fusing negative sample identifiers and negative sample features within each negative sample feature data to obtain multiple negative sample representation vector matrices; and constructing a hybrid loss using the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector matrix to adjust parameters, thereby obtaining an implicit feedback recommendation model. This model is then used to extract features based on user-item interaction event data of the target user, resulting in a fused embedding vector of user-items for downstream recommendation tasks. Therefore, the technical solution provided in this application, which combines the dynamic and static information of users and items (user feature data, positive sample feature data, and negative sample feature data) to construct an implicit feedback recommendation model trained by hybrid loss, can provide users with more accurate recommendation results in implicit feedback scenarios with only user data. It also optimizes the negative sample and feature fusion process, improves the generalization ability and recommendation accuracy of the obtained implicit feedback recommendation model, and solves the problems of poor recall and recommendation effect of recommendation models trained by existing training methods. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0010] Figure 1 A flowchart illustrating an implicit feedback recommendation training method provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for training an implicit feedback recommendation model using a user-item interaction event dataset, as provided in an embodiment of this application. Figure 3 Example diagram of pseudocode for training an implicit feedback recommendation model provided in an embodiment of this application; Figure 4 An example diagram of a training method for implicit feedback recommendation provided in an embodiment of this application; Figure 5 A schematic diagram of the structure of a training system for implicit feedback recommendation provided in an embodiment of this application; Figure 6This is a schematic diagram of another implicit feedback recommendation training system provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0013] See Figure 1 The diagram illustrates a flowchart of an implicit feedback recommendation training method provided in an embodiment of this application. The implicit feedback recommendation training method specifically includes the following steps: S101: Obtain the event dataset; wherein, the event dataset includes user feature data and item feature data; the item feature data includes positive sample feature data of positive samples and negative sample feature data of multiple negative samples.
[0014] In this embodiment, user data for each user can be pre-acquired, and multiple positive samples related to items already interacted with by the user can be acquired. For each positive sample, corresponding negative samples are randomly collected, while items already interacted with by the user are excluded, resulting in corresponding item data. The item data includes positive sample data of positive samples and negative sample data of multiple negative samples. Based on the user data and item data, corresponding user-item interaction event data is constructed, and a user-item interaction event dataset is generated using this data. The event dataset includes user feature data and item feature data; the user feature data includes user identifiers. User dynamic characteristics and user static characteristics Item feature data includes item identifiers and item dynamic features. and static features of items The item identifier is an item ID matrix. The first column of each row of the item ID matrix is the positive sample identifier, and the rest are negative sample identifiers; the dynamic features of the items include positive sample dynamic features and negative sample dynamic features; the static features of the items include positive sample dynamic features and negative sample dynamic features.
[0015] In some embodiments, dynamic features (user dynamic features and item dynamic features) can be stored in a sparse matrix manner to optimize memory; the final user-item interaction event dataset supports weight columns for subsequent weighted sample loss.
[0016] It should be noted that this application supports the storage of coefficient matrices for dynamic / time-varying features and efficient negative sampling, so as to collect corresponding negative samples by adopting a random selection and retry mechanism, thereby ensuring that the collected negative samples do not belong to the set of items that the user has already interacted with.
[0017] In this embodiment, after obtaining the interaction event data, user identifiers, user dynamic features, and user static features can be extracted from the user data, and these features can be converted into tensor form to obtain user feature data, which includes user identifiers, user dynamic features, and user static features. Similarly, positive sample identifiers, positive sample dynamic features, and positive sample static features can be extracted from the positive sample data, and these features can be converted into tensor form to obtain positive sample feature data, which includes positive sample identifiers, positive sample dynamic features, and positive sample static features. Likewise, negative sample identifiers, negative sample dynamic features, and negative sample static features can be extracted from the negative sample data, and these features can be converted into tensor form to obtain negative sample feature data, which includes negative sample identifiers, negative sample dynamic features, and negative sample static features. Finally, a corresponding user-item interaction event dataset is constructed based on the user feature data, the positive sample feature data of positive samples, and the negative sample feature data of multiple negative samples.
[0018] It should be noted that user identifiers can be used as user indexes, positive sample identifiers can be used as positive sample indexes, and negative sample identifiers can be used as negative sample indexes.
[0019] It should also be noted that static user characteristics can refer to features that do not change over time, such as a user's phone model, gender, and occupation. Dynamic user characteristics can refer to features that change over time, such as the percentage of times a user watched TV series in the past day or the percentage of times a user watched TV series on Friday afternoons at 4 PM in the past 14 days. If a user's registration information (phone model, gender, occupation) is available, then static user characteristics are considered to exist. If playback logs containing viewing timestamps and media asset information are available, then dynamic user characteristics are considered to exist.
[0020] In some embodiments, the extracted dynamic / static features (user static features / user dynamic features / positive sample static features / positive sample dynamic features / negative sample dynamic features / negative sample static features) are processed and encoded accordingly, that is, the dynamic / static features are transformed into tensor forms accordingly, so that when the implicit feedback recommendation model to be trained is trained using the dynamic / static features, the perception ability of the implicit feedback recommendation model can be improved.
[0021] For example, the periodic expression of time features (user dynamic features) – for periodic time features such as days of the week and hours, sine and cosine coding is used to preserve the cyclical proximity of features (such as the proximity of Sunday and Monday), thereby improving the model's ability to perceive time cycle patterns.
[0022] In this embodiment of the application, in addition to acquiring user data and item data, corresponding sample weights can also be configured. Temperature coefficient and loss weighting coefficient The sample weights can include the weights corresponding to each sample, and the samples can be positive or negative.
[0023] In summary, the dynamic and static feature channels disclosed in this application are naturally aligned with batches and datasets in terms of tensor dimension, making them easy to integrate with existing negative sampling pipelines and batch parallel computing, thus reducing invasive modifications to data structures.
[0024] S102: Input the event dataset into the implicit feedback recommendation model to extract features based on the target user's event data, and obtain the fusion embedding vector for downstream recommendation tasks.
[0025] In the specific execution step S102, after obtaining the event dataset, the event dataset can be input into the implicit feedback recommendation model to be trained. This allows the implicit feedback recommendation model to perform corresponding implicit feedback training using the event dataset, resulting in an implicit feedback recommendation model. When a recommendation request is received from a target user, the model can obtain the target user's event data (such as user-item interaction event data) based on the request. This user-item interaction event data is then input into the implicit feedback recommendation model, enabling it to extract features from the target user's user-item interaction event data and obtain a user-item fusion embedding vector for downstream recommendation tasks. This fusion embedding vector includes at least a user fusion representation vector and an item fusion representation vector.
[0026] In this embodiment of the application, a neural network model, namely the implicit feedback recommendation model to be trained, can be pre-constructed, and the implicit feedback recommendation model to be trained can be trained using a user-item interaction event dataset to obtain the implicit feedback recommendation model; wherein, the implicit feedback recommendation model to be trained includes a user embedding layer, an item embedding layer, a dynamic feature mapping layer, and a static feature mapping layer.
[0027] See Figure 2 This illustration shows a flowchart of a method for training an implicit feedback recommendation model using a user-item interaction event dataset, according to an embodiment of this application. The specific steps include: S201: Perform feature embedding and fusion processing on user identifiers and user features within the user feature data to obtain a user representation vector.
[0028] In the specific execution step S201, the user identifier, user dynamic features and user dynamic features in the user feature data are subjected to user-side feature embedding and fusion processing to obtain the corresponding user representation vector.
[0029] Optionally, the process of performing feature embedding and fusion processing on user identifiers and user features within user feature data to obtain a user representation vector can be as follows: perform feature embedding processing on user identifiers within user feature data to obtain a user embedding vector; perform linear transformation and random discarding operations on user static features within user feature data to obtain a user static representation vector; perform linear transformation and random discarding operations on user dynamic features within user feature data to obtain a user dynamic representation vector; and fuse the user embedding vector, user static representation vector, and user dynamic representation vector to obtain the user representation vector.
[0030] In this embodiment, the user embedding vector can be added and fused with the user dynamic representation vector and the user static representation vector respectively; the fusion result of adding and fusing the user embedding vector and the user dynamic representation vector and the fusion result of adding and fusing the user embedding vector and the user static representation vector are fused, and the fusion result is discarded and normalized to obtain the user representation vector.
[0031] In some embodiments, user identifiers can be mapped through a user embedding layer to obtain corresponding user embedding vectors, which can then be used as the corresponding user base representation.
[0032] For example, mapping the user ID (user identifier) to (u) through the user embedding layer. e ∈R B×D ), to obtain the corresponding user embedding vector (u vec ←u e ), where u e For user identification, u vec Embed vectors for users.
[0033] In some embodiments, the user dynamic features can be linearly transformed by a dynamic feature mapping layer, and the linearly transformed user dynamic features can be randomly discarded to obtain the corresponding user dynamic representation vector; the user embedding vector and the user dynamic representation vector are added and fused together.
[0034] For example, enabling dynamic feature channels (dynamic feature mapping layer) to analyze user dynamic features (U dyn By sequentially applying a linear transformation, the ReLU activation function, and Dropout, the corresponding user dynamic representation vector (u) is obtained. d ∈R B×D ), and fuse the user dynamic representation vector with the user embedding vector (u vec ←u vec +u d ).
[0035] It should be noted that the user dynamic representation vector and the user embedding vector are added element by element to achieve the fusion of the user dynamic representation vector and the user embedding vector.
[0036] In some embodiments, the static features of the user can be linearly transformed by a static feature mapping layer, and the static dynamic features after linear transformation can be randomly discarded to obtain the corresponding static dynamic representation vector; the user embedding vector and the user static representation vector are added and fused together.
[0037] For example, enabling static feature channels (static feature mapping layer) for user static features (U strBy sequentially applying a linear transformation, the ReLU activation function, and Dropout, the corresponding user static representation vector (u) is obtained. s ∈R B×D ), and merge the user static representation vector with the user embedding vector (u vec ←u vec +u s ).
[0038] It should be noted that the user embedding vector and the user static representation vector are added element by element to achieve the fusion of the user static representation vector and the user embedding vector.
[0039] S202: Perform feature embedding and fusion processing on the positive sample identifiers and positive sample features in the positive sample feature data to obtain the positive sample representation vector matrix.
[0040] In the specific execution step S202, the positive sample identifier, positive sample dynamic features and positive sample static features in the positive sample feature data are subjected to item-side feature embedding and fusion processing to obtain the corresponding positive sample representation vector matrix.
[0041] Optionally, the process of performing feature embedding and fusion processing on the positive sample identifiers and positive sample features within the positive sample feature data to obtain the positive sample representation vector matrix can be as follows: perform feature embedding processing on the positive sample identifiers within the positive sample feature data to obtain a positive sample embedding vector; extract positive sample static features and positive sample dynamic features from the positive sample data within the positive sample feature data; perform linear transformation and random discarding operations on the positive sample dynamic features within the positive sample feature data to obtain a positive sample dynamic representation vector; normalize the positive sample static features within the positive sample feature data, and perform linear transformation and random discarding operations on the normalized positive sample static features to obtain a positive sample static representation vector; fuse the positive sample embedding vector, the positive sample static representation vector, and the positive sample dynamic representation vector to obtain the positive sample representation vector matrix.
[0042] In the embodiments of this application, the positive sample embedding vector can be added and fused with the positive sample dynamic representation vector and the positive sample static representation vector respectively, and the fusion result of the positive sample embedding vector and the positive sample dynamic representation vector and the fusion result of the positive sample embedding vector and the positive sample static representation vector can be fused to obtain the corresponding positive sample representation vector matrix.
[0043] In some embodiments, the positive sample identifiers can be first flattened into a one-dimensional array, and then the one-dimensional array can be rearranged into a three-dimensional tensor through the item embedding layer. The three-dimensional tensor can be initialized with the corresponding positive sample embedding vector, that is, the corresponding positive sample embedding vector can be obtained from the one-dimensional array through the item embedding layer. Then, the positive sample embedding vector can be reshaped back into the shape of the batch dimension and the sample dimension so that the reshaped positive sample embedding vector can be used as the corresponding item basic representation, which can be added and fused with the subsequent positive sample dynamic representation vector and positive sample static representation vector respectively.
[0044] For example, the item ID (positive sample representation) is flattened, fed into the item embedding layer, and rearranged into the corresponding 3D tensor (i e1 ∈R B×K×D ), initialize the three-dimensional tensor with the corresponding positive sample embedding vector (item) vecs ←i e1 ).
[0045] In some embodiments, a dynamic feature mapping layer can be used to linearly transform the dynamic features of positive samples, and the ReLU activation function and discard operation can be applied to the linearly transformed dynamic features of positive samples to obtain the corresponding dynamic representation vector of positive samples; the embedding vector of positive samples and the dynamic representation vector of positive samples can be added and fused together.
[0046] For example, enabling dynamic feature channels (dynamic feature mapping layer) will dynamically map the features of positive samples (I1). dyn Flattened, and after passing through a linear layer, ReLU activation function, and Dropout, the vectors are rearranged into the corresponding positive sample dynamic representation vectors (i). d1 ∈R B×K×D ), and then add and fuse the positive sample embedding vector with the positive sample dynamic representation vector (item). vecs ←item vecs +i d1 ).
[0047] It should be noted that the positive sample embedding vector and the positive sample dynamic representation vector are added element by element to achieve the fusion of the positive sample embedding vector and the positive sample dynamic representation vector.
[0048] In some embodiments, the positive sample static features are normalized by a static feature mapping layer, and a linear transformation is performed on the positive sample static features. The ReLU activation function is applied to the linearly transformed positive sample static features, and a discard operation is performed to obtain the corresponding positive sample static representation vector. The positive sample embedding vector and the positive sample static representation vector are added and fused together.
[0049] It should be noted that the process of normalizing the static features of positive samples is as follows: divide the feature value of the static features of positive samples by the sum of their absolute values, and add a small constant to avoid division by zero.
[0050] For example, enabling the static feature channel (static feature mapping layer) will transfer the static features of positive samples (I1). str Flattening, normalizing the flattened positive sample static features, and then passing them through a linear layer, ReLU activation function, and Dropout before rearranging them into the corresponding positive sample static representation vectors (i). s1 ∈R B×K×D ), and then add and fuse the positive sample embedding vector with the positive sample static representation vector (item). vecs ←item vecs +i s1 ).
[0051] It should be noted that the positive sample embedding vector and the positive sample static representation vector are added element by element to achieve the fusion of the positive sample embedding vector and the positive sample static representation vector.
[0052] In this embodiment, after obtaining the summation results of the positive sample embedding vector and the positive sample dynamic representation vector, and the summation results of the positive sample embedding vector and the positive sample static representation vector, the summation results of the positive sample embedding vector and the positive sample dynamic representation vector, and the summation results of the positive sample embedding vector and the positive sample static representation vector can be further combined to obtain the final positive sample representation vector matrix. The dimension of the final positive sample representation vector matrix is: batch dimension. Positive sample dimension Embedded dimension.
[0053] S203: Perform feature embedding and fusion processing on the negative sample identifier and negative sample features in each negative sample feature data to obtain multiple negative sample representation vector matrices.
[0054] In the specific execution step S203, the negative sample identifier, negative sample dynamic features and negative sample static features in the negative sample feature data are subjected to item-side feature embedding and fusion processing to obtain the corresponding negative sample representation vector matrix.
[0055] Optionally, the process of embedding and fusing negative sample identifiers and features within the negative sample feature data to obtain a negative sample representation vector matrix can be as follows: embedding negative sample identifiers to obtain a negative sample embedding vector; performing linear transformation and random discarding operations on the dynamic features of negative samples to obtain a dynamic negative sample representation vector; normalizing the static features of negative samples, and performing linear transformation and random discarding operations on the normalized static features of positive samples to obtain a static negative sample representation vector; fusing the negative sample embedding vector with both the static negative sample representation vector and the dynamic negative sample representation vector; and fusing the result of fusing the negative sample embedding vector with the static negative sample representation vector and the result of fusing the user embedding vector with the dynamic negative sample representation vector to obtain the negative sample representation vector.
[0056] In this embodiment, the negative sample embedding vector can be added and fused with the negative sample dynamic representation vector and the negative sample static representation vector respectively, and the fusion result of the negative sample embedding vector and the negative sample dynamic representation vector and the fusion result of the negative sample embedding vector and the negative sample static representation vector can be fused to obtain the corresponding negative sample representation vector matrix.
[0057] In some embodiments, the negative sample identifiers can be first flattened into a one-dimensional array, and then the one-dimensional array can be rearranged into a three-dimensional tensor through the item embedding layer. The three-dimensional tensor can be initialized with the corresponding negative sample embedding vector. That is, the corresponding negative sample embedding vector is obtained from the one-dimensional array through the item embedding layer. Then, the negative sample embedding vector is reshaped back to the shape of the batch dimension and the sample dimension so that the reshaped negative sample embedding vector can be used as the corresponding item basic representation for addition and fusion with the subsequent negative sample dynamic representation vector and negative sample static representation vector, respectively.
[0058] For example, the item ID (negative sample representation) is flattened, fed into the item embedding layer, and rearranged into the corresponding 3D tensor (i e2 ∈R B×K×D ), initialize the three-dimensional tensor with the corresponding negative sample embedding vector (item) vecs ←i e2 ).
[0059] In some embodiments, the dynamic features of negative samples can be linearly transformed by a dynamic feature mapping layer, and the ReLU activation function and discard operation can be applied to the linearly transformed dynamic features of negative samples to obtain the corresponding dynamic representation vector of negative samples; the embedding vector of negative samples and the dynamic representation vector of negative samples are added and fused together.
[0060] For example, enabling dynamic feature channels (dynamic feature mapping layer) will dynamically map the features of negative samples (I... dynFlattened, and after passing through a linear layer, ReLU activation function, and Dropout, the data is rearranged into the corresponding dynamic representation vector of the negative samples (i). d2 ∈R B×K×D ), and then add and fuse the negative sample embedding vector with the negative sample dynamic representation vector (item). vecs ←item vecs +i d2 ).
[0061] It should be noted that the negative sample embedding vector and the negative sample dynamic representation vector are added element by element to achieve the fusion of the negative sample embedding vector and the negative sample dynamic representation vector.
[0062] In some embodiments, the static features of negative samples are normalized by optional grouping through a static feature mapping layer and then linearly transformed. The ReLU activation function is applied to the normalized and linearly transformed static features of the optional groups, and a discard operation is performed to obtain the corresponding static representation vector of negative samples. The embedding vector of negative samples is added to and fused with the static representation vector of negative samples.
[0063] It should be noted that the process of normalizing the static features of negative samples is as follows: divide the feature value of the static features of negative samples by the sum of their absolute values, and add a small constant to avoid division by zero.
[0064] For example, enabling the static feature channel (static feature mapping layer) will transfer the static features of negative samples (I... str The flattened negative sample static features are then normalized through optional grouping, and finally rearranged into corresponding negative sample static representation vectors after passing through a linear layer, ReLU activation function, and Dropout. s2 ∈R B×K×D ), and then add and fuse the negative sample embedding vector with the negative sample static representation vector (item). vecs ←item vecs +i s2 ).
[0065] It should be noted that the negative sample embedding vector and the negative sample static representation vector are added element by element to achieve the fusion of the negative sample embedding vector and the negative sample static representation vector.
[0066] In this embodiment, after obtaining the fusion results of the negative sample embedding vector and the negative sample dynamic representation vector, and the negative sample embedding vector and the negative sample static representation vector, the fusion results of the negative sample embedding vector and the negative sample dynamic representation vector, and the fusion results of the negative sample embedding vector and the negative sample static representation vector, can be further combined to obtain the final negative sample representation vector matrix. The dimension of the final negative sample representation vector matrix is: batch dimension. Negative sample dimension Embedded dimension.
[0067] In summary, this application focuses on user / item identifier embedding, designing both dynamic and static feature channels. For users and items, independent dynamic feature tensors (such as day-of-week, hour-of-day, session state, content freshness, etc.) can be input at each interaction event. After linear mapping and nonlinear transformation, these are fused with the ID embedding according to event alignment. This allows for subsequent regularization and stable training using Dropout and LayerNorm, resulting in an implicit feedback recommendation model that meets the validation criteria.
[0068] S204: Construct a hybrid loss using the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector matrix. Use the hybrid loss to adjust the parameters and obtain an implicit feedback recommendation model.
[0069] In the specific execution step S204, the positive sample score and negative sample score are calculated for the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector, respectively; and a mixed loss is constructed using the positive sample score and negative sample score, so as to adjust the parameters of the implicit feedback recommendation model to be trained using the mixed loss, and obtain the implicit feedback recommendation model.
[0070] Optionally, the process of constructing a hybrid loss using the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector matrix to adjust parameters and obtain an implicit feedback recommendation model can be as follows: Perform an inner product calculation between the user representation vector and the positive sample representation vector matrix to obtain a positive sample score; perform an inner product calculation between the user representation vector and each negative sample representation vector matrix to obtain multiple negative sample scores; calculate the total loss for each sample based on the positive sample score and each negative sample score; where the sample is either a positive or negative sample; calculate the hybrid loss by weighted averaging the total loss of each sample and its weights; and use the hybrid loss for backpropagation and parameter updates to obtain the implicit feedback recommendation model.
[0071] It should be noted that regularization and scoring are performed using the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector matrix to obtain the positive sample score and the negative sample score.
[0072] It should also be noted that this application uses a softmax-based cross-entropy approximation to model the "relative advantage of positive samples in the dataset," and superimposes a LambdaRank-style pairwise ranking term, balancing the discriminability at the list level with the learnability of the pairwise interval. This allows the final mixed loss to be optimized end-to-end under no-exposure conditions, relying solely on "positive example playback + sampling negative examples." Furthermore, through negative sampling and the soft-maximum approximation Lambda ranking loss, the model can be effectively trained using only positive feedback such as playback, adapting to real-world environments with no or incomplete exposure.
[0073] In some embodiments, Dropout and LayerNorm can be applied to the user representation vector and sample representation vector matrix respectively to enhance generalization and stability, resulting in normalized user representation vectors and normalized sample representation vector matrices, where the sample representation vector matrix is either a positive sample representation vector matrix or a negative sample representation vector matrix. The inner integral of the normalized user representation vector and each normalized sample representation vector matrix is calculated, i.e., the dot product of the normalized user representation vector and each normalized sample representation vector matrix is performed along the vector dimension (scores∈R). B×K , where scores∈R B×K The first column in the table represents the positive sample scores (initial positive sample scores (pos∈R)). B The remaining columns are the negative sample scores (initial negative sample scores (neg∈R)). B ×(K-1) The result of the dot product is subjected to temperature scaling to obtain the final positive sample score (pos'=pos / τ) and negative sample score (neg'=neg / τ), which are used to adjust the smoothness of softmax and gradient scale.
[0074] Specifically, the user representation vector is discarded and layered normalized to obtain a normalized user vector; the item representation vector matrix (a vector matrix composed of the negative sample representation vector matrices of the positive sample representation vector matrix) is discarded and layered normalized to obtain a normalized item vector matrix; the inner integral of the user representation vector and the item representation vector matrix is calculated: the user representation vector is extended along the sample dimension, multiplied element-wise with the item representation vector matrix, and summed along the embedding dimension to obtain a score matrix (batch dimension × sample dimension); the first column is extracted from the score matrix as the initial positive sample score vector (batch dimension). The remaining columns are extracted as the initial negative sample score matrix (batch dimension × (sample dimension - 1)); each column (each initial negative sample score) in the initial positive sample score and initial negative sample score matrices is divided by the temperature parameter to obtain the scaled positive sample score and negative sample score, which are the final positive sample score and negative sample score.
[0075] It should be noted that the loss function incorporates a temperature parameter. Controlling score sensitivity and Weighted sorting loss contribution; innovatively handles the fusion of dynamic / static features of users and items, rather than the static limitations of existing libraries.
[0076] Optionally, the process of calculating the total loss for each sample based on the positive sample score and each negative sample score can be as follows: calculate the normalization factor for each sample by performing normalization factor calculation on the positive sample score and each negative sample score; calculate the cross-entropy loss for each sample based on the positive sample score and the normalization factor for each sample; calculate the ranking loss for each sample based on the negative sample score and the positive sample score; and calculate the total loss for each sample based on the cross-entropy loss and ranking loss for each sample.
[0077] In some embodiments, a sigmoid function can be predefined: 1 / (1+exp(-x)); the normalization factor for each sample is obtained by adding the exponent of the scaled positive sample score to the sum of the exponents of all scaled negative sample scores, as shown in formula (1); the cross-entropy loss for each sample is obtained by dividing the exponent of the scaled positive sample score by the sum of the normalization factor and the small constant for each sample, as shown in formula (2); for each negative sample, the value of the sigmoid function applied to (negative sample score minus positive sample score) is calculated, and then summed to obtain the ranking loss for each sample, as shown in formula (3), where, by defining ( ), calculate the difference between the scaled positive sample score and the scaled negative sample score, accumulate the difference between the scaled positive sample score and each scaled negative sample score, use it to punish the case where the negative sample score exceeds the positive sample score and promote the correct sorting, and obtain the sorting loss of each sample; add the cross-entropy loss of each sample to the sorting loss to obtain the total loss of each sample, as shown in formula (4); if the weight w of the sample is provided, multiply the total loss of each sample by the corresponding weight, and calculate the average of the product of the total loss of all samples and the weight as the final loss, that is, obtain the final mixed loss.
[0078] (1); in, Let b be the normalization factor for sample b. These are the scaled positive sample scores. The value is the scaled score of the j-th negative sample.
[0079] (2); in, Let b be the normalization factor for sample b. These are the scaled positive sample scores. It is a tiny constant. Let be the cross-entropy loss for sample b.
[0080] (3); in, The ranking loss for sample b, For positive sample scores, Let be the negative sample score of the j-th negative sample.
[0081] (4); in, For sample b, the total loss is The ranking loss for sample b, Let be the cross-entropy loss for sample b.
[0082] In some embodiments, after obtaining the final mixed loss, the positive sample scores, each negative sample score, and the mixed loss can be used to perform backpropagation and parameter updates on the implicit feedback recommendation model to be trained until the implicit feedback recommendation model to be trained converges, thus obtaining the implicit feedback recommendation model.
[0083] It should be noted that the backpropagation and parameter update process can be implemented using frameworks such as PyTorch, supporting GPU acceleration. In practical applications, the batch size and embedding dimension can be adjusted according to the data scale to balance computational efficiency and model performance.
[0084] It should also be noted that during the parameter update process of the implicit feedback recommendation model to be trained, the optimizer can be used to iteratively update the model parameters, and time series partitioning of the training dataset (user-item interaction event dataset) and the validation dataset can be supported to avoid time leakage; in the cold start scenario, the embedding mean of the training dataset can be used to fill the representation of new users or new items; and the update strategy of dynamic features can be optimized.
[0085] It is worth noting that the event-level dynamic features used during training can also be used during online recall / reordering (e.g., using the context of the current time slice), avoiding feature distribution drift in the model and improving the stability of online performance.
[0086] In summary, the implicit feedback recommendation model to be trained includes a user embedding layer, an item embedding layer, a dynamic feature mapping layer, and a static feature mapping layer. It fuses features from each channel through element-wise summation and performs regularization using Dropout and LayerNorm. Positive and negative sample scores are calculated and optimized using a hybrid Lambda loss function (hybrid loss) based on temperature parameters. Furthermore, the entire training process of the implicit feedback recommendation model optimizes both the probability distribution of positive samples in the candidate list (list level) and the relative order of positive and negative pairs (pairwise level) through multi-channel feature fusion and the complementary effects of the two types of losses. This improves the accuracy and stability of the implicit feedback recommendation model and makes it suitable for industrial-grade recommendation scenarios with multi-source features.
[0087] To better understand the training process of the implicit feedback recommendation model provided in the embodiments of this application, pseudocode of the implicit feedback recommendation model is provided below (e.g., Figure 3 (as shown) and the specific real-time process, such as Figure 4 As shown, the specific real-time process is as follows: A1: Obtain the user-item interaction event dataset, which includes user features, positive sample features, and multiple negative sample features; user features include user identifier (n_users, D), user dynamic features (B, u_dyn_dim), and user static features (B, u_str_dim); positive sample feature data includes positive sample identifier (B), positive sample dynamic features (B, i_dyn_dim), and positive sample static features (B, i_str_dim); negative sample feature data includes negative sample identifier (B), negative sample dynamic features (B, i_dyn_dim), and negative sample static features (B, i_dyn_dim). A7: Flatten the item ID (positive sample representation) and feed it into the item embedding layer and rearrange it into the corresponding three-dimensional tensor. Initialize the three-dimensional tensor into the corresponding positive sample embedding vector (n_items, D). A8: Enable the dynamic feature channel to perform a linear transformation (i_dyn_dim-D) on the dynamic features of positive samples, and apply the ReLU activation function and Dropout to the linear transformation result to obtain the dynamic representation vector of positive samples; A9: Enable the static feature channel to flatten the static features of positive samples, normalize the flattened static features of positive samples, perform a linear transformation (i_str_dim-D), and apply the ReLU activation function and Dropout to the linear transformation result to obtain the static representation vector of positive samples; A10: Add the positive sample embedding vector to the positive sample dynamic representation vector element by element, and add the positive sample embedding vector to the positive sample static representation vector element by element; A11: The positive sample embedding vector and the positive sample dynamic representation vector are fused together, and the positive sample embedding vector and the positive sample static representation vector are fused together. The fused result is then discarded and normalized to obtain the positive sample representation vector matrix (positive sample vector).
[0088] A12: Flatten the item ID (negative sample representation) and feed it into the item embedding layer and rearrange it into the corresponding three-dimensional tensor. Initialize the three-dimensional tensor into the corresponding negative sample embedding vector (n_items, D). A13: Enable the dynamic feature channel to perform a linear transformation (i_dyn_dim-D) on the dynamic features of the negative samples, and apply the ReLU activation function and Dropout to the linear transformation result to obtain the dynamic representation vector of the negative samples; A14: Enable the static feature channel to flatten the static features of the negative samples, perform groupable normalization on the flattened static features of the negative samples, perform linear transformation (i_str_dim-D) on the linear transformation result, and perform ReLU activation function and Dropout (discard operation) on the linear transformation result to obtain the static representation vector of the negative samples. A15: Add the negative sample embedding vector to the negative sample dynamic representation vector element by element, and add the negative sample embedding vector to the negative sample static representation vector element by element; A16: The result of adding and fusing the negative sample embedding vector and the negative sample dynamic representation vector, and the result of adding and fusing the negative sample embedding vector and the negative sample static representation vector are fused together. The fused result is then discarded and normalized to obtain the negative sample representation vector matrix (negative sample vector).
[0089] A17: Apply the discard operation and layer normalization to the user representation vector to obtain the normalized user vector; apply the discard operation and layer normalization to the positive sample representation vector matrix to obtain the normalized positive sample representation vector matrix, and calculate the final positive sample score by the inner product of the normalized user representation vector and the positive sample representation vector matrix. A18: Apply the discard operation and layer normalization to the user representation vector to obtain the normalized user vector; apply the discard operation and layer normalization to the negative sample representation vector matrix to obtain the normalized negative sample representation vector matrix, and calculate the final negative sample score by the inner product of the normalized user representation vector and the negative sample representation vector matrix. A19: Calculate the normalization factor for each sample by normalizing the positive sample scores and the scores of each negative sample; calculate the cross-entropy loss for each sample based on the positive sample scores and the normalization factor for each sample; calculate the ranking loss for each sample based on the scores of each negative sample and the scores of the positive sample; calculate the total loss for each sample based on the cross-entropy loss and the ranking loss for each sample; calculate the mixed loss by weighted averaging the total loss of each sample and its weights, so as to use the positive sample scores, the scores of each negative sample, and the mixed loss to backpropagate and update the parameters of the implicit feedback recommendation model to be trained until the implicit feedback recommendation model to be trained converges, thus obtaining the implicit feedback recommendation model.
[0090] Furthermore, based on the training method of the implicit feedback recommendation model provided in the above embodiments of this application, that is, after training the implicit feedback recommendation model, this application can further evaluate the obtained implicit feedback recommendation model to ensure the accuracy and stability of the obtained implicit feedback recommendation model.
[0091] In this embodiment, the process of evaluating the implicit feedback recommendation model using a validation dataset can be as follows: First, obtain a validation dataset, which includes candidate user feature data and candidate item feature data. The candidate item feature data includes candidate positive sample feature data of multiple candidate positive samples and candidate negative sample feature data of multiple candidate negative samples. Second, evaluate the implicit feedback recommendation model using the validation dataset to obtain corresponding evaluation results, including precision, recall, and normalized depreciation cumulative gain. Third, if the evaluation results meet the validation conditions, output the user fusion representation vector and item fusion representation vector obtained during the evaluation of the implicit feedback recommendation model, providing input for downstream recommendation tasks so that downstream recommendation tasks can use the user fusion representation vector and item fusion representation vector to make corresponding recommendations.
[0092] In some embodiments, an implicit feedback recommendation model can be used to calculate the similarity between a candidate user and each candidate sample using candidate user feature data, candidate positive sample feature data, and candidate negative sample feature data, so as to generate recommendation results based on the similarity of each candidate sample, and generate corresponding evaluation results based on the recommendation results.
[0093] Optionally, the process of evaluating the implicit feedback recommendation model using a validation dataset to obtain the corresponding evaluation results can be as follows: The implicit feedback recommendation model performs feature embedding and fusion processing on the candidate user identifiers and features within the candidate user feature data to obtain a candidate user representation vector; the implicit feedback recommendation model performs feature embedding and fusion processing on the candidate positive sample identifiers and features within the candidate positive sample feature data to obtain a candidate positive sample representation vector matrix; the implicit feedback recommendation model performs feature embedding and fusion processing on the candidate negative sample identifiers and features within each candidate negative sample feature data to obtain multiple candidate negative sample representation vector matrices; the similarity between the candidate user and each candidate sample is calculated using the implicit feedback recommendation model's candidate user representation vector and each candidate sample representation vector matrix; where a candidate sample is either a candidate positive sample or a candidate negative sample; the implicit feedback recommendation model generates recommendation results using the similarity of each candidate sample, and generates corresponding evaluation results based on the recommendation results.
[0094] The generation process of the candidate user representation vector, the candidate positive sample representation vector matrix, and the candidate negative sample representation vector matrix can be found in [reference needed]. Figure 2 The generation process of the user representation vector, positive sample representation vector matrix, and negative sample representation vector matrix shown in this application embodiment is not limited herein.
[0095] In some embodiments, the implicit feedback model can calculate the similarity between candidate users and candidate samples by performing a dot product or cosine similarity calculation on the candidate user representation vector and the representation vector matrix of each candidate sample. The candidate samples are then sorted according to their similarity to obtain a scoring list, which is the recommendation result. The precision, recall, and normalized depreciation cumulative gain of the implicit feedback recommendation model are calculated based on the recommendation result and the actual recommendation result of the candidate users.
[0096] It's important to note that Precision (Precision@K): The proportion of positive items (the proportion of candidate positive samples) in the top K recommendations. Recall (Recall@K): The proportion of positive items covered in the top K recommendations out of all positive users. Normalized Diminished Cumulative Gain (NDCG@K): Considering the ranking of the recommendations, giving higher weight to positive items appearing at the top, measuring the overall quality of the recommendation list.
[0097] In some embodiments, the process of determining whether the evaluation result meets the validation conditions may be as follows: determining whether the precision is greater than the precision threshold, whether the recall is greater than the recall threshold, and whether the normalized depreciation cumulative gain is greater than the gain threshold; if the precision is greater than the precision threshold, the recall is greater than the recall threshold, and the normalized depreciation cumulative gain is greater than the gain threshold, the evaluation result is determined to meet the validation conditions; if the precision is not greater than the precision threshold, and / or the recall is not greater than the recall threshold, and / or the normalized depreciation cumulative gain is not greater than the gain threshold, the evaluation result is determined not to meet the validation conditions; the parameters of the implicit feedback recommendation model are adjusted, and the process returns to the step of inputting the user-item interaction event dataset into the implicit feedback recommendation model to be trained.
[0098] In this embodiment of the application, if it is determined that the evaluation result does not meet the verification conditions, the model parameters of the implicit feedback recommendation model can be adjusted based on the evaluation result, and the implicit feedback recommendation model with adjusted parameters can be used as the implicit feedback recommendation model to be trained, so as to reacquire the user-item interaction event dataset, and retrain the implicit feedback recommendation model to be trained using the reacquired user-item interaction event dataset, so as to obtain an implicit feedback recommendation model whose evaluation result meets the verification conditions.
[0099] Based on the training method of the implicit feedback recommendation model provided in the above embodiments of this application, correspondingly, the embodiments of this application provide a training system for an implicit feedback recommendation model, such as... Figure 5 As shown, the system includes: Dataset module 51 is used to acquire event datasets; wherein, event datasets include user feature data and item feature data; item feature data includes positive sample feature data of positive samples and negative sample feature data of multiple negative samples; Training module 52 is used to input the event dataset into the implicit feedback recommendation model, so as to use the implicit feedback recommendation model to extract features based on the event data of the target user and obtain the fusion embedding vector provided for the downstream recommendation task; Among them, training module 52 includes: Model unit 52-1 is used to perform feature embedding and fusion processing on user identifiers and user features in user feature data to obtain user representation vectors; to perform feature embedding and fusion processing on positive sample identifiers and positive sample features in positive sample feature data to obtain positive sample representation vector matrices; and to perform feature embedding and fusion processing on negative sample identifiers and negative sample features in each negative sample feature data to obtain multiple negative sample representation vector matrices. Training unit 52-2 is used to construct a hybrid loss using user representation vectors, positive sample representation vector matrices, and various negative sample representation vector matrices, so as to use the hybrid loss to adjust parameters and obtain an implicit feedback recommendation model.
[0100] This application provides a training method and system for an implicit feedback recommendation model. The method involves embedding and fusing user identifiers and user features within user feature data to obtain a user representation vector; embedding and fusing positive sample identifiers and positive sample features within positive sample feature data to obtain a positive sample representation vector matrix; embedding and fusing negative sample identifiers and negative sample features within each negative sample feature data to obtain multiple negative sample representation vector matrices; and constructing a hybrid loss using the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector matrix to adjust parameters, thereby obtaining an implicit feedback recommendation model. This model is then used to extract features based on the user-item interaction event data of the target user, resulting in a user-item fused embedding vector for downstream recommendation tasks. Therefore, the technical solution provided in this application, which combines the dynamic and static information of users and items (user feature data, positive sample feature data, and negative sample feature data) to construct an implicit feedback recommendation model trained by hybrid loss, can provide users with more accurate recommendation results in implicit feedback scenarios with only user data. It also optimizes the negative sample and feature fusion process, improves the generalization ability and recommendation accuracy of the obtained implicit feedback recommendation model, and solves the problems of poor recall and recommendation effect of recommendation models trained by existing training methods.
[0101] Optionally, user feature data includes user identifiers and user features, with user features including dynamic and static user features. Feature embedding and fusion processing is performed on the user identifiers and user features within the user feature data to obtain model units of user representation vectors, specifically used for: The user identifier is subjected to feature embedding processing to obtain the user embedding vector; By performing linear transformation and random discarding operations on the user's static features, a user static representation vector is obtained. By performing linear transformation and random discarding operations on the user dynamic features, a user dynamic representation vector is obtained; The user embedding vector is added to and fused with the user static representation vector and the user dynamic representation vector respectively; The user representation vector is obtained by fusing the sum of the user embedding vector and the user static representation vector, and the sum of the user embedding vector and the user dynamic representation vector.
[0102] Optionally, positive sample feature data includes positive sample identifiers and positive sample features; positive sample features include positive sample dynamic features and positive sample static features; feature embedding and fusion processing is performed on the positive sample identifiers and positive sample features within the positive sample feature data to obtain model units of positive sample representation vector matrices, specifically used for: The positive sample identifiers are processed by feature embedding to obtain the positive sample embedding vector; By performing linear transformation and random discarding operations on the dynamic features of positive samples, a dynamic representation vector of positive samples is obtained; The static features of positive samples are normalized, and then linear transformation and random discarding operations are performed on the normalized static features of positive samples to obtain the static representation vector of positive samples. The positive sample embedding vector is added to and fused with the positive sample static representation vector and the positive sample dynamic representation vector, respectively. The positive sample representation vector matrix is obtained by fusing the sum of the positive sample embedding vector and the positive sample static representation vector, and the sum of the positive sample embedding vector and the positive sample dynamic representation vector.
[0103] Optionally, the negative sample feature data includes negative sample identifiers and negative sample features; the negative sample features include negative sample dynamic features and negative sample static features; feature embedding and fusion processing is performed on each negative sample identifier and negative sample data to obtain model units of the negative sample representation vector matrix, specifically used for: The negative sample identifiers are processed by feature embedding to obtain the negative sample embedding vector; By performing linear transformation and random discarding operations on the dynamic features of negative samples, a dynamic representation vector of negative samples is obtained. The static features of negative samples are normalized, and the static features of normalized positive samples are linearly transformed and randomly discarded to obtain the static representation vector of negative samples. The negative sample embedding vector is added to and fused with the negative sample static representation vector and the negative sample dynamic representation vector, respectively; The negative sample representation vector is obtained by fusing the result of adding and fusing the negative sample embedding vector with the user static representation vector and the result of adding and fusing the user embedding vector with the user dynamic representation vector.
[0104] Optionally, a hybrid loss can be constructed using the user representation vector, the positive sample representation vector matrix, and each negative sample representation vector matrix. This hybrid loss is then used for parameter tuning to obtain the training unit of the implicit feedback recommendation model, specifically for: The positive sample score is obtained by performing an inner product between the user representation vector and the positive sample representation vector matrix. The user representation vector is multiplied by the inner product of each negative sample representation vector matrix to obtain multiple negative sample scores. Calculate the total loss for each sample based on the positive sample score and the scores of each negative sample; where a sample is either a positive sample or a negative sample. The mixed loss is obtained by weighting the total loss of each sample and its weight. By using hybrid loss for backpropagation and parameter updates, an implicit feedback recommendation model is obtained.
[0105] Optionally, a training unit with a mixed loss can be obtained by calculating a weighted average of the total loss and weights of each sample, specifically used for: The normalization factor for each sample is calculated by normalizing the scores of the positive samples and each negative sample. Calculate the cross-entropy loss for each sample based on the positive sample score and the normalization factor for each sample; Calculate the ranking loss for each sample based on the scores of each negative sample and the scores of each positive sample; Calculate the total loss for each sample based on the cross-entropy loss and ranking loss for each sample.
[0106] Optional, combined Figure 5 See Figure 6 The training system for the implicit feedback recommendation model provided in this application also includes an evaluation module 52-3, which includes: The verification dataset acquisition unit is used to acquire the verification dataset, which includes candidate user feature data and candidate item feature data; the candidate item feature data includes candidate positive sample feature data of multiple candidate positive samples and candidate negative sample feature data of multiple candidate negative samples. The evaluation unit is used to evaluate the implicit feedback recommendation model using the validation dataset and obtain the corresponding evaluation results. If the evaluation results meet the validation conditions, it outputs the user fusion representation vector and item fusion representation vector obtained during the evaluation of the implicit feedback recommendation model, providing input for downstream recommendation tasks so that downstream recommendation tasks can make corresponding recommendations using the user fusion representation vector and item fusion representation vector.
[0107] Optionally, an evaluation unit is used to evaluate the implicit feedback recommendation model using a validation dataset, yielding the corresponding evaluation results. This unit is specifically used for: The implicit feedback recommendation model is used to embed and fuse candidate user identifiers and features in the candidate user feature data to obtain candidate user representation vectors. The implicit feedback recommendation model is used to embed and fuse the candidate positive sample identifiers and features in the candidate positive sample feature data to obtain the candidate positive sample representation vector matrix. The implicit feedback recommendation model performs feature embedding and fusion processing on the candidate negative sample identifier and candidate negative sample features in the feature data of each candidate negative sample to obtain multiple candidate negative sample representation vector matrices. The similarity between a candidate user and each candidate sample is calculated using the candidate user representation vector and the representation vector matrix of each candidate sample in the implicit feedback recommendation model; where a candidate sample is either a positive candidate sample or a negative candidate sample. The implicit feedback recommendation model generates recommendation results by utilizing the similarity of each candidate sample, and generates corresponding evaluation results based on the recommendation results.
[0108] Optionally, the evaluation unit provided in this application embodiment is further used for: Determine whether the precision in the evaluation results is greater than the precision threshold, whether the recall in the evaluation results is greater than the recall threshold, and whether the normalized cumulative gain in the evaluation results is greater than the gain threshold. If the precision is greater than the precision threshold, the recall is greater than the recall threshold, and the normalized cumulative gain is greater than the gain threshold, the evaluation result is determined to meet the validation conditions. If the precision is not greater than the precision threshold, and / or the recall is not greater than the recall threshold, and / or the normalized depreciation cumulative gain is not greater than the gain threshold, the evaluation result is determined not to meet the validation conditions. Adjust the parameters of the implicit feedback recommendation model and return to the execution dataset module.
[0109] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0110] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0111] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0112] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A training method for an implicit feedback recommendation model, characterized in that, The method includes: Obtain an event dataset; wherein the event dataset includes user feature data and item feature data; the item feature data includes positive sample feature data of positive samples and negative sample feature data of multiple negative samples; The event dataset is input into the implicit feedback recommendation model, which uses the implicit feedback recommendation model to extract features based on the target user's event data, and obtains a fusion embedding vector for downstream recommendation tasks. The process of obtaining the implicit feedback recommendation model includes: The user identifier and user features in the user feature data are subjected to feature embedding and fusion processing to obtain a user representation vector; The positive sample identifiers and positive sample features in the positive sample feature data are subjected to feature embedding and fusion processing to obtain a positive sample representation vector matrix; The negative sample identifier and negative sample feature in each negative sample feature data are subjected to feature embedding and fusion processing to obtain multiple negative sample representation vector matrices; A hybrid loss is constructed using the user representation vector, the positive sample representation vector matrix, and each of the negative sample representation vector matrices. The hybrid loss is then used to adjust the parameters, resulting in an implicit feedback recommendation model.
2. The method of claim 1, wherein, The user feature data includes user identifiers and user features, and the user features include dynamic user features and static user features. The user identifier and user features within the user feature data are subjected to feature embedding and fusion processing to obtain a user representation vector, including: The user identifier is subjected to feature embedding processing to obtain a user embedding vector; Perform linear transformation and random discarding operations on the user static features to obtain the user static representation vector; The user dynamic features are subjected to linear transformation and random discarding operations to obtain the user dynamic representation vector; The user embedding vector is added to and fused with the user static representation vector and the user dynamic representation vector, respectively; The user representation vector is obtained by fusing the sum of the user embedding vector and the user static representation vector, and the sum of the user embedding vector and the user dynamic representation vector.
3. The method of claim 1, wherein, The positive sample feature data includes positive sample identifiers and positive sample features; the positive sample features include positive sample dynamic features and positive sample static features. The positive sample identifiers and positive sample features within the positive sample feature data are subjected to feature embedding and fusion processing to obtain a positive sample representation vector matrix, including: The positive sample identifier is subjected to feature embedding processing to obtain the positive sample embedding vector; The positive sample dynamic features are subjected to linear transformation and random discarding operations to obtain the positive sample dynamic representation vector; The positive sample static features are normalized, and the normalized positive sample static features are subjected to linear transformation and random discarding operations to obtain the positive sample static representation vector. The positive sample embedding vector is added to and fused with the positive sample static representation vector and the positive sample dynamic representation vector, respectively. The positive sample representation vector matrix is obtained by fusing the sum of the positive sample embedding vector and the positive sample static representation vector, and the sum of the positive sample embedding vector and the positive sample dynamic representation vector.
4. The method according to claim 1, characterized in that, The negative sample feature data includes negative sample identifiers and negative sample features; the negative sample features include negative sample dynamic features and negative sample static features. The negative sample identifiers and negative sample data are subjected to feature embedding and fusion processing to obtain a negative sample representation vector matrix, including: The negative sample identifier is subjected to feature embedding processing to obtain the negative sample embedding vector; The negative sample dynamic features are subjected to linear transformation and random discarding operations to obtain the negative sample dynamic representation vector; The negative sample static features are normalized, and the normalized positive sample static features are subjected to linear transformation and random discarding operations to obtain the negative sample static representation vector. The negative sample embedding vector is added to and fused with the negative sample static representation vector and the negative sample dynamic representation vector, respectively. The negative sample representation vector is obtained by fusing the sum of the negative sample embedding vector and the user static representation vector, and the sum of the user embedding vector and the user dynamic representation vector.
5. The method according to claim 1, characterized in that, A hybrid loss is constructed using the user representation vector, the positive sample representation vector matrix, and each of the negative sample representation vector matrices. This hybrid loss is then used to adjust parameters, resulting in an implicit feedback recommendation model, comprising: The positive sample score is obtained by performing the inner product between the user representation vector and the positive sample representation vector matrix. The user representation vector is multiplied by the inner product of each negative sample representation vector matrix to obtain multiple negative sample scores. The total loss for each sample is calculated based on the positive sample score and each of the negative sample scores; wherein the sample is either a positive sample or a negative sample. The mixed loss is obtained by weighted averaging the total loss and weights of each sample. The implicit feedback recommendation model is obtained by using the hybrid loss for backpropagation and parameter update.
6. The method according to claim 5, characterized in that, Based on the positive sample scores and each of the negative sample scores, calculate the total loss for each sample, including: The normalization factor for each sample is calculated by normalizing the positive sample scores and each negative sample score. The cross-entropy loss for each sample is calculated based on the positive sample score and the normalization factor for each sample. Calculate the ranking loss for each sample based on the scores of the negative samples and the scores of the positive samples. The total loss for each sample is calculated based on the cross-entropy loss and ranking loss for each sample.
7. The method according to claim 1, characterized in that, The fusion embedding vector includes at least a user fusion representation vector and an item fusion representation vector, and the method further includes: Obtain a verification dataset, wherein the verification dataset includes candidate user feature data and candidate item feature data; the candidate item feature data includes candidate positive sample feature data of multiple candidate positive samples and candidate negative sample feature data of multiple candidate negative samples; The implicit feedback recommendation model is evaluated using the validation dataset to obtain the corresponding evaluation results; If the evaluation result meets the verification conditions, the user fusion representation vector and the item fusion representation vector obtained during the evaluation of the implicit feedback recommendation model are output to provide input for downstream recommendation tasks, so that the downstream recommendation tasks can use the user fusion representation vector and the item fusion representation vector to make corresponding recommendations.
8. The method according to claim 7, characterized in that, The implicit feedback recommendation model is evaluated using the validation dataset to obtain the corresponding evaluation results, including: The implicit feedback recommendation model is used to embed and fuse candidate user identifiers and candidate user features in the candidate user feature data to obtain candidate user representation vectors. The implicit feedback recommendation model is used to embed and fuse the candidate positive sample identifiers and features in the candidate positive sample feature data to obtain a candidate positive sample representation vector matrix. The implicit feedback recommendation model performs feature embedding and fusion processing on the candidate negative sample identifier and candidate negative sample features in each candidate negative sample feature data to obtain multiple candidate negative sample representation vector matrices. The similarity between a candidate user and each candidate sample is calculated using the candidate user representation vector and the candidate sample representation vector matrix of the implicit feedback recommendation model; wherein, the candidate sample is either a positive candidate sample or a negative candidate sample. The implicit feedback recommendation model generates recommendation results based on the similarity of each candidate sample, and generates corresponding evaluation results based on the recommendation results.
9. The method according to claim 7, characterized in that, The method further includes: Determine whether the precision in the evaluation results is greater than the precision threshold, whether the recall in the evaluation results is greater than the recall threshold, and whether the normalized cumulative gain in the evaluation results is greater than the gain threshold. If the precision is greater than the precision threshold, the recall is greater than the recall threshold, and the normalized cumulative gain is greater than the gain threshold, then the evaluation result is determined to meet the verification conditions. If the precision is not greater than the precision threshold, and / or the recall is not greater than the recall threshold, and / or the normalized depreciation cumulative gain is not greater than the gain threshold, the evaluation result is determined not to meet the verification conditions. The parameters of the implicit feedback recommendation model are adjusted, and the process returns to the step of inputting the event dataset into the implicit feedback recommendation model.
10. A training system for an implicit feedback recommendation model, characterized in that, The system includes: The dataset module is used to acquire an event dataset; wherein the event dataset includes user feature data and item feature data; the item feature data includes positive sample feature data of positive samples and negative sample feature data of multiple negative samples; The training module is used to input the event dataset into the implicit feedback recommendation model, so as to use the implicit feedback recommendation model to extract features based on the event data of the target user and obtain a fusion embedding vector for downstream recommendation tasks. The training module for obtaining the implicit feedback recommendation model includes: The model unit is used to perform feature embedding and fusion processing on the user identifier and user features in the user feature data to obtain a user representation vector; to perform feature embedding and fusion processing on the positive sample identifier and positive sample features in the positive sample feature data to obtain a positive sample representation vector matrix; and to perform feature embedding and fusion processing on the negative sample identifier and negative sample features in each of the negative sample feature data to obtain multiple negative sample representation vector matrices. The training unit is used to construct a hybrid loss using the user representation vector, the positive sample representation vector matrix, and each of the negative sample representation vector matrices, and to use the hybrid loss to adjust parameters to obtain an implicit feedback recommendation model.