Timed Petri Net Representation of the SMIL of XML - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Timed Petri Net Representation of the SMIL of XML

Description:

Wright State University, Dayton, Ohio, USA ... Display a graphical representation of the temporal and synchronization ... A represents a set of directed arcs. ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 33
Provided by: cow93
Category:

less

Transcript and Presenter's Notes

Title: Timed Petri Net Representation of the SMIL of XML


1
Timed Petri Net Representation of the SMIL of XML
  • Chung, S.M. Pereira, A.L.
  • Wright State University, Dayton, Ohio, USA
  • Information Technology Computers and
    Communications, 2003. Proceedings. ITCC 2003.
    International Conference on , 2003
  • Speaker C.W. Tien 2003/05/06

2
Abstract
  • Propose a technique by which clients can submit
    to the server information of all the required
    multimedia objects and their temporal
    relationships for presentation.
  • The technique uses an enhanced Timed Petri Net
    (TPN) to capture information of multimedia
    objects along with their timing and
    synchronization specified in the SMIL.
  • Display a graphical representation of the
    temporal and synchronization information captured
    by the data structure representing the Timed
    Petri Net.
  • This information can be used by a multimedia
    server to schedule and optimize the delivery of
    multimedia data streams.

3
Outline
  • 1. Introduction
  • 2. Parsing SMIL into a TPN
  • 2.1. SMIL
  • 2.2. Petri Nets
  • 2.3. A New Timed Petri Net
  • 2.4. Capturing SMIL Semantics
  • 3. Graphical Display of the Timed Petri Net
    Representation of SMIL
  • 4. Conclusion

4
2.2. Petri Nets
  • The basic Petri net structure is composed of four
    parts a set of places P, a set of transitions T,
    an input function I and an output function O.
  • The input and output functions relate transitions
    and places

5
2.2. Petri Nets
  • A circle represents a place
  • A bar represents a transition.
  • Directed arcs connect the places to the
    transitions and from transitions to places.
  • An arc directed from a place to a transition
    defines the place to be an input of the
    transition.
  • An output place is indicated by an arc from the
    transition to the place.

6
2.2. Petri Nets
  • A marked Petri net includes a marking M which
    assigns tokens to each place
  • Tokens are represented by dots in the Petri net
    graph.
  • Tokens are used to define the execution of a
    Petri net.
  • The number of tokens that may be assigned to a
    place is unbounded

7
2.2. Petri Nets
  • In simple Petri nets, firing of a transition is
    assumed to be instantaneous.
  • A class of enhanced Petri net models have been
    developed which assign a firing duration to each
    transition.
  • These models are generally called Timed Petri Net
    (TPN) models.
  • Another TPN model represents processes by places
    instead of transitions.
  • Nonnegative times are assigned to each place in
    the net.
  • Object Composition Petri Net (OCPN)

8
2.2. Petri Nets
  • An OCPN is defined as follows
  • COCPN T, P, A, M, D, R where
  • T t1, t2, , tm,
  • P p1, p2 , pn,
  • A T P U P T --gtI, I 1, 2, ,
  • M P --gtL, L 0, 1, 2, ,
  • D P --gtreal numbers, and
  • R P --gtr1, r2, .
  • T represents a set of transitions (bars).
  • P represents a set of places (circles).
  • A represents a set of directed arcs.
  • M is a marking that represents a mapping from the
    set of places to the integers.
  • D is a mapping from the set of places to the real
    numbers (durations).
  • R is a mapping from the set of places to a set of
    resources.

9
2.2. Petri Nets
  • Firing rules
  • A transition fires immediately when each of its
    input places contain an unlocked token.
  • Upon Firing, the transition removes a token to
    each of its output places.
  • After receiving a token, a place remains in the
    active state for the interval specified by the
    duration. During this interval the token is
    locked. When the place becomes inactive or the
    duration expires, the token becomes unlocked

10
2.3. A New Time Petri Net
  • The OCPN is not powerful enough to capture all
    the timing and synchronization semantics of SMIL.
  • The OCPN cannot support the endsync attribute
    because a single place unlocking its token cannot
    fire the transition if there are other places
    with locked tokens feeding into the same
    transition.

11
2.3. A New Time Petri Net
  • The ltexclgt container allows only a single stream
    among a parallel group of streams to be active.
  • This cannot be allowed by the OCPN because a
    transition removes a token to each of its output
    places upon firing, and after receiving a token,
    a place remains in the active state for the
    interval specified by the duration.

12
2.3. A New Time Petri Net
  • The ltpriorityClassgt container, when used within
    an ltexclgt container, specifies the behavior of an
    active stream when another stream starts up
    within the same ltexclgt container.
  • The semantics of this element also is not
    supported by the OCPN.

13
2.3. A New Time Petri Net
  • Each place can be assigned tokens of three
    distinct types type 0, type 1, type 2
  • A single token within a place represents a token
    controlling the firing of a transition.
  • If there are two tokens in a place, then the
    upper one controls the state of the place and the
    lower one controls the firing of the transition.

14
2.3. A New Time Petri Net
  • The allocation of tokens that control the firing
    of a transition is done initially in the TPN.
  • A place is inactive in the absence of a token
    that determines its state
  • Tokens can be unlocked at a place only if both
    tokens are present at that place.
  • Only the unlocking of the token which controls
    the firing of the transition will have an effect
    on the transitions firing.

15
2.3. A New Time Petri Net
  • There are two types of transitions the ordinary
    transition and the special transition.
  • Both transition types have associated values that
    specify the number of times a transition can
    fire.

16
2.3. A New Time Petri Net
  • Fire rules
  • An ordinary transition fires in two cases
  • If each of its input places contains an unlocked
    token of type 0. This is the default behavior of
    a group of media streams in parallel.
  • If one or more of its input places contain an
    unlocked token but only if the token is of type
    1.

17
2.3. A New Time Petri Net
  • Fire rules
  • A special transition fires in two cases
  • If one of its input places contains an unlocked
    token of type 2 and the rest of its input places
    contain an unlocked token of type 0.
  • If one of its input places contain an unlocked
    token of type 2 and one or more of its other
    input places contain an unlocked token of type 1.

18
2.3. A New Time Petri Net
  • Fire rules
  • Upon firing, an ordinary transition removes a
    token of type 0 to each of its output places.
  • Upon firing, a special transition removes a token
    of type 0 to only one of its output places and
    tokens of type 1 to all of its other output
    places.

19
2.3. A New Time Petri Net
  • Fire rules
  • If an output place receives a token of type 1,
    then the place will remain inactive or will be
    deactivated if it is already active.
  • If the output place receives a token of type 0
    then it will remain active for the duration
    specified or until it is deactivated.

20
2.3. A New Time Petri Net
21
2.3. A New Time Petri Net
22
2.3. A New Time Petri Net
  • The proposed TPN is defined as follows
  • CTPN OST, P, A, X, Y, U, W, D, R where
  • OST ot1, ot2, , otm U st1, st2, , stn,
  • P p1, p2 , pk,
  • A OST P U P OST --gt I, I 1, 2, ,
  • X P --gt H, H h1, h2, , hj,
  • Y H --gt L1 U L2 U L3, L1 0, 3, 6, , L2
    1, 4, 7, , L2 2, 5, 8, ,
  • U OST --gt V, V v1, v2, ,
  • W V --gt L, L 0, 1, 2, ,
  • D P --gt  real numbers, and
  • R P --gt  r1, r2,
  • OST represent a set of ordinary transitions
    (bars) and special transitions (vertical dashed
    lines).
  • P represent a set of places (circles).
  • A represent a set of directed arcs.
  • X is a mapping from the set of places to a set of
    token holders.
  • Y is a mapping from the set of token holders to
    the integers.
  • U is a mapping from the set of transitions to a
    set of values.
  • W is a mapping from the set of values to the
    integers.
  • D is a mapping from the set of places to the real
    numbers (durations).
  • R is a mapping from the set of places to a set of
    resources.

23
2.4. Capturing SMIL Semantics
  • In the TPN data structure,
  • each place is represented by a single place node,
    and
  • The place node contains fields for resources,
    durations, token holders and a pointer to a
    transition node.
  • each transition is represented by a list having
    one or more transition nodes.
  • A transition node contains fields for values, a
    pointer to a place node, and a pointer to a
    transition node.
  • The values are used to control the firing of the
    transition, to indicate the number of times it
    can fire, and to indicate its type.

24
2.4. Capturing SMIL Semantics
  • ltseqgt
  • ltaudio src"audio.wav" end"10s"/gt
  • ltvideo src"video.mpg" begin"2s"/gt
  • lt/seqgt
  • The information of timing attributes and media
    object URIs is captured within places.
  • For the begin and end attributes, a duration is
    modeled by using arcs and a place which possesses
    null resources and a finite duration.
  • An event specified for the begin and end
    attributes is modeled by using arcs and a place
    which possesses a resource representing an event
    and zero duration.
  • In the case of the end attribute, a token of type
    1 is initially allocated to the place to control
    the firing of the transition.

25
2.4. Capturing SMIL Semantics
  • For the endsync attribute within a ltpargt
    container,
  • all the children are initially allocated a token
    of type 1 if the group has to end with the first
    stream that stops play back.
  • If the parallel group has to end with a
    particular child, then only that child is
    initially allocated a token of type 1.
  • In case of the default semantics of ltpargt, the
    tokens initially allocated to the children are of
    type 0.

26
2.4. Capturing SMIL Semantics
  • The transition representing the beginning of the
    children within an ltexclgt container is tied into
    the occurrence of certain event.
  • When an event occurs, only the particular child
    to be played will be passed a token of type 1.
  • On the event that another stream needs to be
    started up, then only the required stream
    receives a token of type 1 and the child that has
    been active will receive a token of type 0.

27
3. Graphical Display of the Timed Petri Net
Representation of SMIL
  • Implementation environment UNIX
  • Tools fast lexical analyzer generator (flex) is
    used for the lexical analysis and Bison for
    parsing.
  • Data structure
  • The graphical display is done by recursively
    traversing the TPN data structure and using
    OpenGL to draw on the screen.

28
  • ltseqgt
  • ltimg src"image1.jpg" dur"5s"/gt
  • ltpar endsync"first"gt
  • ltaudio src"audio1.wav" begin"3s" dur"35s"/gt
  • ltseqgt
  • lttext src"text1.html" begin"0s"
    end"stopbutton.click"/gt
  • lttext src"text2.html" dur"10s"/gt
  • lt/seqgt
  • ltvideo src"video1.mpg" begin"7s" dur"30s"
    fill"freeze"/gt
  • lt/pargt
  • ltimg src"image2.jpg" dur"10s"/gt
  • lt/seqgt

29
  • ltpargt
  • ltseqgt
  • ltimg src"image1.jpg" begin"5s" dur"5s"/gt
  • ltaudio src"audio1.wav" dur"20s"/gt
  • ltexclgt
  • ltvideo src"video1.mpg" begin"0s" dur"20s"/gt
  • ltaudio src"audio2.wav" begin"10s" dur"15s"/gt
  • lt/exclgt
  • lt/seqgt
  • ltimg src"image2.jpg" id"img2" end"30s"/gt
  • ltaudio src"audio3.wav" end"img2.end"/gt
  • lt/pargt

30
  • ltpargt
  • ltpargt
  • ltimg src"image1.jpg" idimg1 begin"5s"
    dur"5s"/gt
  • ltvideo srcvideo1.mpg" idvid1 dur"20s"/gt
  • ltexclgt
  • ltimg srcimage2.jpg" beginimg1.activateEvent"
    dur"20s"/gt
  • ltvideo srcvideo2.mpg" beginvid1.activateEvent"
    dur"15s"/gt
  • lt/exclgt
  • lt/pargt
  • ltimg src"image3.jpg" id"img3" end"30s"/gt
  • ltvideo srcvideo3.mpg" end"img3.end"/gt
  • ltseqgt
  • ltimg src"image4.jpg" endimg3.activateEvent"/gt
  • ltvideo srcvideo4.mpg" repeatCount3"/gt
  • lt/seqgt
  • lt/pargt

31
3. Graphical Display of the Timed Petri Net
Representation of SMIL
  • Labels meanings
  • The letters V, A, I and T indicate the type of
    media object
  • The numbers are printed in ascending order from
    left to right for objects in a sequence, and top
    to bottom for objects in parallel.
  • A label above a vertical line is an index to
    additional semantic information about the child
    elements in parallel.
  • A solid vertical line indicates that the child
    elements are specified within a ltpargt container
  • A dashed vertical line indicates that the child
    elements are specified within a ltexclgt container.

32
4. Conclusion
  • Proposed a new technique in which a client can
    inform the multimedia server of all the temporal
    and synchronization requirements of the
    multimedia data required for presentation.
  • The client can specify its requirements in a SMIL
    document.
  • The multimedia server can parse the SMIL document
    into a Timed Petri Net (TPN).
  • The multimedia server can use the TPN to optimize
    its delivery schedule and best utilize the system
    resources
  • The proposed TPN is an enhancement of the Object
    Composition Petri Net (OCPN).
  • The TPN can capture the temporal synchronization
    semantics supported by SMIL.
Write a Comment
User Comments (0)
About PowerShow.com