|
|
@@ -14,7 +14,10 @@ import com.tzld.piaoquan.ad.engine.commons.redis.AdRedisHelper;
|
|
|
import com.tzld.piaoquan.ad.engine.commons.redis.AlgorithmRedisHelper;
|
|
|
import com.tzld.piaoquan.ad.engine.commons.score.ScoreParam;
|
|
|
import com.tzld.piaoquan.ad.engine.commons.thread.ThreadPoolFactory;
|
|
|
-import com.tzld.piaoquan.ad.engine.commons.util.*;
|
|
|
+import com.tzld.piaoquan.ad.engine.commons.util.DateUtils;
|
|
|
+import com.tzld.piaoquan.ad.engine.commons.util.ObjUtil;
|
|
|
+import com.tzld.piaoquan.ad.engine.commons.util.RootSessionIdExpConfig;
|
|
|
+import com.tzld.piaoquan.ad.engine.commons.util.RootSessionIdTailUtil;
|
|
|
import com.tzld.piaoquan.ad.engine.service.entity.*;
|
|
|
import com.tzld.piaoquan.ad.engine.service.feature.Feature;
|
|
|
import com.tzld.piaoquan.ad.engine.service.feature.FeatureService;
|
|
|
@@ -59,8 +62,8 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
@ApolloJsonValue("${h5.score.suppress.customer.white:[]}")
|
|
|
private Set<Long> customerIdWhiteSet;
|
|
|
|
|
|
- @ApolloJsonValue("${rank.strategy.cxr.zero.customer:{}}")
|
|
|
- private Map<Long, Double> cxrZeroCustomerParams;
|
|
|
+ @Value("${rank.strategy.default.cxr:0.000001}")
|
|
|
+ protected Double defaultCxr;
|
|
|
|
|
|
@Value("${guarantee.exp:742}")
|
|
|
protected String guaranteeExp;
|
|
|
@@ -1231,21 +1234,15 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
return 1.0;
|
|
|
}
|
|
|
|
|
|
- // zero cxr
|
|
|
- protected double getCustomerZeroCxr(AdRankItem item, double smoothCxr) {
|
|
|
+ protected double getDefaultCxr(double cxr) {
|
|
|
try {
|
|
|
- if (ExtractorUtils.isDoubleEqualToZero(smoothCxr)) {
|
|
|
- if (!org.springframework.util.CollectionUtils.isEmpty(cxrZeroCustomerParams) && !Objects.isNull(item)) {
|
|
|
- Long customerId = item.getCustomerId();
|
|
|
- if (null != customerId && cxrZeroCustomerParams.containsKey(customerId)) {
|
|
|
- return cxrZeroCustomerParams.get(customerId);
|
|
|
- }
|
|
|
- }
|
|
|
+ if (null != defaultCxr) {
|
|
|
+ return Math.max(cxr, defaultCxr);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error("getZeroCxr", e);
|
|
|
+ log.error("cxr", e);
|
|
|
}
|
|
|
- return smoothCxr;
|
|
|
+ return cxr;
|
|
|
}
|
|
|
|
|
|
protected boolean landingH5Page(AdRankItem item) {
|