|
@@ -28,6 +28,9 @@ public class VideoAdThompsonScorerV2 {
|
|
//redis:vid_cid_action:{$vid}_{$cid}
|
|
//redis:vid_cid_action:{$vid}_{$cid}
|
|
private String redisVideoCreativeStatisticsPrefix="redis:vid_cid_action:";
|
|
private String redisVideoCreativeStatisticsPrefix="redis:vid_cid_action:";
|
|
|
|
|
|
|
|
+ private String rediCidActionKeyV1 = "redis:cid_action_v1:";
|
|
|
|
+ private String rediCidVidActionKeyV1 = "redis:vid_cid_action_v1:";
|
|
|
|
+
|
|
private Map<String,Double> exp663Param=new HashMap<>();
|
|
private Map<String,Double> exp663Param=new HashMap<>();
|
|
private Map<String,Double> exp664Param=new HashMap<>();
|
|
private Map<String,Double> exp664Param=new HashMap<>();
|
|
private Map<String,Double> exp665Param=new HashMap<>();
|
|
private Map<String,Double> exp665Param=new HashMap<>();
|
|
@@ -216,8 +219,8 @@ public class VideoAdThompsonScorerV2 {
|
|
}
|
|
}
|
|
|
|
|
|
public List<AdRankItem> thompsonScorerByExp669(ScoreParam param, List<AdPlatformCreativeDTO> adIdList) {
|
|
public List<AdRankItem> thompsonScorerByExp669(ScoreParam param, List<AdPlatformCreativeDTO> adIdList) {
|
|
- Map<Long, CreativeStatistic> creativeStatisticsMap = this.batchFindCreativeRedisCache(redisCreativeStatisticsPrefix, adIdList);
|
|
|
|
- Map<Long, CreativeStatistic> videoCreativeStatisticsMap = this.batchFindCreativeRedisCache(redisVideoCreativeStatisticsPrefix + param.getVideoId() + "_", adIdList);
|
|
|
|
|
|
+ Map<Long, CreativeStatistic> creativeStatisticsMap = this.batchFindCreativeRedisCache(rediCidActionKeyV1, adIdList);
|
|
|
|
+ Map<Long, CreativeStatistic> videoCreativeStatisticsMap = this.batchFindCreativeRedisCache(rediCidVidActionKeyV1 + param.getVideoId() + "_", adIdList);
|
|
Double creativeExpSum = this.sumCreativeStatisticExp(creativeStatisticsMap.values());
|
|
Double creativeExpSum = this.sumCreativeStatisticExp(creativeStatisticsMap.values());
|
|
Double videoCreativeExpSum = this.sumCreativeStatisticExp(videoCreativeStatisticsMap.values());
|
|
Double videoCreativeExpSum = this.sumCreativeStatisticExp(videoCreativeStatisticsMap.values());
|
|
|
|
|
|
@@ -234,8 +237,8 @@ public class VideoAdThompsonScorerV2 {
|
|
}
|
|
}
|
|
|
|
|
|
public List<AdRankItem> thompsonScorerByExp670(ScoreParam param, List<AdPlatformCreativeDTO> adIdList) {
|
|
public List<AdRankItem> thompsonScorerByExp670(ScoreParam param, List<AdPlatformCreativeDTO> adIdList) {
|
|
- Map<Long, CreativeStatistic> creativeStatisticsMap = this.batchFindCreativeRedisCache(redisCreativeStatisticsPrefix, adIdList);
|
|
|
|
- Map<Long, CreativeStatistic> videoCreativeStatisticsMap = this.batchFindCreativeRedisCache(redisVideoCreativeStatisticsPrefix + param.getVideoId() + "_", adIdList);
|
|
|
|
|
|
+ Map<Long, CreativeStatistic> creativeStatisticsMap = this.batchFindCreativeRedisCache(rediCidActionKeyV1, adIdList);
|
|
|
|
+ Map<Long, CreativeStatistic> videoCreativeStatisticsMap = this.batchFindCreativeRedisCache(rediCidVidActionKeyV1 + param.getVideoId() + "_", adIdList);
|
|
|
|
|
|
List<AdRankItem> result = new ArrayList<>(adIdList.size());
|
|
List<AdRankItem> result = new ArrayList<>(adIdList.size());
|
|
this.calcScore(result, adIdList, 0.0, 0.0, 0.0, creativeStatisticsMap, videoCreativeStatisticsMap, exp670Param);
|
|
this.calcScore(result, adIdList, 0.0, 0.0, 0.0, creativeStatisticsMap, videoCreativeStatisticsMap, exp670Param);
|