|
@@ -42,6 +42,9 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
@ApolloJsonValue("${alpha:1.0}")
|
|
|
protected Double alpha;
|
|
|
|
|
|
+ @Value("${calibration:ctcvr.exp:779}")
|
|
|
+ protected String calibrationCtcvrExp;
|
|
|
+
|
|
|
@ApolloJsonValue("${calibration.view.count:5000}")
|
|
|
protected Integer calibrationViewCount;
|
|
|
@Autowired
|
|
@@ -377,7 +380,11 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- protected void calibrationCtcvrScore(List<AdRankItem> adRankItems, String mid, boolean isFilterUser, String modelName) {
|
|
|
+ protected void calibrationCtcvrScore(ScoreParam scoreParam, List<AdRankItem> adRankItems, String mid, boolean isFilterUser, String modelName) {
|
|
|
+ //判断是否走校准试验
|
|
|
+ if (!scoreParam.getExpCodeSet().contains(calibrationCtcvrExp)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
// 1. 获取用户分层信息
|
|
|
Map<String, String> userLayer = getUserLayer(mid);
|
|
|
String layer = userLayer.getOrDefault("layer", "无曝光");
|
|
@@ -438,7 +445,8 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
if (ctcvrScore == null) {
|
|
|
continue;
|
|
|
}
|
|
|
- scoreMap.put("calibrationCtcvrScore", ctcvrScore * diff);
|
|
|
+ scoreMap.put("modelCtcvrScore", ctcvrScore);
|
|
|
+ scoreMap.put("ctcvrScore", ctcvrScore * diff);
|
|
|
item.setLrScore(ctcvrScore * diff);
|
|
|
}
|
|
|
}
|