|
|
@@ -82,6 +82,7 @@ public class RankStrategyBy883 extends RankStrategyBasic {
|
|
|
|
|
|
@Override
|
|
|
public List<AdRankItem> adItemRank(RankRecommendRequestParam request, ScoreParam scoreParam) {
|
|
|
+ Map<String, Double> weightParam = ObjUtil.nullOrDefault(weightMap, new HashMap<>());
|
|
|
Set<String> noApiAdVerIds = getNoApiAdVerIds();
|
|
|
|
|
|
long ts = System.currentTimeMillis() / 1000;
|
|
|
@@ -197,6 +198,8 @@ public class RankStrategyBy883 extends RankStrategyBasic {
|
|
|
adRankItem.getScoreMap().put("fRankCoefficient", normalizeCoefficient(dto.getFRankCoefficient()));
|
|
|
adRankItem.getScoreMap().put("rcRankCoefficient", normalizeCoefficient(dto.getRcRankCoefficient()));
|
|
|
adRankItem.getScoreMap().put("bidCoefficient", normalizeCoefficient(dto.getBidCoefficient()));
|
|
|
+ // 计价系数不参与排序,但需要进入排序日志,供曝光计价链路回溯。
|
|
|
+ adRankItem.getScoreMap().put("pricingCoefficient", normalizeCoefficient(dto.getPricingCoefficient()));
|
|
|
adRankItem.getExt().put("correctCpaMap", JSONObject.toJSONString(correctCpaMap.get(dto.getAdId())));
|
|
|
adRankItem.getExt().put("correctionFactor", correctCpaMap.get(dto.getAdId()).getCorrectionFactor());
|
|
|
setGuaranteeWeight(map, dto.getAdVerId(), adRankItem.getExt(), isGuaranteedFlow, reqFeature);
|
|
|
@@ -352,6 +355,7 @@ public class RankStrategyBy883 extends RankStrategyBasic {
|
|
|
}
|
|
|
|
|
|
// 883 的 eCPM 与排序分分开:eCPM 表示竞价基础值,score 表示叠加 851 外围权重后的排序值。
|
|
|
+ double cpmCoefficient = weightParam.getOrDefault("cpmCoefficient", 0.9);
|
|
|
boolean isGuaranteeType = false;
|
|
|
|
|
|
int openH5 = NumberUtils.toInt(paramsMap.getOrDefault("openH5", "0"));
|
|
|
@@ -380,6 +384,12 @@ public class RankStrategyBy883 extends RankStrategyBasic {
|
|
|
* h5Weight
|
|
|
* guaranteeScoreCoefficient;
|
|
|
|
|
|
+ // 没有转化回传的广告主沿用配置 CPM,避免以不可靠的模型预估参与竞价。
|
|
|
+ if (noApiAdVerIds.contains(item.getAdVerId())) {
|
|
|
+ ecpm = item.getCpm();
|
|
|
+ score = item.getCpm() * cpmCoefficient / 1000;
|
|
|
+ }
|
|
|
+
|
|
|
// scoreMap 是排序日志的数据源;写入 eCPM 分子及实际参与 score 计算的全部外围因子。
|
|
|
item.getScoreMap().put("modelCtcvrScore", modelCtcvrScore);
|
|
|
item.getScoreMap().put("bid", bid);
|