Files
opc-backup/figures/01-overview.svg
T
Pine daf3532120 refactor: 工作区多仓库结构定版 + 总设计文档迁根目录
- 总设计文档迁至根目录(云超服一体化架构设计方案.md,figures/ 随迁)
- 设计文档补充 §十二 各代码项目工作原理
- code 六个子项目转独立仓库(组织 Pine),移出根跟踪、保留文件夹
- CLAUDE.md 补充主项目/子项目约束(分别提交、同步全子项目)
2026-08-23 22:47:22 +08:00

163 lines
12 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1240 1080" width="1240" height="1080" font-family="'PingFang SC','Microsoft YaHei','Noto Sans SC',system-ui,sans-serif">
<defs>
<marker id="ah" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#64748b"/>
</marker>
<marker id="ah-blue" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#2563eb"/>
</marker>
<marker id="ah-purple" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#8b5cf6"/>
</marker>
<filter id="shadow" x="-8%" y="-8%" width="120%" height="130%">
<feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#0f172a" flood-opacity="0.10"/>
</filter>
</defs>
<rect x="0" y="0" width="1240" height="1080" fill="#fbfcfe"/>
<text x="620" y="36" text-anchor="middle" font-size="22" font-weight="700" fill="#0f172a">云超服一体化平台 · 总体架构</text>
<text x="620" y="60" text-anchor="middle" font-size="13" fill="#64748b">前端 6 端 · 后端服务群 · 专业服务外置</text>
<text x="50" y="96" font-size="12" font-weight="700" fill="#94a3b8" letter-spacing="1">前端 · Web / 移动</text>
<text x="50" y="226" font-size="12" font-weight="700" fill="#94a3b8" letter-spacing="1">前端 · 桌面应用</text>
<text x="50" y="384" font-size="12" font-weight="700" fill="#94a3b8" letter-spacing="1">后端 · 服务群</text>
<!-- ===== Web / 移动 前端 ===== -->
<g filter="url(#shadow)">
<rect x="60" y="100" width="210" height="90" rx="12" fill="#ffffff" stroke="#16a34a" stroke-width="2"/>
<text x="82" y="128" font-size="16" font-weight="700" fill="#15803d">小程序</text>
<text x="82" y="152" font-size="11.5" fill="#334155">OPC AI · 移动 C 端</text>
<text x="82" y="172" font-size="10.5" fill="#94a3b8">opc-training miniprogram</text>
</g>
<g filter="url(#shadow)">
<rect x="310" y="100" width="210" height="90" rx="12" fill="#ffffff" stroke="#16a34a" stroke-width="2"/>
<text x="332" y="128" font-size="16" font-weight="700" fill="#15803d">web业务</text>
<text x="332" y="152" font-size="11.5" fill="#334155">培训/课程/报名/测评</text>
<text x="332" y="172" font-size="10.5" fill="#94a3b8">opc-training website/user</text>
</g>
<g filter="url(#shadow)">
<rect x="560" y="100" width="210" height="90" rx="12" fill="#ffffff" stroke="#16a34a" stroke-width="2"/>
<text x="582" y="128" font-size="16" font-weight="700" fill="#15803d">web官网</text>
<text x="582" y="152" font-size="11.5" fill="#334155">公开展示站(产品/政策/招生)</text>
<text x="582" y="172" font-size="10.5" fill="#94a3b8">PineAgentsWeb</text>
</g>
<g filter="url(#shadow)">
<rect x="810" y="100" width="290" height="90" rx="12" fill="#ffffff" stroke="#16a34a" stroke-width="2"/>
<text x="832" y="128" font-size="16" font-weight="700" fill="#15803d">admin管理平台</text>
<text x="832" y="152" font-size="11.5" fill="#334155">运营/政务/企业/载体/服务商/投资人</text>
<text x="832" y="172" font-size="10.5" fill="#94a3b8">console 管理端端口</text>
</g>
<!-- Web/移动 → 后端 -->
<line x1="165" y1="190" x2="165" y2="390" stroke="#2563eb" stroke-width="2" marker-end="url(#ah-blue)"/>
<line x1="415" y1="190" x2="415" y2="390" stroke="#2563eb" stroke-width="2" marker-end="url(#ah-blue)"/>
<line x1="665" y1="190" x2="665" y2="390" stroke="#2563eb" stroke-width="2" marker-end="url(#ah-blue)"/>
<line x1="955" y1="190" x2="955" y2="390" stroke="#2563eb" stroke-width="2" marker-end="url(#ah-blue)"/>
<text x="180" y="290" font-size="11" fill="#2563eb" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">Bearer 统一身份</text>
<!-- ===== 桌面应用 ===== -->
<g filter="url(#shadow)">
<rect x="60" y="230" width="500" height="100" rx="12" fill="#ffffff" stroke="#0d9488" stroke-width="2"/>
<text x="82" y="258" font-size="16" font-weight="700" fill="#0f766e">智能体桌面应用(PineAgents</text>
<text x="82" y="282" font-size="11.5" fill="#334155">Agent OS + Tauri 壳 · 智能体执行引擎</text>
<text x="82" y="302" font-size="10.5" fill="#94a3b8">模型调用经算力服务 → 引擎 /v1(见图 03)</text>
<text x="82" y="318" font-size="10.5" fill="#94a3b8">console + Tauri</text>
</g>
<g filter="url(#shadow)">
<rect x="600" y="230" width="500" height="100" rx="12" fill="#ffffff" stroke="#ea580c" stroke-width="2"/>
<text x="622" y="258" font-size="16" font-weight="700" fill="#c2410c">大屏桌面应用(dpm</text>
<text x="622" y="282" font-size="11.5" fill="#334155">多园区通用 · Tauri</text>
<text x="622" y="302" font-size="10.5" fill="#94a3b8">园区账号登录 → 只显示本园区(org_id 隔离)</text>
<text x="622" y="318" font-size="10.5" fill="#94a3b8">数据经核心服务 park 模块聚合</text>
</g>
<!-- 桌面 → 后端 -->
<line x1="310" y1="330" x2="310" y2="390" stroke="#2563eb" stroke-width="2" marker-end="url(#ah-blue)"/>
<text x="322" y="366" font-size="10.5" fill="#2563eb" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">登录 · 智能体同步</text>
<line x1="850" y1="330" x2="850" y2="390" stroke="#2563eb" stroke-width="2" marker-end="url(#ah-blue)"/>
<text x="862" y="366" font-size="10.5" fill="#2563eb" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">园区账号 · 本园区数据</text>
<!-- ===== 后端 服务群 ===== -->
<g filter="url(#shadow)">
<rect x="60" y="390" width="1040" height="320" rx="14" fill="#eff6ff" stroke="#2563eb" stroke-width="2"/>
<text x="82" y="416" font-size="17" font-weight="700" fill="#1d4ed8">后端 server · 完整服务群</text>
<text x="320" y="416" font-size="12" fill="#3b82f6">核心服务(gateway + 业务模块) · 算力服务 · 基础设施服务</text>
<!-- gateway -->
<rect x="80" y="428" width="960" height="38" rx="9" fill="#eef2ff" stroke="#6366f1" stroke-width="1.5"/>
<text x="98" y="453" font-size="13" font-weight="700" fill="#4338ca">gateway 网关</text>
<text x="210" y="453" font-size="11" fill="#4f46e5">统一入口 · 鉴权校验 · 路由 · 契约 · 跨端限流</text>
<!-- 核心服务 模块 4x2 -->
<g font-family="'PingFang SC','Microsoft YaHei','Noto Sans SC',system-ui,sans-serif">
<text x="92" y="470" font-size="10.5" font-weight="700" fill="#94a3b8">核心服务 · 业务模块</text>
<rect x="92" y="478" width="160" height="52" rx="8" fill="#ffffff" stroke="#6366f1" stroke-width="1.5"/>
<text x="106" y="500" font-size="12" font-weight="700" fill="#4338ca">auth 身份</text>
<text x="106" y="519" font-size="9" fill="#64748b">七端口 RBAC · 审计</text>
<rect x="258" y="478" width="160" height="52" rx="8" fill="#ffffff" stroke="#0891b2" stroke-width="1.5"/>
<text x="272" y="500" font-size="12" font-weight="700" fill="#0e7490">business 业务</text>
<text x="272" y="519" font-size="9" fill="#64748b">课程·活动·报名·测评·政策</text>
<rect x="424" y="478" width="160" height="52" rx="8" fill="#ffffff" stroke="#0d9488" stroke-width="1.5"/>
<text x="438" y="500" font-size="12" font-weight="700" fill="#0f766e">agent 智能体</text>
<text x="438" y="519" font-size="9" fill="#64748b">定义·模板·桌面同步</text>
<rect x="590" y="478" width="160" height="52" rx="8" fill="#ffffff" stroke="#d97706" stroke-width="1.5"/>
<text x="604" y="500" font-size="12" font-weight="700" fill="#b45309">task 任务生态</text>
<text x="604" y="519" font-size="9" fill="#64748b">任务·服务商·结算·合同</text>
<rect x="92" y="548" width="160" height="52" rx="8" fill="#ffffff" stroke="#2563eb" stroke-width="1.5"/>
<text x="106" y="570" font-size="12" font-weight="700" fill="#1d4ed8">gov 政务</text>
<text x="106" y="589" font-size="9" fill="#64748b">补贴审批·数据范围</text>
<rect x="258" y="548" width="160" height="52" rx="8" fill="#ffffff" stroke="#ea580c" stroke-width="1.5"/>
<text x="272" y="570" font-size="12" font-weight="700" fill="#c2410c">park 园区</text>
<text x="272" y="589" font-size="9" fill="#64748b">园区数据·大屏聚合</text>
<rect x="424" y="548" width="160" height="52" rx="8" fill="#ffffff" stroke="#64748b" stroke-width="1.5"/>
<text x="438" y="570" font-size="12" font-weight="700" fill="#475569">notify 通知</text>
<text x="438" y="589" font-size="9" fill="#64748b">通知·消息·推送</text>
<rect x="590" y="548" width="160" height="52" rx="8" fill="#ffffff" stroke="#64748b" stroke-width="1.5"/>
<text x="604" y="570" font-size="12" font-weight="700" fill="#475569">file 文件</text>
<text x="604" y="589" font-size="9" fill="#64748b">上传·媒体·静态</text>
</g>
<!-- 算力服务 -->
<rect x="780" y="478" width="290" height="122" rx="10" fill="#f5f3ff" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="800" y="502" font-size="13.5" font-weight="700" fill="#6d28d9">算力服务 compute</text>
<text x="800" y="524" font-size="10.5" fill="#4c1d95">封装 new-api 引擎</text>
<text x="800" y="542" font-size="10.5" fill="#4c1d95">令牌 · 额度 · 流水聚合</text>
<text x="800" y="560" font-size="10.5" fill="#4c1d95">用户算力自助(只读)</text>
<text x="800" y="582" font-size="9.5" fill="#8b5cf6">管理·页面全部自研(console</text>
<!-- 基础设施服务 -->
<rect x="80" y="622" width="990" height="44" rx="9" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.5"/>
<text x="98" y="649" font-size="12" font-weight="700" fill="#475569">基础设施服务</text>
<text x="230" y="649" font-size="11" fill="#334155">MQTT 消息服务(EMQX</text>
<text x="440" y="649" font-size="11" fill="#334155">缓存服务(Redis</text>
<text x="650" y="649" font-size="11" fill="#334155">数据库服务(SQLite / MySQL / PostgreSQL</text>
</g>
<!-- ===== 算力引擎 new-api(仅服务) ===== -->
<g filter="url(#shadow)">
<rect x="780" y="780" width="290" height="100" rx="12" fill="#ffffff" stroke="#7c3aed" stroke-width="2" stroke-dasharray="6,4"/>
<text x="802" y="808" font-size="14" font-weight="700" fill="#6d28d9">算力引擎 new-api</text>
<text x="802" y="828" font-size="10" fill="#64748b">随服务群部署 · 不做本地推理</text>
<text x="802" y="846" font-size="10" fill="#64748b">全部代理云厂商渠道</text>
<text x="802" y="868" font-size="10" fill="#94a3b8">仅服务(relay /v1 · 管理 API),页面自研</text>
</g>
<!-- 算力服务 → 引擎 -->
<line x1="925" y1="600" x2="925" y2="780" stroke="#8b5cf6" stroke-width="2" marker-end="url(#ah-purple)"/>
<text x="937" y="696" font-size="10.5" fill="#6d28d9" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">relay /v1 + 管理 API(程序化)</text>
<!-- 图例与注 -->
<g font-size="11" fill="#475569">
<line x1="60" y1="1000" x2="100" y2="1000" stroke="#64748b" stroke-width="2"/>
<text x="110" y="1004">实线:主数据流</text>
</g>
<text x="620" y="1040" text-anchor="middle" font-size="11" fill="#94a3b8">注:new-api 只作算力引擎被消费,管理/页面全部自研(admin管理平台);智能体桌面模型调用经算力服务 → 引擎 /v1;算力流水经核心服务聚合。</text>
<text x="620" y="1062" text-anchor="middle" font-size="11" fill="#94a3b8">MQTT 消息服务被大屏 / 桌面端 / 通知复用;缓存与数据库为服务群共享基础设施。</text>
</svg>