liqian 3 years ago
parent
commit
899b96a1c9
2 changed files with 3 additions and 0 deletions
  1. 1 0
      config.py
  2. 2 0
      recommend.py

+ 1 - 0
config.py

@@ -63,6 +63,7 @@ class BaseConfig(object):
     K = 3
     # 从流量池获取视频的概率设置
     P = 0.3
+    P_18_19 = 1
 
     # ROV召回池redis key前缀,完整格式:com.weiqu.video.recall.hot.item.score.{date}
     RECALL_KEY_NAME_PREFIX = 'com.weiqu.video.recall.hot.item.score.'

+ 2 - 0
recommend.py

@@ -442,6 +442,7 @@ def video_homepage_recommend(mid, uid, size, app_type, algo_type, client_info, a
             if config_.AB_EXP_CODE['rov_rank_appType_18_19'] in ab_exp_code_list:
                 ab_code = config_.AB_CODE['rov_rank_appType_18_19']
                 expire_time = 3600
+                flow_pool_P = config_.P_18_19
 
         # 简单召回 - 排序 - 兜底
         rank_result, last_rov_recall_key = video_recommend(mid=mid, uid=uid, app_type=app_type,
@@ -526,6 +527,7 @@ def video_relevant_recommend(video_id, mid, uid, size, app_type, ab_exp_info):
         if config_.AB_EXP_CODE['rov_rank_appType_18_19'] in ab_exp_code_list:
             ab_code = config_.AB_CODE['rov_rank_appType_18_19']
             expire_time = 3600
+            flow_pool_P = config_.P_18_19
 
     # 简单召回 - 排序 - 兜底
     rank_result, last_rov_recall_key = video_recommend(mid=mid, uid=uid, app_type=app_type,