| 
					
				 | 
			
			
				@@ -43,11 +43,11 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         double score=0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(AdPlatformCreativeDTO dto:adIdList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jsonStr=values.get(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(jsonStr==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     score = exp663Param.getOrDefault("randomMin",0.000001) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,10 +60,10 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 score=score*dto.getCpa()*dto.getBid1()*dto.getBid2(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 item.setScore(score); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 log.error("svc=thompsonScorerByExp663 {}",gson.toJson(e.getStackTrace())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             i++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Collections.sort(result); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -81,11 +81,12 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         double score=0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(AdPlatformCreativeDTO dto:adIdList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jsonStr=values.get(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(jsonStr==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     score = exp664Param.getOrDefault("randomMin",0.000001) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -98,10 +99,10 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 score=score*dto.getCpa()*dto.getBid1()*dto.getBid2(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 item.setScore(score); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 log.error("svc=thompsonScorerByExp664 {}",gson.toJson(e.getStackTrace())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             i++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,11 +121,11 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         double score=0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(AdPlatformCreativeDTO dto:adIdList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jsonStr=values.get(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(jsonStr==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     score = betaSampler(exp665Param.getOrDefault("alpha",1d),exp665Param.getOrDefault("beta",100000d)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -135,10 +136,11 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 score=score*dto.getCpa()*dto.getBid1()*dto.getBid2(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 item.setScore(score); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 log.error("svc=thompsonScorerByExp665 {}",gson.toJson(e.getStackTrace())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             i++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -163,11 +165,11 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         double score=0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(AdPlatformCreativeDTO dto:adIdList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AdRankItem item=new AdRankItem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setVideoId(param.getVideoId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setCpa(dto.getCpa()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                item.setAdId(dto.getCreativeId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jsonStr=combineValues.get(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(jsonStr==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     jsonStr=values.get(i); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -190,10 +192,11 @@ public class VideoAdThompsonScorerV2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 score=score*dto.getCpa()*dto.getBid1()*dto.getBid2(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 item.setScore(score); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 log.error("svc=thompsonScorerByExp666 {}",gson.toJson(e.getStackTrace())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.add(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             i++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Collections.sort(result); 
			 |