跳至主要内容

Data Flow

Jope.SMB 的 end-to-end data flow — 從 Raman scan 到 operator 顯示到 audit trail — 以 sequence diagram 呈現。每個 flow 都遵循 compliance 規則(append-only、 hash-chained、需簽章處必簽章)。

Online Inference (Raman → Prediction)

熱路徑 — 批次運轉時每 3 秒一次:Raman 掃描光譜、Console 轉發至 Inference、 Inference 回傳預測濃度、Console 顯示並寫入 Historian。

Batch Lifecycle (FSM)

Batch state transitions 由 Stateless 驅動;每個 transition 都有 audit,必要時需簽章 (21 CFR 11.100)。

每個 transition 寫入 audit event:{actor, timestamp, signature_id, batch_id, from_state, to_state}

Electronic Signature Flow

所有 critical actions(batch start / abort、recipe change、model swap)依 21 CFR 11.100(b) 需 Electronic Signature。

Signature records 具 tamper-evident(以 {prev_hash, actor, meaning, reason, timestamp, context_ref} 形成 hash chain)。

Audit Trail Write

所有 mutation 都觸發 audit event。Events 為 append-only 且 hash-chained,篡改可偵測。

Audit events 涵蓋:login / logout、user / role / permission 變更、batch transitions、recipe 變更、model load、backup / restore、audit export(meta-audit)。

Model Upload & Hot Swap

AI 研究團隊交付訓練完的 .joblib model file。Operator 透過 Console 上傳; Inference Server 載入並驗證。

Training Trigger (Async)

當 training set 新增 ground-truth (HPLC) 樣本時觸發重訓練。

訓練在 Inference Server 的獨立 thread 執行 — 訓練期間 predict 流量持續運作。

Alarm Flow

閾值違規(壓力過高、流量偏差、inference timeout)觸發警報。