zhaohaipeng 1 månad sedan
förälder
incheckning
99eb8f5ed9

+ 3 - 3
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/RecommendService.java

@@ -183,8 +183,8 @@ public class RecommendService {
             RecommendParam param = genRecommendParam(request, recommendType);
             long genRecommendParamTime = stopwatch.stop().elapsed(TimeUnit.MILLISECONDS);
             timerLogMapTL.get().put("genRecommendParamTime", genRecommendParamTime);
-            log.info("genRecommendParam={},genRecommendParam cost={}", JSONUtils.toJson(param),
-                    genRecommendParamTime);
+            // log.info("genRecommendParam={},genRecommendParam cost={}", JSONUtils.toJson(param),
+            //         genRecommendParamTime);
             List<Video> videos = videoRecommend(param);
             stopwatch.reset().start();
             updateCache(request, param, videos);
@@ -313,7 +313,7 @@ public class RecommendService {
     }
 
     public RecommendResponse specialMidRecommend(RecommendRequest request) {
-        log.info("hit special mid recommend request={}", JSONUtils.toJson(request));
+        // log.info("hit special mid recommend request={}", JSONUtils.toJson(request));
         if (request == null) {
             return RecommendResponse.newBuilder()
                     .setResult(Result.newBuilder().setCode(1).setMessage("success"))

+ 9 - 9
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/flowpool/FlowPoolService.java

@@ -175,7 +175,7 @@ public class FlowPoolService {
             for (Map.Entry<String, Double> entry : douHotLevelWeight.entrySet()) {
                 // 从流量池缓存中移除达到分发次数限制的视频ID
                 String itemKey = String.format(RedisKeyConstants.DouHot.ITEM_REDIS_KEY_FORMAT, RecallUtils.douHotProvinceConvert(province), entry.getKey());
-                log.info("[DouHot view distribute count remove cache] key: {}, item: {}", itemKey, needRemoveVideoIds);
+                // log.info("[DouHot view distribute count remove cache] key: {}, item: {}", itemKey, needRemoveVideoIds);
                 redisTemplate.opsForZSet().remove(itemKey, needRemoveVideoIds.toArray());
             }
         });
@@ -185,20 +185,20 @@ public class FlowPoolService {
 
         // 获取流量池中 全部热点宝视频
         List<FlowPoolVideoInfo> allDouHotVideo = this.findAllDouHotVideoFromFlowPool();
-        log.info("[DouHot video size]: {}", allDouHotVideo.size());
+        // log.info("[DouHot video size]: {}", allDouHotVideo.size());
 
         // 获取省份与视频列表的映射,省份 -> [video]
         Map<String, Map<String, List<FlowPoolVideoInfo>>> levelAndProvinceAndVideoMap = this.findAllVideoAndProvinceMapByAttribute(allDouHotVideo);
-        for (Map.Entry<String, Map<String, List<FlowPoolVideoInfo>>> levelEntry : levelAndProvinceAndVideoMap.entrySet()) {
+        /*for (Map.Entry<String, Map<String, List<FlowPoolVideoInfo>>> levelEntry : levelAndProvinceAndVideoMap.entrySet()) {
             levelAndProvinceAndVideoMap.forEach((key, value) -> log.info("[DouHot province video size]. level: {}, province: {}, video size: {}", levelEntry.getKey(), key, value.size()));
-        }
+        }*/
 
         // 获取某个省份下所有视频的分数, 省份 -> video -> score
         Map<String, Map<Long, Double>> videoInProvinceScore = this.findVideoInProvinceScore(allDouHotVideo);
 
         // 获取视频的可分发数,videoId-flowPool -> viewCnt
         Map<String, Integer> videoDistributeCount = this.findDouHotVideoDistributeCount(allDouHotVideo);
-        log.info("[DouHot view distribute count size]: {}", videoDistributeCount.size());
+        // log.info("[DouHot view distribute count size]: {}", videoDistributeCount.size());
 
         this.douHotVideoWriteRedis(levelAndProvinceAndVideoMap, videoInProvinceScore, videoDistributeCount);
     }
@@ -287,7 +287,7 @@ public class FlowPoolService {
             paramJson.put("pageSize", 1000);
             paramJson.put("pageNum", pageNum++);
 
-            log.info("[get DouHot flow pool video] paramJson:{}", paramJson);
+            // log.info("[get DouHot flow pool video] paramJson:{}", paramJson);
             CommonResponse<List<FlowPoolVideoInfo>> response = flowPoolFeign.getFlowPoolVideo(paramJson);
             if (0 != response.getCode()) {
                 log.error("[get DouHot flow pool video request error] responseJson: {}", response);
@@ -295,7 +295,7 @@ public class FlowPoolService {
             }
 
             if (CollectionUtils.isEmpty(response.getData())) {
-                log.error("[get DouHot flow pool video data is empty] responseJson: {}", response);
+                // log.error("[get DouHot flow pool video data is empty] responseJson: {}", response);
                 break;
             }
             result.addAll(response.getData());
@@ -337,7 +337,7 @@ public class FlowPoolService {
                                                 .collect(Collectors.toMap(i -> RecallUtils.douHotProvinceConvert(i.getName()), DouHotVideoProvince::getTgi, (o1, o2) -> o1)))
                         )
                 );
-        vidAndProvinceListMap.forEach((key, value) -> log.info("[DouHot vid and province mapping]: vid: {}, province: {}", key, JSON.toJSONString(value)));
+        // vidAndProvinceListMap.forEach((key, value) -> log.info("[DouHot vid and province mapping]: vid: {}, province: {}", key, JSON.toJSONString(value)));
         Map<Long, Map<String, Double>> resultMap = new HashMap<>(videoIdAndVidMap.size());
         for (Map.Entry<Long, String> entry : videoIdAndVidMap.entrySet()) {
             Long videoId = entry.getKey();
@@ -429,7 +429,7 @@ public class FlowPoolService {
                 List<FlowPoolVideoInfo> flowPoolVideoInfos = entry.getValue();
 
                 String redisKey = String.format(RedisKeyConstants.DouHot.ITEM_REDIS_KEY_FORMAT, province, level);
-                log.info("[DouHot item redis key]: redisKey: {}, video size: {}", redisKey, flowPoolVideoInfos.size());
+                // log.info("[DouHot item redis key]: redisKey: {}, video size: {}", redisKey, flowPoolVideoInfos.size());
                 redisTemplate.delete(redisKey);
 
                 Map<Long, Double> videoScoreInProvince = provinceAllVideoScore.getOrDefault(province, new HashMap<>());

+ 1 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/RankService.java

@@ -261,7 +261,7 @@ public abstract class RankService {
             return false;
         }
         if (specialAppVid != null && specialAppVid.getOrDefault("app", new ArrayList<>()).contains((long) appId)) {
-            log.info("This request hits a special logic in matchSpecialApp with appId={}", appId);
+            // log.info("This request hits a special logic in matchSpecialApp with appId={}", appId);
             return true;
         }
         return false;

+ 1 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/processor/RankProcessorBoost.java

@@ -125,7 +125,7 @@ public class RankProcessorBoost {
                 long diffDay = ChronoUnit.DAYS.between(festiveDate, now);
                 boolean flag = (diffDay == 0 && nowHour >= 10) || (diffDay >= 1 && diffDay <= 2);
                 if (flag) {
-                    log.info("[FestiveVideoReduce] video: {}, festiveName: {}, festiveDate: {}, reduceCoefficient: {}", video.getVideoId(), festiveName, festiveDateStr, reduceCoefficient);
+                    // log.info("[FestiveVideoReduce] video: {}, festiveName: {}, festiveDate: {}, reduceCoefficient: {}", video.getVideoId(), festiveName, festiveDateStr, reduceCoefficient);
                     double originScore = video.getScore();
                     video.setScore(originScore * reduceCoefficient);
                     video.setSortScore(originScore * reduceCoefficient);

+ 1 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/RecallService.java

@@ -182,7 +182,7 @@ public class RecallService implements ApplicationContextAware {
             return false;
         }
         if (specialAppVid != null && specialAppVid.getOrDefault("app", new ArrayList<>()).contains((long) appId)) {
-            log.info("This request hits a special logic in matchSpecialApp with appId={}", appId);
+            // log.info("This request hits a special logic in matchSpecialApp with appId={}", appId);
             return true;
         }
         return false;