|
|
@@ -122,6 +122,12 @@ public class ChannelDemandMatchJob {
|
|
|
@Value("${channel.demand.dimension-stat.min-uv-ratio:0.002}")
|
|
|
private double dimensionStatMinUvRatio;
|
|
|
|
|
|
+ /**
|
|
|
+ * 向量召回综合评分相关性权重 alpha,取值 0~1
|
|
|
+ */
|
|
|
+ @Value("${channel.demand.recall.alpha:0.2}")
|
|
|
+ private double recallAlpha;
|
|
|
+
|
|
|
/**
|
|
|
* 渠道维度过滤配置:按渠道+维度指定topN过滤比例
|
|
|
* 格式: {"渠道A": {"增长的头部": 0.25, "传播的头部": 0.3}}
|
|
|
@@ -503,6 +509,7 @@ public class ChannelDemandMatchJob {
|
|
|
param.setQueryText(queryText);
|
|
|
param.setConfigCode(configCode);
|
|
|
param.setTopN(topN);
|
|
|
+ param.setAlpha(recallAlpha);
|
|
|
|
|
|
RecallVideoScoreVO scoreVO = getRecallResultWithCache(param);
|
|
|
if (scoreVO == null || CollectionUtils.isEmpty(scoreVO.getItems())) {
|
|
|
@@ -720,7 +727,7 @@ public class ChannelDemandMatchJob {
|
|
|
|
|
|
// 计算综合评分:sim默认1,rov取totalRov
|
|
|
double rov = result.getMatchRov() != null ? result.getMatchRov() : 0.0;
|
|
|
- result.setMatchScore(VectorUtils.calculateScore(1.0, rov));
|
|
|
+ result.setMatchScore(VectorUtils.calculateScore(1.0, rov, recallAlpha));
|
|
|
result.setMatchSim(1.0);
|
|
|
result.setMatchRov(rov);
|
|
|
|