|
@@ -472,6 +472,32 @@ object makedata_ad_33_bucketDataFromOriginToHive_20250522 {
|
|
|
featureMap.put("user_vid_share_cate2_14d", g2.getString("cate2_14d"))
|
|
|
}
|
|
|
|
|
|
+ val h1: JSONObject = if (!mateFeature.containsKey("alg_mid_feature_adver_action")) new JSONObject() else
|
|
|
+ mateFeature.getJSONObject("alg_mid_feature_adver_action")
|
|
|
+ val h2: JSONObject = if (!mateFeature.containsKey("alg_mid_feature_sku_action")) new JSONObject() else
|
|
|
+ mateFeature.getJSONObject("alg_mid_feature_sku_action")
|
|
|
+
|
|
|
+ // 定义时间维度和对应的前缀
|
|
|
+ val timeDimensions = Seq("3d", "7d", "30d")
|
|
|
+ for (dimension <- timeDimensions) {
|
|
|
+ if (h1.containsKey(dimension) && h1.getString(dimension).nonEmpty) {
|
|
|
+ val action = h1.getString(dimension).split(",")
|
|
|
+ if (action.length >= 3) {
|
|
|
+ featureMap.put(s"user_adverid_view_${dimension}", action(0))
|
|
|
+ featureMap.put(s"user_adverid_click_${dimension}", action(1))
|
|
|
+ featureMap.put(s"user_adverid_conver_${dimension}", action(2))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (h2.containsKey(dimension) && h2.getString(dimension).nonEmpty) {
|
|
|
+ val action = h2.getString(dimension).split(",")
|
|
|
+ if (action.length >= 3) {
|
|
|
+ featureMap.put(s"user_skuid_view_${dimension}", action(0))
|
|
|
+ featureMap.put(s"user_skuid_click_${dimension}", action(1))
|
|
|
+ featureMap.put(s"user_skuid_conver_${dimension}", action(2))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
val d1: JSONObject = if (!mateFeature.containsKey("alg_cid_feature_vid_cf")) new JSONObject() else
|
|
|
mateFeature.getJSONObject("alg_cid_feature_vid_cf")
|