Item recommendation method based on probability distribution

Through the item recommendation method based on probability distribution, the Gaussian distribution represents uncertain embedding representation and auxiliary information characteristics extracted by BERT, combined with the Wasserstein distance calculation of user preferences, the deterministic embedding representation and data sparseness problems in the existing recommendation method are solved. Achieve more accurate recommendation results.

CN114817705BActive Publication Date: 2025-02-07ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210307685.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-02-07
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

Existing recommendation methods rely on deterministic user and item embedding representations, making it difficult to accurately predict user preferences, and due to the sparseness of user historical behavior data, it is difficult for the recommendation system to make full use of auxiliary information.

Method used

Using the item recommendation method based on probability distribution, by obtaining user feedback data and comment text, the user-item rating matrix and comment vector are generated, auxiliary information features are extracted using the BERT model, and uncertainty embedding representation is expressed through Gaussian distribution, combined with Wasserstein distance Calculate user preferences for items.

Benefits of technology

It improves the accuracy of the recommendation results, makes full use of auxiliary information, and reduces the reduction in recommendation accuracy due to the sparseness of behavioral data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817705B_ABST
    Figure CN114817705B_ABST
Patent Text Reader

Abstract

The present invention discloses an item recommendation method based on probability distribution, comprising: obtaining user feedback data and processing it to obtain a user-item rating matrix; obtaining user comment text and processing it to obtain user comment sentences and item comment sentences; obtaining comment vectors through user comment sentences and item comment sentences; inputting the user-item rating matrix and comment vectors into a recommendation model and training it through triplet loss; inputting information of the user to be predicted into the trained recommendation model to obtain a recommendation result. The item recommendation method based on probability distribution of the present invention not only focuses on the problem of uncertainty in the representation of users and items in the recommendation system, but also considers the extended use of auxiliary information by the model, so that the recommendation result is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an item recommendation method based on probability distribution. Background Art

[0002] Nowadays, the Internet is full of a large number of items that we are interested in and those that we are not interested in. It is very difficult to select the small number of items that we are interested in. In order to reduce information overload and meet users' diverse item needs, personalized recommendation systems play an increasingly important role.

[0003] At present, the embedding representations of users and items learned by a large number of recommendation methods are deterministic. However, relying solely on deterministic embedding representations is likely to lead to incorrect predictions of user preferences. In addition, due to the sparsity of user historical behavior data, recommendation methods should take into account various auxiliary information in the recommendation system as much as possible, such as user comments, attributes, or item description information. Including this information can make the recommendation system rely on more comprehensive information when recommending items, reducing the decline in recommendation accuracy due to the sparsity of behavior data. Summary of the invention

[0004] The present invention provides an item recommendation method based on probability distribution to solve the above-mentioned technical problems, and specifically adopts the following technical solutions:

[0005] An item recommendation method based on probability distribution, comprising:

[0006] Obtain user feedback data and process it to obtain a user-item rating matrix;

[0007] Obtain user comment text and process it to obtain user comment sentences and item comment sentences;

[0008] Get the review vector through user review sentences and item review sentences;

[0009] The user-item rating matrix and review vector are input into the recommendation model and trained using triplet loss.

[0010] Input the information of the user to be predicted into the trained recommendation model to obtain the recommendation result.

[0011] Furthermore, the feedback data includes implicit feedback data and explicit feedback data.

[0012] Furthermore, the feedback data is the user's click data on the item.

[0013] Furthermore, the specific method of obtaining user feedback data and processing it to obtain the user-item rating matrix is ​​as follows:

[0014] Get the user's click data on the item;

[0015] Extract users whose number of clicked items is greater than a preset value and items clicked by users greater than a preset value;

[0016] The user-item rating matrix is ​​calculated based on the extracted users and items.

[0017] Furthermore, the specific method of obtaining the user comment text and processing it to obtain the user comment sentence and the item comment sentence is as follows:

[0018] Get all user comment text data;

[0019] Concatenate all comments of the same user to form a user comment document for each user;

[0020] Concatenate all reviews of the same item to form an item review document for each item;

[0021] The sentence segmentation tool is used to segment the user review document and the item review document into sentences to obtain user review sentences and item review sentences.

[0022] Furthermore, the specific method of obtaining the comment vector through the user comment sentence and the item comment sentence is:

[0023] Input the user comment sentence into the pre-trained BERT-large model to obtain the first user embedding representation of all user-related words;

[0024] Input the item review sentence into the pre-trained BERT-large model to obtain the first item embedding representation of all words related to the item;

[0025] Averaging the second dimensions of the first user embedding representation and the first item embedding representation to obtain a second user embedding representation and a second item embedding representation;

[0026] The second user embedding representation and the second item embedding representation are concatenated to obtain the user comment vector and the item comment vector.

[0027] Furthermore, in the process of inputting the user-item rating matrix and the comment vector into the recommendation model to train it through the triplet loss, the user distribution and the item distribution are first obtained through the user-item rating matrix and the comment vector.

[0028] Furthermore, both user distribution and item distribution are Gaussian distribution.

[0029] Furthermore, the specific method of obtaining user distribution and item distribution through the user-item rating matrix and comment vector is:

[0030] Each row of the user-item rating matrix is ​​concatenated with the corresponding user review vector, and then the user distribution corresponding to the user is obtained after passing through a multi-layer perceptron.

[0031] Each column of the user-item rating matrix is ​​concatenated with the corresponding item review vector, and then the item distribution corresponding to the item is obtained after passing it through a multi-layer perceptron.

[0032] Furthermore, the specific method of inputting the information of the user to be predicted into the trained recommendation model to obtain the recommendation result is:

[0033] The Wasserstein distance between users and items is calculated to represent the user's preference for items.

[0034] Sort items according to the value of Wasserstein distance;

[0035] A preset number of top ranked items are selected as recommendation results.

[0036] The benefit of the present invention lies in the provided item recommendation method based on probability distribution, which uses Gaussian distribution to represent the embedded representation of uncertainty, uses BERT to extract the features of auxiliary information, and calculates the user's preference for items through Wasserstein distance. It not only focuses on the problem of representation uncertainty of users and items in the recommendation system, but also considers the model's extended utilization of auxiliary information, making the recommendation results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of an item recommendation method based on probability distribution of the present invention. DETAILED DESCRIPTION

[0038] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] like Figure 1 The method for recommending items based on probability distribution of the present application is shown, which mainly includes: S1: obtaining user feedback data and processing it to obtain a user-item rating matrix. S2: obtaining user comment text data and processing it to obtain user comment sentences and item comment sentences. S3: obtaining comment vectors through user comment sentences and item comment sentences. S4: inputting the user-item rating matrix and comment vector into the recommendation model and training it through triplet loss. S5: inputting the information of the user to be predicted into the trained recommendation model to obtain the recommendation result. Through the above steps, the method for recommending items based on probability distribution of the present application not only focuses on the problem of uncertainty in the representation of users and items in the recommendation system, but also considers the extended use of auxiliary information by the model, so that the recommendation results are more accurate. The above steps are described in detail below.

[0040] For step S1: obtain user feedback data and process it to obtain a user-item rating matrix.

[0041] First, feedback data in the recommendation system is collected to obtain the user-item rating matrix.

[0042] Specifically, feedback data includes implicit feedback data and explicit feedback data. For implicit feedback data, for example, a user clicks on an item. If a user clicks on an item, then r ij =1. If not clicked. Then r ij = 0, where i represents the user and j represents the item. For displaying feedback data, such as the user's rating of the item. Optionally, if the full score is 5, if the user's rating of the item is greater than or equal to 4 points, then r ij =1, otherwise, r ij =0.

[0043] In this application, the feedback data refers to the user's click data on the item.

[0044] The specific method of obtaining user feedback data and processing it to obtain the user-item rating matrix is:

[0045] Get the user's click data on the item.

[0046] The users who clicked more items than the preset value and the items clicked by more users than the preset value are extracted. Specifically, the preset value is 5. That is, if the user clicked at least 5 items, the user is retained. Similarly, if the item is clicked by at least 5 users, the item is retained.

[0047] According to the extracted users and items, the user-item rating matrix R is obtained. ij ). Among them, r i* represents the i-th row of the user-item rating matrix R, r *j represents the j-th column of the user-item rating matrix R.

[0048] For step S2: user review text data is obtained and processed to obtain user review sentences and item review sentences.

[0049] The specific method of obtaining user comment text data and processing it to obtain user comment sentences and item comment sentences is:

[0050] Get all the user review text data in the recommendation system.

[0051] All comments of the same user are concatenated to form a user comment document for each user.

[0052] Concatenate all reviews for the same item to form an item review document for each item.

[0053] The sentence segmentation tool is used to segment the user review document and the item review document into sentences to obtain the user review sentence S i* ={s i1 ,s i2 ,...,s ig} and item review statement S *j ={s 1j ,s 2j ,...,s gj}. Among them, g is the number of sentences divided from related comments.

[0054] It is understandable that, in addition to user comment text data, other text-based auxiliary information can also be integrated into the model proposed by the present invention, such as item attributes or item description information. In this application, user comment text data is mainly used for detailed description.

[0055] For step S3: obtain the comment vector through the user comment sentence and the item comment sentence.

[0056] In this application, the specific method of obtaining the comment vector through the user comment sentence and the item comment sentence is:

[0057] The user comment statement S i* Input the pre-trained BERT-large model to get the first user embedding representation of all user-related words

[0058] The item review statement S *j Input the pre-trained BERT-large model to get the first item embedding representation of all words related to the item Among them, w represents the number of words in a sentence.

[0059] Embedding representation W for the first user i* and the first item embedding representation W *j The second dimension of is averaged, that is, the average of the embedding representations of all words in a sentence is used to represent the embedding representation of the sentence, thereby obtaining the second user embedding representation and the second item embedding representation

[0060] Concatenate the second user embedding representation Get the user comment vector v of 1*(g*1024) i . Concatenate the second item embedding representation Get the corresponding 1*(g*1024) item review vector vj .

[0061] For step S4: the user-item rating matrix and the review vector are input into the recommendation model and trained by triplet loss.

[0062] In order to express the uncertainty of users and items through embedding representation and improve the recommendation accuracy, the user potential factors and item potential factors involved in this application are expressed by probability distribution. In this application, both user distribution and item distribution are Gaussian distribution. That is, the information contained is expressed by the mean and covariance matrix. In addition, in order to reduce the complexity of the model and reduce the computational overhead, it is assumed that the dimensions of the potential factors are independent of each other, that is, the covariance matrix is ​​a diagonal matrix, which can be represented by a vector.

[0063] Specifically, in the process of inputting the user-item rating matrix and the comment vector into the recommendation model to train it through the triplet loss, the user distribution and item distribution are first obtained through the user-item rating matrix and the comment vector.

[0064] The specific method of obtaining user distribution and item distribution through user-item rating matrix and comment vector is:

[0065] Each row r of the user-item rating matrix R i* Respectively with the corresponding user comment vector v i After splicing, the user distribution E corresponding to the user is obtained through the multi-layer perceptron i (r i* ,v i )~N(μ i ,∑ i ), where μ i and∑ i denote the mean and covariance of the distribution of user i, E i represents the network for obtaining the distribution of user i, and N represents Gaussian distribution.

[0066] Each column r of the user-item rating matrix R *j Respectively with the corresponding item review vector v j After splicing, the corresponding item distribution E is obtained through the multi-layer perceptron j (r *j ,v j )~N(μ j ,∑ j ). Among them, μ j and∑ j They refer to the mean and covariance of the distribution of item j, E j represents the network for obtaining the distribution of item j, and N represents Gaussian distribution.

[0067] In this application, the model is trained and updated using the triplet loss. For example, the triplet Triplet(i, j, k) represents user i, item j, and item k, where the relationship is that user i likes item j but does not like item k, which is expressed by the formula d(i, j) < d(i, k). The corresponding triplet loss function is:

[0068] L(i, j, k) = [d(i, j) - d(i, k) + m] +

[0069] It means that when d(i, j) - d(i, k) + m < 0, L(i, j, k) = 0; otherwise, L(i, j, k) = d(i, j) - d(i, k) + m. This loss function will拉近 the distance between user i and item j and扩大 the distance between user i and item k. The distance between distributions is calculated by the square of the simplified Wasserstein distance.

[0070]

[0071] For step S5: Input the information of the user to be predicted into the trained recommendation model to obtain the recommendation result.

[0072] The specific method of inputting the information of the user to be predicted into the trained recommendation model to obtain the recommendation result is as follows:

[0073] Obtain the relevant data of this user, and after processing, input it into the recommendation model. The recommendation model represents the preference of the user for the item by calculating the Wasserstein distance between the user and the item. Then, sort the items according to the value of the Wasserstein distance. Finally, select the preset number of items with the top rankings as the recommendation result. The preset number can be specifically set as needed.

[0074] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art of this industry should understand that the above embodiments do not limit the present invention in any form. Any technical solutions obtained by using equivalent replacements or equivalent transformations fall within the protection scope of the present invention. It should be noted that the Chinese phrase "拉近" is translated as "拉近" here as it seems to be a misspelling in the original Chinese text. It might be intended to be "reduce" or "shorten". Also, "扩大" should be "increase" or "expand". The translation is adjusted according to the overall context for better understanding.

Claims

1. A method for recommending items based on probability distribution, characterized in that: Include: Obtain user feedback data and process it to obtain a user-item rating matrix; Obtain user review text data and process it to obtain user review sentences and item review sentences; Obtaining a comment vector through the user comment sentence and the item comment sentence; Inputting the user-item rating matrix and the review vector into a recommendation model and training it through a triplet loss; Input the information of the user to be predicted into the trained recommendation model to obtain the recommendation result; In the process of inputting the user-item rating matrix and the comment vector into the recommendation model and training it through the triplet loss, firstly, obtaining the user distribution and the item distribution through the user-item rating matrix and the comment vector; The user distribution and the item distribution are both Gaussian distributions; The specific method of obtaining the user distribution and the item distribution through the user-item rating matrix and the comment vector is: Each row of the user-item rating matrix is ​​concatenated with the corresponding user comment vector, and then the user distribution corresponding to the user is obtained after passing through a multi-layer perceptron; Each column of the user-item rating matrix is ​​concatenated with the corresponding item review vector, and then the item distribution corresponding to the item is obtained after passing through a multi-layer perceptron; The specific method of inputting the information of the user to be predicted into the trained recommendation model to obtain the recommendation result is: The Wasserstein distance between users and items is calculated to represent the user's preference for items. Sort the items according to the value of the Wasserstein distance; A preset number of top ranked items are selected as recommendation results.

2. The method for recommending items based on probability distribution according to claim 1, characterized in that: The feedback data includes implicit feedback data and explicit feedback data.

3. The method for recommending items based on probability distribution according to claim 2, characterized in that: The feedback data is the user's click data on the item.

4. The method for recommending items based on probability distribution according to claim 3, characterized in that: The specific method of obtaining user feedback data and processing it to obtain a user-item rating matrix is: Get the user's click data on the item; Extract users whose number of clicked items is greater than a preset value and items clicked by users greater than a preset value; The user-item rating matrix is ​​calculated based on the extracted users and items.

5. The method for recommending items based on probability distribution according to claim 1, characterized in that: The specific method of obtaining user comment text data and processing to obtain user comment sentences and item comment sentences is: Get all user comment text data; Concatenate all comments of the same user to form a user comment document for each user; Concatenate all reviews of the same item to form an item review document for each item; The user review document and the item review document are respectively divided into sentences by a sentence division tool to obtain the user review sentence and the item review sentence.

6. The method for recommending items based on probability distribution according to claim 5, characterized in that: The specific method of obtaining the comment vector through the user comment sentence and the item comment sentence is: Input the user comment sentence into the pre-trained BERT-large model to obtain the first user embedding representation of all user-related words; Input the item review sentence into the pre-trained BERT-large model to obtain the first item embedding representation of all words related to the item; Averaging the second dimensions of the first user embedding representation and the first item embedding representation to obtain a second user embedding representation and a second item embedding representation; The second user embedding representation and the second item embedding representation are concatenated to obtain a user comment vector and an item comment vector.