1 of 61

Samo-prilagodljive �pametne storitve��Self-Adaptive �Smart Services

1

2 of 61

Samo-prilagodljive pametne storitve imajo vgrajene mehanizme, ki jim omogočajo, da spreminjajo režim svojega delovanja z namenom doseganja različnih ciljev.

Self-adaptive smart services have built-in mechanisms that allow them to change the regime of their operation in order to achieve different goals.

2

Definicija

Definition

3 of 61

3

ref.: D. Weyns, Software Engineering of Self-Adaptive Systems: An Organised Tour and Future Challenges, Chapter for Handbook of Software Engineering, Editors: Richard Taylor, Kyo Chul Kang and Sungdeok Cha, Springer 2017

Šest valov samo-prilagodljivih sistemov

Six waves of self-adaptive systems

4 of 61

4

ref.: D. Weyns, Software Engineering of Self-Adaptive Systems: An Organised Tour and Future Challenges, Chapter for Handbook of Software Engineering, Editors: Richard Taylor, Kyo Chul Kang and Sungdeok Cha, Springer 2017

Načela samo-prilagodljivih sistemov

Principles of self-adaptive systems

  1. External principle:

A system that can independently manage changes and uncertainties in its environment, the system itself and its goals (i.e. without or with minimal intervention).

  • Internal principle:

The system consists of two different parts: the first part interacts with the environment and addresses the requirements or realizes the goals for which it was built; the second part interacts with the first, monitors its environment and is responsible for its adaptation.

5 of 61

5

ref.: D. Weyns, Software Engineering of Self-Adaptive Systems: An Organised Tour and Future Challenges, Chapter for Handbook of Software Engineering, Editors: Richard Taylor, Kyo Chul Kang and Sungdeok Cha, Springer 2017

Konceptualni model samo-prilagodljivega sistema

Conceptual model of a self-adaptive system

6 of 61

6

MAPE-K

link: J. Kephart and D. Chess. The Vision of Autonomic Computing. Computer, 36(1):41–50, 2003.

Structure of an autonomous manager

Struktura avtonomnega upravitelja

7 of 61

7

Pristopa k reševanju problemov adaptacije

Approaches to solving adaptation problems

A proactive approach

focuses on fixing problems before they occur.

A reactive approach

is based on responding to events as they happened.

8 of 61

  • Construction site management
  • Safety at work
  • Management of resources and assets
  • Construction progress monitoring
  • Early (disaster) warning

8

Pametne storitve in njihove zahteve

Smart services and their requirements

Več primerov samo-prilagodljivih aplikacij: https://www.hpi.uni-potsdam.de/giese/public/selfadapt/exemplars/model-problem-znn-com/

9 of 61

9

{

    "bounding-box": "350,287,50,213",

    "classification": "person",

"helmet": "yes"

}

AI models

People detection

Podatki, metapodatki, modeli UI, metode in digitalni dvojčki

Data, metadata, AI models, methods and digital twins

10 of 61

10

11 of 61

  • Virtualisation & Containers
  • Heterogeneous Resources
  • Edge, Dew, Cloud, … (multi-tier)
  • Connectivity
  • Static and Dynamic Things
  • Cyber-Physical: events and reactions
  • Decentralised Artificial Intelligence
  • High-level concerns: trust, dependability, Quality of Service, privacy,...
  • … for which we need self-adaptation

11

Računalništvo v megli

Fog Computing

12 of 61

  • Geografsko porazdeljeni masovni podatki
  • Prilagajanje glede na zahtevo po hitrem odzivu aplikacij
  • Premikanje programja proti virom podatkov
  • Programi za podatkovno rudarjenje, zahtevane knjižnice in skripte za zagon so stisnjene
  • Programski model Bag of Tasks
  • Usklajeno sistemsko okolje v gručah

12

DataMiningGrid (2004-2007)

13 of 61

Arhitektura

14 of 61

Testno okolje

FHG

UL

UU

~80 računalnikov

~40 računalnikov

~5 računalnikov

15 of 61

Delovanje

16 of 61

Razvojno okolje DataMiningGrid

17 of 61

  • Platforma za razvoj aplikacij, ki so neodvisne od ponudnika storitev računalništva v oblaku
  • Cloudlet je elastična komponenta
  • V čakalni vrsti so računski posli
  • Publish-Subscribe asinhroni mehanizmi
  • Prilagajanje glede na dolžino čakalnih vrst

17

mOSAIC (2010-2013)

18 of 61

Primera uporabe

Bent

    • Mechanical engineering element under extreme force,
    • 3 cm x 5 cm,
    • 1000 FE, 79 iterations.

Helix

    • Spring under lateral force,
    • 10 cm x 30 cm,
    • 4012 FE, 40 iterations.

19 of 61

Aplikacija

REQ.

HTML

20 of 61

  • Optimizacija slik virtualnih strojev, fragmentacija in defragmentacija
  • Optimizacija decentraliziranih shramb fragmentov in slik virtualnih strojev za čim hitrejšo dostavo
  • Vnaprejšnja optimizacija slik strojev in shramb
  • Prilagajanje glede na geografsko lokacijo

20

ENTICE (2015-2018)

21 of 61

ENTICE VM Image Portal

21

LEFT IMAGE: Environmental statistics and storage statistics.

RIGHT IMAGE: Form for launching Virtual Images covering all industrial partners use cases specific attributes.

22 of 61

Več kriterijska optimizacija

22

23 of 61

  • Programsko okolje za razvoj časovno-kritičnih aplikacij
  • Obdelava videotokov v oblak
  • Aplikacije so nameščene v vsebnikih (oz. kontejnerjih), primer Jitsi Meet
  • Programski model omogoča sočasno prilagajanje aplikacij in infrastruktur glede na latenco, pasovno širino, trepetanje, izgubo paketov
  • Orkestracija vsebnikov čez večje število ponudnikov računalništva v oblaku

23

SWITCH (2015-2018)

24 of 61

Architecture & Workflow of Decision Making process

Software Workbench for Interactive, Time Critical and Highly self-adaptive Cloud applications

24

25 of 61

Software Workbench for Interactive, Time Critical and Highly self-adaptive Cloud applications

25

Project meeting Porto, 1-3 December 2015

26 of 61

Early Warning System

  • Flood Control
    • Two networks: DB and external (Telemetry)
    • Components: Telemetry, DB, Sensor Acquisition, Alert Checker - one Docker container
    • Everything connected to DB

26

Štefanič, P., Kimovski, D., Suciu, G., Stankovski, V. Non-functional requirements optimisation for multi-tier cloud applications: An early warning system case study, https://ieeexplore.ieee.org/document/8397637

27 of 61

  • Platforma za pametne aplikacije na podlagi Interneta stvari, umetne inteligence, računalništva v oblaku, tehnologij veriženja blokov
  • Zahteve za samo-prilagajanje: zaupanje, zanesljivo delovanje, kakovost storitev, nizke cene za začasni najem poljubnih virov in storitev, energetska učinkovitost, ..
  • Kompleksni scenariji samo-prilagajanja aplikacij, pogodbe na ravni storitev so vgrajene v pametne pogodbe, digitalni dvojček

27

DECENTER (2018-2021)

28 of 61

Research and Innovation Aspects

28

Define resource models and associated SLAs for in-border and cross-border services

Develop a robust multi-tier fog platform to manage cloud-to-edge resources

Define and implement resource orchestration strategies to satisfy app requirements

Implement blockchain-based smart contracts and probing tools to validate their fulfillment

Privacy-preserving mechanism to represent users’ context

Facilitate interoperable IoT device management in the infrastructure

Develop hierarchical methods to map AI algorithms from the cloud to the edge

Develop application data management over the infrastructure for cross-border AI

Validate DECENTER innovations, and demonstrate them in real world pilots

Promote the standardisation and industrial application of DECENTER results

29 of 61

DECENTER Architecture

29

30 of 61

30

DECENTER Fog and Brokerage Platforms

Brokerage Platform

    • Handle sharing of resources across domains

Fog Computing Platform

    • Manages infrastructure and deploys containerized applications

Includes all the virtualized environment to recognize, abstract, expose, share and orchestrate resources from cloud to edge in support to AI applications

31 of 61

Expected Benefits

31

Issues

Computing latency

Bandwidth limitations

Resource availability �and ownership

Data privacy

Decentralised fog/edge computing offers timely computation for AI applications

Distributing AI in the fog reduces need of bandwidth between cloud and edge

Smart contracts enable short-lived and trusted resource sharing between providers

Data fusion, filtering, and digital reality provided at the edge allow to preserve confidential data

32 of 61

DECENTER Fog and Brokerage Platforms

32

Fog Computing

Brokerage

QoS & SLA & monitoring

Security & Robustness

Architecture

Orchestration

IoT fabric

Data brokerage @ edge

Resource Federation

Design

Implementation: Brokerage Platform�Initial tech scenario demonstration�

33 of 61

DECENTER services and tools

33

AI preparation

AI delivery

Model preparation

Model repository

AI into microservices

DECENTER base container (deliver AI Service)

Digital twin

AI App

Output

Distributed AI App

Platform

34 of 61

Implementation of Containerized AI

34

Base Container Implementation

  • Container image with TensorFlow
  • DECENTER Package
    • Base class for AI application
    • AI model
    • RESTful interface (Flask)

Implementation of VGG16 Microservice

Implementation of Yolov3 Microservice

AI functionalities exposed with RESTful API

35 of 61

DECENTER Fog and Brokerage Platforms

35

Resource owner / �Infrastructure provider B

Interface 1

Application Composer GUI

Orchestrator A

INFR. A (Cloud+Fog)

Resource Selector

Ethereum Blockchain

IaaS Manager

Reosurce Manager

Orchestrator B

INFR. B (Cloud+Fog)

IaaS Manager

Resource Manager

Resource Seller

Resource Seller

REB_A

REB_B

Interface 1

Interface 1

Interface 3

Resource owner / �Infrastructure provider A

Resource Exchange Broker

Interface 2

Brokerage Platform

Fog Computing Platform(s)

/

Monitoring System

SLA Manager

Monitoring System

36 of 61

Expected benefits�- Saving Time�- Saving Money�- Energy Efficiency and Sustainability�- Quality Working Conditions�- Safer Working Conditions�- Improved Planning�- Early Disaster Warning�- …

Štefanič, M., and Stankovski, V. A review of technologies and applications for smart construction. Proceedings of the Institution of Civil Engineers – Civil Engineering, https://doi.org/10.1680/jcien.17.00050

A Review of Technologies and Applications for Smart Construction

37 of 61

Distributed AI Applications for Construction and Civil Engineering in General

  • Applications for smarter and safer construction
  • Equation-discovery for earthquake ground-motion-prediction
  • Early warning system for flood control
  • Solving solid and fluid mechanics problems in the Cloud 
  • Other smart applications

37

38 of 61

38

39 of 61

Supporting Smart Construction with Dependable Edge Computing Infrastructures and Applications

39

Kochovski, P., Stankovski, V. Supporting smart construction with dependable edge computing infrastructures and applications, Automation in Construction, DOI: 10.1016/j.autcon.2017.10.008

Documenting

Collaborative engineering

40 of 61

Setting Up a Smart & Safe Construction Site 

  • Unique product and processes
    • non-trivial
  • IP video cameras
    • How many and where to set them up?
  • What to detect?
    • Which AI methods/pre-trained models to use?
    • How to train them?
    • How to use them?
  • Edge-Fog-Cloud 
    • What computing resources and process automation?

40

41 of 61

Construction Site Smart Management

Planning

Precision

Monitoring

Tracking

Progress

Process

Budget

Collaboration

42 of 61

Type of material

Quantity

Notification

Notification

Smart Management of Resources and Assets

43 of 61

Construction worker

Supervisor

Construction site manager

How many workers are currently at the site?

Was the construction site manager present at 12:00 CET today and where?

Design study: 2D floor plan. Placing objects and persons on a 2D floor plan or 3D model.

Person without a helmet in safety zone

Splitting the site map into zones of interest, e.g. danger zones.

44 of 61

Observing the Site

The worker observed in the video:

    • Is he wearing a helmet?
    • Which colour is the helmet?

    • Does he wear a safety vest?
    • Is he a company employee?

      • Is he happy?
      • Was he at work yesterday?
      • Who is he conversating with?

44

PRIVACY!

SECURITY

SAFETY

45 of 61

Safety at Work: Helmet Detection

  • A construction site must operate under certain standards and safety precautions
  • A supervisor must observe status and events at site:
    • Are all workers wearing protective helmets?
  • Possible automation and enhancement:
    • Helmet detection as an AI application
    • Produce alerts for supervisor when workers do not wear protective helmets 

45

46 of 61

25

Example: TensorFlow

Helmet

detection

Car plate

number

recognition

Material

type recognition

……

Deep Learning in the Fog

47 of 61

Using AI (Deep Learning)

47

{

    "bounding-box": "350,287,50,213",

    "classification": "person",

"helmet": "yes"

}

AI models

People detection

48 of 61

Use Case Examples – Easy or Difficult?

48

The system shall be able to identify if the workers are wearing a helmet and a safety vest.

The system shall be able to identify the quantity/assets of materials. The system shall identify peoples (workers/visitors).

EASY

DIFFICULT

49 of 61

Use Case Examples – Easy or Difficult?

49

The system shall be able to identify the number of workers and the color of their helmets.

The system shall be able to identify people‘s position in a restricted area.

EASY

DIFFICULT

50 of 61

Use Case Examples – Easy or Difficult?

50

The system shall be able to identify the type of a vehicle and the number on its licence plate.

The system shall be able to identify the type of the vehicle and direction of its movement.

EASY

DIFFICULT

51 of 61

Video Stream AI Processing Pipeline

  • Many video cameras
  • Video streams are analysed
  • AI libraries with pre-trained models are applied on video streams

51

Video stream ingestion

Knowledge Base

Stream preprocessing

Features processing

Notifications

Connection

Connection through Pub/Sub, MQ, buffer

AI models

Preprocessors

52 of 61

Augmented Virtuality: From Reality to Augmented BIM

  • Augmented reality for the purpose of:
    • Construction progress tracking
    • Safety observation
  • BIM representation of a building placed into a real video stream

52

Construction site

Building Information Model

 Phase I

 Phase II

 Phase V

Construction progress tracking

53 of 61

27

Is everyone wearing a helmet?

If not, ring the alarm bell.

Is everyone wearing an uniform?

If not, ring the alarm bell.

What type of building materials are currently on site?

Bricks should be stored.

If found, notify the site engineer.

Are there any unregistered cars on the site?

If yes, notify the security.

Is anyone unhappy?

Who is the unknown visitor?

Are there any bricks around?

Integrating the information

Digital Twin

Air temperature is exceeding working limits, notify the site engineer.

CO2 Emission levels are higher than it should be, notify the site engineer.

Possible colision between crane and electric wires detected, notify the site engineer.

Earthquake warning recieved from earthquake observatory, ring the emergency alarm bell.

54 of 61

Smart and Safe Construction App

  • Detect and alert about dangerous situations in construction
  • AI objectives
    • Distinguish objects
  • Fog objectives
    • Edge to Cloud/Edge Offloading
    • Smart contracts
  • Digital Twin representation
    • Workers, map
  • Models
    • Object recognition
    • People identification
    • Prediction

54

55 of 61

Single AI App Designed to Run in Two Tiers

55

TIER 2

TIER 1

Data Pre-processor

Data Post-processor

AI Method (AI Model Rear Part)

Backend

50 Mbps

50 Mbps

10 FPS

(0.1 s/frame)

10 FPS

(0.1 s/frame)

5.3 Mbps

10 FPS

(0.1 s/frame)

IoT Frontend

4k@60 FPS

H.265 (HEVC)

MP4 or MKV

10-20 Mbps

180 Mbps

10 FPS

(0.1 s/frame)

10 FPS

(0.1 s/frame)

50 Mbps

10 FPS

(0.1 s/frame)

Data Pre-processor

AI Method (AI Model Front Part)

Data Post-processor

The Internet

Pod

Pod

Box = container

Pod = deployment unit

boxes = AI solution service

boxes = Platform services

boxes = AI solution service, deployed separately

YOLOv3 study AI model

Deployment Assumption:

two-component & two-tier application

50 Mbps

64 kbps

56 of 61

The person is wearing a helmet.

Direction of moving veichle identified.

The person is wearing a uniform.

License plate

İdentified.

Type of material identified from texture.

0.00 s

0.15 s

0.12 s

0.10 s

0.16 s

0.17 s

0.24 s

0.21 s

0.20 s

0.27 s

0.30 s

0.32 s

57 of 61

57

Functional (FR)

    • Input & preprocessing
    • Digital Twin
    • AI Training
    • Data Storage
    • Alert
    • AI Recognition & Prediction
    • Edge to Cloud & Edge to Edge Offloading
    • Smart contracts

System (SR)

    • Computational Power
    • Internet Connectivity
    • HD Capacity
    • GPU or CPU Capacity
    • Sensors & Hardware Requirements

Non-Functional (NFR)

    • Robustness
    • Privacy
    • Time Response
    • Accuracy
    • Reusability & Adaptation
    • Reliability
    • Security
    • Privacy

SR

23,3%

NFR

30,1%

FR

46,6%

Summary of Requirements

58 of 61

  • Spoznali smo osnovne koncepte in principe samo-prilagajanja pametnih aplikacij
  • Znanje na področju samo-prilagodljivosti ni še dovolj dobro sistemizirano, zato je potrebno poznati in uporabljati različne pristope pri reševanju realnih problemov
  • Problemi na področju uporabe umetne inteligence v realnih okoljih so večinoma nedeterministični
  • DevOps skupnosti in praktike potrebujejo nova orodja za razvoj samo-prilagodljivih aplikacij
  • V okviru predmeta bomo poskušali razviti elementarno pametno aplikacijo, ki bo imela tudi določeno stopnjo samo-prilagodljivosti

58

Zaključki

59 of 61

59

Cross-border AI management

60 of 61

Application scenario

60

STOP C1

START C2

STOP C2

START C4+C5

Orchestrator

alarm

Backend

AI MODEL REPOSITORY

SERVICE

REPOSITORY

BLOCKCHAIN

(SC execution)

61 of 61

  • Questions: doc. dr. Petar Kochovski, Pouriya Miri, Primož Šiško, Luka Maček, Atiyeh Ghane, Arvin Jušić, Harun Demir, Vlado Stankovski > laboratorij R2.42
  • Kabinet R2.47

61

Where to find us?