TL;DR

Inspection data, LOT numbers, CPK reports — each line stores its own in separate SQLite databases. Online does one thing: aggregates it all onto the factory server for unified query, analysis, and API output.

More Lines, More Data Silos

One production line: Excel works fine. Three lines: version chaos begins — Line A uses spec V2.1, Line B is still on V1.8. Five lines: finding a single LOT's production history means logging into three or four different systems.

This isn't "not enough IT." It's "the IT was done wrong" — each system manages its own data, but nobody manages the relationships between them.

Online's role is straightforward: the factory's data ledger. It doesn't replace any existing system. It adds an aggregation layer on top — data still comes from mes-line, but consolidation, correlation, traceability, analysis, and external output all happen in Online.

Online 3-tier architecture

Enterprise PinZheng pulls via API → Online factory server aggregates → mes-line line-side executes → Inspection equipment provides signals

Ten Modules, One Data Chain

Items and Specs form the data foundation — a plant-wide unified CODE library with version-controlled specs. Change once, push everywhere. No more per-line Excel updates. LOT and Production form the traceability core — reverse-trace from a customer complaint to a specific batch and inspection record in five minutes. CPK and OEE form the analytics engine — process capability and equipment efficiency monitored in real time, with alerts on drift. Data API and Permission form the gateway and security — standard external interfaces, 3-tier role-based access.

Online module matrix

Ten modules spanning data foundation → traceability core → analytics engine → external gateway → security base

Spec Versioning: Don't Underestimate It

A product item goes through at least three or four spec revisions from trial to mass production. If versions are managed by file name ("SpecSheet_V3_FINAL_FINAL.xlsx"), something will go wrong. Online's approach: specs are versioned with full audit trails — which version, pushed to which lines, effective when. One-click bulk push. All lines switch simultaneously.

CPK and OEE: Knowing a Number Isn't Enough. Knowing the Trend Is.

CPK isn't just a number to report — you need the X-bar control chart to see whether sample means are drifting toward the control limit. OEE isn't about being happy with 85% — you need it decomposed into A (Availability) × P (Performance) × Q (Quality) to see which factor is dragging the whole down.

When PHM reports equipment health A[H(t)], OEE's A-factor is automatically weighted down. Sub-healthy equipment no longer reports 100% availability. OEE now reflects "health-aware efficiency," not just "time-based efficiency."

Permissions: Not Everyone Should See Everything

Operators see their own line's production details. Engineers can export and analyze. Admins manage items and specs. Multi-line factories need data isolation by default — seeing Line A doesn't mean you should see Line B. Three-tier roles + line-level authorization. Principle of least privilege.

Online product line relationships

Online at the Cloud layer: ← receives from mes-line/Monitoring/PHM, → pushes specs downward, → outputs API to PinZheng/customer MES

Tech Snapshot

DimensionSpec
BackendPython + Flask + SQLAlchemy, SQLite or PostgreSQL
FrontendJinja2 + Vanilla JS + ECharts
ServerXeon Silver 4310 + 32GB + 1TB SSD, Ubuntu 20.04
CommsTCP/IP LAN, RESTful API, MQTT
DeploymentDocker or bare metal, systemd

Every Factory Needs a Data Ledger

The production line knows its own data best. But the factory needs the big picture — which line has declining Cpk, which LOT has an issue, which item specs need updating. Online isn't "yet another system." It's the ledger that turns scattered line data into something queryable, computable, and traceable.