WO2020168992A1 - Product recommendation method, apparatus, and device and storage medium - Google Patents

Product recommendation method, apparatus, and device and storage medium Download PDF

Info

Publication number
WO2020168992A1
WO2020168992A1 PCT/CN2020/075477 CN2020075477W WO2020168992A1 WO 2020168992 A1 WO2020168992 A1 WO 2020168992A1 CN 2020075477 W CN2020075477 W CN 2020075477W WO 2020168992 A1 WO2020168992 A1 WO 2020168992A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
product
users
rating
recommended
Prior art date
Application number
PCT/CN2020/075477
Other languages
French (fr)
Chinese (zh)
Inventor
张莉
李泽鹏
周伟达
王邦军
章晓芳
屈蕴茜
赵雷
Original Assignee
苏州大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州大学 filed Critical 苏州大学
Publication of WO2020168992A1 publication Critical patent/WO2020168992A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Definitions

  • the present invention relates to the field of information processing technology, in particular to a method, device, equipment and computer-readable storage medium for recommending commodities.
  • the recommendation system is a personalized information recommendation system that recommends information and products that interest users to users based on their information needs and interests.
  • the recommendation system conducts personalized calculations by studying the user's interest preferences, and the system discovers the user's points of interest, thereby guiding users to discover their own information needs.
  • Recommender systems are now widely used in many fields, among which the most typical field with good development and application prospects is e-commerce.
  • some traditional similarity measurement methods such as cosine similarity, Pearson Correlation Coefficient (PCC), and matrix factorization (Matrix factorization) algorithms have been widely used in product recommendation algorithms.
  • PCC Pearson Correlation Coefficient
  • Matrix factorization matrix factorization
  • the purpose of the present invention is to provide a product recommendation method, device, device and computer readable storage medium to solve the problem of poor recommendation performance on sparse scoring data.
  • the present invention provides a method for recommending commodities, including:
  • the score data of the product to be recommended by the neighbor users of the target user is obtained to recommend the product.
  • the obtaining rating data of different users for different commodities includes:
  • r ij If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
  • the calculating the user similarity between the different users according to the rating data of the products by different users includes:
  • A(u g ,u i ) represents the degree of consistency between user u g and user u i
  • the calculation method is: V g represents a rating vector based on the user u g , The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as: I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
  • r gj is the rating of the item m j by the user u g , Indicates the average value of the non-zero ratings of the product by the user u i , Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ⁇ I i represents the set of products that the user u g and the user u i have jointly evaluated.
  • the obtaining the scoring data of the target user for the product to be recommended according to the score data of the neighboring users of the target user for the product to be recommended includes:
  • m j ⁇ M ⁇ r tj 0 ⁇
  • r ca user u c represents the score of product m a
  • S(u t , u c ) represents the user similarity between target user u t and neighboring user u c
  • NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users
  • W ca m a treatment recommended product for neighbor users u c scores trust and W ca decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by
  • This application also provides a product recommendation device, including:
  • the obtaining module is used to obtain rating data of different users for different products, and the rating data is used to characterize the user's preference for the products;
  • the calculation module is used to calculate the user similarity between the different users according to the rating data of the products by different users;
  • the recommendation module is used to obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user to recommend the product, so as to recommend the product.
  • the acquisition module is used to:
  • r ij If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
  • calculation module is used for:
  • A(u g ,u i ) represents the degree of consistency between user u g and user u i
  • the calculation method is: V g represents a rating vector based on the user u g , The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as: I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
  • r gj is the rating of the item m j by the user u g , Indicates the average value of the non-zero ratings of the product by the user u i , Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ⁇ I i represents the set of products that the user u g and the user u i have jointly evaluated.
  • the recommendation module is used for:
  • m j ⁇ M ⁇ r tj 0 ⁇
  • r ca user u c represents the score of product m a
  • S(u t , u c ) represents the user similarity between target user u t and neighboring user u c
  • NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users
  • W ca m a treatment recommended product for neighbor users u c scores trust and W ca decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by
  • This application also provides a product recommendation device, including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of any one of the aforementioned commodity recommendation methods when the computer program is executed.
  • the present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the aforementioned commodity recommendation methods are implemented.
  • the commodity recommendation method provided by the present invention obtains the rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity; according to the rating data of different users on the commodity, the user similarity between different users The degree is calculated; according to the scoring data of the products to be recommended by the neighbor users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products.
  • This application is based on the product recommendation method of neighbor propagation and adopts an iterative idea to bring each round of scoring data into the next round of prediction scoring, making the scoring matrix denser and more accurate. Therefore, this application can better improve the performance of product recommendation.
  • this application also provides a product recommendation device, equipment, and computer-readable storage medium with the above technical effects.
  • FIG. 1 is a flowchart of a specific implementation manner of the commodity recommendation method provided by this application;
  • FIG. 2 is a structural block diagram of a product recommendation device provided by an embodiment of the present invention.
  • FIG. 3 is a block diagram of the product recommendation device provided by this application.
  • the core of the present invention is to provide a commodity recommendation method, device, equipment and computer-readable storage medium to solve the above technical problems.
  • FIG. 1 A flowchart of a specific implementation manner of the commodity recommendation method provided by the present application is shown in FIG. 1, and the method includes:
  • Step S101 Obtain scoring data of different users for different commodities, and the scoring data is used to characterize the user's degree of preference for the commodity;
  • Step S102 Calculate the user similarity between the different users according to the rating data of the products by different users;
  • ACCCC Accordance and Compromise based Pearson Correlation Coefficient
  • A(u g ,u i ) represents the degree of consistency between user u g and user u i
  • the calculation method is: V g represents a rating vector based on the user u g , The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as: I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
  • r gj is the rating of the item m j by the user u g , Indicates the average value of the non-zero ratings of the product by the user u i , Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ⁇ I i represents the set of products that the user u g and the user u i have jointly evaluated. For example, the user u g score is ⁇ 1,3,4,2,1,1,2 ⁇ , then It is equal to 2.
  • Step S103 Obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user to recommend the product.
  • m j ⁇ M ⁇ r tj 0 ⁇
  • NK is the number set of neighbor users of the target user u t , including K neighbor users selected from high to low similarity to the target user, and then select users who have rated product a from these users.
  • r ca user u c represents the score of product m a
  • S(u t , u c ) represents the user similarity between target user u t and neighboring user u c
  • NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users
  • the commodity recommendation method provided by the present invention obtains the rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity; according to the rating data of different users on the commodity, the user similarity between different users The degree is calculated; according to the scoring data of the products to be recommended by the neighbor users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products.
  • This application is based on the product recommendation method of neighbor propagation and adopts an iterative idea to bring each round of scoring data into the next round of prediction scoring, making the scoring matrix denser and more accurate. Therefore, this application can better improve the performance of product recommendation.
  • This embodiment of the application selects the Moußs data set ML_100k data for testing.
  • the data set consists of 942 users, 1682 movies, and a total of score records up to As many as 100,000.
  • the score range of this data set is ⁇ 1,2,3,4,5 ⁇ , 1 means a hate movie, 5 means a favorite movie.
  • the sparseness of the data set reaches 93.7% to form a 942*1682 rating matrix, in which the unrated movies are represented by 0.
  • r ij ⁇ ⁇ 0, s ⁇ represents the rating of the product m j by the user u i . If the value of r ij is 0, it means that the user has not evaluated the product, and if r ij takes other values, it means that the user has evaluated the product, and the value is the score.
  • the size of the scoring value indicates how high or low the user likes the product. In this embodiment, s is 5.
  • ACCCC Accordance and Compromise based Pearson Correlation Coefficient
  • A(u g ,u i ) represents the degree of consistency between u g and neighboring users u i
  • the calculation method is:
  • V g represents a rating vector based on user u g ;
  • C(u g ,u i ) represents a compromise factor, considering the percentage of common ratings between two users, the calculation method is:
  • I g is a collection of items evaluated by the user u g .
  • PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
  • r gj is the rating of user u g on item m j
  • the target user u t recommend an item m a ⁇ ⁇ m j
  • m j ⁇ M ⁇ r tj 0 ⁇ , i.e. the prediction target user u t m a product score of
  • decay is the decay rate
  • itear is the number of iterations.
  • Each round of newly added points must have a trust factor, which is multiplied by the decay rate for each round.
  • the value of K is 40, decay is 0.9, and itear is 15 times.
  • the data set is randomly divided into five training sets and test sets.
  • the comparison method includes the present invention, user-based PCC similarity (abbreviated as UCF-PCC) and commodity-based Pearson similarity algorithm (abbreviated as ICF-PCC) and non-iterative prediction similarity (ACPCC) .
  • UCF-PCC user-based PCC similarity
  • ICF-PCC commodity-based Pearson similarity algorithm
  • ACPCC non-iterative prediction similarity
  • IR gt is the set of movies liked by the user on the test set
  • IR gp is the set of movies recommended to the user. The results are shown in Table 1. It can be seen that the recommended performance of the present invention is significantly better than other comparison methods.
  • the product recommendation device provided by the embodiment of the present invention will be introduced below.
  • the product recommendation device described below and the product recommendation method described above can be referred to each other.
  • FIG. 2 is a structural block diagram of a product recommendation device provided by an embodiment of the present invention.
  • the product recommendation device may include:
  • the obtaining module 100 is configured to obtain rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity;
  • the calculation module 200 is configured to calculate the user similarity between the different users according to the rating data of the products by different users;
  • the recommendation module 300 is configured to obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user for the product to be recommended, so as to recommend the product.
  • the acquisition module in the recommendation device provided in this application is used to:
  • r ij If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
  • the calculation module in the recommendation device provided in this application is used to:
  • A(u g ,u i ) represents the degree of consistency between user u g and user u i
  • the calculation method is: V g represents a rating vector based on user u g ; C(u g ,u i ) represents a compromise factor, and the calculation method is: I g is the set of items evaluated by the user u g , PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
  • r gj is the rating of the item m j by the user u g , Represents the average value of the non-zero ratings of the product by the user u i .
  • the recommendation module in the recommendation device provided in this application is used to:
  • m j ⁇ M ⁇ r tj 0 ⁇
  • the product recommendation device of this embodiment is used to implement the aforementioned product recommendation method. Therefore, the specific implementation of the product recommendation device can be seen in the previous embodiment of the product recommendation method, for example, the acquisition module 100, the calculation module 200, and the recommendation module 300. , Are respectively used to implement steps S101, S102, and S103 in the foregoing commodity recommendation method. Therefore, for the specific implementation, refer to the description of the respective parts of the embodiment, and details are not described herein again.
  • the commodity recommendation method provided by the present invention obtains the rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity; according to the rating data of different users on the commodity, the user similarity between different users The degree is calculated; according to the scoring data of the products to be recommended by the neighbor users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products.
  • This application is based on the product recommendation method of neighbor propagation, and adopts the idea of iteration to bring the scoring data of each round to the next round of prediction scoring, making the scoring matrix more and more dense, and also making the prediction score more and more accurate. Therefore, this application can better improve the performance of product recommendation.
  • this application also provides a product recommendation device.
  • the product recommendation device structure block diagram provided in this application the device includes:
  • the memory 11 is used to store computer programs
  • the processor 12 is configured to implement the steps of any one of the aforementioned commodity recommendation methods when executing the computer program.
  • the present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the aforementioned commodity recommendation methods are implemented.
  • this application obtains the rating data of different users for different products, and the rating data is used to characterize the user's preference for the product; according to the rating data of different users to the product, the user similarity between different users is calculated; According to the scoring data of the products to be recommended by the neighboring users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products.
  • This application is based on the product recommendation method of neighbor propagation and adopts an iterative idea to bring each round of scoring data into the next round of prediction scoring, making the scoring matrix denser and more accurate. Therefore, this application can better improve the performance of product recommendation.
  • the steps of the method or algorithm described in the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two.
  • the software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage medium.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A product recommendation method, product recommendation apparatus and product recommendation device and a computer readable storage medium. The product recommendation method comprises: obtaining score data of different users for different products respectively, the score data being used for representing the preferences of the users for the products (S101); calculating the user similarity between the different users according to the score data of the different users for the products (S102); and obtaining score data of a target user for a product to be recommended according to score data of neighbor users of the target user for the product to be recommended, so as to recommend the product (S103). According to the product recommendation method based on neighbor propagation, the concept of iteration is employed, and score data of each round is brought into the next round of predictive scoring, so that a score matrix becomes more and more dense, and the predictive scoring becomes more and more accurate. Therefore, the product recommendation performance can be better improved.

Description

一种商品推荐方法、装置、设备以及存储介质Commodity recommendation method, device, equipment and storage medium
本申请要求2019年2月18日提交中国专利局、申请号为201910123041.2、名称为“一种商品推荐方法、装置、设备以及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中:This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on February 18, 2019, the application number is 201910123041.2, and the title is "A method, device, equipment and storage medium for product recommendation", the entire contents of which are incorporated by reference In this application:
技术领域Technical field
本发明涉及信息处理技术领域,特别是涉及一种商品推荐方法、装置、设备以及计算机可读存储介质。The present invention relates to the field of information processing technology, in particular to a method, device, equipment and computer-readable storage medium for recommending commodities.
背景技术Background technique
互联网的出现和普及给用户带来了大量的信息,满足了用户在信息时代对信息的需求,但随着网络的迅速发展而带来的网上信息量的大幅增长,使得用户在面对大量信息时无法从中获得对自己真正有用的那部分信息,对信息的使用效率反而降低了,这就是所谓的信息超载问题。The emergence and popularization of the Internet has brought a large amount of information to users, which has met their needs for information in the information age. However, with the rapid development of the Internet, the amount of information on the Internet has increased significantly, making users face a large amount of information. When you cannot get the information that is really useful to you, the efficiency of using the information is reduced. This is the so-called information overload problem.
解决信息超载问题一个非常有潜力的办法是推荐系统,它是根据用户的信息需求、兴趣等,将用户感兴趣的信息、产品等推荐给用户的个性化信息推荐系统。和搜索引擎相比推荐系统通过研究用户的兴趣偏好,进行个性化计算,由系统发现用户的兴趣点,从而引导用户发现自己的信息需求。A very potential way to solve the problem of information overload is the recommendation system, which is a personalized information recommendation system that recommends information and products that interest users to users based on their information needs and interests. Compared with search engines, the recommendation system conducts personalized calculations by studying the user's interest preferences, and the system discovers the user's points of interest, thereby guiding users to discover their own information needs.
推荐系统现已广泛应用于很多领域,其中最典型并具有良好的发展和应用前景的领域就是电子商务领域。对于个性化推荐系统一些传统的相似度度量方法比如余弦相似度,Pearson相似度(Pearson Correlation Coefficient,PCC)以及矩阵分解(Matrix factorization)算法已经广泛应用于商品推荐算法中。然而用户和商品的数量的不断增加,评分矩阵的稀疏性也越来越明显。按照相似度计算以及矩阵分解已不能更好地提升推荐性能。Recommender systems are now widely used in many fields, among which the most typical field with good development and application prospects is e-commerce. For personalized recommendation systems, some traditional similarity measurement methods such as cosine similarity, Pearson Correlation Coefficient (PCC), and matrix factorization (Matrix factorization) algorithms have been widely used in product recommendation algorithms. However, as the number of users and commodities continues to increase, the sparsity of the rating matrix is becoming more and more obvious. Calculation based on similarity and matrix decomposition can no longer improve recommendation performance.
发明内容Summary of the invention
本发明的目的是提供一种商品推荐方法、装置、设备以及计算机可读 存储介质,以解决在稀疏的评分数据上推荐性能较差的问题。The purpose of the present invention is to provide a product recommendation method, device, device and computer readable storage medium to solve the problem of poor recommendation performance on sparse scoring data.
为解决上述技术问题,本发明提供一种商品推荐方法,包括:In order to solve the above technical problems, the present invention provides a method for recommending commodities, including:
获取不同用户分别针对不同商品的评分数据,所述评分数据用于表征用户对商品的喜欢程度;Acquiring rating data of different users for different commodities, where the rating data is used to characterize the user's degree of preference for the commodity;
根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算;Calculating the user similarity between the different users according to the scoring data of the products by different users;
根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据,以对商品进行推荐。According to the score data of the product to be recommended by the neighbor users of the target user, the score data of the product to be recommended by the target user is obtained to recommend the product.
可选地,所述获取不同用户分别针对不同商品的评分数据包括:Optionally, the obtaining rating data of different users for different commodities includes:
采用集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量,输入商品评分矩阵
Figure PCTCN2020075477-appb-000001
其中r ij∈{0,s}表示用户u i对商品m j的评分;
Set U = {u 1 ,...,u l } and M = {m 1 ,...,m n } to represent the user collection and the product collection, l and n represent the number of users and the number of products, enter the product Scoring matrix
Figure PCTCN2020075477-appb-000001
Where r ij ∈ {0,s} represents the rating of the user u i on the product m j ;
若r ij取值为0则表示用户对商品未评价,若r ij取非零值则表示用户对商品评价的分值。 If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
可选地,所述根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算包括:Optionally, the calculating the user similarity between the different users according to the rating data of the products by different users includes:
对任意两个用户u g和u i,采用S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i)计算二者之间的用户相似度; For any two users u g and u i , S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i ) User similarity;
其中,A(u g,u i)表示用户u g和用户u i的一致性程度,计算方式为:
Figure PCTCN2020075477-appb-000002
V g表示基于用户u g的评分向量,
Figure PCTCN2020075477-appb-000003
中的上角标T表示转置,V i表示基于用户u i的评分向量;C(u g,u i)表示折衷因素,计算方式为:
Figure PCTCN2020075477-appb-000004
I g为用户u g评价过的物品集合,I i为用户u i评价过的物品集合;PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为:
Among them, A(u g ,u i ) represents the degree of consistency between user u g and user u i , and the calculation method is:
Figure PCTCN2020075477-appb-000002
V g represents a rating vector based on the user u g ,
Figure PCTCN2020075477-appb-000003
The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as:
Figure PCTCN2020075477-appb-000004
I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
Figure PCTCN2020075477-appb-000005
Figure PCTCN2020075477-appb-000005
其中,r gj是用户u g对物品m j的评分,
Figure PCTCN2020075477-appb-000006
表示用户u i对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000007
代表用户u g对商品非零评分的平均值;r ij是用户u i对物品m j的评分;I g∩I i表示用户u g和用户u i共同评价过的商品集合。
Among them, r gj is the rating of the item m j by the user u g ,
Figure PCTCN2020075477-appb-000006
Indicates the average value of the non-zero ratings of the product by the user u i ,
Figure PCTCN2020075477-appb-000007
Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ∩I i represents the set of products that the user u g and the user u i have jointly evaluated.
可选地,所述根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据包括:Optionally, the obtaining the scoring data of the target user for the product to be recommended according to the score data of the neighboring users of the target user for the product to be recommended includes:
在目标用户为u t∈U,给所述目标用户u t推荐待推荐商品m a∈{m j|m j∈M∧r tj=0}时,预测目标用户u t对所述待推荐商品m a的评分
Figure PCTCN2020075477-appb-000008
为:
In the target user u t ∈U, the target user to be recommended product recommendation u t m a ∈ {m j | m j ∈M∧r tj = 0} , the prediction target to be recommended to the user u t commodities m a rating
Figure PCTCN2020075477-appb-000008
for:
Figure PCTCN2020075477-appb-000009
Figure PCTCN2020075477-appb-000009
其中,m a∈{m j|m j∈M∧r tj=0}代表用户未曾评分的商品,∧是条件连接符号,r ca表示用户u c对商品m a的评分,
Figure PCTCN2020075477-appb-000010
表示目标用户u t对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000011
表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的用户相似性,NK是目标用户u t的近邻用户数集,包含与目标用户的用户相似度从高到低选取的K个近邻用户,W ca为近邻用户u c对待推荐商品m a的评分信任度且W ca=decay itear,decay为衰减率,itear为迭代次数,每一轮新添的分值对应一个信任系数,每一轮乘以衰减率。
Wherein, m a ∈ {m j | m j ∈M∧r tj = 0} goods on behalf of the user has not ratings, ∧ - a connection condition symbol, r ca user u c represents the score of product m a,
Figure PCTCN2020075477-appb-000010
Indicates the average value of the target user u t ’s non-zero score for the product,
Figure PCTCN2020075477-appb-000011
Represents the average value of non-zero scores of neighboring users u c on the product, S(u t , u c ) represents the user similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users, W ca m a treatment recommended product for neighbor users u c scores trust and W ca = decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by the decay rate.
本申请还提供了一种商品推荐装置,包括:This application also provides a product recommendation device, including:
获取模块,用于获取不同用户分别针对不同商品的评分数据,所述评分数据用于表征用户对商品的喜欢程度;The obtaining module is used to obtain rating data of different users for different products, and the rating data is used to characterize the user's preference for the products;
计算模块,用于根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算;The calculation module is used to calculate the user similarity between the different users according to the rating data of the products by different users;
推荐模块,用于根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据,以对商品进行推荐。The recommendation module is used to obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user to recommend the product, so as to recommend the product.
可选地,所述获取模块用于:Optionally, the acquisition module is used to:
采用集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量,输入商品评分矩阵
Figure PCTCN2020075477-appb-000012
其中ri j∈{0,s}表示用户u i对商品m j的评分;
Set U = {u 1 ,...,u l } and M = {m 1 ,...,m n } to represent the user collection and the product collection, l and n represent the number of users and the number of products, enter the product Scoring matrix
Figure PCTCN2020075477-appb-000012
Where ri j ∈ {0,s} represents the user u i 's rating of the product m j ;
若r ij取值为0则表示用户对商品未评价,若r ij取非零值则表示用户对商品评价的分值。 If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
可选地,所述计算模块用于:Optionally, the calculation module is used for:
对任意两个用户u g和u i,采用S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i)计算二者之间的用户相似度; For any two users u g and u i , S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i ) User similarity;
其中,A(u g,u i)表示用户u g和用户u i的一致性程度,计算方式为:
Figure PCTCN2020075477-appb-000013
V g表示基于用户u g的评分向量,
Figure PCTCN2020075477-appb-000014
中的上角标T表示转置,V i表示基于用户u i的评分向量;C(u g,u i)表示折衷因素,计算方式为:
Figure PCTCN2020075477-appb-000015
I g为用户u g评价过的物品集合,I i为用户u i评价过的物品集合;PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为:
Among them, A(u g ,u i ) represents the degree of consistency between user u g and user u i , and the calculation method is:
Figure PCTCN2020075477-appb-000013
V g represents a rating vector based on the user u g ,
Figure PCTCN2020075477-appb-000014
The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as:
Figure PCTCN2020075477-appb-000015
I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
Figure PCTCN2020075477-appb-000016
Figure PCTCN2020075477-appb-000016
其中,r gj是用户u g对物品m j的评分,
Figure PCTCN2020075477-appb-000017
表示用户u i对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000018
代表用户u g对商品非零评分的平均值;r ij是用户u i对物品m j的评分;I g∩I i表示用户u g和用户u i共同评价过的商品集合。
Among them, r gj is the rating of the item m j by the user u g ,
Figure PCTCN2020075477-appb-000017
Indicates the average value of the non-zero ratings of the product by the user u i ,
Figure PCTCN2020075477-appb-000018
Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ∩I i represents the set of products that the user u g and the user u i have jointly evaluated.
可选地,所述推荐模块用于:Optionally, the recommendation module is used for:
在目标用户为u t∈U,给所述目标用户u t推荐待推荐商品m a∈{m j|m j∈M∧r tj=0}时,预测目标用户u t对所述待推荐商品m a的评分
Figure PCTCN2020075477-appb-000019
为:
In the target user u t ∈U, the target user to be recommended product recommendation u t m a ∈ {m j | m j ∈M∧r tj = 0} , the prediction target to be recommended to the user u t commodities m a rating
Figure PCTCN2020075477-appb-000019
for:
Figure PCTCN2020075477-appb-000020
Figure PCTCN2020075477-appb-000020
其中,m a∈{m j|m j∈M∧r tj=0}代表用户未曾评分的商品,∧是条件连接符号,r ca表示用户u c对商品m a的评分,
Figure PCTCN2020075477-appb-000021
表示目标用户u t对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000022
表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的用户相似性,NK是目标用户u t的近邻用户数集,包含与目标用户的用户相似度从高到低选取的K个近邻用户,W ca为近邻用户u c对待推荐商品m a的评分信任度且W ca=decay itear,decay为衰减率,itear为迭代次数,每一轮新添的分值对应一个信任系数,每一轮乘以衰减率。
Wherein, m a ∈ {m j | m j ∈M∧r tj = 0} goods on behalf of the user has not ratings, ∧ - a connection condition symbol, r ca user u c represents the score of product m a,
Figure PCTCN2020075477-appb-000021
Indicates the average value of the target user u t ’s non-zero score for the product,
Figure PCTCN2020075477-appb-000022
Represents the average value of non-zero scores of neighboring users u c on the product, S(u t , u c ) represents the user similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users, W ca m a treatment recommended product for neighbor users u c scores trust and W ca = decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by the decay rate.
本申请还提供了一种商品推荐设备,包括:This application also provides a product recommendation device, including:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行所述计算机程序时实现上述任一种商品推荐方法的步骤。The processor is used to implement the steps of any one of the aforementioned commodity recommendation methods when the computer program is executed.
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种所述商品推荐方法的步骤。The present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the aforementioned commodity recommendation methods are implemented.
本发明所提供的商品推荐方法,通过获取不同用户分别针对不同商品的评分数据,评分数据用于表征用户对商品的喜欢程度;根据不同用户对商品的评分数据,对不同用户之间的用户相似度进行计算;根据目标用户的近邻用户对待推荐商品的评分数据得到目标用户对待推荐商品的评分数据,以对商品进行推荐。本申请基于近邻传播的商品推荐方法,采用迭代的思想,将每一轮的评分数据带入到下一轮预测评分当中,使得评分矩阵越来越稠密,也致使预测评分越来越精确。因此,本申请可以更好地提高商品推荐的性能。此外,本申请还提供了一种具有上述技术效果的商品推荐装置、设备以及计算机可读存储介质。The commodity recommendation method provided by the present invention obtains the rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity; according to the rating data of different users on the commodity, the user similarity between different users The degree is calculated; according to the scoring data of the products to be recommended by the neighbor users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products. This application is based on the product recommendation method of neighbor propagation and adopts an iterative idea to bring each round of scoring data into the next round of prediction scoring, making the scoring matrix denser and more accurate. Therefore, this application can better improve the performance of product recommendation. In addition, this application also provides a product recommendation device, equipment, and computer-readable storage medium with the above technical effects.
附图说明Description of the drawings
为了更清楚的说明本发明实施例或现有技术的技术方案,下面将对实 施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions of the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are merely For some of the embodiments of the present invention, those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为本申请所提供的商品推荐方法的一种具体实施方式的流程图;FIG. 1 is a flowchart of a specific implementation manner of the commodity recommendation method provided by this application;
图2为本发明实施例提供的商品推荐装置的结构框图;2 is a structural block diagram of a product recommendation device provided by an embodiment of the present invention;
图3为本申请所提供的商品推荐设备结构框图。Figure 3 is a block diagram of the product recommendation device provided by this application.
具体实施方式detailed description
随着用户和商品的数量的不断增加,评分矩阵的稀疏性也越来越明显。按照相似度计算以及矩阵分解已不能更好地提升推荐性能。本发明的核心是提供一种商品推荐方法、装置、设备以及计算机可读存储介质,以解决上述技术问题。As the number of users and products continues to increase, the sparsity of the rating matrix becomes more and more obvious. Calculation based on similarity and matrix decomposition can no longer improve recommendation performance. The core of the present invention is to provide a commodity recommendation method, device, equipment and computer-readable storage medium to solve the above technical problems.
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
本申请所提供的商品推荐方法的一种具体实施方式的流程图如图1所示,该方法包括:A flowchart of a specific implementation manner of the commodity recommendation method provided by the present application is shown in FIG. 1, and the method includes:
步骤S101:获取不同用户分别针对不同商品的评分数据,所述评分数据用于表征用户对商品的喜欢程度;Step S101: Obtain scoring data of different users for different commodities, and the scoring data is used to characterize the user's degree of preference for the commodity;
采用集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量,输入商品评分矩阵
Figure PCTCN2020075477-appb-000023
其中r ij∈{0,s}表示用户u i对商品m j的评分;若r ij取值为0则表示用户对商品未评价,若r ij取非零值则表示用户对商品评价的分值。分值的大小表示用户对商品的喜欢程度的高低。
Set U = {u 1 ,...,u l } and M = {m 1 ,...,m n } to represent the user collection and the product collection, l and n represent the number of users and the number of products, enter the product Scoring matrix
Figure PCTCN2020075477-appb-000023
Among them, r ij ∈ {0, s} represents the user u i ’s score on the product m j ; if the value of r ij is 0, it means that the user has not evaluated the product, and if r ij is non-zero, it represents the user’s score on the product evaluation. value. The size of the score indicates how high or low users like the product.
步骤S102:根据不同用户对商品的评分数据,对所述不同用户之间的 用户相似度进行计算;Step S102: Calculate the user similarity between the different users according to the rating data of the products by different users;
具体地,采用ACPCC(Accordance and Compromise based Pearson Correlation Coefficient)相似度对不同用户之间的用户相似度进行计算。对任意两个用户u g和u i,采用S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i)计算二者之间的用户相似度; Specifically, ACCCC (Accordance and Compromise based Pearson Correlation Coefficient) similarity is used to calculate the user similarity between different users. For any two users u g and u i , S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i ) User similarity;
其中,A(u g,u i)表示用户u g和用户u i的一致性程度,计算方式为:
Figure PCTCN2020075477-appb-000024
V g表示基于用户u g的评分向量,
Figure PCTCN2020075477-appb-000025
中的上角标T表示转置,V i表示基于用户u i的评分向量;C(u g,u i)表示折衷因素,计算方式为:
Figure PCTCN2020075477-appb-000026
I g为用户u g评价过的物品集合,I i为用户u i评价过的物品集合;PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为:
Among them, A(u g ,u i ) represents the degree of consistency between user u g and user u i , and the calculation method is:
Figure PCTCN2020075477-appb-000024
V g represents a rating vector based on the user u g ,
Figure PCTCN2020075477-appb-000025
The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as:
Figure PCTCN2020075477-appb-000026
I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
Figure PCTCN2020075477-appb-000027
Figure PCTCN2020075477-appb-000027
其中,r gj是用户u g对物品m j的评分,
Figure PCTCN2020075477-appb-000028
表示用户u i对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000029
代表用户u g对商品非零评分的平均值;r ij是用户u i对物品m j的评分;I g∩I i表示用户u g和用户u i共同评价过的商品集合。例如,用户u g打分是{1,3,4,2,1,1,2},那么
Figure PCTCN2020075477-appb-000030
就等于2。
Among them, r gj is the rating of the item m j by the user u g ,
Figure PCTCN2020075477-appb-000028
Indicates the average value of the non-zero ratings of the product by the user u i ,
Figure PCTCN2020075477-appb-000029
Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ∩I i represents the set of products that the user u g and the user u i have jointly evaluated. For example, the user u g score is {1,3,4,2,1,1,2}, then
Figure PCTCN2020075477-appb-000030
It is equal to 2.
步骤S103:根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据,以对商品进行推荐。Step S103: Obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user to recommend the product.
在目标用户为u t∈U,给所述目标用户u t推荐待推荐商品m a∈{m j|m j∈M∧r tj=0}时,预测目标用户u t对所述待推荐商品m a的评分
Figure PCTCN2020075477-appb-000031
为:
In the target user u t ∈U, the target user to be recommended product recommendation u t m a ∈ {m j | m j ∈M∧r tj = 0} , the prediction target to be recommended to the user u t commodities m a rating
Figure PCTCN2020075477-appb-000031
for:
Figure PCTCN2020075477-appb-000032
Figure PCTCN2020075477-appb-000032
其中,m a∈{m j|m j∈M∧r tj=0}代表用户未曾评分的商品,∧是条件连接符号,表示并且的意思;u c∈NK∧r ca>0表示两个条件同时满足,NK是目标用户u t的近邻用户数集,包含与目标用户相似度从高到低选取的K个近邻用户,再从这些用户里挑选出对商品a评过分的用户。r ca表示用户u c对商品m a的评分,
Figure PCTCN2020075477-appb-000033
表示目标用户u t对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000034
表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的用户相似性,NK是目标用户u t的近邻用户数集,包含与目标用户的用户相似度从高到低选取的K个近邻用户,W ca为近邻用户u c对待推荐商品m a的评分信任度且W ca=decay itear,decay为衰减率,itear为迭代次数,每一轮新添的分值对应一个信任系数,每一轮乘以衰减率。
Wherein, m a ∈ {m j | m j ∈M∧r tj = 0} goods on behalf of the user has not ratings, ∧ - a connection condition symbol, and meaning expressed; u c ∈NK∧r ca> 0 indicates two conditions At the same time, NK is the number set of neighbor users of the target user u t , including K neighbor users selected from high to low similarity to the target user, and then select users who have rated product a from these users. r ca user u c represents the score of product m a,
Figure PCTCN2020075477-appb-000033
Indicates the average value of the target user u t ’s non-zero score for the product,
Figure PCTCN2020075477-appb-000034
Represents the average value of non-zero scores of neighboring users u c on the product, S(u t , u c ) represents the user similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users, W ca m a treatment recommended product for neighbor users u c scores trust and W ca = decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by the decay rate.
本发明所提供的商品推荐方法,通过获取不同用户分别针对不同商品的评分数据,评分数据用于表征用户对商品的喜欢程度;根据不同用户对商品的评分数据,对不同用户之间的用户相似度进行计算;根据目标用户的近邻用户对待推荐商品的评分数据得到目标用户对待推荐商品的评分数据,以对商品进行推荐。本申请基于近邻传播的商品推荐方法,采用迭代的思想,将每一轮的评分数据带入到下一轮预测评分当中,使得评分矩阵越来越稠密,也致使预测评分越来越精确。因此,本申请可以更好地提高商品推荐的性能。The commodity recommendation method provided by the present invention obtains the rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity; according to the rating data of different users on the commodity, the user similarity between different users The degree is calculated; according to the scoring data of the products to be recommended by the neighbor users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products. This application is based on the product recommendation method of neighbor propagation and adopts an iterative idea to bring each round of scoring data into the next round of prediction scoring, making the scoring matrix denser and more accurate. Therefore, this application can better improve the performance of product recommendation.
下面以一具体实施例对本申请所提供的商品推荐方法进行进一步详细阐述,本申请实施例选取Movielens数据集ML_100k数据进行了测试,该数据集由942个用户,1682个电影数量,一共评分记录达到100000之多。该数据集评分范围为{1,2,3,4,5},1表示讨厌的电影,5表示很喜欢的电影。该数据集的稀疏程度达到93.7%构成了一个942*1682的评分矩阵,其中对未评价过的电影用0表示。划出80%作为训练集,剩余部分作为测试集。The product recommendation method provided by this application will be further elaborated with a specific embodiment below. This embodiment of the application selects the Movielens data set ML_100k data for testing. The data set consists of 942 users, 1682 movies, and a total of score records up to As many as 100,000. The score range of this data set is {1,2,3,4,5}, 1 means a hate movie, 5 means a favorite movie. The sparseness of the data set reaches 93.7% to form a 942*1682 rating matrix, in which the unrated movies are represented by 0. Set out 80% as the training set, and the rest as the test set.
具体实施步骤如下:The specific implementation steps are as follows:
令集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量。在本实施例中,l=942,n=1682。 Let set U={u 1 ,...,u l } and M={m 1 ,...,m n } represent the user collection and the product collection, respectively, and l and n represent the number of users and the number of products, respectively. In this embodiment, l=942 and n=1682.
输入商品评分矩阵
Figure PCTCN2020075477-appb-000035
其中r ij∈{0,s}表示用户u i对商品m j的 评分。若r ij取值为0表示用户对商品未评价,若r ij取其他值,则表示用户对商品评价过,值即为评分。评分值的大小表示用户对商品的喜欢程度的高低。在本实施例中,s为5。
Enter product rating matrix
Figure PCTCN2020075477-appb-000035
Among them, r ij ∈ {0, s} represents the rating of the product m j by the user u i . If the value of r ij is 0, it means that the user has not evaluated the product, and if r ij takes other values, it means that the user has evaluated the product, and the value is the score. The size of the scoring value indicates how high or low the user likes the product. In this embodiment, s is 5.
采用ACPCC(Accordance and Compromise based Pearson Correlation Coefficient)相似度对不同用户之间的用户相似度进行计算。对任意两个用户u g和u i,它们之间的相似度计算方式如下: ACCCC (Accordance and Compromise based Pearson Correlation Coefficient) similarity is used to calculate the user similarity between different users. For any two users u g and u i , the similarity between them is calculated as follows:
S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i) S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i )
其中A(u g,u i)表示u g和近邻用户u i一致性的程度,计算方式为: Where A(u g ,u i ) represents the degree of consistency between u g and neighboring users u i , and the calculation method is:
Figure PCTCN2020075477-appb-000036
Figure PCTCN2020075477-appb-000036
V g表示基于用户u g的评分向量;C(u g,u i)表示折衷因素,考虑两个用户之间共同评分的百分比,计算方式为: V g represents a rating vector based on user u g ; C(u g ,u i ) represents a compromise factor, considering the percentage of common ratings between two users, the calculation method is:
Figure PCTCN2020075477-appb-000037
Figure PCTCN2020075477-appb-000037
其中I g是用户u g评价过的物品集合。PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为: Where I g is a collection of items evaluated by the user u g . PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
Figure PCTCN2020075477-appb-000038
Figure PCTCN2020075477-appb-000038
其中r gj是用户u g对物品m j的评分,
Figure PCTCN2020075477-appb-000039
表示用户u i对商品非零评分的平均值。
Where r gj is the rating of user u g on item m j ,
Figure PCTCN2020075477-appb-000039
Represents the average value of the non-zero ratings of the product by the user u i .
假设目标用户为u t∈U,为目标用户u t推荐某个商品m a∈{m j|m j∈M∧r tj=0},也就是预测目标用户u t对商品m a的评分
Figure PCTCN2020075477-appb-000040
Assuming that the target user u t ∈U, the target user u t recommend an item m a ∈ {m j | m j ∈M∧r tj = 0}, i.e. the prediction target user u t m a product score of
Figure PCTCN2020075477-appb-000040
Figure PCTCN2020075477-appb-000041
Figure PCTCN2020075477-appb-000041
其中
Figure PCTCN2020075477-appb-000042
表示用户u t对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000043
表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的相似性,NK是目标用户u t的近邻用户数集,包含用户相似度从高到低选取的K个用户, W ca为用户u c对商品m a的评分信任度且
among them
Figure PCTCN2020075477-appb-000042
Indicates the average value of the non-zero ratings of the products by users u t ,
Figure PCTCN2020075477-appb-000043
Represents the average value of non-zero scores of neighboring users u c for the product, S(u t , u c ) represents the similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including users Low degree of similarity selected users K, W ca score for the user u c m a product of confidence and
W ca=decay itear W ca =decay itear
其中decay为衰减率,itear是迭代次数。每一轮新添的分值要有一个信任系数,每一轮乘以衰减率。在本实施例中,K的取值为40,decay为0.9,itear为15次。Where decay is the decay rate, and itear is the number of iterations. Each round of newly added points must have a trust factor, which is multiplied by the decay rate for each round. In this embodiment, the value of K is 40, decay is 0.9, and itear is 15 times.
本发明的效果可以通过如下实验验证:对数据集随机划分5次训练集和测试集。在推荐预测中,对比方法包括本发明、基于用户的PCC相似度(简写为UCF-PCC)和基于商品的Pearson相似度的算法(简写为ICF-PCC)以及未迭代预测的相似度(ACPCC)。The effect of the present invention can be verified by the following experiment: the data set is randomly divided into five training sets and test sets. In the recommendation prediction, the comparison method includes the present invention, user-based PCC similarity (abbreviated as UCF-PCC) and commodity-based Pearson similarity algorithm (abbreviated as ICF-PCC) and non-iterative prediction similarity (ACPCC) .
采用绝对值误差指标(MAE)和平方误差指标(RMSE)还有召回率(Recall)对推荐效果进行评估:Use the absolute value error index (MAE), square error index (RMSE) and recall rate (Recall) to evaluate the recommendation effect:
Figure PCTCN2020075477-appb-000044
Figure PCTCN2020075477-appb-000044
Figure PCTCN2020075477-appb-000045
Figure PCTCN2020075477-appb-000045
Figure PCTCN2020075477-appb-000046
Figure PCTCN2020075477-appb-000046
其中l'和n'是测试集上的用户数和电影数量,IR gt是测试集上用户喜欢的电影集合,IR gp是推荐给用户喜欢的电影集合。结果如表1所示,可以看出本发明的推荐性能明显好于其他对比方法。 Where l'and n'are the number of users and the number of movies on the test set, IR gt is the set of movies liked by the user on the test set, and IR gp is the set of movies recommended to the user. The results are shown in Table 1. It can be seen that the recommended performance of the present invention is significantly better than other comparison methods.
表1三种算法的推荐结果对比Table 1 Comparison of recommended results of the three algorithms
推荐recommend MAEMAE RMSERMSE RecallRecall
UCF-PCCUCF-PCC 0.98380.9838 1.11741.1174 0.26070.2607
ICF-PCCICF-PCC 0.87160.8716 1.01961.0196 0.05710.0571
ACPCCACPCC 0.76890.7689 0.97710.9771 0.70560.7056
本发明this invention 0.74450.7445 0.95690.9569 0.72950.7295
下面对本发明实施例提供的商品推荐装置进行介绍,下文描述的商品 推荐装置与上文描述的商品推荐方法可相互对应参照。The product recommendation device provided by the embodiment of the present invention will be introduced below. The product recommendation device described below and the product recommendation method described above can be referred to each other.
图2为本发明实施例提供的商品推荐装置的结构框图,参照图2商品推荐装置可以包括:FIG. 2 is a structural block diagram of a product recommendation device provided by an embodiment of the present invention. Referring to FIG. 2, the product recommendation device may include:
获取模块100,用于获取不同用户分别针对不同商品的评分数据,所述评分数据用于表征用户对商品的喜欢程度;The obtaining module 100 is configured to obtain rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity;
计算模块200,用于根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算;The calculation module 200 is configured to calculate the user similarity between the different users according to the rating data of the products by different users;
推荐模块300,用于根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据,以对商品进行推荐。The recommendation module 300 is configured to obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user for the product to be recommended, so as to recommend the product.
作为一种具体实施方式,本申请所提供的推荐装置中所述获取模块用于:As a specific implementation manner, the acquisition module in the recommendation device provided in this application is used to:
采用集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量,输入商品评分矩阵
Figure PCTCN2020075477-appb-000047
其中r ij∈{0,s}表示用户u i对商品m j的评分;
Set U = {u 1 ,...,u l } and M = {m 1 ,...,m n } to represent the user collection and the product collection, l and n represent the number of users and the number of products, enter the product Scoring matrix
Figure PCTCN2020075477-appb-000047
Where r ij ∈ {0,s} represents the rating of the user u i on the product m j ;
若r ij取值为0则表示用户对商品未评价,若r ij取非零值则表示用户对商品评价的分值。 If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
作为一种具体实施方式,本申请所提供的推荐装置中所述计算模块用于:As a specific implementation, the calculation module in the recommendation device provided in this application is used to:
对任意两个用户u g和u i,采用S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i)计算二者之间的用户相似度; For any two users u g and u i , S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i ) User similarity;
其中,A(u g,u i)表示用户u g和用户u i的一致性程度,计算方式为:
Figure PCTCN2020075477-appb-000048
V g表示基于用户u g的评分向量;C(u g,u i)表示折衷因素,计算方式为:
Figure PCTCN2020075477-appb-000049
I g为用户u g评价过的物品集合,PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为:
Among them, A(u g ,u i ) represents the degree of consistency between user u g and user u i , and the calculation method is:
Figure PCTCN2020075477-appb-000048
V g represents a rating vector based on user u g ; C(u g ,u i ) represents a compromise factor, and the calculation method is:
Figure PCTCN2020075477-appb-000049
I g is the set of items evaluated by the user u g , PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
Figure PCTCN2020075477-appb-000050
Figure PCTCN2020075477-appb-000050
其中,r gj是用户u g对物品m j的评分,
Figure PCTCN2020075477-appb-000051
表示用户u i对商品非零评分的平均值。
Among them, r gj is the rating of the item m j by the user u g ,
Figure PCTCN2020075477-appb-000051
Represents the average value of the non-zero ratings of the product by the user u i .
作为一种具体实施方式,本申请所提供的推荐装置中所述推荐模块用于:As a specific implementation manner, the recommendation module in the recommendation device provided in this application is used to:
在目标用户为u t∈U,给所述目标用户u t推荐待推荐商品m a∈{m j|m j∈M∧r tj=0}时,预测目标用户u t对所述待推荐商品m a的评分
Figure PCTCN2020075477-appb-000052
为:
In the target user u t ∈U, the target user to be recommended product recommendation u t m a ∈ {m j | m j ∈M∧r tj = 0} , the prediction target to be recommended to the user u t commodities m a rating
Figure PCTCN2020075477-appb-000052
for:
Figure PCTCN2020075477-appb-000053
Figure PCTCN2020075477-appb-000053
其中,
Figure PCTCN2020075477-appb-000054
表示目标用户u t对商品非零评分的平均值,
Figure PCTCN2020075477-appb-000055
表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的用户相似性,NK是目标用户u t的近邻用户数集,包含与目标用户的用户相似度从高到低选取的K个近邻用户,W ca为近邻用户u c对待推荐商品m a的评分信任度且W ca=decay itear,decay为衰减率,itear为迭代次数,每一轮新添的分值对应一个信任系数,每一轮乘以衰减率。
among them,
Figure PCTCN2020075477-appb-000054
Indicates the average value of the target user u t ’s non-zero score for the product,
Figure PCTCN2020075477-appb-000055
Represents the average value of non-zero scores of neighboring users u c on the product, S(u t , u c ) represents the user similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users, W ca m a treatment recommended product for neighbor users u c scores trust and W ca = decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by the decay rate.
本实施例的商品推荐装置用于实现前述的商品推荐方法,因此商品推荐装置中的具体实施方式可见前文中的商品推荐方法的实施例部分,例如,获取模块100,计算模块200,推荐模块300,分别用于实现上述商品推荐方法中步骤S101,S102,S103,所以,其具体实施方式可以参照相应的各个部分实施例的描述,在此不再赘述。The product recommendation device of this embodiment is used to implement the aforementioned product recommendation method. Therefore, the specific implementation of the product recommendation device can be seen in the previous embodiment of the product recommendation method, for example, the acquisition module 100, the calculation module 200, and the recommendation module 300. , Are respectively used to implement steps S101, S102, and S103 in the foregoing commodity recommendation method. Therefore, for the specific implementation, refer to the description of the respective parts of the embodiment, and details are not described herein again.
本发明所提供的商品推荐方法,通过获取不同用户分别针对不同商品的评分数据,评分数据用于表征用户对商品的喜欢程度;根据不同用户对商品的评分数据,对不同用户之间的用户相似度进行计算;根据目标用户的近邻用户对待推荐商品的评分数据得到目标用户对待推荐商品的评分数据,以对商品进行推荐。本申请基于近邻传播的商品推荐方法,采用迭代 的思想,将每一轮的评分数据带入到下一轮预测评分当中,使得评分矩阵越来越稠密,也致使预测评分越来越精确。因此,本申请可以更好地提高商品推荐的性能。The commodity recommendation method provided by the present invention obtains the rating data of different users for different commodities, and the rating data is used to characterize the user's degree of preference for the commodity; according to the rating data of different users on the commodity, the user similarity between different users The degree is calculated; according to the scoring data of the products to be recommended by the neighbor users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products. This application is based on the product recommendation method of neighbor propagation, and adopts the idea of iteration to bring the scoring data of each round to the next round of prediction scoring, making the scoring matrix more and more dense, and also making the prediction score more and more accurate. Therefore, this application can better improve the performance of product recommendation.
此外,本申请还提供了一种商品推荐设备,如图3本申请所提供的商品推荐设备结构框图所示,该设备包括:In addition, this application also provides a product recommendation device. As shown in Fig. 3, the product recommendation device structure block diagram provided in this application, the device includes:
存储器11,用于存储计算机程序;The memory 11 is used to store computer programs;
处理器12,用于执行所述计算机程序时实现上述任一种商品推荐方法的步骤。The processor 12 is configured to implement the steps of any one of the aforementioned commodity recommendation methods when executing the computer program.
此外,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种商品推荐方法的步骤。In addition, the present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the aforementioned commodity recommendation methods are implemented.
综上,本申请通过获取不同用户分别针对不同商品的评分数据,评分数据用于表征用户对商品的喜欢程度;根据不同用户对商品的评分数据,对不同用户之间的用户相似度进行计算;根据目标用户的近邻用户对待推荐商品的评分数据得到目标用户对待推荐商品的评分数据,以对商品进行推荐。本申请基于近邻传播的商品推荐方法,采用迭代的思想,将每一轮的评分数据带入到下一轮预测评分当中,使得评分矩阵越来越稠密,也致使预测评分越来越精确。因此,本申请可以更好地提高商品推荐的性能。To sum up, this application obtains the rating data of different users for different products, and the rating data is used to characterize the user's preference for the product; according to the rating data of different users to the product, the user similarity between different users is calculated; According to the scoring data of the products to be recommended by the neighboring users of the target user, the scoring data of the products to be recommended by the target user is obtained to recommend the products. This application is based on the product recommendation method of neighbor propagation and adopts an iterative idea to bring each round of scoring data into the next round of prediction scoring, making the scoring matrix denser and more accurate. Therefore, this application can better improve the performance of product recommendation.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals may further realize that the units and algorithm steps of the examples described in the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of both, in order to clearly illustrate the possibilities of hardware and software. Interchangeability. In the above description, the composition and steps of each example have been generally described in accordance with the function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage medium.
以上对本发明所提供的商品推荐方法、装置、设备以及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The commodity recommendation method, device, equipment, and computer-readable storage medium provided by the present invention have been introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation of the present invention. The description of the above examples is only used to help understand the method and core idea of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (10)

  1. 一种商品推荐方法,其特征在于,包括:A product recommendation method, characterized in that it includes:
    获取不同用户分别针对不同商品的评分数据,所述评分数据用于表征用户对商品的喜欢程度;Acquiring rating data of different users for different commodities, where the rating data is used to characterize the user's degree of preference for the commodity;
    根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算;Calculating the user similarity between the different users according to the scoring data of the products by different users;
    根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据,以对商品进行推荐。According to the score data of the product to be recommended by the neighbor users of the target user, the score data of the product to be recommended by the target user is obtained to recommend the product.
  2. 如权利要求1所述的商品推荐方法,其特征在于,所述获取不同用户分别针对不同商品的评分数据包括:5. The product recommendation method according to claim 1, wherein said obtaining score data of different users for different products comprises:
    采用集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量,输入商品评分矩阵
    Figure PCTCN2020075477-appb-100001
    其中r ij∈{0,s}表示用户u i对商品m j的评分;
    Set U = {u 1 ,...,u l } and M = {m 1 ,...,m n } to represent the user collection and the product collection, l and n represent the number of users and the number of products, enter the product Scoring matrix
    Figure PCTCN2020075477-appb-100001
    Where r ij ∈ {0,s} represents the rating of the user u i on the product m j ;
    若r ij取值为0则表示用户对商品未评价,若r ij取非零值则表示用户对商品评价的分值。 If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
  3. 如权利要求2所述的商品推荐方法,其特征在于,所述根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算包括:The method for recommending a product according to claim 2, wherein the calculating the user similarity between the different users according to the rating data of the products by different users comprises:
    对任意两个用户u g和u i,采用S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i)计算二者之间的用户相似度; For any two users u g and u i , S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i ) User similarity;
    其中,A(u g,u i)表示用户u g和用户u i的一致性程度,计算方式为:
    Figure PCTCN2020075477-appb-100002
    V g表示基于用户u g的评分向量,
    Figure PCTCN2020075477-appb-100003
    中的上角标T表示转置,V i表示基于用户u i的评分向量;C(u g,u i)表示折衷因素,计算方式为:
    Figure PCTCN2020075477-appb-100004
    I g为用户u g评价过的物品集合,I i为用户u i评价过的物品集合;PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为:
    Among them, A(u g ,u i ) represents the degree of consistency between user u g and user u i , and the calculation method is:
    Figure PCTCN2020075477-appb-100002
    V g represents a rating vector based on the user u g ,
    Figure PCTCN2020075477-appb-100003
    The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as:
    Figure PCTCN2020075477-appb-100004
    I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
    Figure PCTCN2020075477-appb-100005
    Figure PCTCN2020075477-appb-100005
    其中,r gj是用户u g对物品m j的评分,
    Figure PCTCN2020075477-appb-100006
    表示用户u i对商品非零评分的平均值,
    Figure PCTCN2020075477-appb-100007
    代表用户u g对商品非零评分的平均值;r ij是用户u i对物品m j的评分;I g∩I i表示用户u g和用户u i共同评价过的商品集合。
    Among them, r gj is the rating of the item m j by the user u g ,
    Figure PCTCN2020075477-appb-100006
    Indicates the average value of the non-zero ratings of the product by the user u i ,
    Figure PCTCN2020075477-appb-100007
    Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ∩I i represents the set of products that the user u g and the user u i have jointly evaluated.
  4. 如权利要求3所述的商品推荐方法,其特征在于,所述根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据包括:5. The product recommendation method according to claim 3, wherein the obtaining the target user's score data for the product to be recommended according to the score data of the neighbor users of the target user for the product to be recommended comprises:
    在目标用户为u t∈U,给所述目标用户u t推荐待推荐商品m a∈{m j|m j∈M∧r tj=0}时,预测目标用户u t对所述待推荐商品m a的评分
    Figure PCTCN2020075477-appb-100008
    为:
    In the target user u t ∈U, the target user to be recommended product recommendation u t m a ∈ {m j | m j ∈M∧r tj = 0} , the prediction target to be recommended to the user u t commodities m a rating
    Figure PCTCN2020075477-appb-100008
    for:
    Figure PCTCN2020075477-appb-100009
    Figure PCTCN2020075477-appb-100009
    其中,m a∈{m j|m j∈M∧r tj=0}代表用户未曾评分的商品,∧是条件连接符号,r ca表示用户u c对商品m a的评分,
    Figure PCTCN2020075477-appb-100010
    表示目标用户u t对商品非零评分的平均值,
    Figure PCTCN2020075477-appb-100011
    表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的用户相似性,NK是目标用户u t的近邻用户数集,包含与目标用户的用户相似度从高到低选取的K个近邻用户,W ca为近邻用户u c对待推荐商品m a的评分信任度且W ca=decay itear,decay为衰减率,itear为迭代次数,每一轮新添的分值对应一个信任系数,每一轮乘以衰减率。
    Wherein, m a ∈ {m j | m j ∈M∧r tj = 0} goods on behalf of the user has not ratings, ∧ - a connection condition symbol, r ca user u c represents the score of product m a,
    Figure PCTCN2020075477-appb-100010
    Indicates the average value of the target user u t ’s non-zero score for the product,
    Figure PCTCN2020075477-appb-100011
    Represents the average value of non-zero scores of neighboring users u c on the product, S(u t , u c ) represents the user similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users, W ca m a treatment recommended product for neighbor users u c scores trust and W ca = decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by the decay rate.
  5. 一种商品推荐装置,其特征在于,包括:A product recommendation device, characterized in that it comprises:
    获取模块,用于获取不同用户分别针对不同商品的评分数据,所述评分数据用于表征用户对商品的喜欢程度;The obtaining module is used to obtain rating data of different users for different products, and the rating data is used to characterize the user's preference for the products;
    计算模块,用于根据不同用户对商品的评分数据,对所述不同用户之间的用户相似度进行计算;The calculation module is used to calculate the user similarity between the different users according to the rating data of the products by different users;
    推荐模块,用于根据目标用户的近邻用户对待推荐商品的评分数据得到所述目标用户对所述待推荐商品的评分数据,以对商品进行推荐。The recommendation module is used to obtain the score data of the target user for the product to be recommended according to the score data of the neighboring users of the target user to recommend the product, so as to recommend the product.
  6. 如权利要求5所述的商品推荐装置,其特征在于,所述获取模块用于:The product recommendation device according to claim 5, wherein the acquisition module is used for:
    采用集合U={u 1,...,u l}和M={m 1,...,m n}分别代表用户集合与商品集合,l和n分别表示用户数量和商品数量,输入商品评分矩阵
    Figure PCTCN2020075477-appb-100012
    其中r ij∈{0,s}表示用户u i对商品m j的评分;
    Set U = {u 1 ,...,u l } and M = {m 1 ,...,m n } to represent the user collection and the product collection, l and n represent the number of users and the number of products, enter the product Scoring matrix
    Figure PCTCN2020075477-appb-100012
    Where r ij ∈ {0,s} represents the rating of the user u i on the product m j ;
    若r ij取值为0则表示用户对商品未评价,若r ij取非零值则表示用户对商品评价的分值。 If the value of r ij is 0, it means that the user has not rated the product, and if the value of r ij is non-zero, it means that the user has rated the product.
  7. 如权利要求6所述的商品推荐装置,其特征在于,所述计算模块用于:The product recommendation device according to claim 6, wherein the calculation module is used for:
    对任意两个用户u g和u i,采用S(u g,u i)=A(u g,u i)C(u g,u i)PCC(u g,u i)计算二者之间的用户相似度; For any two users u g and u i , S(u g ,u i )=A(u g ,u i )C(u g ,u i )PCC(u g ,u i ) User similarity;
    其中,A(u g,u i)表示用户u g和用户u i的一致性程度,计算方式为:
    Figure PCTCN2020075477-appb-100013
    V g表示基于用户u g的评分向量,
    Figure PCTCN2020075477-appb-100014
    中的上角标T表示转置,V i表示基于用户u i的评分向量;C(u g,u i)表示折衷因素,计算方式为:
    Figure PCTCN2020075477-appb-100015
    I g为用户u g评价过的物品集合,I i为用户u i评价过的物品集合;PCC(u g,u i)是计算两个用户之间的Pearson相似度,计算方式为:
    Among them, A(u g ,u i ) represents the degree of consistency between user u g and user u i , and the calculation method is:
    Figure PCTCN2020075477-appb-100013
    V g represents a rating vector based on the user u g ,
    Figure PCTCN2020075477-appb-100014
    The superscript T denotes the transpose, V i represents a vector of the user based on the rating of u i; C (u g, u i ) represents a trade-off factor, calculated as:
    Figure PCTCN2020075477-appb-100015
    I g is the set of items evaluated by the user u g , and I i is the set of items evaluated by the user u i ; PCC(u g ,u i ) is to calculate the Pearson similarity between two users, the calculation method is:
    Figure PCTCN2020075477-appb-100016
    Figure PCTCN2020075477-appb-100016
    其中,r gj是用户u g对物品m j的评分,
    Figure PCTCN2020075477-appb-100017
    表示用户u i对商品非零评分的平均值,
    Figure PCTCN2020075477-appb-100018
    代表用户u g对商品非零评分的平均值;r ij是用户u i对物品m j的评分;I g∩I i表示用户u g和用户u i共同评价过的商品集合。
    Among them, r gj is the rating of the item m j by the user u g ,
    Figure PCTCN2020075477-appb-100017
    Indicates the average value of the non-zero ratings of the product by the user u i ,
    Figure PCTCN2020075477-appb-100018
    Represents the average value of the non-zero ratings of the user u g on the product; r ij is the rating of the user u i on the item m j ; I g ∩I i represents the set of products that the user u g and the user u i have jointly evaluated.
  8. 如权利要求7所述的商品推荐装置,其特征在于,所述推荐模块用于:8. The product recommendation device of claim 7, wherein the recommendation module is used for:
    在目标用户为u t∈U,给所述目标用户u t推荐待推荐商品m a∈{m j|m j∈M∧r tj=0}时,预测目标用户u t对所述待推荐商品m a的评分
    Figure PCTCN2020075477-appb-100019
    为:
    In the target user u t ∈U, the target user to be recommended product recommendation u t m a ∈ {m j | m j ∈M∧r tj = 0} , the prediction target to be recommended to the user u t commodities m a rating
    Figure PCTCN2020075477-appb-100019
    for:
    Figure PCTCN2020075477-appb-100020
    Figure PCTCN2020075477-appb-100020
    其中,m a∈{m j|m j∈M∧r tj=0}代表用户未曾评分的商品,∧是条件连接符号,r ca表示用户u c对商品m a的评分,
    Figure PCTCN2020075477-appb-100021
    表示目标用户u t对商品非零评分的平均值,
    Figure PCTCN2020075477-appb-100022
    表示近邻用户u c对商品非零评分的平均值,S(u t,u c)表示目标用户u t和近邻用户u c的用户相似性,NK是目标用户u t的近邻用户数集,包含与目标用户的用户相似度从高到低选取的K个近邻用户,W ca为近邻用户u c对待推荐商品m a的评分信任度且W ca=decay itear,decay为衰减率,itear为迭代次数,每一轮新添的分值对应一个信任系数,每一轮乘以衰减率。
    Wherein, m a ∈ {m j | m j ∈M∧r tj = 0} goods on behalf of the user has not ratings, ∧ - a connection condition symbol, r ca user u c represents the score of product m a,
    Figure PCTCN2020075477-appb-100021
    Indicates the average value of the target user u t ’s non-zero score for the product,
    Figure PCTCN2020075477-appb-100022
    Represents the average value of non-zero scores of neighboring users u c on the product, S(u t , u c ) represents the user similarity between target user u t and neighboring user u c , NK is the number set of neighboring users of target user u t , including the target user's user selected from high to low similarity K nearest neighbors users, W ca m a treatment recommended product for neighbor users u c scores trust and W ca = decay itear, decay is the decay rate, itear number of iterations , Each round of newly added points corresponds to a trust coefficient, and each round is multiplied by the decay rate.
  9. 一种商品推荐设备,其特征在于,包括:A product recommendation device, characterized in that it includes:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于执行所述计算机程序时实现如权利要求1至4任一项所述商品推荐方法的步骤。The processor is configured to implement the steps of the commodity recommendation method according to any one of claims 1 to 4 when the computer program is executed.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4任一项所述商品推荐方法的步骤。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the method for recommending a product according to any one of claims 1 to 4 step.
PCT/CN2020/075477 2019-02-18 2020-02-17 Product recommendation method, apparatus, and device and storage medium WO2020168992A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910123041.2A CN109658210A (en) 2019-02-18 2019-02-18 A kind of Method of Commodity Recommendation, device, equipment and storage medium
CN201910123041.2 2019-02-18

Publications (1)

Publication Number Publication Date
WO2020168992A1 true WO2020168992A1 (en) 2020-08-27

Family

ID=66123097

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075477 WO2020168992A1 (en) 2019-02-18 2020-02-17 Product recommendation method, apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN109658210A (en)
WO (1) WO2020168992A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658210A (en) * 2019-02-18 2019-04-19 苏州大学 A kind of Method of Commodity Recommendation, device, equipment and storage medium
CN111523590B (en) * 2020-04-21 2023-04-07 莫毓昌 Multi-data source fusion method for scoring matrix
CN111695040B (en) * 2020-06-12 2023-03-24 陕西师范大学 Fashion product recommendation method, system and device based on emotion label
CN112115359B (en) * 2020-09-16 2023-10-31 苏州大学 Recommendation system and method based on multi-order neighbor prediction
CN113535790A (en) * 2021-07-19 2021-10-22 成都数之联科技有限公司 Collaborative recommendation optimization method and device, electronic equipment and readable storage medium
CN113672813B (en) * 2021-08-26 2024-08-02 武汉卓尔数字传媒科技有限公司 Article recommendation method, device, terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271559A (en) * 2008-05-16 2008-09-24 华东师范大学 Cooperation recommending system based on user partial interest digging
CN101482884A (en) * 2009-01-21 2009-07-15 华东师范大学 Cooperation recommending system based on user predilection grade distribution
CN104281956A (en) * 2014-10-27 2015-01-14 南京信息工程大学 Dynamic recommendation method capable of adapting to user interest changes based on time information
CN104462597A (en) * 2014-12-31 2015-03-25 湖南大学 Comprehensive user positive and negative grading and grading preference factor collaborative filtering algorithm
US20150339756A1 (en) * 2014-05-23 2015-11-26 Ebay Inc. Personalizing alternative recommendations using search context
CN109658210A (en) * 2019-02-18 2019-04-19 苏州大学 A kind of Method of Commodity Recommendation, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033867B (en) * 2010-12-14 2012-07-25 西北工业大学 Semantic-similarity measuring method for XML (Extensible Markup Language) document classification
CN105069122B (en) * 2015-08-12 2018-08-21 天津大学 A kind of personalized recommendation method and its recommendation apparatus based on user behavior
CN105205128B (en) * 2015-09-14 2018-08-28 清华大学 Sequential based on scoring feature recommends method and recommendation apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271559A (en) * 2008-05-16 2008-09-24 华东师范大学 Cooperation recommending system based on user partial interest digging
CN101482884A (en) * 2009-01-21 2009-07-15 华东师范大学 Cooperation recommending system based on user predilection grade distribution
US20150339756A1 (en) * 2014-05-23 2015-11-26 Ebay Inc. Personalizing alternative recommendations using search context
CN104281956A (en) * 2014-10-27 2015-01-14 南京信息工程大学 Dynamic recommendation method capable of adapting to user interest changes based on time information
CN104462597A (en) * 2014-12-31 2015-03-25 湖南大学 Comprehensive user positive and negative grading and grading preference factor collaborative filtering algorithm
CN109658210A (en) * 2019-02-18 2019-04-19 苏州大学 A kind of Method of Commodity Recommendation, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109658210A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020168992A1 (en) Product recommendation method, apparatus, and device and storage medium
Liu et al. Wisdom of the better few: cold start recommendation via representative based rating elicitation
Ning et al. A comprehensive survey of neighborhood-based recommendation methods
CN104317835B (en) The new user of video terminal recommends method
Sieg et al. Improving the effectiveness of collaborative recommendation with ontology-based user profiles
WO2020238502A1 (en) Article recommendation method and apparatus, electronic device and storage medium
US7680768B2 (en) Information processing apparatus and method, program, and storage medium
WO2015032353A1 (en) Video recommendation method and device
CN112417313A (en) Model hybrid recommendation method based on knowledge graph convolutional network
Valcarce et al. Additive smoothing for relevance-based language modelling of recommender systems
US20180025364A1 (en) Information processing apparatus, information processing method, and program
CN111797319B (en) Recommendation method, recommendation device, recommendation equipment and storage medium
Huang et al. Improved collaborative filtering personalized recommendation algorithm based on k-means clustering and weighted similarity on the reduced item space
CN104794135B (en) A kind of method and apparatus being ranked up to search result
Sánchez et al. Attribute-based evaluation for recommender systems: incorporating user and item attributes in evaluation metrics
Sani et al. A new strategy in trust-based recommender system using k-means clustering
CN104951956A (en) Film ranking method and device
CN108763515B (en) Time-sensitive personalized recommendation method based on probability matrix decomposition
Liu et al. Adaptive local low-rank matrix approximation for recommendation
CN110309361B (en) Video scoring determination method, recommendation method and device and electronic equipment
Zhang et al. Information filtering via heterogeneous diffusion in online bipartite networks
Song et al. An Euclidean similarity measurement approach for hotel rating data analysis
CN113505216A (en) Multi-feature thesis recommendation method based on reference graph
Chen et al. Optimizing online social networks for information propagation
Friedrich et al. User preference-based probability spreading for tag-aware content recommendation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20758990

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20758990

Country of ref document: EP

Kind code of ref document: A1