欢迎光临
我们一直在努力

从「收藏吃灰」到「知识入库」:用 AI 流水线把微信视频号收藏变成 Obsidian 知识库

你的微信视频号收藏了多少视频?几十个?上百个?收藏的时候觉得「这个有用,回头再看」,结果再也没打开过。

本文介绍一套完整的 AI 自动化方案:批量下载视频号收藏 → 语音转文字 → 智能分类 → 生成结构化笔记 → 导入 Obsidian 知识库。全程本地 GPU 运行 Whisper,配合大模型做内容分析和分类,几百条条短视频从原始视频变成可检索、可跳转、可行动的知识体系。

项目已开源:github.com/dlv2008/weixin-favor-kb


第一部分:快速开始

#mermaid-svg-qnE3KP63agUXucUt{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-qnE3KP63agUXucUt .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-qnE3KP63agUXucUt .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-qnE3KP63agUXucUt .error-icon{fill:#552222;}#mermaid-svg-qnE3KP63agUXucUt .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-qnE3KP63agUXucUt .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-qnE3KP63agUXucUt .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-qnE3KP63agUXucUt .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-qnE3KP63agUXucUt .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-qnE3KP63agUXucUt .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-qnE3KP63agUXucUt .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-qnE3KP63agUXucUt .marker{fill:#333333;stroke:#333333;}#mermaid-svg-qnE3KP63agUXucUt .marker.cross{stroke:#333333;}#mermaid-svg-qnE3KP63agUXucUt svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-qnE3KP63agUXucUt p{margin:0;}#mermaid-svg-qnE3KP63agUXucUt .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-qnE3KP63agUXucUt .cluster-label text{fill:#333;}#mermaid-svg-qnE3KP63agUXucUt .cluster-label span{color:#333;}#mermaid-svg-qnE3KP63agUXucUt .cluster-label span p{background-color:transparent;}#mermaid-svg-qnE3KP63agUXucUt .label text,#mermaid-svg-qnE3KP63agUXucUt span{fill:#333;color:#333;}#mermaid-svg-qnE3KP63agUXucUt .node rect,#mermaid-svg-qnE3KP63agUXucUt .node circle,#mermaid-svg-qnE3KP63agUXucUt .node ellipse,#mermaid-svg-qnE3KP63agUXucUt .node polygon,#mermaid-svg-qnE3KP63agUXucUt .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-qnE3KP63agUXucUt .rough-node .label text,#mermaid-svg-qnE3KP63agUXucUt .node .label text,#mermaid-svg-qnE3KP63agUXucUt .image-shape .label,#mermaid-svg-qnE3KP63agUXucUt .icon-shape .label{text-anchor:middle;}#mermaid-svg-qnE3KP63agUXucUt .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-qnE3KP63agUXucUt .rough-node .label,#mermaid-svg-qnE3KP63agUXucUt .node .label,#mermaid-svg-qnE3KP63agUXucUt .image-shape .label,#mermaid-svg-qnE3KP63agUXucUt .icon-shape .label{text-align:center;}#mermaid-svg-qnE3KP63agUXucUt .node.clickable{cursor:pointer;}#mermaid-svg-qnE3KP63agUXucUt .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-qnE3KP63agUXucUt .arrowheadPath{fill:#333333;}#mermaid-svg-qnE3KP63agUXucUt .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-qnE3KP63agUXucUt .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-qnE3KP63agUXucUt .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-qnE3KP63agUXucUt .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-qnE3KP63agUXucUt .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-qnE3KP63agUXucUt .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-qnE3KP63agUXucUt .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-qnE3KP63agUXucUt .cluster text{fill:#333;}#mermaid-svg-qnE3KP63agUXucUt .cluster span{color:#333;}#mermaid-svg-qnE3KP63agUXucUt div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-qnE3KP63agUXucUt .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-qnE3KP63agUXucUt rect.text{fill:none;stroke-width:0;}#mermaid-svg-qnE3KP63agUXucUt .icon-shape,#mermaid-svg-qnE3KP63agUXucUt .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-qnE3KP63agUXucUt .icon-shape p,#mermaid-svg-qnE3KP63agUXucUt .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-qnE3KP63agUXucUt .icon-shape .label rect,#mermaid-svg-qnE3KP63agUXucUt .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-qnE3KP63agUXucUt .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-qnE3KP63agUXucUt .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-qnE3KP63agUXucUt :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

MP4 放入 downloads/

自动完成全部处理

① 手动下载短视频

② 一键运行流水线

③ 导入 Obsidian

整个过程只有三步。第一步和第三步需要手动操作(下载视频、打开 Obsidian),中间的核心处理——音频提取、语音转文字、关键帧 OCR、LLM 分类与分析、Obsidian Vault 构建——全部自动化,一条命令完成。

环境要求

项目要求
系统 Ubuntu(WSL 亦可),需有 GPU
GPU NVIDIA 显卡,8GB+ VRAM(RTX 3070 Ti 实测可用)
Python 3.10+
ffmpeg 系统已安装
LLM API 任意 OpenAI 兼容接口(DeepSeek / 硅基流动 / 智谱 / Ollama 本地 等)

费用说明:Whisper / OCR / ffmpeg 全部免费本地运行。唯一付费项是 LLM API(分类 + 分析 + Vault 汇总),300个视频处理下来约消耗几毛到几块钱,取决于你选择的模型。

克隆与安装

git clone https://github.com/dlv2008/weixin-favor-kb.git
cd weixin-favor-kb

python3 -m venv venv
source venv/bin/activate

pip install -r requirements.txt

核心依赖只有 9 个包:

包名用途
faster-whisper 基于 CTranslate2 的 Whisper 实现,支持 int8 量化
opencv-python-headless 关键帧提取,场景变化检测
rapidocr-onnxruntime 轻量 OCR,识别视频画面中的文字
openai OpenAI 兼容 API 客户端
jinja2 模板引擎,渲染 Obsidian 笔记
pyyaml 配置文件解析
numpy 数值计算
loguru 日志
rich 终端美化(进度条、表格报告)

下载视频

特别提示: 下载他人视频仅限于个人学习或欣赏,切勿进行二次传播或用于商业用途。为从根本上规避版权风险,最稳妥的方式永远是先联系视频创作者,获得对方的明确授权

使用 wx_channel(微信视频号下载助手)在 Windows 上批量下载收藏视频:

  • 前往 GitHub Releases 下载最新版 wx_channel.exe
  • 以管理员身份运行
  • 在微信中打开视频号 → 进入「我的收藏」页面
  • 工具自动注入下载按钮,点击批量下载 在这里插入图片描述 下载完成后,视频按作者名分类保存。将整个目录复制到 WSL 的工作目录:
  • cp -r /mnt/c/Users/你的用户名/下载目录/ ~/temp/weixin-favor-kb/downloads/

    配置 config.yaml

    整个项目只有一个配置文件。编辑 config.yaml,填入你的 LLM API 信息:

    whisper:
    model_size: "large-v3" # Whisper 模型,中文效果最佳
    device: "cuda" # 使用 GPU
    compute_type: "int8_float16" # 8GB 显卡用 int8 量化
    language: "zh"

    llm:
    api_key: "你的API密钥" # 必填
    base_url: "https://api.openai.com/v1" # 或 DeepSeek / 硅基流动 等
    model: "gpt-4o" # 或其他模型

    frames:
    threshold: 30.0 # 场景变化阈值
    max_frames: 20 # 每个视频最多提取 20 帧

    ocr:
    confidence_threshold: 0.5

    paths:
    downloads: "./downloads"
    output: "./output"

    所有脚本(pipeline.py、build_vault.py、reclassify.py)统一从 config.yaml 读取 LLM 配置,无需额外设置环境变量。

    LLM 提供商参考:

    方案费用base_url
    DeepSeek 极低 https://api.deepseek.com/v1
    硅基流动 注册送额度 https://api.siliconflow.cn/v1
    Ollama 本地 免费 http://localhost:11434/v1
    智谱 GLM 有免费额度 https://open.bigmodel.cn/api/paas/v4

    一键运行

    ./run.sh ./downloads/

    这一条命令会自动完成:

    #mermaid-svg-fD30m4lYriJxTfLy{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-fD30m4lYriJxTfLy .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-fD30m4lYriJxTfLy .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-fD30m4lYriJxTfLy .error-icon{fill:#552222;}#mermaid-svg-fD30m4lYriJxTfLy .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-fD30m4lYriJxTfLy .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-fD30m4lYriJxTfLy .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-fD30m4lYriJxTfLy .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-fD30m4lYriJxTfLy .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-fD30m4lYriJxTfLy .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-fD30m4lYriJxTfLy .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-fD30m4lYriJxTfLy .marker{fill:#333333;stroke:#333333;}#mermaid-svg-fD30m4lYriJxTfLy .marker.cross{stroke:#333333;}#mermaid-svg-fD30m4lYriJxTfLy svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-fD30m4lYriJxTfLy p{margin:0;}#mermaid-svg-fD30m4lYriJxTfLy .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-fD30m4lYriJxTfLy .cluster-label text{fill:#333;}#mermaid-svg-fD30m4lYriJxTfLy .cluster-label span{color:#333;}#mermaid-svg-fD30m4lYriJxTfLy .cluster-label span p{background-color:transparent;}#mermaid-svg-fD30m4lYriJxTfLy .label text,#mermaid-svg-fD30m4lYriJxTfLy span{fill:#333;color:#333;}#mermaid-svg-fD30m4lYriJxTfLy .node rect,#mermaid-svg-fD30m4lYriJxTfLy .node circle,#mermaid-svg-fD30m4lYriJxTfLy .node ellipse,#mermaid-svg-fD30m4lYriJxTfLy .node polygon,#mermaid-svg-fD30m4lYriJxTfLy .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-fD30m4lYriJxTfLy .rough-node .label text,#mermaid-svg-fD30m4lYriJxTfLy .node .label text,#mermaid-svg-fD30m4lYriJxTfLy .image-shape .label,#mermaid-svg-fD30m4lYriJxTfLy .icon-shape .label{text-anchor:middle;}#mermaid-svg-fD30m4lYriJxTfLy .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-fD30m4lYriJxTfLy .rough-node .label,#mermaid-svg-fD30m4lYriJxTfLy .node .label,#mermaid-svg-fD30m4lYriJxTfLy .image-shape .label,#mermaid-svg-fD30m4lYriJxTfLy .icon-shape .label{text-align:center;}#mermaid-svg-fD30m4lYriJxTfLy .node.clickable{cursor:pointer;}#mermaid-svg-fD30m4lYriJxTfLy .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-fD30m4lYriJxTfLy .arrowheadPath{fill:#333333;}#mermaid-svg-fD30m4lYriJxTfLy .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-fD30m4lYriJxTfLy .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-fD30m4lYriJxTfLy .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-fD30m4lYriJxTfLy .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-fD30m4lYriJxTfLy .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-fD30m4lYriJxTfLy .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-fD30m4lYriJxTfLy .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-fD30m4lYriJxTfLy .cluster text{fill:#333;}#mermaid-svg-fD30m4lYriJxTfLy .cluster span{color:#333;}#mermaid-svg-fD30m4lYriJxTfLy div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-fD30m4lYriJxTfLy .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-fD30m4lYriJxTfLy rect.text{fill:none;stroke-width:0;}#mermaid-svg-fD30m4lYriJxTfLy .icon-shape,#mermaid-svg-fD30m4lYriJxTfLy .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-fD30m4lYriJxTfLy .icon-shape p,#mermaid-svg-fD30m4lYriJxTfLy .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-fD30m4lYriJxTfLy .icon-shape .label rect,#mermaid-svg-fD30m4lYriJxTfLy .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-fD30m4lYriJxTfLy .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-fD30m4lYriJxTfLy .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-fD30m4lYriJxTfLy :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    否

    是

    扫描 downloads/ 目录

    逐个处理视频

    ffmpeg 提取音频 WAV

    Whisper 语音转文字

    OpenCV 关键帧提取

    RapidOCR 画面文字识别

    合并转录 + OCR 文本

    LLM 自动分类(参考代码中默认的分类配置)

    LLM 深度分析

    Jinja2 渲染 Obsidian 笔记

    全部处理完?

    自动构建 Obsidian Vault

    LLM 生成分类汇总 + 行动计划

    打印 Rich 处理报告

    在这里插入图片描述 处理完成后会打印 Rich 表格报告,显示每个视频的分类和标签。

    WSL 用户注意:run.sh 会在 Python 启动前注入 CUDA 库路径。如果你的 WSL 环境中 CUDA 库不在系统路径中,需要编辑 run.sh 中的 CUDA_BASE 路径,指向你系统中的 NVIDIA 库目录。

    导入 Obsidian

    # WSL 环境下复制到 Windows
    cp -r obsidian_vault /mnt/c/Users/你的用户名/Documents/

    然后在 Obsidian 中打开:

  • 启动 Obsidian
  • 「管理仓库」→「打开本地仓库」
  • 选择刚才复制的 obsidian_vault 文件夹 在这里插入图片描述
  • 不要通过 \\\\wsl$\\ 路径直接打开 WSL 目录,Obsidian 的文件监视器不支持 WSL 网络文件系统,会报 EISDIR 错误。


    第二部分:使用效果

    Obsidian 首页

    打开 vault 后看到的是知识库总览页: 在这里插入图片描述 首页展示全局统计(例如本次生成共 261 篇笔记、955 个标签、751 条资源),以及 13 个分类入口。每个分类标注了笔记数量,点击即可跳转。

    分类页:知识全景 + 行动计划

    每个分类页由 LLM 综合该类下所有笔记生成,包含两个核心部分:

    #mermaid-svg-PLLFaz0qOkHvZy8D{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-PLLFaz0qOkHvZy8D .error-icon{fill:#552222;}#mermaid-svg-PLLFaz0qOkHvZy8D .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-PLLFaz0qOkHvZy8D .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-PLLFaz0qOkHvZy8D .marker{fill:#333333;stroke:#333333;}#mermaid-svg-PLLFaz0qOkHvZy8D .marker.cross{stroke:#333333;}#mermaid-svg-PLLFaz0qOkHvZy8D svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-PLLFaz0qOkHvZy8D p{margin:0;}#mermaid-svg-PLLFaz0qOkHvZy8D .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D .cluster-label text{fill:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D .cluster-label span{color:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D .cluster-label span p{background-color:transparent;}#mermaid-svg-PLLFaz0qOkHvZy8D .label text,#mermaid-svg-PLLFaz0qOkHvZy8D span{fill:#333;color:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D .node rect,#mermaid-svg-PLLFaz0qOkHvZy8D .node circle,#mermaid-svg-PLLFaz0qOkHvZy8D .node ellipse,#mermaid-svg-PLLFaz0qOkHvZy8D .node polygon,#mermaid-svg-PLLFaz0qOkHvZy8D .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-PLLFaz0qOkHvZy8D .rough-node .label text,#mermaid-svg-PLLFaz0qOkHvZy8D .node .label text,#mermaid-svg-PLLFaz0qOkHvZy8D .image-shape .label,#mermaid-svg-PLLFaz0qOkHvZy8D .icon-shape .label{text-anchor:middle;}#mermaid-svg-PLLFaz0qOkHvZy8D .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-PLLFaz0qOkHvZy8D .rough-node .label,#mermaid-svg-PLLFaz0qOkHvZy8D .node .label,#mermaid-svg-PLLFaz0qOkHvZy8D .image-shape .label,#mermaid-svg-PLLFaz0qOkHvZy8D .icon-shape .label{text-align:center;}#mermaid-svg-PLLFaz0qOkHvZy8D .node.clickable{cursor:pointer;}#mermaid-svg-PLLFaz0qOkHvZy8D .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-PLLFaz0qOkHvZy8D .arrowheadPath{fill:#333333;}#mermaid-svg-PLLFaz0qOkHvZy8D .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-PLLFaz0qOkHvZy8D .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-PLLFaz0qOkHvZy8D .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-PLLFaz0qOkHvZy8D .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-PLLFaz0qOkHvZy8D .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-PLLFaz0qOkHvZy8D .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-PLLFaz0qOkHvZy8D .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-PLLFaz0qOkHvZy8D .cluster text{fill:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D .cluster span{color:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-PLLFaz0qOkHvZy8D .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-PLLFaz0qOkHvZy8D rect.text{fill:none;stroke-width:0;}#mermaid-svg-PLLFaz0qOkHvZy8D .icon-shape,#mermaid-svg-PLLFaz0qOkHvZy8D .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-PLLFaz0qOkHvZy8D .icon-shape p,#mermaid-svg-PLLFaz0qOkHvZy8D .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-PLLFaz0qOkHvZy8D .icon-shape .label rect,#mermaid-svg-PLLFaz0qOkHvZy8D .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-PLLFaz0qOkHvZy8D .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-PLLFaz0qOkHvZy8D .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-PLLFaz0qOkHvZy8D :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    分类页

    知识全景总结

    学习行动计划

    全部笔记列表

    核心关注点和趋势

    关键技术共性发现

    值得深入的方向

    入门了解: 基础概念

    动手实践: 可立即尝试的工具

    深入研究: 进阶方向

    带链接的表格

    点击跳转到具体笔记

    以 AGENT 分类为例(64 篇笔记),LLM 生成的知识全景总结:

    • 核心趋势:2025-2026 年 AI Agent 从「框架热」转向「工程化」,三大趋势——技能生态化、多智能体专业化、本地化部署
    • 技术共性:上下文工程、工具编排、状态管理等六大核心模块
    • 行动计划:从入门(阅读 Anthropic《Building Effective Agents》)到实践(部署 OpenManus)到深入(研究 Claude Code 六层记忆架构) 在这里插入图片描述

    每个行动项都标注了来源笔记编号和具体的 GitHub 仓库名,可以直接找到来源并开始实验。

    笔记页:结构化知识卡片

    点击分类表中的链接,跳转到具体笔记。每篇笔记的结构:

    #mermaid-svg-JDvpq48tQORCk09Q{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-JDvpq48tQORCk09Q .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-JDvpq48tQORCk09Q .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-JDvpq48tQORCk09Q .error-icon{fill:#552222;}#mermaid-svg-JDvpq48tQORCk09Q .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-JDvpq48tQORCk09Q .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-JDvpq48tQORCk09Q .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-JDvpq48tQORCk09Q .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-JDvpq48tQORCk09Q .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-JDvpq48tQORCk09Q .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-JDvpq48tQORCk09Q .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-JDvpq48tQORCk09Q .marker{fill:#333333;stroke:#333333;}#mermaid-svg-JDvpq48tQORCk09Q .marker.cross{stroke:#333333;}#mermaid-svg-JDvpq48tQORCk09Q svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-JDvpq48tQORCk09Q p{margin:0;}#mermaid-svg-JDvpq48tQORCk09Q .edge{stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .section–1 rect,#mermaid-svg-JDvpq48tQORCk09Q .section–1 path,#mermaid-svg-JDvpq48tQORCk09Q .section–1 circle,#mermaid-svg-JDvpq48tQORCk09Q .section–1 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section–1 path{fill:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section–1 text{fill:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon–1{font-size:40px;color:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge–1{stroke:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth–1{stroke-width:17;}#mermaid-svg-JDvpq48tQORCk09Q .section–1 line{stroke:hsl(60, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-0 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-0 path,#mermaid-svg-JDvpq48tQORCk09Q .section-0 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-0 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-0 path{fill:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-JDvpq48tQORCk09Q .section-0 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-0{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-0{stroke:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-0{stroke-width:14;}#mermaid-svg-JDvpq48tQORCk09Q .section-0 line{stroke:hsl(240, 100%, 83.5294117647%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-1 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-1 path,#mermaid-svg-JDvpq48tQORCk09Q .section-1 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-1 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-1 path{fill:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-1 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-1{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-1{stroke:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-1{stroke-width:11;}#mermaid-svg-JDvpq48tQORCk09Q .section-1 line{stroke:hsl(260, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-2 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-2 path,#mermaid-svg-JDvpq48tQORCk09Q .section-2 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-2 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-2 path{fill:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-2 text{fill:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-2{font-size:40px;color:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-2{stroke:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-2{stroke-width:8;}#mermaid-svg-JDvpq48tQORCk09Q .section-2 line{stroke:hsl(90, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-3 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-3 path,#mermaid-svg-JDvpq48tQORCk09Q .section-3 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-3 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-3 path{fill:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-3 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-3{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-3{stroke:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-3{stroke-width:5;}#mermaid-svg-JDvpq48tQORCk09Q .section-3 line{stroke:hsl(120, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-4 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-4 path,#mermaid-svg-JDvpq48tQORCk09Q .section-4 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-4 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-4 path{fill:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-4 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-4{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-4{stroke:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-4{stroke-width:2;}#mermaid-svg-JDvpq48tQORCk09Q .section-4 line{stroke:hsl(150, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-5 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-5 path,#mermaid-svg-JDvpq48tQORCk09Q .section-5 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-5 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-5 path{fill:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-5 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-5{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-5{stroke:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-5{stroke-width:-1;}#mermaid-svg-JDvpq48tQORCk09Q .section-5 line{stroke:hsl(180, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-6 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-6 path,#mermaid-svg-JDvpq48tQORCk09Q .section-6 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-6 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-6 path{fill:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-6 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-6{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-6{stroke:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-6{stroke-width:-4;}#mermaid-svg-JDvpq48tQORCk09Q .section-6 line{stroke:hsl(210, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-7 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-7 path,#mermaid-svg-JDvpq48tQORCk09Q .section-7 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-7 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-7 path{fill:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-7 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-7{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-7{stroke:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-7{stroke-width:-7;}#mermaid-svg-JDvpq48tQORCk09Q .section-7 line{stroke:hsl(270, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-8 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-8 path,#mermaid-svg-JDvpq48tQORCk09Q .section-8 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-8 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-8 path{fill:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-8 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-8{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-8{stroke:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-8{stroke-width:-10;}#mermaid-svg-JDvpq48tQORCk09Q .section-8 line{stroke:hsl(330, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-9 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-9 path,#mermaid-svg-JDvpq48tQORCk09Q .section-9 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-9 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-9 path{fill:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-9 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-9{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-9{stroke:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-9{stroke-width:-13;}#mermaid-svg-JDvpq48tQORCk09Q .section-9 line{stroke:hsl(0, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-10 rect,#mermaid-svg-JDvpq48tQORCk09Q .section-10 path,#mermaid-svg-JDvpq48tQORCk09Q .section-10 circle,#mermaid-svg-JDvpq48tQORCk09Q .section-10 polygon,#mermaid-svg-JDvpq48tQORCk09Q .section-10 path{fill:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-10 text{fill:black;}#mermaid-svg-JDvpq48tQORCk09Q .node-icon-10{font-size:40px;color:black;}#mermaid-svg-JDvpq48tQORCk09Q .section-edge-10{stroke:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .edge-depth-10{stroke-width:-16;}#mermaid-svg-JDvpq48tQORCk09Q .section-10 line{stroke:hsl(30, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-JDvpq48tQORCk09Q .disabled,#mermaid-svg-JDvpq48tQORCk09Q .disabled circle,#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:lightgray;}#mermaid-svg-JDvpq48tQORCk09Q .disabled text{fill:#efefef;}#mermaid-svg-JDvpq48tQORCk09Q .section-root rect,#mermaid-svg-JDvpq48tQORCk09Q .section-root path,#mermaid-svg-JDvpq48tQORCk09Q .section-root circle,#mermaid-svg-JDvpq48tQORCk09Q .section-root polygon{fill:hsl(240, 100%, 46.2745098039%);}#mermaid-svg-JDvpq48tQORCk09Q .section-root text{fill:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .section-root span{color:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .section-2 span{color:#ffffff;}#mermaid-svg-JDvpq48tQORCk09Q .icon-container{height:100%;display:flex;justify-content:center;align-items:center;}#mermaid-svg-JDvpq48tQORCk09Q .edge{fill:none;}#mermaid-svg-JDvpq48tQORCk09Q .mindmap-node-label{dy:1em;alignment-baseline:middle;text-anchor:middle;dominant-baseline:middle;text-align:center;}#mermaid-svg-JDvpq48tQORCk09Q :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    Obsidian 笔记

    Frontmatter 元数据

    title 标题

    author 作者

    category 分类

    tags 标签列表

    摘要 Callout

    LLM 生成的 3-5 句摘要

    核心要点

    视频中的关键知识点

    资源与工具

    具体的工具名/仓库名/网址

    可行动建议

    开发应用

    生活应用

    技术总结

    原始文稿

    details 折叠

    Whisper 完整转录文字

    • Frontmatter:YAML 元数据,Obsidian 可直接识别 tags 和 category
    • Callout:> [!summary] 渲染为带颜色的提示框
    • Checkbox:- [ ] 是 Obsidian 原生任务列表,可直接勾选
    • Details 折叠:原始转录文字用 HTML <details> 折叠

    笔记间的链接跳转

    在这里插入图片描述

    Obsidian 的核心能力是双向链接。在分类页点击 [[笔记名]] 跳转到具体笔记,笔记中的标签也可以反向检索所有关联笔记。 同时也可以查看某个TAG或者主题的知识图谱: 在这里插入图片描述

    分类体系

    我根据自己关注的内容,确定了 13 个分类:

    分类定义篇数
    AGENT AI 智能体开发、Skills、MCP、Claude Code 64
    AI/ML 大模型通用、模型训练、AI 行业趋势 54
    感悟 个人成长、心理疗愈、认知觉醒 35
    生活技巧 健康养生、职场、社保、科普 24
    其他 无法归类 21
    RAG 检索增强生成、向量检索、知识库问答 21
    创富 创业、投资理财、运营、副业 10
    开发 通用开发工具、GitHub 项目、建站 9
    前端 React/Vue/TypeScript、CSS、UI 框架 8
    运动 徒步、骑行、自驾攻略 8
    文史哲 历史故事、哲学思想、文学诗词 3
    DevOps 运维、HTTPS、CI/CD、云服务 2
    后端 数据库、API 设计、系统设计 2

    #mermaid-svg-xOQA9UBlrsAxuOoD{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-xOQA9UBlrsAxuOoD .error-icon{fill:#552222;}#mermaid-svg-xOQA9UBlrsAxuOoD .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-xOQA9UBlrsAxuOoD .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-xOQA9UBlrsAxuOoD .marker{fill:#333333;stroke:#333333;}#mermaid-svg-xOQA9UBlrsAxuOoD .marker.cross{stroke:#333333;}#mermaid-svg-xOQA9UBlrsAxuOoD svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-xOQA9UBlrsAxuOoD p{margin:0;}#mermaid-svg-xOQA9UBlrsAxuOoD .pieCircle{stroke:#000000;stroke-width:2px;opacity:0.7;}#mermaid-svg-xOQA9UBlrsAxuOoD .pieOuterCircle{stroke:#000000;stroke-width:1px;fill:none;}#mermaid-svg-xOQA9UBlrsAxuOoD .pieTitleText{text-anchor:middle;font-size:25px;fill:#000000;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}#mermaid-svg-xOQA9UBlrsAxuOoD .slice{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;fill:#000000;font-size:17px;}#mermaid-svg-xOQA9UBlrsAxuOoD .legend text{fill:#000000;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:17px;}#mermaid-svg-xOQA9UBlrsAxuOoD :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    25%

    21%

    13%

    9%

    8%

    8%

    4%

    3%

    3%

    3%

    1%

    262条视频分类分布

    AGENT [64]

    AI/ML [54]

    感悟 [35]

    生活技巧 [24]

    其他 [21]

    RAG [21]

    创富 [10]

    开发 [9]

    前端 [8]

    运动 [8]

    文史哲 [3]

    DevOps [2]

    后端 [2]

    TIP: 大家在使用时可以修改代码中分类标准, 按照自己关注点进行 调整 . 现在只需改 config.yaml 一处,所有脚本自动适配:

    自定义分类

    config.yaml — 唯一需要改的地方 categories:

    • name: “RAG” # ← 改分类名 emoji: “🔍” # ← 改图标 description: “检索增强生成…” # ← 改分类描述(影响 LLM 分类准确度)
    • name: “AGENT” emoji: “🤖” description: “AI智能体开发…”

    添加/删除/修改任意分类

    classify_rules: | # ← 改分类边界规则 「开发」vs「DevOps」:… 改完 config.yaml 后,以下流程自动使用新分类:

    • ./run.sh ./downloads/ — 首次分类
    • python reclassify.py — 重新分类
    • python build_vault.py — Vault 构建(emoji、首页排序) 不需要改任何 .py 文件。

    分类边界规则

    LLM 分类时使用的 6 条关键区分规则:

    #mermaid-svg-K70x1eazWZU5rBmc{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-K70x1eazWZU5rBmc .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-K70x1eazWZU5rBmc .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-K70x1eazWZU5rBmc .error-icon{fill:#552222;}#mermaid-svg-K70x1eazWZU5rBmc .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-K70x1eazWZU5rBmc .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-K70x1eazWZU5rBmc .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-K70x1eazWZU5rBmc .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-K70x1eazWZU5rBmc .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-K70x1eazWZU5rBmc .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-K70x1eazWZU5rBmc .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-K70x1eazWZU5rBmc .marker{fill:#333333;stroke:#333333;}#mermaid-svg-K70x1eazWZU5rBmc .marker.cross{stroke:#333333;}#mermaid-svg-K70x1eazWZU5rBmc svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-K70x1eazWZU5rBmc p{margin:0;}#mermaid-svg-K70x1eazWZU5rBmc .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-K70x1eazWZU5rBmc .cluster-label text{fill:#333;}#mermaid-svg-K70x1eazWZU5rBmc .cluster-label span{color:#333;}#mermaid-svg-K70x1eazWZU5rBmc .cluster-label span p{background-color:transparent;}#mermaid-svg-K70x1eazWZU5rBmc .label text,#mermaid-svg-K70x1eazWZU5rBmc span{fill:#333;color:#333;}#mermaid-svg-K70x1eazWZU5rBmc .node rect,#mermaid-svg-K70x1eazWZU5rBmc .node circle,#mermaid-svg-K70x1eazWZU5rBmc .node ellipse,#mermaid-svg-K70x1eazWZU5rBmc .node polygon,#mermaid-svg-K70x1eazWZU5rBmc .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-K70x1eazWZU5rBmc .rough-node .label text,#mermaid-svg-K70x1eazWZU5rBmc .node .label text,#mermaid-svg-K70x1eazWZU5rBmc .image-shape .label,#mermaid-svg-K70x1eazWZU5rBmc .icon-shape .label{text-anchor:middle;}#mermaid-svg-K70x1eazWZU5rBmc .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-K70x1eazWZU5rBmc .rough-node .label,#mermaid-svg-K70x1eazWZU5rBmc .node .label,#mermaid-svg-K70x1eazWZU5rBmc .image-shape .label,#mermaid-svg-K70x1eazWZU5rBmc .icon-shape .label{text-align:center;}#mermaid-svg-K70x1eazWZU5rBmc .node.clickable{cursor:pointer;}#mermaid-svg-K70x1eazWZU5rBmc .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-K70x1eazWZU5rBmc .arrowheadPath{fill:#333333;}#mermaid-svg-K70x1eazWZU5rBmc .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-K70x1eazWZU5rBmc .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-K70x1eazWZU5rBmc .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-K70x1eazWZU5rBmc .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-K70x1eazWZU5rBmc .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-K70x1eazWZU5rBmc .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-K70x1eazWZU5rBmc .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-K70x1eazWZU5rBmc .cluster text{fill:#333;}#mermaid-svg-K70x1eazWZU5rBmc .cluster span{color:#333;}#mermaid-svg-K70x1eazWZU5rBmc div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-K70x1eazWZU5rBmc .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-K70x1eazWZU5rBmc rect.text{fill:none;stroke-width:0;}#mermaid-svg-K70x1eazWZU5rBmc .icon-shape,#mermaid-svg-K70x1eazWZU5rBmc .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-K70x1eazWZU5rBmc .icon-shape p,#mermaid-svg-K70x1eazWZU5rBmc .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-K70x1eazWZU5rBmc .icon-shape .label rect,#mermaid-svg-K70x1eazWZU5rBmc .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-K70x1eazWZU5rBmc .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-K70x1eazWZU5rBmc .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-K70x1eazWZU5rBmc :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    是

    否

    是

    否

    是

    否

    是

    否

    是

    否

    是

    否

    待分类内容

    涉及部署/运维/HTTPS?

    DevOps

    明确涉及 UI 框架?

    前端

    涉及赚钱/商业?

    创富

    具体哲学体系?

    文史哲

    户外活动/徒步?

    运动

    与 AI 强相关?

    AI/ML

    开发 / 其他

    • 开发 vs DevOps:工具/GitHub 项目 → 开发;部署/HTTPS/服务器 → DevOps
    • 创富 vs 感悟:涉及赚钱/商业 → 创富;纯心灵感悟 → 感悟
    • 文史哲 vs 感悟:具体哲学体系(王阳明/国学)→ 文史哲;个人情感 → 感悟
    • 运动 vs 生活技巧:户外活动 → 运动;健康知识/社保 → 生活技巧
    • 开发 vs AI/ML:与大模型强相关 → AI/ML;通用工具 → 开发

    第三部分:代码详解

    项目结构

    #mermaid-svg-4lgZaQpWPD9UMchv{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-4lgZaQpWPD9UMchv .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-4lgZaQpWPD9UMchv .error-icon{fill:#552222;}#mermaid-svg-4lgZaQpWPD9UMchv .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-4lgZaQpWPD9UMchv .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-4lgZaQpWPD9UMchv .marker{fill:#333333;stroke:#333333;}#mermaid-svg-4lgZaQpWPD9UMchv .marker.cross{stroke:#333333;}#mermaid-svg-4lgZaQpWPD9UMchv svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-4lgZaQpWPD9UMchv p{margin:0;}#mermaid-svg-4lgZaQpWPD9UMchv .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-4lgZaQpWPD9UMchv .cluster-label text{fill:#333;}#mermaid-svg-4lgZaQpWPD9UMchv .cluster-label span{color:#333;}#mermaid-svg-4lgZaQpWPD9UMchv .cluster-label span p{background-color:transparent;}#mermaid-svg-4lgZaQpWPD9UMchv .label text,#mermaid-svg-4lgZaQpWPD9UMchv span{fill:#333;color:#333;}#mermaid-svg-4lgZaQpWPD9UMchv .node rect,#mermaid-svg-4lgZaQpWPD9UMchv .node circle,#mermaid-svg-4lgZaQpWPD9UMchv .node ellipse,#mermaid-svg-4lgZaQpWPD9UMchv .node polygon,#mermaid-svg-4lgZaQpWPD9UMchv .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-4lgZaQpWPD9UMchv .rough-node .label text,#mermaid-svg-4lgZaQpWPD9UMchv .node .label text,#mermaid-svg-4lgZaQpWPD9UMchv .image-shape .label,#mermaid-svg-4lgZaQpWPD9UMchv .icon-shape .label{text-anchor:middle;}#mermaid-svg-4lgZaQpWPD9UMchv .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-4lgZaQpWPD9UMchv .rough-node .label,#mermaid-svg-4lgZaQpWPD9UMchv .node .label,#mermaid-svg-4lgZaQpWPD9UMchv .image-shape .label,#mermaid-svg-4lgZaQpWPD9UMchv .icon-shape .label{text-align:center;}#mermaid-svg-4lgZaQpWPD9UMchv .node.clickable{cursor:pointer;}#mermaid-svg-4lgZaQpWPD9UMchv .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-4lgZaQpWPD9UMchv .arrowheadPath{fill:#333333;}#mermaid-svg-4lgZaQpWPD9UMchv .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-4lgZaQpWPD9UMchv .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-4lgZaQpWPD9UMchv .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-4lgZaQpWPD9UMchv .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-4lgZaQpWPD9UMchv .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-4lgZaQpWPD9UMchv .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-4lgZaQpWPD9UMchv .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-4lgZaQpWPD9UMchv .cluster text{fill:#333;}#mermaid-svg-4lgZaQpWPD9UMchv .cluster span{color:#333;}#mermaid-svg-4lgZaQpWPD9UMchv div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-4lgZaQpWPD9UMchv .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-4lgZaQpWPD9UMchv rect.text{fill:none;stroke-width:0;}#mermaid-svg-4lgZaQpWPD9UMchv .icon-shape,#mermaid-svg-4lgZaQpWPD9UMchv .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-4lgZaQpWPD9UMchv .icon-shape p,#mermaid-svg-4lgZaQpWPD9UMchv .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-4lgZaQpWPD9UMchv .icon-shape .label rect,#mermaid-svg-4lgZaQpWPD9UMchv .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-4lgZaQpWPD9UMchv .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-4lgZaQpWPD9UMchv .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-4lgZaQpWPD9UMchv :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    weixin-favor-kb/

    pipeline.py主入口,8步管道

    build_vault.pyVault 构建器

    reclassify.pyLLM 重新分类

    config.yaml统一配置

    run.shCUDA 路径注入

    requirements.txt

    templates/obsidian.mdJinja2 模板

    modules/

    audio.pyffmpeg 音频提取

    transcribe.pyWhisper 语音转录

    frames.py关键帧提取

    ocr.pyRapidOCR

    classifier.pyLLM 分类

    analyzer.pyLLM 分析

    数据流向:

    #mermaid-svg-BmF8I7JeyJJIEDTN{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-BmF8I7JeyJJIEDTN .error-icon{fill:#552222;}#mermaid-svg-BmF8I7JeyJJIEDTN .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-BmF8I7JeyJJIEDTN .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-BmF8I7JeyJJIEDTN .marker{fill:#333333;stroke:#333333;}#mermaid-svg-BmF8I7JeyJJIEDTN .marker.cross{stroke:#333333;}#mermaid-svg-BmF8I7JeyJJIEDTN svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-BmF8I7JeyJJIEDTN p{margin:0;}#mermaid-svg-BmF8I7JeyJJIEDTN .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN .cluster-label text{fill:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN .cluster-label span{color:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN .cluster-label span p{background-color:transparent;}#mermaid-svg-BmF8I7JeyJJIEDTN .label text,#mermaid-svg-BmF8I7JeyJJIEDTN span{fill:#333;color:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN .node rect,#mermaid-svg-BmF8I7JeyJJIEDTN .node circle,#mermaid-svg-BmF8I7JeyJJIEDTN .node ellipse,#mermaid-svg-BmF8I7JeyJJIEDTN .node polygon,#mermaid-svg-BmF8I7JeyJJIEDTN .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-BmF8I7JeyJJIEDTN .rough-node .label text,#mermaid-svg-BmF8I7JeyJJIEDTN .node .label text,#mermaid-svg-BmF8I7JeyJJIEDTN .image-shape .label,#mermaid-svg-BmF8I7JeyJJIEDTN .icon-shape .label{text-anchor:middle;}#mermaid-svg-BmF8I7JeyJJIEDTN .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-BmF8I7JeyJJIEDTN .rough-node .label,#mermaid-svg-BmF8I7JeyJJIEDTN .node .label,#mermaid-svg-BmF8I7JeyJJIEDTN .image-shape .label,#mermaid-svg-BmF8I7JeyJJIEDTN .icon-shape .label{text-align:center;}#mermaid-svg-BmF8I7JeyJJIEDTN .node.clickable{cursor:pointer;}#mermaid-svg-BmF8I7JeyJJIEDTN .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-BmF8I7JeyJJIEDTN .arrowheadPath{fill:#333333;}#mermaid-svg-BmF8I7JeyJJIEDTN .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-BmF8I7JeyJJIEDTN .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-BmF8I7JeyJJIEDTN .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-BmF8I7JeyJJIEDTN .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-BmF8I7JeyJJIEDTN .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-BmF8I7JeyJJIEDTN .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-BmF8I7JeyJJIEDTN .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-BmF8I7JeyJJIEDTN .cluster text{fill:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN .cluster span{color:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-BmF8I7JeyJJIEDTN .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-BmF8I7JeyJJIEDTN rect.text{fill:none;stroke-width:0;}#mermaid-svg-BmF8I7JeyJJIEDTN .icon-shape,#mermaid-svg-BmF8I7JeyJJIEDTN .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-BmF8I7JeyJJIEDTN .icon-shape p,#mermaid-svg-BmF8I7JeyJJIEDTN .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-BmF8I7JeyJJIEDTN .icon-shape .label rect,#mermaid-svg-BmF8I7JeyJJIEDTN .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-BmF8I7JeyJJIEDTN .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-BmF8I7JeyJJIEDTN .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-BmF8I7JeyJJIEDTN :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    MP4 视频

    audio.pyWAV 音频

    frames.py关键帧 JPG

    transcribe.py转录文字

    ocr.py画面文字

    合并文本

    classifier.py分类 + 标签

    analyzer.py摘要/要点/资源/建议

    Jinja2 模板Obsidian 笔记 MD

    主流程 pipeline.py

    pipeline.py 是整个流水线的入口,负责协调所有模块。

    build_vault.py

    Jinja2 模板

    analyzer.py

    classifier.py

    ocr.py

    frames.py

    transcribe.py

    audio.py

    config.yaml

    Pipeline

    User

    build_vault.py

    Jinja2 模板

    analyzer.py

    classifier.py

    ocr.py

    frames.py

    transcribe.py

    audio.py

    config.yaml

    Pipeline

    User

    #mermaid-svg-5Jgvl2AktpLBlhUc{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-5Jgvl2AktpLBlhUc .error-icon{fill:#552222;}#mermaid-svg-5Jgvl2AktpLBlhUc .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-5Jgvl2AktpLBlhUc .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-5Jgvl2AktpLBlhUc .marker{fill:#333333;stroke:#333333;}#mermaid-svg-5Jgvl2AktpLBlhUc .marker.cross{stroke:#333333;}#mermaid-svg-5Jgvl2AktpLBlhUc svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-5Jgvl2AktpLBlhUc p{margin:0;}#mermaid-svg-5Jgvl2AktpLBlhUc .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-5Jgvl2AktpLBlhUc text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-5Jgvl2AktpLBlhUc .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-5Jgvl2AktpLBlhUc .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-5Jgvl2AktpLBlhUc #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-5Jgvl2AktpLBlhUc .sequenceNumber{fill:white;}#mermaid-svg-5Jgvl2AktpLBlhUc #sequencenumber{fill:#333;}#mermaid-svg-5Jgvl2AktpLBlhUc #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-5Jgvl2AktpLBlhUc .messageText{fill:#333;stroke:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-5Jgvl2AktpLBlhUc .labelText,#mermaid-svg-5Jgvl2AktpLBlhUc .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .loopText,#mermaid-svg-5Jgvl2AktpLBlhUc .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-5Jgvl2AktpLBlhUc .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-5Jgvl2AktpLBlhUc .noteText,#mermaid-svg-5Jgvl2AktpLBlhUc .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-5Jgvl2AktpLBlhUc .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-5Jgvl2AktpLBlhUc .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-5Jgvl2AktpLBlhUc .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-5Jgvl2AktpLBlhUc .actorPopupMenu{position:absolute;}#mermaid-svg-5Jgvl2AktpLBlhUc .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-5Jgvl2AktpLBlhUc .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-5Jgvl2AktpLBlhUc .actor-man circle,#mermaid-svg-5Jgvl2AktpLBlhUc line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-5Jgvl2AktpLBlhUc :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    loop

    [每个视频]

    ./run.sh ./downloads/

    load_config()

    collect_videos() 递归扫描

    extract_audio()

    audio.wav

    transcribe()

    {text, segments}

    extract_keyframes()

    [keyframe_paths]

    batch_extract()

    [ocr_texts]

    classify_content()

    (category, tags)

    analyze()

    {summary, key_points, …}

    render()

    note.md

    subprocess 自动调用

    Obsidian Vault 完成

    Rich 报告表格

    配置加载

    def load_config(config_path: str) –> dict:
    defaults = {
    "whisper": {"model_size": "large-v3", "device": "cuda", ...},
    "llm": {"api_key": "", "base_url": "…", "model": "gpt-4o"},
    ...
    }
    if path.exists():
    user_config = yaml.safe_load(f)
    _deep_merge(defaults, user_config)
    return defaults

    设计思路:定义完整的默认配置,用户只需在 config.yaml 中写需要覆盖的字段。_deep_merge 递归合并,避免用户遗漏某个子字段就全盘失效。

    视频收集

    def collect_videos(input_path: str) –> list[Path]:
    videos = sorted(
    f for f in p.rglob("*")
    if f.is_file() and f.suffix.lower() in VIDEO_EXTENSIONS
    )

    rglob("*") 递归扫描,适配 wx_channel 按作者名分类的多层目录结构。

    process_video:8 步管道

    每个视频经历 8 个步骤:

  • ffmpeg 提取音频 → audio.wav
  • Whisper 转录 → {"text": "…", "segments": […]}
  • OpenCV 关键帧 → [keyframe_000.jpg, …]
  • RapidOCR → [ocr_text1, …]
  • LLM 分类 → ("AGENT", ["Claude Code", "MCP"])
  • LLM 分析 → {summary, key_points, resources, action_items}
  • 保存转录稿 → output/transcripts/xxx.txt
  • Jinja2 渲染 → output/notes/xxx.md
  • 任何一步异常,整个视频标记为 failed 并跳过,不影响后续视频处理。

    自动构建 Vault

    if any(r["status"] == "success" for r in results):
    subprocess.run([sys.executable, "build_vault.py"])

    只要有视频处理成功,pipeline 结束后自动调用 build_vault.py 构建 Obsidian Vault。用户无需手动执行。

    音频提取 modules/audio.py

    cmd = [
    "ffmpeg",
    "-i", str(video),
    "-vn", # 丢弃视频流
    "-acodec", "pcm_s16le", # PCM 16-bit 编码
    "-ar", "16000", # 16kHz 采样率
    "-ac", "1", # 单声道
    "-y",
    str(output),
    ]

    三个关键参数:

    • -ar 16000:Whisper 模型在 16kHz 下训练,采样率不匹配会显著降低准确率
    • -ac 1:Whisper 内部会将输入转为单声道,提前转换省去运行时开销
    • pcm_s16le:无损 PCM 编码,避免压缩引入的额外噪声

    超时设为 600 秒,足以覆盖 1 小时的视频。

    语音转文字 modules/transcribe.py

    延迟加载

    class Transcriber:
    def __init__(self, model_size, device, compute_type):
    self._model = None # 不在 __init__ 中加载

    def _load_model(self):
    if self._model is not None:
    return
    _ensure_cuda_libs()
    from faster_whisper import WhisperModel
    self._model = WhisperModel(
    self.model_size,
    device=self.device,
    compute_type=self.compute_type,
    )

    _model 初始为 None,首次调用 transcribe() 时才加载。这样 import 时不占显存,多个 Transcriber 实例也不会重复加载。

    CUDA 路径注入

    WSL 环境下 ctranslate2(faster-whisper 底层引擎)可能在 Python 启动时就加载 CUDA 库。如果 LD_LIBRARY_PATH 中找不到,直接崩溃。解决方案是在 _load_model() 前注入路径:

    def _ensure_cuda_libs():
    if os.environ.get("_CUDA_LIBS_INJECTED"):
    return
    # 扫描 CUDA_FALLBACK_DIRS,将找到的 lib 目录加入 LD_LIBRARY_PATH
    ...
    os.environ["_CUDA_LIBS_INJECTED"] = "1"

    用 _CUDA_LIBS_INJECTED 标记位防止重复注入。

    int8 量化

    compute_type="int8_float16"

    large-v3 模型全精度需要 ~10GB 显存。int8_float16 量化后仅需 ~3GB,在 8GB 显卡上留出足够余量给 OCR 和系统开销。精度损失在中文场景下可忽略。

    VAD 过滤

    segments_iter, info = self._model.transcribe(
    str(audio),
    language="zh",
    beam_size=5,
    vad_filter=True,
    vad_parameters=dict(
    min_silence_duration_ms=500,
    speech_pad_ms=200,
    ),
    )

    • vad_filter=True:自动检测语音段,跳过静音。短视频常有几秒片头空白,VAD 可以精准裁掉
    • beam_size=5:beam search 宽度,5 是速度与准确率的平衡点
    • language="zh":显式指定中文,避免模型自动检测带来的开销和误判

    关键帧提取 modules/frames.py

    #mermaid-svg-SvUIClbgYe08mzrt{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-SvUIClbgYe08mzrt .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-SvUIClbgYe08mzrt .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-SvUIClbgYe08mzrt .error-icon{fill:#552222;}#mermaid-svg-SvUIClbgYe08mzrt .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-SvUIClbgYe08mzrt .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-SvUIClbgYe08mzrt .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-SvUIClbgYe08mzrt .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-SvUIClbgYe08mzrt .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-SvUIClbgYe08mzrt .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-SvUIClbgYe08mzrt .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-SvUIClbgYe08mzrt .marker{fill:#333333;stroke:#333333;}#mermaid-svg-SvUIClbgYe08mzrt .marker.cross{stroke:#333333;}#mermaid-svg-SvUIClbgYe08mzrt svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-SvUIClbgYe08mzrt p{margin:0;}#mermaid-svg-SvUIClbgYe08mzrt .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-SvUIClbgYe08mzrt .cluster-label text{fill:#333;}#mermaid-svg-SvUIClbgYe08mzrt .cluster-label span{color:#333;}#mermaid-svg-SvUIClbgYe08mzrt .cluster-label span p{background-color:transparent;}#mermaid-svg-SvUIClbgYe08mzrt .label text,#mermaid-svg-SvUIClbgYe08mzrt span{fill:#333;color:#333;}#mermaid-svg-SvUIClbgYe08mzrt .node rect,#mermaid-svg-SvUIClbgYe08mzrt .node circle,#mermaid-svg-SvUIClbgYe08mzrt .node ellipse,#mermaid-svg-SvUIClbgYe08mzrt .node polygon,#mermaid-svg-SvUIClbgYe08mzrt .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-SvUIClbgYe08mzrt .rough-node .label text,#mermaid-svg-SvUIClbgYe08mzrt .node .label text,#mermaid-svg-SvUIClbgYe08mzrt .image-shape .label,#mermaid-svg-SvUIClbgYe08mzrt .icon-shape .label{text-anchor:middle;}#mermaid-svg-SvUIClbgYe08mzrt .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-SvUIClbgYe08mzrt .rough-node .label,#mermaid-svg-SvUIClbgYe08mzrt .node .label,#mermaid-svg-SvUIClbgYe08mzrt .image-shape .label,#mermaid-svg-SvUIClbgYe08mzrt .icon-shape .label{text-align:center;}#mermaid-svg-SvUIClbgYe08mzrt .node.clickable{cursor:pointer;}#mermaid-svg-SvUIClbgYe08mzrt .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-SvUIClbgYe08mzrt .arrowheadPath{fill:#333333;}#mermaid-svg-SvUIClbgYe08mzrt .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-SvUIClbgYe08mzrt .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-SvUIClbgYe08mzrt .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SvUIClbgYe08mzrt .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-SvUIClbgYe08mzrt .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SvUIClbgYe08mzrt .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-SvUIClbgYe08mzrt .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-SvUIClbgYe08mzrt .cluster text{fill:#333;}#mermaid-svg-SvUIClbgYe08mzrt .cluster span{color:#333;}#mermaid-svg-SvUIClbgYe08mzrt div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-SvUIClbgYe08mzrt .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-SvUIClbgYe08mzrt rect.text{fill:none;stroke-width:0;}#mermaid-svg-SvUIClbgYe08mzrt .icon-shape,#mermaid-svg-SvUIClbgYe08mzrt .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SvUIClbgYe08mzrt .icon-shape p,#mermaid-svg-SvUIClbgYe08mzrt .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-SvUIClbgYe08mzrt .icon-shape .label rect,#mermaid-svg-SvUIClbgYe08mzrt .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SvUIClbgYe08mzrt .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-SvUIClbgYe08mzrt .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-SvUIClbgYe08mzrt :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    第一帧

    有

    是

    否

    是

    否

    视频结束

    读取下一帧

    转为 HSV 计算直方图

    有前一帧?

    直接保存

    cv2.compareHist计算相关性

    diff_score = 1 – correlation

    diff > 30?

    保存为关键帧

    跳过

    已保存 >= 20 帧?

    结束

    算法原理

    def _compute_hsv_histogram(frame):
    hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
    hist = cv2.calcHist([hsv], [0, 1], None, [50, 60], [0, 180, 0, 256])
    cv2.normalize(hist, hist)
    return hist.flatten()

  • 将 BGR 帧转为 HSV 色彩空间(HSV 对光照变化更鲁棒)
  • 计算 H 和 S 通道的 2D 直方图(50×60 = 3000 维特征向量)
  • 归一化后作为帧的「视觉指纹」
  • correlation = cv2.compareHist(prev_hist, current_hist, cv2.HISTCMP_CORREL)
    diff_score = (1.0 – correlation) * 100.0

    if diff_score > threshold: # 默认 30
    save_frame(...)

    HISTCMP_CORREL 返回 [-1, 1] 的相关系数。转换为百分比差异后,阈值 30 表示「视觉内容变化超过 30%」时判定为场景切换。

    为什么不用 SSIM 或像素差异

    • 直方图:对平移、缩放有一定容忍度,计算快
    • SSIM:更精确但慢 10 倍,关键帧提取不需要像素级精度
    • 像素差异:对光照变化极其敏感,误报率高

    max_frames=20 是安全上限,防止某些快速剪辑视频产生数百帧。

    OCR modules/ocr.py

    class OCRProcessor:
    def extract_text(self, image_path: str) –> str:
    result, _ = self._engine(str(img))
    texts = [item[1] for item in result if item[2] >= self.confidence_threshold]
    return " ".join(texts)

    def batch_extract(self, image_paths: list[str]) –> list[str]:
    for path in image_paths:
    results.append(self.extract_text(path))
    return results

    同样采用延迟加载。confidence_threshold=0.5 过滤掉低置信度的噪声结果(模糊帧、纯色背景误识别等)。

    为什么需要 OCR?很多技术视频在画面中展示代码、PPT、架构图,这些视觉信息是纯语音转文字无法获取的。OCR 把画面文字补充进来,让 LLM 分析时有更完整的上下文。

    LLM 分类 modules/classifier.py

    无限重试机制

    #mermaid-svg-SP7JHofxlccembR6{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-SP7JHofxlccembR6 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-SP7JHofxlccembR6 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-SP7JHofxlccembR6 .error-icon{fill:#552222;}#mermaid-svg-SP7JHofxlccembR6 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-SP7JHofxlccembR6 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-SP7JHofxlccembR6 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-SP7JHofxlccembR6 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-SP7JHofxlccembR6 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-SP7JHofxlccembR6 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-SP7JHofxlccembR6 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-SP7JHofxlccembR6 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-SP7JHofxlccembR6 .marker.cross{stroke:#333333;}#mermaid-svg-SP7JHofxlccembR6 svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-SP7JHofxlccembR6 p{margin:0;}#mermaid-svg-SP7JHofxlccembR6 .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-SP7JHofxlccembR6 .cluster-label text{fill:#333;}#mermaid-svg-SP7JHofxlccembR6 .cluster-label span{color:#333;}#mermaid-svg-SP7JHofxlccembR6 .cluster-label span p{background-color:transparent;}#mermaid-svg-SP7JHofxlccembR6 .label text,#mermaid-svg-SP7JHofxlccembR6 span{fill:#333;color:#333;}#mermaid-svg-SP7JHofxlccembR6 .node rect,#mermaid-svg-SP7JHofxlccembR6 .node circle,#mermaid-svg-SP7JHofxlccembR6 .node ellipse,#mermaid-svg-SP7JHofxlccembR6 .node polygon,#mermaid-svg-SP7JHofxlccembR6 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-SP7JHofxlccembR6 .rough-node .label text,#mermaid-svg-SP7JHofxlccembR6 .node .label text,#mermaid-svg-SP7JHofxlccembR6 .image-shape .label,#mermaid-svg-SP7JHofxlccembR6 .icon-shape .label{text-anchor:middle;}#mermaid-svg-SP7JHofxlccembR6 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-SP7JHofxlccembR6 .rough-node .label,#mermaid-svg-SP7JHofxlccembR6 .node .label,#mermaid-svg-SP7JHofxlccembR6 .image-shape .label,#mermaid-svg-SP7JHofxlccembR6 .icon-shape .label{text-align:center;}#mermaid-svg-SP7JHofxlccembR6 .node.clickable{cursor:pointer;}#mermaid-svg-SP7JHofxlccembR6 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-SP7JHofxlccembR6 .arrowheadPath{fill:#333333;}#mermaid-svg-SP7JHofxlccembR6 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-SP7JHofxlccembR6 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-SP7JHofxlccembR6 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SP7JHofxlccembR6 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-SP7JHofxlccembR6 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SP7JHofxlccembR6 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-SP7JHofxlccembR6 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-SP7JHofxlccembR6 .cluster text{fill:#333;}#mermaid-svg-SP7JHofxlccembR6 .cluster span{color:#333;}#mermaid-svg-SP7JHofxlccembR6 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-SP7JHofxlccembR6 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-SP7JHofxlccembR6 rect.text{fill:none;stroke-width:0;}#mermaid-svg-SP7JHofxlccembR6 .icon-shape,#mermaid-svg-SP7JHofxlccembR6 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SP7JHofxlccembR6 .icon-shape p,#mermaid-svg-SP7JHofxlccembR6 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-SP7JHofxlccembR6 .icon-shape .label rect,#mermaid-svg-SP7JHofxlccembR6 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SP7JHofxlccembR6 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-SP7JHofxlccembR6 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-SP7JHofxlccembR6 :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    是

    异常/空内容

    调用 LLM API

    返回有效内容?

    返回结果

    等待 delay 秒

    delay = min(delay * 2, 120)

    def _llm_call_with_retry(client, model, messages, ...):
    delay = 5
    while True:
    try:
    response = client.chat.completions.create(...)
    content = msg.content or msg.reasoning or ""
    if content.strip():
    return content
    except Exception:
    pass
    time.sleep(delay)
    delay = min(delay * BACKOFF_FACTOR, MAX_DELAY) # 5→10→20→40→80→120→120…

    设计原则:分类不能失败。一个视频如果丢失分类信息,后续的 Vault 构建和检索就会断裂。所以采用无限重试 + 指数退避(5s → 10s → 20s → … → 120s 封顶)。

    分类 Prompt 设计

    CATEGORIES = [
    "RAG", "AGENT", "AI/ML", "前端", "后端",
    "DevOps", "开发", "创富", "文史哲", "感悟",
    "运动", "生活技巧", "其他",
    ]

    Prompt 中不仅列出了类别名称,还包含了每类的定义和区分规则(如「开发 vs DevOps」),让 LLM 在边界情况下也能做出准确判断。

    JSON 提取容错

    def _extract_json(text):
    if "```json" in text:
    text = text.split("```json")[1].split("```")[0]
    elif "```" in text:
    text = text.split("```")[1].split("```")[0]
    return json.loads(text.strip())

    LLM 经常把 JSON 包在 markdown 代码块中返回。这段代码自动剥离代码块标记,提取纯 JSON。解析失败时回退到 "其他" 分类。

    LLM 深度分析 modules/analyzer.py

    #mermaid-svg-69b8oSPUuANOIIiu{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-69b8oSPUuANOIIiu .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-69b8oSPUuANOIIiu .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-69b8oSPUuANOIIiu .error-icon{fill:#552222;}#mermaid-svg-69b8oSPUuANOIIiu .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-69b8oSPUuANOIIiu .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-69b8oSPUuANOIIiu .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-69b8oSPUuANOIIiu .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-69b8oSPUuANOIIiu .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-69b8oSPUuANOIIiu .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-69b8oSPUuANOIIiu .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-69b8oSPUuANOIIiu .marker{fill:#333333;stroke:#333333;}#mermaid-svg-69b8oSPUuANOIIiu .marker.cross{stroke:#333333;}#mermaid-svg-69b8oSPUuANOIIiu svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-69b8oSPUuANOIIiu p{margin:0;}#mermaid-svg-69b8oSPUuANOIIiu .edge{stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .section–1 rect,#mermaid-svg-69b8oSPUuANOIIiu .section–1 path,#mermaid-svg-69b8oSPUuANOIIiu .section–1 circle,#mermaid-svg-69b8oSPUuANOIIiu .section–1 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section–1 path{fill:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section–1 text{fill:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon–1{font-size:40px;color:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge–1{stroke:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth–1{stroke-width:17;}#mermaid-svg-69b8oSPUuANOIIiu .section–1 line{stroke:hsl(60, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-0 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-0 path,#mermaid-svg-69b8oSPUuANOIIiu .section-0 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-0 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-0 path{fill:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-69b8oSPUuANOIIiu .section-0 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-0{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-0{stroke:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-0{stroke-width:14;}#mermaid-svg-69b8oSPUuANOIIiu .section-0 line{stroke:hsl(240, 100%, 83.5294117647%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-1 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-1 path,#mermaid-svg-69b8oSPUuANOIIiu .section-1 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-1 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-1 path{fill:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-1 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-1{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-1{stroke:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-1{stroke-width:11;}#mermaid-svg-69b8oSPUuANOIIiu .section-1 line{stroke:hsl(260, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-2 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-2 path,#mermaid-svg-69b8oSPUuANOIIiu .section-2 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-2 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-2 path{fill:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-2 text{fill:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-2{font-size:40px;color:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-2{stroke:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-2{stroke-width:8;}#mermaid-svg-69b8oSPUuANOIIiu .section-2 line{stroke:hsl(90, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-3 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-3 path,#mermaid-svg-69b8oSPUuANOIIiu .section-3 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-3 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-3 path{fill:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-3 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-3{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-3{stroke:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-3{stroke-width:5;}#mermaid-svg-69b8oSPUuANOIIiu .section-3 line{stroke:hsl(120, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-4 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-4 path,#mermaid-svg-69b8oSPUuANOIIiu .section-4 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-4 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-4 path{fill:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-4 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-4{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-4{stroke:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-4{stroke-width:2;}#mermaid-svg-69b8oSPUuANOIIiu .section-4 line{stroke:hsl(150, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-5 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-5 path,#mermaid-svg-69b8oSPUuANOIIiu .section-5 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-5 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-5 path{fill:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-5 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-5{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-5{stroke:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-5{stroke-width:-1;}#mermaid-svg-69b8oSPUuANOIIiu .section-5 line{stroke:hsl(180, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-6 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-6 path,#mermaid-svg-69b8oSPUuANOIIiu .section-6 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-6 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-6 path{fill:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-6 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-6{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-6{stroke:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-6{stroke-width:-4;}#mermaid-svg-69b8oSPUuANOIIiu .section-6 line{stroke:hsl(210, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-7 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-7 path,#mermaid-svg-69b8oSPUuANOIIiu .section-7 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-7 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-7 path{fill:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-7 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-7{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-7{stroke:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-7{stroke-width:-7;}#mermaid-svg-69b8oSPUuANOIIiu .section-7 line{stroke:hsl(270, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-8 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-8 path,#mermaid-svg-69b8oSPUuANOIIiu .section-8 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-8 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-8 path{fill:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-8 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-8{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-8{stroke:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-8{stroke-width:-10;}#mermaid-svg-69b8oSPUuANOIIiu .section-8 line{stroke:hsl(330, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-9 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-9 path,#mermaid-svg-69b8oSPUuANOIIiu .section-9 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-9 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-9 path{fill:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-9 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-9{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-9{stroke:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-9{stroke-width:-13;}#mermaid-svg-69b8oSPUuANOIIiu .section-9 line{stroke:hsl(0, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-10 rect,#mermaid-svg-69b8oSPUuANOIIiu .section-10 path,#mermaid-svg-69b8oSPUuANOIIiu .section-10 circle,#mermaid-svg-69b8oSPUuANOIIiu .section-10 polygon,#mermaid-svg-69b8oSPUuANOIIiu .section-10 path{fill:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-10 text{fill:black;}#mermaid-svg-69b8oSPUuANOIIiu .node-icon-10{font-size:40px;color:black;}#mermaid-svg-69b8oSPUuANOIIiu .section-edge-10{stroke:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .edge-depth-10{stroke-width:-16;}#mermaid-svg-69b8oSPUuANOIIiu .section-10 line{stroke:hsl(30, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-69b8oSPUuANOIIiu .disabled,#mermaid-svg-69b8oSPUuANOIIiu .disabled circle,#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:lightgray;}#mermaid-svg-69b8oSPUuANOIIiu .disabled text{fill:#efefef;}#mermaid-svg-69b8oSPUuANOIIiu .section-root rect,#mermaid-svg-69b8oSPUuANOIIiu .section-root path,#mermaid-svg-69b8oSPUuANOIIiu .section-root circle,#mermaid-svg-69b8oSPUuANOIIiu .section-root polygon{fill:hsl(240, 100%, 46.2745098039%);}#mermaid-svg-69b8oSPUuANOIIiu .section-root text{fill:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .section-root span{color:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .section-2 span{color:#ffffff;}#mermaid-svg-69b8oSPUuANOIIiu .icon-container{height:100%;display:flex;justify-content:center;align-items:center;}#mermaid-svg-69b8oSPUuANOIIiu .edge{fill:none;}#mermaid-svg-69b8oSPUuANOIIiu .mindmap-node-label{dy:1em;alignment-baseline:middle;text-anchor:middle;dominant-baseline:middle;text-align:center;}#mermaid-svg-69b8oSPUuANOIIiu :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    LLM 分析输出

    summary 摘要

    3-5 句精炼概括

    用于分类页表格展示

    key_points 核心要点

    视频中的关键知识点

    方法论提取

    resources 资源

    工具名称

    GitHub 仓库名

    网站 URL

    action_items 行动建议

    dev 开发应用

    life 生活应用

    tech_summary 技术总结

    与分类模块的差异:

    classifieranalyzer
    目的 确定类别 提取知识
    temperature 0.1(追求确定性) 0.3(允许创造性)
    max_tokens 4096 8192
    输入 截断 1500 字 截断 4000 字
    输出 {category, tags} {summary, key_points, resources, action_items}

    分类追求确定性(低 temperature),分析追求信息丰富度(稍高 temperature + 更大 token 预算)。

    推理模型兼容

    content = msg.content or msg.reasoning or ""

    MiniMax-M2.5 等推理模型会先输出推理过程(reasoning),再输出正式回答(content)。如果 max_tokens 不够大,content 可能为 None,此时回退到 reasoning 字段。这就是为什么分析请求的 max_tokens 设为 8192——给推理过程留出足够空间。

    Obsidian Vault 构建 build_vault.py

    #mermaid-svg-SGt2ak8NrhE1BGMx{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-SGt2ak8NrhE1BGMx .error-icon{fill:#552222;}#mermaid-svg-SGt2ak8NrhE1BGMx .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-SGt2ak8NrhE1BGMx .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-SGt2ak8NrhE1BGMx .marker{fill:#333333;stroke:#333333;}#mermaid-svg-SGt2ak8NrhE1BGMx .marker.cross{stroke:#333333;}#mermaid-svg-SGt2ak8NrhE1BGMx svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-SGt2ak8NrhE1BGMx p{margin:0;}#mermaid-svg-SGt2ak8NrhE1BGMx .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx .cluster-label text{fill:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx .cluster-label span{color:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx .cluster-label span p{background-color:transparent;}#mermaid-svg-SGt2ak8NrhE1BGMx .label text,#mermaid-svg-SGt2ak8NrhE1BGMx span{fill:#333;color:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx .node rect,#mermaid-svg-SGt2ak8NrhE1BGMx .node circle,#mermaid-svg-SGt2ak8NrhE1BGMx .node ellipse,#mermaid-svg-SGt2ak8NrhE1BGMx .node polygon,#mermaid-svg-SGt2ak8NrhE1BGMx .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-SGt2ak8NrhE1BGMx .rough-node .label text,#mermaid-svg-SGt2ak8NrhE1BGMx .node .label text,#mermaid-svg-SGt2ak8NrhE1BGMx .image-shape .label,#mermaid-svg-SGt2ak8NrhE1BGMx .icon-shape .label{text-anchor:middle;}#mermaid-svg-SGt2ak8NrhE1BGMx .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-SGt2ak8NrhE1BGMx .rough-node .label,#mermaid-svg-SGt2ak8NrhE1BGMx .node .label,#mermaid-svg-SGt2ak8NrhE1BGMx .image-shape .label,#mermaid-svg-SGt2ak8NrhE1BGMx .icon-shape .label{text-align:center;}#mermaid-svg-SGt2ak8NrhE1BGMx .node.clickable{cursor:pointer;}#mermaid-svg-SGt2ak8NrhE1BGMx .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-SGt2ak8NrhE1BGMx .arrowheadPath{fill:#333333;}#mermaid-svg-SGt2ak8NrhE1BGMx .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-SGt2ak8NrhE1BGMx .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-SGt2ak8NrhE1BGMx .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SGt2ak8NrhE1BGMx .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-SGt2ak8NrhE1BGMx .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SGt2ak8NrhE1BGMx .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-SGt2ak8NrhE1BGMx .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-SGt2ak8NrhE1BGMx .cluster text{fill:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx .cluster span{color:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-SGt2ak8NrhE1BGMx .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-SGt2ak8NrhE1BGMx rect.text{fill:none;stroke-width:0;}#mermaid-svg-SGt2ak8NrhE1BGMx .icon-shape,#mermaid-svg-SGt2ak8NrhE1BGMx .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SGt2ak8NrhE1BGMx .icon-shape p,#mermaid-svg-SGt2ak8NrhE1BGMx .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-SGt2ak8NrhE1BGMx .icon-shape .label rect,#mermaid-svg-SGt2ak8NrhE1BGMx .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SGt2ak8NrhE1BGMx .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-SGt2ak8NrhE1BGMx .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-SGt2ak8NrhE1BGMx :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    是

    否

    解析 output/notes/ 下所有 MD

    提取 frontmatter 元数据

    按 category 分组

    复制笔记到 vault 根目录

    对每个分类生成汇总页

    技术类?

    技术顾问 Prompt入门→实践→深入 三阶段

    生活顾问 Prompt智慧总结 + 实践建议

    LLM 生成知识全景 + 行动计划

    写入分类 MD(含笔记链接表格)

    生成首页 MD

    Vault 完成

    统一配置读取

    def _load_llm_config():
    cfg_path = Path("config.yaml")
    if cfg_path.exists():
    cfg = yaml.safe_load(f)
    llm = cfg.get("llm", {})
    return llm.get("api_key"), llm.get("base_url"), llm.get("model")
    return os.environ.get("LLM_API_KEY", ""), ...

    build_vault.py 和 reclassify.py 都通过这个函数从 config.yaml 读取 LLM 配置。找不到 config.yaml 时回退到环境变量。

    文件名清理

    safe_title = re.sub(
    r'[#*?:"<>|/\\\\()【】{}《》「」:;!?…—\\-]',
    '', title
    )[:50].strip()

    微信视频号标题常含全角括号 ()、全角冒号 :,这些字符在 Obsidian 的 wikilink 中会导致链接解析异常。清理后只保留安全字符,截断到 50 字符避免文件名过长。

    笔记去重

    short_id = stem.rsplit("_", 1)[–1]
    if short_id in seen:
    continue
    seen.add(short_id)

    从文件名提取视频 ID 作为唯一标识,跳过重复视频。

    技术类 vs 非技术类的不同 Prompt

    is_tech = cat in ("RAG", "AGENT", "AI/ML", "前端", "后端", "DevOps")

    技术类分类用「资深技术顾问」角色,输出三阶段行动计划(入门→实践→深入),要求引用具体 GitHub 仓库名。非技术类用「智慧的生活顾问」角色,输出 3-8 条实践建议。

    Obsidian 链接处理

    分类页的笔记表格使用 [[filename]] 链接,而不是 [[filename|显示名]]。因为 Markdown 表格用 | 分隔列,Obsidian 链接中的 | 会被表格解析器截断。

    重新分类 reclassify.py

    当你对自动分类不满意时,可以单独运行:

    python reclassify.py

    它会:

  • 读取所有笔记的 frontmatter 和摘要
  • 用更详细的分类 Prompt(包含 13 类的定义和区分规则)重新分类
  • 写回 frontmatter 中的 category 和 tags
  • 与初次分类的区别:reclassify 使用了更详细的 Prompt,包含每类的定义和 6 条区分规则,分类准确率更高。初次分类为了速度,Prompt 较简短。

    Jinja2 模板 templates/obsidian.md

    —
    title: "{{ title }}"
    category: "{{ category }}"
    tags:
    {% for tag in tags %} – {{ tag }}
    {% endfor %}
    —

    > [!summary] 摘要
    > {{ summary }}

    ## ✅ 可行动建议
    ### 💻 开发应用
    {% for item in action_items.dev %}
    – [ ] {{ item }}
    {% endfor %}

    <details>
    <summary>点击展开完整转录文字</summary>
    {{ transcript }}
    </details>

    关键设计:

    • Frontmatter:Obsidian 原生识别 tags 列表,可以直接在标签面板中筛选
    • Callout:> [!summary] 是 Obsidian 原生语法,渲染为蓝色提示框
    • Checkbox:- [ ] 是 Obsidian 任务列表,可在笔记中直接勾选完成
    • Details 折叠:转录文字可能数千字,折叠后不影响阅读体验

    踩坑记录

    坑 1:WSL 下 CUDA 库找不到

    现象:RuntimeError: Library libcublas.so.12 is not found

    原因:WSL 环境下 CUDA 运行库不在系统 LD_LIBRARY_PATH 中。ctranslate2 在 Python 启动时(而非 import 时)就尝试 dlopen CUDA 库。

    解决:run.sh 在 Python 进程启动前设置 LD_LIBRARY_PATH。可以从系统中其他已安装 CUDA 的 venv 中复用库路径。关键点:必须在进程启动前设置,Python 运行时修改 os.environ 无效。

    坑 2:推理模型 max_tokens 太小

    现象:LLM 返回 content: None,只有 reasoning 有内容

    原因:推理模型先输出推理过程,再输出正式回答。max_tokens=200 只够推理阶段消耗,正式回答被截断。

    解决:分类 max_tokens=4096,分析 max_tokens=8192。同时在代码中回退到 msg.reasoning。

    坑 3:Obsidian 表格中链接断裂

    现象:表格中 [[文件名|显示名]] 点击后无法跳转

    原因:Markdown 表格用 | 分隔列。链接中的 | 被表格解析器当成了列分隔符。

    解决:表格中只用 [[文件名]],不使用显示名。

    坑 4:WSL 路径无法在 Obsidian 中打开

    现象:通过 \\\\wsl$\\ 路径打开 vault,报 EISDIR 错误

    原因:Obsidian 的文件监视器基于 inotify/ReadDirectoryChangesW,不支持 WSL 网络文件系统。

    解决:cp -r obsidian_vault /mnt/c/Users/xxx/Documents/ 复制到 Windows 本地路径。

    坑 5:文件名含全角特殊字符

    现象:部分笔记链接跳转失败

    原因:微信视频号标题含全角 ()、: 等,Obsidian 某些版本解析异常。

    解决:build_vault.py 中统一用正则清理文件名。

    扩展与自定义

    添加新分类

    编辑 config.yaml 的 categories 列表,同时更新 modules/classifier.py 的 CATEGORIES 列表和 build_vault.py 的 CATEGORY_EMOJI 字典。

    切换 LLM 提供商

    只改 config.yaml 的 llm 部分,所有脚本自动适配。兼容任何 OpenAI API 格式的提供商。

    自定义 Obsidian 模板

    编辑 templates/obsidian.md,支持所有 Jinja2 语法。可用变量:title、author、date、category、tags、summary、key_points、resources、action_items、transcript。

    处理非微信视频

    流水线不绑定微信。任何 .mp4/.avi/.mov/.mkv/.flv/.webm 文件都可以处理,只需放入 downloads/ 目录即可。


    写在最后

    #mermaid-svg-6MI2uFPGEy0a77ps{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-6MI2uFPGEy0a77ps .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-6MI2uFPGEy0a77ps .error-icon{fill:#552222;}#mermaid-svg-6MI2uFPGEy0a77ps .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-6MI2uFPGEy0a77ps .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-6MI2uFPGEy0a77ps .marker{fill:#333333;stroke:#333333;}#mermaid-svg-6MI2uFPGEy0a77ps .marker.cross{stroke:#333333;}#mermaid-svg-6MI2uFPGEy0a77ps svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-6MI2uFPGEy0a77ps p{margin:0;}#mermaid-svg-6MI2uFPGEy0a77ps .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-6MI2uFPGEy0a77ps .cluster-label text{fill:#333;}#mermaid-svg-6MI2uFPGEy0a77ps .cluster-label span{color:#333;}#mermaid-svg-6MI2uFPGEy0a77ps .cluster-label span p{background-color:transparent;}#mermaid-svg-6MI2uFPGEy0a77ps .label text,#mermaid-svg-6MI2uFPGEy0a77ps span{fill:#333;color:#333;}#mermaid-svg-6MI2uFPGEy0a77ps .node rect,#mermaid-svg-6MI2uFPGEy0a77ps .node circle,#mermaid-svg-6MI2uFPGEy0a77ps .node ellipse,#mermaid-svg-6MI2uFPGEy0a77ps .node polygon,#mermaid-svg-6MI2uFPGEy0a77ps .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-6MI2uFPGEy0a77ps .rough-node .label text,#mermaid-svg-6MI2uFPGEy0a77ps .node .label text,#mermaid-svg-6MI2uFPGEy0a77ps .image-shape .label,#mermaid-svg-6MI2uFPGEy0a77ps .icon-shape .label{text-anchor:middle;}#mermaid-svg-6MI2uFPGEy0a77ps .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-6MI2uFPGEy0a77ps .rough-node .label,#mermaid-svg-6MI2uFPGEy0a77ps .node .label,#mermaid-svg-6MI2uFPGEy0a77ps .image-shape .label,#mermaid-svg-6MI2uFPGEy0a77ps .icon-shape .label{text-align:center;}#mermaid-svg-6MI2uFPGEy0a77ps .node.clickable{cursor:pointer;}#mermaid-svg-6MI2uFPGEy0a77ps .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-6MI2uFPGEy0a77ps .arrowheadPath{fill:#333333;}#mermaid-svg-6MI2uFPGEy0a77ps .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-6MI2uFPGEy0a77ps .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-6MI2uFPGEy0a77ps .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-6MI2uFPGEy0a77ps .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-6MI2uFPGEy0a77ps .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-6MI2uFPGEy0a77ps .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-6MI2uFPGEy0a77ps .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-6MI2uFPGEy0a77ps .cluster text{fill:#333;}#mermaid-svg-6MI2uFPGEy0a77ps .cluster span{color:#333;}#mermaid-svg-6MI2uFPGEy0a77ps div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-6MI2uFPGEy0a77ps .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-6MI2uFPGEy0a77ps rect.text{fill:none;stroke-width:0;}#mermaid-svg-6MI2uFPGEy0a77ps .icon-shape,#mermaid-svg-6MI2uFPGEy0a77ps .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-6MI2uFPGEy0a77ps .icon-shape p,#mermaid-svg-6MI2uFPGEy0a77ps .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-6MI2uFPGEy0a77ps .icon-shape .label rect,#mermaid-svg-6MI2uFPGEy0a77ps .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-6MI2uFPGEy0a77ps .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-6MI2uFPGEy0a77ps .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-6MI2uFPGEy0a77ps :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    Whisper

    LLM 分类

    LLM 提取

    Obsidian

    视频

    文字

    知识

    行动

    链接体系

    从「收藏吃灰」到「知识入库」,核心转变是从被动收藏变为主动结构化:

  • 视频 → 文字:Whisper 把语音变成可检索的文本
  • 文字 → 分类:LLM 把杂乱的内容归入有意义的类别
  • 分类 → 行动:LLM 从内容中提取可执行的建议和具体资源
  • 行动 → 链接:Obsidian 的双向链接把所有知识串联起来
  • 你不再需要在 几百个视频中翻找某个技术方案,而是打开 Obsidian,进入「RAG」分类,看到知识全景总结,找到「动手实践」阶段的某个行动项,点击链接跳转到原始笔记,查看详细内容和资源链接,然后直接开始实验。

    这才是知识管理应有的样子。

    赞(0)
    未经允许不得转载:171主机测评 » 从「收藏吃灰」到「知识入库」:用 AI 流水线把微信视频号收藏变成 Obsidian 知识库
    分享到: 更多 (0)

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址