| 
														
															@@ -1,6 +1,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 package com.tzld.piaoquan.ad.engine.service.score; 
														 | 
														
														 | 
														
															 package com.tzld.piaoquan.ad.engine.service.score; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.alibaba.fastjson.JSONArray; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.ad.engine.commons.score.BaseLRModelScorer; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.ad.engine.commons.score.BaseLRModelScorer; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.ad.engine.commons.score.ScoreParam; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.ad.engine.commons.score.ScoreParam; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.ad.engine.commons.score.ScorerConfigInfo; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.ad.engine.commons.score.ScorerConfigInfo; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -17,7 +18,7 @@ import java.util.List; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //@Service 
														 | 
														
														 | 
														
															 //@Service 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public class VlogMergeBreakScorer extends BaseLRModelScorer { 
														 | 
														
														 | 
														
															 public class VlogMergeBreakScorer extends BaseLRModelScorer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    private final static Logger LOGGER = LoggerFactory.getLogger(VlogMergeBreakScorer.class); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private final static Logger log = LoggerFactory.getLogger(VlogMergeBreakScorer.class); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public VlogMergeBreakScorer(ScorerConfigInfo configInfo) { 
														 | 
														
														 | 
														
															     public VlogMergeBreakScorer(ScorerConfigInfo configInfo) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -43,6 +44,11 @@ public class VlogMergeBreakScorer extends BaseLRModelScorer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             BigDecimal ctrCvr = new BigDecimal(Math.pow(70 * ctr * cvr, a)); 
														 | 
														
														 | 
														
															             BigDecimal ctrCvr = new BigDecimal(Math.pow(70 * ctr * cvr, a)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             BigDecimal strRos = new BigDecimal(Math.pow(str * ros, b)); 
														 | 
														
														 | 
														
															             BigDecimal strRos = new BigDecimal(Math.pow(str * ros, b)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             BigDecimal breakRate = new BigDecimal(Math.pow(item.getBreakRate(), c)); 
														 | 
														
														 | 
														
															             BigDecimal breakRate = new BigDecimal(Math.pow(item.getBreakRate(), c)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                log.info("svc=scoring modelName=modelV2 ctr={} cvr={} str={} ros={}", item.getCtr(),item.getCvr(),item.getStr(),item.getRos()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            }catch (Exception e){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             BigDecimal score = ctrCvr.divide(strRos.multiply(breakRate), 5, BigDecimal.ROUND_HALF_UP); 
														 | 
														
														 | 
														
															             BigDecimal score = ctrCvr.divide(strRos.multiply(breakRate), 5, BigDecimal.ROUND_HALF_UP); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             item.setScore(score.doubleValue()); 
														 | 
														
														 | 
														
															             item.setScore(score.doubleValue()); 
														 |