Authored by hugufei

使用配置项重构各类召回数量

Showing 14 changed files with 247 additions and 80 deletions
... ... @@ -2,11 +2,13 @@ package com.yoho.search.recall.scene.beans.builder;
import com.yoho.search.recall.common.ABUserPartitionUtils;
import com.yoho.search.recall.scene.config.RecallCommonConfig;
import com.yoho.search.recall.scene.config.RecallCommonConfigService;
import com.yoho.search.recall.scene.beans.strategy.impls.*;
import com.yoho.search.recall.scene.constants.SknCountConstants;
import com.yoho.search.recall.scene.models.common.ParamQueryFilter;
import com.yoho.search.recall.scene.models.req.RecallRequest;
import com.yoho.search.recall.scene.models.req.UserRecallRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
... ... @@ -15,6 +17,9 @@ import java.util.List;
@Component
public class CommonRecallRequestBuilder {
@Autowired
private RecallCommonConfigService recallCommonConfigService;
/**
* 批量召回业务需求
*
... ... @@ -27,13 +32,16 @@ public class CommonRecallRequestBuilder {
//1、构造召回请求
List<RecallRequest> requests = new ArrayList<>();
//1.1) firstSkn的召回
requests.add(this.buildFirstSknRequest(paramQueryFilter, firstProductSkns, SknCountConstants.FIRST_SKN));
requests.add(this.buildFirstSknRequest(paramQueryFilter, firstProductSkns, 1));
//1.2) 直通车召回
requests.add(this.buildDirectTrainRequest(paramQueryFilter, SknCountConstants.DIRECT_TRAIN_RECALL_COUNT));
RecallCommonConfig directTrainConfig = recallCommonConfigService.getDirectTrainConfig(userRecallRequest.getPageId());
requests.add(this.buildDirectTrainRequest(paramQueryFilter, directTrainConfig.getSize()));
//1.3) 新开店铺的召回
requests.add(this.buildNewShopRequest(paramQueryFilter, SknCountConstants.NEW_SHOP));
RecallCommonConfig newShopConfig = recallCommonConfigService.getNewShopConfig(userRecallRequest.getPageId());
requests.add(this.buildNewShopRequest(paramQueryFilter, newShopConfig.getSize()));
//1.4) 流量补偿的召回
requests.add(this.buildAddFlowRequest(paramQueryFilter, SknCountConstants.ADD_FLOW));
RecallCommonConfig addFlowConfig = recallCommonConfigService.getAddFlowConfig(userRecallRequest.getPageId());
requests.add(this.buildAddFlowRequest(paramQueryFilter, addFlowConfig.getSize()));
//1.5) 页面的兜底召回
if (ABUserPartitionUtils.isAUserComplete(userRecallRequest.getUid(), userRecallRequest.getUdid())) {
requests.add(this.buildCommonHeatValueStrategy(paramQueryFilter, pageSize));
... ...
package com.yoho.search.recall.scene.beans.builder;
import com.yoho.search.core.personalized.models.SortBrand;
import com.yoho.search.recall.scene.beans.config.ProductCountConfig;
import com.yoho.search.recall.scene.beans.config.ProductCountConfigService;
import com.yoho.search.recall.scene.config.ProductCountConfig;
import com.yoho.search.recall.scene.config.ProductCountConfigService;
import com.yoho.search.recall.scene.beans.strategy.IStrategy;
import com.yoho.search.recall.scene.beans.strategy.SortBrandType;
import com.yoho.search.recall.scene.beans.strategy.impls.*;
... ...
... ... @@ -9,7 +9,7 @@ import com.yoho.search.recall.common.UserFeatureFactor;
import com.yoho.search.recall.scene.beans.cache.SknBaseInfoCacheBean;
import com.yoho.search.recall.scene.beans.helper.StrategyHelper;
import com.yoho.search.recall.scene.beans.strategy.StrategyEnum;
import com.yoho.search.recall.scene.constants.SknCountConstants;
import com.yoho.search.recall.scene.config.RecallCommonConfigService;
import com.yoho.search.recall.scene.models.common.RecallMergerResult;
import com.yoho.search.recall.scene.models.common.RecallSknInfo;
import com.yoho.search.recall.scene.models.personal.UserPersonalFactor;
... ... @@ -39,6 +39,8 @@ public class UserRecallResponseBuilder {
private SknBaseInfoCacheBean sknBaseInfoCacheBean;
@Autowired
private SearchDynamicConfigService searchDynamicConfigService;
@Autowired
private RecallCommonConfigService recallCommonConfigService;
public UserRecallResponse builderRecallResult(RecallMergerResult recallMergerResult, UserRecallRequest userRecallRequest, UserPersonalFactor userPersonalFactor) {
//1、获取总数
... ... @@ -70,7 +72,8 @@ public class UserRecallResponseBuilder {
if (recallTotalPage == 0) {
recallTotalPage = 1;
}
recallTotalPage = Math.min(recallTotalPage, SknCountConstants.MAX_USER_RECALL_SKN_CACHE_COUNT / pageSize);//为用户最多保留X个skn进缓存
int userMaxRecallCount = recallCommonConfigService.getUserMaxRecallCount(userRecallRequest.getPageId());
recallTotalPage = Math.min(recallTotalPage, userMaxRecallCount / pageSize);//为用户最多保留X个skn进缓存
sknResultList = CollectionUtils.safeSubList(sknResultList, 0, recallTotalPage * pageSize);
//9、构造返回结果
... ... @@ -262,7 +265,7 @@ public class UserRecallResponseBuilder {
}
//2、兜底数据排序并截取
Collections.sort(commonResultList, (o1, o2) -> o2.getScore().compareTo(o1.getScore()));
commonResultList = CollectionUtils.safeSubList(commonResultList, 0, Math.max(SknCountConstants.COMMON_RECALL_VALUE_RETURN_COUNT, pageSize));
commonResultList = CollectionUtils.safeSubList(commonResultList, 0, Math.max(40, pageSize));
sknResultList.addAll(commonResultList);
}
... ...
package com.yoho.search.recall.scene.beans.cache;
import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder;
import com.yoho.search.base.utils.CollectionUtils;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.common.cache.impls.EhCache;
import com.yoho.search.common.cache.impls.SearchRedis;
import com.yoho.search.common.cache.model.CacheObject;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
import com.yoho.search.recall.scene.config.RecallCommonConfig;
import com.yoho.search.recall.scene.config.RecallCommonConfigService;
import com.yoho.search.recall.scene.beans.persional.PageProductIdBitSetComponent;
import com.yoho.search.recall.scene.beans.strategy.IStrategy;
import com.yoho.search.recall.scene.beans.strategy.impls.IRecallSknStrategy;
import com.yoho.search.recall.scene.beans.strategy.impls.RealTimeSimilarSknStrategy;
import com.yoho.search.recall.scene.beans.strategy.impls.RecommendSknStrategy;
... ... @@ -22,7 +21,6 @@ import com.yoho.search.recall.scene.models.req.RecallRequestResponse;
import com.yoho.search.recall.scene.models.req.RecallResponse;
import com.yoho.search.recall.scene.models.req.UserRecallRequest;
import com.yoho.search.service.base.SearchCommonService;
import com.yoho.search.service.base.SearchDynamicConfigService;
import org.apache.commons.collections.MapUtils;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
... ... @@ -48,6 +46,8 @@ public class SknRecallCacheBean {
private SearchRedis searchRedis;
@Autowired
private EhCache ehCache;
@Autowired
private RecallCommonConfigService recallCommonConfigService;
private static final Boolean recallWithCache = false;
... ... @@ -56,17 +56,22 @@ public class SknRecallCacheBean {
*
* @return
*/
public List<RecallRequestResponse> batchRecallBySknList(UserRecallRequest userRecallRequest, UserPersonalFactor userPersonalFactor, int maxReturnCount) {
public List<RecallRequestResponse> batchRecallBySknList(UserRecallRequest userRecallRequest, UserPersonalFactor userPersonalFactor) {
try {
//1、获取SKN,以及每个skn对应的找回类型
List<Integer> filterSknList = new ArrayList<>();
// if (userPersonalFactor.getRecommendSknList() != null) {
// filterSknList.addAll(userPersonalFactor.getRecommendSknList());
// }
if (userPersonalFactor.getRecommendSknList() != null) {
//1、获取实时点击skn的配置
RecallCommonConfig recSknConfig = recallCommonConfigService.getRecSknConfig(userRecallRequest.getPageId());
int recSknCount = recSknConfig == null ? 0 : recSknConfig.getSize();
if (recSknCount > 0 && userPersonalFactor.getRecommendSknList() != null) {
filterSknList.addAll(userPersonalFactor.getRecommendSknList());
}
//2、获取相似skn的配置
RecallCommonConfig rtSimSknConfig = recallCommonConfigService.getRtSimSknConfig(userRecallRequest.getPageId());
int rtSimSknCount = rtSimSknConfig == null ? 0 : rtSimSknConfig.getSize();
if (rtSimSknCount > 0 && userPersonalFactor.getRealTimeSimilarSknList() != null) {
filterSknList.addAll(userPersonalFactor.getRealTimeSimilarSknList());
}
//2、执行查询
//3、执行查询
List<Integer> filterSknResults;
if (recallWithCache) {
filterSknResults = this.filterRecommendWithCache(userRecallRequest, filterSknList);
... ... @@ -76,8 +81,8 @@ public class SknRecallCacheBean {
//3、构造结果
List<RecallRequestResponse> results = new ArrayList<>();
ParamQueryFilter paramQueryFilter = userRecallRequest.getParamQueryFilter();
results.addAll(this.buildResults(paramQueryFilter, userPersonalFactor.getRecommendSknList(), RecommendSknStrategy.class, filterSknResults, maxReturnCount));
results.addAll(this.buildResults(paramQueryFilter, userPersonalFactor.getRealTimeSimilarSknList(), RealTimeSimilarSknStrategy.class, filterSknResults, maxReturnCount));
results.addAll(this.buildResults(paramQueryFilter, userPersonalFactor.getRecommendSknList(), RecommendSknStrategy.class, filterSknResults, recSknCount));
results.addAll(this.buildResults(paramQueryFilter, userPersonalFactor.getRealTimeSimilarSknList(), RealTimeSimilarSknStrategy.class, filterSknResults, rtSimSknCount));
return results;
} catch (Exception e) {
RECALL_NEW_LOGGER.error(e.getMessage(), e);
... ... @@ -94,7 +99,7 @@ public class SknRecallCacheBean {
if (results.size() >= maxReturnCount) {
break;
}
if(!sknResults.contains(skn)){
if (!sknResults.contains(skn)) {
continue;
}
RecallRequest recallRequest = new RecallRequest(paramQueryFilter, this.getRecallSknStrategy(clazz, skn));
... ...
... ... @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import com.yoho.search.recall.scene.beans.builder.*;
import com.yoho.search.recall.scene.beans.persional.QueryUserPersionalFactorBean;
import com.yoho.search.recall.scene.beans.strategy.SortBrandType;
import com.yoho.search.recall.scene.constants.SknCountConstants;
import com.yoho.search.recall.scene.models.common.RecallMergerResult;
import com.yoho.search.recall.scene.models.personal.UserPersonalFactor;
import com.yoho.search.recall.scene.models.req.*;
... ... @@ -172,7 +171,7 @@ public class UserRecallCacheBean extends AbstractCacheBean<UserRecallRequest, Us
private CompletableFuture<List<RecallRequestResponse>> doRecallSknList(UserRecallRequest userRecallRequest, UserPersonalFactor userPersonalFactor) {
return CompletableFuture.supplyAsync(() -> {
long begin = System.currentTimeMillis();
List<RecallRequestResponse> recommendSknRequestResponses = sknRecallCacheBean.batchRecallBySknList(userRecallRequest, userPersonalFactor, SknCountConstants.REC_SKN_COUNT);
List<RecallRequestResponse> recommendSknRequestResponses = sknRecallCacheBean.batchRecallBySknList(userRecallRequest, userPersonalFactor);
RECALL_NEW_LOGGER.info("UserRecallCacheBean[2.2]-doRecallRecommendSkn,recommendSknCount is [{}],cost is [{}]", recommendSknRequestResponses.size(), System.currentTimeMillis() - begin);
return recommendSknRequestResponses;
}, recallExecutorService);
... ...
... ... @@ -3,8 +3,8 @@ package com.yoho.search.recall.scene.beans.persional;
import com.yoho.search.core.personalized.models.SortBrand;
import com.yoho.search.core.personalized.models.SortPriceAreas;
import com.yoho.search.core.personalized.models.UserPersonalFactorRspNew;
import com.yoho.search.recall.scene.config.RecallCommonConfigService;
import com.yoho.search.recall.scene.beans.vector.SortBrandVectorComponent;
import com.yoho.search.recall.scene.constants.RecallCommonConstants;
import com.yoho.search.recall.scene.models.personal.PagePersonalFactor;
import com.yoho.search.recall.scene.models.personal.UserPersonalFactor;
import com.yoho.search.recall.scene.models.req.UserRecallRequest;
... ... @@ -28,6 +28,8 @@ public class QueryUserPersionalFactorBean {
private UserPersionalFactorComponent userComponent;
@Autowired
private SortBrandVectorComponent sortBrandVectorComponent;
@Autowired
private RecallCommonConfigService recallCommonConfigService;
/**
* 获取个性化因子
... ... @@ -54,7 +56,6 @@ public class QueryUserPersionalFactorBean {
begin = System.currentTimeMillis();
UserPersonalFactorRspNew userFactor = userComponent.queryUserPersionalFactor(userRecallRequest.getUid(), userRecallRequest.getUdid(), pageFactor.getMisortIds());
cost = System.currentTimeMillis() - begin;
if (userRecallRequest.openDetailLog()) {
StringBuilder sizeLogInfo = new StringBuilder();
sizeLogInfo.append("SKN_SIZE is ").append(userFactor.getRecommendSknList().size()).append(";");
... ... @@ -66,10 +67,9 @@ public class QueryUserPersionalFactorBean {
} else {
RECALL_NEW_LOGGER.info("QueryUserPersionalFactorBean[2]:queryUserPersionalFactor. uid is[{}],udid is[{}], cost is[{}]", uid, udid, cost);
}
//3、构造结果
begin = System.currentTimeMillis();
UserPersonalFactor userPersonalFactor = this.buildUserPersonalFactor(pageFactor, userFactor);
UserPersonalFactor userPersonalFactor = this.buildUserPersonalFactor(userRecallRequest.getPageId(), pageFactor, userFactor);
cost = System.currentTimeMillis() - begin;
RECALL_NEW_LOGGER.info("QueryUserPersionalFactorBean[3]:buildUserPersonalFactor, uid is[{}],udid is[{}], cost is[{}ms],", uid, udid, cost);
return userPersonalFactor;
... ... @@ -79,7 +79,7 @@ public class QueryUserPersionalFactorBean {
}
}
private UserPersonalFactor buildUserPersonalFactor(PagePersonalFactor pageFactor, UserPersonalFactorRspNew userFactor) {
private UserPersonalFactor buildUserPersonalFactor(int pageId, PagePersonalFactor pageFactor, UserPersonalFactorRspNew userFactor) {
//1、构造品类价格带
List<SortPriceAreas> sortPriceAreasList = this.getSortPriceAreasListWithSort(userFactor, pageFactor);
//2、构造推荐的skn列表
... ... @@ -93,21 +93,20 @@ public class QueryUserPersionalFactorBean {
pageSortBrandKeys.add(pageSortBrand.key());
}
//4、构造实时【品类+品牌】
int maxRealTimeSortBrandCount = RecallCommonConstants.maxRealTimeSortBrandCount;
List<SortBrand> realTimeSortBrandList = this.getSortBrandListWithSort(pageSortBrandKeys, filterSortBrandKeys, userFactor.getRealTimeSortBrandList(), maxRealTimeSortBrandCount);
int recSortBrandCount = recallCommonConfigService.getRecSortBrandCount(pageId);
List<SortBrand> realTimeSortBrandList = this.getSortBrandListWithSort(pageSortBrandKeys, filterSortBrandKeys, userFactor.getRealTimeSortBrandList(), recSortBrandCount);
for (SortBrand existSortBrand : realTimeSortBrandList) {
filterSortBrandKeys.add(existSortBrand.key());
}
//5、构造基于RNN向量的【品牌+品牌】,去除实时的品类和品牌
List<SortBrand> vectorRnnSortBrandList = new ArrayList<>();
// int maxVectorRNNSortBrandCount = RecallCommonConstants.maxVectorRNNSortBrandCount;
// List<SortBrand> vectorRnnSortBrandList = sortBrandVectorComponent.queryVectorSortBrandList(pageFactor, filterSortBrandKeys, userFactor.getBrandVector(), userFactor.getSortBrandVector(),true, maxVectorRNNSortBrandCount);
// for (SortBrand existSortBrand : vectorRnnSortBrandList) {
// filterSortBrandKeys.add(existSortBrand.key());
// }
int vectorRNNSortBrandCount = recallCommonConfigService.getVectorRNNSortBrandCount(pageId);
List<SortBrand> vectorRnnSortBrandList = sortBrandVectorComponent.queryVectorSortBrandList(pageFactor, filterSortBrandKeys, userFactor.getBrandVector(), userFactor.getSortBrandVector(), true, vectorRNNSortBrandCount);
for (SortBrand existSortBrand : vectorRnnSortBrandList) {
filterSortBrandKeys.add(existSortBrand.key());
}
//6、构造基于W2V向量的【品牌+品牌】,去除实时的品类和品牌
int maxVectorW2SortBrandCount = RecallCommonConstants.maxVectorW2SortBrandCount;
List<SortBrand> vectorW2vSortBrandList = sortBrandVectorComponent.queryVectorSortBrandList(pageFactor, filterSortBrandKeys, userFactor.getBrandVectorW2v(), userFactor.getSortBrandVectorW2v(), false, maxVectorW2SortBrandCount);
int vecW2vSortBrandCount = recallCommonConfigService.getVectorW2vSortBrandCount(pageId);
List<SortBrand> vectorW2vSortBrandList = sortBrandVectorComponent.queryVectorSortBrandList(pageFactor, filterSortBrandKeys, userFactor.getBrandVectorW2v(), userFactor.getSortBrandVectorW2v(), false, vecW2vSortBrandCount);
for (SortBrand existSortBrand : vectorW2vSortBrandList) {
filterSortBrandKeys.add(existSortBrand.key());
}
... ...
package com.yoho.search.recall.scene.beans.config;
package com.yoho.search.recall.scene.config;
public class ProductCountConfig {
... ...
package com.yoho.search.recall.scene.beans.config;
package com.yoho.search.recall.scene.config;
import com.yoho.search.core.personalized.models.SortBrand;
import org.springframework.stereotype.Component;
... ...
package com.yoho.search.recall.scene.config;
public class RecallCommonConfig {
private int size;
private int interval;
public RecallCommonConfig(int size, int interval) {
this.size = size;
this.interval = interval;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public int getInterval() {
return interval;
}
public void setInterval(int interval) {
this.interval = interval;
}
}
... ...
package com.yoho.search.recall.scene.config;
public class RecallCommonConfigKeys {
public static final String DIRECT_TRAIN = "DIRECT_TRAIN";
public static final String REC_SKN = "REC_SKN";
public static final String RT_SIM_SKN = "RT_SIM_SKN";
public static final String ADD_FLOW = "ADD_FLOW";
public static final String NEW_SHOP = "NEW_SHOP";
public static final String REC_S_B_COUNT = "REC_S_B_COUNT";
public static final String VEC_RNN_S_B_COUNT = "VEC_RNN_S_B_COUNT";
public static final String VEC_W2V_S_B_COUNT = "VEC_W2V_S_B_COUNT";
public static final String USER_MAX_RECALL_COUNT = "USER_MAX_RECALL_COUNT";
public static final String COMMON_RECALL_COUNT = "COMMON_RECALL_COUNT";
public static final String COMMON_RETURN_COUNT = "COMMON_RETURN_COUNT";
}
... ...
package com.yoho.search.recall.scene.config;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@Component
public class RecallCommonConfigService {
private Map<String, Map<Integer, RecallCommonConfig>> configMap = new HashMap<>();
private RecallCommonConfig queryCommonConfig(int configPage, String configKey) {
Map<Integer, RecallCommonConfig> pageConfigMap = configMap.get(configKey);
if (pageConfigMap == null) {
return null;
}
RecallCommonConfig pageConfig = pageConfigMap.get(configPage);
if (pageConfig == null) {
pageConfig = pageConfigMap.get(0);
}
if (pageConfigMap == null) {
return null;
} else {
return pageConfig;
}
}
/**
* 获取实时skn的配置
*
* @param pageId
* @return
*/
public RecallCommonConfig getRecSknConfig(int pageId) {
RecallCommonConfig config = queryCommonConfig(pageId, RecallCommonConfigKeys.REC_SKN);
return config == null ? new RecallCommonConfig(8, 2) : config;
}
/**
* 获取相似skn的配置
*
* @param pageId
* @return
*/
public RecallCommonConfig getRtSimSknConfig(int pageId) {
RecallCommonConfig config = queryCommonConfig(pageId, RecallCommonConfigKeys.RT_SIM_SKN);
return config == null ? new RecallCommonConfig(8, 3) : config;
}
/**
* 获取直通车的配置
*
* @param pageId
* @return
*/
public RecallCommonConfig getDirectTrainConfig(int pageId) {
RecallCommonConfig config = queryCommonConfig(pageId, RecallCommonConfigKeys.DIRECT_TRAIN);
return config == null ? new RecallCommonConfig(100, 5) : config;
}
/**
* 获取新开店铺的配置
*
* @param pageId
* @return
*/
public RecallCommonConfig getNewShopConfig(int pageId) {
RecallCommonConfig config = queryCommonConfig(pageId, RecallCommonConfigKeys.NEW_SHOP);
return config == null ? new RecallCommonConfig(10, 10) : config;
}
/**
* 获取addFlow的配置
*
* @param pageId
* @return
*/
public RecallCommonConfig getAddFlowConfig(int pageId) {
RecallCommonConfig config = queryCommonConfig(pageId, RecallCommonConfigKeys.ADD_FLOW);
return config == null ? new RecallCommonConfig(10, 10) : config;
}
/**
* 获取推荐的品类品牌的配置
*
* @param pageId
* @return
*/
public int getRecSortBrandCount(int pageId) {
RecallCommonConfig recallCommonConfig = queryCommonConfig(pageId, RecallCommonConfigKeys.REC_S_B_COUNT);
if (recallCommonConfig != null) {
return recallCommonConfig.getSize();
}
return 12;
}
/**
* 获取预测的品类品牌的配置
*
* @param pageId
* @return
*/
public int getVectorW2vSortBrandCount(int pageId) {
RecallCommonConfig recallCommonConfig = queryCommonConfig(pageId, RecallCommonConfigKeys.VEC_W2V_S_B_COUNT);
if (recallCommonConfig != null) {
return recallCommonConfig.getSize();
}
return 12;
}
/**
* 获取预测的品类品牌的配置
*
* @param pageId
* @return
*/
public int getVectorRNNSortBrandCount(int pageId) {
RecallCommonConfig recallCommonConfig = queryCommonConfig(pageId, RecallCommonConfigKeys.VEC_RNN_S_B_COUNT);
if (recallCommonConfig != null) {
return recallCommonConfig.getSize();
}
return 12;
}
/**
* 获取预测的品类品牌的配置
*
* @param pageId
* @return
*/
public int getUserMaxRecallCount(int pageId) {
RecallCommonConfig recallCommonConfig = queryCommonConfig(pageId, RecallCommonConfigKeys.USER_MAX_RECALL_COUNT);
if (recallCommonConfig != null) {
return recallCommonConfig.getSize();
}
return 200;
}
}
... ...
package com.yoho.search.recall.scene.constants;
public class RecallCommonConstants {
public static final int maxRealTimeSortBrandCount = 12;//截取【品牌-品类】的数量-for召回【10->15】
public static final int maxVectorRNNSortBrandCount = 12;//截取【品牌-品类】的数量-for召回【10->6】
public static final int maxVectorW2SortBrandCount = 12;//截取【品牌-品类】的数量-for召回【10->6】
}
package com.yoho.search.recall.scene.constants;
public class SknCountConstants {
/**
* 单次召回的商品数量
*/
public static final int COMMON_RECALL_VALUE_RECALL_COUNT = 200;
public static final int COMMON_RECALL_VALUE_RETURN_COUNT = 40;
public static final int FIRST_SKN = 1;
public static final int DIRECT_TRAIN_RECALL_COUNT = 100;
public static final int REC_SKN_COUNT = 8;
public static final int NEW_SHOP = 5;//减少10->5
public static final int ADD_FLOW = 10;
public static final int REC_SORT_BRAND_SKN_COUNT = 6;
public static final int VEC_SORT_BRAND_SKN_COUNT = 6;
public static final int MAX_USER_RECALL_SKN_CACHE_COUNT = 300;
}
... ... @@ -3,7 +3,6 @@ package com.yoho.search.service.base;
import com.yoho.core.config.ConfigReader;
import com.yoho.search.common.downgrade.persional.PersionalRateLimit;
import com.yoho.search.common.downgrade.persional.PersionalRateLimitConfig;
import com.yoho.search.recall.scene.constants.RecallCommonConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ...