CN106779825A - A kind of item recommendation method, device and electronic equipment - Google Patents
A kind of item recommendation method, device and electronic equipment Download PDFInfo
- Publication number
- CN106779825A CN106779825A CN201611097733.7A CN201611097733A CN106779825A CN 106779825 A CN106779825 A CN 106779825A CN 201611097733 A CN201611097733 A CN 201611097733A CN 106779825 A CN106779825 A CN 106779825A
- Authority
- CN
- China
- Prior art keywords
- target user
- users
- item
- recommended
- score
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000004364 calculation method Methods 0.000 claims abstract description 37
- 238000010586 diagram Methods 0.000 description 10
- 239000013598 vector Substances 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000005065 mining Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 2
- 230000002349 favourable effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
- G06Q30/0202—Market predictions or forecasting for commercial activities
Landscapes
- Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Data Mining & Analysis (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the present invention discloses a kind of item recommendation method, device and electronic equipment, in the method, when needing to recommend article to targeted customer, scoring record according to the targeted customer and other users, it is calculated the similarity of targeted customer and other users, further according to targeted customer and the similarity of other users, it is calculated the weight that scores score value shared by of the other users to each article to be recommended, and according to the weight calculation each article to be recommended recommendation score value, according to the recommendation score value of each article to be recommended, targeted customer is recommended.By scheme disclosed in the embodiment of the present invention, the similarity of targeted customer and other users can be utilized, be that targeted customer recommends article such that it is able to the article of recommendation is met the demand of user, solves the problems, such as that the recommendation degree of accuracy present in prior art is low.
Description
Technical Field
The embodiment of the invention relates to the technical field of electronic equipment, in particular to an article recommendation method and device and electronic equipment.
Background
With the popularization of internet technology, many things of users can be performed by using the internet, which is common, including that users purchase goods through an internet platform and browse various information provided by the internet platform. For example, a user may purchase a music commodity through a shopping-type internet platform, a music mall, or view various videos provided by the platform by browsing a video-type internet platform, a music website.
Since the goods and information provided by each internet platform are various, users often need to spend a lot of time searching for the content required by themselves. In order to save time for users, the internet platform usually has an item recommendation system, which can grade the scorable items and recommend various items including various types of goods, audio and video, information, etc. to the users according to the grade values. In the prior art, an article recommendation system calculates an average value of score values after obtaining the score values of each user for the same article, takes the average value of the score values as the recommendation score value of the article, and then recommends the user according to the level of the recommendation score value of each article.
However, in the process of implementing the embodiment of the present invention, the inventor finds that, due to different preferences of different users, when recommending an item to a user in the prior art, the recommended item sometimes fails to meet the actual requirement of the user, which causes a problem of low recommendation accuracy in the prior art.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present invention provide an article recommendation method and apparatus, and an electronic device.
In order to solve the technical problem, the embodiment of the invention discloses the following technical scheme:
according to a first aspect of embodiments of the present invention, there is provided an item recommendation method, including:
when an object needs to be recommended to a target user, obtaining scoring records of the target user and other users, wherein the scoring records comprise scoring scores of various objects;
calculating the similarity between the target user and other users according to the scoring records of the target user and other users;
calculating the weight of the other users to the score of each item to be recommended according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight;
recommending the object to the target user according to the recommendation score of each object to be recommended.
Optionally, the calculating, according to the scoring records of the target user and the other users, the similarity between the target user and the other users includes:
according to the scoring records of the target user and other users, obtaining scoring scores of the target user and other users for the same article;
and calculating the Euclidean distance between the target user and the other users according to the score values of the target user and the other users on the same article, and taking the Euclidean distance between the target user and the other users as the similarity of the target user and the other users.
Optionally, the calculating, according to the scoring records of the target user and the other users, the similarity between the target user and the other users includes:
acquiring a set of each item previously scored by the target user according to the scoring record of the target user to serve as a first set, and acquiring a set of each item previously scored by other users to serve as a second set according to the scoring records of the other users;
respectively calculating the intersection of the first set and the second set and the union of the first set and the second set;
and calculating Jacard coefficients of the target user and the other users according to the intersection of the first set and the second set and the union of the first set and the second set, and taking the Jacard coefficients as the similarity of the target user and the other users.
Optionally, the calculating, according to the similarity between the target user and the other users, a weight occupied by the score of each to-be-recommended item by the other users, and calculating, according to the weight, a recommendation score of each to-be-recommended item, includes:
according to the similarity between the target user and the other users, calculating the average value of the similarity through the following formula:
S=(S1+S2+…+Si+…+Sn) N, where n is the number of the other users, SiFor the target user andthe similarity of i other users, S is the average value of the similarity;
according to the average value of the similarity, calculating the weight of the score of each item to be recommended by the other users through the following formula:
(W1,W2,…,Wi,…,Wn)=(S1/S,S2/S,…,Si/S,…,Sns), wherein WiThe weight of the score of the ith other user;
according to the score of the other users to each item to be recommended and the weight, calculating the recommendation score of each item to be recommended by the following formula:
R=r1*W1+r2*W2+…+ri*Wi+…+rn*Wnwherein r isiAnd D, scoring the item to be recommended for the ith other user, wherein R is the recommendation score of the item to be recommended.
Optionally, the recommending the object to the target user according to the recommendation score of each object to be recommended includes:
ranking the recommended values of the to-be-recommended articles from high to low, and recommending the ranked to-be-recommended articles to the target user;
or,
and comparing the recommendation score of the item to be recommended with a preset threshold value, and recommending the recommended item of which the recommendation score is larger than the preset threshold value to the target user.
According to a second aspect of the embodiments of the present invention, there is provided an item recommendation apparatus including:
the system comprises a scoring record acquisition module, a scoring record acquisition module and a scoring management module, wherein the scoring record acquisition module is used for acquiring scoring records of a target user and other users when articles need to be recommended to the target user, and the scoring records comprise scoring scores of various articles;
the similarity calculation module is used for calculating the similarity between the target user and other users according to the grading records of the target user and other users;
the recommendation score calculation module is used for calculating the weight of the other users to the score of each item to be recommended according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight;
and the article recommending module is used for recommending articles to the target user according to the recommendation scores of the articles to be recommended.
Optionally, the similarity calculation module includes:
the scoring score acquisition unit is used for acquiring scoring scores of the target user and other users for the same articles according to the scoring records of the target user and other users;
and the Euclidean distance calculating unit is used for calculating the Euclidean distances between the target user and the other users according to the score values of the target user and the other users on the same article, and taking the Euclidean distances between the target user and the other users as the similarity between the target user and the other users.
Optionally, the similarity calculation module includes:
the set acquisition unit is used for acquiring a set of each item which is scored by the target user before according to the scoring record of the target user to serve as a first set, and acquiring a set of each item which is scored by the other user before to serve as a second set according to the scoring record of the other user;
the set calculation unit is used for calculating the intersection of the first set and the second set and the union of the first set and the second set respectively;
and the Jacard coefficient calculation unit is used for calculating Jacard coefficients of the target user and the other users according to the intersection of the first set and the second set and the union of the first set and the second set, and taking the Jacard coefficients as the similarity of the target user and the other users.
Optionally, the recommendation score calculating module includes:
an average value calculating unit, configured to calculate, according to the similarity between the target user and the other users, an average value of the similarity according to the following formula:
S=(S1+S2+…+Si+…+Sn) N, where n is the number of the other users, SiSimilarity between the target user and the ith other user is obtained, and S is an average value of the similarity;
and the weight calculation unit is used for calculating the weight of the score of each item to be recommended by the other users according to the average value of the similarity by the following formula:
(W1,W2,…,Wi,…,Wn)=(S1/S,S2/S,…,Si/S,…,Sns), wherein WiThe weight of the score of the ith other user;
and the recommendation score calculation unit is used for calculating the recommendation score of each item to be recommended according to the score of the other users to each item to be recommended and the weight by the following formula:
R=r1*W1+r2*W2+…+ri*Wi+…+rn*Wnwherein r isiAnd D, scoring the item to be recommended for the ith other user, wherein R is the recommendation score of the item to be recommended.
Optionally, the item recommendation module includes:
the first recommending unit is used for ranking the recommendation scores of the to-be-recommended articles from high to low and recommending the ranked to-be-recommended articles to the target user;
or,
and the second recommending unit is used for comparing the recommendation score of the item to be recommended with a preset threshold value and recommending the recommended item of which the recommendation score is larger than the preset threshold value to the target user.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus, including:
one or more processors; and, a memory; wherein the memory stores instructions executable by the one or more processors to enable the at least one processor to:
when an object needs to be recommended to a target user, obtaining scoring records of the target user and other users, wherein the scoring records comprise scoring scores of various objects;
calculating the similarity between the target user and other users according to the scoring records of the target user and other users;
calculating the weight of the other users to the score of each item to be recommended according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight;
recommending the object to the target user according to the recommendation score of each object to be recommended.
According to a fourth aspect of embodiments of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the item recommendation method provided in any one of the above-mentioned first aspect.
According to a fifth aspect of embodiments of the present invention, there is provided a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the item recommendation method provided in any one of the above-mentioned first aspect.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
the embodiment of the invention discloses an article recommendation method, an article recommendation device and electronic equipment.
Furthermore, the scheme disclosed by the embodiment of the invention utilizes the similarity between the target user and other users to recommend the object to the target user, and the interest of the user is considered, so that the object is beneficial to mining the interested object for the user.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a workflow diagram illustrating a method of item recommendation in accordance with an exemplary embodiment of the present invention;
fig. 2 is a schematic workflow diagram illustrating a similarity calculation method according to an exemplary embodiment of the present invention;
fig. 3 is a schematic workflow diagram illustrating a similarity calculation in still another item recommendation method according to an exemplary embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for recommending items according to an exemplary embodiment of the present invention, wherein the method calculates a recommendation score;
FIG. 5 is a schematic diagram illustrating the structure of an item recommendation device according to an exemplary embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The embodiment of the invention discloses an article recommendation method, an article recommendation device and electronic equipment, and aims to solve the problem of low recommendation accuracy in the prior art.
Fig. 1 is a flowchart illustrating an item recommendation method according to an embodiment of the present invention. Referring to fig. 1, the item recommendation method includes the steps of:
and step S11, when the object needs to be recommended to the target user, obtaining the scoring records of the target user and other users, wherein the scoring records comprise scoring scores of all the objects.
In the item recommendation method disclosed in the embodiment of the present invention, each time a user scores an item, the score of the item is recorded, and user information of the user who scores the item, such as an ID of the user logging in an internet platform, is recorded, so as to generate a score record of the user, where the score record of each user includes the score of each item evaluated by the user.
In addition, the target user refers to a user who needs a recommended item. Generally, after a certain user logs in an internet platform, the user can be identified as a target user.
And step S12, calculating the similarity between the target user and other users according to the scoring records of the target user and other users.
Recording the score of each item evaluated by the target user in the score record of the target user; and recording the score of each item evaluated by the other user in the score records of the other users. The similarity between the target user and the other users, which is obtained through the calculation of the rating records, can represent the similarity of the favorite same item of the target user and the other users.
Wherein, the higher the similarity between the target user and the other users is, the higher the similarity between the target user and the favorite same item of the other users is.
Step S13, calculating the weight of the score of each item to be recommended by the other users according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight.
Wherein, generally, the higher the similarity between the target user and the other users is, the higher the weight occupied by the score of the other users is. And then, further calculating the recommendation score of each item to be recommended according to the score of each item to be recommended by the other users and the weight of the score of each item to be recommended by the other users.
And step S14, recommending articles to the target user according to the recommendation scores of the articles to be recommended.
The embodiment of the invention discloses an article recommending method, which comprises the steps of calculating the similarity between a target user and other users according to the score records of the target user and other users when articles need to be recommended to the target user, calculating the weight of the score of each article to be recommended of other users according to the similarity between the target user and other users, calculating the recommendation score of each article to be recommended according to the weight, and recommending the target user according to the recommendation score of each article to be recommended.
The item recommendation method disclosed by the embodiment of the invention can recommend the item for the target user by utilizing the similarity between the target user and other users, so that the recommended item can meet the requirements of the user, and the problem of low recommendation accuracy in the prior art is solved.
Furthermore, the method disclosed by the embodiment of the invention recommends the object for the target user by utilizing the similarity between the target user and other users, and is favorable for mining interested objects for the user in consideration of the preference of the user.
In addition, in the above steps, an operation of calculating the similarity between the target user and the other users according to the scoring records of the target user and the other users is disclosed, and the operation may be implemented in various ways.
In one mode, referring to the workflow diagram shown in fig. 2, the calculating the similarity between the target user and the other users according to the scoring records of the target user and the other users includes the following steps:
and step S21, obtaining the scoring scores of the target user and the other users for the same articles according to the scoring records of the target user and the other users.
If the target user a and one of the other users b have evaluated m identical items, the evaluation records of the target user and the other users can be represented by one m-dimensional score vector, and the score vector of the target user a is set to be Va ═ (Sa)1,Sa2,…,Sai,…,Sam) Wherein SaiScore of item i for target user a, that is, Sa1The score for target user a for item 1. In addition, the score vector of the other user b is set to Vb ═ b (Sb)1,Sb2,…,Sbi,…,Sbm) In which SbiScore of the ith item for other users b, that is, Sb1The score for the 1 st item for the other user b. And obtaining the score of the target user and the score of the other users for the same article through the score vectors of the target user and the other users.
Step S22, calculating Euclidean distances between the target user and the other users according to the score values of the target user and the other users on the same articles, and taking the Euclidean distances between the target user and the other users as the similarity of the target user and the other users.
Among them, the euclidean distance between the target user and other users is usually calculated by the following formula:
in the above formula, Eab is the Euclidean distance, Sa, between the target user and the other usersiScore of the ith item for target user a, SbiThe score of the ith item for the other user b is given, and m is the number of the same items that the target user a and the other user b have rated.
By the formula (1), the Euclidean distance between the target user and other users can be calculated, and the Euclidean distance is used as the similarity between the target user and the other users.
In another mode, referring to the workflow diagram shown in fig. 3, the calculating the similarity between the target user and the other users according to the scoring records of the target user and the other users includes the following steps:
step S31, according to the scoring record of the target user, obtaining a set of each previously scored item of the target user as a first set, and according to the scoring record of the other user, obtaining a set of each previously scored item of the other user as a second set.
The previously scored set of each item of the target user a, i.e. the first set, may be represented by Ia, and the previously scored set of each item of the other user b, i.e. the second set, may be represented by Ib.
And step S32, respectively calculating the intersection of the first set and the second set and the union of the first set and the second set.
Wherein, the intersection of the first set and the second set can be represented by Ia and Ib, and the union of the first set and the second set can be represented by Ia and Ib.
Step S33, calculating the jackard coefficient of the target user and the other user according to the intersection of the first set and the second set and the union of the first set and the second set, and taking the jackard coefficient as the similarity between the target user and the other user.
The Jacard coefficients of the target user and the other users are typically calculated by the following formula:
in the above formula, Jab is the jaccard coefficient of the target user and the other users.
Through the formula (2), Jacard coefficients of a target user and other users can be calculated, and the Jacard coefficients are used as the similarity of the target user and the other users.
In addition, the internet platform often provides a plurality of items to be recommended for the user. In the embodiment of the invention, the recommendation score of each article to be recommended is calculated, and article recommendation is carried out according to the recommendation score. In this case, referring to the workflow diagram shown in fig. 4, the calculating the weight of the score of each item to be recommended by the other user according to the similarity between the target user and the other user, and calculating the recommendation score of each item to be recommended according to the weight includes the following steps:
step S41, calculating an average value of the similarity according to the similarity between the target user and the other users by using the following formula:
S=(S1+S2+…+Si+…+Sn)/n。 (3)
wherein n is the number of the other users, SiAnd S is the similarity between the target user and the ith other user, and is the average value of the similarities.
Step S42, according to the average value of the similarity, calculating the weight of the score of each item to be recommended by the other users through the following formula:
(W1,W2,…,Wi,…,Wn)=(S1/S,S2/S,…,Si/S,…,Sns), wherein WiThe weight of the score of the ith other user.
That is, the weight W that the score of the ith other user accounts fori=Si/S。
Step S43, according to the score and the weight of the other users to each item to be recommended, calculating the recommendation score of each item to be recommended by the following formula:
R=r1*W1+r2*W2+…+ri*Wi+…+rn*Wnwherein r isiAnd D, scoring the item to be recommended for the ith other user, wherein R is the recommendation score of the item to be recommended.
And obtaining the score of each item to be recommended by other users through the scoring records of other users. And calculating the score of each to-be-recommended article by the other user and the weight of the score of each to-be-recommended article by the other user according to the formula to obtain the recommendation score of each to-be-recommended article.
Further, in the item recommendation method disclosed in the embodiment of the present invention, after the recommendation score of each item to be recommended is obtained, the item can be recommended to the target user. In practical applications, the recommendation of the item to the target user may be performed in various ways.
In one mode, the recommending an item to the target user according to the recommendation score of each item to be recommended includes:
and ranking the recommendation scores of the to-be-recommended articles from high to low, and recommending the ranked to-be-recommended articles to the target user.
In this way, after the recommendation scores of the items to be recommended are obtained through calculation, the items to be recommended are ranked in the order from high to low according to the recommendation scores of the items to be recommended, and then the items to be recommended with higher recommendation scores are recommended to the user, so that the user can see the items to be recommended with higher recommendation scores preferentially.
Or, in another mode, the recommending an item to the target user according to the recommendation score of each item to be recommended includes:
and comparing the recommendation score of the item to be recommended with a preset threshold value, and recommending the recommended item of which the recommendation score is larger than the preset threshold value to the target user.
The preset threshold is usually set according to the actual requirement of the user, and the specific value is not limited in the embodiment of the present invention. In this way, the articles to be recommended with the recommendation score not greater than the preset threshold can be excluded, and the interference of the articles to be recommended with the recommendation score not greater than the preset threshold on the user is avoided.
In addition, as an implementation of the above embodiments, another embodiment of the present invention discloses an article recommendation device. Referring to the schematic structural diagram shown in fig. 5, the item recommendation device includes: a score record obtaining module 100, a similarity calculation module 200, a recommendation score calculation module 300 and an item recommendation module 400.
The scoring record obtaining module 100 is configured to obtain scoring records of a target user and other users when an item needs to be recommended to the target user, where the scoring records include scoring scores of various items.
Wherein the target user refers to a user needing a recommended item. Generally, after a certain user logs in an internet platform, the user can be identified as a target user.
The similarity calculation module 200 is configured to calculate a similarity between the target user and the other users according to the scoring records of the target user and the other users.
Recording the score of each item evaluated by the target user in the score record of the target user; and recording the score of each item evaluated by the other user in the score records of the other users. The similarity between the target user and the other users, which is obtained through the calculation of the rating records, can represent the similarity of the favorite same item of the target user and the other users.
Wherein, the higher the similarity between the target user and the other users is, the higher the similarity between the target user and the favorite same item of the other users is.
The recommendation score calculation module 300 is configured to calculate, according to the similarity between the target user and the other users, a weight occupied by the score of each to-be-recommended item by the other users, and calculate, according to the weight, a recommendation score of each to-be-recommended item.
Wherein, generally, the higher the similarity between the target user and the other users is, the higher the weight occupied by the score of the other users is. And then, further calculating the recommendation score of each item to be recommended according to the score of each item to be recommended by the other users and the weight of the score of each item to be recommended by the other users.
The item recommending module 400 is configured to recommend an item to the target user according to the recommendation score of each item to be recommended.
The embodiment of the invention discloses an article recommending device, by which articles can be recommended for a target user by utilizing the similarity between the target user and other users, so that the recommended articles can meet the requirements of the user, and the problem of low recommending accuracy in the prior art is solved.
Furthermore, the device disclosed by the embodiment of the invention recommends the object for the target user by utilizing the similarity between the target user and other users, and is favorable for mining interested objects for the user in consideration of the preference of the user.
In addition, the similarity calculation module 200 disclosed in the embodiment of the present invention may be implemented in various forms. In one form, the similarity calculation module 200 comprises:
the scoring score acquisition unit is used for acquiring scoring scores of the target user and other users for the same articles according to the scoring records of the target user and other users;
and the Euclidean distance calculating unit is used for calculating the Euclidean distances between the target user and the other users according to the score values of the target user and the other users on the same article, and taking the Euclidean distances between the target user and the other users as the similarity between the target user and the other users.
If the target user a and one of the other users b evaluate m identical items, the evaluation records of the target user and the other users can be represented by one m-dimensional score vector, and the score vector of the target user a is set to be Va ═ (Sa)1,Sa2,…,Sai,…,Sam) Wherein SaiScore of item i for target user a, that is, Sa1The score for target user a for item 1. In addition, the score vector of the other user b is set to Vb ═ b (Sb)1,Sb2,…,Sbi,…,Sbm) In which SbiScore of the ith item for other users b, that is, Sb1The score for the 1 st item for the other user b. And obtaining the score of the target user and the score of the other users for the same article through the score vectors of the target user and the other users.
The euclidean distance between the target user and the other users is typically calculated by the following formula:
in the above formula, Eab is the Euclidean distance, Sa, between the target user and the other usersiScore of the ith item for target user a, SbiThe score of the ith item for the other user b is given, and m is the number of the same items that the target user a and the other user b have rated.
By the formula (1), the Euclidean distance between the target user and other users can be calculated, and the Euclidean distance is used as the similarity between the target user and the other users.
In another form, the similarity calculation module 200 includes:
the set acquisition unit is used for acquiring a set of each item which is scored by the target user before according to the scoring record of the target user to serve as a first set, and acquiring a set of each item which is scored by the other user before to serve as a second set according to the scoring record of the other user;
the set calculation unit is used for calculating the intersection of the first set and the second set and the union of the first set and the second set respectively;
and the Jacard coefficient calculation unit is used for calculating Jacard coefficients of the target user and the other users according to the intersection of the first set and the second set and the union of the first set and the second set, and taking the Jacard coefficients as the similarity of the target user and the other users.
The previously scored set of each item of the target user a, i.e. the first set, may be represented by Ia, and the previously scored set of each item of the other user b, i.e. the second set, may be represented by Ib. In this case, the intersection of the first set with the second set may be represented by Ia ∞ Ib, and the union of the first set with the second set may be represented by Ia ∞ Ib. The Jacard coefficients of the target user and the other users are typically calculated by the following formula:
in the above formula, Jab is the jaccard coefficient of the target user and the other users.
Through the formula (2), Jacard coefficients of a target user and other users can be calculated, and the Jacard coefficients are used as the similarity of the target user and the other users.
Further, in the apparatus for recommending an article disclosed in the embodiment of the present invention, the recommendation score calculating module 300 includes:
an average value calculating unit, configured to calculate, according to the similarity between the target user and the other users, an average value of the similarity according to the following formula:
S=(S1+S2+…+Si+…+Sn) N, where n is the number of the other users, SiSimilarity between the target user and the ith other user is obtained, and S is an average value of the similarity;
and the weight calculation unit is used for calculating the weight of the score of each item to be recommended by the other users according to the average value of the similarity by the following formula:
(W1,W2,…,Wi,…,Wn)=(S1/S,S2/S,…,Si/S,…,Sns), wherein WiThe weight of the score of the ith other user;
and the recommendation score calculation unit is used for calculating the recommendation score of each item to be recommended according to the score of the other users to each item to be recommended and the weight by the following formula:
R=r1*W1+r2*W2+…+ri*Wi+…+rn*Wnwherein r isiAnd D, scoring the item to be recommended for the ith other user, wherein R is the recommendation score of the item to be recommended.
In addition, in the item recommendation device disclosed in the embodiment of the present invention, the item may be recommended to the target user in various ways. In this case, the item recommendation module includes: the first recommending unit or the second recommending unit.
The first recommending unit is used for ranking the recommendation scores of the to-be-recommended articles from high to low and recommending the ranked to-be-recommended articles to the target user.
The second recommending unit is used for comparing the recommendation score of the item to be recommended with a preset threshold value and recommending the recommended item of which the recommendation score is larger than the preset threshold value to the target user.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a schematic hardware structure diagram of an electronic device for executing an item recommendation method according to an embodiment of the present application, and as shown in fig. 6, the electronic device includes:
one or more processors 810 and a memory 820, one processor 810 being illustrated in fig. 6.
The apparatus for performing the item recommendation method may further include: an input device 830 and an output device 840.
The processor 810, the memory 820, the input device 830, and the output device 840 may be connected by a bus or other means, such as by a bus connection in fig. 6.
The memory 820 is a non-volatile computer-readable storage medium and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the item recommendation method in the embodiment of the present application (for example, the score record obtaining module 100, the similarity calculation module 200, the recommendation score calculation module 300, and the item recommendation module 400 shown in fig. 5). The processor 810 executes various functional applications and data processing of the electronic device by executing the nonvolatile software programs, instructions and modules stored in the memory 820, that is, implements the item recommendation method in the above method embodiment.
The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the item recommendation device (see fig. 5), and the like. Further, the memory 820 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 820 may optionally include memory located remotely from the processor 810, which may be connected to the electronic device operation record generation apparatus via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 830 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the article recommending apparatus. The output device 840 may include a display device such as a display screen.
The one or more modules are stored in the memory 820 and, when executed by the one or more processors 810, perform the method for electronic device operation record generation in any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
The electronic device of embodiments of the present invention exists in a variety of forms, including but not limited to:
(1) mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID, and UMPC devices, such as ipads.
(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.
(5) And other electronic devices with data interaction functions.
An embodiment of the present invention provides a non-transitory computer storage medium, where a computer-executable instruction is stored in the computer storage medium, and the computer-executable instruction may execute the method for recommending an item in any of the above method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, to instruct related hardware. Accordingly, embodiments of the present invention also provide a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to execute the method for recommending an item in any of the above method embodiments.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (11)
1. An item recommendation method, comprising:
when an object needs to be recommended to a target user, obtaining scoring records of the target user and other users, wherein the scoring records comprise scoring scores of various objects;
calculating the similarity between the target user and other users according to the scoring records of the target user and other users;
calculating the weight of the other users to the score of each item to be recommended according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight;
recommending the object to the target user according to the recommendation score of each object to be recommended.
2. The item recommendation method according to claim 1, wherein the calculating the similarity between the target user and the other users according to the scoring records of the target user and the other users comprises:
according to the scoring records of the target user and other users, obtaining scoring scores of the target user and other users for the same article;
and calculating the Euclidean distance between the target user and the other users according to the score values of the target user and the other users on the same article, and taking the Euclidean distance between the target user and the other users as the similarity of the target user and the other users.
3. The item recommendation method according to claim 1, wherein the calculating the similarity between the target user and the other users according to the scoring records of the target user and the other users comprises:
acquiring a set of each item previously scored by the target user according to the scoring record of the target user to serve as a first set, and acquiring a set of each item previously scored by other users to serve as a second set according to the scoring records of the other users;
respectively calculating the intersection of the first set and the second set and the union of the first set and the second set;
and calculating Jacard coefficients of the target user and the other users according to the intersection of the first set and the second set and the union of the first set and the second set, and taking the Jacard coefficients as the similarity of the target user and the other users.
4. The item recommendation method according to claim 1, wherein the calculating a weight of the score of each item to be recommended by the other user according to the similarity between the target user and the other user, and calculating the recommendation score of each item to be recommended according to the weight includes:
according to the similarity between the target user and the other users, calculating the average value of the similarity through the following formula:
S=(S1+S2+…+Si+…+Sn) N, where n is the number of the other users, SiSimilarity between the target user and the ith other user is obtained, and S is an average value of the similarity;
according to the average value of the similarity, calculating the weight of the score of each item to be recommended by the other users through the following formula:
(W1,W2,…,Wi,…,Wn)=(S1/S,S2/S,…,Si/S,…,Sns), wherein WiThe weight of the score of the ith other user;
according to the score of the other users to each item to be recommended and the weight, calculating the recommendation score of each item to be recommended by the following formula:
R=r1*W1+r2*W2+…+ri*Wi+…+rn*Wnwherein r isiAnd D, scoring the item to be recommended for the ith other user, wherein R is the recommendation score of the item to be recommended.
5. The item recommendation method according to claim 1, wherein recommending items to the target user according to the recommendation score of each item to be recommended comprises:
ranking the recommended values of the to-be-recommended articles from high to low, and recommending the ranked to-be-recommended articles to the target user;
or,
and comparing the recommendation score of the item to be recommended with a preset threshold value, and recommending the recommended item of which the recommendation score is larger than the preset threshold value to the target user.
6. An item recommendation device, comprising:
the system comprises a scoring record acquisition module, a scoring record acquisition module and a scoring management module, wherein the scoring record acquisition module is used for acquiring scoring records of a target user and other users when articles need to be recommended to the target user, and the scoring records comprise scoring scores of various articles;
the similarity calculation module is used for calculating the similarity between the target user and other users according to the grading records of the target user and other users;
the recommendation score calculation module is used for calculating the weight of the other users to the score of each item to be recommended according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight;
and the article recommending module is used for recommending articles to the target user according to the recommendation scores of the articles to be recommended.
7. The item recommendation device of claim 6, wherein the similarity calculation module comprises:
the scoring score acquisition unit is used for acquiring scoring scores of the target user and other users for the same articles according to the scoring records of the target user and other users;
and the Euclidean distance calculating unit is used for calculating the Euclidean distances between the target user and the other users according to the score values of the target user and the other users on the same article, and taking the Euclidean distances between the target user and the other users as the similarity between the target user and the other users.
8. The item recommendation device of claim 6, wherein the similarity calculation module comprises:
the set acquisition unit is used for acquiring a set of each item which is scored by the target user before according to the scoring record of the target user to serve as a first set, and acquiring a set of each item which is scored by the other user before to serve as a second set according to the scoring record of the other user;
the set calculation unit is used for calculating the intersection of the first set and the second set and the union of the first set and the second set respectively;
and the Jacard coefficient calculation unit is used for calculating Jacard coefficients of the target user and the other users according to the intersection of the first set and the second set and the union of the first set and the second set, and taking the Jacard coefficients as the similarity of the target user and the other users.
9. The item recommendation device of claim 6, wherein said recommendation score calculation module comprises:
an average value calculating unit, configured to calculate, according to the similarity between the target user and the other users, an average value of the similarity according to the following formula:
S=(S1+S2+…+Si+…+Sn) N, where n is the number of the other users, SiSimilarity between the target user and the ith other user is obtained, and S is an average value of the similarity;
and the weight calculation unit is used for calculating the weight of the score of each item to be recommended by the other users according to the average value of the similarity by the following formula:
(W1,W2,…,Wi,…,Wn)=(S1/S,S2/S,…,Si/S,…,Sns), wherein WiThe weight of the score of the ith other user;
and the recommendation score calculation unit is used for calculating the recommendation score of each item to be recommended according to the score of the other users to each item to be recommended and the weight by the following formula:
R=r1*W1+r2*W2+…+ri*Wi+…+rn*Wnwherein r isiAnd D, scoring the item to be recommended for the ith other user, wherein R is the recommendation score of the item to be recommended.
10. The item recommendation device of claim 6, wherein the item recommendation module comprises:
the first recommending unit is used for ranking the recommendation scores of the to-be-recommended articles from high to low and recommending the ranked to-be-recommended articles to the target user;
or,
and the second recommending unit is used for comparing the recommendation score of the item to be recommended with a preset threshold value and recommending the recommended item of which the recommendation score is larger than the preset threshold value to the target user.
11. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to:
when an object needs to be recommended to a target user, obtaining scoring records of the target user and other users, wherein the scoring records comprise scoring scores of various objects;
calculating the similarity between the target user and other users according to the scoring records of the target user and other users;
calculating the weight of the other users to the score of each item to be recommended according to the similarity between the target user and the other users, and calculating the recommendation score of each item to be recommended according to the weight;
recommending the object to the target user according to the recommendation score of each object to be recommended.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611097733.7A CN106779825A (en) | 2016-12-02 | 2016-12-02 | A kind of item recommendation method, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611097733.7A CN106779825A (en) | 2016-12-02 | 2016-12-02 | A kind of item recommendation method, device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106779825A true CN106779825A (en) | 2017-05-31 |
Family
ID=58882960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611097733.7A Pending CN106779825A (en) | 2016-12-02 | 2016-12-02 | A kind of item recommendation method, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106779825A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106897419A (en) * | 2017-02-23 | 2017-06-27 | 同济大学 | The study recommendation method that sorted to level of fusion social information |
CN107730726A (en) * | 2017-10-23 | 2018-02-23 | 秦卓奕 | A kind of commodity, service sales exhibition method and intelligence sales exhibition terminal |
CN108446911A (en) * | 2018-03-15 | 2018-08-24 | 孙向东 | Intelligent payment system |
CN108665312A (en) * | 2018-05-08 | 2018-10-16 | 北京京东金融科技控股有限公司 | Method and apparatus for generating information |
CN109063137A (en) * | 2018-08-03 | 2018-12-21 | 苏州大学 | A kind of recommended determines method, apparatus, equipment and readable storage medium storing program for executing |
CN109218769A (en) * | 2018-09-30 | 2019-01-15 | 武汉斗鱼网络科技有限公司 | A kind of recommended method and relevant device of direct broadcasting room |
CN109389442A (en) * | 2017-08-04 | 2019-02-26 | 北京京东尚科信息技术有限公司 | Method of Commodity Recommendation and device, storage medium and electric terminal |
CN110111167A (en) * | 2018-02-01 | 2019-08-09 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of determining recommended |
CN110348810A (en) * | 2019-07-16 | 2019-10-18 | 河北冀联人力资源服务集团有限公司 | Team's recommended method and system |
WO2020135189A1 (en) * | 2018-12-29 | 2020-07-02 | 深圳Tcl新技术有限公司 | Product recommendation method, product recommendation system and storage medium |
CN111476621A (en) * | 2019-01-24 | 2020-07-31 | 百度在线网络技术(北京)有限公司 | User item recommendation method and device |
CN111611496A (en) * | 2020-04-09 | 2020-09-01 | 浙江口碑网络技术有限公司 | Product recommendation method and device |
CN112446765A (en) * | 2020-12-01 | 2021-03-05 | 平安科技(深圳)有限公司 | Product recommendation method and device, electronic equipment and computer-readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130013447A1 (en) * | 2011-07-07 | 2013-01-10 | Ravishankar Chityala | System and method for determining the best size of products for online and offline purchase |
CN102915307A (en) * | 2011-08-02 | 2013-02-06 | 腾讯科技(深圳)有限公司 | Device and method for recommending personalized information and information processing system |
CN103514304A (en) * | 2013-10-29 | 2014-01-15 | 海南大学 | Project recommendation method and device |
CN103593417A (en) * | 2013-10-25 | 2014-02-19 | 安徽教育网络出版有限公司 | Collaborative filtering recommendation method based on association rule prediction |
CN104966125A (en) * | 2015-05-06 | 2015-10-07 | 同济大学 | Article scoring and recommending method of social network |
CN105095476A (en) * | 2015-08-12 | 2015-11-25 | 西安电子科技大学 | Collaborative filtering recommendation method based on Jaccard equilibrium distance |
-
2016
- 2016-12-02 CN CN201611097733.7A patent/CN106779825A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130013447A1 (en) * | 2011-07-07 | 2013-01-10 | Ravishankar Chityala | System and method for determining the best size of products for online and offline purchase |
CN102915307A (en) * | 2011-08-02 | 2013-02-06 | 腾讯科技(深圳)有限公司 | Device and method for recommending personalized information and information processing system |
CN103593417A (en) * | 2013-10-25 | 2014-02-19 | 安徽教育网络出版有限公司 | Collaborative filtering recommendation method based on association rule prediction |
CN103514304A (en) * | 2013-10-29 | 2014-01-15 | 海南大学 | Project recommendation method and device |
CN104966125A (en) * | 2015-05-06 | 2015-10-07 | 同济大学 | Article scoring and recommending method of social network |
CN105095476A (en) * | 2015-08-12 | 2015-11-25 | 西安电子科技大学 | Collaborative filtering recommendation method based on Jaccard equilibrium distance |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106897419A (en) * | 2017-02-23 | 2017-06-27 | 同济大学 | The study recommendation method that sorted to level of fusion social information |
CN109389442A (en) * | 2017-08-04 | 2019-02-26 | 北京京东尚科信息技术有限公司 | Method of Commodity Recommendation and device, storage medium and electric terminal |
CN107730726A (en) * | 2017-10-23 | 2018-02-23 | 秦卓奕 | A kind of commodity, service sales exhibition method and intelligence sales exhibition terminal |
CN110111167A (en) * | 2018-02-01 | 2019-08-09 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of determining recommended |
CN108446911A (en) * | 2018-03-15 | 2018-08-24 | 孙向东 | Intelligent payment system |
CN108665312A (en) * | 2018-05-08 | 2018-10-16 | 北京京东金融科技控股有限公司 | Method and apparatus for generating information |
CN108665312B (en) * | 2018-05-08 | 2020-09-29 | 京东数字科技控股有限公司 | Method and apparatus for generating information |
CN109063137A (en) * | 2018-08-03 | 2018-12-21 | 苏州大学 | A kind of recommended determines method, apparatus, equipment and readable storage medium storing program for executing |
CN109218769A (en) * | 2018-09-30 | 2019-01-15 | 武汉斗鱼网络科技有限公司 | A kind of recommended method and relevant device of direct broadcasting room |
CN109218769B (en) * | 2018-09-30 | 2021-01-01 | 武汉斗鱼网络科技有限公司 | Recommendation method for live broadcast room and related equipment |
WO2020135189A1 (en) * | 2018-12-29 | 2020-07-02 | 深圳Tcl新技术有限公司 | Product recommendation method, product recommendation system and storage medium |
CN111476621A (en) * | 2019-01-24 | 2020-07-31 | 百度在线网络技术(北京)有限公司 | User item recommendation method and device |
CN111476621B (en) * | 2019-01-24 | 2023-09-22 | 百度在线网络技术(北京)有限公司 | User article recommendation method and device |
CN110348810A (en) * | 2019-07-16 | 2019-10-18 | 河北冀联人力资源服务集团有限公司 | Team's recommended method and system |
CN111611496A (en) * | 2020-04-09 | 2020-09-01 | 浙江口碑网络技术有限公司 | Product recommendation method and device |
CN112446765A (en) * | 2020-12-01 | 2021-03-05 | 平安科技(深圳)有限公司 | Product recommendation method and device, electronic equipment and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106779825A (en) | A kind of item recommendation method, device and electronic equipment | |
US11269962B2 (en) | Inductive matrix completion and graph proximity for content item recommendation | |
US9691096B1 (en) | Identifying item recommendations through recognized navigational patterns | |
US10671679B2 (en) | Method and system for enhanced content recommendation | |
WO2017181612A1 (en) | Personalized video recommendation method and device | |
US9836554B2 (en) | Method and system for providing query suggestions including entities | |
US20160012485A1 (en) | Browsing context based advertisement selection | |
US20150169759A1 (en) | Identifying similar applications | |
CN112818224B (en) | Information recommendation method and device, electronic equipment and readable storage medium | |
US20130212105A1 (en) | Information processing apparatus, information processing method, and program | |
US20200193491A1 (en) | Quotation method executed by computer, quotation device, electronic device and storage medium | |
CN111209477A (en) | Information recommendation method and device, electronic equipment and storage medium | |
US11914582B2 (en) | Suggesting queries based upon keywords | |
US11430049B2 (en) | Communication via simulated user | |
CN106407401A (en) | A video recommendation method and device | |
CN111260449B (en) | Model training method, commodity recommendation device and storage medium | |
CN103514253A (en) | Ranking based on social activity data | |
CN111797319B (en) | Recommendation method, recommendation device, recommendation equipment and storage medium | |
US20150235264A1 (en) | Automatic entity detection and presentation of related content | |
US20140351094A1 (en) | Information processing device, category displaying method, program, and information storage medium | |
US20150310529A1 (en) | Web-behavior-augmented recommendations | |
CN109657145A (en) | Merchant searching method and device, electronic equipment and computer-readable storage medium | |
US20150302088A1 (en) | Method and System for Providing Personalized Content | |
US11556822B2 (en) | Cross-domain action prediction | |
CN111523030B (en) | Newspaper disc information recommendation method and device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170531 |