|
@@ -19,8 +19,6 @@ import java.io.BufferedReader;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
import java.io.InputStreamReader;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.ZoneOffset;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -54,7 +52,6 @@ public class RankService680 {
|
|
|
Map<String, Double> midTimeDiffMap = this.parseC1FeatureListToTimeDiffMap(midActionList, ts);
|
|
|
Map<String, Double> actionStaticMap = this.parseC1FeatureListToActionStaticMap(midActionList);
|
|
|
|
|
|
- Map<String, String> d1Feature = videoFeature.getOrDefault("alg_cid_feature_vid_cf", new HashMap<>());
|
|
|
Map<String, String> d2Feature = videoFeature.getOrDefault("alg_cid_feature_vid_cf_rank", new HashMap<>());
|
|
|
|
|
|
Map<String, Map<String, Double>> vidRankMaps = this.parseD2FeatureMap(d2Feature);
|
|
@@ -79,6 +76,9 @@ public class RankService680 {
|
|
|
|
|
|
Map<String, Map<String, String>> adVerFeature = allAdVerFeature.getOrDefault(dto.getAdVerId(), new HashMap<>());
|
|
|
|
|
|
+ Map<String, String> d1Feature = cidFeature.getOrDefault("alg_cid_feature_vid_cf", new HashMap<>());
|
|
|
+
|
|
|
+
|
|
|
this.handleB1Feature(b1Feature, cidFeatureMap, cidStr);
|
|
|
|
|
|
this.handleB2ToB5AndB8Feature(cidFeature, adVerFeature, cidFeatureMap);
|
|
@@ -388,10 +388,10 @@ public class RankService680 {
|
|
|
Map<String, Double> midTimeDiffMap = new HashMap<>();
|
|
|
for (TupleMapEntry<Tuple5> entry : midActionList) {
|
|
|
String cid = entry.key;
|
|
|
- long tsHistory = Long.parseLong(entry.value.f1);
|
|
|
- long click = Long.parseLong(entry.value.f2);
|
|
|
- long conver = Long.parseLong(entry.value.f3);
|
|
|
- long d = (ts - tsHistory) / 3600 / 24;
|
|
|
+ double tsHistory = Double.parseDouble(entry.value.f1);
|
|
|
+ double click = Double.parseDouble(entry.value.f2);
|
|
|
+ double conver = Double.parseDouble(entry.value.f3);
|
|
|
+ double d = (ts - tsHistory) / 3600 / 24;
|
|
|
if (!midTimeDiffMap.containsKey("timediff_view_" + cid)) {
|
|
|
midTimeDiffMap.put("timediff_view_" + cid, NumUtil.div(1, d));
|
|
|
}
|