根据其他用户的相关信息为用户生成产品“建议" [英] generating product 'suggestions' for users based on relative information from other users

查看:29
本文介绍了根据其他用户的相关信息为用户生成产品“建议"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含三个表的数据库,设置如下:

I have a database with three tables set up like this:

用户:用户名、user_id
产品:product_name、product_id
User_Products:product_id、user_id、relation_level

Users: username, user_id
Products: product_name, product_id
User_Products: product_id, user_id, relation_level

这些都非常简单,当用户点击喜欢"一个产品时,它会询问他们喜欢它的程度(评分 1-5)并将该信息存储在 User_Products 表中,并存储 Products 表中的 product_id、用户表中的 user_id 和基于他们对产品的喜欢程度的关系级别.

These are all pretty straight forward, when a user clicks to 'like' a product, it asks how much they like it (rated 1-5) and stores that information in the User_Products table, storing the product_id from the Products table, user_id from the Users table and relation_level based on how much they like the product.

我想做的是根据用户喜欢的产品和他们喜欢产品的程度为用户可能喜欢的产品生成建议,让用户喜欢类似产品并找到用户还不知道的产品,根据喜欢他们的人数和他们喜欢他们的程度.

What I want to do is generate suggestions for products the user might like, based on products the user likes and how much they like the products, getting users who like similar products and finding products the user doesn't already know about, based on the number of people who like them and the level they like them.

有人对我如何实现这一目标有任何想法吗?

Does anyone have any ideas how I can achieve this?

推荐答案

这听起来像是推荐引擎问题中最经典和最规范的问题.Apache Mahout 有一个完整的推荐引擎框架,包括一个简单的非分布式、非 Hadoop 版本,易于使用实验.

This sounds like the most classic and canonical of recommender engine problems. Apache Mahout has a complete recommender engine framework, including a simple non-distributed, non-Hadoop version that will be easy to experiment with.

特别是,您只想插入基于 JDBC 的 DataModel 实现之一来启动以读取您的数据.剩下的就是几行代码.

In particular, you will just want to plug in one of the JDBC-based DataModel implementations to start in order to read your data. The rest is a few lines of code.

现在,我知道你说的是 PHP.Mahout 是 Java.但是您可以考虑将其设置为您的 PHP 可以访问的网络服务.

Now, I know you said PHP. Mahout is Java. But you can look at setting this up as a web service that your PHP could access.

这篇关于根据其他用户的相关信息为用户生成产品“建议"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆