|
@@ -306,8 +306,8 @@ public class RankStrategyBy843 extends RankStrategyBasic {
|
|
|
}
|
|
}
|
|
|
long time5 = System.currentTimeMillis();
|
|
long time5 = System.currentTimeMillis();
|
|
|
int viewLimit = NumberUtils.toInt(paramsMap.getOrDefault("viewLimit", "3000"));
|
|
int viewLimit = NumberUtils.toInt(paramsMap.getOrDefault("viewLimit", "3000"));
|
|
|
- double h5PagePlus = NumberUtils.toDouble(paramsMap.getOrDefault("h5PagePlus", "500"));
|
|
|
|
|
- double selfPagePlus = NumberUtils.toDouble(paramsMap.getOrDefault("selfPagePlus", "100"));
|
|
|
|
|
|
|
+ double h5PagePlus = NumberUtils.toDouble(paramsMap.getOrDefault("h5PagePlus", "300"));
|
|
|
|
|
+ double selfPagePlus = NumberUtils.toDouble(paramsMap.getOrDefault("selfPagePlus", "0"));
|
|
|
// calibrate score for negative sampling or cold start
|
|
// calibrate score for negative sampling or cold start
|
|
|
for (AdRankItem item : result) {
|
|
for (AdRankItem item : result) {
|
|
|
double originalScore = item.getLrScore();
|
|
double originalScore = item.getLrScore();
|
|
@@ -319,25 +319,32 @@ public class RankStrategyBy843 extends RankStrategyBasic {
|
|
|
boolean h5Page = this.landingH5Page(item);
|
|
boolean h5Page = this.landingH5Page(item);
|
|
|
if ((CollectionUtils.isNotEmpty(DnnCidDataHelper.getCidSetV2()) && !DnnCidDataHelper.getCidSetV2().contains(item.getAdId()))
|
|
if ((CollectionUtils.isNotEmpty(DnnCidDataHelper.getCidSetV2()) && !DnnCidDataHelper.getCidSetV2().contains(item.getAdId()))
|
|
|
|| view3Day <= viewLimit || h5Page) {
|
|
|| view3Day <= viewLimit || h5Page) {
|
|
|
- double smoothPlus = h5Page ? h5PagePlus : selfPagePlus;
|
|
|
|
|
-
|
|
|
|
|
- double conver3D = Double.parseDouble(b3Feature.getOrDefault("ad_conversion_3d", "0"));
|
|
|
|
|
- double smoothCxr3D = NumUtil.divSmoothV1(conver3D, view3Day + smoothPlus, 1.64);
|
|
|
|
|
-
|
|
|
|
|
- double view1Day = Double.parseDouble(b3Feature.getOrDefault("ad_view_1d", "0"));
|
|
|
|
|
- double conver1D = Double.parseDouble(b3Feature.getOrDefault("ad_conversion_1d", "0"));
|
|
|
|
|
- double smoothCxr1D = NumUtil.divSmoothV1(conver1D, view1Day + smoothPlus, 1.64);
|
|
|
|
|
-
|
|
|
|
|
- // 模型打分和统计计算取打分更低的
|
|
|
|
|
- item.getScoreMap().put("cvcvrItemValue", 1.0);
|
|
|
|
|
- if (smoothCxr1D < calibratedScore) {
|
|
|
|
|
- calibratedScore = smoothCxr1D;
|
|
|
|
|
- item.getScoreMap().put("cvcvrItemValue", 2.0);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (smoothCxr3D < calibratedScore) {
|
|
|
|
|
- calibratedScore = smoothCxr3D;
|
|
|
|
|
- item.getScoreMap().put("cvcvrItemValue", 3.0);
|
|
|
|
|
|
|
+ if (h5Page) {
|
|
|
|
|
+ double conver3D = Double.parseDouble(b3Feature.getOrDefault("ad_conversion_3d", "0"));
|
|
|
|
|
+ double smoothCxr3D = NumUtil.divSmoothV1(conver3D, view3Day + h5PagePlus, 1.64);
|
|
|
|
|
+ double view1Day = Double.parseDouble(b3Feature.getOrDefault("ad_view_1d", "0"));
|
|
|
|
|
+ double conver1D = Double.parseDouble(b3Feature.getOrDefault("ad_conversion_1d", "0"));
|
|
|
|
|
+ double smoothCxr1D = NumUtil.divSmoothV1(conver1D, view1Day + h5PagePlus, 1.64);
|
|
|
|
|
+ // 模型打分和统计计算取打分更低的
|
|
|
|
|
+ item.getScoreMap().put("cvcvrItemValue", 1.0);
|
|
|
|
|
+ if (smoothCxr1D < calibratedScore) {
|
|
|
|
|
+ calibratedScore = smoothCxr1D;
|
|
|
|
|
+ item.getScoreMap().put("cvcvrItemValue", 2.0);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (smoothCxr3D < calibratedScore) {
|
|
|
|
|
+ calibratedScore = smoothCxr3D;
|
|
|
|
|
+ item.getScoreMap().put("cvcvrItemValue", 3.0);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ double view14D = Double.parseDouble(b3Feature.getOrDefault("ad_view_14d", "0"));
|
|
|
|
|
+ double conver14D = Double.parseDouble(b3Feature.getOrDefault("ad_conversion_14d", "0"));
|
|
|
|
|
+ double smoothCxr14D = NumUtil.divSmoothV1(conver14D, view14D + selfPagePlus, 1.64);
|
|
|
|
|
+ //模型打分和统计计算取打分更低的
|
|
|
|
|
+ item.getScoreMap().put("cvcvrItemValue", 1.0);
|
|
|
|
|
+ if (smoothCxr14D <= calibratedScore) {
|
|
|
|
|
+ calibratedScore = smoothCxr14D;
|
|
|
|
|
+ item.getScoreMap().put("cvcvrItemValue", 2.0);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
item.setLrScore(calibratedScore);
|
|
item.setLrScore(calibratedScore);
|