|  | @@ -17,37 +17,37 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |      private ExtractFeature20250218() {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleB1(Map<String, Object> b1Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void handleB1(Map<String, String> b1Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("1h", "3h", "6h", "12h", "24h", "72h", "168h");
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("is_share", "share_cnt", "is_return_1", "return_1_uv", "str_one", "ros_one", "str", "ros", "str_plus", "ros_minus", "rovn");
 | 
	
		
			
				|  |  |          for (String time : times) {
 | 
	
		
			
				|  |  |              for (String index : indexList) {
 | 
	
		
			
				|  |  | -                double value = Double.parseDouble(b1Feature.getOrDefault(index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                double value = Double.parseDouble(b1Feature.getOrDefault(index + "_" + time, "0"));
 | 
	
		
			
				|  |  |                  featureMap.put("b1_" + index + "_" + time, value);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            double rovn = Double.parseDouble(b1Feature.getOrDefault("rovn_" + time, "0").toString());
 | 
	
		
			
				|  |  | -            double returnNUv = Double.parseDouble(b1Feature.getOrDefault("return_1_uv_" + time, "0").toString());
 | 
	
		
			
				|  |  | +            double rovn = Double.parseDouble(b1Feature.getOrDefault("rovn_" + time, "0"));
 | 
	
		
			
				|  |  | +            double returnNUv = Double.parseDouble(b1Feature.getOrDefault("return_1_uv_" + time, "0"));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              featureMap.put("b1_rovn*log(r)_" + time, rovn * ExtractorUtils.calLog(returnNUv));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleB2ToB11AndB13(Map<String, Map<String, Object>> videoFeature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void handleB2ToB11AndB13(Map<String, Map<String, String>> videoFeature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("1h", "3h", "6h", "12h", "24h", "72h", "168h");
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("is_share", "share_cnt", "is_return_1", "return_n_uv", "str_one", "ros_one", "str", "ros", "str_plus", "ros_minus", "rovn");
 | 
	
		
			
				|  |  | -        for (Map.Entry<String, Map<String, Object>> entry : videoFeature.entrySet()) {
 | 
	
		
			
				|  |  | +        for (Map.Entry<String, Map<String, String>> entry : videoFeature.entrySet()) {
 | 
	
		
			
				|  |  |              String key = entry.getKey();
 | 
	
		
			
				|  |  | -            Map<String, Object> feature = entry.getValue();
 | 
	
		
			
				|  |  | +            Map<String, String> feature = entry.getValue();
 | 
	
		
			
				|  |  |              for (String time : times) {
 | 
	
		
			
				|  |  |                  for (String index : indexList) {
 | 
	
		
			
				|  |  | -                    double value = Double.parseDouble(feature.getOrDefault(index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                    double value = Double.parseDouble(feature.getOrDefault(index + "_" + time, "0"));
 | 
	
		
			
				|  |  |                      featureMap.put(key + "_" + index + "_" + time, value);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                double rovn = Double.parseDouble(feature.getOrDefault("rovn_" + time, "0").toString());
 | 
	
		
			
				|  |  | -                double returnNUv = Double.parseDouble(feature.getOrDefault("return_n_uv_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                double rovn = Double.parseDouble(feature.getOrDefault("rovn_" + time, "0"));
 | 
	
		
			
				|  |  | +                double returnNUv = Double.parseDouble(feature.getOrDefault("return_n_uv_" + time, "0"));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  featureMap.put(key + "_rovn*log(r)_" + time, rovn * ExtractorUtils.calLog(returnNUv));
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -55,28 +55,28 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleB12(Map<String, Object> b12Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void handleB12(Map<String, String> b12Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("7d", "14d", "30d", "60d");
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("is_share", "share_cnt", "is_return_1", "return_n_uv", "str_one", "ros_one", "str", "ros", "str_plus", "ros_minus", "rovn");
 | 
	
		
			
				|  |  |          for (String time : times) {
 | 
	
		
			
				|  |  |              for (String index : indexList) {
 | 
	
		
			
				|  |  | -                double value = Double.parseDouble(b12Feature.getOrDefault(index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                double value = Double.parseDouble(b12Feature.getOrDefault(index + "_" + time, "0"));
 | 
	
		
			
				|  |  |                  featureMap.put("b12_" + index + "_" + time, value);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            double rovn = Double.parseDouble(b12Feature.getOrDefault("rovn_" + time, "0").toString());
 | 
	
		
			
				|  |  | -            double returnNUv = Double.parseDouble(b12Feature.getOrDefault("return_n_uv_" + time, "0").toString());
 | 
	
		
			
				|  |  | +            double rovn = Double.parseDouble(b12Feature.getOrDefault("rovn_" + time, "0"));
 | 
	
		
			
				|  |  | +            double returnNUv = Double.parseDouble(b12Feature.getOrDefault("return_n_uv_" + time, "0"));
 | 
	
		
			
				|  |  |              featureMap.put("b12_rovn*log(r)_" + time, rovn * ExtractorUtils.calLog(returnNUv));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleVideoBasicFeature(Map<String, Object> videoFeature, long ts, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | -        Double totalTime = Double.parseDouble(videoFeature.getOrDefault("total_time", "0").toString());
 | 
	
		
			
				|  |  | -        Double width = Double.parseDouble(videoFeature.getOrDefault("width", "0d").toString());
 | 
	
		
			
				|  |  | -        Double height = Double.parseDouble(videoFeature.getOrDefault("height", "0d").toString());
 | 
	
		
			
				|  |  | -        Double size = Double.parseDouble(videoFeature.getOrDefault("size", "0d").toString());
 | 
	
		
			
				|  |  | -        Double bit_rate = Double.parseDouble(videoFeature.getOrDefault("bit_rate", "0d").toString());
 | 
	
		
			
				|  |  | -        String festiveLabel1 = videoFeature.getOrDefault("festive_label1", "").toString();
 | 
	
		
			
				|  |  | -        String festiveLabel2 = videoFeature.getOrDefault("festive_label2", "").toString();
 | 
	
		
			
				|  |  | +    public static void handleVideoBasicFeature(Map<String, String> videoFeature, long ts, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  | +        Double totalTime = Double.parseDouble(videoFeature.getOrDefault("total_time", "0"));
 | 
	
		
			
				|  |  | +        Double width = Double.parseDouble(videoFeature.getOrDefault("width", "0d"));
 | 
	
		
			
				|  |  | +        Double height = Double.parseDouble(videoFeature.getOrDefault("height", "0d"));
 | 
	
		
			
				|  |  | +        Double size = Double.parseDouble(videoFeature.getOrDefault("size", "0d"));
 | 
	
		
			
				|  |  | +        Double bit_rate = Double.parseDouble(videoFeature.getOrDefault("bit_rate", "0d"));
 | 
	
		
			
				|  |  | +        String festiveLabel1 = videoFeature.getOrDefault("festive_label1", "");
 | 
	
		
			
				|  |  | +        String festiveLabel2 = videoFeature.getOrDefault("festive_label2", "");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          featureMap.put("total_time", totalTime);
 | 
	
	
		
			
				|  | @@ -85,78 +85,78 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |          featureMap.put("size", size);
 | 
	
		
			
				|  |  |          featureMap.put("bit_rate", bit_rate);
 | 
	
		
			
				|  |  |          featureMap.put("width/height", ExtractorUtils.divisionDouble(width, height));
 | 
	
		
			
				|  |  | -        featureMap.put("is_festive", 0);
 | 
	
		
			
				|  |  | -        featureMap.put("is_greeting", 0);
 | 
	
		
			
				|  |  | +        featureMap.put("is_festive", 0d);
 | 
	
		
			
				|  |  | +        featureMap.put("is_greeting", 0d);
 | 
	
		
			
				|  |  |          if (StringUtils.equals(festiveLabel1, "节假日")) {
 | 
	
		
			
				|  |  | -            featureMap.put("is_festive", 1);
 | 
	
		
			
				|  |  | +            featureMap.put("is_festive", 1d);
 | 
	
		
			
				|  |  |          } else if (StringUtils.equals(festiveLabel1, "问候语")) {
 | 
	
		
			
				|  |  | -            featureMap.put("is_greeting", 1);
 | 
	
		
			
				|  |  | +            featureMap.put("is_greeting", 1d);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        featureMap.put("hour", ExtractorUtils.getHourByTimestamp(ts));
 | 
	
		
			
				|  |  | -        featureMap.put("day_of_week", ExtractorUtils.getDayOfWeekByTimestamp(ts));
 | 
	
		
			
				|  |  | +        featureMap.put("hour", Double.parseDouble(String.valueOf(ExtractorUtils.getHourByTimestamp(ts))));
 | 
	
		
			
				|  |  | +        featureMap.put("day_of_week", Double.parseDouble(String.valueOf(ExtractorUtils.getDayOfWeekByTimestamp(ts))));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        long createTs = Long.parseLong(videoFeature.getOrDefault("gmt_create_timestamp", "0").toString()) / 1000;
 | 
	
		
			
				|  |  | -        featureMap.put("create_ts_diff", ExtractorUtils.getDaysBetween(createTs, ts));
 | 
	
		
			
				|  |  | +        long createTs = Long.parseLong(videoFeature.getOrDefault("gmt_create_timestamp", "0")) / 1000;
 | 
	
		
			
				|  |  | +        featureMap.put("create_ts_diff", Double.parseDouble(String.valueOf(ExtractorUtils.getDaysBetween(createTs, ts))));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          String date = LocalDateTime.ofInstant(Instant.ofEpochSecond(ts), ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
 | 
	
		
			
				|  |  |          String festiveByDate = FestiveUtil.getFestiveByDate(date);
 | 
	
		
			
				|  |  | -        featureMap.put("today_is_fes", 0);
 | 
	
		
			
				|  |  | -        featureMap.put("video_fes_eq", 0);
 | 
	
		
			
				|  |  | +        featureMap.put("today_is_fes", 0d);
 | 
	
		
			
				|  |  | +        featureMap.put("video_fes_eq", 0d);
 | 
	
		
			
				|  |  |          if (StringUtils.isNotBlank(festiveByDate)) {
 | 
	
		
			
				|  |  | -            featureMap.put("today_is_fes", 1);
 | 
	
		
			
				|  |  | +            featureMap.put("today_is_fes", 1d);
 | 
	
		
			
				|  |  |              if (StringUtils.equals(festiveByDate, festiveLabel2)) {
 | 
	
		
			
				|  |  | -                featureMap.put("video_today_fes_eq", 1);
 | 
	
		
			
				|  |  | +                featureMap.put("video_today_fes_eq", 1d);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleC1(Map<String, Object> c1Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void handleC1(Map<String, String> c1Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("12h", "24h", "72h", "168h");
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("is_share", "share_cnt", "is_return_1", "return_1_uv", "click", "str_one", "ros_one", "str", "ros", "str_plus", "ros_minus", "rovn");
 | 
	
		
			
				|  |  |          for (String time : times) {
 | 
	
		
			
				|  |  |              for (String index : indexList) {
 | 
	
		
			
				|  |  | -                double value = Double.parseDouble(c1Feature.getOrDefault(index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                double value = Double.parseDouble(c1Feature.getOrDefault(index + "_" + time, "0"));
 | 
	
		
			
				|  |  |                  featureMap.put("c1_" + index + "_" + time, value);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            double rovn = Double.parseDouble(c1Feature.getOrDefault("rovn_" + time, "0").toString());
 | 
	
		
			
				|  |  | -            double returnNUv = Double.parseDouble(c1Feature.getOrDefault("return_1_uv_" + time, "0").toString());
 | 
	
		
			
				|  |  | +            double rovn = Double.parseDouble(c1Feature.getOrDefault("rovn_" + time, "0"));
 | 
	
		
			
				|  |  | +            double returnNUv = Double.parseDouble(c1Feature.getOrDefault("return_1_uv_" + time, "0"));
 | 
	
		
			
				|  |  |              featureMap.put("c1_rovn*log(r)_" + time, rovn * ExtractorUtils.calLog(returnNUv));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleC2ToC3(Map<String, Object> c2Feature, Map<String, Object> c3Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | -        Map<String, Map<String, Object>> featureMaps = new HashMap<>();
 | 
	
		
			
				|  |  | +    public static void handleC2ToC3(Map<String, String> c2Feature, Map<String, String> c3Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  | +        Map<String, Map<String, String>> featureMaps = new HashMap<>();
 | 
	
		
			
				|  |  |          featureMaps.put("c2", c2Feature);
 | 
	
		
			
				|  |  |          featureMaps.put("c3", c3Feature);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("12h", "24h", "72h", "168h");
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("is_share", "share_cnt", "is_return_1", "return_n_uv", "click");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        for (Map.Entry<String, Map<String, Object>> entry : featureMaps.entrySet()) {
 | 
	
		
			
				|  |  | +        for (Map.Entry<String, Map<String, String>> entry : featureMaps.entrySet()) {
 | 
	
		
			
				|  |  |              String key = entry.getKey();
 | 
	
		
			
				|  |  | -            Map<String, Object> feature = entry.getValue();
 | 
	
		
			
				|  |  | +            Map<String, String> feature = entry.getValue();
 | 
	
		
			
				|  |  |              for (String time : times) {
 | 
	
		
			
				|  |  |                  for (String index : indexList) {
 | 
	
		
			
				|  |  | -                    double value = Double.parseDouble(feature.getOrDefault(index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                    double value = Double.parseDouble(feature.getOrDefault(index + "_" + time, "0"));
 | 
	
		
			
				|  |  |                      featureMap.put(key + "_" + index + "_" + time, value);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleC4(Map<String, Object> c4Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void handleC4(Map<String, String> c4Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("24h", "72h", "168h");
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("str_one", "ros_one", "str", "ros", "str_plus", "ros_minus", "rovn");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          for (String time : times) {
 | 
	
		
			
				|  |  |              for (String index : indexList) {
 | 
	
		
			
				|  |  | -                double value = Double.parseDouble(c4Feature.getOrDefault("avg_" + index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                double value = Double.parseDouble(c4Feature.getOrDefault("avg_" + index + "_" + time, "0"));
 | 
	
		
			
				|  |  |                  featureMap.put("c4_avg_" + index + "_" + time, value);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                double max = Double.parseDouble(c4Feature.getOrDefault("max_" + index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | -                double min = Double.parseDouble(c4Feature.getOrDefault("min_" + index + "_" + time, "0").toString());
 | 
	
		
			
				|  |  | +                double max = Double.parseDouble(c4Feature.getOrDefault("max_" + index + "_" + time, "0"));
 | 
	
		
			
				|  |  | +                double min = Double.parseDouble(c4Feature.getOrDefault("min_" + index + "_" + time, "0"));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  featureMap.put("c4_diff_" + index + "_" + time, max - min);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -164,19 +164,19 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleC5ToC6(Map<String, Object> c5Feature, Map<String, Object> c6Feature, Map<String, Object> videoMap, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | -        Map<String, Map<String, Object>> featureMaps = new HashMap<>();
 | 
	
		
			
				|  |  | +    public static void handleC5ToC6(Map<String, String> c5Feature, Map<String, String> c6Feature, Map<String, String> videoMap, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  | +        Map<String, Map<String, String>> featureMaps = new HashMap<>();
 | 
	
		
			
				|  |  |          featureMaps.put("c5", c5Feature);
 | 
	
		
			
				|  |  |          featureMaps.put("c6", c6Feature);
 | 
	
		
			
				|  |  |          List<String> times = Arrays.asList("tags_1d", "tags_3d", "tags_7d");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        String title = videoMap.getOrDefault("title", "").toString();
 | 
	
		
			
				|  |  | +        String title = videoMap.getOrDefault("title", "");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        for (Map.Entry<String, Map<String, Object>> entry : featureMaps.entrySet()) {
 | 
	
		
			
				|  |  | +        for (Map.Entry<String, Map<String, String>> entry : featureMaps.entrySet()) {
 | 
	
		
			
				|  |  |              String key = entry.getKey();
 | 
	
		
			
				|  |  | -            Map<String, Object> feature = entry.getValue();
 | 
	
		
			
				|  |  | +            Map<String, String> feature = entry.getValue();
 | 
	
		
			
				|  |  |              for (String time : times) {
 | 
	
		
			
				|  |  | -                String tags = feature.getOrDefault(time, "").toString();
 | 
	
		
			
				|  |  | +                String tags = feature.getOrDefault(time, "");
 | 
	
		
			
				|  |  |                  Double[] scores = ExtractorUtils.funcC34567ForTagsNew(tags, title);
 | 
	
		
			
				|  |  |                  featureMap.put(key + "_matchnum" + "_" + time, scores[0]);
 | 
	
		
			
				|  |  |                  featureMap.put(key + "_maxscore" + "_" + time, scores[1]);
 | 
	
	
		
			
				|  | @@ -186,20 +186,20 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static Map<String, Map<String, String[]>> handleC7ToC8(Map<String, Object> c7Feature, Map<String, Object> c8Feature) {
 | 
	
		
			
				|  |  | +    public static Map<String, Map<String, String[]>> handleC7ToC8(Map<String, String> c7Feature, Map<String, String> c8Feature) {
 | 
	
		
			
				|  |  |          Map<String, Map<String, String[]>> resultMap = new HashMap<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        Map<String, Map<String, Object>> featureMaps = new HashMap<>();
 | 
	
		
			
				|  |  | +        Map<String, Map<String, String>> featureMaps = new HashMap<>();
 | 
	
		
			
				|  |  |          featureMaps.put("c7", c7Feature);
 | 
	
		
			
				|  |  |          featureMaps.put("c8", c8Feature);
 | 
	
		
			
				|  |  |          List<String> indexList = Arrays.asList("share", "return");
 | 
	
		
			
				|  |  | -        for (Map.Entry<String, Map<String, Object>> entry : featureMaps.entrySet()) {
 | 
	
		
			
				|  |  | +        for (Map.Entry<String, Map<String, String>> entry : featureMaps.entrySet()) {
 | 
	
		
			
				|  |  |              String key = entry.getKey();
 | 
	
		
			
				|  |  | -            Map<String, Object> feature = entry.getValue();
 | 
	
		
			
				|  |  | +            Map<String, String> feature = entry.getValue();
 | 
	
		
			
				|  |  |              for (String index : indexList) {
 | 
	
		
			
				|  |  |                  if (feature.containsKey(index)) {
 | 
	
		
			
				|  |  |                      Map<String, String[]> cfMap = new HashMap<>();
 | 
	
		
			
				|  |  | -                    String[] entries = feature.get(index).toString().split(",");
 | 
	
		
			
				|  |  | +                    String[] entries = feature.get(index).split(",");
 | 
	
		
			
				|  |  |                      for (String e : entries) {
 | 
	
		
			
				|  |  |                          String[] rList = e.split(":");
 | 
	
		
			
				|  |  |                          if (rList.length >= 4) {
 | 
	
	
		
			
				|  | @@ -219,7 +219,7 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |          return resultMap;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void useC7ToC8(Map<String, Map<String, String[]>> map, String vid, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void useC7ToC8(Map<String, Map<String, String[]>> map, String vid, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          if (StringUtils.isBlank(vid)) {
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -237,44 +237,44 @@ public class ExtractFeature20250218 {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleD3(Map<String, Object> d3Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | +    public static void handleD3(Map<String, String> d3Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  |          for (String index : Arrays.asList("exp", "return_n", "rovn")) {
 | 
	
		
			
				|  |  | -            double value = Double.parseDouble(d3Feature.getOrDefault(index, "0").toString());
 | 
	
		
			
				|  |  | +            double value = Double.parseDouble(d3Feature.getOrDefault(index, "0"));
 | 
	
		
			
				|  |  |              featureMap.put("d3_" + index, value);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleD1(Map<String, Object> d4Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | -        double rosCfScores = Double.parseDouble(d4Feature.getOrDefault("ros_cf_score", "0").toString());
 | 
	
		
			
				|  |  | +    public static void handleD1(Map<String, String> d1Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  | +        double rosCfScores = Double.parseDouble(d1Feature.getOrDefault("ros_cf_score", "0"));
 | 
	
		
			
				|  |  |          featureMap.put("d1_ros_cf_score", rosCfScores);
 | 
	
		
			
				|  |  | -        double rovCfScores = Double.parseDouble(d4Feature.getOrDefault("rov_cf_score", "0").toString());
 | 
	
		
			
				|  |  | +        double rovCfScores = Double.parseDouble(d1Feature.getOrDefault("rov_cf_score", "0"));
 | 
	
		
			
				|  |  |          featureMap.put("d1_rov_cf_score", rovCfScores);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        double rosCfRank = Double.parseDouble(d4Feature.getOrDefault("ros_cf_rank", "0").toString());
 | 
	
		
			
				|  |  | +        double rosCfRank = Double.parseDouble(d1Feature.getOrDefault("ros_cf_rank", "0"));
 | 
	
		
			
				|  |  |          featureMap.put("d1_ros_cf_rank", ExtractorUtils.reciprocal(rosCfRank));
 | 
	
		
			
				|  |  | -        double rovCfRank = Double.parseDouble(d4Feature.getOrDefault("rov_cf_rank", "0").toString());
 | 
	
		
			
				|  |  | +        double rovCfRank = Double.parseDouble(d1Feature.getOrDefault("rov_cf_rank", "0"));
 | 
	
		
			
				|  |  |          featureMap.put("d1_rov_cf_rank", ExtractorUtils.reciprocal(rovCfRank));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleD2(Map<String, Object> d5Feature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | -        double score = Double.parseDouble(d5Feature.getOrDefault("score", "0").toString());
 | 
	
		
			
				|  |  | +    public static void handleD2(Map<String, String> d5Feature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  | +        double score = Double.parseDouble(d5Feature.getOrDefault("score", "0"));
 | 
	
		
			
				|  |  |          featureMap.put("d2_score", score);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        double rank = Double.parseDouble(d5Feature.getOrDefault("rank", "0").toString());
 | 
	
		
			
				|  |  | +        double rank = Double.parseDouble(d5Feature.getOrDefault("rank", "0"));
 | 
	
		
			
				|  |  |          featureMap.put("d2_rank", ExtractorUtils.reciprocal(rank));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void handleVideoSimilarity(Map<String, Object> videoFeature, Map<String, Object> headVideoFeature, Map<String, Object> featureMap) {
 | 
	
		
			
				|  |  | -        String headVideoTitle = headVideoFeature.getOrDefault("title", "").toString();
 | 
	
		
			
				|  |  | -        String headVideoMergeCate2 = headVideoFeature.getOrDefault("merge_second_level_cate", "").toString();
 | 
	
		
			
				|  |  | -        String headVideoMergeCate1 = headVideoFeature.getOrDefault("merge_first_level_cate", "").toString();
 | 
	
		
			
				|  |  | -        String headVideoFestiveLabel2 = headVideoFeature.getOrDefault("festive_label2", "").toString();
 | 
	
		
			
				|  |  | +    public static void handleVideoSimilarity(Map<String, String> videoFeature, Map<String, String> headVideoFeature, Map<String, Double> featureMap) {
 | 
	
		
			
				|  |  | +        String headVideoTitle = headVideoFeature.getOrDefault("title", "");
 | 
	
		
			
				|  |  | +        String headVideoMergeCate2 = headVideoFeature.getOrDefault("merge_second_level_cate", "");
 | 
	
		
			
				|  |  | +        String headVideoMergeCate1 = headVideoFeature.getOrDefault("merge_first_level_cate", "");
 | 
	
		
			
				|  |  | +        String headVideoFestiveLabel2 = headVideoFeature.getOrDefault("festive_label2", "");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        String videoTitle = videoFeature.getOrDefault("title", "").toString();
 | 
	
		
			
				|  |  | -        String videoMergeCate2 = videoFeature.getOrDefault("merge_second_level_cate", "").toString();
 | 
	
		
			
				|  |  | -        String videoMergeCate1 = videoFeature.getOrDefault("merge_first_level_cate", "").toString();
 | 
	
		
			
				|  |  | -        String videoFestiveLabel2 = videoFeature.getOrDefault("festive_label2", "").toString();
 | 
	
		
			
				|  |  | +        String videoTitle = videoFeature.getOrDefault("title", "");
 | 
	
		
			
				|  |  | +        String videoMergeCate2 = videoFeature.getOrDefault("merge_second_level_cate", "");
 | 
	
		
			
				|  |  | +        String videoMergeCate1 = videoFeature.getOrDefault("merge_first_level_cate", "");
 | 
	
		
			
				|  |  | +        String videoFestiveLabel2 = videoFeature.getOrDefault("festive_label2", "");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          double titleSimilarity = ExtractFeature20250218.calcTxtSimilarity(headVideoTitle, videoTitle);
 | 
	
		
			
				|  |  |          double headTitleAndMerge1Similarity = ExtractFeature20250218.calcTxtSimilarity(headVideoTitle, videoMergeCate1);
 |