Article recommendation method and device based on comment text

By clustering and building a comment matrix of item review texts, the existing collaborative filtering recommendation algorithm relies on subjective ratings and high computational volume is solved, and high interpretation and high accuracy item recommendations are achieved.

CN119474519APending Publication Date: 2025-02-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410736733.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2025-02-18

Smart Images

  • Figure CN119474519A_ABST
    Figure CN119474519A_ABST
Patent Text Reader

Abstract

The invention provides an article recommendation method based on a comment text, relates to the technical field of artificial intelligence, and can be applied to the technical field of finance. The method comprises the following steps: acquiring comment text information of an article; the evaluation text information is clustered to generate K clusters, and K is an integer larger than or equal to 1; constructing a user comment matrix and an article comment matrix based on the K clusters; and performing article recommendation according to the user comment matrix or the article comment matrix. The invention further provides an article recommendation device and equipment based on the comment text, a storage medium and a program article.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the field of item recommendation technology, and more specifically to an item recommendation method, device, equipment, storage medium and program item based on review text. Background Art

[0002] With the development of the Internet, product recommendation algorithms have attracted the attention of Internet companies. The current mainstream collaborative filtering recommendation algorithms mainly include two aspects: user-based collaborative filtering recommendation algorithms, which recommend products that other users with similar interests like to users; and item-based collaborative filtering recommendation algorithms, which recommend items similar to items that users have liked before. However, collaborative recommendation algorithms are based on customer ratings, and customer rating standards are subjective. There are situations where customers actually like the same product, but conservative customers tend to give low scores when rating, while optimistic customers tend to give high scores; collaborative recommendation algorithms need to establish a customer and product rating matrix. As the number of users and product scale increases, the matrix sparsity and computational complexity will increase.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a method, apparatus, device, storage medium and program product for recommending items based on review text.

[0005] According to a first aspect of the present disclosure, a method for recommending items based on review text is provided, the method comprising:

[0006] Get the comment text information of the item;

[0007] Clustering the comment text information to generate K clusters, where K is an integer greater than or equal to 1;

[0008] Constructing a user review matrix and an item review matrix based on the K clusters; and

[0009] Item recommendations are made based on the user review matrix or the item review matrix.

[0010] According to an embodiment of the present disclosure, constructing a user review matrix and an item review matrix based on the K clusters includes:

[0011] Constructing a user review matrix based on the K clusters according to the user dimension; and

[0012] An item review matrix is ​​constructed based on the K clusters according to the item dimension.

[0013] According to an embodiment of the present disclosure, constructing a user review matrix based on the K clusters according to the user dimension includes:

[0014] Get all comment word vectors of each user in each cluster;

[0015] Determine the first center vector of each cluster according to the average distance formula; and

[0016] Construct a user review matrix based on the first center vectors of all users.

[0017] According to an embodiment of the present disclosure, constructing an item review matrix based on the K clusters according to the item dimension includes:

[0018] Get all the review word vectors for each item in each cluster;

[0019] Determine the second center vector of each cluster according to the average distance formula; and

[0020] Construct the item review matrix based on the second center vectors of all items.

[0021] According to an embodiment of the present disclosure, clustering the comment text information to generate K clusters includes:

[0022] Perform word segmentation on the review text based on the compression algorithm to establish a dictionary table;

[0023] Converting the words in the dictionary table into vectors by a word embedding algorithm; and

[0024] The vectors are clustered by a clustering algorithm to generate K clusters.

[0025] According to an embodiment of the present disclosure, performing a word segmentation operation on the comment text based on a compression algorithm to establish a dictionary table includes:

[0026] Preprocess the review text;

[0027] Applying compression algorithms to tokenize the preprocessed review text; and

[0028] The vocabulary set processed by the compression algorithm constitutes the dictionary table of the comment text.

[0029] According to an embodiment of the present disclosure, recommending items according to the user review matrix or the item review matrix includes:

[0030] Performing user collaborative filtering item recommendation according to the user review matrix; and

[0031] The item collaborative filtering item recommendation is performed according to the item review matrix.

[0032] According to an embodiment of the present disclosure, performing user collaborative filtering item recommendation according to the user review matrix includes:

[0033] Calculate the first similarity between the comment feature vector of each user in the user comment matrix and the comment feature vector of the target user;

[0034] Determining a similar user set according to the first similarity; and

[0035] User collaborative filtering item recommendation is performed based on the similar user set.

[0036] According to an embodiment of the present disclosure, performing collaborative filtering of items and recommending items according to the item review matrix includes:

[0037] Calculate the second similarity between the review feature vector of each item in the item review matrix and the review feature vector of the target item;

[0038] Determining a set of similar items according to the second similarity; and

[0039] The collaborative filtering of items is performed based on the similar item set to recommend items.

[0040] A second aspect of the present disclosure provides an item recommendation device based on review text, the device comprising:

[0041] The acquisition module is used to obtain the comment text information of the item;

[0042] A clustering module, used for clustering the comment text information to generate K clusters, where K is an integer greater than or equal to 1;

[0043] A review matrix construction module, used to construct a user review matrix and an item review matrix based on the K clusters; and

[0044] The item recommendation module is used to recommend items based on the user review matrix or the item review matrix.

[0045] According to an embodiment of the present disclosure, the review matrix construction module includes a first construction submodule and a second construction submodule.

[0046] A first construction submodule is used to construct a user comment matrix based on the K clusters according to the user dimension; and

[0047] The second construction submodule is used to construct an item review matrix based on the K clusters according to the item dimension.

[0048] According to an embodiment of the present disclosure, the first construction submodule includes a first acquisition unit, a first determination unit and a first construction unit.

[0049] The first acquisition unit is used to obtain all comment word vectors of each user in each cluster;

[0050] A first determining unit determines a first center vector of each cluster according to an average distance formula; and

[0051] The first construction unit is used to construct a user comment matrix according to the first central vectors of all users.

[0052] According to an embodiment of the present disclosure, the second construction submodule includes a second acquisition unit, a second determination unit and a second construction unit.

[0053] The second acquisition unit is used to obtain all comment word vectors of each item in each cluster;

[0054] A second determining unit, configured to determine a second center vector of each cluster according to an average distance formula; and

[0055] The second construction unit is used to construct an item review matrix according to the second central vectors of all items.

[0056] According to an embodiment of the present disclosure, the clustering module includes a dictionary table building submodule, a conversion submodule and a clustering submodule.

[0057] A dictionary table building submodule is used to perform word segmentation operations on the comment text based on a compression algorithm to build a dictionary table;

[0058] A conversion submodule, used to convert the vocabulary in the dictionary table into vectors through a word embedding algorithm; and

[0059] The clustering submodule is used to cluster the vectors by using a clustering algorithm to generate K clusters.

[0060] According to an embodiment of the present disclosure, the dictionary table building submodule includes a preprocessing unit, a word segmentation unit and a dictionary table building unit.

[0061] A preprocessing unit, used for preprocessing the comment text;

[0062] A word segmentation unit, used to apply a compression algorithm to segment the preprocessed review text; and

[0063] The dictionary table building unit is used to form a dictionary table of the comment text by using the vocabulary set processed by the compression algorithm.

[0064] According to an embodiment of the present disclosure, the item recommendation module includes a first sub-recommendation module and a second sub-recommendation module.

[0065] A first recommendation submodule, configured to perform user collaborative filtering item recommendations according to the user review matrix; and

[0066] The second recommendation submodule is used to perform collaborative filtering of item recommendations according to the item review matrix.

[0067] According to an embodiment of the present disclosure, the first recommendation submodule includes a first similarity calculation unit, a similar user set determination unit and a first recommendation unit.

[0068] A first similarity calculation unit, used to calculate a first similarity between a comment feature vector of each user in the user comment matrix and a comment feature vector of a target user;

[0069] a similar user set determining unit, configured to determine a similar user set according to the first similarity; and

[0070] The first recommendation unit is used to complete user collaborative filtering item recommendation based on the similar user set.

[0071] According to an embodiment of the present disclosure, the second recommendation submodule includes a second similarity calculation unit, a similar item set determination unit and a second recommendation unit.

[0072] A second similarity calculation unit, used to calculate a second similarity between a comment feature vector of each item in the item comment matrix and a comment feature vector of a target item;

[0073] a similar item set determining unit, configured to determine a similar item set according to the second similarity; and

[0074] The second recommendation unit is used to complete collaborative filtering of item recommendations based on the similar item set.

[0075] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned method for recommending items based on review text.

[0076] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned method for recommending items based on review texts.

[0077] The fifth aspect of the present disclosure also provides a computer program article, including a computer program, which implements the above-mentioned method for recommending items based on review text when executed by a processor.

[0078] According to an article recommendation method based on review text provided by an embodiment of the present disclosure, review text information of an article is obtained; the review text information is clustered to generate K clusters, where K is an integer greater than or equal to 1; a user review matrix and an article review matrix are constructed based on the K clusters; and article recommendations are made based on the user review matrix or the article review matrix. Compared with the related art, the method provided by an embodiment of the present disclosure constructs a user review matrix and an article review matrix by clustering analysis of user reviews, thereby forming a portrait system of two dimensions, namely, article reviews and user reviews, and the recommendation results have high interpretability and recommendation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0080] Figure 1 A diagram schematically shows an application scenario of a method, device, apparatus, storage medium, and program item for recommending items based on review text according to an embodiment of the present disclosure;

[0081] Figure 2 A flowchart of a method for recommending items based on review texts according to an embodiment of the present disclosure is schematically shown;

[0082] Figure 3 A flowchart of a method for clustering the comment text information provided according to another embodiment of the present disclosure is schematically shown;

[0083] Figure 4 A flowchart of a method for clustering the comment text information provided according to another embodiment of the present disclosure is schematically shown;

[0084] Figure 5 A flowchart of a method for constructing a user review matrix and an item review matrix based on the K clusters provided according to another embodiment of the present disclosure is schematically shown;

[0085] Figure 6 A flowchart of a method for constructing a user comment matrix based on the K clusters according to user dimensions provided by another embodiment of the present disclosure is schematically shown;

[0086] Figure 7 A flowchart of a method for constructing an item review matrix based on the K clusters according to item dimensions provided by another embodiment of the present disclosure is schematically shown;

[0087] Figure 8a A flowchart of a method for recommending items based on the user review matrix or the item review matrix provided according to another embodiment of the present disclosure is schematically shown;

[0088] Figure 8b A flowchart of a method for performing user collaborative filtering item recommendation based on the user review matrix provided according to another embodiment of the present disclosure is schematically shown;

[0089] Figure 8c A flowchart of a method for performing collaborative filtering and recommending items based on the item review matrix provided according to another embodiment of the present disclosure is schematically shown;

[0090] Fig. 9 A structural block diagram of a device for recommending items based on review text according to an embodiment of the present disclosure is schematically shown; and

[0091] Fig.10 A block diagram of an electronic device suitable for implementing a method for recommending items based on review text according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0092] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0093] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0094] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0095] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0096] With the development of the Internet, product recommendation algorithms have attracted the attention of Internet companies. The current mainstream collaborative filtering recommendation algorithms mainly include two aspects: user-based collaborative filtering recommendation algorithms, which recommend to users products that are similar to those liked by other users with similar interests; and item-based collaborative filtering recommendation algorithms, which recommend to users items similar to those they liked before. When performing user collaborative filtering, we first need to find a set of users with similar interests to the target user, and then find items that the user likes in the set. If the target user has not paid attention to the item, then recommend the item to the target user. Similarly, when performing item collaborative filtering, we first find a set of items similar to those that the target customer is interested in, and then filter out items that the customer has not paid attention to in the set, and form a recommendation list to push to the customer. When performing collaborative filtering recommendation, we need to first establish a rating matrix table for users and items. From the user dimension perspective, we can calculate the similarity between users and find a set of similar users. For example, assuming that the ratings of user 1 and user 2 for items 1-4 are highly similar, we can consider user 1 and user 2 to be a set of similar users. As for item 5, user 2 has not performed a rating operation before, so it can be recommended as a recommended product. Similarly, from the perspective of the item dimension, the similarity between items can be calculated to find a set of similar items. Assuming that item 3 and item 4 have a high similarity in the ratings of users 1-4, item 3 and item 4 can be considered a set of similar items. Since user 5 has rated item 3 but not item 4, item 4 can be recommended as a similar item to item 3.

[0097] However, the existing collaborative recommendation algorithms have the following disadvantages:

[0098] Since the collaborative recommendation algorithm is based on customer ratings, and customer rating criteria are subjective, there may be situations where customers actually like the same product to the same degree, but conservative customers tend to give low scores, while optimistic customers tend to give high scores. The collaborative recommendation algorithm needs to establish a customer and product rating matrix. As the number of users and product scale increases, the sparsity of the matrix and the amount of calculation will increase. The interpretability of the recommendation results is poor. Since it is only calculated based on the rating numbers, it is difficult to prove that this similarity calculation is reasonable.

[0099] Based on the above technical problems, an embodiment of the present disclosure provides an item recommendation method based on review text, the method comprising: obtaining review text information of an item; clustering the review text information to generate K clusters, where K is an integer greater than or equal to 1; constructing a user review matrix and an item review matrix based on the K clusters; and making item recommendations based on the user review matrix or the item review matrix.

[0100] Figure 1The application scenario diagram of the method, apparatus, device, storage medium and program product for recommending items based on review text according to an embodiment of the present disclosure is schematically shown.

[0101] like Figure 1 As shown, the application scenario 100 according to this embodiment may include an item recommendation scenario based on review text. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0102] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0103] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0104] Server 105 may be a backend server, which may execute the method for recommending items based on comment text provided in the embodiment of the present disclosure, obtain comment text information of items; cluster the comment text information to generate K clusters, where K is an integer greater than or equal to 1; construct a user comment matrix and an item comment matrix based on the K clusters; and recommend items based on the user comment matrix or the item comment matrix.

[0105] It should be noted that the method for recommending items based on comment text provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the device for recommending items based on comment text provided in the embodiment of the present disclosure can generally be set in the server 105. The method for recommending items based on comment text provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the device for recommending items based on comment text provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0106] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0107] It should be noted that the item recommendation method and device based on review text determined in the embodiments of the present disclosure can be used in the field of artificial intelligence technology, the field of financial technology, and any field other than the financial field. The application field of the item recommendation method and device based on review text determined in the embodiments of the present disclosure is not limited.

[0108] The following will be based on Figure 1 The application scenario described by Figure 2~Figure 8c The article recommendation method based on review text according to an embodiment of the present disclosure is described in detail.

[0109] Figure 2 The flowchart of a method for recommending items based on review text according to an embodiment of the present disclosure is schematically shown. Figure 2 As shown, the method for recommending items based on review texts in this embodiment includes operations S210 to S240, and the method can be executed by a server or other computing devices.

[0110] In operation S210, review text information of an item is obtained.

[0111] In operation S220 , the comment text information is clustered to generate K clusters, where K is an integer greater than or equal to 1.

[0112] In one example, a customer evaluation system is introduced into a product sales system to collect textual information about users’ comments on purchased items. The commentary text is the complete textual information of comments on all items. The commentary text is segmented and vectorized, and through a clustering algorithm, K clusters are found as the basis for subsequent customer and item similarity comparisons. Clustering can help identify groups of users with similar preferences, and each cluster can represent a specific theme or topic in the comments. For example, one cluster may contain all comments that mention “price”, while another cluster may contain all comments that mention “quality”. Clusters can also represent the sentiment of comments. For example, one cluster may contain comments with positive sentiments, while another cluster may contain comments with negative sentiments. Clusters may represent different features or attributes of a product. For example, for a mobile phone, one cluster may contain all comments about “camera quality”, while another cluster may contain comments about “battery life”. For the specific clustering process, please refer to Figure 3 and Figure 4 The operation steps are not repeated here.

[0113] In operation S230, a user review matrix and an item review matrix are constructed based on the K clusters.

[0114] In one example, according to the clustering information generated by operation S220, a user review matrix and an item review matrix are constructed according to the user dimension and the item dimension, respectively. The user review matrix is ​​a data structure that characterizes user reviews. In this matrix, each row represents a user, and each column represents a specific review feature or cluster. Each element in the matrix is ​​the central vector of the user review text vector, which is obtained by analyzing all the review texts of the user in a specific cluster. Similarly, the item review matrix is ​​a data structure that characterizes item reviews. In this matrix, each row represents an item, and each column represents a specific review feature or cluster. Each element in the matrix is ​​the central vector of the item review text vector, which is obtained by analyzing all the review texts about a specific item.

[0115] In operation S240, item recommendations are performed according to the user review matrix or the item review matrix.

[0116] In one example, the user review matrix can be used to calculate the similarity between users, thereby performing user-based collaborative filtering recommendations. By comparing the vectors of different users in the matrix, user groups with similar review patterns can be found. The item review matrix can be used to calculate the similarity between items, thereby performing item-based collaborative filtering recommendations. By comparing the vectors of different items in the matrix, items with similar review features can be found and recommended to users.

[0117] According to an article recommendation method based on review text provided by an embodiment of the present disclosure, review text information of an article is obtained; the review text information is clustered to generate K clusters, where K is an integer greater than or equal to 1; a user review matrix and an article review matrix are constructed based on the K clusters; and article recommendations are made based on the user review matrix or the article review matrix. Compared with the related art, the method provided by an embodiment of the present disclosure constructs a user review matrix and an article review matrix by clustering analysis of user reviews, thereby forming a portrait system of two dimensions, namely, article reviews and user reviews, and the recommendation results have high interpretability and recommendation accuracy.

[0118] Before constructing the user review matrix and item review matrix, a cluster analysis is first performed on the product review text. Figure 3 The flowchart of the method for clustering the comment text information provided according to another embodiment of the present disclosure is schematically shown. Figure 4 The flowchart of the method for clustering the comment text information provided according to another embodiment of the present disclosure is schematically shown. Figure 3 As shown, operation S220 includes operations S221 to S223.

[0119] In operation S221, a word segmentation operation is performed on the comment text based on a compression algorithm to establish a dictionary table.

[0120] like Figure 4 As shown, operation S221 includes operation S310 to operation S330.

[0121] In operation S310, the comment text is preprocessed;

[0122] In one example, all collected review texts are first preprocessed, including removing meaningless symbols and stop words, and converting all texts to a unified lowercase or uppercase form to reduce the complexity of word segmentation.

[0123] In operation S320 , a compression algorithm is applied to segment the preprocessed review text.

[0124] In one example, the Byte Pair Encoding (BEP) algorithm is used to segment the preprocessed text. BEP is an efficient compression algorithm that reduces redundancy in the data by iteratively merging the most common byte pairs to build a dictionary table.

[0125] In operation S330, the vocabulary set processed by the compression algorithm is used to form a dictionary table of the comment text.

[0126] In one example, the vocabulary set processed by the BEP algorithm constitutes a dictionary table of the comment text. This dictionary table will be used for subsequent text vectorization processing.

[0127] In operation S222, the words in the dictionary table are converted into vectors by a word embedding algorithm.

[0128] In one example, a suitable Embedding model is selected, such as the Skip-Gram model in word2vec, to convert each word in the dictionary table into a numerical vector. The Skip-Gram model is trained using the collected review text data. The input of the model is the sentence after word segmentation, and the output is the D-dimensional vector representation of each word. After the model training is completed, each word will correspond to a D-dimensional vector representation. These vectors can capture the semantic relationship between words and provide a basis for subsequent clustering and recommendation.

[0129] In operation S223, the vectors are clustered using a clustering algorithm to generate K clusters.

[0130] In one example, a clustering algorithm, such as the K-means algorithm, is selected to cluster the D-dimensional vectors of the vocabulary. The number of clusters K can be determined based on domain knowledge, the characteristics of the data set, or by experiments to determine the optimal K value. The selected clustering algorithm is used to perform clustering operations on the D-dimensional vectors of the vocabulary to obtain K clusters. The center point of each cluster is calculated. These center points are the average vectors of all vectors in the cluster and represent the characteristics of the cluster. In the clustering process, since the vectors generated by word2vec are more suitable for using cosine similarity to measure the similarity between vectors, cosine similarity is used as the distance metric in the clustering algorithm. The center point of each cluster will be used as a feature vector to describe users and items. These feature vectors will be used for subsequent customer and item similarity calculations and the construction of the recommendation system.

[0131] Combine the following Figure 5~Figure 7 The construction process of the user review matrix and the item review matrix in the embodiment of the present disclosure is introduced. Figure 5 A flowchart of a method for constructing a user review matrix and an item review matrix based on the K clusters provided according to another embodiment of the present disclosure is schematically shown. Figure 6 A flowchart of a method for constructing a user comment matrix based on the K clusters according to user dimensions provided in accordance with another embodiment of the present disclosure is schematically shown. Figure 7 A flowchart of a method for constructing an item review matrix based on the K clusters according to item dimensions provided in accordance with another embodiment of the present disclosure is schematically shown.

[0132] like Figure 5 As shown, operation S230 includes operation S231 to operation S232.

[0133] In operation S231, a user review matrix is ​​constructed based on the K clusters according to the user dimension.

[0134] like Figure 6 As shown, operation S231 includes operation S410 to operation S430.

[0135] In operation S410, all comment word vectors of each user in each cluster are obtained.

[0136] In operation S420, a first center vector of each cluster is determined according to an average distance formula.

[0137] In operation S430, a user comment matrix is ​​constructed according to the first central vectors of all users.

[0138] In one example, all comment word vectors of the user after clustering in the above operation are obtained, and the comment vector table W corresponding to each cluster K of user N is listed, as shown in Table 1 below.

[0139] Table 1 Comment vector table corresponding to each cluster K of user N

[0140]

[0141] The center vector Ck of each class is obtained through the average distance formula. Ck can be used as the final center vector result, or the actual vector closest to Ck can be found in the class as the final center vector result.

[0142]

[0143] Among them, N k is the number of all comment vectors of the current user under cluster k

[0144] In one example, the central feature vectors of all customers are combined and saved as the user review matrix A, as shown in Table 2.

[0145] Table 2 User review matrix A

[0146]

[0147] In operation S232, an item review matrix is ​​constructed based on the K clusters according to item dimensions.

[0148] like Figure 7 As shown, operation S232 includes operation S510 to operation S530.

[0149] In operation S510, all comment word vectors of each item in each cluster are obtained.

[0150] In operation S520, a second center vector of each cluster is determined according to an average distance formula.

[0151] In operation S530, an item review matrix is ​​constructed according to the second central vectors of all items.

[0152] In one example, the method and steps for constructing the item review matrix can refer to the construction process of the user review matrix mentioned above, which will not be repeated here.

[0153] Combination Figure 8a~Figure 8c The process of recommending items according to the user review matrix or the item review matrix in the embodiment of the present disclosure is introduced. Figure 8a A flowchart of a method for recommending items based on the user review matrix or the item review matrix provided according to another embodiment of the present disclosure is schematically shown; Figure 8b A flowchart of a method for performing user collaborative filtering item recommendation based on the user review matrix provided according to another embodiment of the present disclosure is schematically shown; Figure 8cA flowchart of a method for performing collaborative filtering of items and recommending items based on the item review matrix provided according to another embodiment of the present disclosure is schematically shown.

[0154] like Figure 8a As shown, operation S240 includes operation S241 to operation S242.

[0155] In operation S241, user collaborative filtering item recommendation is performed according to the user review matrix.

[0156] like Figure 8b As shown, operation S241 includes operation S2411 to operation S2413.

[0157] In operation S2411 , a first similarity between a comment feature vector of each user in the user comment matrix and a comment feature vector of a target user is calculated.

[0158] In operation S2412, a similar user set is determined according to the first similarity.

[0159] In operation S2413, user collaborative filtering item recommendation is completed based on the similar user set.

[0160] In one example, for target user i, the similarity between the comment feature vector Aj of each user j in the user comment matrix and the comment feature vector Ai of the target user is calculated, and the similar customer list can be obtained by arranging the results from large to small according to the similarity. The similarity between vectors Ai and Aj can be calculated using the following formula, that is, the similarity of each cluster center is calculated separately and then the average is calculated. The similarity formula of the cluster center can use the cosine similarity formula.

[0161]

[0162] In operation S242, collaborative filtering of items is performed according to the item review matrix.

[0163] like Figure 8c As shown, operation S242 includes operation S2421 to operation S2423.

[0164] In operation S2421, a second similarity between a review feature vector of each item in the item review matrix and a review feature vector of a target item is calculated.

[0165] In operation S2422, a similar item set is determined according to the second similarity.

[0166] In operation S2423, collaborative filtering of item recommendations is performed based on the similar item set.

[0167] In one example, as in the above-mentioned user collaborative filtering item recommendation method, a similar list of items can be obtained according to the above steps to complete the item collaborative filtering item recommendation. The specific process is the same as operation S2411 to operation S2413 and will not be repeated here.

[0168] Based on the above-mentioned method for recommending items based on review texts, the present disclosure also provides an apparatus for recommending items based on review texts. Fig. 9 The device is described in detail.

[0169] Fig. 9 The following schematically shows a structural block diagram of an item recommendation device based on review text according to an embodiment of the present disclosure. Fig. 9 As shown, the review text-based item recommendation device 700 of this embodiment includes an acquisition module 710 , a clustering module 720 , a review matrix construction module 730 and an item recommendation module 740 .

[0170] The acquisition module 710 is used to acquire the comment text information of the item. In one embodiment, the acquisition module 710 can be used to perform the operation S210 described above, which will not be described in detail here.

[0171] The clustering module 720 is used to cluster the comment text information to generate K clusters, where K is an integer greater than or equal to 1. In one embodiment, the clustering module 720 can be used to perform the operation S220 described above, which will not be described in detail here.

[0172] The review matrix construction module 730 is used to construct a user review matrix and an item review matrix based on the K clusters. In one embodiment, the review matrix construction module 730 can be used to perform the operation S230 described above, which will not be described in detail here.

[0173] The item recommendation module 740 is used to recommend items according to the user review matrix or the item review matrix. In one embodiment, the item recommendation module 740 can be used to perform the operation S240 described above, which will not be described in detail here.

[0174] According to an embodiment of the present disclosure, the review matrix construction module includes a first construction submodule and a second construction submodule.

[0175] The first construction submodule is used to construct a user comment matrix based on the K clusters according to the user dimension. In one embodiment, the first construction submodule can be used to perform the operation S231 described above, which will not be repeated here.

[0176] The second construction submodule is used to construct an item review matrix based on the K clusters according to the item dimension. In one embodiment, the second construction submodule can be used to perform the operation S232 described above, which will not be described in detail here.

[0177] According to an embodiment of the present disclosure, the first construction submodule includes a first acquisition unit, a first determination unit and a first construction unit.

[0178] The first acquisition unit is used to obtain all comment word vectors of each user under each cluster. In one embodiment, the first acquisition unit can be used to perform the operation S410 described above, which will not be repeated here.

[0179] The first determining unit determines the first center vector of each cluster according to the average distance formula. In one embodiment, the first determining unit can be used to perform the operation S420 described above, which will not be described in detail here.

[0180] The first construction unit is used to construct a user comment matrix according to the first central vectors of all users. In one embodiment, the first construction unit can be used to perform the operation S430 described above, which will not be described in detail here.

[0181] According to an embodiment of the present disclosure, the second construction submodule includes a second acquisition unit, a second determination unit and a second construction unit.

[0182] The second acquisition unit is used to obtain all comment word vectors of each item in each cluster. In one embodiment, the second acquisition unit can be used to perform the operation S510 described above, which will not be repeated here.

[0183] The second determining unit is used to determine the second center vector of each cluster according to the average distance formula; in one embodiment, the second determining unit can be used to perform the operation S520 described above, which will not be repeated here.

[0184] The second construction unit is used to construct an item review matrix according to the second central vectors of all items. In one embodiment, the second construction unit can be used to perform the operation S530 described above, which will not be described in detail here.

[0185] According to an embodiment of the present disclosure, the clustering module includes a dictionary table building submodule, a conversion submodule and a clustering submodule.

[0186] The dictionary table establishment submodule is used to perform word segmentation operations on the comment text based on a compression algorithm to establish a dictionary table; in one embodiment, the dictionary table establishment submodule can be used to perform the operation S221 described above, which will not be repeated here.

[0187] The conversion submodule is used to convert the vocabulary in the dictionary table into vectors through a word embedding algorithm; in one embodiment, the conversion submodule can be used to perform the operation S222 described above, which will not be repeated here.

[0188] The clustering submodule is used to cluster the vectors by a clustering algorithm to generate K clusters. In one embodiment, the clustering submodule can be used to perform the operation S223 described above, which will not be described in detail here.

[0189] According to an embodiment of the present disclosure, the dictionary table building submodule includes a preprocessing unit, a word segmentation unit and a dictionary table building unit.

[0190] The preprocessing unit is used to preprocess the comment text; in one embodiment, the preprocessing unit can be used to perform the operation S310 described above, which will not be repeated here.

[0191] The word segmentation unit is used to apply a compression algorithm to segment the preprocessed comment text; in one embodiment, the word segmentation unit can be used to perform the operation S320 described above, which will not be repeated here.

[0192] The dictionary table building unit is used to form a dictionary table of the comment text from the vocabulary set processed by the compression algorithm. In one embodiment, the dictionary table building unit can be used to perform the operation S330 described above, which will not be described in detail here.

[0193] According to an embodiment of the present disclosure, the item recommendation module includes a first sub-recommendation module and a second sub-recommendation module.

[0194] The first recommendation submodule is used to perform user collaborative filtering item recommendations according to the user review matrix. In one embodiment, the first recommendation submodule can be used to perform the operation S241 described above, which will not be described in detail here.

[0195] The second recommendation submodule is used to perform collaborative filtering of item recommendations according to the item review matrix. In one embodiment, the second recommendation submodule can be used to perform the operation S242 described above, which will not be described in detail here.

[0196] According to an embodiment of the present disclosure, the first recommendation submodule includes a first similarity calculation unit, a similar user set determination unit and a first recommendation unit.

[0197] The first similarity calculation unit is used to calculate the first similarity between the comment feature vector of each user in the user comment matrix and the comment feature vector of the target user; in one embodiment, the first similarity calculation unit can be used to perform the operation S2411 described above, which will not be repeated here.

[0198] The similar user set determining unit is used to determine a similar user set according to the first similarity. In one embodiment, the similar user set determining unit can be used to perform the operation S2412 described above, which will not be described in detail herein.

[0199] The first recommendation unit is used to complete user collaborative filtering item recommendation based on the similar user set. In one embodiment, the first recommendation unit can be used to perform the operation S2413 described above, which will not be described in detail here.

[0200] According to an embodiment of the present disclosure, the second recommendation submodule includes a second similarity calculation unit, a similar item set determination unit and a second recommendation unit.

[0201] The second similarity calculation unit is used to calculate the second similarity between the comment feature vector of each item in the item comment matrix and the comment feature vector of the target item. In one embodiment, the second similarity calculation unit can be used to perform the operation S2421 described above, which will not be repeated here.

[0202] The similar item set determining unit is used to determine a similar item set according to the second similarity. In one embodiment, the similar item set determining unit can be used to perform the operation S2422 described above, which will not be described in detail here.

[0203] The second recommendation unit is used to complete the collaborative filtering of item recommendations based on the similar item set. In one embodiment, the second recommendation unit can be used to perform the operation S2423 described above, which will not be described in detail here.

[0204] According to an embodiment of the present disclosure, any multiple modules of the acquisition module 710, the clustering module 720, the comment matrix construction module 730 and the item recommendation module 740 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the clustering module 720, the comment matrix construction module 730 and the item recommendation module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 710, the clustering module 720, the review matrix construction module 730, and the item recommendation module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.

[0205] Fig.10A block diagram of an electronic device suitable for implementing a method for recommending items based on review text according to an embodiment of the present disclosure is schematically shown.

[0206] like Fig.10 As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 to a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0207] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0208] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. The drive 909 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 909 as needed, so that the computer program read therefrom is installed into the storage portion 908 as needed.

[0209] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method for recommending items based on review text according to the embodiment of the present disclosure is implemented.

[0210] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0211] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method for recommending items based on review texts provided in the embodiment of the present disclosure.

[0212] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 901. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0213] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0214] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0215] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0216] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program articles according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0217] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0218] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for recommending items based on review text, characterized in that: The method comprises: Get the comment text information of the item; Clustering the comment text information to generate K clusters, where K is an integer greater than or equal to 1; Constructing a user review matrix and an item review matrix based on the K clusters; and Item recommendations are made based on the user review matrix or the item review matrix.

2. The method according to claim 1, characterized in that The constructing of a user review matrix and an item review matrix based on the K clusters includes: Constructing a user review matrix based on the K clusters according to the user dimension; and An item review matrix is ​​constructed based on the K clusters according to the item dimension.

3. The method according to claim 2, characterized in that The step of constructing a user review matrix based on the K clusters according to the user dimension includes: Get all comment word vectors of each user in each cluster; Determine the first center vector of each cluster according to the average distance formula; and Construct a user review matrix based on the first center vectors of all users.

4. The method according to claim 2, characterized in that: The step of constructing an item review matrix based on the K clusters according to the item dimension includes: Get all the review word vectors for each item in each cluster; Determine the second center vector of each cluster according to the average distance formula; and Construct the item review matrix based on the second center vectors of all items.

5. The method according to claim 1, characterized in that The step of clustering the comment text information to generate K clusters includes: Perform word segmentation on the review text based on the compression algorithm to establish a dictionary table; Converting the words in the dictionary table into vectors by a word embedding algorithm; and The vectors are clustered by a clustering algorithm to generate K clusters.

6. The method according to claim 5, characterized in that The word segmentation operation on the comment text based on the compression algorithm to establish the dictionary table includes: Preprocess the review text; Applying compression algorithms to tokenize the preprocessed review text; and The vocabulary set processed by the compression algorithm constitutes the dictionary table of the comment text.

7. The method according to any one of claims 1 to 6, characterized in that Recommending items according to the user review matrix or the item review matrix includes: Performing user collaborative filtering item recommendation according to the user review matrix; and The item collaborative filtering item recommendation is performed according to the item review matrix.

8. The method according to claim 7, characterized in that The performing user collaborative filtering item recommendation according to the user review matrix comprises: Calculate the first similarity between the comment feature vector of each user in the user comment matrix and the comment feature vector of the target user; Determining a similar user set according to the first similarity; and User collaborative filtering item recommendation is performed based on the similar user set.

9. The method according to claim 7, characterized in that: The performing collaborative filtering of item recommendations according to the item review matrix includes: Calculate the second similarity between the review feature vector of each item in the item review matrix and the review feature vector of the target item; Determining a set of similar items according to the second similarity; and The collaborative filtering of items is performed based on the similar item set to recommend items.

10. An item recommendation device based on review text, characterized in that: The device comprises: The acquisition module is used to obtain the comment text information of the item; A clustering module, used for clustering the comment text information to generate K clusters, where K is an integer greater than or equal to 1; A review matrix construction module, used to construct a user review matrix and an item review matrix based on the K clusters; and The item recommendation module is used to recommend items based on the user review matrix or the item review matrix.

11. An electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

13. A computer program article comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.