Просмотр исходного кода

Merge branch 'feature_20260310_zhaohaipeng_add_deconstruction_feature' of algorithm/recommend-server into master

zhaohaipeng 3 недель назад
Родитель
Сommit
4351e1d605

+ 3 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/UserDeconstructionKeywordsRecallStrategy.java

@@ -36,7 +36,7 @@ public class UserDeconstructionKeywordsRecallStrategy implements RecallStrategy
 
 
     public static final int topN = 5;
     public static final int topN = 5;
     public static final String PUSH_FORM = "recall_strategy_deconstruction_keywords";
     public static final String PUSH_FORM = "recall_strategy_deconstruction_keywords";
-    public static final String redisKeyPrefix = "deconstruction_keywords_recall:";
+    public static final String redisKeyPrefix = "deconstruction_keywords_recall";
 
 
     @Override
     @Override
     public String pushFrom() {
     public String pushFrom() {
@@ -59,6 +59,7 @@ public class UserDeconstructionKeywordsRecallStrategy implements RecallStrategy
             List<String> values = redisTemplate.opsForValue().multiGet(keys);
             List<String> values = redisTemplate.opsForValue().multiGet(keys);
             List<Long> vids = this.recall(param.getVideoId(), values);
             List<Long> vids = this.recall(param.getVideoId(), values);
             FilterParam filterParam = FilterParamFactory.create(param, vids);
             FilterParam filterParam = FilterParamFactory.create(param, vids);
+
             log.info("deconstruction keywords recall filter before: {}", vids);
             log.info("deconstruction keywords recall filter before: {}", vids);
             FilterResult filterResult = filterService.filter(filterParam);
             FilterResult filterResult = filterService.filter(filterParam);
             if (Objects.isNull(filterResult) || CollectionUtils.isEmpty(filterResult.getVideoIds())) {
             if (Objects.isNull(filterResult) || CollectionUtils.isEmpty(filterResult.getVideoIds())) {
@@ -66,6 +67,7 @@ public class UserDeconstructionKeywordsRecallStrategy implements RecallStrategy
             }
             }
             log.info("deconstruction keywords recall filter before: {}", filterResult.getVideoIds());
             log.info("deconstruction keywords recall filter before: {}", filterResult.getVideoIds());
             List<Long> filterIds = filterResult.getVideoIds();
             List<Long> filterIds = filterResult.getVideoIds();
+
             int n = filterIds.size();
             int n = filterIds.size();
             for (int i = 0; i < n; i++) {
             for (int i = 0; i < n; i++) {
                 Video video = new Video();
                 Video video = new Video();