Browse Source

Update RankStrategyBy688: skip null value for sparse feature map

StrayWarrior 1 month ago
parent
commit
f72af5b63d

+ 3 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBy688.java

@@ -698,7 +698,9 @@ public class RankStrategyBy688 extends RankStrategyBasic {
         for (Map.Entry<String, String> entry : featureMap.entrySet()) {
             String name = entry.getKey();
             if (this.sparseFeatureSet.contains(name)) {
-                newFeatureMap.put(name, entry.getValue());
+                if (entry.getValue() != null) {
+                    newFeatureMap.put(name, entry.getValue());
+                }
                 continue;
             }
             double score = Double.parseDouble(entry.getValue());