|
@@ -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){
|
|
@@ -308,7 +312,7 @@ public class VideoAdThompsonScorerV2 {
|
|
|
ext.put("vidCidStatistic", JSON.toJSONString(vidCidStatistic));
|
|
|
ext.put("cpa", dto.getCpa());
|
|
|
|
|
|
- log.info("svc=699And670Score, score: {}, param: {}", score, JSON.toJSONString(expParam));
|
|
|
+ log.info("svc=699And670Score, score: {}, param: {}", score, JSON.toJSONString(ext));
|
|
|
|
|
|
|
|
|
AdRankItem item = new AdRankItem();
|