KR102433568B1 - Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device - Google Patents

Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device Download PDF

Info

Publication number
KR102433568B1
KR102433568B1 KR1020200169723A KR20200169723A KR102433568B1 KR 102433568 B1 KR102433568 B1 KR 102433568B1 KR 1020200169723 A KR1020200169723 A KR 1020200169723A KR 20200169723 A KR20200169723 A KR 20200169723A KR 102433568 B1 KR102433568 B1 KR 102433568B1
Authority
KR
South Korea
Prior art keywords
dtw
resolution
fast
data
warping
Prior art date
Application number
KR1020200169723A
Other languages
Korean (ko)
Other versions
KR20220080520A (en
Inventor
정윤호
최원영
조재찬
Original Assignee
한국항공대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국항공대학교산학협력단 filed Critical 한국항공대학교산학협력단
Priority to KR1020200169723A priority Critical patent/KR102433568B1/en
Publication of KR20220080520A publication Critical patent/KR20220080520A/en
Application granted granted Critical
Publication of KR102433568B1 publication Critical patent/KR102433568B1/en

Links

Images

Classifications

    • G06K9/0055
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06K9/6267
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • G06F2218/16Classification; Matching by matching signal segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

본 발명의 일 실시예에 따른 고속으로 제약적 동적 시간 워핑 방법은 기 설정된 윈도우 영역의 해상도를 제1 처리(coarsening) 과정을 통해 1/2 데이터 길이 및 1/4의 데이터 길이를 갖는 멀티 해상도로 각각 형성하는 단계; 상기 1/2 데이터 길이를 갖는 멀티 해상도 중 낮은 해상도의 윈도우 영역을 SC-DTW의 제한된 윈도우 영역으로 한정하여 정렬을 진행하한 후, 상기 1/2 데이터 길이를 포함하는 해상도를 갖는 윈도우 영역의 선택적 워핑 경로를 추적하는 단계; 상기 1/2 데이터 길이를 포함하는 해상도를 갖는 윈도우 영역에서 추정된 선택적 워핑 경로와 설정 파라미터 r에 맞게 SC-DTW의 제한된 윈도우 영역 안에서 정렬 연산을 수행하는 윈도우 영역을 각각 제1 세그먼트 및 제2 세그먼트로 형성하는 단계; 상기 제한된 윈도우 영역 안에서 상기 제1 세그먼트 및 상기 제2 세그먼트를 정렬하는 단계; 정렬된 제1 세그먼트 및 제2 세그먼트 내에서 선택적 워핑 경로를 추정하는 단계; 및 추정된 1/2의 데이터 길이를 갖는 해상도의 선택적 워핑 경로를 활용해 상기 기 설정된 윈도우 영역의 해상도의 선택적 워핑 경로 및 DTW 거리를 연산하는 단계를 포함한다.In the high-speed constrained dynamic time warping method according to an embodiment of the present invention, the resolution of the preset window area is converted into multi-resolution each having a data length of 1/2 and a data length of 1/4 through a first coarsening process. forming; Selective warping of a window area having a resolution including the 1/2 data length after alignment is performed by limiting a window area of lower resolution among multi-resolutions having the 1/2 data length to the limited window area of the SC-DTW tracing the route; The first segment and the second segment, respectively, are selected from the window area for performing the alignment operation within the limited window area of the SC-DTW according to the estimated selective warping path and the setting parameter r in the window area having a resolution including the 1/2 data length. forming with; aligning the first segment and the second segment within the limited window area; estimating a selective warping path within the aligned first and second segments; and calculating a selective warping path and a DTW distance of a resolution of the preset window area by using a selective warping path of resolution having an estimated data length of 1/2.

Description

시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법, 이를 실행하는 프로그램을 읽을 수 있는 기록매체 및 이를 포함하는 연산장치{Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device}A high-speed constrained dynamic time warping method for measuring the similarity of time series data, a recording medium that can read a program executing the same, and an arithmetic device including the same media, computing device}

본 발명은 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법, 이를 실행하는 프로그램을 읽을 수 있는 기록매체 및 이를 포함하는 연산장치에 관한 것이다.The present invention relates to a high-speed constrained dynamic time warping method for measuring the similarity of time series data, a recording medium capable of reading a program executing the same, and an arithmetic device including the same.

시계열 데이터 마이닝(Time series data mining)은 클러스터링(clustering), 분류(classification), 오류감지(fault detections), 패턴인지(pattern recognition) 및 예측(prediction) 등 많은 분야들을 포함한다. Time series data mining includes many fields such as clustering, classification, fault detection, pattern recognition, and prediction.

그 중, 두 time series data간의 유사도 측정은 가장 빈번하며, 중요한 업무이다. 시계열 데이터(Time series data)들 간의 유사도를 정확히 측정하기 위해서는 두 데이터를 시간 축 상에서 정렬하는 작업을 필요로 한다. 동적 시간 워핑(Dynamic time warping; 이하, DTW)는 두 데이터를 시간 축 상에서 왜곡(warp)하여, 가능한 모든 정렬들 중 가장 최적의 정렬을 찾아 유사도를 측정한다.Among them, measuring the similarity between two time series data is the most frequent and important task. In order to accurately measure the similarity between time series data, it is necessary to align the two data on the time axis. Dynamic time warping (hereinafter, DTW) warps two data on the time axis, finds the most optimal alignment among all possible alignments, and measures the similarity.

이에 따라, DTW는 제스쳐(gesture), 이미지(image), 음성인식(speech recognition), 침입감지(intrusion detection), 재정분석(financial analysis), 생체 및 의료 진단(biometrics and medical diagnosis) 등의 많은 분야에서 활용되고 있다. 하지만, 정렬 가능한 모든 경우의 수를 고려하는 DTW는 유사도를 측정하고자 하는 두 입력 데이터의 길이(length)에 따라 높은 연산량을 필요로 하는 문제를 갖는다. Accordingly, DTW has many fields such as gesture, image, speech recognition, intrusion detection, financial analysis, biometrics and medical diagnosis, etc. is being used in However, DTW considering the number of all sortable cases has a problem that requires a high amount of computation according to the length of two input data for which similarity is to be measured.

DTW의 높은 연산 복잡도 측면에서의 한계를 극복하기 위해 다양한 알고리즘들이 제안되었으며, DTW 알고리즘 사용 횟수를 줄이는 인덱싱(indexing) 기법과, DTW 연산 복잡도를 감소시키는 제약적(constraints) 및 데이터 축약(data abstraction)기법 등이 있다.In order to overcome the limitations of DTW in terms of high computational complexity, various algorithms have been proposed. An indexing technique that reduces the number of times the DTW algorithm is used, and a constraint and data abstraction technique that reduces the DTW computational complexity. etc.

여기서, 인덱싱(Indexing) 기법은 DTW에 비해 복잡도가 낮은 lower bounding 함수를 사용하여 비교하고자 하는 데이터 시퀀스들과 입력 데이터 시퀀스 사이의 유사할 가능성이 없는 비교 데이터 시퀀스들을 사전에 제거한다. 이후, 남은 비교 데이터 시퀀스들만 한정하여 DTW 연산을 진행해 높은 연산 시간을 개선하는 기법이다.Here, the indexing technique uses a lower bounding function having a lower complexity than DTW to remove in advance the comparison data sequences that are not likely to be similar between the data sequences to be compared and the input data sequences. Thereafter, it is a technique of improving the high operation time by performing DTW operation by limiting only the remaining comparison data sequences.

한정된 특정 범위 내에서만 정렬 작업들을 진행하는 제약 조건을 도입한 제약적(constraints) 기법은 모든 데이터 points들에 대해 동등한 정렬 작업을 수행하는 Sakoe-Chiba DTW (SC-DTW)와 시간 축 상에서 최근의 데이터 포인트(points)에 대해 더 많은 정렬 작업을 수행하는 incremental DTW (I-DTW) 등이 있다. The constraint method, which introduces a constraint to perform sorting operations only within a limited specific range, is the Sakoe-Chiba DTW (SC-DTW), which performs equivalent sorting on all data points, and the latest data point on the time axis. Incremental DTW (I-DTW), which does more sorting on (points).

이러한 제약적(constraints) 기법은 고려해야 할 정렬들의 수를 줄여 연산량을 감소시킬 수 있으며, 서로 다른 라벨(label) 정보를 갖는 데이터들 간의 과도한 정렬 작업으로 인해 전체 분류 정확률을 낮출 수 있는 병리학적 정렬 문제(pathological alignment problem)을 억제하여 모든 정렬들을 고려하는 표준(standard) DTW에 비해 높은 정확률을 기대할 수 있다. This constraint technique can reduce the amount of computation by reducing the number of alignments to be considered, and pathological alignment problems ( By suppressing the pathological alignment problem, higher accuracy can be expected compared to the standard DTW that considers all alignments.

하지만, 이러한 제약적(constraints) 기법들은 유사도를 측정하고자 하는 두 입력 데이터의 상대적인 관계에 따라 달리 형성될 수 있는 최적의 정렬 위치를 고려하지 않고 항상 고정된 일정 범위의 정렬 연산들을 진행하며 또한, 데이터의 길이(length)에 따라 연산량이 여전히 이차적(quadratic)으로 증가하여 데이터의 길이(length)가 긴 경우, 높은 연산량을 요하게 된다.However, these constraint techniques always perform alignment operations in a fixed range without considering the optimal alignment position that may be formed differently depending on the relative relationship between the two input data for which the similarity is to be measured. If the length of the data is long because the amount of computation is still quadratic, depending on the length, a high amount of computation is required.

데이터 축약(Data abstraction) 기법은 두 입력 데이터의 고려해야 할 차원을 줄인 데이터 표현을 활용해 높은 연산량을 개선하는 기법으로, piecewise aggregate DTW (P-DTW), blocked DTW (B-DTW) 그리고 fast DTW 등이 있다.The data abstraction technique is a technique to improve the high amount of computation by using a data representation that reduces the dimensions to consider of two input data, such as piecewise aggregate DTW (P-DTW), blocked DTW (B-DTW), and fast DTW. There is this.

P-DTW는 유사도를 측정하고자 하는 두 데이터의 각 포인트들을 일정 비율로 나눈 뒤, 각 무리끼리 평균을 취해 새로운 데이터 표현을 만드는 기법으로, DTW 연산 시, 고려해야 할 데이터 points 수를 줄여 연산량을 감소시킬 수 있으나, 평균을 취하는 과정에서 중요한 특징을 갖는 포인트들을 놓칠 수 있는 한계를 갖는다. P-DTW is a technique to create a new data expression by dividing each point of the two data for which similarity is to be measured at a certain ratio and then taking the average of each group to create a new data expression. However, there is a limit in that points with important characteristics can be missed in the process of taking the average.

데이터의 연속된 값들을 갖는 포인트들을 효율적으로 줄이는 기법을 활용한 B-DTW는 연산해야 할 데이터의 차원을 줄여 연산량을 개선시킬 수 있지만, 줄어든 데이터의 차원만큼 부정확한 유사도 측정 값을 갖게 된다. B-DTW using a technique to efficiently reduce points with consecutive values of data can improve the amount of computation by reducing the dimension of the data to be computed, but it has an inaccurate similarity measurement value as much as the dimension of the reduced data.

Fast DTW 기법은 유사도를 측정하고자 하는 두 데이터의 해상도(resolution)을 계층적으로 줄여 멀티 해상도를 형성하고, 가장 낮은 계층에서부터 최적의 정렬 위치를 추적한 후, 이를 바로 위 계층의 대략적인 최적의 정렬 위치를 추정하는데 활용하는 방법을 사용하는 기술이다. 추정된 최적의 정렬 위치의 주변에 대한 정렬만 고려하는 방식으로 점층적으로 본래 해상도의 최적의 정렬 위치까지 추정하는 fast DTW 기법은 두 입력 데이터의 상대적인 관계에 따라 달리 형성되는 최적의 정렬 위치를 효율적으로 추정하여 연산 시간을 개선할 수 있다. The Fast DTW technique hierarchically reduces the resolution of two data to measure the similarity to form multi-resolution, tracks the optimal alignment position from the lowest layer, and then calculates the approximate optimal alignment of the layer immediately above. It is a technique that uses the method used to estimate the location. The fast DTW technique, which incrementally estimates the optimal alignment position of the original resolution in a way that only considers the alignment around the estimated optimal alignment position, efficiently calculates the optimal alignment position that is formed differently depending on the relative relationship between the two input data. calculation time can be improved by estimating .

선형적인 연산량을 나타내는 fast DTW 알고리즘은 설계 파라미터의 값이 클수록 더 정확히 최적의 정렬 위치를 추적할 수 있으나, 이는 연산량 증가로 이어진다. 이에 따라, fast DTW는 유사도를 측정하고자 하는 두 데이터의 길이(length)에 의한 연산량의 증가가 fast DTW의 설계 파라미터에 의한 연산량의 증가보다 큰 경우에만 연산량 감소를 기대할 수 있으며, 병리학적 정렬 문제(pathological alignment problem)을 갖는 fast DTW 알고리즘은 제약적(constraints) 기법과 비교했을 때, 상대적으로 낮은 분류 정확률을 나타낸다. The fast DTW algorithm representing a linear amount of computation can track the optimal alignment position more accurately as the value of the design parameter is larger, but this leads to an increase in the amount of computation. Accordingly, fast DTW can expect a decrease in the amount of computation only when the increase in the amount of computation by the length of the two data for which the similarity is to be measured is greater than the increase in the amount of computation by the design parameter of the fast DTW, and pathological alignment problems ( The fast DTW algorithm with pathological alignment problem shows a relatively low classification accuracy when compared to the constraint technique.

이에 따라, 본 발명에서는 제약적(constraints) 기법의 제약 조건 안에서 fast DTW 알고리즘의 최적의 정렬 위치 추정 기법을 적용한 고속으로 제약적 동적 시간 워핑(fast constrained DTW) 방법을 제안한다. Accordingly, the present invention proposes a fast constrained DTW method in which the optimal alignment position estimation method of the fast DTW algorithm is applied within the constraints of the constraint method.

본 발명의 고속으로 제약적 동적 시간 워핑(fast constrained DTW) 방법은 제약적 기법과 유사한 분류 정확률을 지원 가능하며, fast DTW 기법의 설계 파라미터 및 두 입력 데이터의 길이와 상관없이 항상 fast DTW 및 제약적 기법들과 비교해 낮거나 유사하며 선형적인 연산 시간이 소요된다는 특징이 있다.The fast constrained DTW method of the present invention can support classification accuracy similar to that of the constrained method, and is always combined with fast DTW and constrained methods regardless of the design parameters of the fast DTW method and the length of two input data. It is characterized in that it is relatively low or similar and requires a linear operation time.

W.-S. Han, J. Lee, Y.-S. Moon, S.-W. Hwang, and H. Yu, "A New Approach for Processing Ranked Subsequence Matching Based on Ranked Union," In Proc. of Int’l Conf. on Management of Data, ACM SIGMOD, Athens, Greece, pp.457-468, Jun. 2011.W.-S. Han, J. Lee, Y.-S. Moon, S.-W. Hwang, and H. Yu, "A New Approach for Processing Ranked Subsequence Matching Based on Ranked Union," In Proc. of Int'l Conf. on Management of Data, ACM SIGMOD, Athens, Greece, pp.457-468, Jun. 2011.

본 발명은 제약적(Constrained) DTW 기법의 제한된 영역의 정렬들 내에서 fast DTW 기법의 두 데이터 간의 특성을 고려하는 기법을 적용하여 모든 데이터의 길이 구간에서 연산 복잡도 감소를 나타내며, 제약적(Constrained) DTW 기법과 유사한 분류 정확률을 나타내는 효율적인 방법인 고속으로 제약적인 동적 시간 워핑 방법을 제공하는 데 그 목적이 있다.The present invention shows a reduction in computational complexity in the length section of all data by applying a technique that considers the characteristics between two data of the fast DTW technique within the alignments of the limited area of the constrained DTW technique, and the constrained DTW technique The purpose of the present invention is to provide a fast-constrained dynamic time-warping method, which is an efficient method that exhibits classification accuracy similar to .

또한, 본 발명은 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법의 각 단계를 실행하는 프로그램을 기록한 기록매체을 제공하는 데 그 목적이 있다.Another object of the present invention is to provide a recording medium in which a program for executing each step of a constrained dynamic time warping method at high speed for measuring the similarity of time series data is recorded.

또한, 본 발명은 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법의 각 단계를 실행하는 프로그램을 기록한 기록매체를 구비한 연산장치를 제공하는 데 그 목적이 있다.Another object of the present invention is to provide an arithmetic device having a recording medium recording a program for executing each step of the constrained dynamic time warping method at high speed for measuring the similarity of time series data.

상기 과제를 해결하기 위한 본 발명의 일 실시예에 따른 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법은 컴퓨터가 읽을 수 있는 기록매체에 상기 컴퓨터가 읽을 수 있는 코드로서 구현되는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법으로, 상기 컴퓨터에서 제1 처리과정(coarsening)을 이용하여 기 설정된 윈도우 영역의 해상도를 1/2 데이터 길이 및 1/4 데이터 길이를 갖는 멀티 해상도로 각각 형성하는 단계; 상기 컴퓨터에서 상기 1/4 데이터 길이를 가지며, 멀티 해상도 중 가장 낮은 해상도의 윈도우 영역을 SC-DTW의 제한된 윈도우 영역으로 한정하여 정렬 연산을 진행해 추적한 최적 워핑 경로를, 제2 처리과정(projection)을 통해 상기 1/4 데이터 길이를 갖는 해상도의 윈도우 영역에서 발견된 최적 워핑 경로와 설정 파라미터 r에 기초하여 상기 SC-DTW의 제한된 윈도우 영역 안에서 1/2 데이터 길이를 갖는 해상도의 정렬 연산을 수행하는 윈도우 영역의 셀들을 각각 제1 세그먼트 및 제2 세그먼트로 형성하는 단계; 및 상기 컴퓨터에서 제3 처리과정(Refinement)을 통해 추정된 1/4 데이터 길이를 갖는 해상도의 최적 워핑 경로를 활용하여 형성된 1/2 데이터 길이를 갖는 해상도의 상기 제1 세그먼트 및 상기 제2 세그먼트 영역의 셀들을 연산한 후, 연산된 제1 세그먼트 및 제2 세그먼트 내에서 최적 워핑 경로 및 DTW 거리를 연산하는 단계를 포함한다.A high-speed constrained dynamic time warping method for measuring the similarity of time series data according to an embodiment of the present invention for solving the above problems is time series data implemented as a computer readable code on a computer readable recording medium As a high-speed, constrained dynamic time warping method for measuring the similarity of forming each with In the computer, the optimal warping path that has the 1/4 data length and is tracked by performing an alignment operation by limiting the window region of the lowest resolution among the multi-resolution to the limited window region of the SC-DTW is a second process (projection) Based on the optimal warping path and setting parameter r found in the window region of resolution having the 1/4 data length through forming cells of the window region into first and second segments, respectively; and the first segment and the second segment region having a resolution of 1/2 data length formed by utilizing an optimal warping path of resolution having a 1/4 data length estimated through a third refinement in the computer. and calculating the optimal warping path and DTW distance within the calculated first and second segments after calculating the cells of .

상기 과제를 해결하기 위한 본 발명의 일 실시예에 따른 기록매체는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법의 각 단계를 실행하는 프로그램을 기록한 저장매체일 수 있다.A recording medium according to an embodiment of the present invention for solving the above problems may be a storage medium recording a program for executing each step of the constrained dynamic time warping method at high speed for measuring the similarity of time series data.

상기 과제를 해결하기 위한 본 발명의 일 실시예에 따른 연산장치는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법의 각 단계를 실행하는 프로그램을 기록한 기록매체를 구비하는 것을 특징으로 한다.An arithmetic device according to an embodiment of the present invention for solving the above problems is characterized in that it comprises a recording medium in which a program for executing each step of the constrained dynamic time warping method at high speed for measuring the similarity of time series data is recorded. .

본 발명은 제약적(constraints) 기법의 특정 형태의 윈도우(window) 영역 내에서 fast DTW의 멀티 해상도(multi-resolution)을 활용한 선택적 워핑 경로(optimal warping path)의 위치 추정 방법을 적용하여 기존의 제약적(constraints) 및 fast DTW 기법들 보다 낮거나 유사하며 선형적인(linear) 연산량을 가지며, 병리학적 정렬 문제(pathological alignment problem)을 효율적으로 억압하여 제약적(constraints) 기법과 유사한 분류 정확률을 나타내는 고속으로 제약적인 동적 시간 워핑(fast constrained DTW) 방법이다.The present invention applies a method of estimating the position of an optimal warping path using the multi-resolution of fast DTW within a window region of a specific type of a constraint technique to apply the existing constraint (constraints) and fast DTW methods are lower or similar, have a linear amount of computation, and efficiently suppress the pathological alignment problem, so that the high-speed constraint exhibits classification accuracy similar to that of the constraint method. It is a fast constrained DTW method.

상술한 고속으로 제약적인 동적 시간 워핑(fast constrained DTW) 방법에 따르면, 19개의 UCR 시계열 데이터셋과 샘플링을 달리하여 다양한 데이터의 길이(length)를 갖는 한 주기의 사인파(sine wave)들을 활용하여 실험을 진행한 결과, 제약적(constraints) 기법들 중 가장 최근의 I-DTW 알고리즘의 윈도우(window)를 적용하여 제안된 fast I-DTW는 19개의 데이터셋(datasets)에서 기존의 I-DTW 및 fast DTW와 비교해, 약 52.2% 및 22.3%의 연산량 감소율을 가지며, I-DTW와 유사한 분류 정확률을 나타냈으며, 모든 사인파(sine wave)의 길이(length) 구간에서 유사하거나 낮으며 선형적인(linear) 연산 시간의 결과를 나타냄을 확인할 수 있다.According to the fast constrained DTW method described above, an experiment using 19 UCR time series datasets and sine waves of one cycle having various data lengths by different sampling As a result, fast I-DTW proposed by applying the window of the most recent I-DTW algorithm among the constraint methods is the existing I-DTW and fast DTW in 19 datasets. Compared to , it has a reduction rate of about 52.2% and 22.3% of the computational amount, and a classification accuracy similar to that of I-DTW, and has a similar or lower linear computation time in all sine wave length sections It can be seen that the results of

도 1은 본 발명의 일 실시예에 따른 시계열 데이터의 유사도 측정을 위한 제약적인 동적 시간 워핑 방법을 설명한 흐름도이다.
도 2는 두 데이터 시퀀스의 정렬(화살표는 정렬된 포인트들을 나타낸다) 과정을 나타낸 도로서, (a)는 Euclidean distance, (b) DTW distance.
도 3은 코스트 매트릭스(cost matrix)를 나타낸 도이다.
도 4는 선택적 워핑 경로를 갖는 누적 코스트 매트릭스를 나타낸 도이다.
도 5는 (a) 유클리디언 거리와 (b) DTW 거리의 복잡도를 비교한 도이다.
도 6은 제약적 DTW의 누적 코스트 매트릭스를 나타낸 도이다.((a) SC-DTW, (b) I-DTW).
도 7은 fast -DTW 알고리즘에 대한 4가지 다른 해상도의 누적된 Cost 매트릭스를 나타낸 도로서, (a) 원본에 비해 데이터 길이가 1/8인 낮은 해상도, (b) 원본에 비해 데이터 길이가 1/4인 해상도, (c) 원본에 비해 데이터 길이가 1/2인 해상도, (d) 원본 해상도.
도 8은 최악의 경우에 fast DTW 알고리즘에 대한 2개의 다른 해상도를 갖는 누적된 Cost 매트릭스를 나타낸 도이다.
도 9는 fast SC DTW에 대한 3가지 다른 해상도의 누적 Cost 매트릭스를 나타낸 도로서, (a) 원본에 비해 데이터 길이가 1/4인 낮은 해상도, (b) 원본에 비해 데이터 길이가 1/2인 해상도, (c) 원래 해상도이다.
도 10은 fast SC-DTW 알고리즘의 수도 코드이다.
도 11은 fast SC-DTW와 fast DTW 간의 반경에 따른 분류 정확도를 비교한 도이다.
도 12는 fast SC-DTW와 SC-DTW 간의 반경에 따른 분류 정확도를 비교한 도이다.
도 13은 fast I-DTW와 fast-DTW 간의 반경에 따른 분류 정확도를 비교한 도이다.
도 14는 fast I-DTW와 I-DTW 간의 반경에 따른 분류 정확도를 비교한 도이다.
도 15는 fast DTW, SC-DTW, fast SC-DTW, I-DTW 및 fast I-DTW에 대한 계산된 복잡도를 비교한 도이다.
도 16은 제1 시계열(small)에서 표준 DTW, fast DTW, SC-DTW, fast SC-DTW, fast I-DTW 및 fast I-DTW의 경과 시간을 나타낸 도이다.
도 17은 제2 시계열(large)에서 표준 DTW, fast DTW, SC-DTW, fast SC-DTW, fast I-DTW 및 fast I-DTW의 경과 시간을 나타낸 도이다.
1 is a flowchart illustrating a constrained dynamic time warping method for measuring similarity of time series data according to an embodiment of the present invention.
2 is a diagram illustrating a process of aligning two data sequences (arrows indicate aligned points), (a) is Euclidean distance, (b) DTW distance.
3 is a diagram illustrating a cost matrix.
4 is a diagram illustrating a cumulative cost matrix having a selective warping path.
5 is a diagram comparing the complexity of (a) Euclidean distance and (b) DTW distance.
6 is a diagram showing the cumulative cost matrix of constrained DTW ((a) SC-DTW, (b) I-DTW).
7 is a road showing the accumulated cost matrix of four different resolutions for the fast-DTW algorithm, (a) a lower resolution with 1/8 data length compared to the original, and (b) 1/1/2 data length compared to the original. A resolution of 4, (c) a resolution of 1/2 the data length compared to the original, (d) the original resolution.
8 is a diagram showing the accumulated cost matrix with two different resolutions for the worst case fast DTW algorithm.
9 is a road showing the cumulative cost matrix of three different resolutions for fast SC DTW, (a) low resolution with 1/4 data length compared to the original, and (b) 1/2 data length compared to the original. resolution, (c) the original resolution.
10 is a pseudo code of the fast SC-DTW algorithm.
11 is a diagram comparing classification accuracy according to radius between fast SC-DTW and fast DTW.
12 is a diagram comparing classification accuracy according to a radius between fast SC-DTW and SC-DTW.
13 is a diagram comparing classification accuracy according to radius between fast I-DTW and fast-DTW.
14 is a diagram comparing classification accuracy according to a radius between fast I-DTW and I-DTW.
15 is a diagram comparing calculated complexity for fast DTW, SC-DTW, fast SC-DTW, I-DTW, and fast I-DTW.
16 is a diagram illustrating elapsed times of standard DTW, fast DTW, SC-DTW, fast SC-DTW, fast I-DTW, and fast I-DTW in the first time series (small).
17 is a diagram illustrating elapsed times of standard DTW, fast DTW, SC-DTW, fast SC-DTW, fast I-DTW, and fast I-DTW in the second time series (large).

이하, 본 명세서의 실시예가 첨부된 도면을 참조하여 기재된다. 그러나, 이는 본 명세서에 기재된 기술을 특정한 실시 형태에 대해 한정하는 것이 아니며, 본 명세서의 실시예의 다양한 변경(modifications), 균등물(equivalents), 및/또는 대체물(alternatives)을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 본 명세서에서, "가진다," "가질 수 있다," "포함한다," 또는 "포함할 수 있다" 등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다.Hereinafter, embodiments of the present specification will be described with reference to the accompanying drawings. However, it is to be understood that the technology described herein is not limited to specific embodiments, and includes various modifications, equivalents, and/or alternatives of the embodiments of the present specification. . In connection with the description of the drawings, like reference numerals may be used for like components. In the present specification, expressions such as “have,” “may have,” “include,” or “may include” indicate the presence of a corresponding characteristic (eg, a numerical value, function, operation, or component such as a part). and does not exclude the presence of additional features.

본 명세서에서, "A 또는 B," "A 또는/및 B 중 적어도 하나," 또는 "A 또는/및 B 중 하나 또는 그 이상"등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. 예를 들면, "A 또는 B," "A 및 B 중 적어도 하나," 또는 "A 또는 B 중 적어도 하나"는, (1) 적어도 하나의 A를 포함, (2) 적어도 하나의 B를 포함, 또는 (3) 적어도 하나의 A 및 적어도 하나의 B 모두를 포함하는 경우를 모두 지칭할 수 있다.In this specification, expressions such as “A or B,” “at least one of A and/and B,” or “one or more of A or/and B” may include all possible combinations of the items listed together. . For example, "A or B," "at least one of A and B," or "at least one of A or B" means (1) includes at least one A, (2) includes at least one B; Or (3) it may refer to all cases including both at least one A and at least one B.

본 명세서에서 사용된 "제 1," "제 2," "첫째," 또는 "둘째,"등의 표현들은 다양한 구성요소들을, 순서 및/또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다. 예를 들면, 제 1 사용자 기기와 제 2 사용자 기기는, 순서 또는 중요도와 무관하게, 서로 다른 사용자 기기를 나타낼 수 있다. 예를 들면, 본 명세서에 기재된 권리 범위를 벗어나지 않으면서 제 1 구성요소는 제 2 구성요소로 명명될 수 있고, 유사하게 제 2 구성요소도 제 1 구성요소로 바꾸어 명명될 수 있다.As used herein, expressions such as "first," "second," "first," or "second," can modify various elements, regardless of order and/or importance, and refer to one element. It is used only to distinguish it from other components, and does not limit the components. For example, the first user equipment and the second user equipment may represent different user equipment regardless of order or importance. For example, without departing from the scope of the rights described in this specification, a first component may be referred to as a second component, and similarly, the second component may also be renamed as a first component.

어떤 구성요소(예: 제 1 구성요소)가 다른 구성요소(예: 제 2 구성요소)에 "(기능적으로 또는 통신적으로) 연결되어((operatively or communicatively) coupled with/to)" 있다거나 "접속되어(connected to)" 있다고 언급된 때에는, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제 3 구성요소)를 통하여 연결될 수 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소(예: 제 1 구성요소)가 다른 구성요소(예: 제 2 구성요소)에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 상기 어떤 구성요소와 상기 다른 구성요소 사이에 다른 구성요소(예: 제 3 구성요소)가 존재하지 않는 것으로 이해될 수 있다.A component (eg, a first component) is "coupled with/to (operatively or communicatively)" to another component (eg, a second component) When referring to "connected to", it will be understood that the certain element may be directly connected to the other element or may be connected through another element (eg, a third element). On the other hand, when it is said that a component (eg, a first component) is "directly connected" or "directly connected" to another component (eg, a second component), the component and the It may be understood that other components (eg, a third component) do not exist between other components.

본 명세서에서 사용된 표현 "~하도록 구성된(또는 설정된)(configured to)"은 상황에 따라, 예를 들면, "~에 적합한(suitable for)," "~하는 능력을 가지는(having the capacity to)," "~하도록 설계된(designed to)," "~하도록 변경된(adapted to)," "~하도록 만들어진(made to)," 또는 "~를 할 수 있는(capable of)"과 바꾸어 사용될 수 있다. 용어 "~하도록 구성된(또는 설정된)"은 하드웨어적으로 "특별히 설계된(specifically designed to)" 것만을 반드시 의미하지 않을 수 있다. 대신, 어떤 상황에서는, "~하도록 구성된 장치"라는 표현은, 그 장치가 다른 장치 또는 부품들과 함께 "~할 수 있는" 것을 의미할 수 있다. As used herein, the expression "configured to (or configured to)" depends on the context, for example, "suitable for," "having the capacity to ," "designed to," "adapted to," "made to," or "capable of." The term “configured (or configured to)” may not necessarily mean only “specifically designed to” in hardware. Instead, in some circumstances, the expression “a device configured to” may mean that the device is “capable of” with other devices or parts.

예를 들면, 문구 "A, B, 및 C를 수행하도록 구성된(또는 설정된) 프로세서"는 해당 동작을 수행하기 위한 전용 프로세서(예: 임베디드 프로세서), 또는 메모리 장치에 저장된 하나 이상의 소프트웨어 프로그램들을 실행함으로써, 해당 동작들을 수행할 수 있는 범용프로세서(generic-purpose processor)(예: CPU 또는 application processor)를 의미할 수 있다.For example, the phrase “a processor configured (or configured to perform) A, B, and C” refers to a dedicated processor (eg, an embedded processor) for performing the operations, or by executing one or more software programs stored in a memory device. , may mean a generic-purpose processor (eg, a CPU or an application processor) capable of performing corresponding operations.

본 명세서에서 사용된 용어들은 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 다른 실시예의 범위를 한정하려는 의도가 아닐 수 있다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 용어들은 본 명세서에 기재된 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가질 수 있다. 본 명세서에 사용된 용어들 중 일반적인 사전에 정의된 용어들은, 관련 기술의 문맥상 가지는 의미와 동일 또는 유사한 의미로 해석될 수 있으며, 본 명세서에서 명백하게 정의되지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. 경우에 따라서, 본 명세서에서 정의된 용어일지라도 본 명세서의 실시예들을 배제하도록 해석될 수 없다.The terms used herein are used only to describe specific embodiments, and may not be intended to limit the scope of other embodiments. The singular expression may include the plural expression unless the context clearly dictates otherwise. Terms used herein, including technical or scientific terms, may have the same meanings as commonly understood by one of ordinary skill in the art described herein. Among the terms used in this specification, terms defined in a general dictionary may be interpreted with the same or similar meaning as the meaning in the context of the related art, and unless explicitly defined in the present specification, have ideal or excessively formal meanings. is not interpreted as In some cases, even the terms defined in this specification cannot be construed to exclude the embodiments of the present specification.

이하, 첨부된 도면들에 기초하여 본 발명의 일 실시예에 따른 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법 및 장치를 보다 상세하게 설명하도록 한다.Hereinafter, a method and apparatus for fast and constrained dynamic time warping for measuring the similarity of time series data according to an embodiment of the present invention will be described in more detail based on the accompanying drawings.

먼저, 본 발명을 설명하기에 앞서, 동적 시간 워핑(Dynamic Time Warping; 이하, DTW)에 대해서 간략하게 설명하도록 한다. First, before describing the present invention, dynamic time warping (hereinafter, DTW) will be briefly described.

DTW는 도 2의 (b)와 같이 비선형적인 방법의 정렬과정을 거쳐 두 데이터를 시간 축 상에서 일치시켜 DTW 거리(distance)를 계산한다. The DTW calculates the DTW distance by matching two data on the time axis through a non-linear alignment process as shown in FIG. 2B.

이는 시간 의존(time-dependent)적인 특성을 갖는 데이터들 간의 유사도 측정에서, DTW 거리(distance) 측정 방식이 도 2의 (a)와 같은 유클리디언 거리(Euclidean distance) 측정 방식에 비해 더 좋은 성능을 나타낼 수 있게 한다.This means that in measuring the similarity between data having time-dependent characteristics, the DTW distance measurement method has better performance than the Euclidean distance measurement method as shown in FIG. 2(a). to be able to represent

두 데이터의 시퀀스를 최대한 완벽히 일치시키기 위해서는 가능한 모든 정렬들 중 최적의 정렬 작업을 수행해야 한다. In order to match the sequences of two data as perfectly as possible, it is necessary to perform the optimal alignment among all possible alignments.

이러한 최적의 정렬을 찾기 위해서는 두 데이터의 서로 다른 두 점들 사이의 거리(distance)를 모두 연산하는 작업이 선행되어야 한다. 그리고 최적의 정렬을 찾기 위한 조건들을 만족시키면서 이 차이들을 누적함으로써 최적의 정렬 작업을 수행할 수 있게 된다. 이러한 두 데이터 간의 서로 다른 두 점 사이의 거리(distances)와 이에 대한 누적은 각각 코스트 매트릭스(cost matrix), 누적 코스트 매트릭스(accumulated cost matrix)로 표현된다. In order to find such an optimal alignment, it is necessary to first calculate the distance between two different points of the two data points. And by accumulating these differences while satisfying the conditions for finding the optimal alignment, the optimum alignment operation can be performed. The distances between two different points between these two data points and their accumulation are expressed by a cost matrix and an accumulated cost matrix, respectively.

두 데이터 x, y의 DTW 거리(distance)에 대한 코스트 매트릭스(cost matrix)

Figure 112020132398776-pat00001
는 다음과 같다.Cost matrix for DTW distance of two data x and y
Figure 112020132398776-pat00001
is as follows

Figure 112020132398776-pat00002
Figure 112020132398776-pat00002

여기서 d1, d2는 데이터 길이를 나타내며, 도 3의 코스트 매트릭스(cost matrix)는 누적 코스트 매트릭스(accumulated cost matrix)를 연산하기 위해 사용된다.Here, d 1 and d 2 represent data lengths, and the cost matrix of FIG. 3 is used to calculate an accumulated cost matrix.

누적 코스트 매트릭스(Accumulated cost matrix)를 연산하는 과정에서 최적의 정렬에 직접적인 영향을 준 인덱스(index)들의 집합인 선택적 워핑 경로(optimal warping path) p는 다음과 같이 정의된다.The optimal warping path p , which is a set of indices that directly affected the optimal alignment in the process of calculating the accumulated cost matrix, is defined as follows.

Figure 112020132398776-pat00003
Figure 112020132398776-pat00003

여기서 L은 선택적 워핑 경로의 길이(length)를 의미한다.Here, L means the length of the optional warping path.

누적 코스트 매트릭스(Accumulated cost matrix)의 선택적 워핑 경로(optimal warping path) p는 경계조건(boundary condition), 단조성 조건(monotonicity condition) 및 스텝 사이즈 조건(step size condition)을 만족시키며 도 4와 같이 연산된다.An optimal warping path p of the accumulated cost matrix satisfies a boundary condition, a monotonicity condition, and a step size condition, and is calculated as shown in FIG. 4 do.

1) 경계조건(Boundary condition)1) Boundary condition

선택적 워핑 경로(optimal warping path)의 시작점과 마지막 점은 다음과 같이 정의된다:The starting and ending points of the optimal warping path are defined as follows:

Figure 112020132398776-pat00004
Figure 112020132398776-pat00004

2) 단조성 조건(Monotonicity condition)2) Monotonicity condition

선택적 워핑 경로(optimal warping path)의 인덱스 값은 이전 인덱스 값보다 크거나 같아야 한다.The index value of the optimal warping path must be greater than or equal to the previous index value.

Figure 112020132398776-pat00005
Figure 112020132398776-pat00005

3) 스텝 사이즈 조건(Step size condition)3) Step size condition

선택적 워핑 경로(optimal warping path)의 이웃 된 값들의 차이는 스텝 사이즈(step size)를 갖으며, 다음과 같이 표현될 수 있다.The difference between neighboring values of the optimal warping path has a step size and can be expressed as follows.

Figure 112020132398776-pat00006
Figure 112020132398776-pat00006

누적 코스트 매트릭스(Accumulated cost matrix)

Figure 112020132398776-pat00007
연산 공식은 다음과 같이 표현할 수 있다.Accumulated cost matrix
Figure 112020132398776-pat00007
The arithmetic formula can be expressed as follows.

Figure 112020132398776-pat00008
Figure 112020132398776-pat00008

누적 코스트 매트릭스(Accumulated cost matrix)를 생성한 후, 선택적 워핑 경로(optimal warping path)는 도 4와 같이 A(d1,d2)에서 A(1,1) 방향으로 작은 값을 따라가는 역 추적 방식을 통해 연산될 수 있다.After generating the accumulated cost matrix, the optimal warping path is a backtracking method that follows a small value from A(d 1 ,d 2 ) to A(1,1) as shown in FIG. 4 . can be calculated through

선택적 워핑 경로(optimal warping path)의 인덱스 값들의 집합은 도 2의 정렬된 화살표와 일치하며, 이러한 과정을 통해 DTW는 두 시계열 데이터 간의 유사도를 측정할 수 있다. 유사도 측정 결과를 의미하는 DTW 거리(distance) 값은 다음과 같다.The set of index values of the optimal warping path coincides with the aligned arrows of FIG. 2, and through this process, the DTW can measure the similarity between the two time series data. The DTW distance value indicating the similarity measurement result is as follows.

Figure 112020132398776-pat00009
Figure 112020132398776-pat00009

이하에서는 제약적(Constrained) DTW 알고리즘을 설명한다.Hereinafter, a constrained DTW algorithm will be described.

도 5의 빨간 부분은 유클리디언 거리(Euclidean distance(ED))와 표준 DTW(standard DTW)의 연산량을 나타낸다. The red part of FIG. 5 represents the amount of calculation of the Euclidean distance (ED) and the standard DTW (standard DTW).

ED는 유사도를 측정하고자 하는 두 데이터의 length가 n이라 할 때, O(n)만큼의 연산이 필요하지만, DTW는 o(n2) 만큼의 연산을 필요로 한다.ED requires O(n) operations when the length of two data for measuring similarity is n, whereas DTW requires o(n 2 ) operations.

즉, 두 데이터 시퀀스의 길이가 길어지면, 유클리디언(Euclidean)은 선형적으로 연산량이 증가한다면, DTW는 이차적(quadratic)으로 증가하게 된다.That is, if the length of the two data sequences increases, Euclidean linearly increases the amount of computation, and DTW increases quadratic.

하지만, DTW를 연산하는데 있어, 반드시 모든 정렬에 대한 경우의 수를 다 감안한 선택적 워핑 경로(optimal warping path)를 추적할 필요는 없다.However, in calculating the DTW, it is not necessary to trace the optimal warping path that takes into account the number of cases for all alignments.

제약적(constraints) 기법들 중 가장 대표적인 SC-DTW와 최근에 발표된 I-DTW에 대한 누적 코스트 매트릭스(accumulated cost matrix)는 도 6와 같다.The accumulated cost matrix for the most representative SC-DTW among the constraint techniques and the recently announced I-DTW is shown in FIG. 6 .

여기서 도 6의 빨간 부분은 유사도를 측정하고자 하는 두 데이터 간의 시간 축 상에서 일치하는 인덱스(index)들을 나타내며, 이를 기준으로 형성된 파란 부분은 모든 정렬들을 고려하는 것이 아닌, 특정 영역의 정렬들만을 고려하기 위한 윈도우 영역을 나타내며, 이는 연산량을 낮추고, 시간 축 상에서 멀리 떨어진 과도한 정렬들로 인해 분류 정확률을 낮출 수 있는 병리학적 정렬 문제점(pathological alignment problem)을 효율적으로 억압한다.Here, the red part in FIG. 6 indicates the matching indexes on the time axis between the two data for which the similarity is to be measured, and the blue part formed based on this indicates only the alignments in a specific area, not all alignments. represents a window region for the purpose, which lowers the computational amount and effectively suppresses pathological alignment problems that may lower the classification accuracy due to excessive alignments far away on the time axis.

SC-DTW는 두 데이터의 인덱스(index)들이 일치하는 부분을 기준으로 가로 축 및 세로 축으로 항상 동일한 길이의 윈도우를 형성한다. 이때 윈도우의 길이는 윈도우 백분율 값(window percentage value) r',

Figure 112020132398776-pat00010
에의해 결정된다.SC-DTW always forms a window of the same length in the horizontal axis and the vertical axis based on the part where the indices of the two data coincide. In this case, the length of the window is a window percentage value r',
Figure 112020132398776-pat00010
is determined by

윈도우의 길이 l은 하기의 식 (10)으로 연산될 수 있다. The length l of the window can be calculated by the following equation (10).

Figure 112020132398776-pat00011
Figure 112020132398776-pat00011

d1과 d2는 두 데이터 시퀀스 각각의 길이를 의미한다.d 1 and d 2 mean the lengths of each of the two data sequences.

도 6의 (a)에서는 가장 대표적으로 많이 사용되는 윈도우 백분율 값(window percentage value)인 r' = 0.1을 사용한 경우로 표준 DTW(standard DTW) 대비 연산량을 약 80% 줄일 수 있다. In (a) of FIG. 6 , when r' = 0.1, which is the most commonly used window percentage value, the amount of computation can be reduced by about 80% compared to a standard DTW (standard DTW).

I-DTW는 데이터의 처음 부분보다 historic 적으로 나중 부분이 더 중요하다는 데이터 특성을 이용하여, 도 6의 (b)와 같이, 두 데이터의 index들이 일치하는 빨간 부분을 중심으로 해서 두 데이터의 인덱스(index) 값이 커짐에 따라 윈도우의 길이를 점층적으로 증가시키는 방법이다.The I-DTW uses the data characteristic that the later part of the data is more important historically than the first part, and as shown in FIG. This is a method of gradually increasing the length of the window as the (index) value increases.

I DTW의 윈도우 길이

Figure 112020132398776-pat00012
는 하기의 식(11)을 통해 연산될 수 있다.Window length of I DTW
Figure 112020132398776-pat00012
can be calculated through the following equation (11).

Figure 112020132398776-pat00013
Figure 112020132398776-pat00013

ni과 mi는 해당하는 index i에 대한 두 데이터 각각의 길이를 의미한다.n i and m i mean the lengths of each of the two data for the corresponding index i .

SC-DTW 및 I-DTW는 두 데이터의 길이 가 N이라 할 때, 각각 N(2N·r'+1) 및 N(N·r'+1) 만큼의 연산을 필요로 함에 따라, 기존의 표준(standard) DTW에 비해 연산량 감소를 기대할 수 있다.SC-DTW and I-DTW require N(2N·r′+1) and N(N·r′+1) operations, respectively, when the length of the two data is N, so the existing standard (standard) It can be expected to reduce the amount of computation compared to DTW.

하지만, 제약적(constraints) 기법은 유사도를 측정하고자 하는 두 데이터 간의 관계를 전혀 고려하지 않는 고정된 형태의 윈도우를 가지며, 여전히 2차적(quadratic) 연산량을 가짐에 따라 두 데이터의 길이가 길어지면 높은 연산량을 필요로 한다.However, the constraint method has a fixed window that does not consider the relationship between the two data for which the similarity is to be measured, and still has a quadratic amount of computation. need.

이하에서는 Fast DTW 알고리즘을 간략하게 설명하도록 한다. 두 입력 데이터의 고려해야 할 차원을 줄인 데이터 representation을 활용해 높은 연산량을 개선하는 데이터 축약(data abstraction) 기법들 중 가장 대표적인 알고리즘인 fast DTW는 그림 7과 같이 멀티 해상도(multi-resolution)을 활용하여 하위의 해상도(resolution)로부터 추정된 대략적인 선택적 워핑 경로(optimal warping path)의 주변 영역에 대한 정렬들만을 고려함으로써 연산량을 감소시키는 기법이다. 이러한 fast DTW는 다음과 같은 순서를 통해 알고리즘 구현이 가능하다.Hereinafter, the Fast DTW algorithm will be briefly described. Fast DTW, which is the most representative algorithm among data abstraction techniques that improves the high computational amount by using the data representation with reduced dimensions of two input data, utilizes multi-resolution as shown in Figure 7. This is a technique for reducing the amount of computation by considering only the alignments of the peripheral regions of the approximate optimal warping path estimated from the resolution of . This fast DTW can implement the algorithm in the following order.

1) 제1 처리과정(Coarsening)1) First treatment process (Coarsening)

두 시계열 데이터(time series data)의 인접한 각 포인트들을 두 개씩 묶어 평균을 취하는 방식을 거듭하여 데이터(data) 포인트들을 축소해 계단식 멀티 해상도(hierarchical multi-resolution)을 만든다.A hierarchical multi-resolution is made by reducing data points by repeating the method of tying each adjacent point of two time series data two and taking the average.

2) 제2 처리과정(Projection)2) Second process (Projection)

가장 낮은 해상도(resolution)에서부터 선택적 워핑 경로(optimal warping path)의 위치를 찾고, 이를 바로 위 해상도(resolution)의 대략적인 선택적 워핑 경로(optimal warping path)의 위치를 추정하는데 사용한다.The position of the optimal warping path is found from the lowest resolution, and this is used to estimate the approximate position of the optimal warping path of the resolution immediately above.

3) 제3 처리과정(Refinement)3) Third Refinement

바로 밑의 해상도(resolution)으로부터 추정된 대략적인 선택적 워핑 경로(optimal warping path)의 위치와 설계 파라미터(design parameter)로부터 설정된 반경(radius)만큼 추정된 선택적 워핑 경로(optimal warping path)의 주변을 고려해 현재 해상도(resolution)의 선택적 워핑 경로(optimal warping path)의 위치를 추적한다.Considering the approximate location of the optimal warping path estimated from the resolution immediately below and the perimeter of the optimal warping path estimated by the radius set from the design parameter. Tracks the location of the optimal warping path of the current resolution.

도 7은 fast DTW 알고리즘의 구현 과정을 나타낸다. 7 shows an implementation process of the fast DTW algorithm.

도 7 (d)의 가로 및 세로 축 각각 32 points의 데이터 길이를 갖는 본래 해상도(resolution)에서 본래와 비교하여 1/8의 데이터 길이를 갖는 낮은 해상도(lower resolution)까지 총 4개의 멀티-해상도(multi-resolution)을 형성한다.A total of four multi-resolution ( multi-resolution).

가장 낮은 1/8의 데이터 길이를 갖는 해상도인 도 7의 (a)에서 모든 정렬(alignment)를 고려한 선택적 워핑 경로(optimal warping path)의 위치를 추적하면 도 7 (a)의 빨간 선과 같다. When the position of the optimal warping path considering all alignments in FIG. 7(a), which is the resolution having the lowest 1/8 data length, is traced, it is the same as the red line in FIG. 7(a).

이렇게 찾은 1/8의 데이터 길이를 갖는 해상도의 선택적 워핑 경로의 위치를 바로 위의 1/4의 데이터 길이를 갖는 해상도인 도 7의 (b)에 대략적인 선택적 워핑 경로의 위치를 추정하는데 사용한다. The position of the selective warping path of the resolution having a data length of 1/8 found in this way is used to estimate the approximate location of the selective warping path in FIG. .

1/4의 데이터 길이를 갖는 해상도에서는 추정된 선택적 워핑 경로의 위치와 그 주변을 추가적으로 반영한 영역이 각각 진한 회색 상자들과 연한 회색 상자들로 형성되어 있으며, 이 한정된 영역 내에서 정렬 작업들을 진행한 뒤, 다시 선택적 워핑 경로의 위치를 추적한다. At a resolution with a data length of 1/4, the region additionally reflecting the location of the estimated selective warping path and its surroundings is formed by dark gray boxes and light gray boxes, respectively. Afterwards, the location of the optional warping path is traced again.

이 때, 추정된 선택적 워핑 경로의 주변 영역의 추가적인 반영은 설정 파라미터인 'r(radius)'에 의해 결정되며, 도 7에서는 r=1을 사용하였다. At this time, the additional reflection of the surrounding area of the estimated selective warping path is determined by the setting parameter 'r(radius)', and r=1 is used in FIG. 7 .

이는 도 7의 (c)를 거쳐, 본래 해상도인 도 7 (d)의 선택적 워핑 경로와 DTW 거리를 연산할 때까지 반복된다.This is repeated until the selective warping path and DTW distance of FIG. 7(d), which are the original resolution, are calculated through (c) of FIG.

DTW의 연산 결과는 DTW 거리 및 선택적 워핑 경로가 된다. The calculation result of DTW becomes the DTW distance and optional warping path.

Fast DTW의 연산량을 선택적 워핑 경로를 제외한 DTW 거리만을 연산한다는 가정하에 표준 DTW와 비교하면, fast DTW는 가장 낮은 해상도로부터 본래의 해상도 까지 누적 코스트 매트릭스(accumulated cost matrix)를 각각 16, 44, 97 그리고 212개의 총 369 셀들을 연산하였고, 본래의 가로 및 세로 축 각각 32 points의 데이터 길이를 갖는 해상도에서 16, 8, 4 points의 데이터 길이를 갖는 멀티 해상도들을 형성하기 위해 총 2x(16+8+4)=56의 연산을 수행하였다. Comparing the computational amount of Fast DTW with standard DTW under the assumption that only the DTW distance excluding the optional warping path is computed, fast DTW calculates the accumulated cost matrix from the lowest resolution to the original resolution 16, 44, 97 and A total of 369 cells of 212 were computed, and a total of 2x (16+8+4 ) = 56 was performed.

마지막으로, 빨간 선으로 표시된 선택적 워핑 경로를 추적하기 위해 가장 낮은 해상도부터 본래의 해상도 까지 선택적 워핑 경로의 길이 만큼인 5, 11, 24, 49번의 연산을 각각 수행하였으며, DTW 거리 만을 연산한다고 가정하여 마지막 연산 수를 제외하면, 5+11+24=40의 연산을 수행하여, 총 369+56+40=465번의 연산을 수행하였다. 그리고, 표준 DTW는 DTW 거리만 연산한다고 가정하면, 32x32=1,024의 연산을 수행하게 된다. 즉, 약 45.41%만큼의 연산량 감소를 기대할 수 있다.Finally, in order to trace the selective warping path indicated by the red line, from the lowest resolution to the original resolution, 5, 11, 24, and 49 operations were performed as much as the length of the selective warping path, respectively, assuming that only the DTW distance is calculated. Except for the last number of operations, 5+11+24=40 calculations were performed, and a total of 369+56+40=465 calculations were performed. And, assuming that the standard DTW calculates only the DTW distance, the operation of 32x32=1,024 is performed. That is, a reduction in the amount of computation by about 45.41% can be expected.

Fast DTW는 누적 코스트 매트릭스 연산, 멀티 해상도 형성 및 선택적 워핑 경로 추적의 총 3 부분에서 연산을 필요로 하며, 이론적으로 fast DTW의 연산량을 분석하면 다음과 같다. Fast DTW requires computation in a total of three parts: cumulative cost matrix computation, multi-resolution formation, and selective warping path tracking.

간소화하여 계산하기 위해, 이하에서는 두 시계열 데이터(time series data)의 길이를 모두 N으로 가정할 것이며, 모든 분석은 최악의 경우(worst-case)로 가정하여 평가를 진행할 것이다.For simplicity of calculation, hereinafter, it will be assumed that the lengths of both time series data are N, and all analyzes will be evaluated assuming the worst-case.

도 8 (a)의 빨간 선과 같이, 두 데이터의 인덱스가 일치하는 부분에 선택적 워핑 경로가 형성되는 경우, 도 8의 (b)와 같은 정렬(alignment)를 수행해야 하는 영역이 형성되며, 이 경우가 가장 많은 영역의 셀들을 연산해야 하는 최악의 경우가 된다. As shown in the red line in FIG. 8 (a), when a selective warping path is formed in a portion where the indices of two data coincide, an area to be aligned as shown in FIG. 8 (b) is formed, in this case It becomes the worst case in which cells in the region with the largest number of are computed.

도 8의 (a)에서 추정된 선택적 워핑 경로에 의해 추정된 도 8 (b)의 진한 회색으로된 상자 부분은 한 line에 3개의 셀들을 포함하며, 데이터의 길이 N을 곱해주어 총 3N의 셀들을 형성한다. 또한, 추정된 선택적 워핑 경로의 주변 영역을 나타내는 도 8 (b)의 연한 회색으로된 상자 부분은 설정 파라미터 r(radius)이 '1'인 경우이며, 한 line에 4r개의 셀들을 포함하여 총 4Nr의 셀을 형성한다. 이에 따라, 본래 해상도에서의 총 셀들의 수는 이하의 식 (12)와 같이 된다.The dark gray box in Fig. 8(b), estimated by the selective warping path estimated in Fig. 8(a), includes three cells in one line, and multiplies the length N of the data to have a total of 3N cells. form them In addition, the light gray box in Fig. 8 (b) indicating the peripheral region of the estimated selective warping path is when the setting parameter r (radius) is '1', and a total of 4Nr including 4r cells in one line form the cell of Accordingly, the total number of cells at the original resolution becomes the following equation (12).

Figure 112020132398776-pat00014
Figure 112020132398776-pat00014

모든 멀티 해상도들에 대한 데이터의 길이는 다음의 식(13)과 같다.The length of data for all multi-resolutions is the following Equation (13).

Figure 112020132398776-pat00015
Figure 112020132398776-pat00015

모든 멀티 해상도들에 대한 누적 코스트 매트릭스의 연산해야 되는 셀들의 수를 합하면 식 (14)와 같다.Equation (14) is obtained by summing the number of cells to be calculated in the cumulative cost matrix for all multi-resolutions.

Figure 112020132398776-pat00016
Figure 112020132398776-pat00016

무한 등비 급수(Infinite geometrical series)에 따라 수식 (14)을 정리하면 수식 (15)와 같다.If Equation (14) is rearranged according to the infinite geometrical series, Equation (15) is the same.

Figure 112020132398776-pat00017
Figure 112020132398776-pat00017

본래 해상도의 바로 밑 해상도인 N/2 길이의 데이터를 형성하기 위해서는 두 입력 데이터 각각 N/2의 연산량을 필요로 한다. 이에 따라, 모든 멀티 해상도를 형성할 때 필요한 연산량들을 계산해보면 식 (16)과 같다.In order to form data having a length of N/2, which is a resolution just below the original resolution, each of the two input data requires an amount of operation of N/2. Accordingly, Equation (16) is obtained when calculating the amount of calculations required to form all multi-resolutions.

Figure 112020132398776-pat00018
Figure 112020132398776-pat00018

마지막으로, 선택적 워핑 경로(optimal warping path)를 추적하는데 필요한 연산량은 최악의 경우 두 데이터의 길이를 합친 2N만큼의 연산량을 필요로 한다. Finally, the amount of computation required to track the optimal warping path requires as much as 2N of the sum of the lengths of the two data in the worst case.

모든 멀티 해상도(multi-resolution)들의 선택적 워핑 경로(optimal warping path)를 추적하는데 필요한 연산량을 계산하면 식 (17)과 같다.Equation (17) is given when calculating the amount of computation required to track the optimal warping path of all multi-resolutions.

최악의 경우로 가정했을 때, 식 (15), (16) 및 (17)의 합은 fast DTW의 시간 복잡도(time complexity)를 나타낸다.Assuming the worst case, the sum of equations (15), (16) and (17) represents the time complexity of fast DTW.

Figure 112020132398776-pat00019
Figure 112020132398776-pat00019

최악의 경우를 가정하여 fast DTW의 이론적 시간 복잡도(time complexity)를 계산한 결과, 데이터의 길이 N에 따라 선형적(linear)인 연산량을 가짐을 확인할 수 있으며, 이는 o(N2)의 이차적(quadratic) 연산량을 갖는 표준 DTW 및 제한적 기법과 비교했을 때, 데이터의 길이가 8r+14 부분에 비해 충분히 크다면, 많은 연산량 감소를 기대할 수 있음을 의미한다.As a result of calculating the theoretical time complexity of fast DTW assuming the worst case, it can be confirmed that the amount of computation is linear according to the length of the data N, which is the quadratic ( When compared with the standard DTW and the limited method with quadratic), if the length of the data is sufficiently large compared to the 8r+14 part, it means that a significant reduction in the amount of computation can be expected.

하지만, 데이터의 길이가 8r+14 부분에 비해 작은 경우, 연산량 감소를 기대하기 어렵고, 병리학적 정렬 문제(pathological alignment problem)을 갖고 있어, 제약적(constraints) 기법과 비교했을 때, 상대적으로 낮은 분류 정확률을 나타낸다.However, when the length of the data is small compared to the 8r+14 part, it is difficult to expect a reduction in the amount of computation, and it has a pathological alignment problem. Compared with the constraint method, the classification accuracy is relatively low. indicates

한정된 특정 형태의 윈도우 영역 내에서만 정렬 작업들을 진행하여 연산량을 감소시키며, 병리학적 정렬 문제(pathological alignment problem)을 억압시켜 분류 정확률을 높이는 제약적(constraints) 기법은 두 입력 데이터 간의 관계를 고려하지 않으며, 이차적(quadratic) 연산량을 갖는 한계를 갖는다. A constraint technique that reduces the amount of computation by performing alignment operations only within a limited specific window region, and increases classification accuracy by suppressing a pathological alignment problem, does not consider the relationship between two input data, It has a limit with a quadratic amount of computation.

반면, fast DTW 알고리즘은 멀티 해상도(multi-resolution)을 활용하여 유사도를 측정하고자 하는 두 데이터 간의 관계에 따라 달리 형성되는 선택적 워핑 경로(optimal warping path)를 추정하여 선형적인(linear) 연산량을 나타내지만, 두 입력 데이터의 길이에 의한 연산량의 증가가 설정 파라미터 r에 의한 연산량의 증가 보다 큰 경우 연산량 감소를 기대할 수 있으며, 병리학적 정렬 문제(pathological alignment problem)을 갖고 있어, 제약적(constraints) 기법에 비해 분류 정확률이 낮다. On the other hand, the fast DTW algorithm uses multi-resolution to estimate the optimal warping path that is formed differently depending on the relationship between the two data for which the similarity is to be measured, indicating a linear amount of computation. , when the increase in the amount of computation by the length of the two input data is greater than the increase in the amount of computation by the setting parameter r, a reduction in the amount of computation can be expected. The classification accuracy is low.

이하에서는 제약적(constraints) 기법의 한정된 윈도우(window) 영역 내에서 fast DTW 알고리즘의 선택적 워핑 경로(optimal warping path) 추정 방법을 적용하여 추가적인 연산량 감소 및 선형적(linear)인 연산 시간을 나타내는 고속으로 제약적 동적 시간 워핑(fast constrained DTW, 이하 fcDTW) 방법을 제안하고자 한다.Hereinafter, the optimal warping path estimation method of the fast DTW algorithm is applied within the limited window area of the constraint method to further reduce the amount of computation and constrain it to high speed representing a linear computation time. To propose a dynamic time warping (fast constrained DTW, hereinafter fcDTW) method.

도 1 참조, 본 발명의 일 실시예에 따른 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법(S700)은 제1 처리과정(coarsening)을 이용하여 기 설정된 윈도우 영역의 해상도를 1/2 데이터 길이 및 1/4 데이터 길이를 갖는 멀티 해상도로 각각 형성하는 단계(S710), 상기 1/4 데이터 길이를 가지며, 멀티 해상도 중 가장 낮은 해상도의 윈도우 영역을 SC-DTW의 제한된 윈도우 영역으로 한정하여 정렬 연산을 진행해 추적한 최적 워핑 경로를, 제2 처리과정(projection)을 통해 상기 1/4 데이터 길이를 갖는 해상도의 윈도우 영역에서 발견된 최적 워핑 경로와 설정 파라미터 r에 기초하여 상기 SC-DTW의 제한된 윈도우 영역 안에서 1/2 데이터 길이를 갖는 해상도의 정렬 연산을 수행하는 윈도우 영역의 셀들을 각각 제1 세그먼트 및 제2 세그먼트로 형성(S720)하는 단계 및 제3 처리과정(Refinement)을 통해 추정된 1/4 데이터 길이를 갖는 해상도의 최적 워핑 경로를 활용하여 형성된 1/2 데이터 길이를 갖는 해상도의 상기 제1 세그먼트 및 상기 제2 세그먼트 영역의 셀들을 연산한 후, 연산된 제1 세그먼트 및 제2 세그먼트 내에서 최적 워핑 경로 및 DTW 거리를 연산하는 단계(S730)를 포함한다.Referring to FIG. 1 , the high-speed constraint dynamic time warping method ( S700 ) for measuring the similarity of time series data according to an embodiment of the present invention uses a first coarsening process to reduce the resolution of a preset window area to 1/ Forming each of the multi resolutions having 2 data lengths and 1/4 data lengths (S710), and having the 1/4 data length and limiting the window area of the lowest resolution among the multi resolutions to the limited window area of the SC-DTW and the optimal warping path tracked by performing an alignment operation in the SC-DTW based on the optimal warping path found in the window region of the resolution having the 1/4 data length through the second projection and the setting parameter r. Estimating through the step of forming (S720) the first segment and the second segment, respectively, and the third processing process (refinement) of cells in the window area for which the alignment operation of the resolution having a data length of 1/2 is performed within the limited window area of After calculating the cells of the first segment and the second segment region of the resolution having the 1/2 data length formed by using the optimal warping path of the resolution having the 1/4 data length, the calculated first segment and the second segment are calculated. and calculating an optimal warping path and a DTW distance within 2 segments ( S730 ).

여기서, 상기 제1 처리과정(coarsening)은 두 시계열 데이터의 인접한 각 포인트들을 두 개씩 묶어 평균을 취하는 방식을 거듭하여 데이터 포인트들을 축소해 계단식 멀티 해상도(hierarchical multi-resolution)로 만드는 과정일 수 있다.Here, the first processing (coarsening) may be a process of reducing the data points by repeating a method of tying each adjacent point of the two time series data two by two and taking the average to make the data points into a hierarchical multi-resolution.

상기 제2 처리과정(Projection)은 가장 낮은 해상도에서부터 선택적 워핑 경로의 위치를 찾고, 다음으로 낮은 해상도의 대략적인 선택적 워핑 경로의 위치를 추정하는 과정일 수 있다.The second process (projection) may be a process of finding the location of the selective warping path from the lowest resolution and estimating the approximate location of the next lower resolution selective warping path.

상기 상기 제3 처리과정(Refinement)은 바로 밑의 해상도으로부터 추정된 대략적인 선택적 워핑 경로의 위치와 설계 파라미터로부터 설정된 반경만큼 추정된 선택적 워핑 경로의 주변을 고려해 현재 해상도의 선택적 워핑 경로의 위치를 추정하는 과정일 수 있다.The third process (Refinement) estimates the location of the selective warping path of the current resolution considering the approximate location of the selective warping path estimated from the resolution immediately below and the periphery of the selective warping path estimated by the radius set from the design parameters. It may be a process

한편, 상기 설정 파라미터는 상기 추정된 선택적 워핑 경로의 주변 영역의 추가적인 반영 반경 값인 것을 특징으로 한다.Meanwhile, the setting parameter may be an additional reflection radius value of a peripheral area of the estimated selective warping path.

또한, 상기 제1 세그먼트 및 제2 세그먼트는 서로 다른 해상도로 윈도우 영역의 셀로 표시된다. 즉, 본 발명의 일 실시예에 따른 S700은 적용된 제한적(constrained) DTW의 윈도우(window) 영역 내에서 fast DTW의 제1 처리과정(coarsening), 제2 처리과정(projection) 및 제3 처리과정(refinement)을 거쳐 구현된다. 먼저, 제약적(constraints) 기법들 중 가장 대표적인 SC-DTW 알고리즘을 적용한 fast SC-DTW의 구현 과정은 다음과 같다. In addition, the first segment and the second segment are displayed as cells of the window area with different resolutions. That is, in S700 according to an embodiment of the present invention, the first processing (coarsening), the second processing (projection) and the third processing (projection) of the fast DTW within the window region of the applied constrained DTW ( It is implemented through refinement). First, the implementation process of fast SC-DTW to which the most representative SC-DTW algorithm among constraint techniques is applied is as follows.

도 9에서 SC-DTW의 윈도우 백분율 값(window percentage value) r'은 0.2를 사용하였으며, 추정된 선택적 워핑 경로(optimal warping path) 주변 영역의 추가적인 반영 범위를 나타내는 설정 파라미터(parameter) r은 1을 사용하였다. In FIG. 9, the window percentage value r' of the SC-DTW was 0.2, and the setting parameter r indicating the additional reflection range of the area around the estimated optimal warping path is 1. was used.

도 9 (c)의 본래의 해상도에서 제1 처리과정(coarsening)을 거쳐 1/2(b), 1/4(a)의 데이터 길이(length)를 갖는 해상도(resolution)의 멀티 해상도(multi-resolution)를 형성한다. In the original resolution of FIG. 9(c), through a first coarsening, a multi-resolution of resolution having data lengths of 1/2(b) and 1/4(a) resolution) is formed.

도 9 (a)의 낮은 해상도(lower resolution)에서는 SC-DTW의 제한된 윈도우(window) 영역에 한정하여 정렬(alignment)를 진행한 후, 선택적 워핑 경로(optimal warping path)를 추적하며, 이를 바로 위 해상도(resolution)인 1/2의 데이터 길이(length)를 갖는 해상도(resolution)의 대략적인 선택적 워핑 경로(optimal warping path)를 추정하는데 활용한다. In the lower resolution of FIG. 9 (a), after alignment is performed by limiting the limited window area of the SC-DTW, an optimal warping path is traced, and it is directly above It is used to estimate an approximate optimal warping path of resolution having a data length of 1/2 that is resolution.

도 9 (b)의 1/2 데이터 길이(length)를 갖는 해상도(resolution)에서는 추정된 선택적 워핑 경로(optimal warping path)와 설정 파라미터(parameter) r에 맞게 SC-DTW의 제한된 윈도우(window) 영역 안에서 정렬 연산을 수행하는 영역을 각각 진한 회색 상자 및 연한 회색 상자와 같이 형성하고, 이 영역 안에서 정렬 작업들을 진행한 후, 선택적 워핑 경로(optimal warping path)를 추적한다. In the resolution having a data length of 1/2 of FIG. 9 ( b ), a limited window area of the SC-DTW to match the estimated optimal warping path and the setting parameter r The regions where the alignment operation is performed are formed like dark gray boxes and light gray boxes, respectively, and after performing the alignment operations in these regions, the optimal warping path is traced.

마지막으로, 추정된 1/2의 데이터 길이를 갖는 해상도의 선택적 워핑 경로를 활용해 도 9 (c) 원래 해상도의 선택적 워핑 경로 및 DTW 거리를 연산한다.Finally, the selective warping path and DTW distance of the original resolution are calculated using the selective warping path of the resolution having the estimated 1/2 data length in FIG. 9(c).

DTW 거리만을 연산한다는 가정하에 제안된 fast SC-DTW와 기존의 SC-DTW의 연산량을 비교하면, fast SC-DTW는 가장 낮은 해상도(resolution)인 도9의 (a)부터 본래의 해상도인 도 9의 (c)까지 누적 코스트 매트릭스를 각각 44, 122 그리고 264개의 총 430 셀들을 연산하였고, 도 9 (c)의 가로 및 세로 축 각각 40 points의 데이터 길이를 갖는 해상도에서 도 9 (b), (a) 각각 20, 10 points의 데이터 길이를 갖는 멀티 해상도들을 형성하기 위해 총 2x(20+10)=60의 연산을 수행하였다. Comparing the amount of computation between the proposed fast SC-DTW and the existing SC-DTW under the assumption that only the DTW distance is calculated, the fast SC-DTW has the lowest resolution (a) to the original resolution of FIG. 9 A total of 430 cells of 44, 122, and 264 were calculated for the cumulative cost matrix up to (c) of Fig. 9 (b), ( a) A total of 2x(20+10)=60 operations were performed to form multi-resolutions each having a data length of 20 and 10 points.

마지막으로 도 9 (a), (b)의 빨간 선으로 표시된 선택적 워핑 경로의 길이는 각각 13, 26으로 총 39번의 선택적 워핑 경로를 위한 연산을 진행하여, 모든 연산량은 총 430+60+39=529이 된다. Finally, the lengths of the selective warping paths indicated by the red lines in Figs. 9 (a) and (b) are 13 and 26, respectively, and calculations are performed for a total of 39 selective warping paths, so that a total of 430+60+39= It becomes 529.

도 8 (c)의 SC-DTW 윈도우 영역 안의 총 셀들의 수는 608이 된다. The total number of cells in the SC-DTW window area of FIG. 8(c) is 608.

즉, SC-DTW와 비교하여 fast SC-DTW은 도 9의 상황에서 약 (608-529)/608x100=12.99% 만큼의 연산량 감소를 기대할 수 있다.That is, compared to SC-DTW, fast SC-DTW can expect a reduction in the amount of computation by about (608-529)/608x100=12.99% in the situation of FIG. 9 .

정렬 가능한 모든 영역에서 선택적 워핑 경로(optimal warping path)를 추적하는 fast DTW와 비교하여 도 9와 같이 SC-DTW의 윈도우 영역 내에서의 선택적 워핑 경로를 추적하는 제안된 fast SC-DTW는 선택적 워핑 경로가 두 입력 데이터의 시간 축 상에서 일치하는 부분 근처에 위치하는 경우, fast DTW와 유사한 연산량을 가지며, 시간 축 상에서 멀리 떨어져 위치하는 경우, 제안된 fast SC-DTW는 SC-DTW 윈도우의 경계 부분에 워핑 경로가 형성되어, fast DTW 보다 더 짧은 워핑 경로에 따른 낮은 연산량을 갖게 된다. Compared to fast DTW that tracks the optimal warping path in all sortable regions, the proposed fast SC-DTW that tracks the selective warping path within the window region of SC-DTW as shown in FIG. 9 is the selective warping path. If is located near the coincident part on the time axis of the two input data, it has a similar amount of computation to that of fast DTW. Since a path is formed, it has a lower computational amount due to a shorter warping path than the fast DTW.

그리고 기존의 fast DTW는 선택적 워핑 경로가 시간 축 상에서 멀리 떨어진 위치에 형성되는 경우, 병리학적 정렬 문제을 초래해 전체 분류 정확률을 저하시킬 수 있다.In addition, the existing fast DTW can cause pathological alignment problems when a selective warping path is formed at a distant location on the time axis, thereby reducing the overall classification accuracy.

이에 반해, 제안된 fast SC-DTW는 병리학적 정렬 문제을 효율적으로 억압하는 SC-DTW의 윈도우 영역 내에서 선택적 워핑 경로가 형성되어 전반적인 분류 정확률을 높일 수 있다.In contrast, the proposed fast SC-DTW can increase the overall classification accuracy by forming a selective warping path within the window region of the SC-DTW that effectively suppresses the pathological alignment problem.

본 발명에서 제안하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적 동적 시간 워핑 방법(Fast SC-DTW)의 수도코드는 도 10과 같다. FIG. 10 shows the pseudo code of the fast constrained dynamic time warping method (Fast SC-DTW) for measuring the similarity of time series data proposed in the present invention.

라인 7-36은 제1 처리과정(coarsening)에 해당하며, 라인 8-30는 현재까지 생성한 멀티 해상도 중 낮은 해상도에 필요한 총 연산량과 추가 해상도을 형성할 경우, 추가 해상도에서부터 현재의 낮은 해상도 까지 필요한 총 연산량을 비교하여 멀티 해상도의 추가 생성 여부를 결정하는 과정에 해당한다. Lines 7-36 correspond to the first coarsening, and lines 8-30 are the total amount of computation required for the lower resolution among the multi-resolutions generated so far, and when forming the additional resolution, it is necessary from the additional resolution to the current low resolution. It corresponds to the process of determining whether to additionally generate multi-resolution by comparing the total amount of computation.

라인 32-34은 현재의 낮은 해상도에 인접한 각 points들을 2개씩 묶어 평균을 취하는 방식으로 추가적인 멀티 해상도을 생성한다. Lines 32-34 create additional multi-resolution by tying each point adjacent to the current lower resolution two by two and averaging them.

라인 38-47에서는 결정된 멀티 해상도을 기반으로 제2 처리과정(projection) 및 제3 처리과정(refinement)을 반복하며, 라인 42와 45에서 각각 모든 영역에서의 정렬을 고려하는 낮은 해상도와 추정된 선택적 워핑 경로 및 그 주변 영역에 대한 정렬을 고려하는 낮은 해상도를 제외한 다른 해상도들의 선택적 워핑 경로 및 DTW 거리를 계산한다. In lines 38-47, the second projection and the third refinement are repeated based on the determined multi-resolution, and in lines 42 and 45, the low resolution and estimated selective warping that consider alignment in all regions, respectively. Calculate the optional warping path and DTW distance for resolutions other than the lower resolution, which takes into account alignment to the path and its surrounding area.

다른 제약적 기법을 적용한 본원의 fast constrained DTW의 수도코드는 도 10의 fast SC-DTW의 수도코드에서 라인 9, 12, 19, 42, 45를 적용된 제약적 DTW에 적합하게 수정함으로써 구현할 수 있다.The pseudo code of the fast constrained DTW of the present application to which another constrained technique is applied can be implemented by correcting lines 9, 12, 19, 42, and 45 in the pseudo code of the fast SC-DTW of FIG. 10 to suit the applied constrained DTW.

이하에서는 UCR에서 제공하는 다양한 시계열 데이터셋들과 샘플링을 달리한 한 주기의 사인 파형(sine wave) 데이터를 사용하여 본원에서 제안하는 고속으로 제약적 동적 시간 워핑(fast constrained DTW) 알고리즘의 분류 정확률 및 시간 복잡도(time complexity)를 기존의 제약적(constraints) 기법 및 fast DTW와 비교한다.Hereinafter, the classification accuracy and time of the fast constrained DTW algorithm proposed herein using various time series datasets provided by UCR and sine wave data of one cycle with different sampling The time complexity is compared with the existing constraint method and fast DTW.

하기의 테이블 1 참조, 실험을 위해 테이블 1에 제시된 총 19개의 시계열 데이터 셋들을 활용하였다.See Table 1 below, and a total of 19 time series data sets presented in Table 1 were used for the experiment.

각각의 데이터 셋들은 2~50개의 클래스 넘버, 24 ~ 1,000개의 훈련 사이즈(train size), 28 ~ 6,174개의 테스트 사이즈(test size) 그리고 60 ~ 637의 길이로 구성되어 있으며, 의학, 로봇, 필적 인식(handwriting recognition) 등의 분야를 포함한다. 19개의 데이터 셋들의 순서는 실험 결과 분석을 위해 길이에 따라 정리하였다.Each dataset consists of 2 to 50 class numbers, 24 to 1,000 train sizes, 28 to 6,174 test sizes, and 60 to 637 lengths for medical, robotic, handwriting recognition. (handwriting recognition) and the like. The order of the 19 data sets was arranged according to the length for the analysis of the experimental results.

테이블 1. UCR 시계열 데이터셋들의 정보를 나타낸 표이다.Table 1. Table showing information on UCR time series datasets.

Figure 112020132398776-pat00020
Figure 112020132398776-pat00020

DTW 알고리즘을 포함한 유사도 측정에서 주로 사용되는 가장 가까운 인접 기법을 사용하여 시계열 데이터 셋들의 분류를 진행하였다. Classification of time series data sets was carried out using the nearest neighbor method, which is mainly used in similarity measurement including the DTW algorithm.

19개의 시계열 데이터 셋들의 각 테스트 데이터셋(test datasets)과 훈련 데이터셋은 질의 시퀀스(query sequences) 및 하위 시퀀스(sub-sequences)로 활용된다. Each test dataset and training dataset of the 19 time series datasets are used as query sequences and sub-sequences.

질의 시퀀스가 입력되면, 모든 하위 시퀀스들은 실험에서 활용된 알고리즘들을 활용해 유사도를 측정하며, 그 중 가장 작은 유사도 측정 값을 갖는 하위 시퀀스의 클래스 정보를 각 알고리즘들의 분류 결과로 출력한다.When a query sequence is input, the similarity of all subsequences is measured using the algorithms used in the experiment, and the class information of the subsequence having the smallest similarity measurement value among them is output as the classification result of each algorithm.

DTW 알고리즘을 포함한 유사도 측정에서 주로 사용되는 가장 가까운 인접 기법을 사용하여 시계열 데이터 셋들의 분류를 진행하였다. Classification of time series data sets was carried out using the nearest neighbor method, which is mainly used in similarity measurement including the DTW algorithm.

19개의 시계열 데이터 셋들의 각 테스트 데이터셋(test datasets)과 훈련 데이터셋은 질의 시퀀스(query sequences) 및 하위 시퀀스(sub-sequences)로 활용된다. Each test dataset and training dataset of the 19 time series datasets are used as query sequences and sub-sequences.

질의 시퀀스가 입력되면, 모든 하위 시퀀스들은 실험에서 활용된 알고리즘들을 활용해 유사도를 측정하며, 그 중 가장 작은 유사도 측정 값을 갖는 하위 시퀀스의 클래스 정보를 각 알고리즘들의 분류 결과로 출력한다.When a query sequence is input, the similarity of all subsequences is measured using the algorithms used in the experiment, and the class information of the subsequence having the smallest similarity measurement value among them is output as the classification result of each algorithm.

추가적으로, 유사도 측정에 가장 전통적인 방법인 유클리디언 거리(Euclidean distance; 이하 ED)도 분류 성능 비교를 위해 함께 구현하였다.Additionally, the Euclidean distance (ED), which is the most traditional method for measuring similarity, was also implemented to compare classification performance.

테이블 2는 실험을 위해 구현된 7개의 알고리즘들의 19개의 데이터 셋들에 대한 분류 정확률을 나타내며, Avg는 모든 데이터 셋들에 대한 분류 정확률들의 평균을 의미한다. Table 2 shows the classification accuracies for 19 data sets of the 7 algorithms implemented for the experiment, and Avg means the average of the classification accuracies for all data sets.

두 입력 데이터 간의 정렬 과정을 거쳐 유사도를 측정하는 구현된 모든 DTW 알고리즘들은 전통적인 방식인 ED에 비해 높은 분류 정확률들을 나타내며, 병리학적 정렬 알고리즘을 효율적으로 억압하는 두 제약적 DTW 기법인 I-DTW 및 SC-DTW는 표준 DTW에 비해 전반적으로 높은 분류 정확률을 나타냄을 테이블 2의 (a)를 통해 확인할 수 있다.All implemented DTW algorithms that measure similarity through the sorting process between two input data show higher classification accuracy compared to the traditional ED method, and I-DTW and SC-, two constrained DTW techniques that effectively suppress the pathological alignment algorithm. It can be seen from Table 2 (a) that DTW shows a higher overall classification accuracy than standard DTW.

테이블 2. 반경에 따른 분류 정확도Table 2. Classification accuracy according to radius

Figure 112020132398776-pat00021
Figure 112020132398776-pat00021

Figure 112020132398776-pat00022
Figure 112020132398776-pat00022

Figure 112020132398776-pat00023
Figure 112020132398776-pat00023

Figure 112020132398776-pat00024
Figure 112020132398776-pat00024

테이블 2 (b), (c) 그리고 (d)의 fast DTW, fast SC-DTW 그리고 fast I-DTW의 평균 분류 정확률은 설정 파라미터인 반경(radius)이 커짐에 따라 각각 표준 DTW, SC-DTW 그리고 I-DTW의 평균 분류 정확률과 유사하게 됨을 확인할 수 있다.The average classification accuracy of fast DTW, fast SC-DTW, and fast I-DTW in Table 2 (b), (c) and (d) increased with the increase in the set parameter radius, the standard DTW, SC-DTW and It can be confirmed that it is similar to the average classification accuracy of I-DTW.

실험 결과에 대한 분석을 위해 제안된 fast SC-DTW와 기존의 fast DTW 그리고 SC-DTW의 분류 정확률을 각각 비교한 결과들은 도 11 및 12와 같다. 11 and 12 show the results of comparing the classification accuracy of the proposed fast SC-DTW, the conventional fast DTW, and the SC-DTW for the analysis of the experimental results, respectively.

유사하게, 제안된 fast I-DTW는 fast DTW 및 I-DTW와 비교하면 도 13 및 14와 같다. Similarly, compared with fast DTW and I-DTW, the proposed fast I-DTW is shown in FIGS. 13 and 14 .

도 11의 빨간 점들은 19개의 데이터 셋에 대한 가로 축 및 세로 축에 배치된 두 알고리즘의 분류 정확률을 나타내며, 가로 축 및 세로 축이 일치하는 부분을 나타내는 파란 선을 기준으로 두 영역이 형성되고, 특정 영역에 점들이 많다면, 그 영역의 알고리즘은 다른 영역의 알고리즘에 비해 19개의 데이터 셋에 대해 전반적으로 더 높은 분류 정확률을 나타냈음을 의미한다. The red dots in FIG. 11 indicate the classification accuracy of the two algorithms arranged on the horizontal and vertical axes for 19 data sets, and two regions are formed based on the blue line indicating the part where the horizontal and vertical axes coincide, If there are many points in a specific area, it means that the algorithm in that area showed a higher overall classification accuracy for 19 data sets compared to the algorithm in other areas.

Fast SC-DTW와 fast DTW의 분류 정확률을 비교하는 도 11은 모든 반경(radius)에서 제안된 fast SC-DTW의 영역에 위치한 빨간 점들이 fast DTW의 영역보다 많으며, 이는 19개의 데이터 셋에 대해서 제안된 fast SC-DTW가 전반적으로 더 높은 분류 정확율을 나타내고 있음을 의미한다. 11, which compares the classification accuracy of fast SC-DTW and fast DTW, there are more red dots located in the proposed fast SC-DTW region than the fast DTW region at all radii, which is proposed for 19 data sets. This means that the fast SC-DTW showed a higher overall classification accuracy.

도 12는 fast SC-DTW와 SC-DTW의 분류 정확률을 비교하고 있으며, radius가 0, 1, 2인 경우들은 두 알고리즘 간의 전반적인 분류 정확률의 차이가 존재하지만, radius가 3 이상인 경우에는 빨간 점들이 대부분 두 영역의 중간 지점인 파란 선 위에 위치하고 있으며, 이는 두 알고리즘의 분류 정확률이 19개의 데이터 셋에 대해 전반적으로 유사함을 의미한다. FIG. 12 compares the classification accuracy of fast SC-DTW and SC-DTW. In cases where the radius is 0, 1, and 2, there is a difference in overall classification accuracy between the two algorithms, but when the radius is 3 or more, red dots are Most of them are located on the blue line, which is the midpoint between the two regions, which means that the classification accuracy of the two algorithms is overall similar for the 19 data sets.

실험 결과를 통해 SC-DTW의 윈도우 영역 내에서 동작하는 fast SC-DTW는 SC-DTW와 마찬가지로 병리학적 정렬 문제를 효율적으로 억압하고 있음을 확인할 수 있다. From the experimental results, it can be confirmed that fast SC-DTW operating within the window region of SC-DTW effectively suppresses pathological alignment problems like SC-DTW.

또한, 도 13 및 14를 보면, fast I-DTW 역시 fast DTW에 비해 모든 반경(radius)에서 더 높은 정확률을 보이고 있으며, 반경(radius)이 3 이상일 때, I-DTW와 유사한 전반적인 분류 정확률을 나타냄을 확인할 수 있다.In addition, referring to FIGS. 13 and 14, fast I-DTW also shows higher accuracy at all radii compared to fast DTW, and when the radius is 3 or more, it shows an overall classification accuracy similar to that of I-DTW. can confirm.

테이블 3. 반경에 따라 검색된 셀의 수Table 3. Number of cells retrieved by radius

Figure 112020132398776-pat00025
Figure 112020132398776-pat00025

Figure 112020132398776-pat00026
Figure 112020132398776-pat00026

Figure 112020132398776-pat00027
Figure 112020132398776-pat00027

Figure 112020132398776-pat00028
Figure 112020132398776-pat00028

테이블 4. 반지름에 따른 표준 DTW 대비 검색 셀 수의 비율Table 4. Ratio of Number of Search Cells to Standard DTW by Radius

Figure 112020132398776-pat00029
Figure 112020132398776-pat00029

Figure 112020132398776-pat00030
Figure 112020132398776-pat00030

Figure 112020132398776-pat00031
Figure 112020132398776-pat00031

Figure 112020132398776-pat00032
Figure 112020132398776-pat00032

테이블 3의 (a)는 ED, DTW, SC-DTW 그리고 I-DTW, (c), (d), (e)는 각각 fast DTW, fast SC-DTW, fast I-DTW 알고리즘들에 대한 table 1의 19개의 데이터셋들 각각의 테스트 데이터들을 모두 처리하는데 연산된 셀들의 총 수를 나타낸다. (a) of Table 3 is ED, DTW, SC-DTW and I-DTW, (c), (d), and (e) are Table 1 for fast DTW, fast SC-DTW, and fast I-DTW algorithms, respectively. It represents the total number of cells calculated to process all test data of each of the 19 datasets of .

연산된 셀들의 총 수는 선택적 워핑 경로 추적 및 해상도을 줄이(shrink)기 위한 연산들을 포함한다. 실험 결과 분석을 위해 하기의 수식 (19)와 같이 각 알고리즘들의 모든 테스트 데이터셋들을 처리하는데 연산된 셀들의 총 수를 표준 DTW와 비교하여 비율(RNSC)로 나타낸 결과는 테이블 4와 같으며, Avg는 19개의 데이터 셋에 대한 평균

Figure 112020132398776-pat00033
나타낸다.The total number of cells computed includes optional warping path tracking and operations to shrink resolution. For the analysis of the experimental results, the total number of cells calculated in processing all the test datasets of each algorithm as shown in Equation (19) below is compared with the standard DTW and the results expressed as a ratio (R NSC ) are shown in Table 4, Avg is the average for 19 data sets
Figure 112020132398776-pat00033
second indicates.

하기의 수식 (19)에서 NSC standard DTW는 표준 DTW의 연산된 셀들의 총 수를 의미하며, NSC otherDTW 는 구현된 다른 DTW 알고리즘들의 연산된 셀들의 총 수를 의미한다.In Equation (19) below, NSC standard DTW means the total number of cells calculated in the standard DTW, and NSC otherDTW means the total number of cells calculated in other implemented DTW algorithms.

앞서 확인한 분류 정확률에서 제안된 fast SC-DTW 및 fast I-DTW는 설정 parameter인 radius가 3 이상에서 SC-DTW 및 I-DTW와 거의 수렴하는 분류 정확률을 나타냈다. The fast SC-DTW and fast I-DTW proposed in the classification accuracy confirmed earlier showed the classification accuracy that almost converges with the SC-DTW and I-DTW when the set parameter radius is 3 or more.

테이블 4에서 반경이 3일 때, 평균 RNSC 11.4%fmf 갖는 제안된 fast SC-DTW 각각 16.3% 및 19.1%의

Figure 112020132398776-pat00034
을 갖는 fast DTW 및 SC-DTW를 하기의 수식(20)을 활용하여 비교하면, 약 30.1% 및 40.3%의 연산량 감소율을 나타냄을 확인할 수 있다.In Table 4, when the radius is 3, the proposed fast SC-DTW with an average R NSC of 11.4%fmf was 16.3% and 19.1%, respectively.
Figure 112020132398776-pat00034
Comparing the fast DTW and SC-DTW with , using Equation (20) below, it can be seen that the calculation amount reduction rate is about 30.1% and 40.3%.

또한, 16.3% 및 10.1%의 RNSC을 나타내는 DTW 및 I-DTW와 비교했을 때 7.8%의

Figure 112020132398776-pat00035
을 갖는 fast I-DTW는 약 52.2% 및 22.9%의 연산량 감소율을 나타냄을 확인할 수 있다.In addition, 7.8% of DTW and I-DTW showed R NSC of 16.3% and 10.1%.
Figure 112020132398776-pat00035
It can be seen that the fast I-DTW with

Figure 112020132398776-pat00036
Figure 112020132398776-pat00036

도 14는 19개의 데이터 셋에 대한 기존의 fast DTW 및 SC-DTW 그리고 제안된 fast SC-DTW의

Figure 112020132398776-pat00037
을 radius에 따라 비교하며 또한, 제안된 fast I-DTW와 기존의 fast DTW 및 I-DTW에 대한
Figure 112020132398776-pat00038
역시 함께 비교한다. 14 shows the existing fast DTW and SC-DTW for 19 data sets and the proposed fast SC-DTW.
Figure 112020132398776-pat00037
are compared according to the radius, and also for the proposed fast I-DTW and the existing fast DTW and I-DTW
Figure 112020132398776-pat00038
Also compare them together.

설정 파라미터인 반경과 관계가 없는 SC-DTW는 모든 반경에 대해 항상 일정한

Figure 112020132398776-pat00039
을 도시한다. 실험에서 사용된 데이터셋들의 길이가 클수록, 반경(radius)이 작을수록 낮은
Figure 112020132398776-pat00040
을 기대할 수 있는 fast DTW는 도 14에서 length가 짧은 데이터 셋들 보다 length가 긴 데이터 셋들이 더 낮은
Figure 112020132398776-pat00041
을 나타내며, 범위(radius)이 작을수록 모든 데이터 셋들의
Figure 112020132398776-pat00042
이 전반적으로 낮게 형성됨을 확인할 수 있다.Regardless of the setting parameter radius, SC-DTW is always constant for all radii.
Figure 112020132398776-pat00039
shows The larger the length of the datasets used in the experiment and the smaller the radius, the lower the
Figure 112020132398776-pat00040
The fast DTW that can be expected is lower in the long-length data sets than the short-length data sets in FIG.
Figure 112020132398776-pat00041
, and the smaller the radius, the more
Figure 112020132398776-pat00042
It can be seen that the overall formation is low.

또한, 도 14를 보면 데이터의 길이가 길지 않은 데이터셋들의

Figure 112020132398776-pat00043
이 반경(radius)에 더 민감하게 반응함을 확인할 수 있고, 19개의 데이터 셋들 중 가장 길이가 짧은 도 15 (k)의 첫 번째 데이터셋은 100%의
Figure 112020132398776-pat00044
을 나타내고 있으며, 이는 연산량이 감소하지 않음을 의미한다. In addition, referring to FIG. 14 , the data sets of which the length of the data are not long are
Figure 112020132398776-pat00043
It can be seen that it responds more sensitively to this radius, and the first dataset in FIG. 15 (k), which has the shortest length among the 19 datasets, is 100%
Figure 112020132398776-pat00044
, which means that the amount of computation does not decrease.

즉, 범위(radius)이 10일 경우에, 60의 길이(length)를 갖는 첫 번째 데이터인 합성 제어(Synthetic Control)의 연산량은 기존의 표준 DTW와 동일하며, 이는 반경(radius)이 10이며, 데이터의 길이(length)가 60 이하인 경우와 데이터의 길이(length)가 60이며, 범위(radius)이 10 이상인 경우, fast DTW 알고리즘은 연산량 감소를 기대할 수 없음을 의미한다. That is, when the radius is 10, the amount of computation of the first data having a length of 60, the Synthetic Control, is the same as that of the existing standard DTW, which has a radius of 10, When the length of data is less than or equal to 60 and when the length of data is 60 and the radius is greater than or equal to 10, it means that the fast DTW algorithm cannot expect a reduction in the amount of computation.

반면, 도 15에서 모든 반경 및 데이터 셋들에 대해 fast SC-DTW는 fast DTW 및 SC-DTW 보다 항상 같거나 낮은 을 나타낸다. On the other hand, in FIG. 15 , fast SC-DTW always shows equal to or lower than fast DTW and SC-DTW for all radii and data sets.

SC-DTW의 윈도우 내에서 fast DTW 알고리즘을 수행하는 제안된 fast SC-DTW는 SC-DTW보다 fast DTW의

Figure 112020132398776-pat00045
이 낮은 경우, fast DTW와 유사하거나 낮은
Figure 112020132398776-pat00046
을 나타내며, fast DTW의
Figure 112020132398776-pat00047
이 SC-DTW 보다 큰 경우, SC-DTW와 유사하거나 낮은
Figure 112020132398776-pat00048
을 나타냄을 도 15를 통해 확인할 수 있다. 유사하게, fast I-DTW의
Figure 112020132398776-pat00049
역시 fast DTW 및 I-DTW 와 비교해 항상 유사하거나 낮음을 확인할 수 있다.The proposed fast SC-DTW, which performs fast DTW algorithm within the window of SC-DTW, is faster than SC-DTW.
Figure 112020132398776-pat00045
If this is low, it is similar to or lower than fast DTW.
Figure 112020132398776-pat00046
represents the fast DTW
Figure 112020132398776-pat00047
If greater than this SC-DTW, it is similar to or lower than the SC-DTW
Figure 112020132398776-pat00048
It can be seen through FIG. 15 that . Similarly, fast I-DTW's
Figure 112020132398776-pat00049
Again, compared to fast DTW and I-DTW, it can be confirmed that it is always similar or lower.

이하에서는 본 발명에서 제안하는 시계열 데이터(time series data)의 유사도 측정을 위한 동적 시간 워핑(DTW)의 연산 복잡도 감소를 위한 효율적인 알고리즘인 고속으로 제약적 동적 시간 워핑(fast constraints DTW)에 대한 실험 결과를 제시한다.Hereinafter, experimental results for fast constraints DTW, which is an efficient algorithm for reducing the computational complexity of dynamic time warping (DTW) for measuring the similarity of time series data proposed in the present invention, are presented below. present.

DTW 기법은 시간 의존적(time-dependent) 특성에 대응하기 위해 데이터들 간의 시간 축 상에서의 정렬 과정을 거치며, 가능한 모든 정렬들 중 가장 최적의 정렬을 찾아 유사도를 측정한다. In the DTW technique, in order to respond to a time-dependent characteristic, data is aligned on the time axis, and similarity is measured by finding the most optimal alignment among all possible alignments.

이에 따라, 다른 알고리즘들에 비해 우수한 분류 성능을 나타내지만, 높은 연산 복잡도에 의해 응용에 제약을 갖는다. 높은 연산 복잡도 문제를 해결하기 위해 제안된 제약적(constraints) 기법 기반의 DTW 알고리즘들은 한정된 범위에서만 정렬들을 수행하는 제약 조건을 도입하여 연산량을 감소시켰으나, 입력 데이터 간의 관계를 고려하지 않으며, 데이터의 길이(length)가 긴 경우 여전히 연산량이 높은 한계를 갖는다. Accordingly, it exhibits superior classification performance compared to other algorithms, but has limitations in application due to high computational complexity. The DTW algorithms based on the constraint method proposed to solve the problem of high computational complexity reduce the amount of computation by introducing a constraint that performs sorting only in a limited range, but do not consider the relationship between the input data and the length of the data ( length) is long, the amount of computation is still high.

반면, 데이터 축약(data abstraction) 기법을 기반한 fast DTW는 제약적(constraints) 기법에 비해 낮은 분류 정확률을 나타내지만, 두 데이터 간의 관계에 따라 달리 형성되는 최적의 정렬 위치를 추정하는 기법을 활용하며, 데이터의 길이(length)가 길수록 더 많은 연산량 감소가 가능하다. On the other hand, fast DTW based on the data abstraction technique shows a lower classification accuracy than the constraint technique, but utilizes a technique for estimating the optimal alignment position formed differently depending on the relationship between the two data, and the data The longer the length of is, the more the amount of computation can be reduced.

이에 본 발명에서는 기존의 제약적(constraints) 기반의 알고리즘들의 제약 조건 안에서 fast DTW 알고리즘의 최적의 정렬 위치를 추정하여 두 데이터 간의 관계를 고려하며, 모든 데이터의 길이 구간에서 낮은 연산량을 나타내는 fast constrained DTW를 제안하였다.Therefore, in the present invention, the relationship between the two data is considered by estimating the optimal alignment position of the fast DTW algorithm within the constraints of the existing constraint-based algorithms, and fast constrained DTW, which shows a low amount of computation in the length section of all data, is used. suggested.

UCR에서 제공하는 19개의 시계열 데이터들을 통한 실험 결과, 제안하는 본원의 고속으로 제약적 동적 시간 워핑 알고리즘(fast constrained DTW)는 기존의 fast DTW 및 제약적(constraints) 기법에 비해 약 52.2% 및 22.3%의 연산량 감소율을 나타냈으며, 제약적(constraints) 기법과 유사한 분류 정확률을 나타냈다.As a result of experiments using 19 time series data provided by UCR, the proposed fast constrained dynamic time warping algorithm (fast constrained DTW) of the present application has about 52.2% and 22.3% of the computational amount compared to the existing fast DTW and constraint methods. It showed a reduction rate, and the classification accuracy was similar to that of the constraint method.

본 발명에서 제시하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적 동적 시간 워핑 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터 가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 광 데이터 저장장치 등이 있다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고 본 발명을 구현하기 위한 기능적인(functional) 프로그램, 코드 및 코드 세그먼트들은 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하 게 추론될 수 있다The high-speed constrained dynamic time warping method for measuring the similarity of time series data proposed in the present invention can be implemented as computer-readable codes on a computer-readable recording medium. The computer-readable recording medium includes all types of recording devices in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape, and optical data storage device. In addition, the computer-readable recording medium is distributed in a computer system connected through a network, so that the computer-readable code can be stored and executed in a distributed manner. And functional programs, codes and code segments for implementing the present invention can be easily inferred by programmers in the art to which the present invention pertains.

이상에서 본 발명은 실시예를 참조하여 상세히 설명되었으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 상기에서 설명된 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 부가 및 변형이 가능할 것임은 당연하며, 이와 같은 변형된 실시 형태들 역시 아래에 첨부한 특허청구범위에 의하여 정하여지는 본 발명의 보호 범위에 속하는 것으로 이해되어야 할 것이다.In the above, the present invention has been described in detail with reference to the embodiments, but those of ordinary skill in the art to which the present invention pertains may make various substitutions, additions and modifications within the scope not departing from the technical spirit described above. Of course, it should be understood that such modified embodiments also fall within the protection scope of the present invention as defined by the appended claims below.

S700: 시계열 데이터의 유사도 측정을 위한 고속으로 제약적 동적 시간 워핑 방법S700: High-speed, constrained dynamic time-warping method for similarity measurement of time series data

Claims (8)

컴퓨터가 읽을 수 있는 기록매체에 상기 컴퓨터가 읽을 수 있는 코드로서 구현되는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법에 있어서,
상기 컴퓨터에서 제1 처리과정(coarsening)을 이용하여 기 설정된 윈도우 영역의 해상도를 1/2 데이터 길이 및 1/4 데이터 길이를 갖는 멀티 해상도로 각각 형성하는 단계;
상기 컴퓨터에서 상기 1/4 데이터 길이를 가지며, 멀티 해상도 중 가장 낮은 해상도의 윈도우 영역을 SC-DTW의 제한된 윈도우 영역으로 한정하여 정렬 연산을 진행해 추적한 최적 워핑 경로를, 제2 처리과정(projection)을 통해 상기 1/4 데이터 길이를 갖는 해상도의 윈도우 영역에서 발견된 최적 워핑 경로와 설정 파라미터 r에 기초하여 상기 SC-DTW의 제한된 윈도우 영역 안에서 1/2 데이터 길이를 갖는 해상도의 정렬 연산을 수행하는 윈도우 영역의 셀들을 각각 제1 세그먼트 및 제2 세그먼트로 형성하는 단계; 및
상기 컴퓨터에서 제3 처리과정(Refinement)을 통해 추정된 1/4 데이터 길이를 갖는 해상도의 최적 워핑 경로를 활용하여 형성된 1/2 데이터 길이를 갖는 해상도의 상기 제1 세그먼트 및 상기 제2 세그먼트 영역의 셀들을 연산한 후, 연산된 제1 세그먼트 및 제2 세그먼트 내에서 최적 워핑 경로 및 DTW 거리를 연산하는 단계를 포함하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법.
In the high-speed constrained dynamic time warping method for measuring the similarity of time-series data implemented as the computer-readable code on a computer-readable recording medium,
forming, in the computer, a resolution of a preset window area into multi-resolution each having a 1/2 data length and a 1/4 data length by using a first coarsening;
In the computer, the optimal warping path that has the 1/4 data length and is tracked by performing an alignment operation by limiting the window region of the lowest resolution among the multi-resolution to the limited window region of the SC-DTW is performed in a second process (projection) Based on the optimal warping path and setting parameter r found in the window region of resolution having the 1/4 data length through forming cells of the window region into first and second segments, respectively; and
The first segment and the second segment region of the resolution having a data length of 1/2 formed by utilizing an optimal warping path of the resolution having a 1/4 data length estimated through a third refinement in the computer. A fast-constrained dynamic time warping method for measuring similarity of time series data, comprising calculating an optimal warping path and a DTW distance within the calculated first and second segments after calculating cells.
제1항에 있어서,
상기 제1 처리과정(coarsening)은
두 시계열 데이터의 인접한 각 포인트들을 두 개씩 묶어 평균을 취하는 방식을 거듭하여 데이터 포인트들을 축소해 계단식 멀티 해상도(hierarchical multi-resolution)로 만드는 과정인 것을 특징으로 하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법.
According to claim 1,
The first process (coarsening) is
High-speed constraint for similarity measurement of time series data, characterized in that it is a process of reducing data points by repeating a method of tying each adjacent point of two time series data two by two and taking the average to make hierarchical multi-resolution dynamic time warping method.
제2항에 있어서,
상기 제2 처리과정(Projection)은
가장 낮은 해상도에서부터 선택적 워핑 경로의 위치를 찾고, 다음으로 낮은 해상도의 선택적 워핑 경로의 위치를 추정하는 과정인 것을 특징으로 하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법.
3. The method of claim 2,
The second process (Projection) is
A fast and constrained dynamic time warping method for measuring similarity of time series data, characterized in that it is a process of finding the position of the selective warping path from the lowest resolution and estimating the position of the next lower resolution selective warping path.
삭제delete 제3항에 있어서,
상기 설정 파라미터는
상기 추정된 선택적 워핑 경로의 주변 영역의 추가적인 반영 반경 값인 것을 특징으로 하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법.
4. The method of claim 3,
The setting parameters are
A high-speed constraint dynamic time warping method for measuring the similarity of time series data, characterized in that it is an additional reflection radius value of a peripheral region of the estimated selective warping path.
제1항에 있어서,
상기 제1 세그먼트 및 제2 세그먼트는 서로 다른 해상도로 윈도우 영역의 셀로 표시되는 것을 특징으로 하는 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법.
According to claim 1,
The fast and constrained dynamic time warping method for measuring the similarity of time series data, characterized in that the first segment and the second segment are displayed as cells of the window area with different resolutions.
청구항 1 내지 청구항 3, 청구항 5, 청구항 6 중 어느 하나의 항에 기재된 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법의 각 단계를 실행하는 프로그램을 기록한 기록매체.
A recording medium recording a program for executing each step of the constrained dynamic time warping method at high speed for measuring the similarity of time series data according to any one of claims 1 to 3, 5, and 6.
청구항 1 내지 청구항 3, 청구항 5, 청구항 6 중 어느 하나의 항에 기재된 시계열 데이터의 유사도 측정을 위한 고속으로 제약적인 동적 시간 워핑 방법의 각 단계를 실행하는 프로그램을 기록한 기록매체를 구비하는 연산장치.A computing device comprising a recording medium recording a program for executing each step of the constrained dynamic time warping method at high speed for measuring the similarity of time series data according to any one of claims 1 to 3, 5, and 6.
KR1020200169723A 2020-12-07 2020-12-07 Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device KR102433568B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200169723A KR102433568B1 (en) 2020-12-07 2020-12-07 Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200169723A KR102433568B1 (en) 2020-12-07 2020-12-07 Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device

Publications (2)

Publication Number Publication Date
KR20220080520A KR20220080520A (en) 2022-06-14
KR102433568B1 true KR102433568B1 (en) 2022-08-19

Family

ID=81980581

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200169723A KR102433568B1 (en) 2020-12-07 2020-12-07 Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device

Country Status (1)

Country Link
KR (1) KR102433568B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101511146B1 (en) 2014-07-29 2015-04-17 연세대학교 산학협력단 Smart 3d gesture recognition apparatus and method
KR101939001B1 (en) 2017-12-06 2019-01-15 한국과학기술원 Method and System for Audio and Score Alignment of Music Using Neural Network-Based Automatic Music Transcription
KR102059520B1 (en) 2018-05-14 2019-12-26 한국과학기술원 User authentication system using low-resolution pupil reaction

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101511146B1 (en) 2014-07-29 2015-04-17 연세대학교 산학협력단 Smart 3d gesture recognition apparatus and method
KR101939001B1 (en) 2017-12-06 2019-01-15 한국과학기술원 Method and System for Audio and Score Alignment of Music Using Neural Network-Based Automatic Music Transcription
KR102059520B1 (en) 2018-05-14 2019-12-26 한국과학기술원 User authentication system using low-resolution pupil reaction

Also Published As

Publication number Publication date
KR20220080520A (en) 2022-06-14

Similar Documents

Publication Publication Date Title
CN109117848B (en) Text line character recognition method, device, medium and electronic equipment
Tanaka et al. Discovery of time-series motif from multi-dimensional data based on MDL principle
Nakamura et al. A shape-based similarity measure for time series data with ensemble learning
US8644560B2 (en) Image processing apparatus and method, and program
US8929597B2 (en) Method of tracking objects
CN104715249A (en) Object tracking method and device
JP5754055B2 (en) Information representation method of object or shape
KR102305230B1 (en) Method and device for improving accuracy of boundary information from image
Yu et al. A fast LSH-based similarity search method for multivariate time series
CN103503126A (en) Design-based inspection using repeating structures
JP2017515222A (en) Line segmentation method
JP2022521540A (en) Methods and systems for object tracking using online learning
Thuy et al. Efficient segmentation-based methods for anomaly detection in static and streaming time series under dynamic time warping
Luo et al. Parameter-free search of time-series discord
CN114357037A (en) Time sequence data analysis method and device, electronic equipment and storage medium
US8401298B2 (en) Storage medium storing character recognition program, character recognition method, and character recognition apparatus
KR102433568B1 (en) Fast Constrained Dynamic Time Warping Method for Similarity Measure of Time Series Data, Computer readable recording media, Computing device
Ma et al. Segmentation of time series in improving dynamic time warping
JP2012069103A (en) Method for determining compressed state sequence
US10121085B2 (en) Information processing apparatus and method of searching for similar data
EP4237997A1 (en) Segmentation models having improved strong mask generalization
Fu et al. Learning pixel affinity pyramid for arbitrary-shaped text detection
Kolekar et al. Barcode detection and classification using SSD (single shot multibox detector) deep learning algorithm
KR101235506B1 (en) Method and apparatus for agglomerative hierarchical clustering using initial clustering
CN112989105B (en) Music structure analysis method and system

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)