|
@@ -154,7 +154,7 @@ public class RankStrategy4RegionMergeModelV999 extends RankStrategy4RegionMergeM
|
|
|
String[] entries = cfListStr.split(",");
|
|
|
for (String entry : entries) {
|
|
|
String[] rList = entry.split(":");
|
|
|
- if (rList.length == 4) { // 确保分割后有四个元素
|
|
|
+ if (rList.length >= 4) { // 确保分割后有四个元素
|
|
|
String key = rList[0];
|
|
|
String value1 = rList[1];
|
|
|
String value2 = rList[2];
|
|
@@ -302,10 +302,19 @@ public class RankStrategy4RegionMergeModelV999 extends RankStrategy4RegionMergeM
|
|
|
|
|
|
// TODO 3 排序
|
|
|
Map<String, String> sceneFeatureMap = new HashMap<>(0);
|
|
|
- List<RankItem> rovRecallScore = ScorerUtils.getScorerPipeline("feeds_score_config_20240609.conf")
|
|
|
+ List<RankItem> items = ScorerUtils.getScorerPipeline("feeds_score_config_20240609.conf")
|
|
|
.scoring(sceneFeatureMap, userFeatureMap, rankItems);
|
|
|
+ List<Video> result = new ArrayList<>();
|
|
|
+ for (RankItem item : items) {
|
|
|
+ double score = item.getScoreRov();
|
|
|
+ Video video = item.getVideo();
|
|
|
+ video.setScore(score);
|
|
|
+ video.setSortScore(score);
|
|
|
+ video.setScoresMap(item.getScoresMap());
|
|
|
+ result.add(video);
|
|
|
+ }
|
|
|
+ result.sort(Comparator.comparingDouble(o -> -o.getSortScore()));
|
|
|
|
|
|
- List<Video> result = CommonCollectionUtils.toList(rovRecallScore, RankItem::getVideo);
|
|
|
return result;
|
|
|
}
|
|
|
|