Browse Source

扩展特征

jch 1 month ago
parent
commit
33ec4386e2

+ 2 - 0
src/main/scala/com/aliyun/odps/spark/examples/myUtils/ConvertV2.java

@@ -94,6 +94,8 @@ public class ConvertV2 {
         map.put("scene_type_vid_cf_feature_20250212", ConvertUtils.getRecordCol(record, "d1_feature"));
         map.put("vid_click_cf_feature_20250212", ConvertUtils.getRecordCol(record, "d2_feature"));
         map.put("alg_recsys_feature_cf_i2i_v2", ConvertUtils.getRecordCol(record, "d3_feature"));
+        map.put("alg_recsys_feature_video_recommend_channel_layer", ConvertUtils.getRecordCol(record, "b14_feature"));
+        map.put("alg_recsys_feature_video_recommend_channel_layer_head", ConvertUtils.getRecordCol(record, "b15_feature"));
 
         Map<String, Map<String, Map<String, String>>> allMap = new HashMap<>();
         String vid = record.get("vid");

+ 4 - 0
src/main/scala/com/aliyun/odps/spark/examples/myUtils/FeatureTransformV2.java

@@ -25,6 +25,8 @@ public class FeatureTransformV2 {
     private static final List<String> b10Periods = Arrays.asList("1h", "12h");
     private static final List<String> b11Periods = Arrays.asList("1h", "12h");
     private static final List<String> b13Periods = Arrays.asList("1h", "3h", "24h", "72h");
+    private static final List<String> b14Periods = Arrays.asList("1h", "2h", "3h", "6h", "12h");
+    private static final List<String> b15Periods = Arrays.asList("1h", "2h", "3h", "6h", "12h");
     private static final List<String> videoCateAttrs = Arrays.asList(FeatureUtils.cate1Attr, FeatureUtils.cate2Attr, FeatureUtils.festive1Attr,
             FeatureUtils.channelAttr, FeatureUtils.sourceAttr, FeatureUtils.uidAttr, FeatureUtils.mergeCate1Attr, FeatureUtils.mergeCate2Attr);
     private static final List<String> videoSimAttrs = Arrays.asList("title", "cate2", "cate2_list", "keywords");
@@ -196,6 +198,8 @@ public class FeatureTransformV2 {
         oneTypeStatFeature("b10", "return_n_uv", b10Periods, videoOriginInfo.getOrDefault(vid, new HashMap<>()).get("alg_channel_recommend_exp_feature_20250212"), featMap);
         oneTypeStatFeature("b11", "return_n_uv", b11Periods, videoOriginInfo.getOrDefault(vid, new HashMap<>()).get("alg_festive_recommend_exp_feature_20250212"), featMap);
         oneTypeStatFeature("b13", "return_n_uv", b13Periods, videoOriginInfo.getOrDefault(vid, new HashMap<>()).get("alg_video_unionid_recommend_exp_feature_20250212"), featMap);
+        oneTypeStatFeature("b14", b14Periods, videoOriginInfo.getOrDefault(vid, new HashMap<>()).get("alg_recsys_feature_video_recommend_channel_layer"), featMap);
+        oneTypeStatFeature("b15", b15Periods, videoOriginInfo.getOrDefault(vid, new HashMap<>()).get("alg_recsys_feature_video_recommend_channel_layer_head"), featMap);
 
         // head video cf
         headVideoCFD1Feature("d1", videoOriginInfo.getOrDefault(vid, new HashMap<>()).get("scene_type_vid_cf_feature_20250212"), featMap);