Browse Source

feat:补充特征

zhaohaipeng 9 hours ago
parent
commit
12fd2d4144

+ 1 - 10
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/feature/FeatureService.java

@@ -64,7 +64,7 @@ public class FeatureService {
             }
         }
 
-        //skuid
+        // skuid
         for (Long skuId : skuIdList) {
             if (StringUtils.isNotEmpty(param.getMid())) {
                 protos.add(genWithMidAndSkuId("alg_mid_feature_sku_action", param.getMid(), String.valueOf(skuId)));
@@ -102,15 +102,6 @@ public class FeatureService {
         return this.invokeFeatureService(protos);
     }
 
-    public Feature getCreativeBasicInfo(Collection<Long> creativeIds) {
-        List<FeatureKeyProto> protos = new ArrayList<>(creativeIds.size());
-        for (Long creativeId : creativeIds) {
-            String cidStr = String.valueOf(creativeId);
-            protos.add(genWithCid("alg_cid_feature_basic_info", cidStr));
-        }
-        return this.invokeFeatureService(protos);
-    }
-
     public Feature invokeFeatureService(List<FeatureKeyProto> protos) {
 
         Map<String, String> featureMap = remoteService.getFeature(protos);

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

@@ -64,8 +64,7 @@ public class RankStrategyBy687 extends RankStrategyBasic {
         List<AdPlatformCreativeDTO> recallCreativeList = request.getAdIdList();
 
         // 获取所有创意对应的客户列表
-        List<Long> creativeIds = recallCreativeList.stream().map(AdPlatformCreativeDTO::getCreativeId).collect(Collectors.toList());
-        Feature feature = featureService.getCreativeBasicInfo(creativeIds);
+        Feature feature = this.getFeature(scoreParam, request);
 
         List<AdRankItem> rankItems = new ArrayList<>(recallCreativeList.size());
         for (AdPlatformCreativeDTO dto : recallCreativeList) {