Browse Source

pidV1更新

gufengshou1 1 year ago
parent
commit
8276040b59

+ 15 - 12
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/VlogMergeEcpmScorer.java

@@ -65,24 +65,27 @@ public class VlogMergeEcpmScorer extends BaseLRModelScorer {
 
     public void callMergeScore(AdRankItem item,CountDownLatch countDownLatch){
         try {
-            boolean isTfType=item.getItemFeature().getCreative_7day_cnt_features().getAdView()<5000;
+//            boolean isTfType=item.getItemFeature().getCreative_7day_cnt_features().getAdView()<5000;
+//            double pctr = isTfType?item.getTf_ctr():item.getCtr();
+//            double pcvr = isTfType?item.getTf_cvr():item.getCvr();
             double cpa = item.getCpa();
             double bid1 = item.getBid1();
             double bid2 = item.getBid2();
-            double pctr = isTfType?item.getTf_ctr():item.getCtr();
-            double pcvr = isTfType?item.getTf_cvr():item.getCvr();
-            item.setScore_type( isTfType?1:0);
+            double pctr = item.getCtr();
+            double pcvr = item.getCvr();
+//            item.setScore_type( isTfType?1:0);
+            item.setScore_type( 0);
             //todo
             double ecpm;
-            if(isTfType){
-                ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
-            }else {
-                cpa=cpa*item.getPidLambda();
-                if(cpa<0.5){
-                    cpa=0.5;
-                }
-                ecpm = cpa* bid1 * bid2 * pcvr * pctr * 1000d;
+//            if(isTfType){
+//                ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
+//            }else {
+            cpa=cpa*item.getPidLambda();
+            if(cpa<0.5){
+                cpa=0.5;
             }
+            ecpm = cpa* bid1 * bid2 * pcvr * pctr * 1000d;
+//            }
 //            ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
             item.setEcpm1(ecpm/1000d);
             item.setScore(ecpm/1000d);