daf3532120
- 总设计文档迁至根目录(云超服一体化架构设计方案.md,figures/ 随迁) - 设计文档补充 §十二 各代码项目工作原理 - code 六个子项目转独立仓库(组织 Pine),移出根跟踪、保留文件夹 - CLAUDE.md 补充主项目/子项目约束(分别提交、同步全子项目)
102 lines
7.1 KiB
XML
102 lines
7.1 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 720" width="1000" height="720" 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="#ea580c"/>
|
||
</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="#7c3aed"/>
|
||
</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="1000" height="720" fill="#fbfcfe"/>
|
||
<text x="500" y="38" text-anchor="middle" font-size="22" font-weight="700" fill="#0f172a">园区端 · 智慧大屏(多园区通用)</text>
|
||
<text x="500" y="62" text-anchor="middle" font-size="13" fill="#64748b">一套 dpm 代码 · 园区账号登录后只显示本园区内容(org_id 隔离)</text>
|
||
|
||
<!-- 多园区 -->
|
||
<g filter="url(#shadow)">
|
||
<rect x="60" y="95" width="240" height="105" rx="12" fill="#ffffff" stroke="#d97706" stroke-width="2"/>
|
||
<text x="82" y="122" font-size="15" font-weight="700" fill="#b45309">园区账号登录</text>
|
||
<text x="82" y="146" font-size="11.5" fill="#334155">carrier 端口身份(park_admin)</text>
|
||
<text x="82" y="164" font-size="11" fill="#64748b">POST /auth/login</text>
|
||
<text x="82" y="182" font-size="11" fill="#64748b">+ select-identity</text>
|
||
</g>
|
||
<g font-size="10.5" fill="#475569">
|
||
<rect x="62" y="60" width="70" height="26" rx="8" fill="#fff7ed" stroke="#fdba74" stroke-width="1.5"/>
|
||
<text x="97" y="78" text-anchor="middle" font-weight="700" fill="#b45309">园区 A(当前)</text>
|
||
<rect x="140" y="60" width="66" height="26" rx="8" fill="#f1f5f9" stroke="#cbd5e1" stroke-width="1"/>
|
||
<text x="173" y="78" text-anchor="middle">园区 B</text>
|
||
<rect x="214" y="60" width="66" height="26" rx="8" fill="#f1f5f9" stroke="#cbd5e1" stroke-width="1"/>
|
||
<text x="247" y="78" text-anchor="middle">园区 C</text>
|
||
</g>
|
||
|
||
<!-- 核心服务端 -->
|
||
<g filter="url(#shadow)">
|
||
<rect x="350" y="90" width="300" height="110" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="2"/>
|
||
<text x="372" y="118" font-size="15" font-weight="700" fill="#1d4ed8">核心服务端(org_id 隔离)</text>
|
||
<text x="372" y="142" font-size="11.5" fill="#334155">园区账号 → 只返回本园区数据</text>
|
||
<text x="372" y="162" font-size="11" fill="#64748b">park_org / park_companies / park_members</text>
|
||
<text x="372" y="182" font-size="11" fill="#64748b">活动 · 报名 · 测评 · 入驻 · 算力聚合</text>
|
||
</g>
|
||
|
||
<!-- 算力中心 -->
|
||
<g filter="url(#shadow)">
|
||
<rect x="700" y="90" width="240" height="110" rx="12" fill="#f5f3ff" stroke="#7c3aed" stroke-width="2"/>
|
||
<text x="722" y="118" font-size="15" font-weight="700" fill="#6d28d9">算力中心(new-api)</text>
|
||
<text x="722" y="142" font-size="11.5" fill="#334155">本园区用户真实 token 消耗</text>
|
||
<text x="722" y="162" font-size="11.5" fill="#334155">/ 流水(按 org 分组)</text>
|
||
<text x="722" y="182" font-size="11" fill="#94a3b8">(dpm 不直连,经核心代取)</text>
|
||
</g>
|
||
|
||
<!-- 登录 → 核心 -->
|
||
<line x1="300" y1="145" x2="350" y2="145" stroke="#d97706" stroke-width="2" marker-end="url(#ah)"/>
|
||
<text x="325" y="135" text-anchor="middle" font-size="10.5" fill="#b45309" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">园区 token</text>
|
||
<!-- 算力 → 核心 -->
|
||
<line x1="700" y1="170" x2="650" y2="170" stroke="#7c3aed" stroke-width="2" stroke-dasharray="5,4" marker-end="url(#ah-purple)"/>
|
||
<text x="675" y="190" text-anchor="middle" font-size="10.5" fill="#6d28d9" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">本园区 token 流水</text>
|
||
|
||
<!-- dpm 后端 -->
|
||
<g filter="url(#shadow)">
|
||
<rect x="60" y="300" width="880" height="110" rx="12" fill="#fff7ed" stroke="#ea580c" stroke-width="2"/>
|
||
<text x="82" y="328" font-size="16" font-weight="700" fill="#c2410c">dpm 后端 · 数据源层(data_source.py)</text>
|
||
<text x="82" y="354" font-size="12" fill="#334155">带园区 token 轮询核心聚合端点 + 算力聚合 · 内存缓存 · tick 推进</text>
|
||
<text x="82" y="376" font-size="11" fill="#64748b">sim_engine 删除随机模拟 token,只保留通用布局骨架;token 失效自动跳登录</text>
|
||
<text x="82" y="396" font-size="11" fill="#64748b">新端点:GET /api/park/data · /api/park/biz · /api/park/agents/usage(均 org_id 过滤)</text>
|
||
</g>
|
||
|
||
<!-- 核心 → dpm -->
|
||
<line x1="500" y1="200" x2="500" y2="300" stroke="#ea580c" stroke-width="2" marker-end="url(#ah)"/>
|
||
<text x="512" y="256" font-size="10.5" fill="#c2410c" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">本园区数据(org_id 过滤)</text>
|
||
|
||
<!-- 大屏前端 -->
|
||
<g filter="url(#shadow)">
|
||
<rect x="60" y="510" width="880" height="100" rx="12" fill="#ffffff" stroke="#ea580c" stroke-width="2"/>
|
||
<text x="82" y="538" font-size="16" font-weight="700" fill="#c2410c">dpm 前端大屏(React SPA)· 本园区内容</text>
|
||
<g font-size="11.5" fill="#334155">
|
||
<rect x="80" y="554" width="150" height="40" rx="8" fill="#fff7ed" stroke="#fdba74" stroke-width="1"/>
|
||
<text x="155" y="578" text-anchor="middle">/ 数据屏(实时 token·人员)</text>
|
||
<rect x="248" y="554" width="140" height="40" rx="8" fill="#fff7ed" stroke="#fdba74" stroke-width="1"/>
|
||
<text x="318" y="578" text-anchor="middle">/twin 数字孪生</text>
|
||
<rect x="406" y="554" width="150" height="40" rx="8" fill="#fff7ed" stroke="#fdba74" stroke-width="1"/>
|
||
<text x="481" y="578" text-anchor="middle">/wall 企业墙(本园区名录)</text>
|
||
<rect x="574" y="554" width="130" height="40" rx="8" fill="#fff7ed" stroke="#fdba74" stroke-width="1"/>
|
||
<text x="639" y="578" text-anchor="middle">/ai · /voice</text>
|
||
<rect x="722" y="554" width="200" height="40" rx="8" fill="#f1f5f9" stroke="#cbd5e1" stroke-width="1"/>
|
||
<text x="822" y="572" text-anchor="middle">登录后绑定本园区</text>
|
||
<text x="822" y="586" text-anchor="middle" font-size="10">(media 轮播按园区隔离)</text>
|
||
</g>
|
||
</g>
|
||
|
||
<!-- dpm → 大屏 -->
|
||
<line x1="500" y1="410" x2="500" y2="510" stroke="#ea580c" stroke-width="2" marker-end="url(#ah)"/>
|
||
<text x="512" y="466" font-size="10.5" fill="#c2410c" font-weight="600" paint-order="stroke" stroke="#fff" stroke-width="3">REST 快照 / MQTT tick / SSE</text>
|
||
|
||
<!-- 说明 -->
|
||
<text x="500" y="680" text-anchor="middle" font-size="11" fill="#94a3b8">登录哪个园区账号 → 显示哪个园区的数据;跨园区越权 403。一套 dpm 代码适配所有园区。</text>
|
||
</svg>
|