Procházet zdrojové kódy

Merge branch 'feature_20240528_zhaohaipeng_video_ad_thompson_v2' into test

zhaohaipeng před 1 rokem
rodič
revize
0a677608fd

+ 8 - 6
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/VideoAdThompsonScorerV2.java

@@ -296,6 +296,8 @@ public class VideoAdThompsonScorerV2 {
             double w2 = expParam.getOrDefault("w2", 1d);
             double score = w1 * vidCidScore + w2 * cidScore;
 
+            log.info("calcScore w1: {}, w1: {}, cidScore: {}, vidCidScore: {}", w1, w2, cidScore, vidCidScore);
+
             AdRankItem item = new AdRankItem();
             item.setCpa(dto.getCpa());
             item.setAdId(dto.getCreativeId());
@@ -322,8 +324,8 @@ public class VideoAdThompsonScorerV2 {
         Double alpha = expParam.getOrDefault("alpha", defaultAlpha);
         Double beta = expParam.getOrDefault("beta", defaultBeta);
 
-        double order = creativeStatistic.getDoubleOrder() + alpha;
-        double exp = creativeStatistic.getDoubleExp() + beta;
+        double order = creativeStatistic.parseOrderToDouble() + alpha;
+        double exp = creativeStatistic.parseExpToDouble() + beta;
 
         if (order == 0 || exp == 0) {
             return 0.0;
@@ -375,7 +377,7 @@ public class VideoAdThompsonScorerV2 {
             return exp;
         }
 
-        public Double getDoubleExp() {
+        public Double parseExpToDouble() {
             if (StringUtils.isBlank(exp)) {
                 return 0.0;
             }
@@ -393,7 +395,7 @@ public class VideoAdThompsonScorerV2 {
             return click;
         }
 
-        public Double getDoubleClick(){
+        public Double parseClickToDouble(){
             if (StringUtils.isBlank(click)){
                 return 0.0;
             }
@@ -411,7 +413,7 @@ public class VideoAdThompsonScorerV2 {
             return order;
         }
 
-        public Double getDoubleOrder(){
+        public Double parseOrderToDouble(){
             if (StringUtils.isBlank(order)){
                 return 0.0;
             }
@@ -429,7 +431,7 @@ public class VideoAdThompsonScorerV2 {
             return cpa;
         }
 
-        public Double getDoubleCpa() {
+        public Double parseCpaToDouble() {
             if (StringUtils.isBlank(cpa)) {
                 return 0.0;
             }