A Verifiable Dairy IoT Compliance Database for Privacy-Preserving Livestock Analytics and Federated Model Governance
Main article
Abstract
Dairy compliance oversight is increasingly carried out through a combination of on-farm Internet of Things sensors, federated machine learning, and blockchain anchoring, yet the records produced by these stacks are typically scattered across ledger artifacts, model checkpoints, and ad-hoc audit spreadsheets that no single party can query end-to-end. This article reframes the problem as a database design question and presents DairyChainDB, a verifiable compliance database that treats the schema, field dictionary, indexes, quality-control pipeline, and reusable interfaces as the principal contribution. Six core entities (FARM, ANIMAL, COMPLIANCE_PROOF, MODEL_VERSION, FL_ROUND, AUDIT_EVENT) are organized so that every regulatory decision traces back to a verifiable evidence chain that links the underlying federated model version, the cryptographic compliance proof, the audit event, and the responsible farm identifier. The database is organized as a polyglot store comprising a Parquet-plus-Delta lakehouse for raw measurement streams, a PostgreSQL relational core for transactional records, a Neo4j property graph for animal-to-cooperative relationships, a pgvector index for embedding-based similarity search over compliance fingerprints, and an anchored Layer-2 zero-knowledge rollup that records succinct proofs of regulatory rule satisfaction. We benchmark the database on a working subset of 412 simulated dairy farms and 18,640 animals over a six-month observation window, and we report a runnable experiment that raises proof-ingest throughput from 5,860 to 9,820 proofs per second on a 16-node cluster, sustains audit query latency below 463 milliseconds at the 95th percentile, reduces audit case-review time from 62.4 to 8.6 minutes, and holds on-chain verification cost constant at 0.42 US dollars per aggregated proof regardless of farm count. The schema, dictionaries, smart-contract interfaces, and reproduction notebooks are released under an open licence.
