我会使用 prediction.io 构建推荐服务。我认为对于我的需要 Universal Recommender ( http://templates.prediction.io/PredictionIO/template-scala-parallel-universal-recommendation ) 是一个很好的模板。我的网站显示 EPG,我想根据用户页面视图为简单的 PoC 进行推荐。页面浏览量是具有某些属性的广播,包括性别、演员、标签、频道、花束……
一开始我将只发送一个主要事件,用户会看到广播:
{
"event" : "view",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "broadcastId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}
如果我理解文档,我将不得不使用 crontask 每天发送新广播以添加属性并学习 pio 新项目:
{
"event" : "$set",
"entityType" : "item",
"entityId" : "broadcastId",
"properties" : {
"bouquet" : ["B1", "B2"],
"people": ["P1", "P2"],
"channel": ["C1"],
"availableDate" : "2015-11-23T21:02:49.228Z",
"expireDate": "2016-10-05T21:02:49.228Z"
},
"eventTime" : "2015-11-23T21:02:49.228Z"
}
现在,我不知道在广播实体中使用属性更好还是发送辅助事件更好?例如 :
{
"event" : "view-bouquet",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "bouquetId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}
{
"event" : "view-people",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "peopleId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}
...
{
"event" : "view-channel",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "channelId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}