A click-through rate prediction method based on heterogeneous behaviors within a session

By constructing a click-through rate prediction model based on heterogeneous behavior within a session, and utilizing attention mechanisms and Bi-LSTM to capture the dependencies between users inside and outside the session, the problem of single user behavior types in recommendation systems is solved, and more accurate interest prediction and click-through rate prediction are achieved.

CN114529077BActive Publication Date: 2024-10-29HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210137611.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-15
Publication Date
2024-10-29
Estimated Expiration
2042-02-15

AI Technical Summary

Technical Problem

In existing recommendation systems, user behavior types are too homogeneous, ignoring the impact of heterogeneous user behavior within the same session on user interests, leading to inaccurate interest predictions.

Method used

By constructing a click-through rate (CTR) prediction model based on heterogeneous behaviors within a session, the model utilizes an attention mechanism to calculate the influence weights of different types of behaviors, and captures intra-session and inter-session dependencies using Bi-LSTM to extract user interest representations for accurate CTR prediction.

Benefits of technology

It improves the accuracy of user interest prediction and the effectiveness of ad click-through rate prediction, thereby enhancing the precision of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529077B_ABST
    Figure CN114529077B_ABST
Patent Text Reader

Abstract

The present invention proposes a click rate prediction method based on heterogeneous behaviors within a session, obtains a user information data set, a project information data set and a user behavior sequence data set, pre-processes the three data sets respectively, and divides them into a training set and a test set; constructs a click rate prediction model based on heterogeneous behaviors within a session; trains the constructed click rate prediction model based on heterogeneous behaviors within a session; inputs the personal information of the user to be recommended, the project information to be recommended and the behavior sequence of the user to be recommended into the trained click rate prediction model based on heterogeneous behaviors within a session, calculates the click rate of the user to the target project, sorts the projects according to the click rate, and recommends the sorted project list to the user; the present invention simultaneously considers the influence of multiple heterogeneous behaviors between users and projects on the user's interests, uses the attention mechanism to calculate the influence weights of different types of behaviors on the interests, and extracts the user's interests more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of click rate prediction, and in particular, relates to a click rate prediction method based on heterogeneous behaviors within a session. Background Art

[0002] With the continuous development of information technology, the exponential increase in the number of users and information on the Internet has caused information overload. More and more technologies tend to use the historical interaction information between users and projects to understand the interests of each user, so as to provide users with personalized recommendation services. The sequential recommendation system is different from the traditional collaborative filtering and content-based filtering recommendation systems. It considers and captures the user's behavior sequence, the interaction between users and projects, user preferences, and the evolution of project popularity over time. Therefore, the sequential recommendation can more accurately express the user's contextual information, intentions, goals, and project consumption trends, so as to make more accurate predictions and recommendations. The sequential recommendation system mainly recommends projects that users may be interested in by modeling the interaction between users and projects in the sequence. Compared with the traditional recommendation system, the characteristic of the sequential recommendation system is that it mainly predicts the user's interest based on the user's historical interaction information, and the user's own information and the project's own information are only part of the auxiliary information. However, the effective information contained in the user's historical interaction information is limited, and it is impossible to intuitively express the user's interests and intentions. Therefore, the sequential recommendation system needs to predict the user's real interests and make targeted recommendations based on the user preferences expressed by the limited user-project interaction sequence.

[0003] Traditional recommendation systems tend to learn from only a single type of user-item interaction behavior when learning user representations due to the lack of support from related technologies. For example, in the CTR prediction task, only the interaction behavior of users clicking on items is considered. However, in the real world, the interaction between users and items is not just a simple click-and-browse behavior, but also includes other types of behaviors. For example, when shopping online, users usually browse multiple products in sequence for comparison, collect or add the favorite products to the shopping cart, and then purchase one or several of them. The products that users compare usually belong to the same category, while the multiple products that are finally purchased usually complement each other in terms of functions and belong to different categories. Therefore, there are more complex dependencies in sessions with multiple behavior types. That is, dependencies exist not only in the same type of interaction (such as browsing), but also in different types of interactions (such as browsing and purchasing). At the same time, the multiple products purchased by the final user are the embodiment of different interests of the user in the same session. And this multi-type heterogeneous behavior implies more complex dependencies.

[0004] Wang et al. proposed that using only the same type of user behavior for prediction has limitations and ignores the importance of information provided by other behaviors, which is important when the target behavior is sparse and important. They proposed a session-based multi-relational graph neural network model (MGNN-SPred) to construct all behavior sequences into a multi-relational term graph. In 2016, Twardowski incorporated the idea of ​​heterogeneous behaviors into the RNN-based model for the next item recommendation task. In 2019, You et al. proposed a model (HierTCN) that combines a temporal convolutional network with a GRU for next item prediction, and also added elements of heterogeneous behaviors.

[0005] In summary, the main problem with current research work is that the user behavior types used in recommendation systems are too single, and to some extent ignore the fact that the heterogeneous behaviors of users in the same session have different effects on the interests expressed by users in the session. Summary of the invention

[0006] The present invention aims at the problem that the user behavior type used in the recommendation system is too single, overcomes the shortcomings of the prior art, and proposes a click rate prediction method based on heterogeneous behaviors within a session; the present invention considers the multiple interests of users in the same session in the recommendation system, and divides the user's behavior sequence more accurately. At the same time, the influence of multiple heterogeneous behaviors between users and projects on user interests is considered, and the influence weight of different types of behaviors on interests is calculated using the attention mechanism, so as to more accurately extract the user's interests and more accurately calculate the click rate of the project exposed to the user.

[0007] The present invention is achieved through the following technical solutions:

[0008] A click-through rate prediction method based on heterogeneous behaviors within a session:

[0009] The method specifically comprises the following steps:

[0010] Step 1: Obtain user information dataset, project information dataset and user behavior sequence dataset, pre-process the three datasets respectively, and divide them into training set and test set;

[0011] Step 2: Build a click-through rate prediction model based on heterogeneous behaviors within a session;

[0012] Step 3: Train the click rate prediction model based on heterogeneous behaviors within the session constructed in step 2;

[0013] Step 4: Input the personal information of the user to be recommended, the information of the item to be recommended and the behavior sequence of the user to be recommended into the click-through rate prediction model based on intra-session heterogeneous behavior trained in step 3, calculate the user's click-through rate for the target item, sort the items according to the click-through rate, and recommend the sorted item list to the user.

[0014] Furthermore, in step 1, the following steps are specifically included:

[0015] Step 1.1: Extract user personal information including user ID, gender and age from the user personal information dataset;

[0016] Step 1.2: Extract item specific information including item id, seller id, brand id, category id and price from the item information dataset;

[0017] Step 1.3: Extract the user behavior sequence including the user ID of the interacting user, the ID of the interacted item, and the user's interaction type on the item from the user behavior sequence dataset;

[0018] Step 1.4: Preprocess the three datasets and divide them into training and test sets in a ratio of 8:2.

[0019] Furthermore, in step 2, the following steps are specifically included:

[0020] Step 2.1: Obtain the embedding vector of user information, item information, and user behavior sequence;

[0021] The user information embedding vector is represented as X U , the item information embedding vector is represented as X I , the user behavior sequence embedding vector is represented as S;

[0022] Step 2.2: Input the embedding vector S of the user behavior sequence obtained in step 2.1 into the behavior sequence segmentation processing layer, segment the behavior sequence into session sequence-1, and further segment the session sequence into session sequence-2 according to the behavior type and interaction item type. Use the attention mechanism to calculate the influence weight of each behavior type and form a weighted session sequence.

[0023] Step 2.3: Input the weighted session sequence formed in step 2.2 into the transformer encoding layer for interest extraction, capture the dependencies within the session, and output the interest sequence based on the dependencies within the session;

[0024] Step 2.4: Input the interest sequence based on intra-session dependency output in step 2.3 into a Bi-LSTM layer to further extract user interests, capture inter-session dependencies, and output interest sequences based on intra-session and inter-session dependencies.

[0025] Furthermore, in step 2.2,

[0026] The embedding vector S of the user behavior sequence is segmented into set time intervals, and the embedding vectors that do not contain the behavior sequence are filtered out to form the session sequence -1;

[0027] By further splitting each session sequence-1 into smaller sessions according to the categories of the interaction items, the embedding vector S of the user behavior sequence is finally divided into multiple sessions Q;

[0028] The kth session can be represented as Q k =[b1; ...; b i ;…;b T ], T is the session length, b i is the vector representation of the i-th interaction of a user in a session;

[0029] For each conversation sequence, the conversation is expressed as Q according to the four types of interactions between users and items. k =[B1; B2; B3; B4], the four interaction types are browsing, collecting, adding to shopping cart and purchasing; the behavior sequence of the kth behavior type is n k is the number of interactions with the kth behavior type, N k is the maximum number of interactions among the four behaviors. For each B k In arrive Fill with 0;

[0030] The weighted conversation sequence is to input the four behavior types into an attention layer, use the attention mechanism to calculate the influence factor of each behavior type, and calculate the influence factor α of the i-th behavior i ;

[0031] The formula is: Where W B is the training weight matrix;

[0032] The weighted behavior vector is: Finally, the weighted k sessions Q′ are output, and

[0033] Furthermore, in step 2.3,

[0034] First add a positional encoding BE for each session: BE (k,t,c) represents the bias term at the cth position of the embedding vector of the tth item in the kth session, is the bias term for the kth session, is the bias term of the t-th item, is the bias item at the cth position. The bias item is added to the session representation for updating. The updated session is: Q′=Q′+BE;

[0035] The multi-head self-attention mechanism is used to model this relationship, and Q′ k =[Q′ k1 ; ... ; Q′ kh ; ... ; Q′ kH ], where Q′ kh It is Q′ k The h-th head of , H is the number of heads, and the output of the h-th head is: head h =Attention(Q′ kh W Q , Q′ kh W K , Q′ kh W V ), where W Q , W K , W V They are all linear matrices. All the head outputs are connected and input into a feedforward neural network, whose output is: Where FFN is a feed-forward neural network, W O is a linear matrix;

[0036] Finally, after an average pooling operation, the interest sequence I is obtained k : It is input into an activation unit to calculate the weighted interest representation, which is calculated as follows:

[0037]

[0038]

[0039] Where W I is a linear matrix of dimension .

[0040] Further, in step 2.4, each hidden state of the Bi-LSTM is first calculated and an interest representation mixed with contextual information is formed: in and They are the hidden states of LSTM forward propagation and back propagation at the corresponding moments;

[0041] Then, each hidden state of the Bi-LSTM is calculated to form an interest representation mixed with context information, which is input into an activation unit to calculate the interest representation with weights and mixed with context information. The calculation method is as follows:

[0042]

[0043]

[0044] Where W H is a linear matrix of dimension .

[0045] Furthermore, in step 3, the following steps are specifically included:

[0046] Step 3.1: Input the data in the training set into the click rate prediction model based on intra-session heterogeneous behavior described in step 2 to obtain interest sequences based on intra-session dependencies and interest sequences based on intra-session and inter-session dependencies;

[0047] Step 3.2: Input the user information embedding representation, the item information embedding representation, the interest sequence based on intra-session dependency, and the interest sequence based on intra-session and inter-session dependency into the prediction module to obtain the user's click probability for the target item;

[0048] Step 3.3: Update the model parameters and optimize the loss function by calculating the error between the predicted click rate and the actual click rate, and train the optimal click rate prediction model based on heterogeneous behaviors within the session;

[0049] The loss function is specifically calculated as follows:

[0050]

[0051] where y c is the true value of the sample, is the predicted value.

[0052] Furthermore, in step 4, the click rates of the items are sorted, and the top k items with the highest scores are recommended to the user.

[0053] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0054] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps of any of the above methods are implemented.

[0055] Beneficial effects of the present invention

[0056] The present invention takes into account the multiple interests of users in the same session in the recommendation system, and divides the user's behavior sequence more accurately to improve the click-through rate prediction effect; at the same time, by considering the different impacts of heterogeneous behaviors in the same session on the user's interests in the session, not only the accuracy of user interest prediction is improved, but also the prediction effect of advertisement click-through rate is further improved.

[0057] The present invention takes into account the impact of various heterogeneous behaviors between users and projects on user interests, and uses the attention mechanism to calculate the impact weights of different types of behaviors on interests, so as to more accurately extract user interests and more accurately calculate the click-through rate of projects exposed to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of the method of the present invention;

[0059] Figure 2 A model framework diagram of the method of the present invention;

[0060] Figure 3 It is a partial structural diagram of the segmentation processing layer of the method of the present invention;

[0061] Figure 4 It is a partial structural diagram of the transformer coding layer of the method described in the present invention;

[0062] Figure 5 It is a partial structural diagram of the Bi-LSTM of the method described in the present invention;

[0063] Figure 6 This is a partial structural diagram of the final prediction of the method of the present invention. DETAILED DESCRIPTION

[0064] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] Combination Figures 1 to 6 .

[0066] A click-through rate prediction method based on heterogeneous behaviors within a session:

[0067] The method specifically comprises the following steps:

[0068] Step 1: Obtain user information dataset, project information dataset and user behavior sequence dataset, pre-process the three datasets respectively, and divide them into training set and test set;

[0069] Step 2: Build a click-through rate prediction model based on heterogeneous behaviors within a session;

[0070] Step 3: Train the click rate prediction model based on heterogeneous behaviors within the session constructed in step 2;

[0071] Step 4: Input the personal information of the user to be recommended, the information of the item to be recommended and the behavior sequence of the user to be recommended into the click-through rate prediction model based on intra-session heterogeneous behavior trained in step 3, calculate the user's click-through rate for the target item, sort the items according to the click-through rate, and recommend the sorted item list to the user.

[0072] In step 1, the following steps are specifically included:

[0073] Step 1.1: Extract user personal information including user ID, gender and age from the user personal information dataset;

[0074] Step 1.2: Extract item specific information including item id, seller id, brand id, category id and price from the item information dataset;

[0075] Step 1.3: Extract the user behavior sequence including the user ID of the interacting user, the ID of the interacted item, and the user's interaction type on the item from the user behavior sequence dataset;

[0076] Step 1.4: Preprocess the three datasets and divide them into training and test sets in a ratio of 8:2.

[0077] In step 2, the following steps are specifically included:

[0078] Step 2.1: Obtain the embedding vector of user information, item information, and user behavior sequence;

[0079] The sparse features of users and items are converted into low-dimensional dense vectors through embedding, where the user information embedding vector is represented as X U , the item information embedding vector is represented as X I , the user behavior sequence embedding vector is represented as S;

[0080] Step 2.2: Input the embedding vector S of the user behavior sequence obtained in step 2.1 into the behavior sequence segmentation processing layer, segment the behavior sequence into session sequence-1, and further segment the session sequence into session sequence-2 according to the behavior type and interaction item type. Use the attention mechanism to calculate the influence weight of each behavior type and form a weighted session sequence.

[0081] Step 2.3: Input the weighted session sequence formed in step 2.2 into the transformer encoding layer for interest extraction, capture the dependencies within the session, and output the interest sequence based on the dependencies within the session;

[0082] Step 2.4: Input the interest sequence based on intra-session dependency output in step 2.3 into a Bi-LSTM layer to further extract user interests, capture inter-session dependencies, and output interest sequences based on intra-session and inter-session dependencies.

[0083] In step 2.2,

[0084] The embedding vector S of the user behavior sequence is segmented at intervals of a set time, and the embedding vectors that do not contain the behavior sequence are filtered out to form a session sequence-1; the set time is preferably 30 minutes;

[0085] By further splitting each session sequence-1 into smaller sessions according to the categories of the interaction items, the embedding vector S of the user behavior sequence is finally divided into multiple sessions Q;

[0086] The kth session can be represented as Q k =[b1; ...; b i ;…;b T ], T is the session length, b i is the vector representation of the i-th interaction of a user in a session;

[0087] For each conversation sequence, the conversation is expressed as Q according to the four types of interactions between users and items. k =[B1; B2; B3; B4], the four interaction types are browsing, collecting, adding to shopping cart and purchasing; the behavior sequence of the kth behavior type is n k is the number of interactions with the kth behavior type, N k is the maximum number of interactions among the four behaviors. For each B k In arrive Fill with 0;

[0088] The weighted conversation sequence is to input the four behavior types into an attention layer, use the attention mechanism to calculate the influence factor of each behavior type, and calculate the influence factor α of the i-th behavior i ;

[0089] The formula is: Where W B is the training weight matrix;

[0090] The weighted behavior vector is: Finally, the weighted k sessions Q′ are output, and

[0091] In step 2.3,

[0092] First add a positional encoding BE for each session: BE (k,t,c) represents the bias term at the cth position of the embedding vector of the tth item in the kth session, is the bias term for the kth session, is the bias term of the t-th item, is the bias item at the cth position. The bias item is added to the session representation for updating. The updated session is: Q′=Q′+BE;

[0093] The multi-head self-attention mechanism is used to model this relationship, and Q′ k =[Q′ k1 ; ... ; Q′ kh ; ... ; Q′ kH ], where Q′ kh It is Q′ k The h-th head of , H is the number of heads, and the output of the h-th head is: head h =Attention(Q′ kh W Q , Q′ kh W K , Q′ kh W V ), where W Q , W K , W V They are all linear matrices. All the head outputs are connected and input into a feedforward neural network, whose output is: Where FFN is a feed-forward neural network, W O is a linear matrix;

[0094] Finally, after an average pooling operation, the interest sequence I is obtained k : It is input into an activation unit to calculate the weighted interest representation, which is calculated as follows:

[0095]

[0096]

[0097] Where W I is a linear matrix of dimension .

[0098] In step 2.4, each hidden state of the Bi-LSTM is first calculated and the interest representation mixed with context information is formed: in and They are the hidden states of LSTM forward propagation and back propagation at the corresponding moments;

[0099] Then, each hidden state of the Bi-LSTM is calculated to form an interest representation mixed with context information, which is input into an activation unit to calculate the interest representation with weights and mixed with context information. The calculation method is as follows:

[0100]

[0101]

[0102] Where W H is a linear matrix of dimension .

[0103] In step 3, the following steps are specifically included:

[0104] Step 3.1: Input the data in the training set into the click rate prediction model based on intra-session heterogeneous behavior described in step 2 to obtain interest sequences based on intra-session dependencies and interest sequences based on intra-session and inter-session dependencies;

[0105] Step 3.2: Input the user information embedding representation, the item information embedding representation, the interest sequence based on intra-session dependency, and the interest sequence based on intra-session and inter-session dependency into the prediction module to obtain the user's click probability for the target item;

[0106] For user U and item I to be recommended, the prediction module described in step 3.2 embeds the information of user a into vector X U , the information embedding vector X of the recommended item I , interest sequence U based on intra-session dependency I and the interest sequence U based on intra-session and inter-session dependencies H The data is spliced ​​horizontally and input into the MLP layer with RELU as the activation function, and then the softmax function is used to calculate the probability of the user clicking the target item.

[0107] Step 3.3: Update the model parameters and optimize the loss function by calculating the error between the predicted click rate and the actual click rate, and train the optimal click rate prediction model based on heterogeneous behaviors within the session;

[0108] The loss function is specifically calculated as follows:

[0109]

[0110] where y c is the true value of the sample, is the predicted value.

[0111] In step 4, the click rates of the items are sorted, and the top k items with the highest scores are recommended to the user.

[0112] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0113] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps of any of the above methods are implemented.

[0114] The above is a detailed introduction to the multimodal sentiment analysis method based on contrastive learning and multi-head self-attention mechanism proposed in the present invention, and the principles and implementation methods of the present invention are explained. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A click rate prediction method based on heterogeneous behaviors within a session, characterized by: The method specifically comprises the following steps: Step 1: Obtain user information dataset, project information dataset and user behavior sequence dataset, pre-process the three datasets respectively, and divide them into training set and test set; Step 2: Build a click-through rate prediction model based on heterogeneous behaviors within a session; Step 2.1: Obtain the embedding vector of user information, item information, and user behavior sequence; The user information embedding vector is represented as X U , the item information embedding vector is represented as X I , the user behavior sequence embedding vector is represented as S; Step 2.2: Input the embedding vector S of the user behavior sequence obtained in step 2.1 into the behavior sequence segmentation processing layer, segment the behavior sequence into session sequence-1, and further segment the session sequence into session sequence-2 according to the behavior type and interaction item type. Use the attention mechanism to calculate the influence weight of each behavior type and form a weighted session sequence. Step 2.3: Input the weighted session sequence formed in step 2.2 into the transformer encoding layer for interest extraction, capture the dependencies within the session, and output the interest sequence based on the dependencies within the session; First add a positional encoding BE for each session: BE (k,t,c) represents the bias term at the cth position of the embedding vector of the tth item in the kth session, is the bias term for the kth session, is the bias term of the t-th item, is the bias item at the cth position. The bias item is added to the session representation for updating. The updated session is: Q′=Q′+BE; The multi-head self-attention mechanism is used to model this relationship, and Q′ k =[Q′ k1 ; ... ; Q′ kh ; ... ; Q′ kH ], where Q′ kh It is Q′ k The h-th head of , H is the number of heads, and the output of the h-th head is: head h =Attention(Q′ kh W Q , Q′ kh W K , Q′ kh W V ), where W Q , W K , W V They are all linear matrices. All the head outputs are connected and input into a feedforward neural network, whose output is: Where FFN is a feed-forward neural network, W O is a linear matrix; Finally, after an average pooling operation, the interest sequence I is obtained k : It is input into an activation unit to calculate the weighted interest representation, which is calculated as follows: Where W I is a linear matrix of dimension ; Step 2.4: Input the interest sequence based on intra-session dependency output in step 2.3 into a Bi-LSTM layer to further extract user interests, capture inter-session dependencies, and output interest sequences based on intra-session and inter-session dependencies; In step 2.4, each hidden state of the Bi-LSTM is first calculated and the interest representation mixed with context information is formed: in and They are the hidden states of LSTM forward propagation and back propagation at the corresponding moments; Then, each hidden state of the Bi-LSTM is calculated to form an interest representation mixed with context information, which is input into an activation unit to calculate the interest representation with weights and mixed with context information. The calculation method is as follows: Where W H is a linear matrix of dimension ; Step 3: Train the click rate prediction model based on heterogeneous behaviors within the session constructed in step 2; Step 4: Input the personal information of the user to be recommended, the information of the item to be recommended and the behavior sequence of the user to be recommended into the click-through rate prediction model based on intra-session heterogeneous behavior trained in step 3, calculate the user's click-through rate for the target item, sort the items according to the click-through rate, and recommend the sorted item list to the user.

2. The method according to claim 1, characterized in that: In step 1, the following steps are specifically included: Step 1.1: Extract user personal information including user ID, gender and age from the user personal information dataset; Step 1.2: Extract item specific information including item id, seller id, brand id, category id and price from the item information dataset; Step 1.3: Extract the user behavior sequence including the user ID of the interacting user, the ID of the interacted item, and the user's interaction type on the item from the user behavior sequence dataset; Step 1.4: Preprocess the three datasets and divide them into training and test sets in a ratio of 8:

2.

3. The method according to claim 2, characterized in that: In step 2.2, The embedding vector S of the user behavior sequence is segmented into set time intervals, and the embedding vectors that do not contain the behavior sequence are filtered out to form the session sequence -1; By further splitting each session sequence-1 into smaller sessions according to the categories of the interaction items, the embedding vector S of the user behavior sequence is finally divided into multiple sessions Q; The kth session can be represented as Q k =[b1; ...; b i ;…;b T ], T is the session length, b i is the vector representation of the i-th interaction of a user in a session; For each conversation sequence, the conversation is expressed as Q according to the four types of interactions between users and items. k =[B1; B2; B3; B4], the four interaction types are browsing, collecting, adding to shopping cart and purchasing; the behavior sequence of the kth behavior type is n k is the number of interactions with the kth behavior type, N k is the maximum number of interactions among the four behaviors. For each B k In arrive Fill with 0; The weighted conversation sequence is to input the four behavior types into an attention layer, use the attention mechanism to calculate the influence factor of each behavior type, and calculate the influence factor α of the i-th behavior i ; The formula is: Where W B is the training weight matrix; The weighted behavior vector is: Finally, the weighted k sessions Q′ are output, and 4. The method according to claim 3, characterized in that: In step 3, the following steps are specifically included: Step 3.1: Input the data in the training set into the click rate prediction model based on intra-session heterogeneous behavior described in step 2 to obtain interest sequences based on intra-session dependencies and interest sequences based on intra-session and inter-session dependencies; Step 3.2: Input the user information embedding representation, the item information embedding representation, the interest sequence based on intra-session dependency, and the interest sequence based on intra-session and inter-session dependency into the prediction module to obtain the user's click probability for the target item; Step 3.3: Update the model parameters and optimize the loss function by calculating the error between the predicted click rate and the actual click rate, and train the optimal click rate prediction model based on heterogeneous behaviors within the session; The loss function is specifically calculated as follows: where y c is the true value of the sample, is the predicted value.

5. The method according to claim 4, characterized in that: In step 4, the click rates of the items are sorted, and the top k items with the highest scores are recommended to the user.

6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium for storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Recommendation model construction method, device and equipment

    CN110569428A

  • Interest recommendation method and system based on user sequence click behavior

    CN110807156A