jch 3 mesiacov pred
rodič
commit
ef285c20c3
34 zmenil súbory, kde vykonal 0 pridanie a 1611 odobranie
  1. 0 12
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/filter/strategy/AllowListStrategy.java
  2. 0 2
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/RankService.java
  3. 0 29
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorFeature.java
  4. 0 323
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorItemFeature.java
  5. 0 338
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorItemFeatureV2.java
  6. 0 116
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorUserFeature.java
  7. 0 120
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorUserFeatureV2.java
  8. 0 4
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/processor/RankProcessorInsert.java
  9. 0 54
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/strategy/RankStrategy4RegionMergeModelBasic.java
  10. 0 114
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/AbstractNewContentVideoRecallStrategy.java
  11. 0 2
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/score/BaseFMModelScorer.java
  12. 0 23
      recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/score/ScorerUtils.java
  13. 0 7
      recommend-server-service/src/main/resources/content_base_recall.conf
  14. 0 8
      recommend-server-service/src/main/resources/feeds_recall_config_region_v1_vov.conf
  15. 0 9
      recommend-server-service/src/main/resources/feeds_recall_config_region_v2.conf
  16. 0 9
      recommend-server-service/src/main/resources/feeds_recall_config_region_v3.conf
  17. 0 8
      recommend-server-service/src/main/resources/feeds_recall_config_region_v4.conf
  18. 0 9
      recommend-server-service/src/main/resources/feeds_recall_config_region_v5_highvalue.conf
  19. 0 9
      recommend-server-service/src/main/resources/feeds_recall_config_region_v6_rootrov.conf
  20. 0 9
      recommend-server-service/src/main/resources/feeds_recall_config_region_v7_vov_longterm.conf
  21. 0 8
      recommend-server-service/src/main/resources/feeds_recall_config_tomson_v2.conf
  22. 0 12
      recommend-server-service/src/main/resources/feeds_score_config_20240228.conf
  23. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_20240711.conf
  24. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_20240806.conf
  25. 0 13
      recommend-server-service/src/main/resources/feeds_score_config_20241107.conf
  26. 0 13
      recommend-server-service/src/main/resources/feeds_score_config_20241119.conf
  27. 0 12
      recommend-server-service/src/main/resources/feeds_score_config_baseline.conf
  28. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_festival.conf
  29. 0 12
      recommend-server-service/src/main/resources/feeds_score_config_new_baseline.conf
  30. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_share_deep.conf
  31. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_share_width.conf
  32. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_thompson.conf
  33. 0 7
      recommend-server-service/src/main/resources/feeds_score_config_thompson_new.conf
  34. 0 287
      recommend-server-service/src/main/resources/feeds_score_config_xgb_20240828.conf

+ 0 - 12
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/filter/strategy/AllowListStrategy.java

@@ -99,16 +99,4 @@ public class AllowListStrategy implements FilterStrategy {
         }
         return false;
     }
-
-    public boolean isMemberOfReligionVideoAllowList(Long videoId) {
-        if (Objects.isNull(videoId)) {
-            return false;
-        }
-        try {
-            return redisTemplate.opsForValue().getBit(RELIGION_VIDEO_ALLOW_LIST_BITMAP_KEY, videoId);
-        } catch (Exception e) {
-            log.error("isMemberOfReligionVideoAllowList error {}", e, videoId);
-        }
-        return false;
-    }
 }

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

@@ -30,8 +30,6 @@ public abstract class RankService {
     public RedisTemplate<String, String> redisTemplate;
     @ApolloJsonValue("${alg.recall.special.app&vid:{}}")
     protected Map<String, List<Long>> specialAppVid;
-    @ApolloJsonValue("${region.recall.return.size:{}}")
-    protected Map<String, Map<String, Integer>> regionRecallReturnSize;
 
     @Value("${word2vec.exp:691}")
     protected String word2vecExp;

+ 0 - 29
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorFeature.java

@@ -1,29 +0,0 @@
-package com.tzld.piaoquan.recommend.server.service.rank.extractor;
-import org.springframework.data.redis.core.RedisTemplate;
-
-import java.util.*;
-
-public class RankExtractorFeature {
-
-    public static Map<Long, List<String>> getVideoTags(RedisTemplate<String, String> redisHelper, List<Long> videoIds) {
-        String REDIS_PREFIX = "alg_recsys_video_tags_";
-        List<String> redisKeys = new ArrayList<>();
-        for (Long videoId : videoIds) {
-            redisKeys.add(REDIS_PREFIX + String.valueOf(videoId));
-        }
-        List<String> videoTags = redisHelper.opsForValue().multiGet(redisKeys);
-        Map<Long, List<String>> videoTagDict = new HashMap<>();
-        if (videoTags != null) {
-            for (int i = 0; i < videoTags.size(); i++) {
-                String tagsStr = videoTags.get(i);
-                List<String> tags = new ArrayList<>();
-                if (tagsStr != null && !tagsStr.isEmpty()) {
-                    String[] tagsArray = tagsStr.split(",");
-                    tags = new ArrayList<>(Arrays.asList(tagsArray));
-                }
-                videoTagDict.put(videoIds.get(i), tags);
-            }
-        }
-        return videoTagDict;
-    }
-}

+ 0 - 323
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorItemFeature.java

@@ -1,323 +0,0 @@
-package com.tzld.piaoquan.recommend.server.service.rank.extractor;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-public class RankExtractorItemFeature {
-    public static Map<String, String> getItemRateFeature(Map<String, String> maps) {
-
-        double d;
-        Map<String, Double> result = new HashMap<>();
-        d = ExtractorUtils.division("i_1day_exp_cnt", "i_1day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_ctr",d);
-        }
-        d = ExtractorUtils.division("i_1day_exp_cnt", "i_1day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_str",d);
-        }
-        d = ExtractorUtils.division("i_1day_exp_cnt", "i_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_rov",d);
-        }
-        d = ExtractorUtils.division("i_1day_share_cnt", "i_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_ros",d);
-        }
-
-        d = ExtractorUtils.division("i_3day_exp_cnt", "i_3day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_ctr",d);
-        }
-        d = ExtractorUtils.division("i_3day_exp_cnt", "i_3day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_str",d);
-        }
-        d = ExtractorUtils.division("i_3day_exp_cnt", "i_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_rov",d);
-        }
-        d = ExtractorUtils.division("i_3day_share_cnt", "i_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_ros",d);
-        }
-
-        d = ExtractorUtils.division("i_7day_exp_cnt", "i_7day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_ctr",d);
-        }
-        d = ExtractorUtils.division("i_7day_exp_cnt", "i_7day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_str",d);
-        }
-        d = ExtractorUtils.division("i_7day_exp_cnt", "i_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_rov",d);
-        }
-        d = ExtractorUtils.division("i_7day_share_cnt", "i_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_ros",d);
-        }
-
-        d = ExtractorUtils.division("i_3month_exp_cnt", "i_3month_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_ctr",d);
-        }
-        d = ExtractorUtils.division("i_3month_exp_cnt", "i_3month_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_str",d);
-        }
-        d = ExtractorUtils.division("i_3month_exp_cnt", "i_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_rov",d);
-        }
-        d = ExtractorUtils.division("i_3month_share_cnt", "i_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_ros",d);
-        }
-
-
-        return rateFeatureChange(result);
-    }
-
-    public static Map<String, String> getItemRealtimeTrend(Map<String, Map<String, Double>> maps, String date, String hour){
-        Map<String, Double> result1 = new HashMap<>();
-        Map<String, Double> result2 = new HashMap<>();
-        if (date.isEmpty() || hour.isEmpty()){
-            return rateFeatureChange(result1);
-        }
-        int N = 6;
-
-        List<String> hourStrs = ExtractorUtils.generateHourStrings(date + hour, N);
-
-        String key;
-
-        key = "share_uv_list_1day";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-
-        key = "return_uv_list_1day";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-
-        key = "share_uv_list_1h";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-
-        key = "return_uv_list_1h";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-        Map<String, String> r1 = cntFeatureChange4Double(result1);
-        Map<String, String> r2 = rateFeatureChange(result2);
-        r1.putAll(r2);
-
-        return r1;
-    }
-
-
-    public static Map<String, String> rateFeatureChange(Map<String, Double> maps){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : maps.entrySet()){
-            int value = ExtractorUtils.ceilLogRate(entry.getValue());
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-    public static Map<String, String> cntFeatureChange4Double(Map<String, Double> maps){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : maps.entrySet()){
-            int value = ExtractorUtils.bucketCnt(entry.getValue());
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> cntFeatureChange(Map<String, String> maps,
-                                                       Set<String> names){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, String> entry : maps.entrySet()){
-            if (!names.contains(entry.getKey())){
-                continue;
-            }
-            int value = ExtractorUtils.bucketCnt(Double.valueOf(entry.getValue()));
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> getItemRealtimeCnt(Map<String, Map<String, Double>> maps,
-                                                         Set<String> names,
-                                                         String date, String hour){
-        Map<String, String> result = new HashMap<>();
-        if (date.isEmpty() || hour.isEmpty()){
-            return result;
-        }
-        String dateHour = ExtractorUtils.subtractHours(date + hour, 0);
-        for (Map.Entry<String, Map<String, Double>> entry : maps.entrySet()){
-            if (!names.contains(entry.getKey())){
-                continue;
-            }
-            Double num = entry.getValue().getOrDefault(dateHour, 0.0);
-            if (!ExtractorUtils.isDoubleEqualToZero(num)){
-                result.put(entry.getKey(), String.valueOf(ExtractorUtils.bucketCnt(num)));
-            }
-        }
-        return result;
-    }
-
-    public static Map<String, String> getItemRealtimeRate(Map<String, Map<String, Double>> maps,
-                                                         String datehour){
-        Map<String, Double> result = new HashMap<>();
-        if (datehour.isEmpty()){
-            return rateFeatureChange(result);
-        }
-        String dateHour = ExtractorUtils.subtractHours(datehour, 0);
-
-        double d, d1, d2;
-        String k1, k2;
-
-        k1 = "view_pv_list_1day";
-        k2 = "play_pv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_ctr_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1day";
-        k2 = "share_pv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_str_rt", d);
-            }
-        }
-
-        k1 = "share_pv_list_1day";
-        k2 = "return_uv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_ros_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1day";
-        k2 = "return_uv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_rov_rt", d);
-            }
-        }
-
-        //---
-        k1 = "view_pv_list_1h";
-        k2 = "play_pv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_ctr_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1h";
-        k2 = "share_pv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_str_rt", d);
-            }
-        }
-
-        k1 = "share_pv_list_1day";
-        k2 = "return_uv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_ros_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1h";
-        k2 = "return_uv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)) {
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)) {
-                result.put("i_1h_rov_rt", d);
-            }
-        }
-
-        return rateFeatureChange(result);
-    }
-
-    public static void main(String[] args) {
-        String s1 = "share_uv_list_1day";
-        String s2 = "2024011300:2,2024011301:2,2024011304:2,2024011309:3,2024011311:3,2024011314:4,2024011315:4,2024011321:1,2024011323:1,2024011400:1,2024011401:1,2024011404:1,2024011406:1,2024011407:1,2024011408:1,2024011410:1,2024011423:1,2024011302:2,2024011305:2,2024011312:4,2024011313:4,2024011317:4,2024011318:4,2024011319:3,2024011320:1,2024011403:1,2024011409:1,2024011411:1,2024011419:1,2024011420:1,2024011422:1,2024011303:2,2024011306:2,2024011307:2,2024011308:2,2024011310:3,2024011316:4,2024011322:1,2024011402:1,2024011405:1,2024011421:1";
-        Map<String, Double> m1 = new HashMap<>();
-        Map<String, Map<String, Double>> maps = new HashMap<>();
-        for (String s : s2.split(",")){
-            String s3 = s.split(":")[0];
-            String s4 = s.split(":")[1];
-            m1.put(s3, Double.valueOf(s4));
-        }
-        maps.put(s1, m1);
-
-        String date = "20240114";
-        String hour = "20";
-        System.out.println(getItemRealtimeTrend(maps, date, hour));
-    }
-}

+ 0 - 338
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorItemFeatureV2.java

@@ -1,338 +0,0 @@
-package com.tzld.piaoquan.recommend.server.service.rank.extractor;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-public class RankExtractorItemFeatureV2 {
-    public static Map<String, Double> getItemRateFeature(Map<String, String> maps) {
-
-        double d;
-        Map<String, Double> result = new HashMap<>();
-        d = ExtractorUtils.division("i_1day_exp_cnt", "i_1day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_ctr",d);
-        }
-        d = ExtractorUtils.division("i_1day_exp_cnt", "i_1day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_str",d);
-        }
-        d = ExtractorUtils.division("i_1day_exp_cnt", "i_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_rov",d);
-        }
-        d = ExtractorUtils.division("i_1day_share_cnt", "i_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_1day_ros",d);
-        }
-
-        d = ExtractorUtils.division("i_3day_exp_cnt", "i_3day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_ctr",d);
-        }
-        d = ExtractorUtils.division("i_3day_exp_cnt", "i_3day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_str",d);
-        }
-        d = ExtractorUtils.division("i_3day_exp_cnt", "i_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_rov",d);
-        }
-        d = ExtractorUtils.division("i_3day_share_cnt", "i_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3day_ros",d);
-        }
-
-        d = ExtractorUtils.division("i_7day_exp_cnt", "i_7day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_ctr",d);
-        }
-        d = ExtractorUtils.division("i_7day_exp_cnt", "i_7day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_str",d);
-        }
-        d = ExtractorUtils.division("i_7day_exp_cnt", "i_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_rov",d);
-        }
-        d = ExtractorUtils.division("i_7day_share_cnt", "i_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_7day_ros",d);
-        }
-
-        d = ExtractorUtils.division("i_3month_exp_cnt", "i_3month_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_ctr",d);
-        }
-        d = ExtractorUtils.division("i_3month_exp_cnt", "i_3month_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_str",d);
-        }
-        d = ExtractorUtils.division("i_3month_exp_cnt", "i_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_rov",d);
-        }
-        d = ExtractorUtils.division("i_3month_share_cnt", "i_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("i_3month_ros",d);
-        }
-
-
-//        Map<String, String> result2 = new HashMap<>();
-//        for (Map.Entry<String, Double> entry : result.entrySet()){
-//            result2.put(entry.getKey(), String.valueOf(entry.getValue()));
-//        }
-
-        return result;
-    }
-
-    public static Map<String, String> getItemRealtimeTrend(Map<String, Map<String, Double>> maps, String date, String hour){
-        Map<String, Double> result1 = new HashMap<>();
-        Map<String, Double> result2 = new HashMap<>();
-        if (date.isEmpty() || hour.isEmpty()){
-            return rateFeatureChange(result1);
-        }
-        int N = 6;
-
-        List<String> hourStrs = ExtractorUtils.generateHourStrings(date + hour, N);
-
-        String key;
-
-        key = "share_uv_list_1day";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-
-        key = "return_uv_list_1day";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-
-        key = "share_uv_list_1h";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-
-        key = "return_uv_list_1h";
-        if (maps.containsKey(key)){
-            Map<String, Double> fList = maps.get(key);
-            List<Double> arrs = hourStrs.stream().map(r -> fList.getOrDefault(r, 0.0D)).collect(Collectors.toList());
-            Collections.reverse(arrs);
-            result1.put(key+"_"+N+"_avg", ExtractorUtils.calculateAverage(arrs));
-            result1.put(key+"_"+N+"_var", ExtractorUtils.calculateVariance(arrs));
-
-            List<Double> arrsDiff = ExtractorUtils.calculateDifferences(arrs);
-            result2.put(key+"_diff_"+N+"_avg", ExtractorUtils.calculateAverage(arrsDiff));
-            result2.put(key+"_diff_"+N+"_var", ExtractorUtils.calculateVariance(arrsDiff));
-        }
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : result1.entrySet()){
-            result.put(entry.getKey(), String.valueOf(entry.getValue()));
-        }
-        for (Map.Entry<String, Double> entry : result2.entrySet()){
-            result.put(entry.getKey(), String.valueOf(entry.getValue()));
-        }
-
-
-        return result;
-    }
-
-
-    public static Map<String, String> rateFeatureChange(Map<String, Double> maps){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : maps.entrySet()){
-            int value = ExtractorUtils.ceilLogRate(entry.getValue());
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-    public static Map<String, String> cntFeatureChange4Double(Map<String, Double> maps){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : maps.entrySet()){
-            int value = ExtractorUtils.bucketCnt(entry.getValue());
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> cntFeatureChange(Map<String, String> maps,
-                                                       Set<String> names){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, String> entry : maps.entrySet()){
-            if (!names.contains(entry.getKey())){
-                continue;
-            }
-            int value = ExtractorUtils.bucketCnt(Double.valueOf(entry.getValue()));
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> getItemRealtimeCnt(Map<String, Map<String, Double>> maps,
-                                                         Set<String> names,
-                                                         String date, String hour){
-        Map<String, String> result = new HashMap<>();
-        if (date.isEmpty() || hour.isEmpty()){
-            return result;
-        }
-        String dateHour = ExtractorUtils.subtractHours(date + hour, 0);
-        for (Map.Entry<String, Map<String, Double>> entry : maps.entrySet()){
-            if (!names.contains(entry.getKey())){
-                continue;
-            }
-            Double num = entry.getValue().getOrDefault(dateHour, 0.0);
-            if (!ExtractorUtils.isDoubleEqualToZero(num)){
-                result.put(entry.getKey(), String.valueOf(num));
-            }
-        }
-        return result;
-    }
-
-    public static Map<String, Double> getItemRealtimeRate(Map<String, Map<String, Double>> maps,
-                                                         String datehour){
-        Map<String, Double> result = new HashMap<>();
-        if (datehour.isEmpty()){
-            return result;
-        }
-        String dateHour = ExtractorUtils.subtractHours(datehour, 0);
-
-        double d, d1, d2;
-        String k1, k2;
-
-        k1 = "view_pv_list_1day";
-        k2 = "play_pv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_ctr_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1day";
-        k2 = "share_pv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_str_rt", d);
-            }
-        }
-
-        k1 = "share_pv_list_1day";
-        k2 = "return_uv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_ros_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1day";
-        k2 = "return_uv_list_1day";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1day_rov_rt", d);
-            }
-        }
-
-        //---
-        k1 = "view_pv_list_1h";
-        k2 = "play_pv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_ctr_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1h";
-        k2 = "share_pv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_str_rt", d);
-            }
-        }
-
-        k1 = "share_pv_list_1day";
-        k2 = "return_uv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_ros_rt", d);
-            }
-        }
-
-        k1 = "view_pv_list_1h";
-        k2 = "return_uv_list_1h";
-        if (maps.containsKey(k1) && maps.containsKey(k2)){
-            d1 = maps.get(k1).getOrDefault(dateHour, 0.0);
-            d2 = maps.get(k2).getOrDefault(dateHour, 0.0);
-            d = ExtractorUtils.divisionDouble(d1, d2);
-            if (!ExtractorUtils.isDoubleEqualToZero(d)){
-                result.put("i_1h_rov_rt", d);
-            }
-        }
-//        Map<String, String> result2 = new HashMap<>();
-//        for (Map.Entry<String, Double> entry : result.entrySet()){
-//            result2.put(entry.getKey(), String.valueOf(entry.getValue()));
-//        }
-
-
-        return result;
-    }
-
-    public static void main(String[] args) {
-        String s1 = "share_uv_list_1day";
-        String s2 = "2024011300:2,2024011301:2,2024011304:2,2024011309:3,2024011311:3,2024011314:4,2024011315:4,2024011321:1,2024011323:1,2024011400:1,2024011401:1,2024011404:1,2024011406:1,2024011407:1,2024011408:1,2024011410:1,2024011423:1,2024011302:2,2024011305:2,2024011312:4,2024011313:4,2024011317:4,2024011318:4,2024011319:3,2024011320:1,2024011403:1,2024011409:1,2024011411:1,2024011419:1,2024011420:1,2024011422:1,2024011303:2,2024011306:2,2024011307:2,2024011308:2,2024011310:3,2024011316:4,2024011322:1,2024011402:1,2024011405:1,2024011421:1";
-        Map<String, Double> m1 = new HashMap<>();
-        Map<String, Map<String, Double>> maps = new HashMap<>();
-        for (String s : s2.split(",")){
-            String s3 = s.split(":")[0];
-            String s4 = s.split(":")[1];
-            m1.put(s3, Double.valueOf(s4));
-        }
-        maps.put(s1, m1);
-
-        String date = "20240114";
-        String hour = "20";
-        System.out.println(getItemRealtimeTrend(maps, date, hour));
-    }
-}

+ 0 - 116
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorUserFeature.java

@@ -1,116 +0,0 @@
-package com.tzld.piaoquan.recommend.server.service.rank.extractor;
-
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-public class RankExtractorUserFeature {
-    public static Map<String, String> getUserRateFeature(Map<String, String> maps) {
-
-        double d;
-        Map<String, Double> result = new HashMap<>();
-        d = ExtractorUtils.division("u_1day_exp_cnt", "u_1day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_ctr",d);
-        }
-        d = ExtractorUtils.division("u_1day_exp_cnt", "u_1day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_str",d);
-        }
-        d = ExtractorUtils.division("u_1day_exp_cnt", "u_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_rov",d);
-        }
-        d = ExtractorUtils.division("u_1day_share_cnt", "u_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_ros",d);
-        }
-
-        d = ExtractorUtils.division("u_3day_exp_cnt", "u_3day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_ctr",d);
-        }
-        d = ExtractorUtils.division("u_3day_exp_cnt", "u_3day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_str",d);
-        }
-        d = ExtractorUtils.division("u_3day_exp_cnt", "u_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_rov",d);
-        }
-        d = ExtractorUtils.division("u_3day_share_cnt", "u_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_ros",d);
-        }
-
-        d = ExtractorUtils.division("u_7day_exp_cnt", "u_7day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_ctr",d);
-        }
-        d = ExtractorUtils.division("u_7day_exp_cnt", "u_7day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_str",d);
-        }
-        d = ExtractorUtils.division("u_7day_exp_cnt", "u_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_rov",d);
-        }
-        d = ExtractorUtils.division("u_7day_share_cnt", "u_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_ros",d);
-        }
-
-        d = ExtractorUtils.division("u_3month_exp_cnt", "u_3month_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_ctr",d);
-        }
-        d = ExtractorUtils.division("u_3month_exp_cnt", "u_3month_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_str",d);
-        }
-        d = ExtractorUtils.division("u_3month_exp_cnt", "u_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_rov",d);
-        }
-        d = ExtractorUtils.division("u_3month_share_cnt", "u_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_ros",d);
-        }
-
-        return rateFeatureChange(result);
-    }
-
-
-    public static Map<String, String> rateFeatureChange(Map<String, Double> maps){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : maps.entrySet()){
-            int value = ExtractorUtils.ceilLogRate(entry.getValue());
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> cntFeatureChange(Map<String, String> maps, Set<String> names){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, String> entry : maps.entrySet()){
-            if (!names.contains(entry.getKey())){
-                continue;
-            }
-            int value = ExtractorUtils.bucketCnt(Double.valueOf(entry.getValue()));
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> getOriginFeature(Map<String, String> maps, Set<String> names){
-        Map<String, String> result = new HashMap<>();
-        for (String name: names){
-            if (maps.containsKey(name)){
-                result.put(name, maps.get(name));
-            }
-        }
-        return result;
-    }
-
-}

+ 0 - 120
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/extractor/RankExtractorUserFeatureV2.java

@@ -1,120 +0,0 @@
-package com.tzld.piaoquan.recommend.server.service.rank.extractor;
-
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-public class RankExtractorUserFeatureV2 {
-    public static Map<String, Double> getUserRateFeature(Map<String, String> maps) {
-
-        double d;
-        Map<String, Double> result = new HashMap<>();
-        d = ExtractorUtils.division("u_1day_exp_cnt", "u_1day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_ctr",d);
-        }
-        d = ExtractorUtils.division("u_1day_exp_cnt", "u_1day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_str",d);
-        }
-        d = ExtractorUtils.division("u_1day_exp_cnt", "u_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_rov",d);
-        }
-        d = ExtractorUtils.division("u_1day_share_cnt", "u_1day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_1day_ros",d);
-        }
-
-        d = ExtractorUtils.division("u_3day_exp_cnt", "u_3day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_ctr",d);
-        }
-        d = ExtractorUtils.division("u_3day_exp_cnt", "u_3day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_str",d);
-        }
-        d = ExtractorUtils.division("u_3day_exp_cnt", "u_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_rov",d);
-        }
-        d = ExtractorUtils.division("u_3day_share_cnt", "u_3day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3day_ros",d);
-        }
-
-        d = ExtractorUtils.division("u_7day_exp_cnt", "u_7day_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_ctr",d);
-        }
-        d = ExtractorUtils.division("u_7day_exp_cnt", "u_7day_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_str",d);
-        }
-        d = ExtractorUtils.division("u_7day_exp_cnt", "u_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_rov",d);
-        }
-        d = ExtractorUtils.division("u_7day_share_cnt", "u_7day_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_7day_ros",d);
-        }
-
-        d = ExtractorUtils.division("u_3month_exp_cnt", "u_3month_click_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_ctr",d);
-        }
-        d = ExtractorUtils.division("u_3month_exp_cnt", "u_3month_share_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_str",d);
-        }
-        d = ExtractorUtils.division("u_3month_exp_cnt", "u_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_rov",d);
-        }
-        d = ExtractorUtils.division("u_3month_share_cnt", "u_3month_return_cnt", maps);
-        if (!ExtractorUtils.isDoubleEqualToZero(d)){
-            result.put("u_3month_ros",d);
-        }
-//        Map<String, String> result2 = new HashMap<>();
-//        for (Map.Entry<String, Double> entry : result.entrySet()){
-//            result2.put(entry.getKey(), String.valueOf(entry.getValue()));
-//        }
-
-        return result;
-    }
-
-
-    public static Map<String, String> rateFeatureChange(Map<String, Double> maps){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, Double> entry : maps.entrySet()){
-            int value = ExtractorUtils.ceilLogRate(entry.getValue());
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> cntFeatureChange(Map<String, String> maps, Set<String> names){
-        Map<String, String> result = new HashMap<>();
-        for (Map.Entry<String, String> entry : maps.entrySet()){
-            if (!names.contains(entry.getKey())){
-                continue;
-            }
-            int value = ExtractorUtils.bucketCnt(Double.valueOf(entry.getValue()));
-            result.put(entry.getKey(), String.valueOf(value));
-        }
-        return result;
-    }
-
-    public static Map<String, String> getOriginFeature(Map<String, String> maps, Set<String> names){
-        Map<String, String> result = new HashMap<>();
-        for (String name: names){
-            if (maps.containsKey(name)){
-                result.put(name, maps.get(name));
-            }
-        }
-        return result;
-    }
-
-}

+ 0 - 4
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/processor/RankProcessorInsert.java

@@ -15,10 +15,6 @@ import java.util.stream.Collectors;
  * @author sunxy
  */
 public class RankProcessorInsert {
-    final static Set<String> NORTHERN_PROVINCES = new HashSet<>(Arrays.asList(
-            "北京" ,"天津" ,"河北" ,"山西","内蒙古"
-            ,"辽宁","吉林","黑龙江","山东","河南","陕西","甘肃","宁夏","新疆"
-    ));
     public static void insertByTag(RankParam param, List<Video> rovList,
                                    Map<String, Map<String, String>> rulesMap) {
         if (CollectionUtils.isEmpty(rovList) || rulesMap == null || rulesMap.isEmpty()) {

+ 0 - 54
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/strategy/RankStrategy4RegionMergeModelBasic.java

@@ -50,60 +50,6 @@ public abstract class RankStrategy4RegionMergeModelBasic extends RankService {
         }
     }
 
-    public List<RankItem> model(List<Video> videos, RankParam param,
-                                List<String> rtFeaPart) {
-        List<RankItem> result = new ArrayList<>();
-        if (videos.isEmpty()) {
-            return result;
-        }
-
-
-        List<RankItem> rankItems = CommonCollectionUtils.toList(videos, RankItem::new);
-        List<Long> videoIds = CommonCollectionUtils.toListDistinct(videos, Video::getVideoId);
-
-        // 2-2: item 实时特征处理
-        List<String> videoRtKeys2 = videoIds.stream().map(r -> "item_rt_fea_1h_" + r)
-                .collect(Collectors.toList());
-        List<String> videoRtFeatures = this.redisTemplate.opsForValue().multiGet(videoRtKeys2);
-
-
-        if (videoRtFeatures != null) {
-            int j = 0;
-            for (RankItem item : rankItems) {
-                String vF = videoRtFeatures.get(j);
-                ++j;
-                if (vF == null) {
-                    continue;
-                }
-                Map<String, String> vfMap = new HashMap<>();
-                Map<String, Map<String, Double>> vfMapNew = new HashMap<>();
-                try {
-                    vfMap = JSONUtils.fromJson(vF, new TypeToken<Map<String, String>>() {
-                    }, vfMap);
-
-                    for (Map.Entry<String, String> entry : vfMap.entrySet()) {
-                        String value = entry.getValue();
-                        if (value == null) {
-                            continue;
-                        }
-                        String[] var1 = value.split(",");
-                        Map<String, Double> tmp = new HashMap<>();
-                        for (String var2 : var1) {
-                            String[] var3 = var2.split(":");
-                            tmp.put(var3[0], Double.valueOf(var3[1]));
-                        }
-                        vfMapNew.put(entry.getKey(), tmp);
-                    }
-                    item.setItemRealTimeFeature(vfMapNew);
-                } catch (Exception e) {
-                    log.error(String.format("parse video item_rt_fea_1h_ json is wrong in {} with {}", this.CLASS_NAME, e));
-                }
-            }
-        }
-
-        return rankItems;
-    }
-
     @Override
     public RankResult mergeAndSort(RankParam param, List<Video> rovVideos, List<Video> flowVideos) {
 

+ 0 - 114
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/AbstractNewContentVideoRecallStrategy.java

@@ -1,114 +0,0 @@
-package com.tzld.piaoquan.recommend.server.service.recall.strategy;
-
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.collect.Lists;
-import com.tzld.piaoquan.recommend.server.model.Video;
-import com.tzld.piaoquan.recommend.server.service.filter.FilterParam;
-import com.tzld.piaoquan.recommend.server.service.filter.FilterResult;
-import com.tzld.piaoquan.recommend.server.service.filter.RegionFilterService;
-import com.tzld.piaoquan.recommend.server.service.recall.FilterParamFactory;
-import com.tzld.piaoquan.recommend.server.service.recall.RecallParam;
-import com.tzld.piaoquan.recommend.server.service.recall.RecallStrategy;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateFormatUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.data.redis.core.RedisTemplate;
-
-import javax.annotation.Resource;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author sunxy
- */
-@Slf4j
-public abstract class AbstractNewContentVideoRecallStrategy implements RecallStrategy {
-
-    @Resource
-    protected RedisTemplate<String, String> redisTemplate;
-    @Autowired
-    private RegionFilterService filterService;
-
-    @Value("${flow.pool.recent.top.video.daily.time.range:}")
-    private String timeRangeJson;
-
-//    @Autowired
-//    protected RegionFilterService filterService;
-
-    @Override
-    public List<Video> recall(RecallParam param) {
-//        boolean checkIfInTimeRange = checkIfInTimeRange();
-//        if (!checkIfInTimeRange) {
-//            return Collections.emptyList();
-//        }
-        String key = recallKey(param);
-        if (StringUtils.isBlank(key)) {
-            return Collections.emptyList();
-        }
-        Object result = redisTemplate.opsForValue().get(key);
-        if (result == null) {
-            return Collections.emptyList();
-        }
-        try {
-            List<Long> videoIdList = JSONObject.parseArray(result.toString(), Long.class);
-            Map<Long, Double> videoBigSmall = new HashMap<>(videoIdList.size());
-            double score = 1000D;
-            for (Long id : videoIdList){
-                videoBigSmall.put(id, score--);
-            }
-            // 3 召回内部过滤
-            FilterParam filterParam = FilterParamFactory.create(param, videoIdList);
-            FilterResult filterResult = filterService.filter(filterParam);
-            List<Video> videosResult = new ArrayList<>();
-            if (filterResult != null && CollectionUtils.isNotEmpty(filterResult.getVideoIds())) {
-                filterResult.getVideoIds().forEach(vid -> {
-                    Video video = new Video();
-                    video.setVideoId(vid);
-                    video.setAbCode(param.getAbCode());
-                    video.setRovScore(videoBigSmall.getOrDefault(video.getVideoId(), 0.0D));
-                    video.setPushFrom(pushFrom());
-                    videosResult.add(video);
-                });
-            }
-            videosResult.sort(Comparator.comparingDouble(o -> -o.getRovScore()));
-            return videosResult;
-        } catch (Exception e) {
-            log.error("recall error, key={}, result={}", key, result, e);
-        }
-        return Collections.emptyList();
-    }
-
-    protected boolean checkIfInTimeRange() {
-        if (StringUtils.isBlank(timeRangeJson)) {
-            return false;
-        }
-        try {
-            List<String> timeRangeStrList = JSONObject.parseArray(timeRangeJson, String.class);
-            if (CollectionUtils.isEmpty(timeRangeStrList)) {
-                return false;
-            }
-            for (String timeRangeStr : timeRangeStrList) {
-                String[] timeRange = timeRangeStr.split("~");
-                if (timeRange.length != 2) {
-                    continue;
-                }
-                // 4:00~15:00
-                String startTime = timeRange[0];
-                String endTime = timeRange[1];
-                String nowTime = DateFormatUtils.format(new Date(), "HH:mm");
-                if (nowTime.compareTo(startTime) >= 0 && nowTime.compareTo(endTime) <= 0) {
-                    return true;
-                }
-            }
-
-        } catch (Exception e) {
-            log.error("checkIfInTimeRange error, timeRangeJson={}", timeRangeJson, e);
-        }
-        return false;
-    }
-
-    protected abstract String recallKey(RecallParam param);
-}

+ 0 - 2
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/score/BaseFMModelScorer.java

@@ -7,8 +7,6 @@ import org.slf4j.LoggerFactory;
 
 public abstract class BaseFMModelScorer extends AbstractScorer {
 
-    private static Logger LOGGER = LoggerFactory.getLogger(BaseFMModelScorer.class);
-
     public BaseFMModelScorer(ScorerConfigInfo scorerConfigInfo) {
         super(scorerConfigInfo);
     }

+ 0 - 23
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/score/ScorerUtils.java

@@ -24,43 +24,20 @@ public final class ScorerUtils {
     private static final Map<String, ScorerPipeline> scorerPipelineCache = new ConcurrentHashMap<>();
     private static final Map<String, ScorerPipeline4Recall> scorerPipelineCache4Recall = new ConcurrentHashMap<>();
 
-    public static String BASE_CONF = "feeds_score_config_baseline.conf";
     public static String VIDEO_SCORE_CONF_FOR_AD = "video_score_config_for_ad.conf";
 
-    public static String FLOWPOOL_CONF = "feeds_score_config_thompson.conf";
-
 
     public static void warmUp() {
         log.info("scorer warm up ");
-        ScorerUtils.init(BASE_CONF);
-        ScorerUtils.init(FLOWPOOL_CONF);
         ScorerUtils.init(VIDEO_SCORE_CONF_FOR_AD);
-        ScorerUtils.init("feeds_score_config_20240228.conf");
         ScorerUtils.init("feeds_score_config_20240609.conf");
-        ScorerUtils.init("feeds_score_config_20240711.conf");
-        ScorerUtils.init("feeds_score_config_20240806.conf");
         ScorerUtils.init("feeds_score_config_20240807.conf");
-        ScorerUtils.init("feeds_score_config_20241107.conf");
-        ScorerUtils.init("feeds_score_config_20241119.conf");
-        ScorerUtils.init("feeds_score_config_xgb_20240828.conf");
         ScorerUtils.init("feeds_score_config_fm_xgb_20241209.conf");
         ScorerUtils.init("feeds_score_config_xgb_20241209.conf");
         ScorerUtils.init("feeds_score_config_xgb_rov_20241209.conf");
         ScorerUtils.init4Recall("feeds_recall_config_region_v1.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v1_vov.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v2.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v3.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v4.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v5_highvalue.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v6_rootrov.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_region_v7_vov_longterm.conf");
-        ScorerUtils.init4Recall("feeds_score_config_festival.conf");
         ScorerUtils.init4Recall("feeds_score_config_bless.conf");
         ScorerUtils.init4Recall("feeds_recall_config_tomson.conf");
-        ScorerUtils.init4Recall("feeds_recall_config_tomson_v2.conf");
-        ScorerUtils.init4Recall("feeds_score_config_share_width.conf");
-        ScorerUtils.init4Recall("feeds_score_config_share_deep.conf");
-        ScorerUtils.init4Recall("content_base_recall.conf");
         List<String> bucketFileList = Arrays.asList("20241209_rov_bucket.txt", "20241209_nor_bucket.txt");
         FeatureBucketUtils.init(bucketFileList);
     }

+ 0 - 7
recommend-server-service/src/main/resources/content_base_recall.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  content-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.ContentBaseRecallScore"
-    scorer-priority = 100
-    model-path = "alg_recall_file/content_base_recall.txt"
-  }
-}

+ 0 - 8
recommend-server-service/src/main/resources/feeds_recall_config_region_v1_vov.conf

@@ -1,8 +0,0 @@
-scorer-config = {
-    score1-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV1"
-        scorer-priority = 99
-        model-path = "alg_recall_file/01_recall_region1hour_vov.txt"
-    }
-
-}

+ 0 - 9
recommend-server-service/src/main/resources/feeds_recall_config_region_v2.conf

@@ -1,9 +0,0 @@
-scorer-config = {
-
-    score2-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV2"
-        scorer-priority = 98
-        model-path = "alg_recall_file/02_recall_noregion24hour.txt"
-    }
-
-}

+ 0 - 9
recommend-server-service/src/main/resources/feeds_recall_config_region_v3.conf

@@ -1,9 +0,0 @@
-scorer-config = {
-
-    score3-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV3"
-        scorer-priority = 97
-        model-path = "alg_recall_file/03_recall_region24hour.txt"
-    }
-
-}

+ 0 - 8
recommend-server-service/src/main/resources/feeds_recall_config_region_v4.conf

@@ -1,8 +0,0 @@
-scorer-config = {
-
-    score4-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV4"
-        scorer-priority = 96
-        model-path = "alg_recall_file/04_recall_noregion1h.txt"
-    }
-}

+ 0 - 9
recommend-server-service/src/main/resources/feeds_recall_config_region_v5_highvalue.conf

@@ -1,9 +0,0 @@
-scorer-config = {
-
-    score5-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV5HighValue"
-        scorer-priority = 98
-        model-path = "alg_recall_file/06_high_value_same_period.txt"
-    }
-
-}

+ 0 - 9
recommend-server-service/src/main/resources/feeds_recall_config_region_v6_rootrov.conf

@@ -1,9 +0,0 @@
-scorer-config = {
-
-    score6-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV5RootRov"
-        scorer-priority = 98
-        model-path = "alg_recall_file/07_root_rov.txt"
-    }
-
-}

+ 0 - 9
recommend-server-service/src/main/resources/feeds_recall_config_region_v7_vov_longterm.conf

@@ -1,9 +0,0 @@
-scorer-config = {
-
-    score7-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.RegionRecallScorerV7VovLongTerm"
-        scorer-priority = 98
-        model-path = "alg_recall_file/08_vov_longterm.txt"
-    }
-
-}

+ 0 - 8
recommend-server-service/src/main/resources/feeds_recall_config_tomson_v2.conf

@@ -1,8 +0,0 @@
-scorer-config = {
-    score1-config = {
-        scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.FlowPoolScorer"
-        scorer-priority = 99
-        model-path = "alg_recall_file/10_coldstart_tomson_v2.txt"
-    }
-
-}

+ 0 - 12
recommend-server-service/src/main/resources/feeds_score_config_20240228.conf

@@ -1,12 +0,0 @@
-scorer-config = {
-  str-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogShareLRScorer"
-    scorer-priority = 99
-    model-path = "zhangbo/model_tom.txt"
-  }
-  ros-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogShareLRScorer4Ros"
-    scorer-priority = 99
-    model-path = "zhangbo/model_jerry.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_20240711.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  rov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogRovFMScorer"
-    scorer-priority = 95
-    model-path = "zhangbo/model_nba8.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_20240806.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  rov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogRovFMScorer"
-    scorer-priority = 96
-    model-path = "zhangbo/model_aka8_new1.txt"
-  }
-}

+ 0 - 13
recommend-server-service/src/main/resources/feeds_score_config_20241107.conf

@@ -1,13 +0,0 @@
-scorer-config = {
-  rov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogRovFMScorer"
-    scorer-priority = 96
-    model-path = "zhangbo/model_aka8_new2.txt"
-  }
-
-  vov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VovH24WeightScorer"
-    scorer-priority = 95
-    model-path = "zhangbo/vovh24_hour_weight.json"
-  }
-}

+ 0 - 13
recommend-server-service/src/main/resources/feeds_score_config_20241119.conf

@@ -1,13 +0,0 @@
-scorer-config = {
-  rov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogRovFMScorer"
-    scorer-priority = 96
-    model-path = "zhangbo/model_aka8_new2.txt"
-  }
-
-  vov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VovH24WeightV2Scorer"
-    scorer-priority = 95
-    model-path = "zhangbo/vovh24_hour_weight_v2.json"
-  }
-}

+ 0 - 12
recommend-server-service/src/main/resources/feeds_score_config_baseline.conf

@@ -1,12 +0,0 @@
-scorer-config = {
-  str-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogShareLRScorer"
-    scorer-priority = 99
-    model-path = "video_str_model/model_str_mid.txt"
-  }
-  ros-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogShareLRScorer4Ros"
-    scorer-priority = 99
-    model-path = "video_str_model/model_ros_v2_20231220_change.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_festival.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  festival-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.FestivalRecallScore"
-    scorer-priority = 100
-    model-path = "alg_recall_file/05_festival.txt"
-  }
-}

+ 0 - 12
recommend-server-service/src/main/resources/feeds_score_config_new_baseline.conf

@@ -1,12 +0,0 @@
-scorer-config = {
-  str-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.implement.score.VlogShareLRScorer"
-    scorer-priority = 99
-    model-path = "video_str_model/model_str_mid.txt"
-  }
-  ros-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.implement.score.VlogShareLRScorer4Ros"
-    scorer-priority = 99
-    model-path = "video_str_model/model_ros_v2_20231220_change.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_share_deep.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  festival-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.ShareDeepRecallScore"
-    scorer-priority = 100
-    model-path = "alg_recall_file/videos_share_deep.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_share_width.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  festival-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score4recall.strategy.ShareWidthRecallScore"
-    scorer-priority = 100
-    model-path = "alg_recall_file/videos_share_width.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_thompson.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  flowpool-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.VlogThompsonScorer"
-    scorer-priority = 99
-    model-path = "video_thompson_model/model_video_thompson.txt"
-  }
-}

+ 0 - 7
recommend-server-service/src/main/resources/feeds_score_config_thompson_new.conf

@@ -1,7 +0,0 @@
-scorer-config = {
-  flowpool-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.implement.score.VlogThompsonScorer"
-    scorer-priority = 99
-    model-path = "video_thompson_model/model_video_thompson.txt"
-  }
-}

+ 0 - 287
recommend-server-service/src/main/resources/feeds_score_config_xgb_20240828.conf

@@ -1,287 +0,0 @@
-scorer-config = {
-  lr-rov-score-config = {
-    scorer-name = "com.tzld.piaoquan.recommend.server.service.score.XGBoostScorer"
-    scorer-priority = 99
-    model-path = "zhangbo/model_xgb_for_recsys.tar.gz"
-    param = {
-      localDir = "xgboost/recsys"
-      features = [
-        "b123_1h_STR",
-        "b123_1h_log(share)",
-        "b123_1h_ROV",
-        "b123_1h_log(return)",
-        "b123_1h_ROV*log(return)",
-        "b123_2h_STR",
-        "b123_2h_log(share)",
-        "b123_2h_ROV",
-        "b123_2h_log(return)",
-        "b123_2h_ROV*log(return)",
-        "b123_3h_STR",
-        "b123_3h_log(share)",
-        "b123_3h_ROV",
-        "b123_3h_log(return)",
-        "b123_3h_ROV*log(return)",
-        "b123_4h_STR",
-        "b123_4h_log(share)",
-        "b123_4h_ROV",
-        "b123_4h_log(return)",
-        "b123_4h_ROV*log(return)",
-        "b123_12h_STR",
-        "b123_12h_log(share)",
-        "b123_12h_ROV",
-        "b123_12h_log(return)",
-        "b123_12h_ROV*log(return)",
-        "b123_1d_STR",
-        "b123_1d_log(share)",
-        "b123_1d_ROV",
-        "b123_1d_log(return)",
-        "b123_1d_ROV*log(return)",
-        "b123_3d_STR",
-        "b123_3d_log(share)",
-        "b123_3d_ROV",
-        "b123_3d_log(return)",
-        "b123_3d_ROV*log(return)",
-        "b123_7d_STR",
-        "b123_7d_log(share)",
-        "b123_7d_ROV",
-        "b123_7d_log(return)",
-        "b123_7d_ROV*log(return)",
-        "b167_1h_STR",
-        "b167_1h_log(share)",
-        "b167_1h_ROV",
-        "b167_1h_log(return)",
-        "b167_1h_ROV*log(return)",
-        "b167_2h_STR",
-        "b167_2h_log(share)",
-        "b167_2h_ROV",
-        "b167_2h_log(return)",
-        "b167_2h_ROV*log(return)",
-        "b167_3h_STR",
-        "b167_3h_log(share)",
-        "b167_3h_ROV",
-        "b167_3h_log(return)",
-        "b167_3h_ROV*log(return)",
-        "b167_4h_STR",
-        "b167_4h_log(share)",
-        "b167_4h_ROV",
-        "b167_4h_log(return)",
-        "b167_4h_ROV*log(return)",
-        "b167_12h_STR",
-        "b167_12h_log(share)",
-        "b167_12h_ROV",
-        "b167_12h_log(return)",
-        "b167_12h_ROV*log(return)",
-        "b167_1d_STR",
-        "b167_1d_log(share)",
-        "b167_1d_ROV",
-        "b167_1d_log(return)",
-        "b167_1d_ROV*log(return)",
-        "b167_3d_STR",
-        "b167_3d_log(share)",
-        "b167_3d_ROV",
-        "b167_3d_log(return)",
-        "b167_3d_ROV*log(return)",
-        "b167_7d_STR",
-        "b167_7d_log(share)",
-        "b167_7d_ROV",
-        "b167_7d_log(return)",
-        "b167_7d_ROV*log(return)",
-        "b8910_1h_STR",
-        "b8910_1h_log(share)",
-        "b8910_1h_ROV",
-        "b8910_1h_log(return)",
-        "b8910_1h_ROV*log(return)",
-        "b8910_2h_STR",
-        "b8910_2h_log(share)",
-        "b8910_2h_ROV",
-        "b8910_2h_log(return)",
-        "b8910_2h_ROV*log(return)",
-        "b8910_3h_STR",
-        "b8910_3h_log(share)",
-        "b8910_3h_ROV",
-        "b8910_3h_log(return)",
-        "b8910_3h_ROV*log(return)",
-        "b8910_4h_STR",
-        "b8910_4h_log(share)",
-        "b8910_4h_ROV",
-        "b8910_4h_log(return)",
-        "b8910_4h_ROV*log(return)",
-        "b8910_12h_STR",
-        "b8910_12h_log(share)",
-        "b8910_12h_ROV",
-        "b8910_12h_log(return)",
-        "b8910_12h_ROV*log(return)",
-        "b8910_1d_STR",
-        "b8910_1d_log(share)",
-        "b8910_1d_ROV",
-        "b8910_1d_log(return)",
-        "b8910_1d_ROV*log(return)",
-        "b8910_3d_STR",
-        "b8910_3d_log(share)",
-        "b8910_3d_ROV",
-        "b8910_3d_log(return)",
-        "b8910_3d_ROV*log(return)",
-        "b8910_7d_STR",
-        "b8910_7d_log(share)",
-        "b8910_7d_ROV",
-        "b8910_7d_log(return)",
-        "b8910_7d_ROV*log(return)",
-        "b111213_1h_STR",
-        "b111213_1h_log(share)",
-        "b111213_1h_ROV",
-        "b111213_1h_log(return)",
-        "b111213_1h_ROV*log(return)",
-        "b111213_2h_STR",
-        "b111213_2h_log(share)",
-        "b111213_2h_ROV",
-        "b111213_2h_log(return)",
-        "b111213_2h_ROV*log(return)",
-        "b111213_3h_STR",
-        "b111213_3h_log(share)",
-        "b111213_3h_ROV",
-        "b111213_3h_log(return)",
-        "b111213_3h_ROV*log(return)",
-        "b111213_4h_STR",
-        "b111213_4h_log(share)",
-        "b111213_4h_ROV",
-        "b111213_4h_log(return)",
-        "b111213_4h_ROV*log(return)",
-        "b111213_12h_STR",
-        "b111213_12h_log(share)",
-        "b111213_12h_ROV",
-        "b111213_12h_log(return)",
-        "b111213_12h_ROV*log(return)",
-        "b111213_1d_STR",
-        "b111213_1d_log(share)",
-        "b111213_1d_ROV",
-        "b111213_1d_log(return)",
-        "b111213_1d_ROV*log(return)",
-        "b111213_3d_STR",
-        "b111213_3d_log(share)",
-        "b111213_3d_ROV",
-        "b111213_3d_log(return)",
-        "b111213_3d_ROV*log(return)",
-        "b111213_7d_STR",
-        "b111213_7d_log(share)",
-        "b111213_7d_ROV",
-        "b111213_7d_log(return)",
-        "b111213_7d_ROV*log(return)",
-        "b171819_1h_STR",
-        "b171819_1h_log(share)",
-        "b171819_1h_ROV",
-        "b171819_1h_log(return)",
-        "b171819_1h_ROV*log(return)",
-        "b171819_2h_STR",
-        "b171819_2h_log(share)",
-        "b171819_2h_ROV",
-        "b171819_2h_log(return)",
-        "b171819_2h_ROV*log(return)",
-        "b171819_3h_STR",
-        "b171819_3h_log(share)",
-        "b171819_3h_ROV",
-        "b171819_3h_log(return)",
-        "b171819_3h_ROV*log(return)",
-        "b171819_4h_STR",
-        "b171819_4h_log(share)",
-        "b171819_4h_ROV",
-        "b171819_4h_log(return)",
-        "b171819_4h_ROV*log(return)",
-        "b171819_12h_STR",
-        "b171819_12h_log(share)",
-        "b171819_12h_ROV",
-        "b171819_12h_log(return)",
-        "b171819_12h_ROV*log(return)",
-        "b171819_1d_STR",
-        "b171819_1d_log(share)",
-        "b171819_1d_ROV",
-        "b171819_1d_log(return)",
-        "b171819_1d_ROV*log(return)",
-        "b171819_3d_STR",
-        "b171819_3d_log(share)",
-        "b171819_3d_ROV",
-        "b171819_3d_log(return)",
-        "b171819_3d_ROV*log(return)",
-        "b171819_7d_STR",
-        "b171819_7d_log(share)",
-        "b171819_7d_ROV",
-        "b171819_7d_log(return)",
-        "b171819_7d_ROV*log(return)",
-        "total_time",
-        "bit_rate",
-        "playcnt_6h",
-        "playcnt_1d",
-        "playcnt_3d",
-        "playcnt_7d",
-        "share_pv_12h",
-        "share_pv_1d",
-        "share_pv_3d",
-        "share_pv_7d",
-        "return_uv_12h",
-        "return_uv_1d",
-        "return_uv_3d",
-        "return_uv_7d",
-        "c3_feature_tags_1d_matchnum",
-        "c3_feature_tags_1d_maxscore",
-        "c3_feature_tags_1d_avgscore",
-        "c3_feature_tags_3d_matchnum",
-        "c3_feature_tags_3d_maxscore",
-        "c3_feature_tags_3d_avgscore",
-        "c3_feature_tags_7d_matchnum",
-        "c3_feature_tags_7d_maxscore",
-        "c3_feature_tags_7d_avgscore",
-        "c4_feature_tags_1d_matchnum",
-        "c4_feature_tags_1d_maxscore",
-        "c4_feature_tags_1d_avgscore",
-        "c4_feature_tags_3d_matchnum",
-        "c4_feature_tags_3d_maxscore",
-        "c4_feature_tags_3d_avgscore",
-        "c4_feature_tags_7d_matchnum",
-        "c4_feature_tags_7d_maxscore",
-        "c4_feature_tags_7d_avgscore",
-        "c5_feature_tags_1d_matchnum",
-        "c5_feature_tags_1d_maxscore",
-        "c5_feature_tags_1d_avgscore",
-        "c5_feature_tags_3d_matchnum",
-        "c5_feature_tags_3d_maxscore",
-        "c5_feature_tags_3d_avgscore",
-        "c5_feature_tags_7d_matchnum",
-        "c5_feature_tags_7d_maxscore",
-        "c5_feature_tags_7d_avgscore",
-        "c6_feature_tags_1d_matchnum",
-        "c6_feature_tags_1d_maxscore",
-        "c6_feature_tags_1d_avgscore",
-        "c6_feature_tags_3d_matchnum",
-        "c6_feature_tags_3d_maxscore",
-        "c6_feature_tags_3d_avgscore",
-        "c6_feature_tags_7d_matchnum",
-        "c6_feature_tags_7d_maxscore",
-        "c6_feature_tags_7d_avgscore",
-        "c7_feature_tags_1d_matchnum",
-        "c7_feature_tags_1d_maxscore",
-        "c7_feature_tags_1d_avgscore",
-        "c7_feature_tags_3d_matchnum",
-        "c7_feature_tags_3d_maxscore",
-        "c7_feature_tags_3d_avgscore",
-        "c7_feature_tags_7d_matchnum",
-        "c7_feature_tags_7d_maxscore",
-        "c7_feature_tags_7d_avgscore",
-        "c8_feature_share_score",
-        "c8_feature_share_num",
-        "c8_feature_share_rank",
-        "c8_feature_return_score",
-        "c8_feature_return_num",
-        "c8_feature_return_rank",
-        "c9_feature_share_score",
-        "c9_feature_share_num",
-        "c9_feature_share_rank",
-        "c9_feature_return_score",
-        "c9_feature_return_num",
-        "c9_feature_return_rank",
-        "d1_exp",
-        "d1_return_n",
-        "d1_rovn"
-      ]
-    }
-  }
-
-}