Jelajahi Sumber

feature domain

丁云鹏 1 tahun lalu
induk
melakukan
58a1cd7503

+ 157 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/ItemFeature.java

@@ -0,0 +1,157 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@Getter
+@NoArgsConstructor
+public class ItemFeature {
+    private String videoId;
+
+    private String upId;
+
+    private String tags;
+
+    /**
+     * 有多个标题,暂时不会用到所以先不处理
+     *
+     * @since 2023-12-05
+     */
+    private String title;
+
+    private String titleLength;
+
+    private String playLength;
+
+    private String totalTime;
+
+    private String daysSinceUpload;
+
+
+    // 当天统计量信息
+    private UserActionFeature day1_cnt_features;
+    // 3天内统计量
+    private UserActionFeature day3_cnt_features;
+    // 7天内统计量
+    private UserActionFeature day7_cnt_features;
+    // 3个月统计量
+    private UserActionFeature month3_cnt_features;
+
+
+    public void setVideoId(String key) {
+        if (key == null) {
+            this.videoId = "0";
+        } else {
+            this.videoId = key;
+        }
+    }
+
+    public void setUpId(String key) {
+        if (key == null) {
+            this.upId = "0";
+        } else {
+            this.upId = key;
+        }
+    }
+
+    public void setTags(String key) {
+        if (key == null) {
+            this.tags = "0";
+        } else {
+            this.tags = key;
+        }
+    }
+
+    public void setTitle(String key) {
+        if (key == null) {
+            this.title = "0";
+        } else {
+            this.title = key;
+        }
+    }
+
+
+    public void setDay1_cnt_features(UserActionFeature feature) {
+        this.day1_cnt_features = feature;
+    }
+
+
+    public void setDay3_cnt_features(UserActionFeature feature) {
+        this.day3_cnt_features = feature;
+
+    }
+
+    public void setDay7_cnt_features(UserActionFeature feature) {
+        this.day7_cnt_features = feature;
+
+    }
+
+    public void setMonth3_cnt_features(UserActionFeature feature) {
+        this.month3_cnt_features = feature;
+
+    }
+
+    public void setTitleLength(String key) {
+        if (key == null) {
+            this.titleLength = "0";
+        } else {
+            this.titleLength = key;
+        }
+    }
+
+
+    public void setDaysSinceUpload(String key) {
+        if (key == null) {
+            this.daysSinceUpload = "0";
+        } else {
+            this.daysSinceUpload = key;
+        }
+    }
+
+    public void setPlayLength(String key) {
+        if (key == null) {
+            this.playLength = "0";
+        } else {
+            this.playLength = key;
+        }
+    }
+
+    public void setTotalTime(String key) {
+        if (key == null) {
+            this.totalTime = "0";
+        } else {
+            this.totalTime = key;
+        }
+    }
+
+    public String getKey() {
+        return this.videoId;
+    }
+
+    public String getValue() {
+        Gson gson = new GsonBuilder().serializeSpecialFloatingPointValues().create();
+        return gson.toJson(this);
+    }
+
+    public static ItemFeature defaultInstance(String videoId) {
+        ItemFeature feature = new ItemFeature();
+        feature.setDay1_cnt_features(null);
+        feature.setDay3_cnt_features(null);
+        feature.setDay7_cnt_features(null);
+        feature.setDaysSinceUpload(null);
+        feature.setMonth3_cnt_features(null);
+        feature.setPlayLength(null);
+        feature.setTags(null);
+        feature.setTitle(null);
+        feature.setTitleLength(null);
+        feature.setTotalTime(null);
+        feature.setUpId(null);
+        feature.setVideoId(videoId);
+
+        return feature;
+    }
+
+
+}

+ 107 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/RequestContext.java

@@ -0,0 +1,107 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+
+
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@Getter
+@NoArgsConstructor
+public class RequestContext {
+
+    private String request_id;
+    // 机型等信息
+    private String apptype;
+    private String machineinfo_brand;
+    private String machineinfo_model;
+    private String machineinfo_platform;
+    private String machineinfo_sdkversion;
+    private String machineinfo_system;
+    private String machineinfo_wechatversion;
+
+    // 时间等信息
+    private String day;
+    private String week;
+    private String hour;
+    private String region;
+    private String city;
+
+    public void setApptype(String apptype) {
+        this.apptype = apptype;
+        if (apptype == null)
+            this.apptype = "-1";
+    }
+
+    public void setMachineinfo_brand(String machineinfo_brand) {
+        this.machineinfo_brand = machineinfo_brand;
+        if (machineinfo_brand == null)
+            this.machineinfo_brand = "-1";
+    }
+
+    public void setMachineinfo_model(String machineinfo_model) {
+        this.machineinfo_model = machineinfo_model;
+        if (machineinfo_model == null)
+            this.machineinfo_model = "-1";
+    }
+
+
+    public void setMachineinfo_wechatversion(String machineinfo_wechatversion) {
+        this.machineinfo_wechatversion = machineinfo_wechatversion;
+        if (machineinfo_wechatversion == null)
+            this.machineinfo_wechatversion = "-1";
+    }
+
+
+    public void setMachineinfo_sdkversion(String machineinfo_sdkversion) {
+        this.machineinfo_sdkversion = machineinfo_sdkversion;
+        if (machineinfo_sdkversion == null)
+            this.machineinfo_sdkversion = "-1";
+    }
+
+    public void setMachineinfo_platform(String machineinfo_platform) {
+        this.machineinfo_platform = machineinfo_platform;
+        if (machineinfo_platform == null)
+            this.machineinfo_platform = "-1";
+    }
+
+    public void setMachineinfo_system(String machineinfo_system) {
+        this.machineinfo_system = machineinfo_system;
+        if (machineinfo_system == null)
+            this.machineinfo_system = "-1";
+    }
+
+
+    public void setHour(String hour) {
+        this.hour = hour;
+        if (hour == null)
+            this.hour = "-1";
+    }
+
+
+    public void setDay(String day) {
+        this.day = day;
+        if (day == null)
+            this.day = "-1";
+    }
+
+    public void setWeek(String week) {
+        this.week = week;
+        if (week == null)
+            this.week = "-1";
+    }
+
+
+    public void setRegion(String region) {
+        this.region = region;
+        if (region == null)
+            this.region = "-1";
+    }
+
+
+    public void setCity(String city) {
+        this.city = city;
+        if (city == null)
+            this.city = "-1";
+    }
+
+
+}

+ 44 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/RequestContextBytesFeature.java

@@ -0,0 +1,44 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+
+
+import lombok.Data;
+
+@Data
+public class RequestContextBytesFeature {
+    private final byte[] apptype;
+    private final byte[]  machineinfo_brand;
+    private final byte[]  machineinfo_model;
+    private final byte[]  machineinfo_platform;
+    private final byte[]  machineinfo_sdkversion;
+    private final byte[]  machineinfo_system;
+    private final byte[]  machineinfo_wechatversion;
+
+    // 时间等信息
+    private final byte[]  day;
+    private final byte[]  week;
+    private final byte[]  hour;
+    private final byte[]  region;
+    private final byte[]  city;
+
+
+    public RequestContextBytesFeature(RequestContext requestContext){
+        apptype = requestContext.getApptype().getBytes();
+        machineinfo_brand = requestContext.getMachineinfo_brand().getBytes();
+        machineinfo_model = requestContext.getMachineinfo_model().getBytes();
+        machineinfo_platform = requestContext.getMachineinfo_platform().getBytes();
+        machineinfo_sdkversion = requestContext.getMachineinfo_sdkversion().getBytes();
+        machineinfo_system = requestContext.getMachineinfo_system().getBytes();
+        machineinfo_wechatversion = requestContext.getMachineinfo_wechatversion().getBytes();
+
+        day = requestContext.getDay().getBytes();
+        week = requestContext.getWeek().getBytes();
+        hour = requestContext.getHour().getBytes();
+        region = requestContext.getRegion().getBytes();
+        city = requestContext.getCity().getBytes();
+    }
+
+
+
+
+
+}

+ 111 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/UserActionFeature.java

@@ -0,0 +1,111 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+
+import lombok.Data;
+
+import java.util.Map;
+import java.lang.Math;
+
+@Data
+public class UserActionFeature {
+    private double exp_cnt;
+    private double click_cnt;
+    private double share_cnt;
+    private double return_cnt;
+
+    private double ctr;
+    private double str;
+    private double rov;
+    private double ros;
+
+    private double ceilLog(Double key) {
+        return Math.ceil(Math.log(key));
+    }
+
+    private double bucketRatioFeature(Double key) {
+        long bucket = Math.round(Math.log(key * 100));
+        if( bucket > 100)
+            bucket = 100;
+        return (double) bucket;
+    }
+
+
+    public void setExp_cnt(Object key){
+        if(key == null ) {
+            this.exp_cnt = 0.0;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.exp_cnt = ceilLog(Double.valueOf(formateKey));
+        }
+    }
+
+    public void setClick_cnt(Object key){
+        if(key == null ){
+            this.click_cnt = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.click_cnt = ceilLog(Double.valueOf(formateKey));
+        }
+    }
+    public void setShare_cnt(Object key){
+        if(key == null ){
+            this.share_cnt = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.share_cnt = ceilLog(Double.valueOf(formateKey));
+        }
+    }
+    public void setReturn_cnt(Object key){
+        if(key == null ){
+            this.return_cnt = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.return_cnt = ceilLog(Double.valueOf(formateKey));
+        }
+    }
+
+    public void setCtr(Object key){
+        if(key == null ){
+            this.ctr = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.ctr = bucketRatioFeature(Double.valueOf(formateKey));
+        }
+    }
+
+    public void setStr(Object key){
+        if(key == null ){
+            this.str = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.str = bucketRatioFeature(Double.valueOf(formateKey));
+        }
+    }
+
+    public void setRov(Object key){
+        if(key == null ){
+            this.rov = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.rov = bucketRatioFeature(Double.valueOf(formateKey));
+        }
+    }
+
+    public void setRos(Object key){
+        if(key == null ){
+            this.ros = 0.0 ;
+        } else {
+            String formateKey = key.toString().replace("\\N", "-1");
+            this.ros = bucketRatioFeature(Double.valueOf(formateKey));
+        }
+    }
+
+
+
+
+
+
+
+
+
+
+}

+ 87 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/UserBytesFeature.java

@@ -0,0 +1,87 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+import io.lettuce.core.StrAlgoArgs;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class UserBytesFeature {
+
+    private final byte[]  uid;
+
+    // 当天统计量信息
+    private Map<String, byte[]> day1_cnt_features;
+    // 3天内统计量
+    private Map<String, byte[]> day3_cnt_features;
+    // 7天内统计量
+    private Map<String, byte[]> day7_cnt_features;
+    // 3个月统计量
+    private Map<String, byte[]> month3_cnt_features;
+    // 用户行为周期
+    private final byte[]  user_cycle_bucket_7days;
+    private final byte[]  user_cycle_bucket_30days;
+    private final byte[]  user_share_bucket_30days;
+
+
+    public UserBytesFeature(UserFeature feature) {
+        this.uid = feature.getUid().getBytes();
+        this.user_cycle_bucket_7days = feature.getUser_cycle_bucket_7days().getBytes();
+        this.user_cycle_bucket_30days = feature.getUser_cycle_bucket_30days().getBytes();
+        this.user_share_bucket_30days = feature.getUser_share_bucket_30days().getBytes();
+
+        this.day1_cnt_features = new HashMap<String, byte[]>();
+        // 1 day statistic
+        this.day1_cnt_features.put("exp", String.valueOf(feature.getDay1_cnt_features().getExp_cnt()).getBytes());
+        this.day1_cnt_features.put("click", String.valueOf(feature.getDay1_cnt_features().getClick_cnt()).getBytes());
+        this.day1_cnt_features.put("share", String.valueOf(feature.getDay1_cnt_features().getShare_cnt()).getBytes());
+        this.day1_cnt_features.put("return", String.valueOf(feature.getDay1_cnt_features().getReturn_cnt()).getBytes());
+        this.day1_cnt_features.put("ctr", String.valueOf(feature.getDay1_cnt_features().getCtr()).getBytes());
+        this.day1_cnt_features.put("str", String.valueOf(feature.getDay1_cnt_features().getStr()).getBytes());
+        this.day1_cnt_features.put("rov", String.valueOf(feature.getDay1_cnt_features().getRov()).getBytes());
+        this.day1_cnt_features.put("ros", String.valueOf(feature.getDay1_cnt_features().getRos()).getBytes());
+
+
+
+        // 3 day statistic
+        this.day3_cnt_features = new HashMap<String, byte[]>();
+        day3_cnt_features.put("exp", String.valueOf(feature.getDay3_cnt_features().getExp_cnt()).getBytes());
+        day3_cnt_features.put("click", String.valueOf(feature.getDay3_cnt_features().getClick_cnt()).getBytes());
+        day3_cnt_features.put("share", String.valueOf(feature.getDay3_cnt_features().getShare_cnt()).getBytes());
+        day3_cnt_features.put("return", String.valueOf(feature.getDay3_cnt_features().getReturn_cnt()).getBytes());
+        day3_cnt_features.put("ctr", String.valueOf(feature.getDay3_cnt_features().getCtr()).getBytes());
+        day3_cnt_features.put("str", String.valueOf(feature.getDay3_cnt_features().getStr()).getBytes());
+        day3_cnt_features.put("rov", String.valueOf(feature.getDay3_cnt_features().getRov()).getBytes());
+        day3_cnt_features.put("ros", String.valueOf(feature.getDay3_cnt_features().getRos()).getBytes());
+
+
+        // 7 day statistic
+        this.day7_cnt_features = new HashMap<String, byte[]>();
+        day7_cnt_features.put("exp", String.valueOf(feature.getDay7_cnt_features().getExp_cnt()).getBytes());
+        day7_cnt_features.put("click", String.valueOf(feature.getDay7_cnt_features().getClick_cnt()).getBytes());
+        day7_cnt_features.put("share", String.valueOf(feature.getDay7_cnt_features().getShare_cnt()).getBytes());
+        day7_cnt_features.put("return", String.valueOf(feature.getDay7_cnt_features().getReturn_cnt()).getBytes());
+        day7_cnt_features.put("ctr", String.valueOf(feature.getDay7_cnt_features().getCtr()).getBytes());
+        day7_cnt_features.put("str", String.valueOf(feature.getDay7_cnt_features().getStr()).getBytes());
+        day7_cnt_features.put("rov", String.valueOf(feature.getDay7_cnt_features().getRov()).getBytes());
+        day7_cnt_features.put("ros", String.valueOf(feature.getDay7_cnt_features().getRos()).getBytes());
+
+
+
+        // 3 month statisic
+        this.month3_cnt_features = new HashMap<String, byte[]>();
+        month3_cnt_features.put("exp", String.valueOf(feature.getMonth3_cnt_features().getExp_cnt()).getBytes());
+        month3_cnt_features.put("click", String.valueOf(feature.getMonth3_cnt_features().getClick_cnt()).getBytes());
+        month3_cnt_features.put("share", String.valueOf(feature.getMonth3_cnt_features().getShare_cnt()).getBytes());
+        month3_cnt_features.put("return", String.valueOf(feature.getMonth3_cnt_features().getReturn_cnt()).getBytes());
+        month3_cnt_features.put("ctr", String.valueOf(feature.getMonth3_cnt_features().getCtr()).getBytes());
+        month3_cnt_features.put("str", String.valueOf(feature.getMonth3_cnt_features().getStr()).getBytes());
+        month3_cnt_features.put("rov", String.valueOf(feature.getMonth3_cnt_features().getRov()).getBytes());
+        month3_cnt_features.put("ros", String.valueOf(feature.getMonth3_cnt_features().getRos()).getBytes());
+
+
+    }
+
+
+
+}

+ 99 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/UserFeature.java

@@ -0,0 +1,99 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@Getter
+@NoArgsConstructor
+public class UserFeature {
+
+    private String uid;
+    // 当天统计量信息
+    private UserActionFeature day1_cnt_features;
+    // 3天内统计量
+    private UserActionFeature day3_cnt_features;
+    // 7天内统计量
+    private UserActionFeature day7_cnt_features;
+    // 3个月统计量
+    private UserActionFeature month3_cnt_features;
+    // 用户行为周期
+    private String user_cycle_bucket_7days;
+    private String user_cycle_bucket_30days;
+    private String user_share_bucket_30days;
+
+    public void setUid(String key) {
+        this.uid = key;
+        if (key == null)
+            this.uid = "0";
+    }
+
+
+    public void setDay1_cnt_features(UserActionFeature key) {
+        this.day1_cnt_features = key;
+        if (key == null)
+            this.day1_cnt_features = new UserActionFeature();
+    }
+
+    public void setDay3_cnt_features(UserActionFeature key) {
+        this.day3_cnt_features = key;
+        if (key == null)
+            this.day3_cnt_features = new UserActionFeature();
+    }
+
+    public void setDay7_cnt_features(UserActionFeature key) {
+        this.day7_cnt_features = key;
+        if (key == null)
+            this.day7_cnt_features = new UserActionFeature();
+    }
+
+    public void setMonth3_cnt_features(UserActionFeature key) {
+        this.month3_cnt_features = key;
+        if (key == null)
+            this.month3_cnt_features = new UserActionFeature();
+    }
+
+
+    public void setUser_cycle_bucket_7days(String key) {
+        this.user_cycle_bucket_7days = key;
+        if (key == null)
+            this.user_cycle_bucket_7days = "0";
+    }
+
+    public void setUser_cycle_bucket_30days(String key) {
+        this.user_cycle_bucket_30days = key;
+        if (key == null)
+            this.user_cycle_bucket_30days = "0";
+    }
+
+    public void setUser_share_bucket_30days(String key) {
+        this.user_share_bucket_30days = key;
+        if (key == null)
+            this.user_share_bucket_30days = "0";
+    }
+
+
+    public String getKey() {
+        return this.uid;
+    }
+
+    public String getValue() {
+        Gson gson = new GsonBuilder().serializeSpecialFloatingPointValues().create();
+        return gson.toJson(this);
+    }
+
+    public static UserFeature defaultInstance(String uid) {
+        UserFeature userFeature = new UserFeature();
+        userFeature.setUid(uid);
+        userFeature.setUser_share_bucket_30days(null);
+        userFeature.setUser_cycle_bucket_30days(null);
+        userFeature.setUser_cycle_bucket_7days(null);
+        userFeature.setMonth3_cnt_features(null);
+        userFeature.setDay7_cnt_features(null);
+        userFeature.setDay3_cnt_features(null);
+        userFeature.setDay1_cnt_features(null);
+        return userFeature;
+    }
+
+}

+ 92 - 0
recommend-feature-client/src/main/java/com/tzld/piaoquan/recommend/feature/domain/VideoBytesFeature.java

@@ -0,0 +1,92 @@
+package com.tzld.piaoquan.recommend.feature.domain;
+
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class VideoBytesFeature {
+    private final byte[] videoId;
+
+    private final byte[] upId;
+
+    private final byte[] titleLength;
+
+    private final byte[] playLength;
+
+    private final byte[] totolTime;
+
+    private final byte[] daysSinceUpload;
+
+
+    // 当天统计量信息
+    private Map<String, byte[]> item_day1_cnt_features;
+    // 3天内统计量
+    private Map<String, byte[]> item_day3_cnt_features;
+    // 7天内统计量
+    private Map<String, byte[]> item_day7_cnt_features;
+    // 3个月统计量
+    private Map<String, byte[]> item_month3_cnt_features;
+
+    public VideoBytesFeature(ItemFeature feature) {
+        videoId = feature.getVideoId().getBytes();
+        upId = feature.getUpId().getBytes();
+
+        titleLength = feature.getTitleLength().getBytes();
+        playLength = feature.getPlayLength().getBytes();
+        totolTime = feature.getTotalTime().getBytes();
+        daysSinceUpload = feature.getDaysSinceUpload().getBytes();
+        // 1day
+
+
+        // 1 day statistic
+        item_day1_cnt_features = new HashMap<String, byte[]>();
+        item_day1_cnt_features.put("exp", String.valueOf(feature.getDay1_cnt_features().getExp_cnt()).getBytes());
+        item_day1_cnt_features.put("click", String.valueOf(feature.getDay1_cnt_features().getClick_cnt()).getBytes());
+        item_day1_cnt_features.put("share", String.valueOf(feature.getDay1_cnt_features().getShare_cnt()).getBytes());
+        item_day1_cnt_features.put("return", String.valueOf(feature.getDay1_cnt_features().getReturn_cnt()).getBytes());
+        item_day1_cnt_features.put("ctr", String.valueOf(feature.getDay1_cnt_features().getCtr()).getBytes());
+        item_day1_cnt_features.put("str", String.valueOf(feature.getDay1_cnt_features().getStr()).getBytes());
+        item_day1_cnt_features.put("rov", String.valueOf(feature.getDay1_cnt_features().getRov()).getBytes());
+        item_day1_cnt_features.put("ros", String.valueOf(feature.getDay1_cnt_features().getRos()).getBytes());
+
+
+        // 3 day statistic
+        item_day3_cnt_features = new HashMap<String, byte[]>();
+        item_day3_cnt_features.put("exp", String.valueOf(feature.getDay3_cnt_features().getExp_cnt()).getBytes());
+        item_day3_cnt_features.put("click", String.valueOf(feature.getDay3_cnt_features().getClick_cnt()).getBytes());
+        item_day3_cnt_features.put("share", String.valueOf(feature.getDay3_cnt_features().getShare_cnt()).getBytes());
+        item_day3_cnt_features.put("return", String.valueOf(feature.getDay3_cnt_features().getReturn_cnt()).getBytes());
+        item_day3_cnt_features.put("ctr", String.valueOf(feature.getDay3_cnt_features().getCtr()).getBytes());
+        item_day3_cnt_features.put("str", String.valueOf(feature.getDay3_cnt_features().getStr()).getBytes());
+        item_day3_cnt_features.put("rov", String.valueOf(feature.getDay3_cnt_features().getRov()).getBytes());
+        item_day3_cnt_features.put("ros", String.valueOf(feature.getDay3_cnt_features().getRos()).getBytes());
+
+
+        // 7 day statistic
+        item_day7_cnt_features = new HashMap<String, byte[]>();
+        item_day7_cnt_features.put("exp", String.valueOf(feature.getDay7_cnt_features().getExp_cnt()).getBytes());
+        item_day7_cnt_features.put("click", String.valueOf(feature.getDay7_cnt_features().getClick_cnt()).getBytes());
+        item_day7_cnt_features.put("share", String.valueOf(feature.getDay7_cnt_features().getShare_cnt()).getBytes());
+        item_day7_cnt_features.put("return", String.valueOf(feature.getDay7_cnt_features().getReturn_cnt()).getBytes());
+        item_day7_cnt_features.put("ctr", String.valueOf(feature.getDay7_cnt_features().getCtr()).getBytes());
+        item_day7_cnt_features.put("str", String.valueOf(feature.getDay7_cnt_features().getStr()).getBytes());
+        item_day7_cnt_features.put("rov", String.valueOf(feature.getDay7_cnt_features().getRov()).getBytes());
+        item_day7_cnt_features.put("ros", String.valueOf(feature.getDay7_cnt_features().getRos()).getBytes());
+
+
+        // 3 month statisic
+        item_month3_cnt_features = new HashMap<String, byte[]>();
+        item_month3_cnt_features.put("exp", String.valueOf(feature.getMonth3_cnt_features().getExp_cnt()).getBytes());
+        item_month3_cnt_features.put("click", String.valueOf(feature.getMonth3_cnt_features().getClick_cnt()).getBytes());
+        item_month3_cnt_features.put("share", String.valueOf(feature.getMonth3_cnt_features().getShare_cnt()).getBytes());
+        item_month3_cnt_features.put("return", String.valueOf(feature.getMonth3_cnt_features().getReturn_cnt()).getBytes());
+        item_month3_cnt_features.put("ctr", String.valueOf(feature.getMonth3_cnt_features().getCtr()).getBytes());
+        item_month3_cnt_features.put("str", String.valueOf(feature.getMonth3_cnt_features().getStr()).getBytes());
+        item_month3_cnt_features.put("rov", String.valueOf(feature.getMonth3_cnt_features().getRov()).getBytes());
+        item_month3_cnt_features.put("ros", String.valueOf(feature.getMonth3_cnt_features().getRos()).getBytes());
+
+    }
+
+}