WO2019085120A1 - Collaborative filtering recommendation method, electronic device, and computer readable storage medium - Google Patents

Collaborative filtering recommendation method, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2019085120A1
WO2019085120A1 PCT/CN2017/113724 CN2017113724W WO2019085120A1 WO 2019085120 A1 WO2019085120 A1 WO 2019085120A1 CN 2017113724 W CN2017113724 W CN 2017113724W WO 2019085120 A1 WO2019085120 A1 WO 2019085120A1
Authority
WO
WIPO (PCT)
Prior art keywords
tag
user
target user
correlation
label
Prior art date
Application number
PCT/CN2017/113724
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 WO2019085120A1 publication Critical patent/WO2019085120A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Definitions

  • the present application relates to the field of computer information technology, and in particular, to a collaborative filtering recommendation method, an electronic device, and a computer readable storage medium.
  • the traditional collaborative filtering recommendation methods mainly include user-based collaborative filtering recommendation and project-based collaborative filtering recommendation.
  • the traditional collaborative filtering recommendation algorithm may not be able to perform similarity calculation.
  • the design of the collaborative filtering recommendation method in the prior art is not reasonable enough and needs to be improved.
  • the present application proposes a collaborative filtering recommendation method, an electronic device, and a computer readable storage medium, and solves the sparseness and interest of the traditional collaborative filtering method scoring matrix by introducing a user-tag correlation matrix and a tag-item correlation matrix.
  • the single problem of the model reduces the scale of the scoring matrix and improves the efficiency of the algorithm.
  • the present application provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores a collaborative filtering recommendation system that can be run on the processor, and the collaborative filtering recommendation
  • the system implements the following steps when executed by the processor:
  • the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix stores a correlation between all users and all tags;
  • the similarity between the target user and different designated users is calculated by using a first calculation formula.
  • the first calculation formula is set to Equation 1:
  • Equation 1 Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target
  • the correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
  • the average of the correlation between the user u a and all tags Represents the average of the correlation of user u s with all tags.
  • the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to formula 2:
  • Equation 2 P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
  • the recommending the item related to the original label and the newly added label to the target user comprises:
  • the correlation between the selection label and each item in the project set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
  • Equation 3 t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
  • the present application further provides a collaborative filtering recommendation method, which is applied to an electronic device, and the method includes:
  • the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix stores a correlation between all users and all tags;
  • the similarity between the target user and different specified users is calculated by using a first calculation formula, and the first calculation formula is set to formula 1:
  • Equation 1 Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target
  • the correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
  • the average of the correlation between the user u a and all tags Represents the average of the correlation of user u s with all tags.
  • the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to formula 2:
  • Equation 2 P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
  • the recommending the item related to the original label and the newly added label to the target user comprises:
  • the correlation between the selection label and each item in the project set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
  • Equation 3 t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
  • the present application further provides a computer readable storage medium,
  • the computer readable storage medium stores a collaborative filtering recommendation system executable by at least one processor to cause the at least one processor to perform the steps of the collaborative filtering recommendation method as described above.
  • the electronic device, the collaborative filtering recommendation method and the computer readable storage medium proposed by the present application solve the traditional collaborative filtering method scoring matrix by introducing a user-tag correlation matrix and a tag-item correlation matrix.
  • the sparseness and interest model are single, which reduces the scale of the scoring matrix, improves the efficiency of the algorithm, and enhances the scalability of the algorithm.
  • the user label-based collaborative filtering recommendation effect used in this application is superior to the traditional collaborative filtering method.
  • 1 is a schematic diagram of an optional hardware architecture of an electronic device of the present application
  • FIG. 2 is a schematic diagram of a program module of an embodiment of a collaborative filtering recommendation system in an electronic device of the present application
  • FIG. 3 is a schematic diagram of an implementation process of an embodiment of a collaborative filtering recommendation method according to the present application.
  • FIG. 1 it is a schematic diagram of an optional hardware architecture of the electronic device 2 of the present application.
  • the electronic device 2 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can communicate with each other through a system bus. It is pointed out that FIG. 1 only shows the electronic device 2 with the components 21-23, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the electronic device 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the electronic device 2 may be an independent server or a server cluster composed of multiple servers. .
  • the memory 21 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2.
  • the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc.
  • the memory 21 may also include both an internal storage unit of the electronic device 2 and an external storage device thereof.
  • the memory 21 is generally used to store an operating system installed in the electronic device 2 and various types of application software, such as program code of the collaborative filtering recommendation system 20. Further, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. This treatment The device 22 is typically used to control the overall operation of the electronic device 2, such as performing control and processing associated with data interaction or communication with the electronic device 2. In this embodiment, the processor 22 is configured to run program code or process data stored in the memory 21, such as running the collaborative filtering recommendation system 20 and the like.
  • CPU Central Processing Unit
  • controller microcontroller
  • microprocessor microprocessor
  • the network interface 23 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 2 and other electronic devices.
  • the network interface 23 is configured to connect the electronic device 2 to an external data platform through a network, and establish a data transmission channel and a communication connection between the electronic device 2 and an external data platform.
  • the network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network.
  • Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
  • the collaborative filtering recommendation system 20 may be divided into one or more program modules, the one or more program modules being stored in the memory 21 and being processed by one or more processors ( This embodiment is executed by the processor 22) to complete the application.
  • the collaborative filtering recommendation system 20 can be divided into a computing module 201, a selection module 202, and a recommendation module 203.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the collaborative filtering recommendation system 20 in the electronic device 2. The function of each program module 201-203 will be described in detail below.
  • the calculating module 201 is configured to calculate a similarity between the target user and different specified users according to the user-tag correlation matrix, and select the first predetermined number of designated users according to the order of similarity from high to low (if the similarity is high)
  • the first 10 specified users are the closest neighbor collection of the target user.
  • the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a tag (such as a property insurance user tag, etc.). Further, the two-dimensional matrix stores the correlation between all users and all tags.
  • the similarity between the target user and different specified users is calculated by using a first calculation formula, wherein the first calculation formula may be set as shown in the following formula 1.
  • the Sa , s represents a similarity between the target user u a and the specified user u s
  • T a s represents a label used by the target user u a and the specified user u s
  • r a, t represents the target
  • the correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t
  • the average of the correlation between the user u a and all tags Represents the average of the correlation of user u s with all tags.
  • the selecting module 202 is configured to select, from the user tags of the nearest neighbor set, a tag that is not used by the target user, as a candidate tag of the target user (recorded as a set).
  • the calculation module 201 is further configured to calculate a correlation between the target user and each candidate tag, and select a second predetermined number of candidate tags according to a high-to-low correlation (for example, the first three related correlations) Candidate tag) as a new tag for this target user.
  • a high-to-low correlation for example, the first three related correlations
  • the correlation between the target user and each candidate tag is calculated by using a second calculation formula, wherein the second calculation formula may be set as shown in the following formula 2.
  • the P a,k represents the correlation between the target user u a and the candidate tag t k
  • U K represents the user set using the tag t k
  • Sa a specified number of users
  • u represents the similarity between the target user u a and the specified user u u
  • r u, k represents the relationship between the specified user u u and the candidate tag t k Correlation (ie, assigning the user u u to use the weight of the candidate tag t k ).
  • the recommendation module 203 is configured to recommend an item related to the original label and the newly added label to the target user according to the original label and the newly added label of the target user.
  • the original label of the target user may be a label of the target user originally stored in the user-tag correlation matrix.
  • the recommending the item related to the original label and the newly added label to the target user includes the following steps:
  • the third predetermined number of items are selected and recommended to the target user.
  • the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, wherein the third calculation formula may be set as shown in the following formula 3.
  • t 1 represents an original label of the target user and a label in the newly added label set T N (ie, t 1 ⁇ T N )
  • i represents an item in the item set I t1 marked by the label t 1 , t 1 , i) represents the correlation of the tag t 1 with the item i
  • countUser(t 1 , i) represents the number of users associated with the item i and the tag t 1
  • countUser(t 1 , j) represents the item j and the tag t 1
  • the number of related users, the right denominator part of Equation 3 represents the number of all users associated with the tag t 1 in the item set I t1 .
  • the collaborative filtering recommendation system 20 proposed by the present application solves the problem of sparse scoring matrix and single interest model of the traditional collaborative filtering method by introducing a user-tag correlation matrix and a tag-item correlation matrix.
  • the scale of the scoring matrix is reduced, the efficiency of the algorithm is improved, and the scalability of the algorithm is enhanced.
  • the collaborative filtering recommendation effect based on user tags used in the present application is superior to the traditional collaborative filtering method.
  • the present application also proposes a collaborative filtering recommendation method.
  • FIG. 3 it is a schematic flowchart of an implementation process of an embodiment of the collaborative filtering recommendation method of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 3 may be changed according to different requirements, and some steps may be omitted.
  • Step S31 calculating the similarity between the target user and different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users according to the order of similarity from high to low (eg, the top 10 designations with higher similarity) User) as the closest neighbor set for the target user.
  • the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a tag (such as a property insurance user tag, etc.). Further, the two-dimensional matrix stores the correlation between all users and all tags.
  • the similarity between the target user and different specified users is calculated by using a first calculation formula, wherein the first calculation formula may be set as shown in the following formula 1.
  • the Sa , s represents a similarity between the target user u a and the specified user u s
  • T a s represents a label used by the target user u a and the specified user u s
  • r a, t represents the target
  • the correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t
  • the average of the correlation between the user u a and all tags Represents the average of the correlation of user u s with all tags.
  • Step S32 Select a label that is not used by the target user from the user labels of the nearest neighbor set as a candidate label of the target user (recorded as a set).
  • Step S33 calculating a correlation between the target user and each candidate tag, and selecting a second predetermined number of candidate tags (such as the top 3 candidate tags with higher correlation) as the target according to the order of relevance from high to low. User's new label.
  • the correlation between the target user and each candidate tag is calculated by using a second calculation formula, wherein the second calculation formula may be set as shown in the following formula 2.
  • the P a,k represents the correlation between the target user u a and the candidate tag t k
  • U K represents the user set using the tag t k
  • Sa a specified number of users
  • u represents the similarity between the target user u a and the specified user u u
  • r u, k represents the relationship between the specified user u u and the candidate tag t k Correlation (ie, assigning the user u u to use the weight of the candidate tag t k ).
  • Step S34 recommending items related to the original label and the newly added label to the target user according to the original label and the newly added label of the target user.
  • the original label of the target user may be a label of the target user originally stored in the user-tag correlation matrix.
  • the recommending the item related to the original label and the newly added label to the target user includes the following steps:
  • the third predetermined number of items are selected and recommended to the target user.
  • the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, wherein the third calculation formula may be set as shown in the following formula 3.
  • t 1 represents an original label of the target user and a label in the newly added label set T N (ie, t 1 ⁇ T N )
  • i represents an item in the item set I t1 marked by the label t 1 , t 1 , i) represents the correlation of the tag t 1 with the item i
  • countUser(t 1 , i) represents the number of users associated with the item i and the tag t 1
  • countUser(t 1 , j) represents the item j and the tag t 1
  • the number of related users, the right denominator part of Equation 3 represents the number of all users associated with the tag t 1 in the item set I t1 .
  • the collaborative filtering recommendation method proposed by the present application solves the problem of sparse scoring matrix and single interest model of the traditional collaborative filtering method by introducing a user-tag correlation matrix and a label-item correlation matrix, and reduces the problem.
  • the scale of the scoring matrix improves the efficiency of the algorithm and enhances the scalability of the algorithm.
  • the user label-based collaborative filtering recommendation effect used in this application is superior to the traditional collaborative filtering method.
  • the present application further provides a computer readable storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), where the computer readable storage medium stores a collaborative filtering recommendation system 20, and the collaborative filtering
  • the recommendation system 20 can be executed by at least one processor 22 to cause the at least one processor 22 to perform the steps of the collaborative filtering recommendation method as described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

A collaborative filtering recommendation method. The method comprises the steps of: calculating similarities of a target user to different designated users according to a user tag correlation matrix, and selecting a first preset number of designated users as a nearest neighbor set of the target user according to a descending order of the similarities (S31); selecting, from user tags of the nearest neighbor set, tags that are not used by the target user, and using same as candidate tags of the target user (S32); calculating a correlation of the target user to each candidate tag, and selecting a second preset number of candidate tags as newly-added tags of the target user according to a descending order of the correlations (S33); and recommending items related to original tags and the newly-added tags to the target user according to the original tags and the newly-added tags of the target user (S34). The recommendation efficiency can be improved.

Description

协同过滤推荐方法、电子设备及计算机可读存储介质Collaborative filtering recommendation method, electronic device and computer readable storage medium
本申请要求于2017年11月01日提交中国专利局、申请号为201711059396.7、发明名称为“协同过滤推荐方法、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of the Chinese Patent Application filed on November 1, 2017, the Chinese Patent Office, Application No. 201711059396.7, entitled "Collaborative Filtering Recommendation Method, Electronic Device, and Computer Readable Storage Media", the entire contents of which are hereby incorporated by reference. The citation is incorporated in the application.
技术领域Technical field
本申请涉及计算机信息技术领域,尤其涉及一种协同过滤推荐方法、电子设备及计算机可读存储介质。The present application relates to the field of computer information technology, and in particular, to a collaborative filtering recommendation method, an electronic device, and a computer readable storage medium.
背景技术Background technique
目前,传统的协同过滤推荐方法主要包括基于用户的协同过滤推荐和基于项目的协同过滤推荐。然而,在评分矩阵稀疏的情况下,传统的协同过滤推荐算法可能无法进行相似性计算。并且,随着用户的增长,计算量呈线性增长,可扩展性不是很理想。故,现有技术中的协同过滤推荐方法设计不够合理,亟需改进。At present, the traditional collaborative filtering recommendation methods mainly include user-based collaborative filtering recommendation and project-based collaborative filtering recommendation. However, in the case where the scoring matrix is sparse, the traditional collaborative filtering recommendation algorithm may not be able to perform similarity calculation. Moreover, as the user grows, the amount of calculation increases linearly, and the scalability is not ideal. Therefore, the design of the collaborative filtering recommendation method in the prior art is not reasonable enough and needs to be improved.
发明内容Summary of the invention
有鉴于此,本申请提出一种协同过滤推荐方法、电子设备及计算机可读存储介质,通过引入用户-标签相关性矩阵和标签-项目相关性矩阵,解决了传统协同过滤方法评分矩阵稀疏和兴趣模型单一等问题,缩小了评分矩阵的规模,提高了算法运行效率。In view of this, the present application proposes a collaborative filtering recommendation method, an electronic device, and a computer readable storage medium, and solves the sparseness and interest of the traditional collaborative filtering method scoring matrix by introducing a user-tag correlation matrix and a tag-item correlation matrix. The single problem of the model reduces the scale of the scoring matrix and improves the efficiency of the algorithm.
首先,为实现上述目的,本申请提出一种电子设备,所述电子设备包括存储器及处理器,所述存储器上存储有可在所述处理器上运行的协同过滤推荐系统,所述协同过滤推荐系统被所述处理器执行时实现如下步骤:First, in order to achieve the above object, the present application provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores a collaborative filtering recommendation system that can be run on the processor, and the collaborative filtering recommendation The system implements the following steps when executed by the processor:
根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户作为该目标用户的最近邻居集合;Calculating the similarity between the target user and the different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users as the nearest neighbor set of the target user according to the order of similarity from high to low;
从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签;Selecting, from the user tags of the nearest neighbor set, a tag that is not used by the target user as a candidate tag of the target user;
计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签作为该目标用户的新增标签;及Calculating a correlation between the target user and each candidate tag, and selecting a second predetermined number of candidate tags as the new tag of the target user according to the order of relevance from highest to lowest; and
根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。According to the original label and the newly added label of the target user, items related to the original label and the newly added label are recommended to the target user.
优选地,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签,该二维矩阵存储有所有用户与所有标签之间的相关性;Preferably, the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix stores a correlation between all users and all tags;
所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,所 述第一计算公式设置为公式1:The similarity between the target user and different designated users is calculated by using a first calculation formula. The first calculation formula is set to Equation 1:
Figure PCTCN2017113724-appb-000001
Figure PCTCN2017113724-appb-000001
公式1中,Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
Figure PCTCN2017113724-appb-000002
代表用户ua与所有标签的相关性的平均值,
Figure PCTCN2017113724-appb-000003
代表用户us与所有标签的相关性的平均值。
In Equation 1, Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
Figure PCTCN2017113724-appb-000002
The average of the correlation between the user u a and all tags,
Figure PCTCN2017113724-appb-000003
Represents the average of the correlation of user u s with all tags.
优选地,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,所述第二计算公式设置为公式2:Preferably, the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to formula 2:
Figure PCTCN2017113724-appb-000004
Figure PCTCN2017113724-appb-000004
公式2中,Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户,Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性。In Equation 2, P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
优选地,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括:Preferably, the recommending the item related to the original label and the newly added label to the target user comprises:
从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性,按照相关性从高到低的顺序,选取第三预定数量的项目推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user to obtain a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set, in descending order of relevance. , selecting a third predetermined number of items to recommend to the target user.
优选地,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,所述第三计算公式设置为公式3:Preferably, the correlation between the selection label and each item in the project set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
Figure PCTCN2017113724-appb-000005
Figure PCTCN2017113724-appb-000005
公式3中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签,i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数。In Equation 3, t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
此外,为实现上述目的,本申请还提供一种协同过滤推荐方法,该方法应用于电子设备,所述方法包括:In addition, to achieve the above object, the present application further provides a collaborative filtering recommendation method, which is applied to an electronic device, and the method includes:
根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户作为该目标用户的最近邻居集合;Calculating the similarity between the target user and the different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users as the nearest neighbor set of the target user according to the order of similarity from high to low;
从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签;Selecting, from the user tags of the nearest neighbor set, a tag that is not used by the target user as a candidate tag of the target user;
计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序, 选取第二预定数量的候选标签作为该目标用户的新增标签;及Calculate the relevance of the target user to each candidate tag, in descending order of relevance, Selecting a second predetermined number of candidate tags as the new tag of the target user; and
根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。According to the original label and the newly added label of the target user, items related to the original label and the newly added label are recommended to the target user.
优选地,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签,该二维矩阵存储有所有用户与所有标签之间的相关性;Preferably, the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix stores a correlation between all users and all tags;
所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,所述第一计算公式设置为公式1:The similarity between the target user and different specified users is calculated by using a first calculation formula, and the first calculation formula is set to formula 1:
Figure PCTCN2017113724-appb-000006
Figure PCTCN2017113724-appb-000006
公式1中,Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
Figure PCTCN2017113724-appb-000007
代表用户ua与所有标签的相关性的平均值,
Figure PCTCN2017113724-appb-000008
代表用户us与所有标签的相关性的平均值。
In Equation 1, Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
Figure PCTCN2017113724-appb-000007
The average of the correlation between the user u a and all tags,
Figure PCTCN2017113724-appb-000008
Represents the average of the correlation of user u s with all tags.
优选地,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,所述第二计算公式设置为公式2:Preferably, the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to formula 2:
Figure PCTCN2017113724-appb-000009
Figure PCTCN2017113724-appb-000009
公式2中,Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户,Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性。In Equation 2, P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
优选地,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括:Preferably, the recommending the item related to the original label and the newly added label to the target user comprises:
从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性,按照相关性从高到低的顺序,选取第三预定数量的项目推荐至该目标用户;Selecting a label from the original label and the newly added label of the target user to obtain a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set, in descending order of relevance. , selecting a third predetermined number of items to recommend to the target user;
该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,所述第三计算公式设置为公式3:The correlation between the selection label and each item in the project set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
Figure PCTCN2017113724-appb-000010
Figure PCTCN2017113724-appb-000010
公式3中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签,i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数。In Equation 3, t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质, 所述计算机可读存储介质存储有协同过滤推荐系统,所述协同过滤推荐系统可被至少一个处理器执行,以使所述至少一个处理器执行如上述的协同过滤推荐方法的步骤。Further, to achieve the above object, the present application further provides a computer readable storage medium, The computer readable storage medium stores a collaborative filtering recommendation system executable by at least one processor to cause the at least one processor to perform the steps of the collaborative filtering recommendation method as described above.
相较于现有技术,本申请所提出的电子设备、协同过滤推荐方法及计算机可读存储介质,通过引入用户-标签相关性矩阵和标签-项目相关性矩阵,解决了传统协同过滤方法评分矩阵稀疏和兴趣模型单一等问题,缩小了评分矩阵的规模,提高了算法运行效率,增强了算法的可扩展性,本申请所采用的基于用户标签的协同过滤推荐效果要优于传统协同过滤方法。Compared with the prior art, the electronic device, the collaborative filtering recommendation method and the computer readable storage medium proposed by the present application solve the traditional collaborative filtering method scoring matrix by introducing a user-tag correlation matrix and a tag-item correlation matrix. The sparseness and interest model are single, which reduces the scale of the scoring matrix, improves the efficiency of the algorithm, and enhances the scalability of the algorithm. The user label-based collaborative filtering recommendation effect used in this application is superior to the traditional collaborative filtering method.
附图说明DRAWINGS
图1是本申请电子设备一可选的硬件架构的示意图;1 is a schematic diagram of an optional hardware architecture of an electronic device of the present application;
图2是本申请电子设备中协同过滤推荐系统一实施例的程序模块示意图;2 is a schematic diagram of a program module of an embodiment of a collaborative filtering recommendation system in an electronic device of the present application;
图3为本申请协同过滤推荐方法一实施例的实施流程示意图。FIG. 3 is a schematic diagram of an implementation process of an embodiment of a collaborative filtering recommendation method according to the present application.
附图标记:Reference mark:
电子设备 Electronic equipment 22
存储器Memory 21twenty one
处理器processor 22twenty two
网络接口Network Interface 23twenty three
协同过滤推荐系统Collaborative filtering recommendation system 2020
计算模块 Calculation module 201201
选取模块 Selection module 202202
推荐模块 Recommended module 203203
流程步骤Process step S31-S34S31-S34
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。 In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions of "first", "second" and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Thus, features defining "first" or "second" may include at least one of the features, either explicitly or implicitly. In addition, the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
进一步需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is further to be understood that the term "comprises", "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a And includes other elements not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
首先,本申请提出一种电子设备2。First of all, the present application proposes an electronic device 2.
参阅图1所示,是本申请电子设备2一可选的硬件架构的示意图。本实施例中,所述电子设备2可包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23。需要指出的是,图1仅示出了具有组件21-23的电子设备2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Referring to FIG. 1, it is a schematic diagram of an optional hardware architecture of the electronic device 2 of the present application. In this embodiment, the electronic device 2 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can communicate with each other through a system bus. It is pointed out that FIG. 1 only shows the electronic device 2 with the components 21-23, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
其中,所述电子设备2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该电子设备2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。The electronic device 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server. The electronic device 2 may be an independent server or a server cluster composed of multiple servers. .
所述存储器21至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器21可以是所述电子设备2的内部存储单元,例如该电子设备2的硬盘或内存。在另一些实施例中,所述存储器21也可以是所述电子设备2的外部存储设备,例如该电子设备2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括所述电子设备2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器21通常用于存储安装于所述电子设备2的操作系统和各类应用软件,例如协同过滤推荐系统20的程序代码等。此外,所述存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 21 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc. Of course, the memory 21 may also include both an internal storage unit of the electronic device 2 and an external storage device thereof. In this embodiment, the memory 21 is generally used to store an operating system installed in the electronic device 2 and various types of application software, such as program code of the collaborative filtering recommendation system 20. Further, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理 器22通常用于控制所述电子设备2的总体操作,例如执行与所述电子设备2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器22用于运行所述存储器21中存储的程序代码或者处理数据,例如运行所述的协同过滤推荐系统20等。The processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. This treatment The device 22 is typically used to control the overall operation of the electronic device 2, such as performing control and processing associated with data interaction or communication with the electronic device 2. In this embodiment, the processor 22 is configured to run program code or process data stored in the memory 21, such as running the collaborative filtering recommendation system 20 and the like.
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述电子设备2与其他电子设备之间建立通信连接。例如,所述网络接口23用于通过网络将所述电子设备2与外部数据平台相连,在所述电子设备2与外部数据平台之间的建立数据传输通道和通信连接。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。The network interface 23 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 2 and other electronic devices. For example, the network interface 23 is configured to connect the electronic device 2 to an external data platform through a network, and establish a data transmission channel and a communication connection between the electronic device 2 and an external data platform. The network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network. Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
至此,己经详细介绍了本申请各个实施例的应用环境和相关设备的硬件结构和功能。下面,将基于上述应用环境和相关设备,提出本申请的各个实施例。So far, the application environment of the various embodiments of the present application and the hardware structure and functions of related devices have been described in detail. Hereinafter, various embodiments of the present application will be proposed based on the above-described application environment and related devices.
参阅图2所示,是本申请电子设备2中协同过滤推荐系统20一实施例的程序模块图。本实施例中,所述的协同过滤推荐系统20可以被分割成一个或多个程序模块,所述一个或者多个程序模块被存储于所述存储器21中,并由一个或多个处理器(本实施例中为所述处理器22)所执行,以完成本申请。例如,在图2中,所述的协同过滤推荐系统20可以被分割成计算模块201、选取模块202、以及推荐模块203。本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述所述协同过滤推荐系统20在所述电子设备2中的执行过程。以下将就各程序模块201-203的功能进行详细描述。Referring to FIG. 2, it is a program module diagram of an embodiment of the collaborative filtering recommendation system 20 in the electronic device 2 of the present application. In this embodiment, the collaborative filtering recommendation system 20 may be divided into one or more program modules, the one or more program modules being stored in the memory 21 and being processed by one or more processors ( This embodiment is executed by the processor 22) to complete the application. For example, in FIG. 2, the collaborative filtering recommendation system 20 can be divided into a computing module 201, a selection module 202, and a recommendation module 203. The program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the collaborative filtering recommendation system 20 in the electronic device 2. The function of each program module 201-203 will be described in detail below.
所述计算模块201,用于根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户(如相似性较高的前10个指定用户)作为该目标用户的最近邻居集合。The calculating module 201 is configured to calculate a similarity between the target user and different specified users according to the user-tag correlation matrix, and select the first predetermined number of designated users according to the order of similarity from high to low (if the similarity is high) The first 10 specified users) are the closest neighbor collection of the target user.
优选地,在本实施例中,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签(如产险用户标签等)。进一步地,该二维矩阵存储有所有用户与所有标签之间的相关性。Preferably, in this embodiment, the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a tag (such as a property insurance user tag, etc.). Further, the two-dimensional matrix stores the correlation between all users and all tags.
优选地,在本实施例中,所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,其中,所述第一计算公式可以设置为如下公式1所示。Preferably, in this embodiment, the similarity between the target user and different specified users is calculated by using a first calculation formula, wherein the first calculation formula may be set as shown in the following formula 1.
Figure PCTCN2017113724-appb-000011
Figure PCTCN2017113724-appb-000011
其中,所述Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
Figure PCTCN2017113724-appb-000012
代表用户ua与所有标签的相关 性的平均值,
Figure PCTCN2017113724-appb-000013
代表用户us与所有标签的相关性的平均值。
Wherein, the Sa , s represents a similarity between the target user u a and the specified user u s , and T a, s represents a label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
Figure PCTCN2017113724-appb-000012
The average of the correlation between the user u a and all tags,
Figure PCTCN2017113724-appb-000013
Represents the average of the correlation of user u s with all tags.
所述选取模块202,用于从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签(作为一个集合记录下来)。The selecting module 202 is configured to select, from the user tags of the nearest neighbor set, a tag that is not used by the target user, as a candidate tag of the target user (recorded as a set).
所述计算模块201,还用于计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签(如相关性较高的前3个候选标签)作为该目标用户的新增标签。The calculation module 201 is further configured to calculate a correlation between the target user and each candidate tag, and select a second predetermined number of candidate tags according to a high-to-low correlation (for example, the first three related correlations) Candidate tag) as a new tag for this target user.
优选地,在本实施例中,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,其中,所述第二计算公式可以设置为如下公式2所示。Preferably, in this embodiment, the correlation between the target user and each candidate tag is calculated by using a second calculation formula, wherein the second calculation formula may be set as shown in the following formula 2.
Figure PCTCN2017113724-appb-000014
Figure PCTCN2017113724-appb-000014
其中,所述Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户(即第一预定数量的指定用户,N=第一预定数量),Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性(即指定用户uu使用候选标签tk的权重)。Wherein, the P a,k represents the correlation between the target user u a and the candidate tag t k , U K represents the user set using the tag t k , and U N represents all users of the nearest neighbor set (ie the first reservation) a specified number of users, N = first predetermined number), Sa , u represents the similarity between the target user u a and the specified user u u , and r u, k represents the relationship between the specified user u u and the candidate tag t k Correlation (ie, assigning the user u u to use the weight of the candidate tag t k ).
所述推荐模块203,用于根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。其中,该目标用户的原始标签可以是所述用户-标签相关性矩阵中原始存储的该目标用户的标签。The recommendation module 203 is configured to recommend an item related to the original label and the newly added label to the target user according to the original label and the newly added label of the target user. The original label of the target user may be a label of the target user originally stored in the user-tag correlation matrix.
优选地,在本实施例中,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括如下步骤:Preferably, in this embodiment, the recommending the item related to the original label and the newly added label to the target user includes the following steps:
从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性(得到标签-项目相关性矩阵),按照相关性从高到低的顺序,选取第三预定数量的项目(如相关性较高的前3个项目)推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user, obtaining a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set (getting a label-item correlation matrix), According to the order of relevance from high to low, the third predetermined number of items (such as the top 3 items with higher relevance) are selected and recommended to the target user.
进一步地,在本实施例中,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,其中,所述第三计算公式可以设置为如下公式3所示。Further, in this embodiment, the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, wherein the third calculation formula may be set as shown in the following formula 3.
Figure PCTCN2017113724-appb-000015
Figure PCTCN2017113724-appb-000015
其中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签(即t1∈TN),i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数,公式3右边分母部分代表项目集It1中跟标签t1相关的所有用户数。 Where t 1 represents an original label of the target user and a label in the newly added label set T N (ie, t 1 ∈T N ), and i represents an item in the item set I t1 marked by the label t 1 , t 1 , i) represents the correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with the item i and the tag t 1 , and countUser(t 1 , j) represents the item j and the tag t 1 The number of related users, the right denominator part of Equation 3 represents the number of all users associated with the tag t 1 in the item set I t1 .
需要说明的是,传统的基于用户的协同过滤和基于项目的协同过滤存在评分矩阵稀疏、兴趣模型单一和冷启动等问题,本申请将用户标签引入协同过滤,通过用户-标签相关性矩阵和标签-项目相关性矩阵进行协同过滤,从而摒弃了传统的用户-项目矩阵模型,利用标签对项目进行了划分,弥补了传统协同过滤的缺陷。It should be noted that the traditional user-based collaborative filtering and project-based collaborative filtering have problems such as sparse scoring matrix, single interest model, and cold start. This application introduces user tags into collaborative filtering through user-tag correlation matrices and tags. - The project correlation matrix is collaboratively filtered, thus eliminating the traditional user-project matrix model and using the tags to divide the project to make up for the shortcomings of traditional collaborative filtering.
通过上述程序模块201-203,本申请所提出的协同过滤推荐系统20,通过引入用户-标签相关性矩阵和标签-项目相关性矩阵,解决了传统协同过滤方法评分矩阵稀疏和兴趣模型单一等问题,缩小了评分矩阵的规模,提高了算法运行效率,增强了算法的可扩展性,本申请所采用的基于用户标签的协同过滤推荐效果要优于传统协同过滤方法。Through the above-mentioned program modules 201-203, the collaborative filtering recommendation system 20 proposed by the present application solves the problem of sparse scoring matrix and single interest model of the traditional collaborative filtering method by introducing a user-tag correlation matrix and a tag-item correlation matrix. The scale of the scoring matrix is reduced, the efficiency of the algorithm is improved, and the scalability of the algorithm is enhanced. The collaborative filtering recommendation effect based on user tags used in the present application is superior to the traditional collaborative filtering method.
此外,本申请还提出一种协同过滤推荐方法。In addition, the present application also proposes a collaborative filtering recommendation method.
参阅图3所示,是本申请协同过滤推荐方法一实施例的实施流程示意图。在本实施例中,根据不同的需求,图3所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。Referring to FIG. 3, it is a schematic flowchart of an implementation process of an embodiment of the collaborative filtering recommendation method of the present application. In this embodiment, the order of execution of the steps in the flowchart shown in FIG. 3 may be changed according to different requirements, and some steps may be omitted.
步骤S31,根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户(如相似性较高的前10个指定用户)作为该目标用户的最近邻居集合。Step S31, calculating the similarity between the target user and different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users according to the order of similarity from high to low (eg, the top 10 designations with higher similarity) User) as the closest neighbor set for the target user.
优选地,在本实施例中,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签(如产险用户标签等)。进一步地,该二维矩阵存储有所有用户与所有标签之间的相关性。Preferably, in this embodiment, the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a tag (such as a property insurance user tag, etc.). Further, the two-dimensional matrix stores the correlation between all users and all tags.
优选地,在本实施例中,所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,其中,所述第一计算公式可以设置为如下公式1所示。Preferably, in this embodiment, the similarity between the target user and different specified users is calculated by using a first calculation formula, wherein the first calculation formula may be set as shown in the following formula 1.
Figure PCTCN2017113724-appb-000016
Figure PCTCN2017113724-appb-000016
其中,所述Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
Figure PCTCN2017113724-appb-000017
代表用户ua与所有标签的相关性的平均值,
Figure PCTCN2017113724-appb-000018
代表用户us与所有标签的相关性的平均值。
Wherein, the Sa , s represents a similarity between the target user u a and the specified user u s , and T a, s represents a label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
Figure PCTCN2017113724-appb-000017
The average of the correlation between the user u a and all tags,
Figure PCTCN2017113724-appb-000018
Represents the average of the correlation of user u s with all tags.
步骤S32,从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签(作为一个集合记录下来)。Step S32: Select a label that is not used by the target user from the user labels of the nearest neighbor set as a candidate label of the target user (recorded as a set).
步骤S33,计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签(如相关性较高的前3个候选标签)作为该目标用户的新增标签。Step S33, calculating a correlation between the target user and each candidate tag, and selecting a second predetermined number of candidate tags (such as the top 3 candidate tags with higher correlation) as the target according to the order of relevance from high to low. User's new label.
优选地,在本实施例中,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,其中,所述第二计算公式可以设置为如下公式2所示。 Preferably, in this embodiment, the correlation between the target user and each candidate tag is calculated by using a second calculation formula, wherein the second calculation formula may be set as shown in the following formula 2.
Figure PCTCN2017113724-appb-000019
Figure PCTCN2017113724-appb-000019
其中,所述Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户(即第一预定数量的指定用户,N=第一预定数量),Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性(即指定用户uu使用候选标签tk的权重)。Wherein, the P a,k represents the correlation between the target user u a and the candidate tag t k , U K represents the user set using the tag t k , and U N represents all users of the nearest neighbor set (ie the first reservation) a specified number of users, N = first predetermined number), Sa , u represents the similarity between the target user u a and the specified user u u , and r u, k represents the relationship between the specified user u u and the candidate tag t k Correlation (ie, assigning the user u u to use the weight of the candidate tag t k ).
步骤S34,根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。其中,该目标用户的原始标签可以是所述用户-标签相关性矩阵中原始存储的该目标用户的标签。Step S34, recommending items related to the original label and the newly added label to the target user according to the original label and the newly added label of the target user. The original label of the target user may be a label of the target user originally stored in the user-tag correlation matrix.
优选地,在本实施例中,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括如下步骤:Preferably, in this embodiment, the recommending the item related to the original label and the newly added label to the target user includes the following steps:
从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性(得到标签-项目相关性矩阵),按照相关性从高到低的顺序,选取第三预定数量的项目(如相关性较高的前3个项目)推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user, obtaining a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set (getting a label-item correlation matrix), According to the order of relevance from high to low, the third predetermined number of items (such as the top 3 items with higher relevance) are selected and recommended to the target user.
进一步地,在本实施例中,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,其中,所述第三计算公式可以设置为如下公式3所示。Further, in this embodiment, the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, wherein the third calculation formula may be set as shown in the following formula 3.
Figure PCTCN2017113724-appb-000020
Figure PCTCN2017113724-appb-000020
其中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签(即t1∈TN),i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数,公式3右边分母部分代表项目集It1中跟标签t1相关的所有用户数。Where t 1 represents an original label of the target user and a label in the newly added label set T N (ie, t 1 ∈T N ), and i represents an item in the item set I t1 marked by the label t 1 , t 1 , i) represents the correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with the item i and the tag t 1 , and countUser(t 1 , j) represents the item j and the tag t 1 The number of related users, the right denominator part of Equation 3 represents the number of all users associated with the tag t 1 in the item set I t1 .
需要说明的是,传统的基于用户的协同过滤和基于项目的协同过滤存在评分矩阵稀疏、兴趣模型单一和冷启动等问题,本申请将用户标签引入协同过滤,通过用户-标签相关性矩阵和标签-项目相关性矩阵进行协同过滤,从而摒弃了传统的用户-项目矩阵模型,利用标签对项目进行了划分,弥补了传统协同过滤的缺陷。It should be noted that the traditional user-based collaborative filtering and project-based collaborative filtering have problems such as sparse scoring matrix, single interest model, and cold start. This application introduces user tags into collaborative filtering through user-tag correlation matrices and tags. - The project correlation matrix is collaboratively filtered, thus eliminating the traditional user-project matrix model and using the tags to divide the project to make up for the shortcomings of traditional collaborative filtering.
通过上述步骤S31-S34,本申请所提出的协同过滤推荐方法,通过引入用户-标签相关性矩阵和标签-项目相关性矩阵,解决了传统协同过滤方法评分矩阵稀疏和兴趣模型单一等问题,缩小了评分矩阵的规模,提高了算法运行效率,增强了算法的可扩展性,本申请所采用的基于用户标签的协同过滤推荐效果要优于传统协同过滤方法。 Through the above steps S31-S34, the collaborative filtering recommendation method proposed by the present application solves the problem of sparse scoring matrix and single interest model of the traditional collaborative filtering method by introducing a user-tag correlation matrix and a label-item correlation matrix, and reduces the problem. The scale of the scoring matrix improves the efficiency of the algorithm and enhances the scalability of the algorithm. The user label-based collaborative filtering recommendation effect used in this application is superior to the traditional collaborative filtering method.
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质(如ROM/RAM、磁碟、光盘),所述计算机可读存储介质存储有协同过滤推荐系统20,所述协同过滤推荐系统20可被至少一个处理器22执行,以使所述至少一个处理器22执行如上所述的协同过滤推荐方法的步骤。Further, in order to achieve the above object, the present application further provides a computer readable storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), where the computer readable storage medium stores a collaborative filtering recommendation system 20, and the collaborative filtering The recommendation system 20 can be executed by at least one processor 22 to cause the at least one processor 22 to perform the steps of the collaborative filtering recommendation method as described above.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上参照附图说明了本申请的优选实施例,并非因此局限本申请的权利范围。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The preferred embodiments of the present application have been described above with reference to the drawings, and are not intended to limit the scope of the application. The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Additionally, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
本领域技术人员不脱离本申请的范围和实质,可以有多种变型方案实现本申请,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。 A person skilled in the art can implement the present application in various variants without departing from the scope and spirit of the present application. For example, the features as one embodiment can be used in another embodiment to obtain another embodiment. The equivalent structure or equivalent process transformations made by the present specification and the contents of the drawings, or directly or indirectly applied to other related technical fields, are all included in the scope of patent protection of the present application.

Claims (20)

  1. 一种电子设备,其特征在于,所述电子设备包括存储器及处理器,所述存储器上存储有可在所述处理器上运行的协同过滤推荐系统,所述协同过滤推荐系统被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory and a processor, wherein the memory stores a collaborative filtering recommendation system operable on the processor, the collaborative filtering recommendation system being The following steps are implemented during execution:
    根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户作为该目标用户的最近邻居集合;Calculating the similarity between the target user and the different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users as the nearest neighbor set of the target user according to the order of similarity from high to low;
    从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签;Selecting, from the user tags of the nearest neighbor set, a tag that is not used by the target user as a candidate tag of the target user;
    计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签作为该目标用户的新增标签;及Calculating a correlation between the target user and each candidate tag, and selecting a second predetermined number of candidate tags as the new tag of the target user according to the order of relevance from highest to lowest; and
    根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。According to the original label and the newly added label of the target user, items related to the original label and the newly added label are recommended to the target user.
  2. 如权利要求1所述的电子设备,其特征在于,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签,该二维矩阵存储有所有用户与所有标签之间的相关性;The electronic device according to claim 1, wherein the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix stores Correlation between all users and all tags;
    所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,所述第一计算公式设置为公式1:The similarity between the target user and different specified users is calculated by using a first calculation formula, and the first calculation formula is set to formula 1:
    Figure PCTCN2017113724-appb-100001
    Figure PCTCN2017113724-appb-100001
    公式1中,Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
    Figure PCTCN2017113724-appb-100002
    代表用户ua与所有标签的相关性的平均值,
    Figure PCTCN2017113724-appb-100003
    代表用户us与所有标签的相关性的平均值。
    In Equation 1, Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
    Figure PCTCN2017113724-appb-100002
    The average of the correlation between the user u a and all tags,
    Figure PCTCN2017113724-appb-100003
    Represents the average of the correlation of user u s with all tags.
  3. 如权利要求1所述的电子设备,其特征在于,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,所述第二计算公式设置为公式2:The electronic device according to claim 1, wherein the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to Equation 2:
    Figure PCTCN2017113724-appb-100004
    Figure PCTCN2017113724-appb-100004
    公式2中,Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户,Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性。 In Equation 2, P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
  4. 如权利要求1所述的电子设备,其特征在于,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括:The electronic device according to claim 1, wherein said recommending an item related to the original label and the newly added label to the target user comprises:
    从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性,按照相关性从高到低的顺序,选取第三预定数量的项目推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user to obtain a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set, in descending order of relevance. , selecting a third predetermined number of items to recommend to the target user.
  5. 如权利要求4所述的电子设备,其特征在于,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,所述第三计算公式设置为公式3:The electronic device according to claim 4, wherein the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
    Figure PCTCN2017113724-appb-100005
    Figure PCTCN2017113724-appb-100005
    公式3中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签,i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数。In Equation 3, t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
  6. 一种协同过滤推荐方法,应用于电子设备,其特征在于,所述方法包括:A collaborative filtering recommendation method is applied to an electronic device, and the method includes:
    根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户作为该目标用户的最近邻居集合;Calculating the similarity between the target user and the different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users as the nearest neighbor set of the target user according to the order of similarity from high to low;
    从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签;Selecting, from the user tags of the nearest neighbor set, a tag that is not used by the target user as a candidate tag of the target user;
    计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签作为该目标用户的新增标签;及Calculating a correlation between the target user and each candidate tag, and selecting a second predetermined number of candidate tags as the new tag of the target user according to the order of relevance from highest to lowest; and
    根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。According to the original label and the newly added label of the target user, items related to the original label and the newly added label are recommended to the target user.
  7. 如权利要求6所述的协同过滤推荐方法,其特征在于,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签,该二维矩阵存储有所有用户与所有标签之间的相关性;The collaborative filtering recommendation method according to claim 6, wherein the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix Stores the correlation between all users and all tags;
    所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,所述第一计算公式设置为公式1:The similarity between the target user and different specified users is calculated by using a first calculation formula, and the first calculation formula is set to formula 1:
    Figure PCTCN2017113724-appb-100006
    Figure PCTCN2017113724-appb-100006
    公式1中,Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
    Figure PCTCN2017113724-appb-100007
    代表用户ua与所有 标签的相关性的平均值,
    Figure PCTCN2017113724-appb-100008
    代表用户us与所有标签的相关性的平均值。
    In Equation 1, Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
    Figure PCTCN2017113724-appb-100007
    Means the average of the correlation of user u a with all tags,
    Figure PCTCN2017113724-appb-100008
    Represents the average of the correlation of user u s with all tags.
  8. 如权利要求6所述的协同过滤推荐方法,其特征在于,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,所述第二计算公式设置为公式2:The collaborative filtering recommendation method according to claim 6, wherein the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to formula 2:
    Figure PCTCN2017113724-appb-100009
    Figure PCTCN2017113724-appb-100009
    公式2中,Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户,Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性。In Equation 2, P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
  9. 如权利要求6所述的协同过滤推荐方法,其特征在于,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括:The collaborative filtering recommendation method according to claim 6, wherein the recommending the item related to the original label and the newly added label to the target user comprises:
    从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性,按照相关性从高到低的顺序,选取第三预定数量的项目推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user to obtain a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set, in descending order of relevance. , selecting a third predetermined number of items to recommend to the target user.
  10. 如权利要求9所述的协同过滤推荐方法,其特征在于,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,所述第三计算公式设置为公式3:The collaborative filtering recommendation method according to claim 9, wherein the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
    Figure PCTCN2017113724-appb-100010
    Figure PCTCN2017113724-appb-100010
    公式3中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签,i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数。In Equation 3, t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有协同过滤推荐系统,所述协同过滤推荐系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium, wherein the computer readable storage medium stores a collaborative filtering recommendation system, the collaborative filtering recommendation system being executable by at least one processor to cause the at least one processor to execute as follows step:
    根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户作为该目标用户的最近邻居集合;Calculating the similarity between the target user and the different designated users according to the user-tag correlation matrix, and selecting the first predetermined number of designated users as the nearest neighbor set of the target user according to the order of similarity from high to low;
    从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签;Selecting, from the user tags of the nearest neighbor set, a tag that is not used by the target user as a candidate tag of the target user;
    计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签作为该目标用户的新增标签;及 Calculating a correlation between the target user and each candidate tag, and selecting a second predetermined number of candidate tags as the new tag of the target user according to the order of relevance from highest to lowest; and
    根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。According to the original label and the newly added label of the target user, items related to the original label and the newly added label are recommended to the target user.
  12. 如权利要求11所述的计算机可读存储介质,其特征在于,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签,该二维矩阵存储有所有用户与所有标签之间的相关性;A computer readable storage medium according to claim 11, wherein said user-tag correlation matrix employs a two-dimensional matrix, each row of the two-dimensional matrix representing a user, each column representing a label, the two-dimensional The matrix stores the correlation between all users and all tags;
    所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,所述第一计算公式设置为公式1:The similarity between the target user and different specified users is calculated by using a first calculation formula, and the first calculation formula is set to formula 1:
    Figure PCTCN2017113724-appb-100011
    Figure PCTCN2017113724-appb-100011
    公式1中,Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
    Figure PCTCN2017113724-appb-100012
    代表用户ua与所有标签的相关性的平均值,
    Figure PCTCN2017113724-appb-100013
    代表用户us与所有标签的相关性的平均值。
    In Equation 1, Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
    Figure PCTCN2017113724-appb-100012
    The average of the correlation between the user u a and all tags,
    Figure PCTCN2017113724-appb-100013
    Represents the average of the correlation of user u s with all tags.
  13. 如权利要求11所述的计算机可读存储介质,其特征在于,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,所述第二计算公式设置为公式2:The computer readable storage medium according to claim 11, wherein the correlation of the target user with each candidate tag is calculated using a second calculation formula, and the second calculation formula is set to Equation 2:
    Figure PCTCN2017113724-appb-100014
    Figure PCTCN2017113724-appb-100014
    公式2中,Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户,Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性。In Equation 2, P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
  14. 如权利要求11所述的计算机可读存储介质,其特征在于,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括:The computer readable storage medium of claim 11, wherein the recommending an item related to the original label and the newly added label to the target user comprises:
    从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性,按照相关性从高到低的顺序,选取第三预定数量的项目推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user to obtain a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set, in descending order of relevance. , selecting a third predetermined number of items to recommend to the target user.
  15. 如权利要求14所述的计算机可读存储介质,其特征在于,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,所述第三计算公式设置为公式3:The computer readable storage medium according to claim 14, wherein the correlation between the selection label and each item in the item set is calculated by using a third calculation formula, and the third calculation formula is set to formula 3:
    Figure PCTCN2017113724-appb-100015
    Figure PCTCN2017113724-appb-100015
    公式3中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标 签,i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数。In Equation 3, t 1 represents an original label of the target user and a label in the newly added label set T N , i represents an item in the item set I t1 marked by the label t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
  16. 一种协同过滤推荐系统,其特征在于,包括:A collaborative filtering recommendation system, comprising:
    计算模块,用于根据用户-标签相关性矩阵计算目标用户与不同指定用户的相似性,按照相似性从高到低的顺序,选取第一预定数量的指定用户作为该目标用户的最近邻居集合;a calculation module, configured to calculate a similarity between the target user and different specified users according to the user-tag correlation matrix, and select a first predetermined number of designated users as the nearest neighbor set of the target user according to the order of similarity from high to low;
    选取模块,用于从所述最近邻居集合的用户标签中选取该目标用户未使用的标签,作为该目标用户的候选标签;a selection module, configured to select, from the user tags of the nearest neighbor set, a tag that is not used by the target user, as a candidate tag of the target user;
    所述计算模块,还用于计算该目标用户与每个候选标签的相关性,按照相关性从高到低的顺序,选取第二预定数量的候选标签作为该目标用户的新增标签;The calculating module is further configured to calculate a correlation between the target user and each candidate tag, and select a second predetermined number of candidate tags as a new tag of the target user according to a high to low correlation order;
    推荐模块,用于根据该目标用户的原始标签和新增标签,推荐与该原始标签和新增标签相关的项目至该目标用户。A recommendation module is configured to recommend an item related to the original label and the newly added label to the target user according to the original label and the newly added label of the target user.
  17. 如权利要求16所述的协同过滤推荐系统,其特征在于,所述用户-标签相关性矩阵采用二维矩阵,该二维矩阵的每一行代表一个用户,每一列代表一个标签,该二维矩阵存储有所有用户与所有标签之间的相关性;The collaborative filtering recommendation system according to claim 16, wherein the user-tag correlation matrix adopts a two-dimensional matrix, each row of the two-dimensional matrix represents a user, and each column represents a label, and the two-dimensional matrix Stores the correlation between all users and all tags;
    所述目标用户与不同指定用户的相似性采用第一计算公式计算得出,所述第一计算公式设置为公式1:The similarity between the target user and different specified users is calculated by using a first calculation formula, and the first calculation formula is set to formula 1:
    公式1中,Sa,s代表目标用户ua与指定用户us之间的相似度,Ta,s代表目标用户ua与指定用户us共同使用过的标签,ra,t代表目标用户ua与标签t之间的相关性,rs,t代表指定用户us与标签t之间的相关性,
    Figure PCTCN2017113724-appb-100017
    代表用户ua与所有标签的相关性的平均值,
    Figure PCTCN2017113724-appb-100018
    代表用户us与所有标签的相关性的平均值。
    In Equation 1, Sa a, s represents the similarity between the target user u a and the specified user u s , and T a, s represents the label used by the target user u a and the specified user u s , and r a, t represents the target The correlation between the user u a and the tag t, r s,t represents the correlation between the specified user u s and the tag t,
    Figure PCTCN2017113724-appb-100017
    The average of the correlation between the user u a and all tags,
    Figure PCTCN2017113724-appb-100018
    Represents the average of the correlation of user u s with all tags.
  18. 如权利要求16所述的协同过滤推荐系统,其特征在于,所述目标用户与每个候选标签的相关性采用第二计算公式计算得出,所述第二计算公式设置为公式2:The collaborative filtering recommendation system according to claim 16, wherein the correlation between the target user and each candidate tag is calculated by using a second calculation formula, and the second calculation formula is set to formula 2:
    Figure PCTCN2017113724-appb-100019
    Figure PCTCN2017113724-appb-100019
    公式2中,Pa,k代表目标用户ua与候选标签tk的相关性,UK代表使用过标签tk的用户集合,UN代表所述最近邻居集合的所有用户,Sa,u代表目标用户ua与指定用户uu之间的相似度,ru,k代表指定用户uu与候选标签tk之间的相关性。 In Equation 2, P a,k represents the correlation of the target user u a with the candidate tag t k , U K represents the user set using the tag t k , U N represents all users of the nearest neighbor set, Sa , u Representing the similarity between the target user u a and the specified user u u , r u, represents the correlation between the specified user u u and the candidate tag t k .
  19. 如权利要求16所述的协同过滤推荐系统,其特征在于,所述推荐与该原始标签和新增标签相关的项目至该目标用户包括:The collaborative filtering recommendation system according to claim 16, wherein the recommending the item related to the original label and the newly added label to the target user comprises:
    从该目标用户的原始标签和新增标签依次选取一个标签,获取该选取标签所标记的项目集,计算该选取标签与该项目集中每个项目的相关性,按照相关性从高到低的顺序,选取第三预定数量的项目推荐至该目标用户。Selecting a label from the original label and the newly added label of the target user to obtain a set of items marked by the selected label, and calculating a correlation between the selected label and each item in the item set, in descending order of relevance. , selecting a third predetermined number of items to recommend to the target user.
  20. 如权利要求19所述的协同过滤推荐系统,其特征在于,该选取标签与该项目集中每个项目的相关性采用第三计算公式计算得出,所述第三计算公式设置为公式3:The collaborative filtering recommendation system according to claim 19, wherein the correlation between the selection label and each item in the project set is calculated by using a third calculation formula, and the third calculation formula is set to Equation 3:
    Figure PCTCN2017113724-appb-100020
    Figure PCTCN2017113724-appb-100020
    公式3中,t1代表该目标用户的原始标签和新增标签集合TN中的一个标签,i代表标签t1所标记的项目集It1中的一个项目,relate(t1,i)代表标签t1与项目i的相关性,countUser(t1,i)代表跟项目i和标签t1相关的用户数,countUser(t1,j)代表跟项目j和标签t1相关的用户数。 In Equation 3, t 1 represents an original tag of the target user and a tag in the newly added tag set T N , i represents an item in the item set I t1 marked by the tag t 1 , and relat(t 1 , i) represents The correlation of the tag t 1 with the item i, countUser(t 1 , i) represents the number of users associated with item i and tag t 1 , and countUser(t 1 , j) represents the number of users associated with item j and tag t 1 .
PCT/CN2017/113724 2017-11-01 2017-11-30 Collaborative filtering recommendation method, electronic device, and computer readable storage medium WO2019085120A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711059396.7A CN108038120A (en) 2017-11-01 2017-11-01 Collaborative filtering recommending method, electronic equipment and computer-readable recording medium
CN201711059396.7 2017-11-01

Publications (1)

Publication Number Publication Date
WO2019085120A1 true WO2019085120A1 (en) 2019-05-09

Family

ID=62093688

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113724 WO2019085120A1 (en) 2017-11-01 2017-11-30 Collaborative filtering recommendation method, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN108038120A (en)
WO (1) WO2019085120A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101563A (en) * 2018-07-13 2018-12-28 东软集团股份有限公司 A kind of object recommendation method, apparatus, medium and equipment
CN109753994A (en) * 2018-12-11 2019-05-14 东软集团股份有限公司 User's portrait method, apparatus, computer readable storage medium and electronic equipment
CN109801101A (en) * 2019-01-03 2019-05-24 深圳壹账通智能科技有限公司 Label determines method, apparatus, computer equipment and storage medium
CN110209927B (en) * 2019-04-25 2020-12-04 北京三快在线科技有限公司 Personalized recommendation method and device, electronic equipment and readable storage medium
CN110223107B (en) * 2019-05-23 2021-12-07 中国银行股份有限公司 Reference advertisement determination method, device and equipment based on similar objects
CN112818377A (en) * 2019-11-18 2021-05-18 广东美云智数科技有限公司 Authority data recommendation method, authority setting method, authority data recommendation system, authority setting system, electronic device and medium
CN112732971A (en) * 2021-01-21 2021-04-30 广西师范大学 Collaborative filtering music recommendation method based on labels
CN113421118B (en) * 2021-06-24 2023-05-30 平安壹钱包电子商务有限公司 Data pushing method, system, computer equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129463A (en) * 2011-03-11 2011-07-20 北京航空航天大学 Project correlation fused and probabilistic matrix factorization (PMF)-based collaborative filtering recommendation system
CN104216993A (en) * 2014-09-10 2014-12-17 武汉科技大学 Tag-co-occurred tag clustering method
CN104239390A (en) * 2014-06-11 2014-12-24 杭州联汇数字科技有限公司 Audio recommending method on basis of improved collaborative filtering algorithm

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508870B (en) * 2011-10-10 2013-09-11 南京大学 Individualized recommending method in combination of rating data and label data
US9858318B2 (en) * 2012-01-20 2018-01-02 Entit Software Llc Managing data entities using collaborative filtering
CN103246672B (en) * 2012-02-09 2016-06-08 中国科学技术大学 User is carried out method and the device of personalized recommendation
CN102841929A (en) * 2012-07-19 2012-12-26 南京邮电大学 Recommending method integrating user and project rating and characteristic factors
CN103412948B (en) * 2013-08-27 2017-10-24 北京交通大学 The Method of Commodity Recommendation and system of collaborative filtering based on cluster
CN106126669B (en) * 2016-06-28 2019-07-16 北京邮电大学 User collaborative filtering content recommendation method and device based on label

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129463A (en) * 2011-03-11 2011-07-20 北京航空航天大学 Project correlation fused and probabilistic matrix factorization (PMF)-based collaborative filtering recommendation system
CN104239390A (en) * 2014-06-11 2014-12-24 杭州联汇数字科技有限公司 Audio recommending method on basis of improved collaborative filtering algorithm
CN104216993A (en) * 2014-09-10 2014-12-17 武汉科技大学 Tag-co-occurred tag clustering method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JI, AE-TTIE ET AL: "Collaborative Tagging in Recommender Systems", SPRINGER VERLAG, DE, vol. 4830, 31 December 2007 (2007-12-31), Berlin Heidelberg, pages 377 - 384, XP002486151 *

Also Published As

Publication number Publication date
CN108038120A (en) 2018-05-15

Similar Documents

Publication Publication Date Title
WO2019085120A1 (en) Collaborative filtering recommendation method, electronic device, and computer readable storage medium
CN107844634B (en) Modeling method of multivariate general model platform, electronic equipment and computer readable storage medium
CN110866181B (en) Resource recommendation method, device and storage medium
CN107679084B (en) Clustering label generation method, electronic device and computer readable storage medium
US9269016B2 (en) Content extracting device, content extracting method and program
TWI677828B (en) Business customization device, method, and computer readable storage media based on data source
US8311337B2 (en) Systems and methods for organizing and accessing feature vectors in digital images
WO2019076062A1 (en) Function page customization method and application server
WO2019061989A1 (en) Loan risk control method, electronic device and readable storage medium
WO2015081915A1 (en) File recommendation method and device
WO2019085463A1 (en) Department demand recommendation method, application server, and computer-readable storage medium
WO2018188378A1 (en) Method and device for tagging label for application, terminal and computer readable storage medium
CN109492152B (en) Method, device, computer equipment and storage medium for pushing custom content
CN112613938B (en) Model training method and device and computer equipment
CN113220657B (en) Data processing method and device and computer equipment
CN110880006A (en) User classification method and device, computer equipment and storage medium
WO2019024231A1 (en) Automatic data matching method, electronic device and computer-readable storage medium
CN105117489B (en) Database management method and device and electronic equipment
WO2019041525A1 (en) Method, electronic apparatus, and computer readable storage medium for identifying entities having identical name
WO2021017290A1 (en) Knowledge graph-based entity identification data enhancement method and system
CN113706249B (en) Data recommendation method and device, electronic equipment and storage medium
WO2019085475A1 (en) Project recommendation method, electronic device, and computer readable storage medium
WO2019227705A1 (en) Image entry method, server and computer storage medium
US9785724B2 (en) Secondary queue for index process
CN111159183B (en) Report generation method, electronic device and computer readable storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17930648

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 30/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17930648

Country of ref document: EP

Kind code of ref document: A1