From 2163d7b5f44787375e3a0843763bee466f537fa4 Mon Sep 17 00:00:00 2001 From: Elegy233 <82034747+wan0ge@users.noreply.github.com> Date: Tue, 14 Jul 2026 22:26:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(merge):=20=E9=9B=B6=E5=81=8F=E7=A7=BB?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E9=97=A8=E6=A7=9B=E4=BB=8E=204=20=E5=AF=B9?= =?UTF-8?q?=E9=99=8D=E4=B8=BA=201=20=E5=AF=B9=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=96=B0=E7=95=AA"=E7=82=92=E7=BF=BB=E5=A4=A9"=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E9=94=99=E8=AF=AF=20(#364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ZERO_DIFF_BONUS 原需 >3 对零差才能触发 100 分奖励, 导致单集断层场景仅 E1 一对零差无法拿到加成, 被无断层惩罚的批量偏移对以数量优势压制,选错偏移方向。 任意零差对集出现即表明集号一致,门槛降为 >0。 --- danmu_api/utils/merge-util.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/danmu_api/utils/merge-util.js b/danmu_api/utils/merge-util.js index a79467b..10b3cc1 100644 --- a/danmu_api/utils/merge-util.js +++ b/danmu_api/utils/merge-util.js @@ -1420,13 +1420,11 @@ function findBestAlignmentOffset( } // 匹配数量规模奖励(对齐对越多越可信) finalScore += Math.min(matchCount * 0.15, 1.5); - // 零偏移奖励:偏移为 0 说明主副源集数完全对齐,是最理想情况 + // 零偏移奖励:主副源出现任意零差对集即表明集号一致,给予强信号 const zeroDiffCount = numericDiffs.get('0.0000') || 0; - if (zeroDiffCount > 3) { + if (zeroDiffCount > 0) { finalScore += MergeWeights.EP_ALIGN.ZERO_DIFF_BONUS_BASE; finalScore += zeroDiffCount * MergeWeights.EP_ALIGN.ZERO_DIFF_BONUS_PER_HIT; - } else if (zeroDiffCount > 0) { - finalScore += zeroDiffCount * 2.0; } if (finalScore > maxScore) { maxScore = finalScore; bestOffset = offset; } }