Design Invalid Click Detection for Ocean Engine Advertisers
Last updated: November 29, 2026
Quick Overview
Design a system that detects fraudulent or invalid ad clicks on ByteDance's advertising platform so advertisers are not charged for them, both in real time and in later batch reconciliation.
ByteDance
November 29, 20260
0
0 solved
Design a system that detects fraudulent or invalid ad clicks on ByteDance's advertising platform so advertisers are not charged for them, both in real time and in later batch reconciliation.
Ocean Engine is ByteDance's advertising platform for Douyin, Toutiao and partner apps through Pangle, and advertisers pay per click or conversion. The interviewer wants a layered design (rules, real-time models, offline graph analysis) and a clear plan for labels, which are scarce and delayed in fraud problems.
What the Interviewer Expects
- Separate real-time filtering from offline reconciliation and refunds
- Combine rules, supervised models, and graph or clustering methods
- Explain how labels are obtained despite adversaries and delay
- Choose metrics such as invalid traffic rate, precision at the refund threshold, and advertiser complaints
- Plan for adversarial adaptation and model refresh
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you detect a click farm using many real phones?
- How do you decide the threshold between filtering and charging?
- How do you handle fraud in a third-party app inside the Pangle network?
- How would you explain refunds to advertisers?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
- Billions of ad clicks per day; real-time decision under 50 ms in the billing path.
- Catch bots, click farms, click injection on Android, and publisher self-clicking in network apps.
- Do not charge...
High-Level Design
Clicks stream from the ad server into a scoring service. Layer 1 applies deterministic rules: known bad IPs and data-center ranges, emulator signatures from the SDK, impossible timing (click before re...
Submit Your Answer
ByteDance Machine Learning Engineer Interview Guide
Interview process, tips, and preparation timeline