Trend Sequences Analysis of Temporal Data and a Subsequence Matching Algorithm