High-Level Topology
本頁呈現完整的 runtime topology — 每個軟體 process 在哪、連接哪些硬體、 用什麼 protocol 通訊、off-site 角色與 Plant IPC 的相對位置。
Diagram
Layout
Inference Server 始終運行於專用的 plant-LAN 主機。此配置隔離 inference workload, 讓 Plant IPC 專注於硬體 I/O + 合規,並給 Python / 模型重訓練獨立的 CPU / RAM / (optional) GPU 資源。
Components
Operator Console · Jope.SMB
- Process: WPF .NET 8,以互動式 Windows application 形式執行
- 職責: Batch 控制 FSM、operator UI、audit trail 寫入、電子簽章、historian 寫入、hardware I/O
- State: 有狀態 — 持有 batch state machine、user session、in-memory alarm queue、recipe cache
- 基於: Jope.Core (Transport · Compliance · Identity) + Jope.UI (Shell · Login · Signature dialog · Theming · i18n)
Inference Server · Inference Host(獨立主機)
- Process: Python 3.11 以常駐 daemon 執行於專用 plant-LAN 主機
- OS: Linux(推薦 — systemd service)或 Docker / Podman container
- 職責: Raman spectrum → concentration prediction (PLS + Ridge) · model registry · training jobs · health endpoint
- State: 每次 request stateless — 無 batch memory。Model 啟動時從 disk registry 載入;執行時可熱切換。
- Channels: ZMQ REP 處理
predict、HTTP REST 處理/model/*與/training/* - 為何獨立主機:隔離 inference workload 與即時硬體 I/O、支援較大 model / 平行推論 / 選配 GPU 加速、避免訓練 job 影響 Console 反應、Linux 是 Python ML 工具鏈的原生環境
Historian · TimescaleDB
- Process: TimescaleDB 2.x,與 Console 同機部署於 Plant IPC
- 內容: 所有 Raman spectra · 所有 predictions · 所有 signatures · 所有 alarms · 所有 audit events · 所有 batch records
- Retention: 7 年(FDA 要求)
- 存取: Console 直接寫入;Inference Server 可讀取作為可選的 model QC audit
Hardware Cluster
| 設備 | 角色 | 主要協定 |
|---|---|---|
| RS2000 Raman Spectrometer | 2048 波數光譜擷取,雙探頭 | Modbus RS485 (gateway to Ethernet) |
| NP7000 / EPP / P3700 Pumps | Feed / eluent / recycle 流量控制 | Serial ASCII 16-byte / binary 0x88 / binary 0xFF |
| SKS S3612 rotary valve | 12 孔進出口 zone 切換 | ASCII 12-char over RS232/485 |
| SKS S3203 switching valve | 3 孔 feed routing | ASCII 4-char |
| APAX pneumatic valves (PV301-306) | 開/關 氣體 / 液體隔離 | APAX module |
| NU3000 / UV1000D UV Detectors | 輔助吸光值讀取 | Serial ASCII 16-byte |
裝置層 register map 見 Hardware Interfaces (coming soon)。
Off-Site Actor · AI Research
- 位置: 學術 / 研究夥伴 dev machine (off plant network)
- 流程: 以歷史 Raman + HPLC-labeled 資料訓練 PLS + Ridge 模型,匯出
.joblibmodel file + metadata JSON - 交付: Signed + encrypted package 傳輸到 plant(sneaker-net 或 secure transfer)。無直接網路連線至 Plant IPC — 保持生產環境 air-gap。
Communication Channels
| From | To | Protocol | Direction | Purpose |
|---|---|---|---|---|
| Raman | Console | Modbus RS485 | → | Spectrum read |
| Console | Pumps | Serial ASCII / Binary | ↔ | Flow setpoint · status |
| Console | Valves | Serial / APAX | ↔ | Position command · feedback |
| Console | UV Detectors | Serial ASCII | ← | Absorbance read |
| Console | Inference Server | ZMQ REQ-REP | ↔ | predict · hot path ≤ 20 ms |
| Console | Inference Server | HTTP REST | ↔ | Model load · training trigger · health (cold) |
| Console | Historian | TCP (TimescaleDB) | → | Writes: spectra · predictions · audit · batch |
| Inference | Historian | TCP (TimescaleDB) | ← (optional) | Model QC audits, read-only |
| Off-site Dev | Plant | Signed package | → | .joblib model 交付 |
Console ↔ Inference 的 wire contract 細節見 ZMQ Integration Protocol。
Deployment
Inference Host 始終是 plant LAN 上的獨立機器。Console 透過 config file 中的 endpoint
位址(例如:tcp://10.0.1.42:5555)連線。
完整部署步驟(installer、process manager、備份、升級)見 Deployment Topology。