A method and device for modeling a sequence recommendation model

Through feature gating models and causal effect calculations, the problem of inaccurate item embedding caused by noise points in graph neural networks is solved, and the prediction accuracy of the sequential recommendation model is improved.

CN117743687BActive Publication Date: 2025-09-09SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311765397.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2025-09-09
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

The existing sequential recommendation algorithms based on graph neural networks suffer from inaccurate item embedding representations due to the presence of noise points, which affects the accuracy of recommendation predictions.

Method used

By obtaining user features and interactive item sequence features, using the feature gating model for aggregation calculation, combining the causal effect calculation formula and the Bayesian causal effect loss function, the sequence recommendation model is trained to improve the accuracy of item relationship learning.

Benefits of technology

The recommendation prediction accuracy of the sequential recommendation model is improved, which can more accurately learn the true relationship between items and improve the accuracy of downstream prediction tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117743687B_ABST
    Figure CN117743687B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for modeling a sequence recommendation model. This solution aggregates and calculates the relationship between user features and interactive item sequence features based on user features and interactive item sequence features through a preset feature gating model, learns the possibility of an item appearing in another item by aggregating the association information between the user and the item, and learns the user's attention to the item by aggregating the association information between the user and the item. Then, the input target item sequence is obtained to represent the user's current intention, and then combined with the causal effect calculation formula to obtain the factual prediction score and counterfactual causal score corresponding to the target item sequence. Combined with the Bayesian causal effect loss function, the parameters of the feature gating model are trained. After the training is completed, the sequence recommendation model can be obtained. The sequence recommendation model constructed according to this modeling method can accurately learn the true relationship between items, thereby improving the recommendation prediction accuracy of the sequence recommendation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for modeling a sequence recommendation model. Background Art

[0002] The purpose of recommendation algorithms is to help users select target data of interest from massive amounts of data. Many commercial products have begun to apply corresponding recommendation algorithms to help recommend their own products or services.

[0003] Existing sequential recommendation algorithms using graph neural networks require a predefined adjacency matrix according to certain rules, and this matrix remains unchanged during the learning process. However, due to the presence of "noise points" in the sequence, some items are not very relevant or even unrelated to the rest of the sequence. Therefore, existing sequential recommendation algorithms based on graph neural networks (GNNs) generate inaccurate item embedding representations when aggregating information using GNNs. This negatively impacts downstream prediction tasks, ultimately leading to a decrease in recommendation prediction accuracy. Summary of the Invention

[0004] The present application provides a method and device for modeling a sequence recommendation model, which is used to solve the technical problem of low recommendation prediction accuracy of existing sequence recommendation models.

[0005] To solve the above technical problems, the first aspect of the present application provides a method for modeling a sequence recommendation model, including:

[0006] Acquire a user set and historical interaction item data corresponding to the user set, and generate user features and interaction item sequence features based on the user set and the historical interaction item data respectively;

[0007] Based on the user features and the interactive item sequence features, a preset feature gating model is used to perform aggregation calculation on the relationship between the user features and the interactive item sequence features to obtain an aggregate feature;

[0008] Obtain an input target item sequence, combine the user features and the aggregated features, and combine them with a causal effect calculation formula to obtain a factual prediction score and a counterfactual causal score corresponding to the target item sequence;

[0009] According to the factual prediction score and the counterfactual causal score, the recommendation prediction score of the target item sequence is calculated, so as to train the parameters of the feature gating model according to the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequence recommendation model is formed based on the trained feature gating model.

[0010] Preferably, the aggregation calculation of the relationship between the user features and the interactive item sequence features is performed based on the user features and the interactive item sequence features through a preset feature gating model to obtain the aggregated features, specifically including:

[0011] Inputting the user features and the interactive item sequence features into a preset first feature gating sub-model, so as to determine the correlation between the user features and the interactive item sequence features through operation of the first feature gating sub-model, and obtain a first aggregated feature;

[0012] Inputting the first aggregated feature and the user feature into a preset second feature gating sub-model, so as to determine the correlation between the user feature and the first aggregated feature through operation of the second feature gating sub-model, thereby obtaining a second aggregated feature;

[0013] Perform pooling processing on the second aggregated features, and output the second aggregated features after the pooling processing.

[0014] Preferably, the first feature gating sub-model is specifically:

[0015]

[0016] Where, is the first aggregate feature of the lth sequence of the i-th user, The interaction item sequence features of the lth sequence of the i-th user, 、 are the network weights of the first feature gated sub-model, is the user feature of the i-th user, is the bias coefficient, is the activation function.

[0017] Preferably, the second feature gating sub-model is specifically:

[0018]

[0019] Where, is the second aggregate feature of the lth sequence of the i-th user, is the first aggregate feature of the lth sequence of the i-th user, 、 are the transpose of the network weights of the second feature gate sub-model, is the transpose of the user features of the i-th user, is the activation function.

[0020] Preferably, the causal effect calculation formula is specifically:

[0021]

[0022]

[0023]

[0024] Where, predict a score for the fact, is the counterfactual causal score, is the transpose of the user features of the i-th user, u is the feature of each user, is the jth column of the target item sequence, is the second aggregate feature after pooling, is the interactive item sequence feature The k-th column feature in is the activation function, the superscript T represents the matrix transpose, q is the feature embedding of the target item sequence, and Q is the target item sequence.

[0025] The second aspect of the present application further provides a sequence recommendation modeling device, comprising:

[0026] a feature data acquisition unit, configured to acquire a user set and historical interaction item data corresponding to the user set, and generate user features and interaction item sequence features based on the user set and the historical interaction item data, respectively;

[0027] a feature aggregation processing unit configured to perform aggregation calculation on the relationship between the user features and the interactive item sequence features based on the user features and the interactive item sequence features through a preset feature gating model to obtain an aggregated feature;

[0028] A sequence score calculation unit is used to obtain an input target item sequence, combine the user features and the aggregated features, and use a causal effect calculation formula to obtain a factual prediction score and a counterfactual causal score corresponding to the target item sequence;

[0029] A sequence recommendation model construction unit is used to calculate the recommendation prediction score of the target item sequence based on the fact prediction score and the counterfactual causal score, so as to train the parameters of the feature gating model based on the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequence recommendation model is formed based on the trained feature gating model.

[0030] Preferably, the feature aggregation processing unit is specifically used to:

[0031] Inputting the user features and the interactive item sequence features into a preset first feature gating sub-model, so as to determine the correlation between the user features and the interactive item sequence features through operation of the first feature gating sub-model, and obtain a first aggregated feature;

[0032] Inputting the first aggregated feature and the user feature into a preset second feature gating sub-model, so as to determine the correlation between the user feature and the first aggregated feature through operation of the second feature gating sub-model, thereby obtaining a second aggregated feature;

[0033] Perform pooling processing on the second aggregated features, and output the second aggregated features after the pooling processing.

[0034] Preferably, the first feature gating sub-model is specifically:

[0035]

[0036] Where, is the first aggregate feature of the lth sequence of the i-th user, The interaction item sequence features of the lth sequence of the i-th user, 、 are the network weights of the first feature gated sub-model, is the user feature of the i-th user, is the bias coefficient, is the activation function.

[0037] Preferably, the second feature gating sub-model is specifically:

[0038]

[0039] Where, is the second aggregate feature of the lth sequence of the i-th user, is the first aggregate feature of the lth sequence of the i-th user, 、 are the transpose of the network weights of the second feature gate sub-model, is the transpose of the user features of the i-th user, is the activation function.

[0040] Preferably, the causal effect calculation formula is specifically:

[0041]

[0042]

[0043]

[0044] Where, predict a score for the fact, is the counterfactual causal score, is the transpose of the user features of the i-th user, u is the feature of each user, is the jth column of the target item sequence, is the second aggregate feature after pooling, is the interactive item sequence feature The k-th column feature in is the activation function, the superscript T represents the matrix transpose, q is the feature embedding of the target item sequence, and Q is the target item sequence.

[0045] It can be seen from the above technical solutions that this application has the following advantages:

[0046] The technical solution provided by this application first obtains user sets and the historical interaction item data corresponding to these user sets. Based on user features and interaction item sequence features, a preset feature gating model is used to aggregate the relationship between user features and interaction item sequence features to obtain aggregated features. The likelihood of an item appearing near another item is learned by aggregating the association information between users and items to learn the user's attention to the items. Then, a target item sequence is input to represent the user's current intent. The user features and the aggregated features are combined with a causal effect calculation formula to obtain the factual prediction score and counterfactual causal score corresponding to the target item sequence. The causal recommendation logic is used to distinguish the impact of the user's current intent and past interaction items on the prediction. Finally, a recommendation prediction score for the target item sequence is calculated based on the factual prediction score and counterfactual causal score. The parameters of the feature gating model are trained according to the recommendation prediction score and the Bayesian causal effect loss function. After training, a sequential recommendation model can be obtained. The sequential recommendation model constructed according to the modeling method provided by this application can accurately learn the true relationship between items and can model more accurate item embedding representations for the next prediction task, thereby improving the recommendation prediction accuracy of the sequential recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0048] Figure 1 This is a flowchart of an embodiment of a sequence recommendation modeling method provided in this application.

[0049] Figure 2 This is a logical block diagram of an embodiment of a sequence recommendation modeling method provided in this application.

[0050] Figure 3 This is a schematic diagram of a specific flow chart of step 102 of an embodiment of a sequence recommendation modeling method provided in this application.

[0051] Figure 4 This is a structural diagram of an embodiment of a sequence recommendation modeling device provided in this application. DETAILED DESCRIPTION

[0052] Existing sequential recommendation algorithms using graph neural networks require a predefined adjacency matrix according to certain rules, and this matrix remains unchanged during the learning process. However, due to the presence of "noise" in the sequence, some items are not very relevant or even unrelated to the rest of the sequence. Therefore, existing graph neural network-based sequential recommendation algorithms, when aggregating information using graph neural networks, produce inaccurate item embedding representations, negatively impacting downstream prediction tasks. For example, given a user's subsequence (MacBook, iPhone, Bread, iPad, Apple Pencil), it's easy to see that the user's local interest in this subsequence is concentrated on electronics. The next item might be "AirPods" or an Apple product accessory, which in turn depends on "MacBook," "iPhone," "iPad," and "Apple Pencil," but has no relationship with "Bread." The connections between "Bread" and other items negatively impact the learned item embeddings and fail to effectively capture the user's true interests.

[0053] The embodiments of the present application provide a method and device for modeling a sequence recommendation model, which are used to solve the technical problem of low recommendation prediction accuracy of existing sequence recommendation models.

[0054] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0055] First, a detailed description of an embodiment of a sequence recommendation modeling method provided by this application is as follows:

[0056] See also Figure 1This embodiment provides a method for modeling a sequence recommendation model, including:

[0057] Step 101: Obtain a user set and historical interaction item data corresponding to the user set, and generate user features and interaction item sequence features based on the user set and the historical interaction item data respectively;

[0058] It should be noted that according to the modeling method provided in this embodiment, a user set and the historical interaction item data corresponding to the user set are obtained. The task of sequence recommendation is to take the historical interaction sequence of users and items as input and predict the next item that the user will interact with. Represents a collection of users, represents a collection of items, where and Represent the number of users and items respectively. According to the above symbols, the goal of sequential recommendation is to u In this case, the probability of predicting the next item can be expressed as the probability of modeling all possible items. Then, data feature extraction is performed on the user set and historical interaction item data respectively to obtain user features and interaction item sequence features.

[0059] Step 102: Based on the user features and the interactive item sequence features, a preset feature gating model is used to perform aggregation calculation on the relationship between the user features and the interactive item sequence features to obtain aggregate features.

[0060] It should be noted that in step 102, based on the user features and interactive item sequence features obtained in the previous step, these features are used as inputs of the feature gating model, and the relationship between the user features and the interactive item sequence features is aggregated and calculated, so that the feature gating model is used to aggregate the association information before the items to learn the possibility of one item appearing near another item. At the same time, the association information between users and items is aggregated to learn the user's attention to the items.

[0061] More specifically, the feature gating model mentioned in this embodiment includes two parts, such as Figure 3 As shown, in step 102, the relationship between user features and interactive item sequence features is aggregated and calculated using a preset feature gating model to obtain aggregate features. Specifically, the process may include:

[0062] Step 1021: Input the user features and the interactive item sequence features into a preset first feature gating sub-model, so as to determine the correlation between the user features and the interactive item sequence features through the operation of the first feature gating sub-model, and obtain a first aggregated feature.

[0063] Step 1022: Input the first aggregated features and the user features into a preset second feature gating sub-model, so as to determine the correlation between the user features and the first aggregated features through the operation of the second feature gating sub-model, and obtain a second aggregated feature.

[0064] Step 1023: perform pooling processing on the second aggregated features, and output the second aggregated features after the pooling processing.

[0065] It should be noted that the personalized feature gating model based on the graph neural network is used to learn the relationship between items and users; the instance gating model is used to learn the correlation features between items; the two gating models are used to aggregate the correlation information between items to learn the possibility of an item appearing near another item, and at the same time, aggregate the correlation information between users and items to learn the user's attention to the items. Input sequence embedding matrix and user feature representation, including: Initialize user embedding representation as , where R refers to the dimension, R d This indicates that this is a d-dimensional vector, where d is the embedding dimension, and the embedding representation is obtained through the feature embedding function. The item embedding matrix of the l-th sequence of the i-th user is ,in , d is the dimension of embedding, L is the number of sequences, is the kth column of the embedding matrix;

[0066] Among them, the expression of the first feature gate sub-model is:

[0067]

[0068] Where, is the first aggregate feature of the lth sequence of the i-th user, The interaction item sequence features of the lth sequence of the i-th user, 、 are the network weights of the first feature gated sub-model, is the user feature of the i-th user, is the learnable bias coefficient, is the activation function.

[0069] The second feature gate sub-model is specifically:

[0070]

[0071] Where, is the second aggregate feature of the lth sequence of the i-th user, is the first aggregate feature of the lth sequence of the i-th user, 、 are the transpose of the network weights of the second feature gate sub-model, is the transpose of the user features of the i-th user, is the activation function.

[0072] Next, for the second aggregate feature Perform pooling processing and output the second aggregated feature after pooling processing .

[0073] It should be noted that according to the project instance embedding representation, the features are filtered through the pooling operation to obtain the filtered embedding representation: This process is expressed as:

[0074]

[0075] in, is the feature embedding after pooling, This is a pooling operation, which can be maximum pooling or average pooling.

[0076] Step 103: Obtain the input target item sequence, combine the user features and the aggregated features, and use the causal effect calculation formula to obtain the factual prediction score and counterfactual causal score corresponding to the target item sequence.

[0077] Step 104: Calculate the recommendation prediction score of the target item sequence based on the factual prediction score and the counterfactual causal score, and train the parameters of the feature gating model based on the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequence recommendation model is formed based on the trained feature gating model.

[0078] It should be noted that in steps 103 and 104 of this embodiment, the input target item sequence Q is obtained, and the fact prediction score and counterfactual causal score corresponding to the target item sequence are obtained. The relationship scores between the items are calculated to capture the relationship between the items:

[0079]

[0080] in, is the target item feature embedding, d is the dimension of the feature embedding, N is the number of items in the target sequence, and the feature embedding converts the input target item sequence into a multidimensional embedding representation Q through the embedding vector lookup table. yes The jth column in .

[0081] Based on the target item sequence, combined with user features and aggregate features, the fact prediction score is calculated. The specific calculation formula is: According to the prediction score and representation, the prediction score of the fact can be expressed as:

[0082]

[0083]

[0084] The aforementioned prediction score , k is the aggregate feature , i is the target sequence feature Q, u is the user feature, is the user feature score, expressed as:

[0085]

[0086] Where u is the user embedding, is the jth column of the target item sequence Q;

[0087] By using the causal effect, the counterfactual causal score is calculated, since the counterfactual removes the influence of the comprehensive material factors, such as Figure 2 As shown in the figure, U is the user, H is the user's historical interaction sequence, K is the comprehensive material feature of the aggregated user and historical interaction sequence, I is the target sequence, and Y is the final predicted score. The figure describes how different factors in each causal effect affect the final score Y. The mathematical formula of this process can be expressed as:

[0088]

[0089] in, is the counterfactual causal score, which represents the prediction score when k does not exist in the corresponding counterfactual case, i represents the predicted item sequence, j represents the negative sample used, and k* represents the situation where the influence of k does not exist in the corresponding counterfactual world.

[0090] Prediction score based on the facts obtained in the previous step and counterfactual causal scores , calculate the recommendation prediction score Y of the target item sequence CSR , the calculation formula is: , where c is a pre-set hyperparameter.

[0091] Next, the parameters of the feature gating model are trained based on the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequential recommendation model is formed based on the trained feature gating model.

[0092] Among them, the expression of the Bayesian causal effect loss function is:

[0093]

[0094] Specifically, α is a hyperparameter, and l is the Bayesian personalized ranking objective function.

[0095] The technical solution provided in this embodiment first obtains user sets and historical interaction item data corresponding to these user sets. Based on user features and interaction item sequence features, a preset feature gating model is used to aggregate the relationship between user features and interaction item sequence features to obtain aggregated features. The likelihood of an item appearing near another item is learned by aggregating the association information between users and items to learn the user's attention to the items. Then, a target item sequence is input to represent the user's current intent. The user features and aggregated features are combined with a causal effect calculation formula to obtain the factual prediction score and counterfactual causal score corresponding to the target item sequence. The causal recommendation logic is used to distinguish the impact of the user's current intent and past interaction items on the prediction. Finally, a recommendation prediction score for the target item sequence is calculated based on the factual prediction score and counterfactual causal score. The parameters of the feature gating model are trained based on the recommendation prediction score and the Bayesian causal effect loss function. After training, a sequential recommendation model is obtained. The sequential recommendation model constructed according to the modeling method provided in this application can accurately learn the true relationship between items and can model a more accurate item embedding representation for the next prediction task, thereby improving the recommendation prediction accuracy of the sequential recommendation model.

[0096] The above is a detailed description of an embodiment of a sequence recommendation model modeling method provided by this application. The following is a detailed description of an embodiment of a sequence recommendation model modeling device provided by this application.

[0097] See also Figure 4 This embodiment also provides a sequence recommendation modeling device, including:

[0098] The feature data acquisition unit 201 is used to acquire a user set and historical interaction item data corresponding to the user set, and generate user features and interaction item sequence features based on the user set and the historical interaction item data respectively;

[0099] The feature aggregation processing unit 202 is used to perform aggregation calculation on the relationship between the user features and the interactive item sequence features based on the user features and the interactive item sequence features through a preset feature gating model to obtain an aggregated feature;

[0100] The sequence score calculation unit 203 is used to obtain the input target item sequence, combine the user characteristics and the aggregated characteristics, and use the causal effect calculation formula to obtain the factual prediction score and counterfactual causal score corresponding to the target item sequence;

[0101] The sequence recommendation model construction unit 204 is used to calculate the recommendation prediction score of the target item sequence based on the factual prediction score and the counterfactual causal score, so as to train the parameters of the feature gating model based on the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequence recommendation model is formed based on the trained feature gating model.

[0102] Preferably, the feature aggregation processing unit 202 is specifically configured to:

[0103] Inputting the user features and the interactive item sequence features into a preset first feature gating sub-model, so as to determine the correlation between the user features and the interactive item sequence features through the operation of the first feature gating sub-model, and obtain a first aggregated feature;

[0104] Inputting the first aggregated feature and the user feature into a preset second feature gating sub-model, so as to determine the correlation between the user feature and the first aggregated feature through the operation of the second feature gating sub-model, thereby obtaining a second aggregated feature;

[0105] Perform pooling processing on the second aggregated features, and output the second aggregated features after the pooling processing.

[0106] Preferably, the first feature gating sub-model is specifically:

[0107]

[0108] Where, is the first aggregate feature of the lth sequence of the i-th user, The interaction item sequence features of the lth sequence of the i-th user, 、 are the network weights of the first feature gated sub-model, is the user feature of the i-th user, is the bias coefficient, is the activation function.

[0109] Preferably, the second feature gating sub-model is specifically:

[0110]

[0111] Where, is the second aggregate feature of the lth sequence of the i-th user, is the first aggregate feature of the lth sequence of the i-th user, 、 are the transpose of the network weights of the second feature gate sub-model, is the transpose of the user features of the i-th user, is the activation function.

[0112] Preferably, the causal effect calculation formula is specifically:

[0113]

[0114]

[0115]

[0116] Where, Predict scores for facts, is the counterfactual causal score, is the transpose of the user features of the i-th user, u is the feature of each user, is the jth column of the target item sequence, is the second aggregate feature after pooling, is the interactive item sequence feature The k-th column feature in is the activation function, the superscript T represents the matrix transpose, q is the feature embedding of the target item sequence, and Q is the target item sequence.

[0117] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the terminals, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0119] The terms "first," "second," "third," "fourth," and the like (if any) in the specification of the present application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present application described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.

[0120] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0121] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0122] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0123] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0124] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for modeling a sequence recommendation model, characterized in that: include: Acquire a user set and historical interaction item data corresponding to the user set, and generate user features and interaction item sequence features based on the user set and the historical interaction item data respectively; Based on the user features and the interactive item sequence features, a preset feature gating model is used to perform aggregation calculation on the relationship between the user features and the interactive item sequence features to obtain an aggregate feature; Obtain an input target item sequence, combine the user features and the aggregated features, and combine them with a causal effect calculation formula to obtain a factual prediction score and a counterfactual causal score corresponding to the target item sequence; According to the factual prediction score and the counterfactual causal score, the recommendation prediction score of the target item sequence is calculated, so as to train the parameters of the feature gating model according to the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequence recommendation model is formed based on the trained feature gating model.

2. A sequential recommendation modeling method according to claim 1, characterized in that: The aggregation calculation of the relationship between the user features and the interactive item sequence features is performed based on the user features and the interactive item sequence features through a preset feature gating model to obtain the aggregated features, specifically including: Inputting the user features and the interactive item sequence features into a preset first feature gating sub-model, so as to determine the correlation between the user features and the interactive item sequence features through operation of the first feature gating sub-model, and obtain a first aggregated feature; Inputting the first aggregated feature and the user feature into a preset second feature gating sub-model, so as to determine the correlation between the user feature and the first aggregated feature through operation of the second feature gating sub-model, thereby obtaining a second aggregated feature; Perform pooling processing on the second aggregated features, and output the second aggregated features after the pooling processing.

3. A sequential recommendation modeling method according to claim 2, characterized in that: The first feature gating sub-model is specifically: ; Where, is the first aggregate feature of the lth sequence of the i-th user, The interaction item sequence features of the lth sequence of the i-th user, 、 are the network weights of the first feature gated sub-model, is the user feature of the i-th user, is the bias coefficient, is the activation function.

4. A sequential recommendation modeling method according to claim 2, characterized in that: The second feature gating sub-model is specifically: ; Where, is the second aggregate feature of the lth sequence of the i-th user, is the first aggregate feature of the lth sequence of the i-th user, 、 are the transpose of the network weights of the second feature gate sub-model, is the transpose of the user features of the i-th user, is the activation function.

5. A sequential recommendation modeling method according to claim 2, characterized in that: The causal effect calculation formula is specifically: ; ; ; Where, predict a score for the fact, is the counterfactual causal score, is the transpose of the user features of the i-th user, u is the feature of each user, is the jth column of the target item sequence, is the second aggregate feature after pooling, is the interactive item sequence feature The k-th column feature in is the activation function, the superscript T represents the matrix transpose, q is the feature embedding of the target item sequence, and Q is the target item sequence.

6. A sequence recommendation modeling device, characterized in that: include: a feature data acquisition unit, configured to acquire a user set and historical interaction item data corresponding to the user set, and generate user features and interaction item sequence features based on the user set and the historical interaction item data, respectively; a feature aggregation processing unit configured to perform aggregation calculation on the relationship between the user features and the interactive item sequence features based on the user features and the interactive item sequence features through a preset feature gating model to obtain an aggregated feature; A sequence score calculation unit is used to obtain an input target item sequence, combine the user features and the aggregated features, and use a causal effect calculation formula to obtain a factual prediction score and a counterfactual causal score corresponding to the target item sequence; A sequence recommendation model construction unit is used to calculate the recommendation prediction score of the target item sequence based on the fact prediction score and the counterfactual causal score, so as to train the parameters of the feature gating model based on the recommendation prediction score and the Bayesian causal effect loss function. When the preset training conditions are met, a sequence recommendation model is formed based on the trained feature gating model.

7. A sequential recommendation modeling device according to claim 6, characterized in that: The feature aggregation processing unit is specifically used to: Inputting the user features and the interactive item sequence features into a preset first feature gating sub-model, so as to determine the correlation between the user features and the interactive item sequence features through operation of the first feature gating sub-model, and obtain a first aggregated feature; Inputting the first aggregated feature and the user feature into a preset second feature gating sub-model, so as to determine the correlation between the user feature and the first aggregated feature through operation of the second feature gating sub-model, thereby obtaining a second aggregated feature; Perform pooling processing on the second aggregated features, and output the second aggregated features after the pooling processing.

8. A sequential recommendation modeling device according to claim 7, characterized in that: The first feature gating sub-model is specifically: ; Where, is the first aggregate feature of the lth sequence of the i-th user, The interaction item sequence features of the lth sequence of the i-th user, 、 are the network weights of the first feature gated sub-model, is the user feature of the i-th user, is the bias coefficient, is the activation function.

9. The sequential recommendation modeling device according to claim 7, characterized in that: The second feature gating sub-model is specifically: ; Where, is the second aggregate feature of the lth sequence of the i-th user, is the first aggregate feature of the lth sequence of the i-th user, 、 are the transpose of the network weights of the second feature gate sub-model, is the transpose of the user features of the i-th user, is the activation function.

10. The sequential recommendation modeling device according to claim 7, characterized in that: The causal effect calculation formula is specifically: ; ; ; Where, predict a score for the fact, is the counterfactual causal score, is the transpose of the user features of the i-th user, u is the feature of each user, is the jth column of the target item sequence, is the second aggregate feature after pooling, is the interactive item sequence feature The k-th column feature in is the activation function, the superscript T represents the matrix transpose, q is the feature embedding of the target item sequence, and Q is the target item sequence.

Citation Information

Patent Citations

  • Method for constructing sequence recommendation model and sequence recommendation method

    CN113762477A

  • Recommending device, method, and program

    JP2011154591A