The system is organized into four layers. The sensor edge layer is the hardware closest to the lab: RFID readers at each bench (instrument detection), RFID wristbands on each technician (person attribution), a soap sensor at each wash station, and cameras covering both bench areas and wash stations. Each sensor emits discrete, timestamped events — not continuous streams — to minimize downstream processing load.
The event broker sits above the edge. It receives events from all sensors, normalises them into a common schema (technician ID, event type, instrument ID, timestamp, camera frame reference), and routes them to the state machine. The broker also maintains the raw video buffer: a short rolling window of footage from each camera, retained long enough to extract a clip around any violation event.
The state machine engine holds the protocol logic. For each technician, it tracks the current state: idle, holding-instrument, or in-wash-window. A pickup event transitions from idle to holding-instrument. A put-down event starts the 30-second countdown and transitions to in-wash-window. A soap sensor event within the window resets to idle. A second pickup event while in-wash-window is the violation trigger. The state machine is a pure deterministic system — no inference, no probabilistic scoring — which means it is testable, auditable, and easy to explain to compliance reviewers.
The violation classifier receives the trigger from the state machine and dispatches two things simultaneously: the alert (in-lab audible alarm + supervisor push notification) and a clip extraction request to the broker's video buffer. The clip is extracted, attached to a structured violation record, and written to persistent storage. The violation record includes technician ID, instruments involved, timestamp, wash window elapsed, and clip reference.
The diagram below shows the component relationships and event flow.
flowchart TD
subgraph Edge["Sensor Edge"]
R[RFID Readers<br/>at bench]
W[Wristband RFID<br/>per technician]
S[Soap sensor<br/>at wash station]
C[Cameras<br/>bench + wash]
end
subgraph Broker["Event Broker"]
N[Event normaliser<br/>common schema]
VB[Video buffer<br/>rolling window]
end
subgraph Engine["State Machine Engine"]
SM[Per-technician<br/>state machine]
end
subgraph Dispatch["Violation Dispatcher"]
AL[In-lab alarm]
PN[Push notification<br/>supervisor app]
CE[Clip extractor]
VR[Violation record<br/>store]
end
R --> N
W --> N
S --> N
C --> N
C --> VB
N --> SM
SM -- violation trigger --> CE
SM -- violation trigger --> AL
SM -- violation trigger --> PN
CE --> VB
CE --> VR
PN --> VR