|
@@ -84,43 +84,57 @@ public class RecallService implements ApplicationContextAware {
|
|
|
return strategies;
|
|
|
}
|
|
|
|
|
|
+ //1:通过“产品”控制“召回子策略”
|
|
|
if (param.getAppType() == AppTypeEnum.LAO_HAO_KAN_VIDEO.getCode()
|
|
|
|| param.getAppType() == AppTypeEnum.ZUI_JING_QI.getCode()) {
|
|
|
strategies.addAll(getRegionRecallStrategy(param));
|
|
|
- } else if (param.getFlowPoolAbtestGroup().equals(FlowPoolConstants.EXPERIMENTAL_FLOW_SET_LEVEL)) {
|
|
|
- strategies.addAll(getRegionRecallStrategy(param));
|
|
|
- strategies.add(strategyMap.get(QuickFlowPoolWithLevelRecallStrategy.class.getSimpleName()));
|
|
|
- strategies.add(strategyMap.get(FlowPoolWithLevelRecallStrategy.class.getSimpleName()));
|
|
|
- } else if (param.getFlowPoolAbtestGroup().equals(FlowPoolConstants.EXPERIMENTAL_FLOW_SET_LEVEL_SCORE)) {
|
|
|
- strategies.addAll(getRegionRecallStrategy(param));
|
|
|
- strategies.add(strategyMap.get(QuickFlowPoolWithLevelScoreRecallStrategy.class.getSimpleName()));
|
|
|
- strategies.add(strategyMap.get(FlowPoolWithLevelScoreRecallStrategy.class.getSimpleName()));
|
|
|
} else {
|
|
|
- strategies.addAll(getRegionRecallStrategy(param));
|
|
|
- strategies.add(strategyMap.get(QuickFlowPoolWithScoreRecallStrategy.class.getSimpleName()));
|
|
|
- strategies.add(strategyMap.get(FlowPoolWithScoreRecallStrategy.class.getSimpleName()));
|
|
|
+ //2:通过“流量池标记”控制“流量池召回子策略”
|
|
|
+ if (param.getFlowPoolAbtestGroup().equals(FlowPoolConstants.EXPERIMENTAL_FLOW_SET_LEVEL)) {
|
|
|
+ strategies.addAll(getRegionRecallStrategy(param));
|
|
|
+ strategies.add(strategyMap.get(QuickFlowPoolWithLevelRecallStrategy.class.getSimpleName()));
|
|
|
+ strategies.add(strategyMap.get(FlowPoolWithLevelRecallStrategy.class.getSimpleName()));
|
|
|
+ } else if (param.getFlowPoolAbtestGroup().equals(FlowPoolConstants.EXPERIMENTAL_FLOW_SET_LEVEL_SCORE)) {
|
|
|
+ strategies.addAll(getRegionRecallStrategy(param));
|
|
|
+ strategies.add(strategyMap.get(QuickFlowPoolWithLevelScoreRecallStrategy.class.getSimpleName()));
|
|
|
+ strategies.add(strategyMap.get(FlowPoolWithLevelScoreRecallStrategy.class.getSimpleName()));
|
|
|
+ } else {
|
|
|
+ strategies.addAll(getRegionRecallStrategy(param));
|
|
|
+ strategies.add(strategyMap.get(QuickFlowPoolWithScoreRecallStrategy.class.getSimpleName()));
|
|
|
+ strategies.add(strategyMap.get(FlowPoolWithScoreRecallStrategy.class.getSimpleName()));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (param.getAbCode().equals("60054")
|
|
|
- || param.getAbCode().equals("60087")
|
|
|
- || param.getAbCode().equals("60088")
|
|
|
- || param.getAbCode().equals("60089")
|
|
|
- || param.getAbCode().equals("60090")
|
|
|
- || param.getAbCode().equals("60091")) {
|
|
|
- strategies.add(strategyMap.get(SimHotVideoRecallStrategy.class.getSimpleName()));
|
|
|
- } else if (param.getAbCode().equals("60068")
|
|
|
- || param.getAbCode().equals("60081")
|
|
|
- || param.getAbCode().equals("60084")
|
|
|
- || param.getAbCode().equals("60092")
|
|
|
- || param.getAbCode().equals("60093")
|
|
|
- || param.getAbCode().equals("60094")
|
|
|
- || param.getAbCode().equals("60096")
|
|
|
- || param.getAbCode().equals("60095")
|
|
|
- || param.getAbCode().equals("60097")
|
|
|
- || param.getAbCode().equals("60098")
|
|
|
- ) {
|
|
|
+ //3:通过“abcode”控制“召回子策略”
|
|
|
+ String abCode = param.getAbCode();
|
|
|
+ if (abCode == null){
|
|
|
strategies.add(strategyMap.get(SimHotVideoRecallStrategy.class.getSimpleName()));
|
|
|
strategies.add(strategyMap.get(ReturnVideoRecallStrategy.class.getSimpleName()));
|
|
|
+ }else{
|
|
|
+ switch (abCode){
|
|
|
+ case "60068":
|
|
|
+ case "60092":
|
|
|
+ case "60094":
|
|
|
+ case "60096":
|
|
|
+ case "60097":
|
|
|
+ case "60098":
|
|
|
+ case "60101":
|
|
|
+ case "60102": // 通过更改param中的配置实现使用不同数据源 data66 rule68
|
|
|
+ strategies.add(strategyMap.get(SimHotVideoRecallStrategy.class.getSimpleName()));
|
|
|
+ strategies.add(strategyMap.get(ReturnVideoRecallStrategy.class.getSimpleName()));
|
|
|
+ break;
|
|
|
+ case "60103":
|
|
|
+ // todo
|
|
|
+ strategies.add(strategyMap.get(SimHotVideoRecallStrategy.class.getSimpleName()));
|
|
|
+ strategies.add(strategyMap.get(ReturnVideoRecallStrategy.class.getSimpleName()));
|
|
|
+ break;
|
|
|
+ case "60104":
|
|
|
+ // 去掉sim的对比实验
|
|
|
+ strategies.add(strategyMap.get(ReturnVideoRecallStrategy.class.getSimpleName()));
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return strategies;
|