丁云鹏 3 months ago
parent
commit
cbf511078f

+ 0 - 58
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/common/base/RankItem.java

@@ -2,13 +2,10 @@ package com.tzld.piaoquan.recommend.server.common.base;
 
 import com.google.common.collect.Maps;
 import com.tzld.piaoquan.recommend.feature.domain.video.base.ItemFeature;
-import com.tzld.piaoquan.recommend.server.framework.candidiate.CandidateInfo;
 import com.tzld.piaoquan.recommend.server.model.Video;
 import lombok.Data;
 
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 
@@ -39,12 +36,6 @@ public class RankItem implements Comparable<RankItem> {
 
     // 记录召回信息
     private String queue;
-    private CandidateInfo candidateInfo;
-    private List<CandidateInfo> candidateInfoList = new ArrayList<>(); // 兼容多个召回key命中
-
-    // merge信息
-    private List<String> mergeQueuePath = new ArrayList<>();
-    private List<String> mergeDecisionLabels = new ArrayList<>();
 
     // 多样性过滤因子
     // 排序因子
@@ -86,23 +77,6 @@ public class RankItem implements Comparable<RankItem> {
         this.scoreStr = other.scoreStr;
         this.video = other.video;
 
-        // merge queue
-        this.queue = other.queue;
-        if (other.getMergeQueuePath() != null)
-            this.mergeQueuePath.addAll(other.getMergeQueuePath());
-        if (other.getMergeDecisionLabels() != null)
-            this.mergeDecisionLabels.addAll(other.getMergeDecisionLabels());
-
-
-        // candidateinfo
-        this.candidateInfo = other.getCandidateInfo() != null ? other.getCandidateInfo().deepcopy() : null;
-        if (other.getCandidateInfoList() != null) {
-            for (CandidateInfo tmpCandidateInfo : other.getCandidateInfoList()) {
-                this.candidateInfoList.add(tmpCandidateInfo.deepcopy());
-            }
-        }
-
-
     }
 
 
@@ -120,36 +94,4 @@ public class RankItem implements Comparable<RankItem> {
         }
     }
 
-    public RankItem deepcopy() {
-        return new RankItem(this);
-    }
-
-
-    public void addToCandidateInfoList(CandidateInfo candidateInfo) {
-        this.candidateInfoList.add(candidateInfo);
-    }
-
-
-    public void addMergeQueuePath(String mergeQueueName) {
-        this.mergeQueuePath.add(mergeQueueName);
-    }
-
-    public void addMergeDecisionLabel(String label) {
-        this.mergeDecisionLabels.add(label);
-    }
-
-    public void putRankerScore(String rankerName, Double rankerScore) {
-        this.rankerScore.put(rankerName, rankerScore);
-    }
-
-    public String getLastMergeQueueName() {
-        int pathSize = this.mergeQueuePath.size();
-        if (pathSize > 0) {
-            return this.mergeQueuePath.get(pathSize - 1);
-        } else {
-            return getCandidateInfo().getCandidateQueueName();
-        }
-    }
-
-
 }