|
@@ -164,12 +164,15 @@ public class RankService {
|
|
|
|
|
|
private List<Video> mergeAndRankRovRecallNew(RankParam param) {
|
|
|
UserFeature userFeature = featureRemoteService.getUserFeature(param.getUid());
|
|
|
+ log.info("userFeature = {}", JSONUtils.toJson(userFeature));
|
|
|
|
|
|
List<Video> recallVideos = param.getRecallResult().mergeRecallVideos();
|
|
|
List<RankItem> rankItems = CommonCollectionUtils.toList(recallVideos, RankItem::new);
|
|
|
|
|
|
List<Long> videoIds = CommonCollectionUtils.toListDistinct(recallVideos, Video::getVideoId);
|
|
|
Map<Long, ItemFeature> videoFeatureMap = featureRemoteService.getVideoFeatureMap(videoIds);
|
|
|
+ log.info("ItemFeature = {}", JSONUtils.toJson(videoFeatureMap));
|
|
|
+
|
|
|
for (RankItem rankItem : rankItems) {
|
|
|
rankItem.setItemFeature(videoFeatureMap.get(rankItem.getVideoId()));
|
|
|
}
|
|
@@ -177,7 +180,7 @@ public class RankService {
|
|
|
// TODO
|
|
|
List<RankItem> rovRecallScore = ScorerUtils.getScorerPipeline(ScorerUtils.BASE_CONF)
|
|
|
.scoring(convert(param), userFeature, rankItems);
|
|
|
- log.info("mergeAndRankRovRecall rovRecallScore={}", JSONUtils.toJson(rovRecallScore));
|
|
|
+ log.info("mergeAndRankRovRecallNew rovRecallScore={}", JSONUtils.toJson(rovRecallScore));
|
|
|
|
|
|
return CommonCollectionUtils.toList(rovRecallScore, i -> {
|
|
|
// hard code 将排序分数 赋值给video的sortScore
|