|  | @@ -38,6 +38,7 @@ public class VideoAdThompsonScorerV2 {
 | 
	
		
			
				|  |  |      private Map<String, Double> exp666Param = new HashMap<>();
 | 
	
		
			
				|  |  |      private Map<String, Double> exp669Param = new HashMap<>();
 | 
	
		
			
				|  |  |      private Map<String, Double> exp670Param = new HashMap<>();
 | 
	
		
			
				|  |  | +    private Map<String, Double> exp672Param = new HashMap<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      Random random = new Random();
 | 
	
		
			
				|  |  |      Gson gson = new Gson();
 | 
	
	
		
			
				|  | @@ -434,11 +435,19 @@ public class VideoAdThompsonScorerV2 {
 | 
	
		
			
				|  |  |              CreativeStatistic cidStatistic = cidMap.getOrDefault(dto.getCreativeId(), new CreativeStatistic());
 | 
	
		
			
				|  |  |              CreativeStatistic vidCidStatistic = vidCidMap.getOrDefault(dto.getCreativeId(), new CreativeStatistic());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +            double cidExp = cidStatistic.parseExpToDouble();
 | 
	
		
			
				|  |  | +            double vidCidExp = vidCidStatistic.parseExpToDouble();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              double cidScore = this.calcThompsonScore(expParam, cidStatistic, alpha, cidBeta);
 | 
	
		
			
				|  |  |              double vidCidScore = this.calcThompsonScore(expParam, vidCidStatistic, alpha, vidCidBeta);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              double w1 = expParam.getOrDefault("w1", 1d);
 | 
	
		
			
				|  |  |              double w2 = expParam.getOrDefault("w2", 1d);
 | 
	
		
			
				|  |  | -            double score = ((w1 * vidCidScore + w2 * cidScore) / (w1 + w2)) * dto.getCpa();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            double score = 0;
 | 
	
		
			
				|  |  | +            if (w1 != 0 || w2 != 0) {
 | 
	
		
			
				|  |  | +                score = ((w1 * vidCidScore * vidCidExp + w2 * cidScore * cidExp) / (w1 + w2)) * dto.getCpa();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              // 日志上报扩展参数
 | 
	
	
		
			
				|  | @@ -451,6 +460,8 @@ public class VideoAdThompsonScorerV2 {
 | 
	
		
			
				|  |  |              ext.put("vidCidA", alpha);
 | 
	
		
			
				|  |  |              ext.put("cidB", cidBeta);
 | 
	
		
			
				|  |  |              ext.put("vidCidB", vidCidBeta);
 | 
	
		
			
				|  |  | +            ext.put("cidExp", cidExp);
 | 
	
		
			
				|  |  | +            ext.put("vidCidExp", vidCidExp);
 | 
	
		
			
				|  |  |              ext.put("bid1", dto.getBid1());
 | 
	
		
			
				|  |  |              ext.put("bid2", dto.getBid2());
 | 
	
		
			
				|  |  |              ext.put("cidStatistic", JSON.toJSONString(cidStatistic));
 | 
	
	
		
			
				|  | @@ -545,6 +556,13 @@ public class VideoAdThompsonScorerV2 {
 | 
	
		
			
				|  |  |          return map;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    public List<AdRankItem> thompsonScorerByExp672(ScoreParam param, List<AdPlatformCreativeDTO> adIdList) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return null;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      class CreativeStatistic {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          private String exp;
 | 
	
	
		
			
				|  | @@ -665,4 +683,9 @@ public class VideoAdThompsonScorerV2 {
 | 
	
		
			
				|  |  |      public void setExp670Param(String str) {
 | 
	
		
			
				|  |  |          this.exp670Param = gson.fromJson(str, Map.class);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Value("${ad.engine.new.thompson.exp.V2.672{}}")
 | 
	
		
			
				|  |  | +    public void setExp672Param(String str) {
 | 
	
		
			
				|  |  | +        this.exp672Param = gson.fromJson(str, Map.class);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |