浏览代码

feat:debug

zhaohaipeng 1 年之前
父节点
当前提交
c5ad1d8aca

+ 4 - 0
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/VideoAdThompsonScorerV2.java

@@ -193,6 +193,7 @@ public class VideoAdThompsonScorerV2 {
         int i=0;
         double score=0d;
         for(AdPlatformCreativeDTO dto:adIdList){
+            String statisticType = "vid+cid";
             AdRankItem item=new AdRankItem();
             item.setVideoId(param.getVideoId());
             item.setCpa(dto.getCpa());
@@ -202,8 +203,10 @@ public class VideoAdThompsonScorerV2 {
                 if(jsonStr==null){
                     jsonStr=values.get(i);
                     if(jsonStr==null){
+                        statisticType = "";
                         score = betaSampler(exp666Param.getOrDefault("alpha",1d),exp666Param.getOrDefault("beta",100000d));
                     }else {
+                        statisticType = "cid";
                         statistic =gson.fromJson(jsonStr,CreativeStatistic.class);
                         score = betaSampler(exp666Param.getOrDefault("alpha",1d)+Long.parseLong(statistic.getOrder()) ,
                                 (exp666Param.getOrDefault("beta",100000d)+Long.parseLong(statistic.getExp()))/(1+exp666Param.getOrDefault("beta_k",9d))) ;
@@ -229,6 +232,7 @@ public class VideoAdThompsonScorerV2 {
                 Map<String, Object> ext = this.extMap(statistic, "666", dto.getCpa(), exp666Param.getOrDefault("viewThreshold",5000d), exp663Param.getOrDefault("alpha", 1d),
                         exp663Param.getOrDefault("beta", 10000d), exp666Param.getOrDefault("beta_k",9d));
                 ext.put("s1", s1);
+                ext.put("group_field", statisticType);
                 item.setExt(ext);
 
             }catch (Exception e){