How to Make Serial Number Labels? 3-Layer Architecture: Database + Printing + Scanning
💡 💡 At a Glance
Variable data printing achieves a unique serial number output for each label through data stream + RIP processing, with no plate-making fee and supporting small batches.
Last week, a client dealing with electronics product traceability asked me: "I want to put a unique serial number label on every product. How should I do it?"
I said: "**3-layer architecture** — database + printing + scanning, all three are essential."
I said: "**A serial number is not just a simple number** — it relies on the coordination of a database + printing system + scanning system. This article won't explain 'what a serial number is' — instead, it covers the 3-layer architecture + 5 encoding formats + 7-step implementation + 3 application categories."
3-Layer Architecture
Layer 1: Database Layer
**3 Core Functions**:
Database Table Design ├─ id (auto-increment primary key) ├─ serial (serial number, unique index) ├─ product_id (product ID) ├─ batch (batch number) ├─ created_at (production time) └─ status (status: unsold / sold / activated)
**3 Core Requirements**:
- Uniqueness (add unique index to serial)
- Encryption (encrypt sensitive fields)
- Backup (daily incremental backup)
Layer 2: Printing Layer
**3 Core Functions**:
Variable Data Printing ├─ Digital Printing (under 1,000 sheets) ├─ Flexographic Printing (5,000+ sheets) └─ Inkjet Printer (production line)
**3 Core Requirements**:
- Unique per piece (no duplication)
- Traceable (linked to database)
- Verifiable (scan code to query)
Layer 3: Scanning Layer
**3 Core Functions**:
Consumer Scanning ├─ H5 / Mini Program ├─ Cloud Query (anti-counterfeit / loyalty points) └─ Data Feedback (consumer behavior)
**3 Core Requirements**:
- 1-second scan (no lag)
- Authenticity check (instant result)
- Interaction (red packets / coupons)
- Variable length (1–48 characters)
- Numbers + letters + control characters
- High density (2–3 times more data than Code39)
- Industrial traceability
- Warehouse management
- Logistics labels
- Variable length (1–43 characters)
- Numbers + uppercase letters + 5 special characters
- Broad compatibility (readable by any scanner)
- Automotive manufacturing
- Defense and military industry
- Medical devices
- Square matrix (black and white modules)
- Can be as small as 2.5mm × 2.5mm
- High density (up to 2,335 characters)
- Small electronic components
- PCB board traceability
- Medical devices
- Can contain URL (scan to open webpage)
- 3 finder patterns (easy to recognize)
- 4 error correction levels (L/M/Q/H)
- Anti-counterfeit query
- Marketing campaigns
- Consumer interaction
- Code128 + DataMatrix dual codes
- If one scan fails, the other serves as backup
- Compatible with both industrial and consumer use
- High-security scenarios
- Multi-scenario scanning
- Traceability and anti-counterfeit
- Industrial traceability — Code128
- Anti-counterfeit + consumer — DataMatrix or QR
- High security — dual-code redundancy
- Select prefix (manufacturer code + product code)
- Generate continuous serial numbers (0001–9999)
- Import into database (unique index)
- Digital printing (under 1,000 sheets)
- Flexographic printing (5,000+ sheets)
- Inkjet printer (production line)
- Scan each product before leaving the factory
- Bind to order / customer
- Change status from "unsold" to "sold"
- Distributor scans upon inbound
- Bind distributor + region
- Update inventory
- Consumer scans with phone
- H5 displays authenticity + information
- Can participate in marketing campaigns
- Scan data feeds back into database
- Generate anti-counterfeit / marketing reports
- Data-driven decision making
- Unique per piece (anti-counterfeit)
- PCB board-level traceability
- Industrial scanner
- Unique per piece
- Consumer scanning
- H5 anti-counterfeit query
- Unique per piece
- Batch inbound and outbound
- WMS system integration
To learn more about the one-product-one-code system — refer to the One-Product-One-Code Label Traceability System, or directly contact a LeXiang Packaging consultant, and receive a serial number solution + system integration recommendation within 24 hours.
FAQ
How to make serial number labels?
3-layer architecture + 7-step implementation: (1) Database layer—generate serial numbers + store in database + encrypt; (2) Printing layer—variable data printing (digital/flexo) + code binding; (3) Scanning layer—consumer scan + anti-counterfeit query + data feedback. 7-step process: (1) Select encoding format; (2) Generate code library; (3) Print and label; (4) Factory scan binding; (5) Inbound scan; (6) Consumer scan; (7) Data feedback. 3 keys: (1) Uniqueness—each label unique; (2) Readability—100% scan recognition; (3) Traceability—full database recording.
How many serial number encoding formats are there?
5 common encoding formats: (1) 1D barcode—Code128 (most common, variable-length digits + letters, high density); (2) 1D barcode—Code39 (early format, letters + digits + a few symbols); (3) 2D barcode—DataMatrix (small size, matrix type, suitable for small labels); (4) 2D barcode—QR Code (consumer scenarios, can contain URL); (5) Hybrid—Code128 + DataMatrix dual code. 3 selection categories: (1) Industrial traceability—Code128; (2) Anti-counterfeit + consumer scan—DataMatrix or QR; (3) High security—dual code redundancy.
How to build a serial number label database?
3 steps to build the database: (1) Table design—product ID + serial number + production date + batch + status + related order; (2) Unique index—add unique index on serial number field (prevent duplicates); (3) Encryption—encrypt sensitive data storage (prevent leakage). 3 field categories: (1) Required—id / serial / product_id / created_at / status; (2) Optional—batch / lot / related order; (3) Index—serial (high-frequency query) + product_id. 3 tools: MySQL (most common) / PostgreSQL (advanced) / SQL Server (enterprise). Recommend a separate table for each product + unique serial number index.
How to integrate serial number labels with the production line?
5-step production line integration: (1) Production line scanner—install scanning equipment (read serial numbers); (2) ERP interface—ERP provides API (order/inventory/logistics); (3) Database integration—serial number system + ERP bidirectional sync; (4) Inkjet printer—inkjet at end of production line (unique per item); (5) Packaging line—labeling + scanning + order association. 3 integration methods: (1) Sequential—inkjet → labeling → scanning; (2) Parallel—inkjet + labeling → scanning; (3) Integrated—inkjet + labeling + scanning all-in-one machine. 3 investment categories: scanner 500-3000 RMB/unit + inkjet printer 10,000-50,000 RMB/unit + software 50,000-200,000 RMB.
How to ensure serial number label scan rate?
3 steps to ensure scan rate: (1) Print quality—300 DPI minimum (ensure barcode clarity); (2) Testing—print 100 sheets, sample 100 scans (100% recognition rate); (3) Monitoring—test scan rate with every new ink batch. 3 factors affecting scan rate: (1) Barcode clarity—bar width ≥ 0.19mm; (2) Quiet zone—≥ 10 times bar width; (3) Color contrast—PCS ≥ 75%. 3 failure causes: (1) Ink too light (density < 1.3); (2) Label wrinkling (die-cutting deformation); (3) Scanner distance (5-30 cm + angle < 30°). Recommend testing every new ink batch.
📚 📚 Related Recommendations
Need a Custom Packaging Solution?
Learn more about packaging, or consult directly for a custom solution and quote
