From eed63794b85b2e4a087cffbb663e71b5a3ea833f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Wed, 21 Jan 2026 15:19:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Ai=E5=AD=97=E5=B9=95?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E7=9A=84=E6=96=B9=E5=BC=8F=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E9=A1=B5=E9=9D=A2=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VideoAnalysis/WebUI/src/router/modules/home.ts | 9 ++++++--- VideoAnalysis/WebUI/src/views/welcome/index.vue | 1 + VideoAnalysis/WebUI/src/views/welcome/showTask.vue | 6 +++++- VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs | 6 +++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/VideoAnalysis/WebUI/src/router/modules/home.ts b/VideoAnalysis/WebUI/src/router/modules/home.ts index e1be162..266aa96 100644 --- a/VideoAnalysis/WebUI/src/router/modules/home.ts +++ b/VideoAnalysis/WebUI/src/router/modules/home.ts @@ -18,7 +18,8 @@ export default { component: () => import("@/views/welcome/runningTask.vue"), meta: { title: "进行中任务", - showLink: true + showLink: true, + keepAlive:true, } }, { @@ -36,7 +37,8 @@ export default { component: () => import("@/views/welcome/showTask.vue"), meta: { title: "预览任务", - showLink: false + showLink: false, + keepAlive:true, } }, { @@ -45,7 +47,8 @@ export default { component: () => import("@/views/welcome/errorTask.vue"), meta: { title: "错误任务", - showLink: true + showLink: true, + keepAlive:true, } } ] diff --git a/VideoAnalysis/WebUI/src/views/welcome/index.vue b/VideoAnalysis/WebUI/src/views/welcome/index.vue index de3f4e3..81cd6f2 100644 --- a/VideoAnalysis/WebUI/src/views/welcome/index.vue +++ b/VideoAnalysis/WebUI/src/views/welcome/index.vue @@ -139,6 +139,7 @@ function previewTask(row: any) { meta: { title: `任务预览` + row.id.toString().slice(-4), dynamicLevel: 3, + keepAlive: true, }, }); // 路由跳转 diff --git a/VideoAnalysis/WebUI/src/views/welcome/showTask.vue b/VideoAnalysis/WebUI/src/views/welcome/showTask.vue index 99c41bc..f66f9f6 100644 --- a/VideoAnalysis/WebUI/src/views/welcome/showTask.vue +++ b/VideoAnalysis/WebUI/src/views/welcome/showTask.vue @@ -155,9 +155,13 @@ function timeupdateVideo() { let subtitleI = subtitles.value.findIndex( (subtitle) => currentTime >= subtitle.start && currentTime <= subtitle.end ); + // 更新字幕 AI优化字幕 + let subtitleI1 = subtitles1.value.findIndex( + (subtitle) => currentTime >= subtitle.start && currentTime <= subtitle.end + ); if (subtitleI > -1 && currentSubtitle.value !== subtitles.value[subtitleI].text) { currentSubtitle.value = subtitles.value[subtitleI].text; - currentSubtitle1.value = subtitles1.value[subtitleI]?.text || ""; + currentSubtitle1.value = subtitles1.value[subtitleI1]?.text || ""; } else if (subtitleI == -1) { currentSubtitle.value = ""; currentSubtitle1.value = ""; diff --git a/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs b/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs index fa3706f..0e38102 100644 --- a/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs +++ b/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs @@ -329,9 +329,9 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek 你是一位{{subject}}学科的教育专家与资深校对。你的任务是将{{sections}}内容的原始语音识别(STT)JSON 数据清洗为高质量教学文本。 # Input & Output Protocol 输入和输出均为严格的 JSON 数组格式:`[{"t": number, "r": string}]`。 - * `t` (Time): 绝对锚点,代表时间戳。严禁修改、严禁排序、严禁删除。 - * `r` (Result): 字幕内容,仅对此字段进行清洗。 - # Processing Rules (按优先级执行) + `t` (Time): 绝对锚点,代表时间戳。严禁修改、严禁排序、严禁删除。 + `r` (Result): 字幕内容,仅对此字段进行清洗。 + Processing Rules (按优先级执行) 1. 结构铁律 (最高优先级): 长度一致:输入 N 条,输出必须 N 条。 时间锁定:输出的第 i 条 `t` 必须等于输入的第 i 条 `t`。