Item recommendation method, device, electronic device and storage medium

By combining user ratings, sentiment analysis and time factor weights, the user evaluation matrix and item similarity matrix are generated, which solves the problem of insufficient item recommendation accuracy in the existing technology and achieves more accurate item recommendation and user experience improvement.

CN113781180BActive Publication Date: 2024-09-06HUBEI TIANTIAN DIGITAL CHAIN TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202111087804.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-16
Publication Date
2024-09-06
Estimated Expiration
2041-09-16

AI Technical Summary

Technical Problem

Existing item recommendation methods such as coordinated filtering algorithms have shortcomings in recommendation accuracy and effectiveness, and lack of data mining, resulting in inaccurate recommendation results.

Method used

By obtaining the user rating matrix and user emotion matrix, combined with the time factor weight and item similarity matrix, the user evaluation matrix and item similarity target matrix are generated. Based on these matrices, items are recommended to target users to improve the accuracy and rationality of recommendations.

Benefits of technology

The accuracy and effectiveness of item recommendations are improved, and users' favorite unrated items are recommended first, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113781180B
    Figure CN113781180B
Patent Text Reader

Abstract

The present application provides an item recommendation method, device, electronic device and storage medium. The method includes: obtaining a user rating matrix; obtaining a user emotion matrix; generating a user evaluation matrix based on the user rating matrix and the user emotion matrix; obtaining an item similarity target matrix; and recommending items to target users based on the item similarity target matrix and the user evaluation matrix. In an embodiment of the present application, the user's comment information on the item is fully mined to generate a user emotion matrix, and then the user emotion matrix is ​​combined with the user rating matrix to judge the user's preferences from the two dimensions of rating and comment, and then combined with the similarity between items in the item similarity target matrix to achieve accurate recommendation of the user's favorite items.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an item recommendation method, device, electronic device and storage medium. Background Art

[0002] As the scale of e-commerce continues to expand, the number of items is increasing, and customers usually need to spend a lot of time to find the items they want to buy. Therefore, how to recommend favorite items to users has become a current research direction.

[0003] At present, the coordinated filtering algorithm (item-CF) is often used for item recommendation. This algorithm recommends items to users based on the user's historical item selection behavior and user ratings, combined with the similarity between items. However, this method is too one-sided and lacks data mining, which leads to low accuracy and effectiveness of recommended items. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an item recommendation method, device, electronic device and storage medium to improve the accuracy and effectiveness of item recommendations to users.

[0005] The present invention is achieved in that:

[0006] In a first aspect, an embodiment of the present application provides an item recommendation method, comprising: obtaining a user rating matrix; wherein the user rating matrix includes ratings of different users on items that have been rated by each user; obtaining a user emotion matrix; wherein the user emotion matrix includes emotion scores of different users on items that have been commented on by each user; the emotion scores are generated by performing emotion analysis on user comments; generating a user evaluation matrix based on the user rating matrix and the user emotion matrix; obtaining an item similarity target matrix; wherein the item similarity target matrix includes the similarities between all items involved in the user rating matrix; recommending items to a target user based on the item similarity target matrix and the user evaluation matrix; wherein the target user is a user in the user rating matrix.

[0007] In an embodiment of the present application, the user's comment information on the items is fully mined to generate a user sentiment matrix, which is then combined with the user rating matrix to judge the user's preferences from the two dimensions of rating and comment, and then combined with the similarity between items in the item similarity target matrix to achieve accurate recommendations for the user's favorite items.

[0008] In combination with the technical solution provided in the first aspect above, in some possible implementations, obtaining the user sentiment matrix includes: obtaining comments on the items by the different users; scoring the comments based on a sentiment analysis tool to obtain sentiment scores of the different users for the items they have commented on; and generating the user sentiment matrix based on the sentiment scores of the different users for the items they have commented on.

[0009] In an embodiment of the present application, the user's comments are scored by a sentiment analysis tool, so as to obtain the sentiment scores of different users for the items they have commented on.

[0010] In combination with the technical solution provided in the first aspect above, in some possible implementations, generating the user evaluation matrix based on the user rating matrix and the user emotion matrix includes: obtaining the time factor weights of the different users for the items rated by each of them; wherein the time factor weight represents the relationship between the user's rating time and the current time; based on the time factor weight, the user rating matrix and the user emotion matrix generate the user evaluation matrix.

[0011] In the embodiment of the present application, in the process of generating the user evaluation matrix based on the user rating matrix and the user emotion matrix, the time weight factor is also combined. The closer the time of the user rating is, the greater the time weight factor is, and the greater the reference value of the user rating is. In this way, the reference value of the user rating can be further improved, thereby improving the rationality and accuracy of recommending the user's favorite items.

[0012] In combination with the technical solution provided in the first aspect above, in some possible implementations, the expression of the elements in the user evaluation matrix is: Among them, cf ij represents the evaluation value of the i-th user on the j-th item; c ij represents the rating of the i-th user on the j-th item; Indicates the addition of elements at corresponding positions in the matrix; f ij represents the sentiment score of the i-th user to the j-th item; Z ij T represents the time factor weight of the i-th user for the j-th item; j represents the time when the i-th user rated the j-th item, T first represents the time when the i-th user first rated the score, T all Represents the total time from the first to the last rating of the i-th user.

[0013] In combination with the technical solution provided in the first aspect above, in some possible implementations, obtaining the item similarity target matrix includes: obtaining an item similarity matrix and a time similarity matrix; the item similarity matrix represents the similarity of the number of times the items have been rated; the time similarity represents the similarity of the listing time between the items; based on the item similarity matrix and the time similarity matrix, generating the item similarity target matrix.

[0014] In an embodiment of the present application, the item similarity target matrix includes an item similarity matrix and a time similarity matrix. By combining the time similarity matrix, the similarity between items in terms of listing time can be determined, and then it can be determined whether two items are similar items listed at the same time. In this way, the accuracy and rationality of the similarity judgment between items are improved.

[0015] In combination with the technical solution provided in the first aspect above, in some possible implementations, the expression of the elements in the time similarity matrix is: Among them, facT a,b Indicates the temporal similarity between item a and item b, t a represents the time when the item a is put on the market, t b Indicates the time when item b is put on the market.

[0016] In combination with the technical solution provided in the first aspect above, in some possible implementations, obtaining the item similarity target matrix includes: obtaining an item similarity matrix and an attribute similarity matrix; the attribute similarity matrix represents the similarity of attributes between items; and generating the item similarity target matrix based on the item similarity matrix and the attribute similarity matrix.

[0017] In an embodiment of the present application, the object similarity target matrix includes an object similarity matrix and an attribute similarity matrix. By combining the attribute similarity matrix, the similarity between objects in attributes can be determined, and then it can be determined whether two objects are identical in attributes. In this way, the accuracy and rationality of the similarity judgment between objects are improved.

[0018] In combination with the technical solution provided in the first aspect above, in some possible implementations, the expression of the elements in the attribute similarity matrix is: Among them, sim a,b Indicates the similarity between item a and item b in terms of attributes, [a i ]∩[b i ] represents the number of attributes that are the same between item a and item b, n represents the total number of attributes of item a, and m represents the total number of attributes of item b.

[0019] In combination with the technical solution provided in the first aspect above, in some possible implementations, obtaining the item similarity target matrix includes: obtaining an item similarity matrix, a time similarity matrix and an attribute similarity matrix; the item similarity matrix represents the similarity of the number of times items have been rated; the time similarity represents the similarity of the listing time between items; the attribute similarity matrix represents the similarity of attributes between items; based on the item similarity matrix, the time similarity matrix and the attribute similarity matrix, the item similarity target matrix is ​​generated.

[0020] In the embodiment of the present application, the object similarity target matrix includes the object similarity matrix, the time similarity matrix and the attribute similarity matrix. The time similarity matrix can be used to determine the similarity between the items in terms of listing time, and then determine whether two items are similar items listed at the same time. The attribute similarity matrix can be used to determine the similarity between the items in terms of attributes, and then determine whether the two items are the same in terms of attributes. By combining the three, the accuracy and rationality of the similarity between items can be further improved.

[0021] In combination with the technical solution provided in the first aspect above, in some possible implementations, recommending items to a target user based on the item similarity target matrix and the user evaluation matrix includes: obtaining the target user's preference for the items involved in the user evaluation matrix based on the item similarity target matrix and the user evaluation matrix; and recommending to the target user items that have not been rated by the target user based on the sorting order of the preference from high to low.

[0022] In the embodiment of the present application, by recommending items that have not been rated by the target user to the target user based on the sorting order from high to low based on the degree of preference, the target user's favorite items are given priority, and the recommended items that have been rated to the target user are avoided, thereby improving the user experience.

[0023] In combination with the technical solution provided in the first aspect above, in some possible implementations, the degree of liking is obtained by the following expression: Where u represents the target user, p(u,j) represents the target user's preference for item j; S(j,k) represents the set of k items with the highest similarity to item j, and N u represents the set of items that the target user likes; D ji represents the similarity between the item j and the item i, obtained by the item similarity target matrix; cf ui represents the evaluation value of the target user on the item i, which is obtained through the user evaluation matrix.

[0024] In a second aspect, an embodiment of the present application provides an item recommendation device, comprising: a first acquisition module, used to acquire a user rating matrix; wherein the user rating matrix includes ratings of different users on items that they have rated; a second acquisition module, used to acquire a user emotion matrix; wherein the user emotion matrix includes emotion scores of different users on items that they have commented on; the emotion scores are generated by performing emotion analysis on user comments; a generation module, used to generate a user evaluation matrix based on the user rating matrix and the user emotion matrix; a third acquisition module, used to acquire an item similarity target matrix; wherein the item similarity target matrix includes the similarities between all items involved in the user rating matrix; a recommendation module, used to recommend items to a target user based on the item similarity target matrix and the user evaluation matrix; wherein the target user is a user in the user rating matrix.

[0025] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the processor and the memory are connected; the memory is used to store programs; the processor is used to call the programs stored in the memory to execute the method provided in the above-mentioned first aspect embodiment and / or in combination with some possible implementation methods of the above-mentioned first aspect embodiment.

[0026] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes a method provided in the embodiment of the first aspect above and / or in combination with some possible implementations of the embodiment of the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A module block diagram of an electronic device provided in an embodiment of the present application.

[0029] Figure 2 A flowchart of the steps of an item recommendation method provided in an embodiment of the present application.

[0030] Figure 3 A module block diagram of an item recommendation device provided in an embodiment of the present application.

[0031] Icons: 100 - electronic device; 110 - processor; 120 - memory; 200 - item recommendation device; 210 - first acquisition module; 220 - second acquisition module; 230 - generation module; 240 - third acquisition module; 250 - recommendation module. DETAILED DESCRIPTION

[0032] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0033] See also Figure 1 , a module block diagram of an electronic device 100 that provides an application item recommendation method and device according to an embodiment of the present application. In the embodiment of the present application, the electronic device 100 may be a terminal or a server. The terminal may be, but is not limited to, a personal computer (PC), a smart phone, a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), etc. The server may be, but is not limited to, a network server, a database server, a cloud server, or a server integration consisting of multiple sub-servers, etc. Of course, the above-listed devices are only used to facilitate the understanding of the embodiments of the present application, and should not be used as a limitation on the embodiments.

[0034] Structurally, the electronic device 100 includes a processor 110 and a memory 120. The processor 110 is electrically connected to the memory 120 directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The item recommendation device includes at least one software module that can be stored in the memory 120 in the form of software or firmware or solidified in the operating system (OS) of the electronic device 100. The processor 110 is used to execute executable modules stored in the memory 120, such as software function modules and computer programs included in the item recommendation device, to implement the item recommendation method. The processor 110 can execute the computer program after receiving the execution instruction.

[0035] The processor 110 may be an integrated circuit chip with signal processing capability. The processor 110 may also be a general-purpose processor, for example, a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. In addition, the general-purpose processor may be a microprocessor or any conventional processor, etc.

[0036] The memory 120 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), and an electric erasable programmable read-only memory (EEPROM). The memory 120 is used to store a program, and the processor 110 executes the program after receiving an execution instruction.

[0037] It should be noted that Figure 1 The structure shown is for illustration only. The electronic device 100 provided in the embodiment of the present application may also have Figure 1 Fewer or more components, or with Figure 1 In addition, Figure 1 The components shown may be implemented by software, hardware or a combination thereof.

[0038] The item recommendation method provided in the embodiment of the present application can be applied to various application scenarios that require item recommendations, such as: product recommendations in shopping software, movie ticket recommendations, and other application scenarios.

[0039] Furthermore, the item recommendation method can be applied to recommendation platforms involving corresponding application scenarios, such as recommendation platforms for shopping software, recommendation platforms for movie tickets, etc. These recommendation platforms usually have a local user database, and can recommend items based on the local user database.

[0040] See also Figure 2 , Figure 2A flowchart of the steps of the item recommendation method provided in the embodiment of the present application, which is applied to Figure 1 It should be noted that the item recommendation method provided in the embodiment of the present application is not based on Figure 2 The order shown below is limited, and the method includes: step S101-step S105.

[0041] Step S101: Obtain a user rating matrix.

[0042] The user rating matrix includes the ratings of different users on the items they have rated. In this embodiment, the user rating matrix includes the ratings of different users on the items in the same item set. The rating situation can represent whether the user has rated a certain item in the item set, as well as the rating value of the rated item. Specifically, the user rating matrix C1 is in the following form:

[0043]

[0044] In the above user rating matrix C1, c ij Represents the elements in the matrix, c ij represents the rating of the i-th user on the j-th item, such as c 11 represents the rating of the first user on the first item, c 22 represents the rating of the second item by the second user, c wn represents the rating of the w-th user on the n-th item.

[0045] It should be noted that all items and users involved can be numbered in advance to form the above-mentioned user rating matrix. For example, the ID (Identity Document) of the user when registering is numbered according to the order in which the user registers. Another example is to number all items currently on the platform according to their launch time. For example, if the number of movies that can be screened on the movie platform is currently 15, then the 15 movies are numbered according to their release time.

[0046] The above rating can be any score between 1 and 5 points, or any score between 1 and 10 points. Of course, some platforms can also rate by giving stars, such as one to five stars according to the degree of liking for the item. At this time, the star rating method can be converted into a numerical method, one star corresponds to 1 point, and five stars correspond to 5 points. This application does not limit this. In addition, when the user does not rate an item, the corresponding element is filled with 0.

[0047] It should be noted that the score range in the same user rating matrix should be the same. For example, the score range in the same user rating matrix is ​​1 to 5 points. That is, the same user rating matrix adopts the same scoring rule. This method can avoid the subsequent problem of inaccurate item recommendations due to different scoring methods.

[0048] Of course, in order to facilitate subsequent unified calculations, each score may also be normalized to an interval of [0, 1] or an interval of [0, 5], and this application does not limit this.

[0049] Step S102: Obtain the user emotion matrix.

[0050] The user sentiment matrix includes sentiment scores of different users on the items they have commented on; the sentiment scores are generated by sentiment analysis of the user's comments. In this embodiment, the user range involved in the user sentiment matrix is ​​the same as the user range involved in the user rating matrix. And the item set involved in the user sentiment matrix is ​​the same as the item set involved in the user rating matrix.

[0051] Optionally, the above-mentioned obtaining of the user sentiment matrix specifically includes: obtaining comments on the items by different users; scoring the comments based on a sentiment analysis tool to obtain sentiment scores of different users on the items they have commented on; and generating a user sentiment matrix based on the sentiment scores of different users on the items they have commented on.

[0052] The above-mentioned sentiment analysis tool can use SnowNLP (a text processing tool), which can perform word segmentation on the text and extract sensitive words to analyze the user's emotions. Exemplarily, when the extracted sensitive words are "really good" or "comfortable", it indicates that the user's liking is high and the user's evaluation is high. At this time, the sentiment score is high. When the extracted sensitive words are "bad review" or "junk", it indicates that the user's liking is low and the user's evaluation is poor. At this time, the sentiment score is low. Since the above-mentioned sentiment analysis tool is well known in the art, it will not be described in detail here. It can be seen that the user's comments are scored by the sentiment analysis tool in order to obtain the sentiment scores of different users for the items they have commented on.

[0053] In addition, user comments can also be scored based on the number of words in the comment. Generally speaking, the more a user likes a product, the more time they are willing to spend commenting on the product. Therefore, user comments can be scored based on the number of words in the comment. The more words there are, the higher the corresponding sentiment score.

[0054] The form of the user sentiment matrix F1 is as follows:

[0055]

[0056] In the above user sentiment matrix F1, f ij represents the elements in the matrix, f ij represents the sentiment score of the i-th user on the j-th item, such as f 11 represents the sentiment score of the first user on the first item, f 22 represents the sentiment score of the second user on the second item, f wn represents the sentiment score of the wth user for the nth item. It should be noted that the order of the elements in the user sentiment matrix is ​​the same as that in the user rating matrix. For example, c 11 and f 11 Indicates the same user and the same item.

[0057] When a user does not comment on an item, the corresponding element is filled with 0.

[0058] In order to facilitate subsequent unified calculations, each sentiment score may also be normalized to an interval of [0, 1] or an interval of [0, 5], which is not limited in this application.

[0059] Step S103: Generate a user evaluation matrix based on the user rating matrix and the user emotion matrix.

[0060] After obtaining the user rating matrix and the user emotion matrix, the user rating matrix and the user emotion matrix can be directly added to obtain the user evaluation matrix.

[0061] Among them, the expression of the elements in the user evaluation matrix is:

[0062]

[0063] In formula (1), cf ij represents the evaluation value of the i-th user on the j-th item; c ij represents the rating of the i-th user on the j-th item; Indicates the addition of elements at corresponding positions in the matrix; f ij represents the sentiment score of the i-th user for the j-th item. It should be noted that the condition for the existence of the above formula can be c ij and f ij When both are not zero. That is, when c ij and f ij If both are not zero, add them together and divide by 2. If either parameter is zero, take the value of the other parameter as the evaluation value, for example, c ij is zero, and f ij is 0.5, then cf ij =f ij , cf ijAlso 0.5.

[0064] The user evaluation matrix CF1 generated by the above method is in the following form:

[0065]

[0066] In the above user evaluation matrix CF1, cf ij represents the elements in the matrix, cf ij Indicates the evaluation value of the i-th user on the j-th item, such as cf 11 represents the evaluation value of the first user on the first item, cf 22 represents the evaluation value of the second user on the second item, cf wn Represents the evaluation value of the w-th user on the n-th item.

[0067] Optionally, the time factor weight can also be combined in the process of generating the user evaluation matrix. The time factor weight represents the relationship between the user's rating time and the current time. The above steps can specifically include: obtaining the time factor weights of different users for the items they have rated; generating the user evaluation matrix based on the time factor weight, the user rating matrix and the user emotion matrix.

[0068] Among them, in this way, the expression of the elements in the user evaluation matrix is:

[0069]

[0070] In formula (2), cf ij represents the evaluation value of the i-th user on the j-th item; c ij represents the rating of the i-th user on the j-th item; Indicates the addition of elements at corresponding positions in the matrix; f ij represents the sentiment score of the i-th user on the j-th item; Z ij represents the time factor weight of the i-th user for the j-th item; T j represents the time when the i-th user rated the j-th item, T first represents the time when the i-th user first rated the score, T all It represents the total time from the first to the last rating of the i-th user.

[0071] Similarly, the condition for the existence of the above formula can be c ij and f ij When both are not zero. That is, when c ij and f ij If both are not zero, add them together and divide by 2. If either parameter is zero, take the value of the other parameter as the evaluation value, for example, cij is zero, and f ij is 0.5, then cf ij =f ij , cf ij The user evaluation matrix generated by combining the time factor weight can refer to the form of the above user evaluation matrix CF1, which will not be described in detail here.

[0072] When T j If T represents the time of the i-th user's latest rating, then all =T j -T first ; Z ij =1. It can be seen that the closer the time of user rating is, the greater the time weight factor is. The greater the time weight factor is, the greater the reference value of user rating is. In this way, the reference value of user rating can be further improved, thereby improving the rationality and accuracy of recommending items that users like.

[0073] Step S104: Obtaining an object similarity target matrix.

[0074] The item similarity target matrix includes the similarities between all items involved in the user rating matrix.

[0075] As a first implementation, the item similarity target matrix only includes the item similarity matrix. The item similarity matrix represents the similarity of the number of times the items have been rated.

[0076] The calculation formula for item similarity in the item similarity matrix is:

[0077]

[0078] In formula (3), W ij represents the item similarity between item i and item j, N(i) and N(j) represent the number of times item i and item j are rated respectively, and N(i)∩N(j) represents the number of times item i and item j are rated at the same time.

[0079] After calculating the item similarity between all items by formula (3), the item similarity matrix can be obtained. The form of the item similarity matrix D1 is as follows:

[0080]

[0081] In the item similarity matrix D1, d ij Represents the elements in the matrix, d ij Indicates the item similarity between item i and item j, such as d 11 Indicates the similarity between item 1 and itself, d 12Indicates the similarity between item 1 and item 2, d wn Represents the item similarity between item w and item n.

[0082] As a second implementation, the item similarity target matrix includes an item similarity matrix and a time similarity matrix. Accordingly, the above steps specifically include: obtaining the item similarity matrix and the time similarity matrix; the time similarity represents the similarity of the listing time between the items; based on the item similarity matrix and the time similarity matrix, generating the item similarity target matrix.

[0083] Since the item similarity matrix has been described in the first embodiment, it will not be described here in detail, and the same parts can be referenced to each other.

[0084] The expression of the elements in the time similarity matrix, that is, the calculation formula of time similarity is:

[0085]

[0086] In formula (4), facT a,b Indicates the temporal similarity between item a and item b, t a represents the time when item a is put on the market, t b Indicates the time when item b is put on the market.

[0087] Since similar products are often listed together, for example, a large number of romantic movies will appear on Valentine's Day, the time can be combined to judge the similarity between items. The greater the time difference, the lower the correlation.

[0088] The above t a and t b It can refer to the specific time of listing, such as a certain year, month and day, or it can be determined by numbering. For example, if item a is the first item to be listed, then item a is numbered 1, and item b is the second item to be listed, then item a is numbered 2, and so on to get the numbers of all items. The order of listing of items can also be determined by the size of the number, and the application does not limit the representation method. Of course, in order to facilitate subsequent unified calculations, the above time can also be normalized to the interval [0, 1].

[0089] After calculating the temporal similarity between all items by formula (4), the temporal similarity matrix can be obtained. The temporal similarity matrix D2 is in the following form:

[0090]

[0091] In the temporal similarity matrix D2, facT ijrepresents the elements in the matrix, facT ij Indicates the temporal similarity between item i and item j, such as facT 11 represents the temporal similarity between item 1 and itself, facT 12 Indicates the temporal similarity between item 1 and item 2, facT wn Represents the temporal similarity between item w and item n.

[0092] After obtaining the item similarity matrix D1 and the time similarity matrix D2, the two can be combined to obtain the item similarity target matrix D4. It should be noted that the two matrices are combined by multiplying the corresponding elements.

[0093] It can be seen that in the embodiment of the present application, the object similarity target matrix includes an object similarity matrix and a time similarity matrix. The time similarity matrix can be used to determine the similarity between objects in terms of listing time, and then determine whether two objects are similar objects listed at the same time. In this way, the accuracy and rationality of the similarity judgment between objects are improved.

[0094] As a third implementation, the item similarity target matrix includes an item similarity matrix and an attribute similarity matrix. Accordingly, the above steps specifically include: obtaining an item similarity matrix and an attribute similarity matrix; the attribute similarity matrix represents the similarity of attributes between items; based on the item similarity matrix and the attribute similarity matrix, generating an item similarity target matrix.

[0095] Since the item similarity matrix has been described in the first embodiment, it will not be described here in detail, and the same parts can be referenced to each other.

[0096] Since the original data of an item may contain label information, these label information represent the attributes of the item. For example, the label information of item a includes [a1, a2, a3...a n ], a1~a n Each corresponds to an attribute of item a; the label information of item b includes [b1,b2,b3...b n ], b1~b n They all correspond to an attribute of item b, then the similarity of the attributes between the items can be obtained based on the attributes between the items.

[0097] The expression of the elements of the attribute similarity matrix, that is, the calculation formula of attribute similarity is:

[0098]

[0099] In formula (5), sim a,b Indicates the similarity between item a and item b in terms of attributes, [a i]∩[b i ] represents the number of attributes that are the same between item a and item b, n represents the total number of attributes of item a, and m represents the total number of attributes of item b.

[0100] After calculating the attribute similarity between all items by formula (5), the attribute similarity matrix can be obtained. The attribute similarity matrix D3 is in the following form:

[0101]

[0102] In the attribute similarity matrix D3, sim ij Represents the elements in the matrix, sim ij Indicates the attribute similarity between item i and item j, such as sim 11 Indicates the similarity between item 1 and itself, sim 12 Indicates the similarity of the attributes of item 1 and item 2, sim wn Represents the attribute similarity between item w and item n.

[0103] After obtaining the item similarity matrix D1 and the attribute similarity matrix D3, the two can be combined to obtain the item similarity target matrix D4. It should be noted that the two matrices are combined by multiplying the corresponding elements.

[0104] It can be seen that in the embodiment of the present application, the object similarity target matrix includes the object similarity matrix and the attribute similarity matrix. By combining the attribute similarity matrix, the similarity between objects in attributes can be determined, and then it can be determined whether two objects are the same in attributes. In this way, the accuracy and rationality of the similarity judgment between objects are improved.

[0105] As a fourth implementation, the item similarity target matrix includes an item similarity matrix, a time similarity matrix and an attribute similarity matrix. Accordingly, the above steps specifically include: obtaining an item similarity matrix, a time similarity matrix and an attribute similarity matrix; the item similarity matrix represents the similarity of the number of times the items have been rated; the time similarity represents the similarity of the listing time between the items; the attribute similarity matrix represents the similarity of the attributes between the items; based on the item similarity matrix, the time similarity matrix and the attribute similarity matrix, the item similarity target matrix is ​​generated.

[0106] Since the item similarity matrix, time similarity matrix and attribute similarity matrix have been described in the above embodiments, they are not described here in detail, and the same parts can be referred to each other. It should be noted here that the three matrices are combined by multiplying the corresponding elements in the three matrices.

[0107] It can be seen that in the embodiment of the present application, the object similarity target matrix includes the object similarity matrix, the time similarity matrix and the attribute similarity matrix. The time similarity matrix can be used to determine the similarity between the items in terms of listing time, and then determine whether two items are similar items listed at the same time. The attribute similarity matrix can be used to determine the similarity between the items in terms of attributes, and then determine whether the two items are the same in terms of attributes. By combining the three, the accuracy and rationality of the similarity between items can be further improved.

[0108] In addition, it should be noted that the arrangement order in the above-mentioned combined matrices is the same.

[0109] Step S105: recommending items to target users based on the item similarity target matrix and the user evaluation matrix.

[0110] Finally, we can recommend items to the target user based on the obtained item similarity target matrix and user evaluation matrix, where the target user is a user in the user rating matrix.

[0111] Optionally, the above steps specifically include: based on the item similarity target matrix and the user evaluation matrix, obtaining the target user's preference for the items involved in the user evaluation matrix; and based on the sorting order from high to low preference, recommending items that the target user has not rated to the target user.

[0112] The degree of liking is obtained by the following expression:

[0113]

[0114] In formula (6), u represents the target user, p(u,j) represents the target user's preference for item j; S(j,k) represents the set of k items with the highest similarity to item j. The k items with the highest similarity to item j can be obtained through the item similarity target matrix; N u represents the set of items that the target user likes, N u It can be determined by the user rating matrix, for example, the three highest-rated items are determined to construct N u ;D ji Represents the similarity between item j and item i, obtained through the item similarity target matrix; cf ui Represents the target user's evaluation value of item i, which is obtained through the user evaluation matrix.

[0115] It can be seen that in the embodiment of the present application, by recommending items that have not been rated by the target user to the target user based on the sorting order from high to low based on the degree of preference, so as to give priority to recommending the target user's favorite items, and avoid recommending items that have already been rated to the target user, thereby improving the user experience.

[0116] In summary, in the embodiment of the present application, the user's comment information on the items is fully mined to generate a user sentiment matrix, which is then combined with the user rating matrix to judge the user's preferences from the two dimensions of rating and comment, and then combined with the similarity between the items in the item similarity target matrix to achieve accurate recommendation of the user's favorite items.

[0117] See also Figure 3 Based on the same inventive concept, an embodiment of the present application further provides an item recommendation device 200 , which includes: a first acquisition module 210 , a second acquisition module 220 , a generation module 230 , a third acquisition module 240 and a recommendation module 250 .

[0118] The first acquisition module 210 is used to acquire a user rating matrix; wherein the user rating matrix includes ratings given by different users to items that they have rated.

[0119] The second acquisition module 220 is used to acquire a user sentiment matrix; wherein the user sentiment matrix includes sentiment scores of different users on the items they have commented on; and the sentiment scores are generated by performing sentiment analysis on the user's comments.

[0120] The generating module 230 is used to generate a user evaluation matrix based on the user rating matrix and the user emotion matrix.

[0121] The third acquisition module 240 is used to acquire an item similarity target matrix; wherein the item similarity target matrix includes the similarities between all items involved in the user rating matrix.

[0122] The recommendation module 250 is used to recommend items to a target user based on the item similarity target matrix and the user evaluation matrix; wherein the target user is a user in the user rating matrix.

[0123] Optionally, the second acquisition module 220 is specifically used to obtain comments on the items by the different users; score the comments based on a sentiment analysis tool to obtain sentiment scores of the different users for the items they have commented on; and generate the user sentiment matrix based on the sentiment scores of the different users for the items they have commented on.

[0124] Optionally, the generation module 230 is specifically used to obtain the time factor weights of the different users for the items they have rated; wherein the time factor weights represent the relationship between the user's rating time and the current time; based on the time factor weights, the user rating matrix and the user emotion matrix generate the user evaluation matrix.

[0125] Optionally, the third acquisition module 240 is specifically used to obtain an item similarity matrix and a time similarity matrix; the item similarity matrix represents the similarity of the number of times the items have been rated; the time similarity represents the similarity of the listing time between the items; based on the item similarity matrix and the time similarity matrix, the item similarity target matrix is ​​generated.

[0126] Optionally, the third acquisition module 240 is specifically used to obtain an item similarity matrix and an attribute similarity matrix; the attribute similarity matrix represents the similarity of attributes between items; based on the item similarity matrix and the attribute similarity matrix, generate the item similarity target matrix.

[0127] Optionally, the third acquisition module 240 is specifically used to obtain an item similarity matrix, a time similarity matrix and an attribute similarity matrix; the item similarity matrix represents the similarity of the number of times items have been rated; the time similarity represents the similarity of the listing time between items; the attribute similarity matrix represents the similarity of the attributes between items; based on the item similarity matrix, the time similarity matrix and the attribute similarity matrix, the item similarity target matrix is ​​generated.

[0128] Optionally, the recommendation module 250 is specifically used to obtain the target user's preference for the items involved in the user evaluation matrix based on the item similarity target matrix and the user evaluation matrix; and recommend items that have not been rated by the target user to the target user based on the sorting order of the preference from high to low.

[0129] It should be noted that, since technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0130] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the method provided in the above embodiment is executed.

[0131] The storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0132] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

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

[0134] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0135] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0136] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. An item recommendation method, characterized in that: include: Obtaining a user rating matrix; wherein the user rating matrix includes ratings given by different users to items rated by each user; Obtaining a user sentiment matrix; wherein the user sentiment matrix includes sentiment scores of different users on the items they have commented on; the sentiment scores are generated by performing sentiment analysis on the user's comments; Generate a user evaluation matrix based on the user rating matrix and the user emotion matrix; Obtaining an item similarity target matrix; wherein the item similarity target matrix includes the similarities between all items involved in the user rating matrix; wherein the item similarity target matrix includes an item similarity matrix, and the item similarity matrix represents the similarity of the number of times the items have been rated; Recommending items to a target user based on the item similarity target matrix and the user evaluation matrix; wherein the target user is a user in the user rating matrix; The step of recommending items to a target user based on the item similarity target matrix and the user evaluation matrix includes: Based on the item similarity target matrix and the user evaluation matrix, the target user's preference for the items involved in the user evaluation matrix is ​​obtained; wherein, ; represents the target user, Indicates the target user's preference for the item degree of liking; Indicates that the item The most similar A collection of items, A set of items that the target user likes; Indicates the item With items The similarity of is obtained through the item similarity target matrix; Indicates the target user's interest in the item The evaluation value of is obtained through the user evaluation matrix; Based on the ranking order of the likeness from high to low, recommending to the target user items that have not been rated by the target user; The obtaining of the object similarity target matrix includes: Obtain an item similarity matrix and an attribute similarity matrix; the attribute similarity matrix represents the similarity of attributes between items; the expression of the elements in the attribute similarity matrix is: ;in, Indicates items With items The similarity in attributes, Indicates the item With the items The number of identical attributes, Indicates the item The total number of attributes, Indicates the item The total number of attributes; Based on the item similarity matrix and the attribute similarity matrix, the item similarity target matrix is ​​generated; the calculation formula of the item similarity in the item similarity matrix is: ;in, Indicates items and items The similarity of items, and Represent items separately and items The number of times it was rated, and Indicates items and items The number of times it was rated at the same time.

2. The method according to claim 1, characterized in that The obtaining of the user emotion matrix comprises: Obtaining comments on the item by different users; Scoring the comments based on a sentiment analysis tool to obtain sentiment scores of different users on the items they have commented on; The user sentiment matrix is ​​generated based on the sentiment scores of the different users on the items they have commented on.

3. The method according to claim 1, characterized in that: The generating a user evaluation matrix based on the user rating matrix and the user emotion matrix comprises: Obtaining the time factor weights of the items rated by the different users; wherein the time factor weights represent the relationship between the user's rating time and the current time; The user evaluation matrix is ​​generated based on the time factor weight, the user rating matrix and the user emotion matrix.

4. The method according to claim 3, characterized in that The expression of the elements in the user evaluation matrix is: ; in, Indicates User to The evaluation value of an item; Indicates the The user Ratings of items; It means adding the elements at corresponding positions of the matrix; Indicates the The user The sentiment score of each item; Indicates the The user The time factor weight of each item; Indicates the The user The time it takes to rate an item, Indicates the The time when a user first rated a rating. Indicates the The total time from the first to the last rating by a user.

5. The method according to claim 1, characterized in that The obtaining of the object similarity target matrix further includes: Obtaining the item similarity matrix and the time similarity matrix; the item similarity matrix represents the similarity of the number of times the items have been rated; the time similarity represents the similarity of the listing time between the items; Based on the item similarity matrix and the time similarity matrix, generating the item similarity target matrix; Among them, the expression of the elements in the time similarity matrix is: ; in, Indicates items With items The similarity in time, Indicates the item Time to market, Indicates the item Time to market.

6. The method according to claim 1, characterized in that The obtaining of the object similarity target matrix further includes: Obtaining the item similarity matrix, the time similarity matrix and the attribute similarity matrix; the item similarity matrix represents the similarity of the number of times the items have been rated; the time similarity represents the similarity of the listing time between the items; the attribute similarity matrix represents the similarity of the attributes between the items; The object similarity target matrix is ​​generated based on the object similarity matrix, the time similarity matrix and the attribute similarity matrix.

7. An item recommendation device, characterized in that: include: A first acquisition module is used to acquire a user rating matrix; wherein the user rating matrix includes ratings of different users on items rated by each user; The second acquisition module is used to acquire a user sentiment matrix; wherein the user sentiment matrix includes sentiment scores of different users on the items they have commented on; the sentiment scores are generated by performing sentiment analysis on the user's comments; A generating module, used for generating a user evaluation matrix based on the user rating matrix and the user emotion matrix; A third acquisition module is used to acquire an item similarity target matrix; wherein the item similarity target matrix includes the similarities between all items involved in the user rating matrix; wherein the item similarity target matrix includes an item similarity matrix, and the item similarity matrix represents the similarity of the number of times the items have been rated; A recommendation module, configured to recommend items to a target user based on the item similarity target matrix and the user evaluation matrix; wherein the target user is a user in the user rating matrix; The recommendation module is specifically used to obtain the target user's preference for the items involved in the user evaluation matrix based on the item similarity target matrix and the user evaluation matrix; and recommend items that have not been rated by the target user to the target user based on the sorting order of the preference from high to low; wherein, ; represents the target user, Indicates the target user's preference for the item degree of liking; Indicates that the item The most similar A collection of items, A set of items that the target user likes; Indicates the item With items The similarity of is obtained through the item similarity target matrix; Indicates the target user's interest in the item The evaluation value of is obtained through the user evaluation matrix; The third acquisition module is specifically used to acquire an item similarity matrix and an attribute similarity matrix; the attribute similarity matrix represents the similarity of attributes between items; the expression of the elements in the attribute similarity matrix is: ;in, Indicates items With items The similarity in attributes, Indicates the item With the items The number of identical attributes, Indicates the item The total number of attributes, Indicates the item The total number of attributes; based on the item similarity matrix and the attribute similarity matrix, the item similarity target matrix is ​​generated; the calculation formula of the item similarity in the item similarity matrix is: ;in, Indicates items and items The similarity of items, and Represent items separately and items The number of times it was rated, and Indicates items and items The number of times it was rated at the same time.

8. An electronic device, characterized in that: include: A processor and a memory, the processor and the memory being connected; The memory is used to store programs; The processor is used to run the program stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the method according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Item recommendation method and server

    CN104699687A

  • Emotional analysis based mixed user scoring information recommendation method and apparatus

    CN105069072A

  • Recommendation method fusing scoring information and article content based on collaborative training

    CN109635291A

  • Method for automatically analyzing user comments in application store and recommending comments to developers

    CN110827118A

  • Collaborative filtering recommendation method and device fusing comment texts and time sequence effect

    CN111339439A