GithubHelp home page GithubHelp logo

0xcafedaddy / adrealtimeanalysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wanghan0501/adrealtimeanalysis

0.0 2.0 0.0 242 KB

四川大学拓思艾诺广告流量实时分析项目

Java 70.85% Scala 29.15%

adrealtimeanalysis's Introduction

AdRealTimeAnalysis

四川大学拓思艾诺广告流量实时分析项目

需求

  1. 实现实时的动态黑名单机制,将每天对某个广告点击超过100次的用户拉黑

  2. 基于黑名单的非法广告点击流量过滤

  3. 统计每天各省各城市各广告的点击流量实时统计(基于需求二)

  4. 统计每天各省的top3热门广告(基于需求二)

  5. 统计各个广告最近一个小时内的点击趋势:各个广告最近1小时内各分钟的点击量(基于需求二)

  6. 实时计算每天各省城市各广告的点击量(基于需求二),更新到MySQL

实现思路

  1. 实时计算各batch中的每天各用户对各广告的点击次数

  2. 使用高性能方式将每天各用户对各广告的点击次数写入MySQL中(更新)

  3. 使用filter过滤出每天对某个广告点击超过100次的黑名单用户,并写入MySQL中

  4. 使用transform操作,对每个batch RDD进行处理,都动态加载MySQL中的黑名单生成RDD,然后进行join后,过滤掉batch RDD中的黑名单用户的广告点击行为

  5. 使用updateStateByKey操作,实时计算每天各省各城市各广告的点击量,并时候更新到MySQL

  6. 使用transform结合Spark SQL,统计每天各省份top3热门广告:首先以每天各省各城市各广告的点击量数据作为基础,首先统计出每天各省份各广告的点击量;然后启动一个异步子线程,使用Spark SQL动态将数据RDD转换为DataFrame后,注册为临时表;最后使用Spark SQL开窗函数,统计出各省份top3热门的广告,并更新到MySQL中

adrealtimeanalysis's People

Contributors

suzy0223 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.