Bläddra i källkod

Merge branch 'master' into dev-xym-add-metafeature

xueyiming 2 veckor sedan
förälder
incheckning
f58285c98f

+ 2 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/log/impl/LogHubServiceImpl.java

@@ -105,7 +105,8 @@ public class LogHubServiceImpl implements LogHubService {
                 logMap.put("adverid", top1.getAdVerId());
                 logMap.put("adid", top1.getId());
                 logMap.put("campaignid", top1.getCampaignId());
-                logMap.put("score", top1.getScore());
+                logMap.put("finalScore", top1.getScore());
+                logMap.put("score", top1.getScoreMap().getOrDefault("ctcvrScore", 0.0));
                 logMap.put("extinfo", JSON.toJSONString(top1.getExt()));
 
 

+ 3 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBy679.java

@@ -215,12 +215,14 @@ public class RankStrategyBy679 extends RankStrategyBasic {
 
             double scoreCoefficient = creativeScoreCoefficient.getOrDefault(item.getAdId(), 1d);
             double guaranteeScoreCoefficient = getGuaranteeScoreCoefficient(scoreParam, item.getExt());
-            item.setScore(item.getLrScore() * scoreCoefficient * item.getCpa() * guaranteeScoreCoefficient);
+            double ctcvrScore = item.getLrScore() * scoreCoefficient * item.getCpa();
+            item.setScore(ctcvrScore * guaranteeScoreCoefficient);
             item.getScoreMap().put("guaranteeScoreCoefficient", guaranteeScoreCoefficient);
             item.getScoreMap().put("cpa", item.getCpa());
             item.getScoreMap().put("cpm", item.getCpm());
             item.getScoreMap().put("cpmCoefficient", cpmCoefficient);
             item.getScoreMap().put("scoreCoefficient", scoreCoefficient);
+            item.getScoreMap().put("ctcvrScore", ctcvrScore);
             item.getFeatureMap().putAll(userFeatureMap);
             item.getFeatureMap().putAll(sceneFeatureMap);
 

+ 3 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBy680.java

@@ -233,12 +233,14 @@ public class RankStrategyBy680 extends RankStrategyBasic {
 
             double scoreCoefficient = creativeScoreCoefficient.getOrDefault(item.getAdId(), 1d);
             double guaranteeScoreCoefficient = getGuaranteeScoreCoefficient(scoreParam, item.getExt());
-            item.setScore(item.getLrScore() * scoreCoefficient * item.getCpa() * guaranteeScoreCoefficient);
+            double ctcvrScore = item.getLrScore() * scoreCoefficient * item.getCpa();
+            item.setScore(ctcvrScore * guaranteeScoreCoefficient);
             item.getScoreMap().put("guaranteeScoreCoefficient", guaranteeScoreCoefficient);
             item.getScoreMap().put("cpa", item.getCpa());
             item.getScoreMap().put("cpm", item.getCpm());
             item.getScoreMap().put("cpmCoefficient", cpmCoefficient);
             item.getScoreMap().put("scoreCoefficient", scoreCoefficient);
+            item.getScoreMap().put("ctcvrScore", ctcvrScore);
             item.getFeatureMap().putAll(userFeatureMap);
             item.getFeatureMap().putAll(sceneFeatureMap);
 

+ 3 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBy683.java

@@ -234,12 +234,14 @@ public class RankStrategyBy683 extends RankStrategyBasic {
 
             double scoreCoefficient = creativeScoreCoefficient.getOrDefault(item.getAdId(), 1d);
             double guaranteeScoreCoefficient = getGuaranteeScoreCoefficient(scoreParam, item.getExt());
-            item.setScore(item.getLrScore() * scoreCoefficient * item.getCpa() * guaranteeScoreCoefficient);
+            double ctcvrScore = item.getLrScore() * scoreCoefficient * item.getCpa();
+            item.setScore(ctcvrScore * guaranteeScoreCoefficient);
             item.getScoreMap().put("guaranteeScoreCoefficient", guaranteeScoreCoefficient);
             item.getScoreMap().put("cpa", item.getCpa());
             item.getScoreMap().put("cpm", item.getCpm());
             item.getScoreMap().put("cpmCoefficient", cpmCoefficient);
             item.getScoreMap().put("scoreCoefficient", scoreCoefficient);
+            item.getScoreMap().put("ctcvrScore", ctcvrScore);
             item.getFeatureMap().putAll(userFeatureMap);
             item.getFeatureMap().putAll(sceneFeatureMap);
 

+ 3 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBy687.java

@@ -223,10 +223,12 @@ public class RankStrategyBy687 extends RankStrategyBasic {
         long time3 = System.currentTimeMillis();
         for (AdRankItem item : result) {
             double guaranteeScoreCoefficient = getGuaranteeScoreCoefficient(scoreParam, item.getExt());
-            item.setScore(item.getLrScore() * item.getCpa() * guaranteeScoreCoefficient);
+            double ctcvrScore = item.getLrScore() * item.getCpa();
+            item.setScore(ctcvrScore * guaranteeScoreCoefficient);
             item.getScoreMap().put("guaranteeScoreCoefficient", guaranteeScoreCoefficient);
             item.getScoreMap().put("cpa", item.getCpa());
             item.getScoreMap().put("cpm", item.getCpm());
+            item.getScoreMap().put("ctcvrScore", ctcvrScore);
             item.getFeatureMap().putAll(userFeatureMap);
             item.getFeatureMap().putAll(sceneFeatureMap);
 

+ 3 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBy688.java

@@ -276,12 +276,14 @@ public class RankStrategyBy688 extends RankStrategyBasic {
 
             double scoreCoefficient = creativeScoreCoefficient.getOrDefault(item.getAdId(), 1d);
             double guaranteeScoreCoefficient = getGuaranteeScoreCoefficient(scoreParam, item.getExt());
-            item.setScore(item.getLrScore() * scoreCoefficient * item.getCpa() * guaranteeScoreCoefficient);
+            double ctcvrScore = item.getLrScore() * scoreCoefficient * item.getCpa();
+            item.setScore(ctcvrScore * guaranteeScoreCoefficient);
             item.getScoreMap().put("guaranteeScoreCoefficient", guaranteeScoreCoefficient);
             item.getScoreMap().put("cpa", item.getCpa());
             item.getScoreMap().put("cpm", item.getCpm());
             item.getScoreMap().put("cpmCoefficient", cpmCoefficient);
             item.getScoreMap().put("scoreCoefficient", scoreCoefficient);
+            item.getScoreMap().put("ctcvrScore", ctcvrScore);
             item.getFeatureMap().putAll(userFeatureMap);
             item.getFeatureMap().putAll(sceneFeatureMap);