|
@@ -614,14 +614,14 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
private static final String DEMAND_STRATEGY_PRIOR_SCENE = "人群需求-场景";
|
|
private static final String DEMAND_STRATEGY_PRIOR_SCENE = "人群需求-场景";
|
|
|
private static final String DEMAND_STRATEGY_POSTERIOR = "优质相似";
|
|
private static final String DEMAND_STRATEGY_POSTERIOR = "优质相似";
|
|
|
private static final String PRIOR_PREMIUM_DIMENSION = "传播的头部";
|
|
private static final String PRIOR_PREMIUM_DIMENSION = "传播的头部";
|
|
|
- /** prior 池视频近 7 日 rov 下限(质量过滤):0.02 在 prior 池 0513 全量保留 ~41%,
|
|
|
|
|
- * 量大有意义;priorScene/posterior 池基数小且分布偏低,仍保持 >0(在 groupAndTopK 内兜底)。 */
|
|
|
|
|
- private static final double PRIOR_MIN_ROV = 0.02;
|
|
|
|
|
|
|
+ /** prior/posterior 池视频近 7 日 rov 下限(质量过滤):0.02 在 prior 池 0513 全量保留 ~41%,
|
|
|
|
|
+ * cdjh 优质相似 0514 验证保留 ~54%,量大有意义;
|
|
|
|
|
+ * priorScene 池基数小(单 channel 几十~百条),仍保持 >0(在 groupAndTopK 内兜底)。 */
|
|
|
|
|
+ private static final double DEMAND_MIN_ROV = 0.02;
|
|
|
/** type → channel_name 映射(强过滤):同 crowd_segment 跨渠道客户(如 gzyhc/wxm)按入口平台切数据源 */
|
|
/** type → channel_name 映射(强过滤):同 crowd_segment 跨渠道客户(如 gzyhc/wxm)按入口平台切数据源 */
|
|
|
private static final String CHANNEL_NAME_GZH = "公众号合作-即转-稳定";
|
|
private static final String CHANNEL_NAME_GZH = "公众号合作-即转-稳定";
|
|
|
private static final String CHANNEL_NAME_QW = "群/企微合作-稳定";
|
|
private static final String CHANNEL_NAME_QW = "群/企微合作-稳定";
|
|
|
private static final double PRIOR_GROUP_KEEP_RATIO = 0.5;
|
|
private static final double PRIOR_GROUP_KEEP_RATIO = 0.5;
|
|
|
- private static final String POSTERIOR_DRIVE_DIMENSION_TIME = "昨日";
|
|
|
|
|
/** posterior 按 demand_content_id 分组后保留 total_rov 排名前 50% 的需求组,
|
|
/** posterior 按 demand_content_id 分组后保留 total_rov 排名前 50% 的需求组,
|
|
|
* 砍掉群体表现弱的需求,避免低 total_rov 的 demand 带回来的相似变体稀释结果。 */
|
|
* 砍掉群体表现弱的需求,避免低 total_rov 的 demand 带回来的相似变体稀释结果。 */
|
|
|
private static final double POSTERIOR_GROUP_KEEP_RATIO = 0.5;
|
|
private static final double POSTERIOR_GROUP_KEEP_RATIO = 0.5;
|
|
@@ -938,9 +938,9 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
dt, channelName, null, DEMAND_STRATEGY_PRIOR, PRIOR_PREMIUM_DIMENSION, null, null, null, null, category, fetchLimit, false);
|
|
dt, channelName, null, DEMAND_STRATEGY_PRIOR, PRIOR_PREMIUM_DIMENSION, null, null, null, null, category, fetchLimit, false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // prior 池近 7 日 rov 下限,过滤掉低质量近期表现的视频(0513 验证 ≥0.02 保留 ~41%)
|
|
|
|
|
|
|
+ // 近 7 日 rov 下限,过滤掉低质量近期表现的视频(0513 验证 ≥0.02 保留 ~41%)
|
|
|
rows = rows.stream()
|
|
rows = rows.stream()
|
|
|
- .filter(r -> r.getRov() != null && r.getRov() >= PRIOR_MIN_ROV)
|
|
|
|
|
|
|
+ .filter(r -> r.getRov() != null && r.getRov() >= DEMAND_MIN_ROV)
|
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
Function<ContentPlatformDemandVideo, String> keyFn = r ->
|
|
Function<ContentPlatformDemandVideo, String> keyFn = r ->
|
|
@@ -1005,23 +1005,26 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
int fetchLimit = Math.max(limit * 3, DEMAND_CANDIDATE_LIMIT);
|
|
int fetchLimit = Math.max(limit * 3, DEMAND_CANDIDATE_LIMIT);
|
|
|
|
|
|
|
|
String category = StringUtils.hasText(param.getCategory()) ? param.getCategory() : null;
|
|
String category = StringUtils.hasText(param.getCategory()) ? param.getCategory() : null;
|
|
|
- // 公众号粒度(channel_level3 有值)时放开 drive_dimension_time:单公众号数据更稀疏,"昨日"窗口经常拿不到几条,
|
|
|
|
|
- // 放宽为不限制能把"最近 15 日"那一档相似召回也带进来。渠道粒度兜底仍按"昨日"。
|
|
|
|
|
- String stageDriveDimensionTime = (ghName != null) ? null : POSTERIOR_DRIVE_DIMENSION_TIME;
|
|
|
|
|
|
|
+ // 优质相似池:drive_dimension_time 一律不限制(含主查与退化路径),避免仅「昨日」窗口召回过少。
|
|
|
List<ContentPlatformDemandVideo> rows = demandVideoMapperExt.selectForRecommend(
|
|
List<ContentPlatformDemandVideo> rows = demandVideoMapperExt.selectForRecommend(
|
|
|
- dt, channelName, crowdSegment, DEMAND_STRATEGY_POSTERIOR, null, null, null, ghName, stageDriveDimensionTime, category, fetchLimit, true);
|
|
|
|
|
|
|
+ dt, channelName, crowdSegment, DEMAND_STRATEGY_POSTERIOR, null, null, null, ghName, null, category, fetchLimit, true);
|
|
|
|
|
|
|
|
- // 退化:该 ghName 无数据 → 退回渠道粒度(drive_dimension_time 仍严格为"昨日")
|
|
|
|
|
|
|
+ // 退化:该 ghName 无数据 → 退回渠道粒度
|
|
|
if (ghName != null && rows.isEmpty()) {
|
|
if (ghName != null && rows.isEmpty()) {
|
|
|
rows = demandVideoMapperExt.selectForRecommend(
|
|
rows = demandVideoMapperExt.selectForRecommend(
|
|
|
- dt, channelName, crowdSegment, DEMAND_STRATEGY_POSTERIOR, null, null, null, null, POSTERIOR_DRIVE_DIMENSION_TIME, category, fetchLimit, true);
|
|
|
|
|
|
|
+ dt, channelName, crowdSegment, DEMAND_STRATEGY_POSTERIOR, null, null, null, null, null, category, fetchLimit, true);
|
|
|
}
|
|
}
|
|
|
// 跨渠道退化:channel_name 命中但 crowd_segment 在对侧 0 行 → 去 crowd_segment 拉通用数据
|
|
// 跨渠道退化:channel_name 命中但 crowd_segment 在对侧 0 行 → 去 crowd_segment 拉通用数据
|
|
|
if (channelName != null && rows.isEmpty()) {
|
|
if (channelName != null && rows.isEmpty()) {
|
|
|
rows = demandVideoMapperExt.selectForRecommend(
|
|
rows = demandVideoMapperExt.selectForRecommend(
|
|
|
- dt, channelName, null, DEMAND_STRATEGY_POSTERIOR, null, null, null, null, POSTERIOR_DRIVE_DIMENSION_TIME, category, fetchLimit, true);
|
|
|
|
|
|
|
+ dt, channelName, null, DEMAND_STRATEGY_POSTERIOR, null, null, null, null, null, category, fetchLimit, true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 近 7 日 rov 下限,与 prior 池一致(cdjh 0514 验证 ≥0.02 保留 ~54%)
|
|
|
|
|
+ rows = rows.stream()
|
|
|
|
|
+ .filter(r -> r.getRov() != null && r.getRov() >= DEMAND_MIN_ROV)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
Function<ContentPlatformDemandVideo, String> keyFn = r ->
|
|
Function<ContentPlatformDemandVideo, String> keyFn = r ->
|
|
|
r.getDemandContentId() == null ? "" : r.getDemandContentId();
|
|
r.getDemandContentId() == null ? "" : r.getDemandContentId();
|
|
|
|
|
|