Hasan Kurt
Tüm işlerAll work

Muypil sahte tıklama tespitiMuypil click fraud detection

Muypil, reklama tıklayanın gerçek bir kişi mi yoksa bot mu olduğunu tespit etmeye çalışan bir sistem. Cyber Defense'teki stajımda ekiple birlikte tespit kısmını baştan kurduk. Makine öğrenmesi modellerini yapay zekâ ekibi geliştirdi, onların etrafındaki yazılımı ben yazdım.

Muypil tries to tell whether an ad click came from a real person or a bot. During my internship at Cyber Defense, our team rebuilt the detection part from scratch. The AI team built the machine learning models, and I wrote the software around them.

RolümMy role
Stajyer yazılım mühendisiSoftware engineering intern
EkipTeam
Yazılım ve yapay zekâ ekipleriyleWith the software and AI teams
DönemWhen
Ağustos – Eylül 2026, MersinAugust – September 2026, Mersin
ÜrünProduct
muypil.com
ÖnceBefore
Karar tek bir modele bırakılmıştı ve bu model gerçek kullanıcıların hiçbirini insan olarak tanımıyordu.The decision was left to a single model, and that model didn't recognise any of the real users as human.
ŞimdiNow
Kontroller artık katman katman çalışıyor ve model gerçek veriyle eğitildi. Yeni sürüm, daha önce görmediği oturumlarda gerçek kullanıcıların %84'ünü doğru tanıyor.The checks now run in layers and the model was trained on real data. The new version correctly recognises 84% of real users in sessions it hasn't seen before.
Gerçek kullanıcıyı insan olarak tanıma oranıReal users recognised as human
ÖnceBefore
%00%
ŞimdiNow
%8484%

Eğitimde kullanılmayan oturumlarla ölçüldü.Measured on sessions that weren't used in training.

Ana sorgunun süresiMain query time
ÖnceBefore
226 ms
ŞimdiNow
24 ms

JSON içindeki alanları index'li sütunlara taşıdık. 4.137.261 kayıt hatasız taşındı ve tek tek kontrol edildi.We moved fields out of JSON into indexed columns. 4,137,261 records were migrated without errors and checked one by one.

SorunThe problem

Devraldığımız sistemde karar tek bir modele bırakılmıştı. Bu modelin gerçek kullanıcılarda ne kadar doğru çalıştığına daha önce bakılmamıştı, bakmak için yeterli gerçek kullanıcı verisi de yoktu.

In the system we took over, the decision was left to a single model. Nobody had checked how well it worked on real users, and there wasn't enough real user data to check it with.

Ne yaptımWhat I did

  • Bir tıklamanın geçtiği kontrolleri (cihazı tanıma, cihaz türünü belirleme, davranışa bakma, gerekirse CAPTCHA) tek bir akışta topladım. Tıklama baştan sona bu akıştan geçip karara bağlanıyor.
  • Yapay zekâ ekibinin modellerini sisteme bağladım. Model cevap vermezse sistem tahmin yürütmüyor, kaydı değerlendirilmemiş olarak bırakıyor.
  • Tarayıcıda fare, klavye ve kaydırma hareketlerini toplayan kısmı sıfırdan yazdım.
  • Modelin emin olamadığı tıklamalar bir uzmana gösteriliyor, uzmanın verdiği karar da yeniden eğitimde kullanılıyor. Bunun ekranlarını ve akışını ben yaptım.
  • Elimizde gerçek veri olmadığı için bir veri toplama sayfası hazırlayıp gönüllülerden cihaz verisi topladık. Modelin gerçek kullanıcıları bot sandığını bu veriyle gördük.
  • Put all the checks a click goes through (recognising the device, working out its type, looking at behaviour, and a CAPTCHA if needed) into a single flow that takes the click all the way to a decision.
  • Connected the AI team's models to the system. If a model doesn't respond, the system doesn't guess and leaves the record unscored.
  • Wrote the part that collects mouse, keyboard and scroll activity in the browser, from scratch.
  • Clicks the model isn't sure about are shown to a human expert, and the expert's decision is used for retraining. I built the screens and the flow for this.
  • We had no real data, so we made a collection page and gathered device data from volunteers. That data is how we found out the model was treating real users as bots.
Teknik ayrıntılarTechnical detailsAraçlar ve nasıl kurulduğuTools and how it's built
  • Laravel 11
  • PostgreSQL
  • Redis
  • JavaScript
  • FastAPI
  • Docker
  • FastAPI model servisleri Laravel'e özellik sözleşmesi testleri, sürümleme, sağlık kontrolü ve hata toleransıyla bağlı.
  • Karar zinciri Redis kuyruğu üzerinde çalışıyor; sonuçlar PostgreSQL'de.
  • Veri toplama WebGL ve canvas parmak izi parametreleriyle genişletildi.
  • İnsan denetimli öğrenme döngüsü: etiketleme ekranı, eğitim verisi aktarımı, model sürümleme ve geri dönüş.
  • Taşıma, kaldığı yerden devam edebilen chunk tabanlı bir araçla yapıldı ve checksum ile doğrulandı. JSON alanlarını index'li sütunlara taşımak sorguyu 226 ms'den 24 ms'ye indirdi.
  • FastAPI model services are connected to Laravel with feature-contract tests, versioning, health checks and fault tolerance.
  • The decision chain runs on a Redis queue; results live in PostgreSQL.
  • Data collection was extended with WebGL and canvas fingerprint parameters.
  • Human-in-the-loop learning: labelling screen, training data export, model versioning and rollback.
  • The migration used a resumable, chunk-based tool verified with checksums. Moving JSON fields into indexed columns took the main query from 226 ms to 24 ms.