18
Big Data: Engineering & Convergence 서울대 차세대 융합기술원 박찬진 Advanced Institutes of Convergence Technology, Seoul National University

융합연구포럼 2015.02 big data - engineering & convergence

Embed Size (px)

Citation preview

Page 1: 융합연구포럼 2015.02 big data - engineering & convergence

Big Data: Engineering & Convergence

서울대 차세대 융합기술원 박찬진

Advanced Institutes of Convergence Technology, Seoul National University

Page 2: 융합연구포럼 2015.02 big data - engineering & convergence

빅데이터 분석

2

Data Science Prescriptive Analytics

At the PEAK

Big Data

Sliding Into the Trough

Advanced, Pervasive and Invisible Analytics, Context-Rich Systems, Smart Machine (가트너 2015년 10대 전략 기술)

Hype Cycle for Emerging Technologies, 2014.8

빅데이터 분석 기술 자체는 성숙되어 사회 전반에 확산되는 과정이며, 데이터 사이언스, 예측 분석이 새로 주목을 받고 있음

Page 3: 융합연구포럼 2015.02 big data - engineering & convergence

닐슨 시청률 예측

3

닐슨 시청률 예측7천여 가구에서 분당 시청 로그를 수집 (2010년부터 4년 1억 8천건, 15G, 분당 체크, 채널 변경 로그)

일반적인 드라마 시청률 예측 => 계절, 요일, 시간대 (e.g. 봄, 수목, 10시)

개인별 시청시간에 기반한 분석

빅데이터 분석 및

Spark 적용기존 단일 시스템 기반 분석 (R 언어 기반)으로 10시간 소요된 일을

Hadoop 기반으로 10분 내 계산 (4대 Workstation) => Spark 적용 시 1분 내 가능

향후 방향코드 버전 관리 및 이슈 관리 체계 구축 (Git & GitLab)

새로운 시청률 예측 모델 연구

<시청자, 프로그램, 시청시간>

<프로그램, 방영일자/시간> <시청자 ID, 채널, 시작시간, 끝 시간>

시청 시간에 대한 회귀 모델 구축

KNN 통한 프로그램 시청률 예측계절, 요일, 시간대

방송사별 시청시간

Page 4: 융합연구포럼 2015.02 big data - engineering & convergence

SPARK 도입 및 구축

4

Spark sorted the same data 3X faster using 10X fewer machines. (Daytona GraySort contest)

http://databricks.com/blog/2014/11/05/spark-officially-sets-a-new-record-in-large-scale-sorting.html

Disk I/O, Replication

In-memory, Distributed Memory

Page 5: 융합연구포럼 2015.02 big data - engineering & convergence

스마트그리드

5

전력 사용량 계산빌딩/공장으로부터 전력 사용 데이터 수집 - AMI

(실시간 로그 처리)

시각화Spark 기반 빅데이터 분석을 통한 실시간 빅데이터 처리 향상 및 시각화

Instant Query에 기반한 시각화

15분당 전력미터기 정보

한달 데이터 = 743만건, 1G

빅데이터분석Web App

AMI Meter

전력 사용 통계/트렌드

1분당 데이터 => 15x,

10년 데이터 => 120x,

공장/빌딩 수가 100x 증가 가정.

(1800 x 100) G => 180 T

공장/빌딩 별 미터기 세분화 100x

18000 T (18 P, 페타 바이트)

향 후 방향 전력 사용 패턴 분석

다양한 예측 모델 시각화

한전수요관리

사업자 빌딩/공장

전력사용효율화 제안

수요관리사업자는 Two-sided Business (카드회사)

인센티브

Page 6: 융합연구포럼 2015.02 big data - engineering & convergence

구현 예

6

109679623,2014-05-01 00:15:00,gjtp_ami,/ports/112.187.74.206/1/meter/ch1,0,0,0,0,1425109675927,2014-05-01 00:00:00,incheon_ami,/ports/10.101.0.53/4/meter/ch1,440,16,0.99934,6.171,4.39358e+06109677805,2014-05-01 00:00:00,gjtotal_ami,/ports/10.103.0.15/7/meter/ch1,64,40,0.847998,0.8976,1.7816e+06109677802,2014-05-01 00:00:00,gjtotal_ami,/ports/10.103.0.15/10/meter/ch1,744,44,0.998256,10.4346,1.0802e+07109677800,2014-05-01 00:00:00,gjtotal_ami,/ports/10.103.0.15/12/meter/ch1,28,8,0.961524,0.3927,2.2818e+06109675900,2014-05-01 00:00:00,sihwa_ami,/ports/10.102.0.28/2/meter/ch1,0,0,0,0,2.84758e+06109675905,2014-05-01 00:00:00,sihwa_ami,/ports/10.102.0.27/3/meter/ch1,3764,508,0.991015,52.7901,4.10321e+07 …

2014년 한달 전력 사용 로그 (743만개 로그, 800M)

<id, 날짜, 공장, Meter, …, 사용량>

<Meter, 사용량>으로 바꾸고 Meter로 그룹핑 그룹핑된 사용량을 더하고 이를 날짜 수로 나눔

val ami = sc.textFile("demands_201405").map(_.split(","))val days = ami.map(x => x(1).split(" ")(0)).distinct().count()val ami0 = ami.map(x => (x(3), x(8).toDouble)).groupByKey()val ami1 = ami0.map(x => { val d = diff(x._2.foldLeft((0.0, 0.0))((minmax, x) => (lt(minmax._1, x), gt(minmax._2, x)))) (x._1, d, d/days) } )

Map, GroupBy, Mean (foldLeft)

/ports/112.187.74.206/1/meter/ch1: 1468.8921370967741/ports/10.102.0.22/2/meter/ch1: 3662297.9166666665/ports/10.101.0.15/12/meter/ch1: 1.281907372311828E7/ports/112.187.74.221/17/meter/ch1: 4380133.413978495/ports/10.101.0.27/4/meter/ch1: 8718597.752016129

단일 머신으로 1분

Page 7: 융합연구포럼 2015.02 big data - engineering & convergence

소프트웨어 공학 데이터 분석

7

Don’t Program on Fridays, CVS (MSR conf.)

MOZILLA

P(Bug | Fix) => Fix 했을 때 재작업을 필요로 하는 확률

버그 최종 Fix됨

(a, b, c 파일 수정)

버그 발생 리포트 (#42233)

버그가 완전 Fix 되지 않음

(각각 b, c 파일 수정)

Source code

Repository

∆A

∆B

∆A + ∆B

코드 버전 관리 (Code Change)

이슈 관리 (Why Change?)

Feature #m

Bug #n

이슈 관리와 버전 관리 (프로젝트 변경관리)

Page 8: 융합연구포럼 2015.02 big data - engineering & convergence

SOFTWARE EVOLUTION RESEARCH

8

Lehman’s Law for program evolution - Law of continuing change - Law of increasing complexity - 프로그램이 변경되지 않으면 도태되고, 이러한 개선 변경을 통해 더욱 복잡해진다

Software Aging: long term health of our products

Evolution phases

` Blank Phase, 새로욲소프트웨어개발시기

` Integration` 여러사이트혹은 Segment들의요구사항반영위해새로욲기능,외부기능들을통합

` Market에서성공하면여러 Variation Model들이만들어짐� Country Adaptation, Luxury vs. Cheap Model, Chipset Change for Cost Reduction, …

` Magic` Maintenance의어려움을겪으며, 소프트웨어가복잡해져서새로욲기능추가한새모델의출시가어려욲시기

Value produced

Cumulative CostBlank phase

Integration Magic

3-4 모델이성공적으로개발되고안정화되는시기

소프트웨어변경비용이급증 (새로욲변경대응능력이떨어짐)

J. klein, “How Does the Architect’s Role Change as the Software Ages?,” Proc. Of the 5th Working IEEE/IFIP Conf. on Software Architecture (WICS’05), 20053 / 18

Android OS, 12MLOC, 6만개 파일

Relatively small refactoring is required

15

Layered Architecture by re-modularizing one package & ignoring 32 class edges

Layered Archietcture

Remodularization, Rearchitecting

Change History Analysis & Design Reverse Engineering focusing on Architectural Changes Finding Architecture Decay, Drift => Refactoring Opportunities

Page 9: 융합연구포럼 2015.02 big data - engineering & convergence

빅데이터 분석 플랫폼 구축

9

Web Framework

Web App Big Data Platform

Realtime Data

Distributed Computing Nodes

(Phone, Pad, PC)

Visualization

Big Data Analytics

Stored Data

Big Data Sources

Spark 도입 및 구축1

1

2 Web App과 Visualization을 위한 웹 프레임워크 (Play Framework)

2

Smart Meters로부터의 실시간 전기 사용량 로그 (Streaming)3

3

닐슨 시청률 데이터 분석, 소프트웨어 공학 데이터 분석4

4

Page 10: 융합연구포럼 2015.02 big data - engineering & convergence

ROADMAP

10

‘16‘15

닐슨, 스마트그리드, SE 데이터

Engineering

개발 프로세스 (Agile Analytics)

빅데이터 적용 과학연구 분야 탐색 다양한 문제 적용Convergence

빅데이터 분석

Adv. Analytics 기술 (Machine Learning, Video Analysis)빅데이터 분석 기술 인프라

Technology

Domain Scientist (Expert)

Data Scientist

Software Engineering

Page 11: 융합연구포럼 2015.02 big data - engineering & convergence

OPEN SOURCE PROJECTS FOR MACHINE LEARNING

11

http://scikit-learn.org/stable/

http://www.cs.waikato.ac.nz/ml/weka/

https://spark.apache.org/mllib/

http://mahout.apache.org/

CLUSTERING - Anomaly Detection (Frauds, Security Attacks) CLASSIFICATION - Spam Filter RECOMMENDATION - 음악, 비디오 추천

Linear Regression KNN - K Nearest Neighbors Decision Trees Artificial Neural Networks Bayesian Classification …

Page 12: 융합연구포럼 2015.02 big data - engineering & convergence

AGILE PROCESS

12

Iterative & Incremental DevelopmentWaterfall

You don’t realize any value until the end of the project You leave the testing until the end You don’t seek approval from the stakeholders until late in the day

Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan

데이터수집 및

전처리

Build

모델 구축

Training & Validation

Learn

모델 개선

Measure

모델 테스팅

Prediction

예측

Agile Analytics or Agile Data Science Agile for Computational Science and Engineering

Page 13: 융합연구포럼 2015.02 big data - engineering & convergence

AGRICULTURE - SENSORS

13

Cow에게 ePill이라는 센서를 먹이고 실시간으로 Vital Sign을 모니터링함.

질병, 영양상태 및 Heat stress와 같은 환경 영향에 대한 Insight를 제공

Page 14: 융합연구포럼 2015.02 big data - engineering & convergence

AGRICULTURE - SERVICES

1414

Ag Equipment: mobile networks

• Tractor and Implement(s) are acting as one network• Always connected!

Cloud / Internet

Cloud-based farming information sysetm

- 매일 2.5M 개 위치의 날씨 정보 처리

- 150B 토양 센서

온도, 강수 및 풍속 등 날씨 예측

Seeding, Fertilizing, Harvesting 서비스

Page 15: 융합연구포럼 2015.02 big data - engineering & convergence

GOOLGE FLU TRENDS - NEW DATA SOURCES

15

\

CDC의 독감 데이터 트렌드와 연관성을 가지는 구글 검색 단

어를 선별하고, 해당 단어의 검색 횟수 증가로 독감 유행을

예측 (“특정 검색어의 증가” => “독감 유행의 징후”)

독감 관련 주제를 검색하는 사람 수와 실제 독감이 걸린 사람 수 간에 밀접한 관계가 있음

http://www.google.org/flutrends/, 2015.02.19

Detecting influenza epidemics using search engine query data, Nature Vol 457, 19 February 2009

Page 16: 융합연구포럼 2015.02 big data - engineering & convergence

PARKINSON’S DISEASE - SMART DEVICES

16

Intel is collaborating with the Michael J. Fox Foundation (MJFF) to use big data analytics in research and treatment for Parkinson's disease. A multi-phase study used the specially created analytics platform to detect patterns in participant data collected from wearable technologies used to monitor symptoms.

“We’ve gathered 300 events per second, or 1 GB of data per patient per day. That’s as much data per month as the entire Library of Congress,”

Page 17: 융합연구포럼 2015.02 big data - engineering & convergence

GENOME SEQUENCING COST - NEW DATA

17

Big Data & Genome Sequencing

Genomics produces huge volumes of data; each human genome has 20,000-25,000 genes comprised of 3 million base pairs. This amounts to 100 gigabytes of data, equivalent to 102,400 photos

The importance of big data analytics in Genomics lies in its ability to accumulate and analyze useful gene-related information that can be converted into highly valuable medical insights for disease prevention and cure

Page 18: 융합연구포럼 2015.02 big data - engineering & convergence

감사합니다