Disclosure of Invention
In order to improve the accuracy of the determined recommended product, the embodiment of the application provides a method and a device for determining the recommended product.
In one aspect, an embodiment of the present application provides a method for determining a recommended product, where the method includes:
determining product categories in which the target user is interested;
acquiring neighbor users interested in the product categories interested in the target user;
and determining the recommended products recommended to the target user according to the interest degree of the neighbor users to the products to be recommended.
Optionally, before the determining the product category in which the target user is interested, the method further includes:
determining the interest degree of each user in each product category according to the number of the products evaluated by each user in each product category, wherein the users comprise target users and other users;
determining product categories of interest to the target user, comprising:
determining product categories in which target users are interested according to the interest degrees of the target users in the product categories;
the obtaining neighbor users interested in the product categories in which the target user is interested comprises:
and determining other users interested in the product categories interested in the target user as neighbor users.
Optionally, the determining the interest level of each user in the product category according to the number of the products evaluated by each user in each product category includes:
and determining the interest degree of each user in each product category according to the number of the products evaluated by each user in each product category and the number of the products included in each product category.
Optionally, the determining, according to the number of products evaluated by each user in each product category and the number of products included in each product category, the interest level of each user in each product category includes:
according to
Determining the interest degree of each user in each product category;
wherein, a
ijFor the interest level of user i in product category j, M
ijFor the number of products in product category j that are evaluated by user i,
for the total number of products evaluated by user i, N, in each product category
jFor the number of products included in the product category j,
the total number of products included for each product category.
Optionally, the product to be recommended belongs to a product category in which the target user is interested.
Optionally, the determining, according to the interest level of the neighbor user in the product to be recommended, a recommended product recommended to the target user includes:
determining the recommendation degree of the product to be recommended aiming at the target user according to the interest degree of the neighbor user in the product to be recommended;
and determining a recommended product recommended to the target user according to the recommendation degree.
Optionally, the determining, according to the interest level of the neighbor user in the product to be recommended, the recommendation level of the product to be recommended for the target user includes:
and determining the recommendation degree of the product to be recommended for the target user according to the interest degree of each neighbor user to the product to be recommended, the similarity between the target user and each neighbor user and the sum of the similarities between the target user and each neighbor user.
Optionally, the determining the recommendation degree of the product to be recommended for the target user according to the sum of the interest degree of each neighbor user to the product to be recommended, the similarity between the target user and each neighbor user, and the similarity between the target user and each neighbor user includes:
according to
Determining the recommendation degree of the product to be recommended for the target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the first target user s and the neighbor user k,
is the sum of the similarities between the target user s and each neighbor user.
Optionally, the determining, according to the interest level of the neighbor user in the product to be recommended, the recommendation level of the product to be recommended for the target user includes:
and determining the recommendation degree of the product to be recommended for the target user according to the interest degree of the product to be recommended of each neighbor user, the similarity between the target user and each neighbor user, the sum of the similarity between the target user and each neighbor user, the interest degree of the product category to which the product to be recommended of the target user belongs and the sum of the interest degrees of the product categories of the target user.
Optionally, the determining, according to the interest degree of each neighbor user in a product to be recommended, the similarity between the target user and each neighbor user, the sum of the similarity between the target user and each neighbor user, the interest degree of the target user in a product category to which the product to be recommended belongs, and the sum of the interest degrees of the target user in each product category, the recommendation degree of the product to be recommended for the target user is determined, includes:
according to
Determining the recommendation degree of the product to be recommended for the target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the target user s and the neighbor user k,
is the sum of the similarities between the target user s and the neighbor users, a
s,jqThe interest degree of the target user s in the product category q to which the to-be-recommended product j belongs,
and the sum of the interest degrees of the target user s in each product category is shown, wherein w is the product category.
In another aspect, an embodiment of the present application provides an apparatus for determining a recommended product, where the apparatus includes:
the first determination module is used for determining the product category in which the target user is interested;
the acquisition module is used for acquiring neighbor users interested in the product categories which are determined by the first determination module and are interested in the target user;
and the second determination module is used for determining the recommended products recommended to the target user according to the interest degrees of the neighbor users to the products to be recommended, which are acquired by the acquisition module.
Optionally, the apparatus further comprises:
the third determining module is used for determining the interest degree of each user in each product category according to the number of the products evaluated by each user in each product category, wherein the users comprise target users and other users;
the first determining module is used for determining the product categories in which the target user is interested according to the interest degree of the target user in each product category determined by the third determining module;
and the acquisition module is used for determining other users interested in the product categories which are determined by the third determination module and are interested in the target user as neighbor users.
Optionally, the third determining module is configured to determine the interest level of each user in each product category according to the number of products evaluated by each user in each product category and the number of products included in each product category.
Optionally, the third determining module is configured to determine according to
Determining the interest degree of each user in each product category;
wherein, a
ijFor the interest level of user i in product category j, M
ijFor the number of products in product category j that are evaluated by user i,
for the total number of products evaluated by user i, N, in each product category
jFor the number of products included in the product category j,
the total number of products included for each product category.
Optionally, the product to be recommended belongs to a product category in which the target user is interested.
Optionally, the second determining module includes:
the first determining unit is used for determining the recommendation degree of the product to be recommended aiming at the target user according to the interest degree of the neighbor user in the product to be recommended;
and the second determining unit is used for determining the recommended products recommended to the target user according to the recommendation degree determined by the first determining unit.
Optionally, the first determining unit is configured to determine the recommendation degree of the product to be recommended for the target user according to a sum of the interest degree of each neighbor user for the product to be recommended, the similarity between the target user and each neighbor user, and the similarity between the target user and each neighbor user.
Optionally, the first determining unit is configured to determine according to
Determining the recommendation degree of the vertical product to be recommended aiming at the target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the first target user s and the neighbor user k,
is the sum of the similarities between the target user s and each neighbor user.
Optionally, the first determining unit is configured to determine the recommendation degree of the product to be recommended for the target user according to the interest degree of each neighbor user in the product to be recommended, the similarity between the target user and each neighbor user, the sum of the similarities between the target user and each neighbor user, the interest degree of the product category to which the product to be recommended by the target user belongs, and the sum of the interest degrees of the product categories by the target user.
Optionally, the first determining unit is configured to determine according to
Determining the recommendation degree of the product to be recommended for the target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the target user s and the neighbor user k,
is the sum of the similarities between the target user s and the neighbor users, a
s,jqThe interest degree of the target user s in the product category q to which the to-be-recommended product j belongs,
and the sum of the interest degrees of the target user s in each product category is shown, wherein w is the product category.
The beneficial effects are as follows:
determining product categories in which the target user is interested; acquiring neighbor users interested in the product categories interested in the target user; and determining the recommended products recommended to the target user according to the interest degrees of the neighbor users to the products to be recommended. In the application, the neighbor users and the target users are interested in the same product category, and the recommended products determined according to the preferences of the neighbor users are products in the product category interested by the target users. Therefore, compared with the prior art, the finally determined recommended product is more in line with the preference of the target user, and the recommendation accuracy can be improved.
Detailed Description
In order to make the technical solutions and advantages of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and not an exhaustive list of all embodiments. And the embodiments and features of the embodiments in the present description may be combined with each other without conflict.
When making a product recommendation, it is first necessary to determine the recommended product. In the prior art, preference scores of a target user for all products are obtained, neighbor users with higher similarity to the target user are determined according to the preference scores, and recommended products are determined according to the preference scores of the neighbor users for the products. The determination of the neighbor users is related to the preference scores of the target user for all products, along with the gradual refinement of product classification, the preference of the neighbor users determined according to the preference scores of the target user for all products is not enough to represent the preference of the target user, and the recommended products determined according to the preference of the neighbor users do not belong to the product categories in which the target user is interested, so that the recommendation accuracy of the method is reduced.
In order to improve recommendation accuracy, the method for determining the recommended products is provided, and the method for determining the product categories which are interested by the target user is used; acquiring neighbor users interested in the product categories interested in the target user; and determining the recommended products recommended to the target user according to the interest degrees of the neighbor users to the products to be recommended. According to the method, the neighbor users and the target user are interested in the same product category, the recommended products determined according to the preference of the neighbor users in the method belong to the product category interested by the target user, and the recommendation accuracy is improved.
In combination with the above implementation environment, the present application provides a method for determining a recommended product. The method provided by the application can be applied to various scenes to recommend the recommended product to the recommended user after the recommended product is determined, so that the personalized and customized requirements of the user are met, the viscosity of the user is improved, and the competitiveness is enhanced.
In order to more clearly and clearly illustrate the determination method of the recommended product provided by the embodiment, the following scenario is taken as an example in the embodiment, and for other scenarios, the implementation manner of the following scenario can be referred to.
Specific scenes are as follows: the product categories are 5 categories, which are respectively: audio-visual goods, books, household electrical appliances, dress and fruit, wherein, audio-visual goods category and household electrical appliances category do not refine concrete product, and the books category is refined into 3 kinds of products, is respectively: textbooks, biographies, and novels. The clothing category is refined into 3 products, which are respectively: skirt, pants, and shirt. The fruit category is refined into 3 products, which are respectively: banana, apple and grape. Preference scoring takes five preference levels: "particularly dislike", "general", "like", "particularly like", the corresponding scores were scored as 1, 2, 3, 4, 5, and no evaluation was scored as 0. Historical users are { u }1,u2,u3,u4And the preference scores of the historical users for the products are shown in table 3:
TABLE 3
The relationship between the determination device for determining the recommended product for executing the method provided by the embodiment and the storage device for storing the related data in the scene may be one of the following relationships:
the first relationship: the determination device for recommending the product and the storage device are the same device;
namely, the determination method of the recommended product provided by the embodiment is run on the storage device for storing the related data in the scene.
In this connection, the determination device for determining the recommended product, which operates the method provided by the present embodiment, directly reads the stored scene-related data. For example: each historical user, each product category, each product, the inclusion relationship between the product categories and the products, and preference scoring data of each product.
The second relationship: the determination device and the storage device of the recommended product are different devices;
the storage device for storing the related data in the scene and the device for determining the recommended product for running the method provided by the embodiment are two devices.
In this connection, the determination device for the recommended product, which operates the method provided in this embodiment, obtains the scene-related data from the storage device that stores the related data in the scene. For example, historical users, product categories, products, inclusion relationships between product categories and products, preference scoring data for products.
In addition, for the above scenario, no matter what kind of relationship is between the determination device of the recommended product running the method provided by the embodiment and the storage device storing the related data in the above scenario, when determining the recommended product, the following 2 cases may exist in the relationship between the target user and the historical user:
case 1: historical users do not include target users, e.g., target user is u5。
For this case, u is not shown in Table 35Scoring the preference of each product, u cannot be determined5Therefore, the determination method of recommended products provided by the present application is not performed.
In specific implementation, a default product may be determined as a recommended product, and u is to be recorded in table 35After the preference of one or some products is scored, the method provided by the application is executed to determine recommended products.
Case 2: historical users include target users, e.g., target user is u4。
For such a case, the method provided by the present application may be performed to determine the recommended product.
The target user is u below4And u is4For an example of apple interest, referring to fig. 1, a method for determining a recommended product provided in this embodiment will be described.
101: determining the interest degree of each historical user in each product category according to the number of the products evaluated by each historical user in each product category;
wherein the historical users comprise target users u4And other users u1,u2,u3。
When the step is specifically implemented, the interest degree of each historical user in each product category can be determined according to the number of the products evaluated by each historical user in each product category and the number of the products included in each product category.
E.g. u
i(any historical user) pair L
jInterestingness of (any product category)
Wherein M is
ijFor the number of products in product category j that are rated by the historical user i,
for the total number of products in each product category, N, evaluated by the historical user i
jFor the number of products included in the product category j,
the total number of products included for each product category.
Referring to Table 3, now for u1,u2,u3,u4The method of calculating the interestingness of each product category will be described in detail.
1) For u1:u1The evaluation of each product is shown in table 4.
TABLE 4
As can be seen from Table 4, u is assigned to the class L11The number of products evaluated was 1, and was u in the category L21The number of products evaluated was 3, and was rated by u in the category L31The number of products evaluated was 1, and was u in the category L41Number of products evaluatedAmount of 0, by u in class L51The number of products evaluated was 0. Thus, M is determined11=1,M12=3,M13=1,M14=0,M150. Also, as can be seen from Table 4, L1Including the number of products N1=1,L2Including the number of products N2=3,L3Including the number of products N3=1,L4Including the number of products N4=3,L5Including the number of products N5=3。
Therefore, the temperature of the molten metal is controlled,
2) for u2:u2The evaluation of each product is shown in table 5.
TABLE 5
As can be seen from Table 5, u is assigned to the class L12The number of products evaluated was 1, and was u in the category L22The number of products evaluated was 3, and was rated by u in the category L32The number of products evaluated was 1, and was u in the category L42The number of products evaluated was 0, and was u in the category L52The number of products evaluated was 0. Thus, M is determined21=1,M22=3,M23=1,M24=0,M250. Also, as can be seen from Table 5, L1Including the number of products N1=1,L2Including the number of products N2=3,L3Including the number of products N3=1,L4Including the number of products N4=3,L5Including the number of products N5=3。
Therefore, the temperature of the molten metal is controlled,
3) for u3:u3The evaluation of each product is shown in table 6.
TABLE 6
As can be seen from Table 6, u is assigned to the class L13The number of products evaluated was 0, and was u in the category L23The number of products evaluated was 1, and was u in the category L33The number of products evaluated was 1, and was u in the category L43The number of products evaluated was 3, and was rated by u in the category L53The number of products evaluated was 3. Thus, M is determined31=0,M32=1,M33=1,M34=3,M353. Also, as can be seen from Table 6, L1Including the number of products N1=1,L2Including the number of products N2=3,L3Including the number of products N3=1,L4Including the number of products N4=3,L5Including the number of products N5=3。
Therefore, the temperature of the molten metal is controlled,
4) for u4:u4The evaluation of each product is shown in table 7.
TABLE 7
As can be seen from Table 7, u is assigned to the class L14The number of products evaluated was 0, and was u in the category L24The number of products evaluated was 3, and was rated by u in the category L34The number of products evaluated was 1, and was u in the category L44The number of products evaluated was 0, and was u in the category L54The number of products evaluated was 1. Thus, M is determined41=0,M42=3,M43=1,M44=0,M451. Also, as can be seen from Table 7, L1Including the number of products N1=1,L2Including the number of products N2=3,L3Including the number of products N3=1,L4Including the number of products N4=3,L5Including the number of products N5=3。
Therefore, the temperature of the molten metal is controlled,
in conclusion, the interest degree matrix of each historical user to each product category is obtained
Obviously, when aij0 denotes user uiProduct class L has not yet been evaluatedj. In the case of product classification and product quantity determination, uiTo LjThe greater the number of products evaluated, the greater aijThe larger u is considered to beiTo LjThe greater the interest.
In addition, after the interestingness matrix of each historical user for each product category is obtained, interesting users interested in any product category can be determined according to the interestingness of each historical user for each product category.
Specifically, an interest preference scale parameter alpha is determined, wherein alpha is greater than 0, and when 0 is greater than aijWhen < alpha, u is considered to beiTo LjInterest is general, even small and negligible; when a isijWhen u is not less than alpha, u is considered to beiTo LjThere is an interest preference, and the greater the value the greater the interest preference.
For a predetermined α, will be for Lj(j ═ 1, 2, …, m) users with interest preferences are put into a category, i.e. users who are interested in each product category:
Uj={ui|ai,jand the value is more than or equal to alpha, i is 1, 2, …, N, wherein N is the number of users.
Using the interest degree of each historical user in each product category as an interest degree matrix
α ═ 1 is an example: l is
1User of interest U
1Is { u
1,u
2},L
2User of interest U
2Is { u
1,u
2,u
3,u
4},L
3User of interest U
3Is { u
1,u
2,u
3,u
4},L
4User of interest U
4Is { u
3},L
5User of interest U
5Is { u
3,u
4}。
Of course, in obtaining L
jUser of interest U
jThen, the sum of the obtained sum and U can be obtained
jCorresponding scoring matrices, i.e. U
jIn each historical user pair L
jThe scoring matrix of (a) is calculated,
e.g. U
1In each historical user pair L
1Scoring matrix of
U
2In each historical user pair L
2Scoring matrix of
U
3In each historical user pair L
3Scoring matrix of
U
4In each historical user pair L
4Scoring matrix of
U
5In each historical user pair L
5Scoring matrix of
Step 101 is not a step that needs to be executed each time the determination method of the recommended product provided by this embodiment is executed, and only when the determination method of the recommended product provided by this embodiment is executed for the first time, or the historical user changes, or the product category changes, or the corresponding relationship between the product and the product category changes, or the preference score of any product of the historical user changes, step 101 is executed to determine the latest interest level of the historical user in the product category, and this embodiment does not limit the trigger condition for executing step 101.
102: determining product categories in which the target user is interested;
the target user and the historical user have 2 relations, and the historical user does not include the target user, or the historical user includes the target user. The present embodiment is described only for the case where the history user includes the target user.
Specifically, the historical users include target users and other users, the interest-degree of the historical users in the product categories obtained in step 101 also includes the interest-degree of the target users in each product category and the interest-degree of the other users in each product category, and the product categories in which the target users are interested are determined according to the interest-degree of the target users in each product category obtained in step 101.
Taking the example in
step 101 as an example, the target user u
4The interest degrees for each product category are respectively: a is
41=0、
a
44=0、
If the interest preference scale parameter alpha is larger than 0, when a
ijWhen u is not less than alpha, u is considered to be
iTo L
jPreference of interest, then u is determined
4The product category of interest is L
2、L
3And L
5。
103: determining whether the product to be recommended belongs to the product category which is interested by the target user, if the product to be recommended does not belong to the product category which is interested by the target user, executing step 104, and if the product to be recommended belongs to the product category which is interested by the target user, executing step 105 and the subsequent steps;
the product to be recommended in this embodiment may be a product that is not scored by the target user, or may be a product that is scored by the target user.
For example, the product to be recommended may be u4Unscored audiovisual product, skirt, pants, shirt, banana or apple by orienting u4Recommending unscored products, can be4Find other products of interest, raise the user's viscosity. The product to be recommended may also be u4Scored textbook, biography, novel, household appliance, grape, by u4Recommending the scored product, and making u4The latest dynamic of the interested product is found, and the viscosity of the user is improved.
Take shopping platform as an example, u4Purchasing textbooks, biographies, novels, household appliances and grapes, and grading, wherein if the products to be recommended are determined to be audio-visual products, skirts, trousers, shirts, bananas or apples, u can be added4The possibility of purchasing audio-video products, skirts, trousers, shirts, bananas or apples is improved4Viscosity to shopping platform. In addition, u can be used for sales promotion of scientific education books, biographies, novels, household appliances or grapes4The purchased and scored textbook, biographical, novel, home appliance or grape is determined again as the product to be recommended so that u is4Obtaining the sales promotion information of textbooks, biographies, novels, household appliances or grapes and increasing u4Repurchase of textbook, biography, novel, and familyElectricity or grape potential, increasing user viscosity.
For the specific scenario in this embodiment, if the product to be recommended is an audio-visual product, the corresponding product category is L1Do not belong to u4The product category of interest, step 104 is executed. If the product to be recommended is a skirt, the corresponding product category is L3Do not belong to u4The product category of interest, step 104 is executed. If the product to be recommended is trousers, the corresponding product type is L3Do not belong to u4The product category of interest, step 104 is executed. If the product to be recommended is a shirt, the corresponding product category is L3Do not belong to u4The product category of interest, step 104 is executed.
If the product to be recommended is a textbook, the corresponding product category is L2Is u of4The product category of interest, step 105 is performed. If the product to be recommended is a biography, the corresponding product category is L2Is u of4The product category of interest, step 105 is performed. If the product to be recommended is a novel, the corresponding product category is L2Is u of4The product category of interest, step 105 is performed. If the product to be recommended is a household appliance, the corresponding product category is L3Is u of4The product category of interest, step 105 is performed. If the product to be recommended is banana, the corresponding product category is L5Is u of4The product category of interest, step 105 is performed. If the product to be recommended is apple, the corresponding product category is L5Is u of4The product category of interest, step 105 is performed. If the product to be recommended is grape, the corresponding product category is L5Is u of4The product category of interest, step 105 is performed.
104: determining that the interest degree of the target user to the recommended product is 0, and ending the process;
taking the product to be recommended as an audio-video product as an example, u is determined4The interest degree of the audio-video product is 0, i.e. the audio-video product is not recommended to u4And (4) recommending the product, and ending the process.
105: acquiring neighbor users interested in the product categories interested in the target user;
wherein, the historical users include target users and other users, the interest-degree of the historical users on the product categories obtained in step 101 also includes the interest-degree of the target users on each product category and the interest-degree of the other users on each product category, and in this step, according to the interest-degree of the other users on each product category obtained in step 101, the target users (u) determined in step 102 will be selecteds) Product category of interest (L)w) Other users of interest (US)sw) Determined to be a neighbor user.
Taking the example in
step 102 as an example, in
step 102, u is determined
4The product category of interest is L
2、L
3And L
5Obtained in step 101
a
14=0、a
15=0;
a
24=0、a
25=0;a
31=0、
If the interest preference scale parameter alpha is larger than 0, when a
ijWhen u is not less than alpha, u is considered to be
iTo L
jPreference of interest, then u is determined
1The product category of interest is L
1、L
2And L
3Determining u
2The product category of interest is L
1、L
2And L
3Determining u
3The product category of interest is L
2、L
3And L
5. In
step 102, a target user u is determined
4The product category of interest is L
2、L
3And L
5Then, to u
4Product category of interest L
2Interested neighbor user US
42Is { u
1,u
2,u
3Is to u
4Product category of interest L
3Interested neighbor user US
43Is { u
1,u
2,u
3Is to u
4Product category of interest L
5Interested neighbor user US
45Is { u
3}。
106: and determining the recommended products recommended to the target user according to the interest degrees of the neighbor users to the products to be recommended.
Specific embodiments of this step include, but are not limited to: step 1: determining the recommendation degree of a product to be recommended aiming at a target user according to the interest degree of a neighbor user in the product to be recommended; step 2: and determining a recommended product recommended to the target user according to the recommendation degree.
The following describes the implementation of each step.
Step 1: determining the recommendation degree of a product to be recommended aiming at a target user according to the interest degree of a neighbor user in the product to be recommended;
for step 1, implementations include, but are not limited to, the following two:
implementation mode 1: and determining the recommendation degree of the product to be recommended for the target user according to the interest degree of the product to be recommended by each neighbor user, the sum of the similarity between the target user and each neighbor user and the similarity between the target user and each neighbor user.
Implementation manner 2: and determining the recommendation degree of the product to be recommended for the target user according to the interest degree of the product to be recommended by each neighbor user, the similarity between the target user and each neighbor user, the sum of the similarity between the target user and each neighbor user, the interest degree of the product category to which the product to be recommended by the target user belongs and the sum of the interest degrees of the product categories by the target user.
For the implementation mode 1, the recommendation degree of the product to be recommended for the target user is determined according to the sum of the interest degree of each neighbor user to the product to be recommended, the similarity between the target user and each neighbor user and the similarity between the target user and each neighbor user.
Detailed description of the inventionCan be according to
And determining the recommendation degree of the product to be recommended aiming at the target user.
Wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the first target user s and the neighbor user k,
is the sum of the similarities between the target user s and each neighbor user.
sim (s, k) may be determined by any conventional similarity calculation method, and is not limited herein.
For example: for usOther users USswAny other user u inkSim (s, k) is obtained from the cloud vector V ═ Er (Er, En, He).
In particular, the method comprises the following steps of,
1) calculating a sample mean value:
wherein M is the number of products;
2) calculate first order sample absolute center:
3) calculating the sample variance:
4)Er
sestimated value of (a):
5) super entropy He
sEstimated value of (a):
6) entropy En
sEstimated value of (a):
7) to obtain usCloud vector V ofs=(Ers,Ens,Hes);
8) Repetition of 1) to 7) gave a cloud vector V of ukk=(Erk,Enk,Hek);
9) According to VsAnd VkObtaining sim (s, k) ═ cos (V)s,Vk)。
Referring to table 3, taking the products to be recommended as textbooks, biographies, novels, household appliances, bananas, apples and grapes as examples, the interestingness of the products to be recommended according to the neighbor users is determined for the products to be recommended, and the products to be recommended are determined according to the interestingness of the products to be recommended4The 1 st implementation of the recommendation degree of (1) will be described.
In step 102 u is determined4The product category of interest is L2、L3And L5In step 105, pairs u are determined4Product category of interest L2Interested neighbor user US42Is { u1,u2,u3Is to u4Product category of interest L3Interested neighbor user US43Is { u1,u2,u3Is to u4Product category of interest L5Interested neighbor user US45Is { u3}。
1) The product 1 to be recommended is a science and education book
The product category corresponding to the science book is L
2,US
42Is { u
1,u
2,u
3If u
4And u
1The similarity between the two is sim (4, 1), u
4And u
2The similarity between the two is sim (4, 2), u
4And u
3The similarity between the two is sim (4, 3), then the textbook is determined to be directed to u
4Degree of recommendation of
2) The product 2 to be recommended is a biographical
The product category corresponding to the biography is L
2,US
42Is { u
1,u
2,u
3Pointing to u by biography
4Degree of recommendation of
3) The product to be recommended 3 is a novel
The product category corresponding to the novel is L
2,U5
42Is { u
1,u
2,u
3Let us say u
4Degree of recommendation of
4) The product 4 to be recommended is a household appliance
The product category corresponding to the household appliance is L
3,US
43Is { u
1,u
2,u
3The household appliance aims at u
4Degree of recommendation of
5) The product to be recommended 5 is banana
The corresponding product category of the bananas is L
5,US
45Is { u
3F. banana for u
4Degree of recommendation of
6) The product 6 to be recommended is apple
The corresponding product category of the apple is L
5,US
45Is { u
3Apple for u
4Degree of recommendation of
7) The product 7 to be recommended is grape
The product category corresponding to the grapes is L
5,US
45Is { u
3Grape for u
4Degree of recommendation of
From this, it can be seen that novels, home appliances, bananas, apples and grapes are directed to u4The recommendation degree of (1) is 5, and textbooks and biographies are directed at u4The recommendation degrees are all less than 5.
Implementation manner 2: and determining the recommendation degree of the product to be recommended for the target user according to the interest degree of the product to be recommended by each neighbor user, the similarity between the target user and each neighbor user, the sum of the similarity between the target user and each neighbor user, the interest degree of the product category to which the product to be recommended by the target user belongs and the sum of the interest degrees of the product categories by the target user.
For example: according to
Determining the recommendation degree of a product to be recommended aiming at a target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the target user s and the neighbor user k,
is the sum of the similarities between the target user s and the neighbor users, a
s,jqThe interest degree of the target user s in the product category q to which the to-be-recommended product j belongs,
and the sum of the interest degrees of the target user s in each product category is shown, wherein w is the product category.
Still referring to table 3, taking the products to be recommended as textbooks, biographies, novels, household appliances, bananas, apples and grapes as examples, the interestingness of the products to be recommended according to the neighbor users is determined for u4The 2 nd implementation of the recommendation degree of (1) is exemplified.
In step 102, it is determinedu4The product category of interest is L2、L3And L5In step 105, the product category L of interest to u4 is determined2Interested neighbor user US42Is { u1,u2,u3Is to u4Product category of interest L3Interested neighbor user US43Is { u1,u2,u3Is to u4Product category of interest L5Interested neighbor user US45Is { u3}。
1) The product 1 to be recommended is a science and education book
The product category corresponding to the science book is L
2,US
42Is { u
1,u
2,u
3If u
4And u
1The similarity between the two is sim (4, 1), u
4And u
2The similarity between the two is sim (4, 2), u
4And u
3The similarity between the two is sim (4, 3), then the determination is made
A is obtained in
step 101
41=0、
a
44=0、
Thus, the textbook is determined for u
4Degree of recommendation of
2) The product 2 to be recommended is a biographical
The product category corresponding to the biography is L
2,US
42Is { u
1,u
2,u
3Is determined
Determining a discipline for u4Degree of recommendation of
3) The product to be recommended 3 is a novel
The product category corresponding to the novel is L
2,US
42Is { u
1,u
2,u
3Is determined
Determining novel for u4Degree of recommendation of
4) The product 4 to be recommended is a household appliance
The product category corresponding to the household appliance is L
3,US
43Is { u
1,u
2,u
3Is determined
Determining household appliance target u4Degree of recommendation of
5) The product to be recommended 5 is banana
The corresponding product category of the bananas is L
5,US
45Is { u
3Is determined
Determining banana target u4Degree of recommendation of
6) The product 6 to be recommended is apple
The corresponding product category of the apple is L
5,US
45Is { u
3Is determined
Determining apple target u4Degree of recommendation of
7) The product 7 to be recommended is grape
The product category corresponding to the grapes is L
5,US
45Is { u
3Is determined
Determination of grape aim u4Degree of recommendation of
From this, it can be seen that the novel and household appliances aim at u
4Are all recommended
Banana, apple and grape seed for u
4Are all recommended
Textbook and biography are directed at u
4Degree of recommendation of
After step 1 is performed: after determining the recommendation degree of the product to be recommended for the target user according to the interest degree of the neighbor user in the product to be recommended, executing the step 2: and determining a recommended product recommended to the target user according to the recommendation degree.
One of the specific implementation manners of step 2 may be to sort the products to be recommended from high to low according to the recommendation degree, and determine a preset number of products ranked in the top as recommended products recommended to the target user.
Taking the preset number of 5 as an example, if the step 1 is realized by the implementation manner 1, the novels, the household appliances, the bananas, the apples and the grapes aim at u4The recommendation degree of (1) is 5, and textbooks and biographies are directed at u4The recommendation degrees are all less than 5. Products to be recommended are sorted from big to small according to recommendation degrees into (1) novel, household appliances, bananas, apples and grapes and (2) textbooks and biographies, so that the top 5 products are sorted: novel, household electrical appliance, banana, apple, grape, determined as recommended to u4The recommended product of (1), including apple, with u4Match the actual situation of.
If step 1 is implemented by the implementation manner 2, the novel household appliance aims at u
4Are all recommended
Banana, apple and grape seed for u
4Are all recommended
Textbook and biography are directed at u
4Degree of recommendation of
Products to be recommended are sorted from big to small according to recommendation degrees into (1) novel and household appliances, (2) bananas, apples and grapes and (3) textbooks and biographies, so that the top 5 products are sorted: novel, household electrical appliance, banana, apple, grape, determined as recommended to u
4The recommended product of (1), including apple, with u
4Match the actual situation of.
Therefore, no matter step 1 is realized by the first implementation mode, the recommendation to u is finally determined4The recommended products are all novels, household appliances, bananas, apples and grapes.
For the specific scenario in this embodiment, the prior art is based on u as shown in FIG. 34Scoring preference of all products, determining4The neighbor user with higher similarity is u,And u2According to u1And u2Scoring the product preference determines that the recommended product is one or more of an audio-visual product, a textbook, a biographical, a novel, and an appliance, but not u4Apple is recommended. And actually u4Interest in apple, leading to the products recommended by the prior art and u4Does not match the actual situation.
The method provided by the embodiment finally determines the recommendation u4The recommended products are all novel, household appliances, bananas, apples and grapes which are oriented to u4Recommending apples so that the products and u recommended by the method provided by the embodiment4Match the actual situation of.
The recommended products obtained by the method provided by the embodiment are not determined as neighbor users according to all scores of the target user in the prior art, but are determined according to the product categories in which the target user is interested, so that the neighbor users and the target user are interested in the same product categories, and at least one recommended product exists in the recommended products determined according to the preference of the neighbor users and is a product in the product category in which the target user is interested, so that the accuracy of the determined recommended products is improved.
In practical application, a movie-related website, for which the number of users exceeds 70000 and the number of movies scored by the users exceeds 5000, performs product recommendation by using the method for determining recommended products provided in this embodiment. 21078 pieces of score data of 1489 movies of 274 users are extracted from the database, and the sparse level of the data set is as follows: 1-21078/(274 × 1489) ═ 0.9483.
And adopting a metric MAE (Mean Absolute Error) of the recommended result, wherein the smaller the MAE value, the higher the recommended quality.
Wherein p isiFor a predicted set of user scores, qiIs the actual set of scores. The MAE obtained by the method provided in this example was 0.77, and the MAE obtained by the prior art was 0.81.
Has the advantages that:
determining product categories in which the target user is interested; acquiring neighbor users interested in the product categories interested in the target user; and determining the recommended products recommended to the target user according to the interest degrees of the neighbor users to the products to be recommended. In the application, the neighbor users and the target users are interested in the same product category, and the recommended products determined according to the preferences of the neighbor users are products in the product category interested by the target users. Therefore, compared with the prior art, the finally determined recommended product is more in line with the preference of the target user, and the recommendation accuracy can be improved.
Based on the same inventive concept, the embodiment provides a device for determining a recommended product, and since the principle of solving the problem of the device is similar to the method for determining a recommended product shown in fig. 1, the implementation of the device can refer to the embodiment of the method shown in fig. 1, and repeated parts are not described again.
Referring to fig. 2, the apparatus includes:
a first determination module 201 for determining a product category in which a target user is interested;
an obtaining module 202, configured to obtain neighbor users interested in the product category that is determined by the first determining module 201 to be interested in by the target user;
the second determining module 203 is configured to determine a recommended product recommended to the target user according to the interest level of the neighbor user to the product to be recommended, which is obtained by the obtaining module 202.
Referring to fig. 3, the apparatus further comprises:
a third determining module 204, configured to determine, according to the number of products evaluated by each user in each product category, the interest level of each user in each product category, where the users include a target user and other users;
the first determining module 201 is configured to determine a product category in which the target user is interested according to the interest level of the target user in each product category determined by the third determining module 204;
an obtaining module 202, configured to determine other users interested in the product category determined by the third determining module 204 as interested in the target user as neighbor users.
Optionally, the third determining module 204 is configured to determine the interest level of each user in each product category according to the number of products evaluated by each user in each product category and the number of products included in each product category.
Optionally, a third determining
module 204 for determining
Determining the interest degree of each user in each product category;
wherein, a
ijFor the interest level of user i in product category j, M
ijFor the number of products in product category j that are evaluated by user i,
for the total number of products evaluated by user i, N, in each product category
jFor the number of products included in the product category j,
the total number of products included for each product category.
Wherein, the product to be recommended belongs to the product category which is interested by the target user.
Referring to fig. 4, the second determining module 203 includes:
the first determining unit 2031 is configured to determine, according to the interest degree of the neighbor user in the product to be recommended, a recommendation degree of the product to be recommended for the target user;
a second determining unit 2032, configured to determine a recommended product recommended to the target user according to the recommendation degree determined by the first determining unit 2031.
Optionally, the first determining unit 2031 is configured to determine, according to a sum of the interest degree of each neighboring user for the product to be recommended, the similarity between the target user and each neighboring user, and the similarity between the target user and each neighboring user, a recommendation degree of the product to be recommended for the target user.
Optionally, a first determining
unit 2031 for determining according to
Determining the recommendation degree of a product to be recommended aiming at a target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the first target user s and the neighbor user k,
is the sum of the similarities between the target user s and each neighbor user.
Optionally, the first determining unit 2031 is configured to determine the recommendation degree of the product to be recommended for the target user according to the interest degree of each neighbor user in the product to be recommended, the similarity between the target user and each neighbor user, the sum of the similarities between the target user and each neighbor user, the interest degree of the product category to which the product to be recommended by the target user belongs, and the sum of the interest degrees of the product categories by the target user.
Optionally, a first determining
unit 2031 for determining according to
Determining the recommendation degree of a product to be recommended aiming at a target user;
wherein r is
s,jFor the recommendation degree r of the product j to be recommended aiming at the target user s
kjInterest degree of the product j to be recommended for the neighbor user k, sim (s, k) is similarity between the target user s and the neighbor user k,
is the sum of the similarities between the target user s and the neighbor users, a
s,jqThe interest degree of the target user s in the product category q to which the to-be-recommended product j belongs,
and the sum of the interest degrees of the target user s in each product category is shown, wherein w is the product category.
The beneficial effects are as follows:
determining product categories in which the target user is interested; acquiring neighbor users interested in the product categories interested in the target user; and determining the recommended products recommended to the target user according to the interest degrees of the neighbor users to the products to be recommended. In the application, the neighbor users and the target users are interested in the same product category, and the recommended products determined according to the preferences of the neighbor users are products in the product category interested by the target users. Therefore, compared with the prior art, the finally determined recommended product is more in line with the preference of the target user, and the recommendation accuracy can be improved.
For convenience of description, each part of the above-described apparatus is separately described as being functionally divided into various modules or units. Of course, the functionality of the various modules or units may be implemented in the same one or more pieces of software or hardware in practicing the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.