Discovery of Frequent Episodes in Event Sequences