- Introduced `build_all.py` script to automate the assembly of course modules into a single `index.html` file. - Created `index.html` for the main course overview, featuring a structured layout and navigation for various modules. - Developed `_base.html` and `_footer.html` templates for the advisor module, ensuring consistent styling and structure. - Added `build.sh` script for individual module assembly, enhancing modularity and ease of updates. - Implemented multiple module HTML files detailing specific training scenarios and functionalities for advisors, including interactive elements and quizzes. This update significantly enhances the course delivery framework, providing a comprehensive and interactive learning experience for advisors.
81 lines
4.7 KiB
HTML
81 lines
4.7 KiB
HTML
<section class="module" id="module-4">
|
||
<div class="module-inner">
|
||
<p class="eyebrow animate-in">模块 4 · 数据从哪来</p>
|
||
<h1 class="module-title animate-in">双 MySQL、Redis、<br>模拟 Core 与风控引擎</h1>
|
||
<p class="module-lead animate-in">
|
||
没有真实银行 Core。L0 事实(客户、持仓、流水)在 <code>jinrong_core</code> 模拟库;
|
||
Agent 会话、预警、审计在 <code>jinrong_agent</code>。像<strong>前台展示用的假金库 + 后台自己的笔记本</strong>。
|
||
</p>
|
||
|
||
<div class="screen animate-in">
|
||
<h2>分层速记</h2>
|
||
<ul>
|
||
<li><strong>L0</strong> — <code>jinrong_core</code> 只读(Tool / 问数 SQL _guard 白名单)</li>
|
||
<li><strong>L1/L2/L3 画像</strong> — agent 库 MySQL 表(客户/顾问/风控 enrich)</li>
|
||
<li><strong>会话窗口</strong> — Redis(TTL 2h,挂了会降级回 MySQL)</li>
|
||
<li><strong>RAG</strong> — Milvus 向量库 + <code>data/kb/</code> 产品手册</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="screen animate-in">
|
||
<h2>风控演示:模拟交易 → 出预警</h2>
|
||
<div class="flow-animation" data-steps='[
|
||
{"highlight":"flow-actor-1","label":"风控 Demo 提交 POST /api/simulate/trade"},
|
||
{"highlight":"flow-actor-2","label":"trade_gateway 写 core_trade(唯一允许 INSERT Core 的路径)","packet":true,"from":"1","to":"2"},
|
||
{"highlight":"flow-actor-3","label":"risk 规则引擎扫描 → 聚合写入 risk_alert","packet":true,"from":"2","to":"3"},
|
||
{"highlight":"flow-actor-4","label":"Redis Pub/Sub 可选推送;台账页 GET /api/risk/alerts 可见","packet":true,"from":"3","to":"4"}
|
||
]'>
|
||
<div class="flow-actors">
|
||
<div class="flow-actor" id="flow-actor-1"><span class="flow-actor-icon">🧪</span><span>模拟交易 UI</span></div>
|
||
<div class="flow-actor" id="flow-actor-2"><span class="flow-actor-icon">⚙</span><span>trade_gateway</span></div>
|
||
<div class="flow-actor" id="flow-actor-3"><span class="flow-actor-icon">🛡</span><span>risk_engine</span></div>
|
||
<div class="flow-actor" id="flow-actor-4"><span class="flow-actor-icon">📋</span><span>risk_alert 表</span></div>
|
||
</div>
|
||
<p class="flow-step-label">A-3 预设:CUST-3001 · 50 万 · 大额预警</p>
|
||
<div class="flow-controls">
|
||
<button class="btn flow-next-btn">下一步</button>
|
||
<button class="btn flow-reset-btn">重来</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="translation-block">
|
||
<div class="translation-code">
|
||
<span class="translation-label">问数 · sql_guard</span>
|
||
<pre><code><span class="code-line"><span class="code-comment"># 分析 Agent 只读 SELECT,customer 域强制 self</span></span>
|
||
<span class="code-line">assert_analyst_query_access(auth)</span>
|
||
<span class="code-line"><span class="code-comment"># 客户问数:仅趋势/统计,尾部「AI 分析有风险」</span></span></code></pre>
|
||
</div>
|
||
<div class="translation-english">
|
||
<span class="translation-label">白话</span>
|
||
<div class="translation-lines">
|
||
<p class="tl">问数不是随便跑 SQL:先过权限域,再过只读与白名单。</p>
|
||
<p class="tl">客户角色不能查别人的数据,也不能给投资建议(产品规则写死在 guardrail)。</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="screen animate-in">
|
||
<div class="quiz-container" id="quiz-module4">
|
||
<div class="quiz-question-block"
|
||
data-correct="option-b"
|
||
data-explanation-right="Core 正式账 C1~C5 禁止被 Agent 画像覆盖;只有 gateway 模拟 INSERT 交易。"
|
||
data-explanation-wrong="画像写 L1/L2/L3 可以,但不能动 Core 里的正式客户等级等 C 类字段。">
|
||
<h3 class="quiz-question">项目硬规则:Agent 能不能直接改 Core 里客户的「正式风险等级」?</h3>
|
||
<div class="quiz-options">
|
||
<button class="quiz-option" data-value="option-a" onclick="selectOption(this)">
|
||
<div class="quiz-option-radio"></div><span>可以,方便演示</span>
|
||
</button>
|
||
<button class="quiz-option" data-value="option-b" onclick="selectOption(this)">
|
||
<div class="quiz-option-radio"></div><span>不可以,Core 只读(模拟交易除外)</span>
|
||
</button>
|
||
</div>
|
||
<div class="quiz-feedback"></div>
|
||
</div>
|
||
<button class="quiz-check-btn" onclick="checkQuiz('quiz-module4')">检查答案</button>
|
||
<button class="quiz-reset-btn" onclick="resetQuiz('quiz-module4')">重做</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|