7 Incheckningar 4c1c2a5219 ... 27b8fb5b8e

Upphovsman SHA1 Meddelande Datum
  sunmingze 27b8fb5b8e Merge branch 'vlog_merge_refactor_smz' of https://git.yishihui.com/algorithm/recommend-server into vlog_merge_refactor_smz 1 år sedan
  sunmingze d22027c8e1 增加代码注释 1 år sedan
  sunmingze ec05a3ba8f Merge branch 'master' of https://git.yishihui.com/algorithm/recommend-server into vlog_merge_refactor_smz 1 år sedan
  sunxiaoyi 9c66eb4ff6 Merge branch 'sunxy-festival_exp' of algorithm/recommend-server into master 1 år sedan
  sunxy 104ad4183b Merge branch 'master' into sunxy-festival_exp 1 år sedan
  sunxy 94be7d3b2a ADD: 立春的召回时间 1 år sedan
  sunxy 16c4883910 ADD: 立春的召回时间 1 år sedan

+ 2 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/framework/merger/StrategyQueue.java

@@ -36,6 +36,7 @@ public abstract class StrategyQueue {
         items = new LinkedList<RankItem>();
         children = new HashMap<String, StrategyQueue>();
 
+        // 自顶向下构建child queue 初始化
         for (String childName : strategyQueueInfo.getChildren()) {
             if (!strategyQueueConfig.getStrategyQueueInfoMap().containsKey(childName)) {
                 LOGGER.error("No config for Child queue [{}]", childName);
@@ -156,7 +157,7 @@ public abstract class StrategyQueue {
         return n;
     }
 
-    // 读取子队列的merge规则并按配比阶段
+    // 读取子队列的merge规则,按队列生成candidate
     protected int simpleCandidateByPercentage(Map<String, Candidate> candidateMap, int recallNum, User user, RecommendRequest requestData, int requestIndex, int expId) {
         int n = 0;
 

+ 1 - 0
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/framework/merger/StrategyQueueConfig.java

@@ -114,6 +114,7 @@ public class StrategyQueueConfig {
             mergeQueueInfo.setQueueClass(DEFAULT_STRATEGY_CLASS_NAME);
         }
 
+        // 递归的把child节点放在queue中
         if (conf.hasPath(CHILDREN_STRING)) {
             ConfigObject childrenConf = conf.getObject(CHILDREN_STRING);
             for (ConfigObject.Entry<String, ConfigValue> it : childrenConf.entrySet()) {

+ 0 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/implement/TopRecommendPipeline.java

@@ -54,7 +54,6 @@ public class TopRecommendPipeline {
         RedisSmartClient client = new RedisSmartClient();
         RedisBackedQueue queueProvider = new RedisBackedQueue(client, 1000L);
 
-
         BaseRecaller recaller = new BaseRecaller(queueProvider);
         List<RankItem> items = recaller.recalling(requestData, userInfo, requestIndex, new ArrayList<Candidate>(candidates.values()));
 

+ 3 - 10
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/implement/candidate/Global24hHotCandidate.java

@@ -28,27 +28,20 @@ public class Global24hHotCandidate extends IndexCandidateQueue {
 
         // index key  video:queue:type=global24h:region=北京:ordering=rov
         QueueName queueName24HGlobal = new QueueName(ItemType, "rov")
-                .addMatch("type", "global24h")
-                .addMatch("region", region);
+                .addMatch("type", "global24h");
         currRecall += addCandidateKey(simplifiedCandidates, queueName24HGlobal, 1, getStrategyQueueInfo().getQueueName());
 
         // index key  video:queue:type=global24h:region=北京:ordering=realplay
         queueName24HGlobal = new QueueName(ItemType, "realplay")
-                .addMatch("type", "global24h")
-                .addMatch("region", region);
+                .addMatch("type", "global24h");
         currRecall += addCandidateKey(simplifiedCandidates, queueName24HGlobal, 1, getStrategyQueueInfo().getQueueName());
 
         // index key  video:queue:type=global24h:region=北京:ordering=str
         queueName24HGlobal = new QueueName(ItemType, "str")
-                .addMatch("type", "global24h")
-                .addMatch("region", region);
+                .addMatch("type", "global24h");
         currRecall += addCandidateKey(simplifiedCandidates, queueName24HGlobal, 1, getStrategyQueueInfo().getQueueName());
 
         // index key  video:queue:type=global24h:region=北京:ordering=realplay_rate
-        queueName24HGlobal = new QueueName(ItemType, "realplay_ratio")
-                .addMatch("type", "global24h")
-                .addMatch("region", region);
-        currRecall += addCandidateKey(simplifiedCandidates, queueName24HGlobal, 1, getStrategyQueueInfo().getQueueName());
 
 
         candidates.putAll(simplifiedCandidates);

+ 2 - 2
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/score4recall/strategy/FestivalRecallScore.java

@@ -116,8 +116,8 @@ public class FestivalRecallScore extends AbstractScorer4Recall {
                     "00:00~2026-02-17 08:00"));
             put("除夕", Arrays.asList("2024-02-04 00:00~2024-02-09 08:00", "2025-01-23 00:00~2025-01-28 08:00", "2026-02-11 " +
                     "00:00~2026-02-16 08:00"));
-            put("立春", Arrays.asList("2024-02-02 00:00~2024-02-04 08:00", "2025-02-01 00:00~2025-02-03 08:00", "2026-02-02 " +
-                    "00:00~2026-02-04 08:00"));
+            put("立春", Arrays.asList("2024-02-03 15:00~2024-02-04 20:00", "2025-02-01 00:00~2025-02-03 08:00",
+                    "2026-02-02 00:00~2026-02-04 08:00"));
             put("小年", Arrays.asList("2024-01-29 00:00~2024-02-03 20:00", "2025-01-18 00:00~2025-01-23 08:00", "2026-02-06 " +
                     "00:00~2026-02-11 08:00"));
             put("大寒", Arrays.asList("2024-01-18 00:00~2024-01-20 08:00", "2025-01-18 00:00~2025-01-20 08:00", "2026-01-18 " +