|
@@ -51,6 +51,9 @@ public class HisJumpRankStrategy implements RankStrategy {
|
|
|
if (contentPools[0].equals(item.getContent().getContentPoolType())
|
|
|
|| contentPools[1].equals(item.getContent().getContentPoolType())) {
|
|
|
score = item.getScore(ScoreStrategyEnum.FLOW_CTL_DECREASE.value())
|
|
|
+ + item.getScore(ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
+ ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ item.getScore(ScoreStrategyEnum.CRAWLER_DAYS_DECREASE_STRATEGY.value());
|
|
|
if (item.getScore(ScoreStrategyEnum.PUBLISH_TIMES.value()) >= 0) {
|
|
|
score += item.getScore(ScoreStrategyEnum.VIEW_COUNT_RATE.value())
|
|
@@ -59,6 +62,9 @@ public class HisJumpRankStrategy implements RankStrategy {
|
|
|
}
|
|
|
} else {
|
|
|
score = item.getScore(ScoreStrategyEnum.ACCOUNT_PRE_DISTRIBUTE.value())
|
|
|
+ + item.getScore(ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
+ ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ item.getScore(ScoreStrategyEnum.PUBLISH_TIMES.value())
|
|
|
+ item.getScore(ScoreStrategyEnum.CRAWLER_DAYS_DECREASE_STRATEGY.value())
|
|
|
+ item.getScore(ScoreStrategyEnum.FLOW_CTL_DECREASE.value());
|
|
@@ -113,7 +119,10 @@ public class HisJumpRankStrategy implements RankStrategy {
|
|
|
// 3-8
|
|
|
List<Content> pool = contentMap.get(contentPools[2]);
|
|
|
if (CollectionUtils.isNotEmpty(pool) && param.getSize() > result.size()) {
|
|
|
- result.addAll(pool.subList(0, Math.min(pool.size(), param.getSize() - result.size())));
|
|
|
+ int slotNum = param.getSize() - result.size();
|
|
|
+ List<Content> subPool = pool.subList(0, Math.min(pool.size(), 30));
|
|
|
+ Collections.shuffle(subPool);
|
|
|
+ result.addAll(subPool.subList(0, Math.min(subPool.size(), slotNum)));
|
|
|
}
|
|
|
|
|
|
RankStrategy.deduplication(result, contentMap, publishPool);
|