Sequence recommendation based on cross-domain behavioral data
By extracting and linking cross-domain behavioral data with entities, a collection of similar sequence representations is generated, which solves the problem of insufficient utilization of cross-domain behavioral data in the existing technology, enables sequence recommendation in applications in different fields, and improves the accuracy of interaction probability prediction. .
Patent Information
- Application Number
- CN202310332238.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
When existing technologies use cross-domain behavioral data for sequence recommendations, they usually require users to have unified user identifiers for applications in different fields, which limits its applicable scenarios and makes it difficult to make full use of cross-domain behavioral data to enhance target user representation.
By extracting the cross-domain behavior sequence set from the logs of the network application, the entity link maps it to the cross-domain content item sequence set, generates the corresponding cross-domain sequence representation set, and retrieves from it a similar sequence representation set that is similar to the target user's representation. , use similar sequence representation to infer user interests and reduce the impact of content item representations that are irrelevant to the target user representation on interaction probability prediction.
It realizes that it is widely applicable to various sequence recommendation scenarios without requiring users to have unified identifiers for applications in different fields, and improves the accuracy of interaction probability prediction and the utilization efficiency of cross-domain behavioral data.
Smart Images

Figure CN118733867A_ABST
Abstract
Description
Background Art
[0001] With the development of network technology and the growth of network information, recommendation systems play an increasingly important role in many online services. Based on the different recommended contents, there are different recommendation systems, such as movie recommendation systems, recipe recommendation systems, book recommendation systems, music recommendation systems, etc. These recommendation systems usually capture the interests of users, and predict the content of interest to users based on their interests and recommend them to users. Summary of the invention
[0002] This Summary is provided to introduce a group of concepts that will be further described in the following Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
[0003] Embodiments of the present disclosure propose methods, devices, and computer-readable media for sequence recommendation based on cross-domain behavior data. A target user representation of a target user can be generated based on the target user's historical content item sequence. A cross-domain behavior sequence set can be extracted from a log of a network application. A cross-domain sequence representation set corresponding to the cross-domain behavior sequence set can be generated. A similar sequence representation set similar to the target user representation can be retrieved from the cross-domain sequence representation set. A set of interaction probabilities of the target user interacting with a set of candidate content items can be predicted based on the target user representation and the similar sequence representation set.
[0004] It should be noted that one or more of the above aspects include features described in detail below and specifically pointed out in the claims. The following description and drawings set forth in detail certain illustrative features of the one or more aspects. These features are merely indicative of various ways in which the principles of the various aspects may be employed, and the present disclosure is intended to include all such aspects and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] The disclosed aspects will hereinafter be described in conjunction with the accompanying drawings, which are provided to illustrate rather than limit the disclosed aspects.
[0006] Figure 1 An exemplary process for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure is shown.
[0007] Figure 2 An exemplary process for generating a comprehensive context representation according to an embodiment of the present disclosure is shown.
[0008] Figure 3 An exemplary process for training a sequence recommendation model based on cross-domain behavior data according to an embodiment of the present disclosure is shown.
[0009] Figure 4 An exemplary process for generating contrastive learning prediction loss according to an embodiment of the present disclosure is shown.
[0010] Figure 5 An exemplary process for generating sub-contrastive learning prediction loss according to an embodiment of the present disclosure is shown.
[0011] Figure 6 An exemplary process for obtaining a set of previous cross-domain sequence representations according to an embodiment of the present disclosure is shown.
[0012] Figure 7 is a flowchart of an exemplary method for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure.
[0013] Figure 8 An exemplary apparatus for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure is shown.
[0014] Fig. 9 Another exemplary device for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0015] The present disclosure will now be discussed with reference to several exemplary embodiments. It should be understood that the discussion of these embodiments is only used to enable those skilled in the art to better understand and thereby implement the embodiments of the present disclosure, and does not teach any limitation on the scope of the present disclosure.
[0016] Sequential Recommendation is a widely used recommendation technology. Sequential recommendation aims to predict the subsequent interaction of a user based on the user's historical content item sequence. The historical content item sequence may include content items that the user has previously interacted with. In this article, a content item may refer to an individual item with specific content. For example, a movie, a recipe, a book, a piece of music, etc. may be referred to as a content item. A target user representation of a target user may be generated based on the target user's historical content item sequence, and the content item that the target user wants to interact with at the next moment may be predicted based on the target user representation. In this article, the target user refers to the user for whom sequential recommendation is performed. Cross-domain behavior (CDB) data may be used to enhance the target user representation. In this article, cross-domain behavior data refers to user behavior records on applications across different domains. A domain may refer to the type of content targeted by an application. For example, a news application and a movie application may be considered to be applications belonging to different domains. Cross-domain behavior data may contain rich information for inferring user interests. For example, many users are accustomed to using a browser to obtain desired information. The search query and browsing data collected by the browser may cover a large amount of user behavior data. This information may be used to infer user interests. At present, when using cross-domain behavior data to perform sequential recommendations for target users, usually only the cross-domain behavior data of the target users is used. This method requires that users have a unified user identifier across applications across different domains. However, the user identifiers of the same user on different applications are likely to be different. Therefore, the scenarios in which this method is applicable are limited.
[0017] The embodiments of the present disclosure propose an improved sequence recommendation based on cross-domain behavior data. A target user representation of a target user can be generated based on the historical content item sequence of the target user. A cross-domain behavior sequence set can be extracted from the log of a network application. In this article, a network application refers to an application that can access various types of content or resources via a network connection, such as a browser, a video application, a news application, a recipe application, etc. The network application may be different from an application for performing sequence recommendation based on cross-domain behavior data. A cross-domain behavior sequence set can be mapped to a cross-domain content item sequence set through entity linking. For example, each behavior can be mapped to a content item through entity linking, thereby obtaining a cross-domain content item sequence set. A cross-domain sequence representation set can be generated based on the cross-domain content item sequence set. Subsequently, a similar sequence representation set similar to the target user representation can be retrieved from the cross-domain sequence representation set. A similar sequence representation set similar to the target user representation may be a user representation of a user with similar interests to the target user. The similar sequence representation set can be used to infer the interest of the target user and enhance the target user representation. A set of interaction probabilities of the target user interacting with the candidate content item set can be predicted based on the target user representation and the similar sequence representation set. The above method does not require users to have a unified user identifier across applications in different fields, but instead utilizes similar sequence representations that are similar to the target user representation, thereby being able to more fully utilize cross-domain behavior data to enhance the target user representation. Accordingly, the above method can be widely applied to various sequence recommendation scenarios.
[0018] Based on the correlation score between each cross-domain sequence representation and the target user representation, a set of similar sequence representations similar to the target user representation can be retrieved from the cross-domain sequence representation set. The process can filter out sequence representations that are not related to the target user representation from the sequence level. Further, each similar sequence representation retrieved includes a set of content item representations corresponding thereto. The set of content item representations may contain content item representations that are not related to the target user representation. In order to reduce the influence of content item representations that are not related to the target user representation on the prediction of interaction probability, an embodiment of the present disclosure designs an attention selector at the content item level. For each content item representation in a set of content item representations corresponding to each similar sequence representation in the similar sequence representation set, the attention selector can calculate the attention weight corresponding to the content item representation based on the target user representation and the content item representation, thereby obtaining a set of attention weights. . Content item representations that are not related to the target user representation can be calculated to have lower attention weights. The set of attention weights can be used to generate a comprehensive context representation. The comprehensive context representation can be further used to predict a set of interaction probabilities for the target user to interact with the candidate content item set. The above process reduces the influence of representations irrelevant to the target user representation on the interaction probability prediction at the sequence level and content item level, which helps to predict a more accurate interaction probability.
[0019] The above-mentioned sequence recommendation based on cross-domain behavior data can be performed by a model based on machine learning. In this article, the model for performing sequence recommendation based on cross-domain behavior data is referred to as a sequence recommendation model based on cross-domain behavior data. For the purpose of description simplification, the sequence recommendation model based on cross-domain behavior data is sometimes referred to as a sequence recommendation model in the following text. The sequence recommendation model can be trained through multiple stages. For example, the encoder for generating the target user representation in the sequence recommendation model can be trained using a sequence augmentation strategy and a momentum contrastive learning mechanism. Subsequently, the parameters of the momentum encoder for generating a cross-domain sequence representation set in the sequence recommendation model can be updated in a momentum manner. Then, a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set can be generated by a momentum encoder to construct a complete retrieval index. Then, the entire sequence recommendation model can be trained in an end-to-end manner. During the training process, the robustness of the encoder can be improved by using a sequence augmentation strategy. In addition, the momentum contrastive learning mechanism can help the encoder learn to distinguish the target user representation as a positive sample from a large set of cross-domain sequence representations as a set of negative samples, thereby improving the encoding ability of the encoder.
[0020] Various embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0021] Figure 1 An exemplary process 100 for sequential recommendation based on cross-domain behavior data according to an embodiment of the present disclosure is shown. In process 100, the probability of interaction between the target user 102 and each candidate content item in the candidate content item set can be predicted by a sequential recommendation model 120 based on cross-domain behavior data, thereby obtaining an interaction probability set 122. The interaction probability set 122 can be further used to predict the content items recommended to the target user 102 at the next moment.
[0022] The target user 102 may be denoted as u. First, the historical content item sequence 104 of the target user 102u may be obtained. The historical content item sequence 104 may be denoted as s u =(v1,…,v t ,…,v lu ), where v t is the content item interacted by the target user 102 at time t, and l u Is a historical content item sequence 104s uThe length of a content item is the number of content items it includes. In this article, interaction can broadly include various actions performed by users with respect to content items, such as clicking, watching, browsing, etc. Content items can include, for example, movies, videos, books, music, news, recipes, product information, etc.
[0023] The encoder 130 in the sequence recommendation model 120 based on cross-domain behavior data can be used to u Generate target user representation 132h of target user 102u u The encoder 130 may be, for example, an encoder part in a transformer. The historical content item sequence 104s generated by the encoder 130 may be u The last content item v in lu The representation as the target user representation 132h u The above process can be expressed as the following formula:
[0024] h u = Transformer(s u ) (1)
[0025] A cross-domain behavior sequence set 106 can be extracted from the log of the network application. The network application may include, for example, a browser, a video application, a news application, a recipe application, etc. The network application may be different from the application for performing sequence recommendations based on cross-domain behavior data. The following takes the network application as an example of a browser to illustrate the process of extracting the cross-domain behavior sequence set 106. A large number of web browsing records can be obtained from the log of the browser. These web browsing records are usually saved in an anonymous manner, but the web browsing records of different users are separated from each other. The web browsing records of each user can be obtained. The web browsing records of the user can be divided into multiple fragments at predetermined time intervals. Each fragment can be called a cross-domain behavior sequence, which may include web pages browsed by the user within a time period. The cross-domain behavior sequences of all users can be combined into a cross-domain behavior sequence set 106. For other types of network applications, a cross-domain behavior sequence set can be extracted through a similar process.
[0026] A cross-domain sequence representation set corresponding to the cross-domain behavior sequence set 106 may be generated. In one embodiment, the cross-domain behavior sequence set 106 may be mapped to a cross-domain content item sequence set 112 by an entity linking module 110. The entity linking module 110 may perform an entity linking operation on each behavior in the cross-domain behavior sequence set 106 to map the behavior to a content item, thereby obtaining a cross-domain content item sequence set 112. The cross-domain content item sequence set 112 may be labeled as C. Subsequently, a cross-domain sequence representation set 142 may be generated based on the cross-domain content item sequence set 112 by a momentum encoder 140. The momentum encoder 140 may be an encoder having the same structure as the encoder 130 but different parameters.
[0027] The above process is described below using a cross-domain content item sequence of any user d in the cross-domain content item sequence set 112C. The cross-domain content item sequence of user d can be marked as in is the content item that user d interacts with at time t, and l d is a sequence of cross-domain content items The momentum encoder 140 can generate a cross-domain content item sequence Cross-domain sequence representation The cross-domain content item sequence generated by the encoder 130 may be The last item in The representation of The above process can be expressed as the following formula:
[0028]
[0029] After obtaining the target user's indication 132h u After the cross-domain sequence representation set 142 is obtained, the retriever 150 can retrieve the target user representation 132h from the cross-domain sequence representation set 142. u Similar similar sequence representation set 154. For example, for the cross-domain sequence representation in the cross-domain sequence representation set 142 The cross-domain sequence representation can be calculated 132h with target user representation u For example, we can calculate the correlation score between the cross-domain sequence representation 132h with target user representation u The correlation score is calculated by the inner product between , as shown in the following formula:
[0030]
[0031] A correlation score between each cross-domain sequence representation and the target user representation 132 may be calculated, thereby obtaining a correlation score set 152 corresponding to the cross-domain sequence representation set 142. Subsequently, a similar sequence representation set 154 may be retrieved from the cross-domain sequence representation set 142 based on the correlation score set 152. The similar sequence representation set 154 may correspond to a similar sequence set. The similar sequence set may be labeled Where k is the number of representations included in the similar sequence set. The similar sequence representation set 154 can be labeled as In one embodiment, a Maximum Inner Product Search (MIPS) algorithm may be used to retrieve a similar sequence representation set 154 from the cross-domain sequence representation set 142. Retrieving a similar sequence representation set 154 similar to the target user representation 132 from the cross-domain sequence representation set 142 may filter out sequence representations that are not related to the target user representation 132 at the sequence level.
[0032] Subsequently, the interaction probability set 122 of the target user 102 interacting with the candidate content item set can be predicted based on the target user representation 132 and the similar sequence representation set 154. The candidate content item set may include movies, videos, books, music, news, recipes, product information, etc. Each similar sequence representation in the similar sequence representation set 154 may include a set of content item representations corresponding thereto. The set of content item representations may contain content item representations that are not related to the target user representation 132. In order to reduce the impact of content item representations that are not related to the target user representation 132 on the prediction of the interaction probability, an embodiment of the present disclosure designs an attention selector 160 at the content item level. A comprehensive context representation 162 can be generated by the attention selector 150 based on the target user representation 132, the similar sequence representation set 154, and a set of correlation scores between the similar sequence representation set 154 and the target user representation 132. Figure 2 An exemplary process 200 for generating a synthetic context representation according to an embodiment of the present disclosure is shown.
[0033] Each similar sequence representation in the set of similar sequence representations may correspond to a set of content items and may include a set of content item representations corresponding to the set of content items. At 202, for each content item representation in the set of content item representations corresponding to the similar sequence representation, an attention weight corresponding to the content item representation may be calculated based on the target user representation and the content item representation. The jth content item in is marked as The above calculation content items represent The attention weight The process can be shown as the following formula:
[0034]
[0035] Where W1 and W2 are learnable model parameters. By using formula (4), the content item representations that are not related to the target user representation can have a lower attention weight.
[0036] Step 202 may be performed for each content item representation in the similar sequence representation, so that at 204 , a set of attention weights corresponding to a set of content item representations may be obtained.
[0037] At 206, a weighted sequence representation may be generated based on a set of attention weights and a set of content item representations. d , as shown in the following formula:
[0038]
[0039] Steps 202 to 206 may be performed for each similar sequence representation in the set of similar sequence representations, so that at 208 , a weighted sequence representation set corresponding to the set of similar sequence representations may be obtained.
[0040] At 210, the weighted sequence representation set and the similar sequence representation set may be used to represent the target user h. u The correlation score set between them generates a comprehensive context representation O, as shown in the following formula:
[0041]
[0042] in, Is a similar sequence representation With the target user representation h u The score can be obtained from the correlation score set 152.
[0043] Return to reference Figure 1 After generating the comprehensive context representation 162, the predictor 170 can predict the interaction probability set 122 between the target user 102 and the candidate content item set based on the target user representation 132 and the comprehensive context representation 162. In one embodiment, a two-layer multilayer perceptron (MLP) can be used to predict the interaction probability set 122 between the target user 102 and each candidate content item v in the candidate content item set. t The interaction probability p(v t |s u ,C), as shown in the following formula:
[0044]
[0045] Wherein, N is the number of candidate content items included in the candidate content item set, and and For content item v t and content item v j The learnable parameters.
[0046] The above-mentioned process 100 of sequence recommendation based on cross-domain behavior data does not require users to have a unified user identifier across applications in different fields, but utilizes similar sequence representations that are similar to the target user representation, thereby being able to more fully utilize cross-domain behavior data to enhance the target user representation. Accordingly, the process 100 can be widely applicable to various sequence recommendation scenarios.
[0047] In the process 100, a similar sequence representation set 154 similar to the target user representation 132 is retrieved from the cross-domain sequence representation set 142, and sequence representations that are not related to the target user representation 132 can be filtered out from the sequence level. In addition, in order to reduce the influence of the content item representation that is not related to the target user representation 132 on the prediction of the interaction probability, for each content item representation in a set of content item representations corresponding to each similar sequence representation in the similar sequence representation set 154, the attention selector 160 at the content item level can calculate the attention weight corresponding to the content item representation based on the target user representation 132 and the content item representation, thereby obtaining a set of attention weights. The content item representation that is not related to the target user representation can be calculated to have a lower attention weight. The group of attention weights can be used to generate a comprehensive context representation 162. The comprehensive context representation 162 can be further used to predict the interaction probability set 122 of the target user 102 interacting with the candidate content item set. The process 100 reduces the influence of the representation that is not related to the target user representation on the prediction of the interaction probability from the sequence level and the content item level, which helps to predict a more accurate interaction probability.
[0048] It should be understood that the above Figure 1 to Figure 2 The process described for sequential recommendation based on cross-domain behavior data is merely exemplary. According to actual application requirements, the steps in the process for sequential recommendation based on cross-domain behavior data can be replaced or modified in any manner, and the process can include more or fewer steps. In addition, the specific order or hierarchy of the steps in process 100 is merely exemplary, and the process for sequential recommendation based on cross-domain behavior data can be performed in an order different from the described order. In addition, Figure 1 The sequence recommendation model 120 based on cross-domain behavior data is only an example of a sequence recommendation model. According to actual application requirements, the sequence recommendation model can have any other structure and can include more or fewer modules.
[0049] The sequence recommendation model based on cross-domain behavior data according to the embodiment of the present disclosure can be trained through multiple stages, such as Figure 1 Sequential recommendation model based on cross-domain behavior data in 120. Figure 3 An exemplary process 300 for training a sequence recommendation model based on cross-domain behavior data according to an embodiment of the present disclosure is shown.
[0050] The encoder in the sequential recommendation model based on cross-domain behavior data can be trained. The encoder is, for example, Figure 1 The encoder 130 for generating the target user representation in . The encoder can be trained using a sequence enhancement strategy and a momentum contrastive learning mechanism.
[0051] At 302, a contrastive learning prediction loss can be generated. Figure 4 An exemplary process 400 for generating a contrastive learning prediction loss according to an embodiment of the present disclosure is shown.
[0052] At 402, a training data set may be obtained. The training data set Can include multiple initial content item sequences {s u}.
[0053] At 404, for each of the multiple initial content item sequences, a sequence enhancement strategy and a momentum contrastive learning mechanism may be used to generate a sub-contrastive learning prediction loss corresponding to the initial content item sequence. Figure 5 To illustrate an exemplary process for generating a sub-contrastive learning prediction loss, the sub-contrastive learning prediction loss can be labeled
[0054] Step 404 may be performed for each of the plurality of initial content item sequences, so that at 406 , a plurality of sub-contrastive learning prediction losses corresponding to the plurality of initial content item sequences may be obtained.
[0055] At 408, a contrastive learning prediction loss may be generated based on the plurality of sub-contrastive learning prediction losses. As shown in the following formula.
[0056]
[0057] Return to reference Figure 3 , after generating the contrastive learning prediction loss Thereafter, at 304 , the encoder in the sequence recommendation model based on the cross-domain behavior data may be trained by minimizing the contrastive learning prediction loss.
[0058] After the encoder is trained, at 306, the parameters of the momentum encoder in the sequence recommendation model based on the cross-domain behavior data can be updated in a momentum manner. The momentum encoder can be used to generate a set of cross-domain sequence representations corresponding to the set of cross-domain behavior sequences. The momentum encoder is, for example, Figure 1 The momentum encoder 140 in the example. The process of updating the parameters of the momentum encoder can be shown as follows:
[0059] θ k ←mθ k +(1-m)θ q (9)
[0060] Among them, θ k are the parameters of the momentum encoder, m∈[0,1) are the coefficients of momentum, and θ q are the parameters of the encoder.
[0061] At 308 , a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set may be generated by a momentum encoder to construct a complete retrieval index.
[0062] Then, the entire sequence recommendation model based on cross-domain behavior data can be trained in an end-to-end manner.
[0063] At 310, an interaction probability prediction loss may be generated. The interaction probability prediction loss may be calculated using cross entropy as a loss function. As shown in the following formula:
[0064]
[0065] Among them, p(v t |s u ,C) is the interaction probability calculated by formula (7).
[0066] At 312, the loss can be predicted based on contrastive learning. and interaction probability prediction loss Generating a comprehensive prediction loss As shown in the following formula:
[0067]
[0068] At 314, the combined prediction loss Minimize to train a sequential recommendation model based on cross-domain behavior data.
[0069] Figure 5 An exemplary process 500 for generating a sub-contrastive learning prediction loss according to an embodiment of the present disclosure is shown. The process 500 may correspond to Figure 4 Step 404 in .
[0070] The process 500 may be performed on any initial content item sequence 504s in the training data set 502. u The initial content item sequence 504s may be enhanced by the sequence enhancement module 510. u Two sequence enhancement strategies are executed to obtain two enhanced content item sequences 512 and 514. The sequence enhancement strategy may include, for example, a mask strategy, a reorder strategy, a crop strategy, and the like.
[0071] The masking strategy aims to use a special token [mask] to randomly replace the initial content item sequence s with probability γ∈(0,1) u The blocking strategy can be expressed as follows:
[0072]
[0073] Among them, v [mask] Indicates that content item v2 is selected and replaced by a special word block [mask]. Initial content item sequence s u Each content item in has an equal probability of being replaced by a special word block [mask].
[0074] The reordering strategy aims to reorder the initial content item sequence s u Reorder the items in a continuous subsequence in . For example, you can reorder the subsequence Reorder to The reordering strategy can be expressed as follows:
[0075]
[0076] Among them, l r =μ*l u is the length of the reordered subsequence, and μ∈(0,1).
[0077] The truncation strategy aims to extract the content from the initial content item sequence s u Randomly select a length of l c =η*l u A subsequence of , where η∈(0,1). The truncation strategy can be expressed as follows:
[0078]
[0079] Two sequence enhancement strategies may be randomly selected from the above sequence enhancement strategies to generate two enhanced content item sequences 512 and 514. Performing sequence enhancement strategies on the initial content item sequence during training may improve the robustness of the encoder.
[0080] An enhanced user representation 522 of the sequence of enhanced content items 512 may be generated by an encoder 520. An enhanced user representation 532 of the sequence of enhanced content items 514 may be generated by an encoder 530.
[0081] A previous cross-domain sequence representation set 542 may be extracted from the memory bank 540. The previous cross-domain sequence representation set 542 may be generated based on the cross-domain behavior sequence set. Figure 6 , to illustrate an exemplary process of obtaining a previous cross-domain sequence representation set. In addition, other enhanced user representation sets 552 corresponding to other initial content item sequences in the training data set may also be obtained.
[0082] Subsequently, a sub-contrastive learning prediction loss 554 may be generated based on the two enhanced user representations 522 and 524, the previous cross-domain sequence representation set 542, and the other enhanced user representation set 552 by the sub-contrastive learning prediction loss calculation module 550. The sub-contrastive learning prediction loss 554 may be denoted as The momentum contrastive learning mechanism can be used to generate sub-contrastive learning prediction loss For example, the two enhanced user representations 522 can be used as positive samples of each other, and the previous cross-domain sequence representation set 542 and the other enhanced user representation set 552 can be used as negative sample sets to generate the sub-contrastive learning prediction loss As shown in the following formula:
[0083]
[0084] in, and They are two enhanced user representations 522 and 524, is another enhanced user representation in the other enhanced user representation set 552, is the previous cross-domain sequence representation in the previous cross-domain sequence representation set 542, M is the number of initial content item sequences included in the training data set 502, K is the number of previous cross-domain sequence representations included in the previous cross-domain sequence representation set 542, and τ is a temperature hyperparameter. The momentum contrastive learning mechanism can help the encoder learn to distinguish the target user representation as a positive sample from a large number of cross-domain sequence representation sets as a negative sample set, thereby improving the encoding ability of the encoder.
[0085] Figure 6 An exemplary process 600 for obtaining a set of previous cross-domain sequence representations according to an embodiment of the present disclosure is shown. A set of previous cross-domain sequence representations for generating a sub-contrastive learning prediction loss can be obtained through process 600, for example Figure 5 The previous cross-domain sequence in represents set 542.
[0086] The cross-domain behavior sequence set 602 may be mapped to the cross-domain content item sequence set 612 through the entity linking module 610. The entity linking module 610 may correspond to Figure 1 The entity linking module 110 in .
[0087] Subsequently, a cross-domain content item sequence subset 622 may be sampled from the cross-domain content item sequence set 612 by a sampling module 620. The cross-domain content item sequence subset 622 may be provided to a momentum encoder 630 to generate a cross-domain sequence representation subset 632 corresponding to the cross-domain content item sequence subset 622. The cross-domain sequence representation subset 632 may be added to a memory bank 640, and the earliest added cross-domain sequence representation in the memory bank 640 may be deleted. The cross-domain sequence representations currently in the memory bank 640 may be combined into a previous cross-domain sequence representation set 642. The previous cross-domain sequence representation set 642 may be extracted when training an encoder for generating a target user representation of a target user and used as a negative sample set when calculating a prediction loss.
[0088] It should be understood that the above Figures 3 to 6 The process described for training a sequence recommendation model based on cross-domain behavior data is merely exemplary. Depending on the actual application requirements, the steps in the process for training a sequence recommendation model may be replaced or modified in any manner, and the process may include more or fewer steps. In addition, the specific order or hierarchy of the steps in process 300 to process 600 is merely exemplary, and the process for training a sequence recommendation model may be performed in an order different from the order described.
[0089] Figure 7 is a flowchart of an exemplary method 700 for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure.
[0090] At 710 , a target user representation of a target user may be generated based on a historical content item sequence of the target user.
[0091] At 720 , a cross-domain behavior sequence set may be extracted from the log of the network application.
[0092] At 730 , a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set may be generated.
[0093] At 740 , a similar sequence representation set similar to the target user representation may be retrieved from the cross-domain sequence representation set.
[0094] At 750 , a set of interaction probabilities of the target user interacting with the set of candidate content items may be predicted based on the target user representation and the set of similar sequence representations.
[0095] In one implementation, generating a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set may include: mapping the cross-domain behavior sequence set to a cross-domain content item sequence set through entity linking; and generating the cross-domain sequence representation set based on the cross-domain content item sequence set.
[0096] In one embodiment, retrieving a set of similar sequence representations that are similar to the target user representation may include: for each cross-domain sequence representation in the cross-domain sequence representation set, calculating a correlation score between the cross-domain sequence representation and the target user representation to obtain a set of correlation scores corresponding to the cross-domain sequence representation set; and retrieving the set of similar sequence representations from the cross-domain sequence representation set based on the set of correlation scores.
[0097] In one embodiment, predicting the set of interaction probabilities of the target user interacting with the set of candidate content items may include: generating a comprehensive context representation based on the target user representation, the set of similar sequence representations, and a set of correlation scores between the set of similar sequence representations and the target user representation; and predicting the set of interaction probabilities based on the target user representation and the comprehensive context representation.
[0098] The generating of the comprehensive context representation may include: for each similar sequence representation in the similar sequence representation set, generating a weighted sequence representation based on the target user representation and the similar sequence representation to obtain a weighted sequence representation set corresponding to the similar sequence representation set; and generating the comprehensive context representation based on the weighted sequence representation set and the relevance score set.
[0099] Generating a weighted sequence representation may include: for each content item representation in a group of content item representations corresponding to the similar sequence representation, calculating an attention weight corresponding to the content item representation based on the target user representation and the content item representation to obtain a set of attention weights corresponding to the group of content item representations; and generating the weighted sequence representation based on the set of attention weights and the group of content item representations.
[0100] In one implementation, the target user representation may be generated by an encoder, and the encoder may be trained using a sequence enhancement strategy and a momentum contrastive learning mechanism.
[0101] The training of the encoder may include: obtaining a training data set, the training data set including a plurality of initial content item sequences;
[0102] For each initial content item sequence in the multiple initial content item sequences, a sub-contrastive learning prediction loss corresponding to the initial content item sequence is generated using a sequence enhancement strategy and a momentum contrastive learning mechanism to obtain a plurality of sub-contrastive learning prediction losses corresponding to the multiple initial content item sequences; a contrastive learning prediction loss is generated based on the multiple sub-contrastive learning prediction losses; and the encoder is trained by minimizing the contrastive learning prediction losses.
[0103] The generating of the sub-contrastive learning prediction loss corresponding to the initial content item sequence may include: executing two sequence enhancement strategies on the initial content item sequence to obtain two enhanced content item sequences; generating two enhanced user representations corresponding to the two enhanced content item sequences; extracting a previous cross-domain sequence representation set from a memory bank, wherein the previous cross-domain sequence representation set is generated based on the cross-domain behavior sequence set; obtaining other enhanced user representation sets corresponding to other initial content item sequences in the training data set; and generating the sub-contrastive learning prediction loss based on the two enhanced user representations, the previous cross-domain sequence representation set and the other enhanced user representation set.
[0104] In one implementation, the set of candidate content items may include at least one of movies, videos, books, music, news, recipes, and product information.
[0105] It should be understood that method 700 may also include any steps / processes for sequence recommendation based on cross-domain behavior data according to the embodiments of the present disclosure as described above.
[0106] Figure 8 An exemplary apparatus 800 for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure is shown.
[0107] The device 800 may include: a target user representation generation module 810, which is used to generate a target user representation of the target user based on the target user's historical content item sequence; a cross-domain behavior sequence set extraction module 820, which is used to extract a cross-domain behavior sequence set from the log of the network application; a cross-domain sequence representation set generation module 830, which is used to generate a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set; a similar sequence representation set retrieval module 840, which is used to retrieve a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set; and an interaction probability set prediction module 850, which is used to predict the interaction probability set of the target user interacting with the candidate content item set based on the target user representation and the similar sequence representation set. In addition, the device 800 may also include any other module configured for sequence recommendation based on cross-domain behavior data according to the embodiments of the present disclosure as described above.
[0108] Fig. 9 Another exemplary device 900 for sequence recommendation based on cross-domain behavior data according to an embodiment of the present disclosure is shown.
[0109] The apparatus 900 may include: a processor 910; and a memory 920 storing computer executable instructions. When the computer executable instructions are executed, the processor 910 may: generate a target user representation of the target user based on the historical content item sequence of the target user, extract a cross-domain behavior sequence set from the log of the network application, generate a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set, retrieve a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set, and predict an interaction probability set of the target user interacting with a set of candidate content items based on the target user representation and the similar sequence representation set.
[0110] In one implementation, generating a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set may include: mapping the cross-domain behavior sequence set to a cross-domain content item sequence set through entity linking; and generating the cross-domain sequence representation set based on the cross-domain content item sequence set.
[0111] In one embodiment, retrieving a set of similar sequence representations that are similar to the target user representation may include: for each cross-domain sequence representation in the cross-domain sequence representation set, calculating a correlation score between the cross-domain sequence representation and the target user representation to obtain a set of correlation scores corresponding to the cross-domain sequence representation set; and retrieving the set of similar sequence representations from the cross-domain sequence representation set based on the set of correlation scores.
[0112] In one embodiment, predicting the set of interaction probabilities of the target user interacting with the set of candidate content items may include: generating a comprehensive context representation based on the target user representation, the set of similar sequence representations, and a set of correlation scores between the set of similar sequence representations and the target user representation; and predicting the set of interaction probabilities based on the target user representation and the comprehensive context representation.
[0113] The generating of the comprehensive context representation may include: for each similar sequence representation in the similar sequence representation set, generating a weighted sequence representation based on the target user representation and the similar sequence representation to obtain a weighted sequence representation set corresponding to the similar sequence representation set; and generating the comprehensive context representation based on the weighted sequence representation set and the relevance score set.
[0114] Generating a weighted sequence representation may include: for each content item representation in a group of content item representations corresponding to the similar sequence representation, calculating an attention weight corresponding to the content item representation based on the target user representation and the content item representation to obtain a set of attention weights corresponding to the group of content item representations; and generating the weighted sequence representation based on the set of attention weights and the group of content item representations.
[0115] In one embodiment, the target user representation may be generated by an encoder. The encoder may be trained using a sequence enhancement strategy and a momentum contrastive learning mechanism.
[0116] The training of the encoder may include: obtaining a training data set, the training data set including multiple initial content item sequences; for each initial content item sequence in the multiple initial content item sequences, using a sequence enhancement strategy and a momentum contrastive learning mechanism to generate a sub-contrastive learning prediction loss corresponding to the initial content item sequence to obtain multiple sub-contrastive learning prediction losses corresponding to the multiple initial content item sequences; generating a contrastive learning prediction loss based on the multiple sub-contrastive learning prediction losses; and training the encoder by minimizing the contrastive learning prediction loss.
[0117] The generating of the sub-contrastive learning prediction loss corresponding to the initial content item sequence may include: executing two sequence enhancement strategies on the initial content item sequence to obtain two enhanced content item sequences; generating two enhanced user representations corresponding to the two enhanced content item sequences; extracting a previous cross-domain sequence representation set from a memory bank, wherein the previous cross-domain sequence representation set is generated based on the cross-domain behavior sequence set; obtaining other enhanced user representation sets corresponding to other initial content item sequences in the training data set; and generating the sub-contrastive learning prediction loss based on the two enhanced user representations, the previous cross-domain sequence representation set and the other enhanced user representation set.
[0118] It should be understood that the processor 910 may also execute any other steps / processes of the method for sequence recommendation based on cross-domain behavior data according to the embodiments of the present disclosure as described above.
[0119] The embodiment of the present disclosure proposes a computer program product for sequence recommendation based on cross-domain behavior data, including a computer program, which is executed by a processor to: generate a target user representation of the target user based on the historical content item sequence of the target user; extract a cross-domain behavior sequence set from the log of the network application; generate a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set; retrieve a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set; and predict a set of interaction probabilities of the target user interacting with a set of candidate content items based on the target user representation and the similar sequence representation set. In addition, the computer program can also be executed to implement any other steps / processes of the method for sequence recommendation based on cross-domain behavior data according to the embodiment of the present disclosure as described above.
[0120] Embodiments of the present disclosure may be embodied in a computer-readable medium. The computer-readable medium may include instructions that, when executed, cause the processor to: generate a target user representation of the target user based on the target user's historical content item sequence; extract a cross-domain behavior sequence set from the log of the network application; generate a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set; retrieve a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set; and predict a set of interaction probabilities of the target user interacting with the candidate content item set based on the target user representation and the similar sequence representation set. In addition, when executed, the instructions may also cause the processor to perform any other steps / processes of the method for sequence recommendation based on cross-domain behavior data according to the embodiments of the present disclosure as described above.
[0121] It should be understood that all operations in the above-described methods are merely exemplary, and the present disclosure is not limited to any operations in the methods or the order of these operations, but should cover all other equivalent transformations under the same or similar concepts. In addition, unless otherwise specified or it is clear from the context that it is directed to a singular form, the articles "a" and "an" as used in this specification and the appended claims should generally be interpreted as meaning "one" or "one or more".
[0122] It should also be understood that all modules in the above described device can be implemented in various ways. These modules can be implemented as hardware, software, or a combination thereof. In addition, any module in these modules can be further divided into submodules or combined together functionally.
[0123] Processors have been described in conjunction with various devices and methods. These processors can be implemented using electronic hardware, computer software or any combination thereof. Whether these processors are implemented as hardware or software will depend on specific application and the overall design constraints imposed on the system. As an example, the processor provided in the present disclosure, any part of the processor or any combination of processors can be implemented using a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a state machine, a gated logic unit, a discrete hardware circuit, and other suitable processing components configured to perform the various functions described in the present disclosure. The function of the processor provided in the present disclosure, any part of the processor or any combination of processors can be implemented using software executed by a microprocessor, a microcontroller, a DSP or other suitable platforms.
[0124] Software should be broadly considered to mean instructions, instruction sets, codes, code segments, program codes, programs, subroutines, software modules, applications, software applications, software packages, routines, subroutines, objects, running threads, processes, functions, etc. Software can reside in a computer-readable medium. A computer-readable medium can include, for example, a memory, which can be, for example, a magnetic storage device (e.g., a hard disk, a floppy disk, a magnetic stripe), an optical disk, a smart card, a flash memory device, a random access memory (RAM), a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), a register, or a removable disk. Although the memory is shown as being separated from the processor in the multiple aspects provided in the present disclosure, the memory can also be located inside the processor, such as a cache or a register.
[0125] The above description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. Therefore, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described in this disclosure that are known or to be known to those of ordinary skill in the art are expressly incorporated herein and covered by the claims.
Claims
1. A method for sequence recommendation based on cross-domain behavior data, comprising: generating a target user representation of the target user based on a historical content item sequence of the target user; Extract cross-domain behavior sequence sets from network application logs; Generate a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set; Retrieving a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set; as well as Based on the target user representation and the set of similar sequence representations, a set of interaction probabilities of the target user interacting with a set of candidate content items is predicted.
2. The method according to claim 1, wherein: The generating a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set comprises: Mapping the cross-domain behavior sequence set to a cross-domain content item sequence set through entity linking; and The cross-domain sequence representation set is generated based on the cross-domain content item sequence set.
3. The method according to claim 1, wherein: The retrieving a similar sequence representation set that is similar to the target user representation comprises: For each cross-domain sequence representation in the cross-domain sequence representation set, calculating a correlation score between the cross-domain sequence representation and the target user representation to obtain a correlation score set corresponding to the cross-domain sequence representation set; and The set of similar sequence representations is retrieved from the set of cross-domain sequence representations based on the set of correlation scores.
4. The method according to claim 1, wherein: The interaction probability set of predicting the target user's interaction with the candidate content item set includes: generating a comprehensive context representation based on the target user representation, the set of similar sequence representations, and a set of relevance scores between the set of similar sequence representations and the target user representation; and The set of interaction probabilities is predicted based on the target user representation and the comprehensive context representation.
5. The method according to claim 4, wherein: Generating a comprehensive context representation comprises: For each similar sequence representation in the similar sequence representation set, generating a weighted sequence representation based on the target user representation and the similar sequence representation to obtain a weighted sequence representation set corresponding to the similar sequence representation set; and The comprehensive context representation is generated based on the set of weighted sequence representations and the set of relevance scores.
6. The method according to claim 5, wherein: Generating a weighted sequence representation comprises: For each content item representation in a set of content item representations corresponding to the similar sequence representation, calculating an attention weight corresponding to the content item representation based on the target user representation and the content item representation to obtain a set of attention weights corresponding to the set of content item representations; and The weighted sequence representation is generated based on the set of attention weights and the set of content item representations.
7. The method according to claim 1, wherein: The target user representation is generated by an encoder, and the encoder is trained using a sequence augmentation strategy and a momentum contrastive learning mechanism.
8. The method according to claim 7, wherein: The training of the encoder includes: Obtaining a training data set, the training data set comprising a plurality of initial content item sequences; For each initial content item sequence in the plurality of initial content item sequences, using a sequence enhancement strategy and a momentum contrastive learning mechanism, generating a sub-contrastive learning prediction loss corresponding to the initial content item sequence to obtain a plurality of sub-contrastive learning prediction losses corresponding to the plurality of initial content item sequences; generating a contrastive learning prediction loss based on the plurality of sub-contrastive learning prediction losses; and The encoder is trained by minimizing the contrastive learning prediction loss.
9. The method according to claim 8, wherein: Generating a sub-contrastive learning prediction loss corresponding to the initial content item sequence comprises: executing two sequence enhancement strategies on the initial content item sequence to obtain two enhanced content item sequences; generating two enhanced user representations corresponding to the two enhanced content item sequences; Extracting a previous cross-domain sequence representation set from a memory bank, wherein the previous cross-domain sequence representation set is generated based on the cross-domain behavior sequence set; Obtaining other enhanced user representation sets corresponding to other initial content item sequences in the training data set; and The sub-contrastive learning prediction loss is generated based on the two enhanced user representations, the previous cross-domain sequence representation set and the other enhanced user representation set.
10. The method according to claim 1, wherein: The set of candidate content items includes at least one of movies, videos, books, music, news, recipes, and product information.
11. A device for sequence recommendation based on cross-domain behavior data, comprising: processor; as well as a memory storing computer executable instructions that, when executed, cause the processor to: generating a target user representation of the target user based on a historical content item sequence of the target user, Extract cross-domain behavior sequence sets from network application logs, generating a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set, Retrieving a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set, and Based on the target user representation and the set of similar sequence representations, a set of interaction probabilities of the target user interacting with a set of candidate content items is predicted.
12. The device according to claim 11, wherein The generating a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set comprises: Mapping the cross-domain behavior sequence set to a cross-domain content item sequence set through entity linking; and The cross-domain sequence representation set is generated based on the cross-domain content item sequence set.
13. The device according to claim 11, wherein: The retrieving a similar sequence representation set that is similar to the target user representation comprises: For each cross-domain sequence representation in the cross-domain sequence representation set, calculating a correlation score between the cross-domain sequence representation and the target user representation to obtain a correlation score set corresponding to the cross-domain sequence representation set; and The set of similar sequence representations is retrieved from the set of cross-domain sequence representations based on the set of correlation scores.
14. The device according to claim 11, wherein: The interaction probability set of predicting the target user's interaction with the candidate content item set includes: generating a comprehensive context representation based on the target user representation, the set of similar sequence representations, and a set of relevance scores between the set of similar sequence representations and the target user representation; and The set of interaction probabilities is predicted based on the target user representation and the comprehensive context representation.
15. The device according to claim 14, wherein: Generating a comprehensive context representation comprises: For each similar sequence representation in the similar sequence representation set, generating a weighted sequence representation based on the target user representation and the similar sequence representation to obtain a weighted sequence representation set corresponding to the similar sequence representation set; and The comprehensive context representation is generated based on the set of weighted sequence representations and the set of relevance scores.
16. The device according to claim 15, wherein: Generating a weighted sequence representation comprises: For each content item representation in a set of content item representations corresponding to the similar sequence representation, calculating an attention weight corresponding to the content item representation based on the target user representation and the content item representation to obtain a set of attention weights corresponding to the set of content item representations; and The weighted sequence representation is generated based on the set of attention weights and the set of content item representations.
17. The device according to claim 11, wherein: The target user representation is generated by an encoder, and the encoder is trained using a sequence augmentation strategy and a momentum contrastive learning mechanism.
18. The device according to claim 17, wherein: The training of the encoder includes: Obtaining a training data set, the training data set comprising a plurality of initial content item sequences; For each initial content item sequence in the plurality of initial content item sequences, using a sequence enhancement strategy and a momentum contrastive learning mechanism, generating a sub-contrastive learning prediction loss corresponding to the initial content item sequence to obtain a plurality of sub-contrastive learning prediction losses corresponding to the plurality of initial content item sequences; generating a contrastive learning prediction loss based on the plurality of sub-contrastive learning prediction losses; and The encoder is trained by minimizing the contrastive learning prediction loss.
19. The device according to claim 18, wherein: Generating a sub-contrastive learning prediction loss corresponding to the initial content item sequence comprises: executing two sequence enhancement strategies on the initial content item sequence to obtain two enhanced content item sequences; generating two enhanced user representations corresponding to the two enhanced content item sequences; Extracting a previous cross-domain sequence representation set from a memory bank, wherein the previous cross-domain sequence representation set is generated based on the cross-domain behavior sequence set; Obtaining other enhanced user representation sets corresponding to other initial content item sequences in the training data set; and The sub-contrastive learning prediction loss is generated based on the two enhanced user representations, the previous cross-domain sequence representation set and the other enhanced user representation set.
20. A computer-readable medium for sequence recommendation based on cross-domain behavior data, comprising instructions that, when executed, cause a processor to: generating a target user representation of the target user based on a historical content item sequence of the target user; Extract cross-domain behavior sequence sets from network application logs; Generate a cross-domain sequence representation set corresponding to the cross-domain behavior sequence set; Retrieving a similar sequence representation set similar to the target user representation from the cross-domain sequence representation set; as well as Based on the target user representation and the set of similar sequence representations, a set of interaction probabilities of the target user interacting with a set of candidate content items is predicted.
