feat(growth): same-day 1-day baselines for new videos
Let 1-day view growth use a zero baseline for videos published today, and the first successful sample for older videos ingested today, without mixing those into 7/30-day rankings.
This commit is contained in:
1 parent
8e7ead1669
commit
c5b7185675
21 files changed
+411
-59
No files matched your search
@@ -92,7 +92,7 @@ export async function renderAbout(root) {
|
||||
<li>B 站不公开完播率与单 P 播放,内容小时是“供给时长”,不是“实际观看时长”。</li>
|
||||
<li>多 P 可能让同一用户产生多次播放计数,本站不单独校正,属于已知偏差。</li>
|
||||
<li>粉丝数可能包含不活跃账号;粉丝快照暂不参与任何榜单。</li>
|
||||
<li>样本不足(少于 2 天快照、单视频 UP)会显示提示,不伪造 0。</li>
|
||||
<li>近 7/30 日增长仍要跨日快照。近 1 日:当日发布按 0 起算;更早发布的新入库按入库时播放量起算,需当天至少两次采样。样本不足时显示提示,不伪造 0。</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ export async function renderHome(root) {
|
||||
const growthEmptyTitle = growth.reason
|
||||
|| `近 ${growthDays} 日增长暂不可用`;
|
||||
const growthEmptyHint = growthDays <= 1
|
||||
? "当前快照不足,完成至少 2 天快照后即可显示播放增量。"
|
||||
? "当日发布按 0 起算;更早发布的新入库需要当天至少两次采样。"
|
||||
: `需要至少 ${growthDays + 1} 天快照才能计算近 ${growthDays} 日增长。`;
|
||||
const updatedLabel = formatClock(overview.updated_at);
|
||||
const dataDateLabel = formatDataDate(overview.data_date);
|
||||
|
||||
@@ -179,6 +179,12 @@ function durationNote(data) {
|
||||
return `<div class="section-note">内容效率与互动效率:时长 ≥ ${filter.min_duration_seconds} 秒、发布满 ${filter.maturity_days} 天、播放 ≥ ${filter.min_view}${shrink};时长缺失不参与。</div>`;
|
||||
}
|
||||
|
||||
function growthNote(sort, growthDays) {
|
||||
if (sort !== "growth" && sort !== "growth_rate") return "";
|
||||
if (Number(growthDays) !== 1) return "";
|
||||
return `<div class="section-note">近 1 日:当日发布按 0 起算;更早发布的新入库按入库时播放量起算,需要当天至少两次采样。</div>`;
|
||||
}
|
||||
|
||||
function bindControls(root) {
|
||||
root.querySelector("#rank-sort")?.addEventListener("change", (event) => {
|
||||
replaceQuery({ sort: event.target.value, page: null });
|
||||
@@ -245,6 +251,7 @@ async function renderScope(root, { query }, scope) {
|
||||
</header>
|
||||
${controls({ scope, sort, within, year, growthDays, q, years })}
|
||||
${durationNote(data)}
|
||||
${growthNote(sort, growthDays)}
|
||||
${data.available === false ? `<div class="notice-row warning">
|
||||
<strong>${sort.startsWith("growth") ? "增长数据尚不可用" : "榜单筛选后为空"}</strong>
|
||||
<span>${escapeHtml(data.reason || "")}</span>
|
||||
|
||||
@@ -62,7 +62,7 @@ export async function renderVideo(root, { params, query }) {
|
||||
<span>${escapeHtml(formatDuration(detail.duration))}</span>
|
||||
${detail.pages ? `<span>${formatNumber(detail.pages)} P</span>` : ""}
|
||||
${badge(statusLabel(detail.status), `status-${detail.status}`)}
|
||||
${samples < 2 ? badge("样本不足", "warning") : ""}
|
||||
${samples < 2 && !detail.growth?.available ? badge("样本不足", "warning") : ""}
|
||||
</div>
|
||||
${detail.blacklisted ? `<p class="section-note warning-text">该 UP 在黑名单中;黑名单只影响未来发现,不影响当前视频追踪。</p>` : ""}
|
||||
${detail.up_follower_backfilled ? `<p class="section-note">UP 粉丝数为回填值,不是真实的入库时点。</p>` : ""}
|
||||
|
||||
Reference in new issue
Block a user