Browse Source

Merge branch 'dev-xym-updateScore' of algorithm/ad-engine into master

xueyiming 2 weeks ago
parent
commit
dc97e83c8c

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

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

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

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

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

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

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

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

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

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

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

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